diff --git a/plugins/dynamix.apcupsd/UPSsummary.page b/plugins/dynamix.apcupsd/UPSsummary.page deleted file mode 100644 index bc14653f0..000000000 --- a/plugins/dynamix.apcupsd/UPSsummary.page +++ /dev/null @@ -1,33 +0,0 @@ -Menu="Dashboard:1" -Cond="file_exists('/var/run/apcupsd.pid')" ---- - - - - - - -
UPS StatusBattery ChargeRuntime LeftNominal PowerUPS LoadUPS Load %
 
diff --git a/plugins/dynamix/DashStats.page b/plugins/dynamix/DashStats.page index 68c11bfc2..464ed0231 100644 --- a/plugins/dynamix/DashStats.page +++ b/plugins/dynamix/DashStats.page @@ -43,7 +43,9 @@ function cache_devices($disk) { $dockerd = pgrep('dockerd'); $libvirtd = pgrep('libvirtd'); +$apcupsd = file_exists('/var/run/apcupsd.pid'); $started = $var['fsState']=='Started'; +$cache_pool = $var['cacheSbNumDisks']; $array_size = $array_used = 0; $cache_size = $cache_used = 0; $extra_size = $extra_used = 0; @@ -96,11 +98,11 @@ $mycase = file_exists("$boot/$myfile") ? file_get_contents("$boot/$myfile") : fa $board = dmidecode('Base Board Information','2',0); $serial = "s/n: {$board['Serial Number']}"; -$board = "{$board['Manufacturer']} {$board['Product Name']} - v{$board['Version']}"; +$board = "{$board['Manufacturer']} {$board['Product Name']}".($board['Version'] ? ", Version {$board['Version']}" : ""); $bios = dmidecode('BIOS Information','0',0); $biosdate = "BIOS dated: ".my_time(strtotime($bios['Release Date']),$display['date']); -$bios = "{$bios['Vendor']} - v{$bios['Version']}"; +$bios = $bios['Vendor'].($bios['Version'] ? ", Version {$bios['Version']}" : ""); $cpu = dmidecode('Processor Information','4',0); $cpumodel = str_ireplace(["Processor","(C)","(R)","(TM)"],["","©","®","™"],$cpu['Version']); @@ -148,12 +150,13 @@ if ($low) $memory_maximum = pow(2,ceil(log($memory_installed)/log(2))); span.outer{float:left} span.inner{width:124px} +span.ups{width:124px;display:inline-block} -
+
@@ -241,15 +244,28 @@ foreach ($ports as $port) { } ?> -0) { - echo ""; - echo ""; - for ($f=0; $f<$fans; $f+=2) { - if ($f+1<$fans) echo ""; - else echo ""; - } - echo ""; + + + + + + + + + +"; + else echo ""; }?> + + @@ -407,15 +423,15 @@ foreach ($users as $user) { - - - @@ -545,7 +561,7 @@ function moreInfo(data,table) { return info.length ? "
"+table+" has "+info.join('. ')+".
" : ""; } function update5() { -0):?> + $.post('',{cmd:'fan'},function(data) { $.each(data.split('\0'),function(k,v) {$('#fan'+k).html(v);}); }); @@ -566,6 +582,16 @@ function update15() { $.post('',{cmd:'shares',com:tag,names:''},function(data) { $.each(data.split('\0'),function(k,v) {$('#share'+(k+1)).html(v);}); }); + + + $.get('/plugins/dynamix.apcupsd/include/UPSstatus.php',{all:'false'},function(d) { + var data = d.replace(/<\/?tr>/,'').replace(/