File tree Expand file tree Collapse file tree 5 files changed +20
-5
lines changed Expand file tree Collapse file tree 5 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
20
* Ability for the custom ` timeIt() ` functions to accept metdata to store in the execution timer
21
21
* New ` Slowest ` Queries panel for cborm, acf, and qb/quick
22
22
* New visualizer total db time as well as request time including percentage of the request time
23
+ * Ability to export a profiler in json
23
24
24
25
### Fixed
25
26
Original file line number Diff line number Diff line change @@ -156,13 +156,19 @@ component extends="coldbox.system.RestHandler" {
156
156
* Get a profiler report via ajax
157
157
*/
158
158
function renderProfilerReport ( event , rc , prc ){
159
+ var profilerReport = variables .debuggerService .getProfilerById ( rc .id );
160
+
161
+ if ( profilerReport .isEmpty () ) {
162
+ return " <h3 class='cbd-text-red cbd-bg-light-red'>Profiler Id: #encodeForHTML ( rc .id ) # doesn't exist</h3>" ;
163
+ }
164
+
159
165
return renderView (
160
166
view : " main/partials/profilerReport" ,
161
167
module : " cbdebugger" ,
162
168
args : {
163
169
debuggerService : variables .debuggerService ,
164
170
environment : variables .debuggerService .getEnvironment (),
165
- profiler : variables . debuggerService . getProfilerById ( rc . id ) ,
171
+ profiler : profilerReport ,
166
172
debuggerConfig : variables .debuggerConfig ,
167
173
isVisualizer : rc .isVisualizer
168
174
},
Original file line number Diff line number Diff line change 39
39
padding : 5px 5px ;
40
40
border : 1px solid #eaeaea ;
41
41
color : black ;
42
+ background-color : rgb (221 , 216 , 216 );
42
43
43
44
& :hover {
44
45
border : 1px solid #333333 ;
Original file line number Diff line number Diff line change 46
46
</svg >
47
47
</button >
48
48
49
+ <a
50
+ href =" #event .buildLink ( ' cbdebugger:exportProfilerReport' , { id : args .profiler .id } ) #"
51
+ target =" _blank"
52
+ class =" pt5 pb5 cbd-button cbd-rounded"
53
+ title =" Export Profiler to JSON"
54
+ ><svg class =" w-6 h-6" fill =" none" stroke =" currentColor" viewBox =" 0 0 24 24" xmlns =" http://www.w3.org/2000/svg" ><path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10" ></path ></svg ></a >
55
+
49
56
<!--- Back to Profilers --->
50
57
<button
51
58
type =" button"
Original file line number Diff line number Diff line change 57
57
(ms)
58
58
</th >
59
59
60
- <th width =" 50 " >
60
+ <th width =" 75 " >
61
61
Actions
62
62
</th >
63
63
</tr >
234
234
<a
235
235
href =" #event .buildLink ( ' cbdebugger:exportProfilerReport' , { id : this Profiler .id } ) #"
236
236
target =" _blank"
237
- >
238
- < svg class = " w-6 h-6 " fill = " none " stroke = " currentColor " viewBox = " 0 0 24 24 " xmlns = " http://www.w3.org/2000/svg " >< path stroke-linecap = " round " stroke-linejoin = " round " stroke-width = " 2 " d = " M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10 " ></ path ></ svg >
239
- </a >
237
+ class = " pt5 pb5 cbd-button cbd-rounded "
238
+ title = " Export Profiler to JSON "
239
+ >< svg class = " w-6 h-6 " fill = " none " stroke = " currentColor " viewBox = " 0 0 24 24 " xmlns = " http://www.w3.org/2000/svg " >< path stroke-linecap = " round " stroke-linejoin = " round " stroke-width = " 2 " d = " M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10 " ></ path ></ svg > </a >
240
240
</td >
241
241
</tr >
242
242
</cfloop >
You can’t perform that action at this time.
0 commit comments