1
+ <cfscript >
2
+ allModules = getSetting ( " modules" );
3
+ totalTimes = allModules .reduce ( function ( total , key , thisModuleConfig ){
4
+ if ( ! isNull ( arguments .this ModuleConfig .registrationTime ) ){
5
+ arguments .total .registration + = arguments .this ModuleConfig .registrationTime ;
6
+ }
7
+ if ( ! isNull ( arguments .this ModuleConfig .activationTime ) ){
8
+ arguments .total .activation + = arguments .this ModuleConfig .activationTime ;
9
+ }
10
+ return arguments .total ;
11
+ }, {
12
+ " registration" : 0 ,
13
+ " activation" : 0
14
+ } );
15
+ rootModules = allModules .filter ( function ( module , config ){
16
+ return arguments .config .parent .len () == 0 ;
17
+ } );
18
+ </cfscript >
1
19
<cfoutput >
2
20
<!--- Panel Header --->
3
21
<div class =" cbd-titles" onClick =" cbdToggle( 'cbdModules' )" >
4
22
5
23
<svg xmlns =" http://www.w3.org/2000/svg" fill =" none" viewBox =" 0 0 24 24" stroke =" currentColor" >
6
24
<path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z" />
7
25
</svg >
8
- ColdBox Modules (#arrayLen ( args . loadedModules ) #)
26
+ ColdBox Modules (#structCount ( allModules ) #)
9
27
</div >
10
28
11
29
<!--- Panel Content --->
33
51
Below you can see the registered and activated application modules.
34
52
</p >
35
53
36
- <!--- Module Charts --->
37
- <table border =" 0" cellpadding =" 0" cellspacing =" 1" class =" cbd-tables" >
38
- <tr >
39
- <th align =" left" >Module / Version</th >
40
- <th align =" left" width =" 40%" >Mapping</th >
41
- <th align =" center" width =" 100" >CMDS</th >
42
- </tr >
54
+ <!--- Info Bar --->
55
+ <div class =" mt10 mb10" >
56
+ <div >
57
+ <strong >Total Registration Time:</strong >
58
+ <div class =" cbd-badge-light" >
59
+ #numberFormat ( totalTimes .registration ) # ms
60
+ </div >
61
+ </div >
43
62
44
- <cfloop array =" #args .loadedModules #" index =" thisModule" >
45
- <cfset this ModuleConfig = getModuleConfig ( this Module ) >
46
- <tr id =" cbd-modulerow-#this Module #" >
47
- <td title =" Invocation Path: #this ModuleConfig .invocationPath #" >
48
-
49
- <div >
50
- <cfif len ( this ModuleConfig .entryPoint ) >
51
- <a href =" #event .buildLink ( this ModuleConfig .entryPoint ) #" title =" Open Module Entry Point" >
52
- <svg xmlns =" http://www.w3.org/2000/svg" fill =" none" viewBox =" 0 0 24 24" stroke =" currentColor" >
53
- <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" />
54
- </svg >
55
- </a >
56
- </cfif >
57
-
58
- <!--- Title --->
59
- <strong >#this ModuleConfig .title #</strong >
60
- <!--- Version --->
61
- <cfif len ( this ModuleConfig .version ) >
62
- <span class =" cbd-badge-light" >
63
- #this ModuleConfig .version #
64
- </span >
65
- </cfif >
66
- </div >
67
-
68
- <div class =" mt5" >
69
- #this ModuleConfig .description #
70
- </div >
71
- </td >
72
-
73
- <!--- Mapping --->
74
- <td align =" left" class =" cbd-cellBreak" >
75
- <div class =" cbd-badge-light mt5 cbd-text-left" >
76
- <svg xmlns =" http://www.w3.org/2000/svg" fill =" none" viewBox =" 0 0 24 24" stroke =" currentColor" >
77
- <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" />
78
- </svg >
79
- #this ModuleConfig .mapping #
80
- </div >
81
- </td >
82
-
83
- <!--- Actions --->
84
- <td align =" center" >
85
- <button
86
- type =" button"
87
- title =" Unloads This Module!"
88
- onClick =" cbdUnloadModule( '#this Module #', this )"
89
- >
90
- <svg xmlns =" http://www.w3.org/2000/svg" fill =" none" viewBox =" 0 0 24 24" stroke =" currentColor" >
91
- <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" />
92
- </svg >
93
- </button >
94
-
95
- <button
96
- type =" button"
97
- title =" Reload This Module!"
98
- onClick =" cbdReloadModule( '#this Module #', this )"
99
- >
100
- <svg xmlns =" http://www.w3.org/2000/svg" fill =" none" viewBox =" 0 0 24 24" stroke =" currentColor" >
101
- <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
102
- </svg >
103
- </button >
104
- </td >
105
- </tr >
106
- </cfloop >
63
+ <div class =" mt5" >
64
+ <strong >Total Activation Time:</strong >
65
+ <div class =" cbd-badge-light" >
66
+ #numberFormat ( totalTimes .activation ) # ms
67
+ </div >
68
+ </div >
69
+ </div >
107
70
108
- </table >
71
+ # renderView(
72
+ view : "main/partials/modules",
73
+ module : "cbdebugger",
74
+ args : {
75
+ modules : rootModules
76
+ },
77
+ prePostExempt : true
78
+ )#
109
79
110
80
</div >
111
81
</cfoutput >
0 commit comments