@@ -9,6 +9,7 @@ interface LayoutProps {
9
9
execDuration ?: number ;
10
10
memUsage ?: number ;
11
11
qualityScore ?: number ;
12
+ cyclomaticComplexity ?: number ;
12
13
lintScore ?: number ;
13
14
isLoading : boolean ;
14
15
}
@@ -24,6 +25,7 @@ const Result: React.FC<LayoutProps> = ({
24
25
qualityScore,
25
26
lintScore,
26
27
isLoading,
28
+ cyclomaticComplexity,
27
29
} ) => {
28
30
if ( status !== 'done' && status !== 'error' ) {
29
31
return (
@@ -47,6 +49,7 @@ const Result: React.FC<LayoutProps> = ({
47
49
lintScore = { lintScore }
48
50
memUsage = { memUsage }
49
51
execDuration = { execDuration }
52
+ cyclomaticComplexity = { cyclomaticComplexity }
50
53
/>
51
54
</ div >
52
55
< div className = "w-3/5 pl-6" >
@@ -100,6 +103,7 @@ interface ScoresComponentProps {
100
103
lintScore : number | undefined ;
101
104
memUsage : number | undefined ;
102
105
execDuration : number | undefined ;
106
+ cyclomaticComplexity : number | undefined ;
103
107
}
104
108
105
109
const ScoresComponent : React . FC < ScoresComponentProps > = ( {
@@ -108,6 +112,7 @@ const ScoresComponent: React.FC<ScoresComponentProps> = ({
108
112
lintScore,
109
113
memUsage,
110
114
execDuration,
115
+ cyclomaticComplexity,
111
116
} ) => {
112
117
return (
113
118
< div className = "relative flex flex-col min-w-0 mb-4 lg:mb-0 break-words bg-gray-50 dark:bg-gray-800 w-full shadow-lg rounded" >
@@ -123,10 +128,10 @@ const ScoresComponent: React.FC<ScoresComponentProps> = ({
123
128
< table className = "items-center w-full bg-transparent border-collapse" >
124
129
< tbody >
125
130
< tr className = "text-gray-700 dark:text-gray-100" >
126
- < th className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-4 text-left" >
131
+ < th className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3 text-left" >
127
132
Exit status
128
133
</ th >
129
- < td className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-4 " >
134
+ < td className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3 " >
130
135
< div className = "flex items-center" >
131
136
< span className = "mr-2" >
132
137
{ status === 'done' ? '✅' : '❌' }
@@ -135,10 +140,10 @@ const ScoresComponent: React.FC<ScoresComponentProps> = ({
135
140
</ td >
136
141
</ tr >
137
142
< tr className = "text-gray-700 dark:text-gray-100" >
138
- < th className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-4 text-left" >
143
+ < th className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3 text-left" >
139
144
Quality score
140
145
</ th >
141
- < td className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-4 " >
146
+ < td className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3 " >
142
147
< div className = "flex items-center" >
143
148
< span className = "mr-2" > { qualityScore } </ span >
144
149
< div className = "relative w-full" >
@@ -153,10 +158,10 @@ const ScoresComponent: React.FC<ScoresComponentProps> = ({
153
158
</ td >
154
159
</ tr >
155
160
< tr className = "text-gray-700 dark:text-gray-100" >
156
- < th className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-4 text-left" >
161
+ < th className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3 text-left" >
157
162
Lint score
158
163
</ th >
159
- < td className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-4 " >
164
+ < td className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3 " >
160
165
< div className = "flex items-center" >
161
166
< span className = "mr-2" > { lintScore } </ span >
162
167
< div className = "relative w-full" >
@@ -171,25 +176,35 @@ const ScoresComponent: React.FC<ScoresComponentProps> = ({
171
176
</ td >
172
177
</ tr >
173
178
< tr className = "text-gray-700 dark:text-gray-100" >
174
- < th className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-4 text-left" >
179
+ < th className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3 text-left" >
175
180
Execution duration
176
181
</ th >
177
- < td className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-4 " >
182
+ < td className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3 " >
178
183
< div className = "flex items-center" >
179
184
< span className = "mr-2" > { execDuration } μs</ span >
180
185
</ div >
181
186
</ td >
182
187
</ tr >
183
188
< tr className = "text-gray-700 dark:text-gray-100" >
184
- < th className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-4 text-left" >
189
+ < th className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3 text-left" >
185
190
Max. memory usage
186
191
</ th >
187
- < td className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-4 " >
192
+ < td className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3 " >
188
193
< div className = "flex items-center" >
189
194
< span className = "mr-2" > { memUsage } KB</ span >
190
195
</ div >
191
196
</ td >
192
197
</ tr >
198
+ < tr className = "text-gray-700 dark:text-gray-100" >
199
+ < th className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3 text-left" >
200
+ Cyclomatic complexity
201
+ </ th >
202
+ < td className = "border-t-0 px-4 align-middle border-l-0 border-r-0 text-sm whitespace-nowrap p-3" >
203
+ < div className = "flex items-center" >
204
+ < span className = "mr-2" > { cyclomaticComplexity } </ span >
205
+ </ div >
206
+ </ td >
207
+ </ tr >
193
208
</ tbody >
194
209
</ table >
195
210
</ div >
0 commit comments