|
9 | 9 | id="cbd-profiler-report"
|
10 | 10 | class="cbd-rounded mt10 mb10 cbd-reportContainer"
|
11 | 11 | x-data="{
|
12 |
| - profilerId : '#args.profiler.id#' |
| 12 | + profilerId : '#args.profiler.id#', |
| 13 | + statusCode : '#args.profiler.response.statusCode#', |
| 14 | + statusColor (){ |
| 15 | + if( this.statusCode >= 200 && this.statusCode < 300 ) |
| 16 | + return 'cbd-text-green' |
| 17 | +
|
| 18 | + if( this.statusCode >= 300 && this.statusCode < 400 ) |
| 19 | + return 'cbd-text-blue' |
| 20 | +
|
| 21 | + return 'cbd-text-red' |
| 22 | + } |
13 | 23 | }"
|
14 | 24 | >
|
15 | 25 |
|
|
21 | 31 | <!--- VISUALIZER TOOLBAR --->
|
22 | 32 | <cfif args.isVisualizer>
|
23 | 33 |
|
| 34 | + <!--- Refresh Button ---> |
24 | 35 | <button
|
25 | 36 | type="button"
|
26 | 37 | title="Refresh"
|
|
35 | 46 | </svg>
|
36 | 47 | </button>
|
37 | 48 |
|
| 49 | + <!--- Back to Profilers ---> |
38 | 50 | <button
|
39 | 51 | type="button"
|
40 | 52 | title="Back to profilers"
|
|
53 | 65 | class="cbd-size13"
|
54 | 66 | >
|
55 | 67 | <span title="Status Code">
|
56 |
| - <cfif args.profiler.response.statusCode gte 200 && args.profiler.response.statusCode lt 300 > |
57 |
| - <span class="cbd-text-green"> |
58 |
| - <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
59 |
| - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /> |
60 |
| - </svg> |
61 |
| - #args.profiler.response.statusCode# |
62 |
| - </span> |
63 |
| - <cfelseif args.profiler.response.statusCode gte 300 && args.profiler.response.statusCode lt 400 > |
64 |
| - <span class="cbd-text-blue"> |
65 |
| - <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
66 |
| - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> |
67 |
| - </svg> |
68 |
| - #args.profiler.response.statusCode# |
69 |
| - </span> |
70 |
| - <cfelseif args.profiler.response.statusCode gte 400> |
71 |
| - <span class="cbd-text-red"> |
72 |
| - <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
73 |
| - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /> |
74 |
| - </svg> |
75 |
| - #args.profiler.response.statusCode# |
76 |
| - </span> |
77 |
| - </cfif> |
| 68 | + |
| 69 | + <span :class="statusColor"> |
| 70 | + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
| 71 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /> |
| 72 | + </svg> |
| 73 | + #args.profiler.response.statusCode# |
| 74 | + </span> |
| 75 | + |
78 | 76 | </span>
|
79 | 77 |
|
80 | 78 | <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
89 | 87 | class="cbd-floatRight cbd-size14 mt10 mr5 <cfif args.profiler.executionTime gt args.debuggerConfig.requestTracker.slowExecutionThreshold>cbd-badge-light<cfelse>cbd-badge-dark</cfif>"
|
90 | 88 | title="Total ColdBox Request Execution Time"
|
91 | 89 | >
|
92 |
| - <cfif args.profiler.executionTime gt args.debuggerConfig.requestTracker.slowExecutionThreshold> |
93 |
| - <span class="cbd-text-red"> |
94 |
| - #numberFormat( args.profiler.executionTime )# ms |
95 |
| - </span> |
96 |
| - <cfelse> |
| 90 | + <span class="<cfif args.profiler.executionTime gt args.debuggerConfig.requestTracker.slowExecutionThreshold>cbd-text-red</cfif>"> |
97 | 91 | #numberFormat( args.profiler.executionTime )# ms
|
98 |
| - </cfif> |
| 92 | + </span> |
99 | 93 | </div>
|
100 | 94 |
|
101 | 95 | <!--- Current Event --->
|
|
0 commit comments