mirror of
https://github.com/unraid/webgui.git
synced 2026-01-14 13:39:58 -06:00
37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
Menu="Dashboard:2"
|
|
Title="UPS Summary"
|
|
Cond="file_exists('/var/run/apcupsd.pid')"
|
|
---
|
|
<?PHP
|
|
/* Copyright 2005-2016, Lime Technology
|
|
* Copyright 2015, Dan Landon.
|
|
* Copyright 2015, Bergware International.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License version 2,
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*/
|
|
?>
|
|
<style>
|
|
table.ups thead tr th{width:16.6%;padding-left:10px;}
|
|
table.ups tbody tr td{padding-left:10px;font-weight:bold;}
|
|
</style>
|
|
<script>
|
|
function getUPSstatus() {
|
|
$.get('/plugins/dynamix.apcupsd/include/UPSstatus.php',{all:'false'},function(data) {
|
|
if (data) $('#ups_summary').html(data);
|
|
<?if (($display['refresh']>0 || ($display['refresh']<0 && $var['mdResync']==0))):?>
|
|
setTimeout(getUPSstatus, <?=max(abs($display['refresh']),15000)?>);
|
|
<?endif;?>
|
|
});
|
|
}
|
|
$(getUPSstatus);
|
|
</script>
|
|
<table class="tablesorter shift ups">
|
|
<thead><tr><th>UPS Status</th><th>Battery Charge</th><th>Runtime Left</th><th>Nominal Power</th><th>UPS Load</th><th>UPS Load %</th></tr></thead>
|
|
<tbody id="ups_summary"><tr><td colspan="6"> </td></tr></tbody>
|
|
</table>
|