File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -37,4 +37,14 @@ public function data()
3737 'requests ' => $ recent ->toArray (),
3838 ];
3939 }
40+
41+ /**
42+ * Gets the initial text for the history summary
43+ *
44+ * @return string
45+ */
46+ public function summary ()
47+ {
48+ return '0 xhr ' ;
49+ }
4050}
Original file line number Diff line number Diff line change @@ -224,10 +224,15 @@ Toolbar.prototype = {
224224
225225 onMessage : function ( event ) {
226226 if ( event . data . startsWith ( 'ajax-completed$$' ) ) {
227- this . ajaxRequests . push ( JSON . parse ( event . data . split ( '$$' ) [ 1 ] ) ) ;
227+ this . onRequest ( JSON . parse ( event . data . split ( '$$' ) [ 1 ] ) )
228228 }
229229 } ,
230230
231+ onRequest : function ( request ) {
232+ this . ajaxRequests . push ( request ) ;
233+ $ ( ".panel-summary:contains(xhr)" ) . text ( "" + this . ajaxRequests . length + ' xhr' ) ;
234+ } ,
235+
231236 initialize : function ( ) {
232237 this . windowOrigin ( ) ;
233238 this . mouseListener ( ) ;
You can’t perform that action at this time.
0 commit comments