@@ -11,77 +11,119 @@ Date : September 25, 2005
11
11
Description :
12
12
Debugging template for the application
13
13
----------------------------------------------------------------------->
14
+ <cfscript >
15
+ var isQuickInstalled = getController ().getModuleService ().isModuleRegistered ( " quick" );
16
+ var isQBInstalled = getController ().getModuleService ().isModuleRegistered ( " qb" );
17
+ var totalQueries = request .cbdebugger .keyExists ( " qbQueries" ) ? request .cbdebugger .qbQueries .all .len () : 0 ;
18
+ var totalEntities = request .cbdebugger .keyExists ( " quick" ) ? request .cbdebugger .quick .total : 0 ;
19
+ </cfscript >
14
20
<cfoutput >
15
21
<div class =" fw_titles" onClick =" fw_toggle('fw_qbPanel')" >
16
- qb
22
+ < cfif isQuickInstalled >Quick & ## 47; </ cfif > qb
17
23
</div >
18
24
<div class =" fw_debugContent<cfif instance.debuggerConfig.expandedQBPanel>View</cfif>" id =" fw_qbPanel" >
19
- <cfif NOT getController ().getModuleService ().isModuleRegistered ( " qb" ) >
20
- qb is not installed or registered.
21
- <cfelse >
22
- <cfif NOT request .cbdebugger .keyExists ( " qbQueries" ) OR request .cbdebugger .qbQueries .isEmpty () >
23
- No queries executed
25
+ <div id =" qbQueries" >
26
+ <cfif NOT isQBInstalled >
27
+ qb is not installed or registered.
24
28
<cfelse >
25
- <table border =" 0" align =" center" cellpadding =" 0" cellspacing =" 1" class =" fw_debugTables" >
26
- <thead >
27
- <tr >
28
- <th width =" 5%" >Count</th >
29
- <th >Query</th >
30
- </tr >
31
- </thead >
32
- <tbody >
33
- <cfloop array =" #request .cbdebugger .qbQueries .keyArray () #" index =" sql" >
29
+ <div class =" fw_subtitles" > Queries <span class =" fw_badge_dark" style =" margin-left: 1em;" >#totalQueries #</span ></div >
30
+ <div style =" padding: 1em;" >
31
+ <input type =" button" style =" font-size:10px" value =" Grouped View" onClick =" fw_showGroupedQueries()" >
32
+ <input type =" button" style =" font-size:10px" value =" Timeline View" onClick =" fw_showTimelineQueries()" >
33
+ </div >
34
+ <cfif totalQueries EQ 0 >
35
+ No queries executed
36
+ <cfelse >
37
+ <div id =" groupedQueries" >
38
+ <table border =" 0" align =" center" cellpadding =" 0" cellspacing =" 1" class =" fw_debugTables" >
39
+ <thead >
40
+ <tr >
41
+ <th width =" 5%" >Count</th >
42
+ <th >Query</th >
43
+ </tr >
44
+ </thead >
45
+ <tbody >
46
+ <cfloop array =" #request .cbdebugger .qbQueries .grouped .keyArray () #" index =" sql" >
47
+ <tr >
48
+ <td align =" center" >#request .cbdebugger .qbQueries .grouped [ sql ].len () #</td >
49
+ <td >#sql #</td >
50
+ </tr >
51
+ <tr style =" margin-right: 2em;" >
52
+ <td ></td >
53
+ <td style =" width: 100%;" >
54
+ <table border =" 0" align =" center" cellpadding =" 0" cellspacing =" 1" class =" fw_debugTables" >
55
+ <thead >
56
+ <tr >
57
+ <th >Timestamp</th >
58
+ <th >Execution Time</th >
59
+ <th >Bindings</th >
60
+ </tr >
61
+ </thead >
62
+ <tbody >
63
+ <cfloop array =" #request .cbdebugger .qbQueries .grouped [ sql ] #" index =" q" >
64
+ <tr >
65
+ <td >#TimeFormat (q .timestamp ," hh:MM:SS.l tt" ) #</td >
66
+ <td >#q .executionTime # ms</td >
67
+ <td ><cfdump var =" #q .bindings #" expand =" false" /></td >
68
+ </tr >
69
+ </cfloop >
70
+ </tbody >
71
+ </table >
72
+ </td >
73
+ </tr >
74
+ </cfloop >
75
+ </tbody >
76
+ </table >
77
+ </div >
78
+ <div id =" timelineQueries" style =" display: none;" >
79
+ <table border =" 0" align =" center" cellpadding =" 0" cellspacing =" 1" class =" fw_debugTables" >
80
+ <thead >
81
+ <tr >
82
+ <th >Timestamp</th >
83
+ <th width =" 80%" >Query</th >
84
+ <th align =" center" >Execution Time</th >
85
+ <th >Bindings</th >
86
+ </tr >
87
+ </thead >
88
+ <tbody >
89
+ <cfloop array =" #request .cbdebugger .qbQueries .all #" index =" q" >
90
+ <tr <cfif debugTimers .currentrow mod 2 eq 0 >class =" even" </cfif >>
91
+ <td >#TimeFormat (q .timestamp ," hh:MM:SS.l tt" ) #</td >
92
+ <td >#q .sql #</td >
93
+ <td >#q .executionTime # ms</td >
94
+ <td ><cfdump var =" #q .bindings #" expand =" false" /></td >
95
+ </tr >
96
+ </cfloop >
97
+ </tbody >
98
+ </table >
99
+ </div >
100
+ </cfif >
101
+ </cfif >
102
+ </div >
103
+ <cfif isQuickInstalled >
104
+ <div id =" quickEntities" style =" margin-top: 1em;" >
105
+ <div class =" fw_subtitles" > Entities <span class =" fw_badge_dark" style =" margin-left: 1em;" >#totalEntities #</span ></div >
106
+ <cfif totalEntities EQ 0 >
107
+ No Quick entities loaded.
108
+ <cfelse >
109
+ <table border =" 0" align =" center" cellpadding =" 0" cellspacing =" 1" class =" fw_debugTables" style =" margin-top: 1em;" >
110
+ <thead >
34
111
<tr >
35
- <td align =" center" >#request .cbdebugger .qbQueries [ sql ].len () #</td >
36
- <td >#sql #</td >
37
- </tr >
38
- <tr style =" margin-right: 2em;" >
39
- <td ></td >
40
- <td style =" width: 100%;" >
41
- <table border =" 0" align =" center" cellpadding =" 0" cellspacing =" 1" class =" fw_debugTables" >
42
- <thead >
43
- <tr >
44
- <th >Timestamp</th >
45
- <th >Execution Time</th >
46
- <th >Bindings</th >
47
- </tr >
48
- </thead >
49
- <tbody >
50
- <cfloop array =" #request .cbdebugger .qbQueries [ sql ] #" index =" q" >
51
- <tr >
52
- <td >#TimeFormat (q .timestamp ," hh:MM:SS.l tt" ) #</td >
53
- <td >#q .executionTime # ms</td >
54
- <td ><cfdump var =" #q .bindings #" expand =" false" /></td >
55
- </tr >
56
- </cfloop >
57
- </tbody >
58
- </table >
59
- </td >
112
+ <th width =" 5%" >Count</th >
113
+ <th >Mapping</th >
60
114
</tr >
61
- </cfloop >
62
- </tbody >
63
- </table >
64
- <!--- <table border="0" align="center" cellpadding="0" cellspacing="1" class="fw_debugTables">
65
- <thead>
66
- <tr>
67
- <th>Timestamp</th>
68
- <th width="80%">Query</th>
69
- <th align="center">Execution Time</th>
70
- <th>Bindings</th>
71
- </tr>
72
- </thead>
73
- <tbody>
74
- <cfloop array="#request.cbdebugger.qbQueries#" index="q">
75
- <tr <cfif debugTimers.currentrow mod 2 eq 0>class="even"</cfif>>
76
- <td>#TimeFormat(q.timestamp,"hh:MM:SS.l tt")#</td>
77
- <td>#q.sql#</td>
78
- <td>#q.executionTime# ms</td>
79
- <td><cfdump var="#q.bindings#" expand="false" /></td>
80
- </tr>
81
- </cfloop>
82
- </tbody>
83
- </table> --->
84
- </cfif >
115
+ </thead >
116
+ <tbody >
117
+ <cfloop collection =" #request .cbdebugger .quick .byMapping #" item =" mapping" >
118
+ <tr <cfif debugTimers .currentrow mod 2 eq 0 >class =" even" </cfif >>
119
+ <td >#request .cbdebugger .quick .byMapping [ mapping ] #</td >
120
+ <td >#mapping #</td >
121
+ </tr >
122
+ </cfloop >
123
+ </tbody >
124
+ </table >
125
+ </cfif >
126
+ </div >
85
127
</cfif >
86
128
</div >
87
129
</cfoutput >
0 commit comments