File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4335,7 +4335,7 @@ class Firmware {
43354335 if ( typeof overlay !== 'undefined' ) overlay . remove ( ) ;
43364336 reject ( { htmlError : status , service : 'GET /backup' } ) ;
43374337 } ;
4338- xhr . open ( 'GET' , baseUrl . length > 0 ? `${ baseUrl } /backup` : '/backup' , true ) ;
4338+ xhr . open ( 'GET' , baseUrl . length > 0 ? `${ baseUrl } /backup?attach=true ` : '/backup?attach=true ' , true ) ;
43394339 xhr . send ( ) ;
43404340 } ) ;
43414341 }
@@ -4386,7 +4386,19 @@ class Firmware {
43864386 sp = document . getElementById ( 'spanMinMemory' ) ;
43874387 if ( sp ) sp . innerHTML = mem . min . fmt ( '#,##0' ) ;
43884388 sp = document . getElementById ( 'spanUptime' ) ;
4389- if ( sp ) sp . innerHTML = mem . uptime / 3600000 ;
4389+ if ( sp ) {
4390+ let t = Math . floor ( mem . uptime / 1000 ) ;
4391+ let d = Math . floor ( t / 86400 ) ; t %= 86400 ;
4392+ let h = Math . floor ( t / 3600 ) ; t %= 3600 ;
4393+ let m = Math . floor ( t / 60 ) ;
4394+ let s = t % 60 ;
4395+ let parts = [ ] ;
4396+ if ( d > 0 ) parts . push ( d + 'd' ) ;
4397+ if ( h > 0 ) parts . push ( h + 'h' ) ;
4398+ if ( m > 0 ) parts . push ( m + 'm' ) ;
4399+ if ( s > 0 || parts . length === 0 ) parts . push ( s + 's' ) ;
4400+ sp . innerHTML = parts . join ( ' ' ) ;
4401+ }
43904402
43914403
43924404 }
You can’t perform that action at this time.
0 commit comments