@@ -5,6 +5,7 @@ export default ( isExpanded, refreshFrequency, hasReinitPassword, isVisualizer )
5
5
usingReinitPassword : hasReinitPassword ,
6
6
isVisualizer : isVisualizer ,
7
7
currentProfileId : "" ,
8
+ refreshMonitor : null ,
8
9
9
10
reinitFramework ( ) {
10
11
this . $refs . reinitLoader . classList . add ( "cbd-spinner" ) ;
@@ -21,6 +22,7 @@ export default ( isExpanded, refreshFrequency, hasReinitPassword, isVisualizer )
21
22
} ) ;
22
23
} ,
23
24
loadProfilerReport ( id ) {
25
+ this . stopDebuggerMonitor ( ) ;
24
26
fetch ( `${ this . appUrl } cbDebugger/renderProfilerReport` , {
25
27
method : "POST" ,
26
28
headers : { "x-Requested-With" : "XMLHttpRequest" } ,
@@ -31,13 +33,13 @@ export default ( isExpanded, refreshFrequency, hasReinitPassword, isVisualizer )
31
33
} )
32
34
. then ( response => response . text ( ) )
33
35
. then ( html => {
34
- history . pushState ( { profileId : id } , null , "## " + id ) ;
36
+ history . pushState ( { profileId : id } , null , "#" + id ) ;
35
37
this . $refs [ "cbd-profilers" ] . innerHTML = html ;
36
38
coldboxDebugger . scrollTo ( "cbd-request-tracker" ) ;
37
39
} ) ;
38
40
} ,
39
41
clearState ( ) {
40
- history . pushState ( { } , null , "## " ) ;
42
+ history . pushState ( { } , null , "#" ) ;
41
43
this . currentProfileId = "" ;
42
44
} ,
43
45
refreshProfilers ( ) {
@@ -65,17 +67,18 @@ export default ( isExpanded, refreshFrequency, hasReinitPassword, isVisualizer )
65
67
} ) ;
66
68
} ,
67
69
stopDebuggerMonitor ( ) {
68
- if ( "cbdRefreshMonitor" in window ) {
69
- clearInterval ( window . cbdRefreshMonitor ) ;
70
- console . log ( "Stopped ColdBox Debugger Profiler Refresh" ) ;
70
+ if ( "refreshMonitor" in this ) {
71
+ clearInterval ( this . refreshMonitor ) ;
72
+ this . refreshFrequency = 0 ;
73
+ console . info ( "Stopped ColdBox Debugger Profiler Refresh" ) ;
71
74
}
72
75
} ,
73
76
startDebuggerMonitor ( frequency ) {
74
77
if ( frequency == 0 ) {
75
78
return this . stopDebuggerMonitor ( ) ;
76
79
}
77
- window . cbdRefreshMonitor = setInterval ( this . refreshProfilers , frequency * 1000 ) ;
78
- console . log ( "Started ColdBox Debugger Profiler Refresh using " + frequency + " seconds" ) ;
80
+ this . refreshMonitor = setInterval ( ( ) => this . refreshProfilers ( ) , frequency * 1000 ) ;
81
+ console . info ( "Started ColdBox Debugger Profiler Refresh using " + frequency + " seconds" ) ;
79
82
} ,
80
83
init ( ) {
81
84
window . addEventListener ( "popstate" , e => {
0 commit comments