File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ document.addEventListener('DOMContentLoaded', function () {
2424 // if max_attr is defined, use that to define the limits
2525 if ( max_value ) {
2626 const max = parseInt ( card . getAttribute ( max_attr ) , 10 ) ;
27-
27+ console . log ( "dataAttr: " , dataAttr , "max: " , max ) ;
2828 if ( isNaN ( max ) ) {
2929 // console.warn(`Invalid max value for ${max_value}`);
3030 return ;
Original file line number Diff line number Diff line change @@ -437,7 +437,7 @@ def _get_system_info():
437437 """
438438 boot_time = get_cached_value ('boot_time' , lambda : datetime .datetime .fromtimestamp (psutil .boot_time ()))
439439 uptime_dict = get_cached_value ('uptime' , lambda : format_uptime (datetime .datetime .now () - boot_time ))
440-
440+ memory_available = get_cached_value ( "memory_available" , get_memory_available )
441441 # Gathering fresh system information
442442 battery_info = psutil .sensors_battery ()
443443 memory_info = psutil .virtual_memory ()
@@ -451,6 +451,7 @@ def _get_system_info():
451451 info = {
452452 'cpu_percent' : cpu_usage_percent (),
453453 'memory_percent' : round (memory_info .percent , 2 ),
454+ 'memory_available' : memory_available ,
454455 'disk_percent' : round (disk_info .percent , 2 ),
455456 'network_sent' : network_sent ,
456457 'battery_percent' : round (battery_info .percent , 1 ) if battery_info else 0 ,
You can’t perform that action at this time.
0 commit comments