File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -123,9 +123,12 @@ var Application = View.extend({
123
123
app . statusbar . hide ( ) ;
124
124
} ,
125
125
onFatalError : function ( id , err ) {
126
+ debug ( 'clearing client stall timeout...' ) ;
127
+ clearTimeout ( this . clientStalledTimeout ) ;
128
+
126
129
console . error ( 'Fatal Error!: ' , id , err ) ;
127
- bugsnag . notifyException ( err , 'fatal! ' + id ) ;
128
- window . alert ( 'Fatal Error: ' + id + ': ' + err . message ) ;
130
+ bugsnag . notifyException ( err , 'Fatal Error: ' + id ) ;
131
+ app . statusbar . fatal ( err ) ;
129
132
} ,
130
133
// ms we'll wait for a `scout-client` instance
131
134
// to become readable before giving up and showing
Original file line number Diff line number Diff line change 3
3
.progress-bar.progress-bar-striped.active ( data-hook ='inner-bar' )
4
4
ul.message-background.with-sidebar.centered ( data-hook ='message-container' ) : li
5
5
p( data-hook ='message' )
6
- .spinner-circles
6
+ .spinner-circles ( data-hook = 'loading' )
7
7
.circle-1
8
8
.circle-2
Original file line number Diff line number Diff line change @@ -7,10 +7,20 @@ var StatusbarView = View.extend({
7
7
} ,
8
8
message : {
9
9
type : 'string'
10
+ } ,
11
+ loading : {
12
+ type : 'boolean' ,
13
+ default : true
10
14
}
11
15
} ,
12
16
template : require ( './index.jade' ) ,
13
17
bindings : {
18
+ loading : {
19
+ hook : 'loading' ,
20
+ type : 'booleanClass' ,
21
+ yes : 'visible' ,
22
+ no : 'hidden'
23
+ } ,
14
24
message : [
15
25
{
16
26
hook : 'message'
@@ -68,13 +78,20 @@ var StatusbarView = View.extend({
68
78
onComplete : function ( ) {
69
79
this . hide ( ) ;
70
80
} ,
81
+ fatal : function ( err ) {
82
+ this . loading = false ;
83
+ this . message = 'Fatal Error: ' + err . message ;
84
+ this . width = 100 ;
85
+ } ,
71
86
show : function ( message ) {
72
87
this . message = message || '' ;
73
88
this . width = 100 ;
89
+ this . loading = true ;
74
90
} ,
75
91
hide : function ( ) {
76
92
this . message = '' ;
77
93
this . width = 0 ;
94
+ this . loading = false ;
78
95
}
79
96
} ) ;
80
97
You can’t perform that action at this time.
0 commit comments