From f02565dd49e5752cd952a9914090aabab841e2b6 Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 27 Aug 2016 17:03:06 +0200 Subject: [PATCH] Add collapsable CPU load details in Dashboard --- plugins/dynamix/DashStats.page | 35 +++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/plugins/dynamix/DashStats.page b/plugins/dynamix/DashStats.page index 8afb2efa6..0b3cf9827 100644 --- a/plugins/dynamix/DashStats.page +++ b/plugins/dynamix/DashStats.page @@ -112,6 +112,7 @@ function active_disks($disk) { $disks = array_filter($disks,'active_disks'); $slots = count($disks) + count($devs); ?> + @@ -175,7 +176,9 @@ echo "Array Status".implode('',$row0);
Load Statistics
Avg. CPU load
-1):?>Per CPU load + + +1):?>Per CPU load * "; $tr = true; endforeach; +?> + + + +Per CPU load * + + +0): echo $fans>2 ? "" : ""; echo "FAN speed"; @@ -485,9 +503,24 @@ function dropdown(menu) { $(select+' option')[$.cookie(menu)].selected = true; $(select).change(); } +function toggle_CPU(init) { + if ($.cookie('cpu')===undefined) { + if (!init) $.cookie('cpu','close',{path:'/',expires:3650}); + } else { + if (!init) $.removeCookie('cpu',{path:'/'}); + } + if ($.cookie('cpu')===undefined) { + $('.cpu_open').show(); + $('.cpu_closed').hide(); + } else { + $('.cpu_open').hide(); + $('.cpu_closed').show(); + } +} $(function() { dropdown('enter_share'); dropdown('enter_view'); + toggle_CPU(true); update3(); update60(); update30();