Dashboard updates using Nchan

This commit is contained in:
bergware
2021-05-19 08:14:27 +02:00
parent 7f13e143d8
commit 7d7486438d
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -786,7 +786,7 @@ function moreInfo(data,table) {
if (data[2]>0) info.push(data[2]+" _(heat warning)_"+(data[2]==1?'':'s'));
if (data[3]>0) info.push(data[3]+" _(SMART error)_"+(data[3]==1?'':'s'));
if (data[4]>0) info.push(data[4]+" _(utilization warning)_"+(data[4]==1?'':'s'));
return info.length ? "<div class='last'><i class='icon-u-triangle failed'></i><span class='failed'>"+table+" _(has)_ "+info.join('. ')+".</span></div>" :"";
return info.length ? "<div class='last'><i class='icon-u-triangle failed'></i><span class='failed'>"+table+" _(has)_ "+info.join('. ')+".</span></div>" : "";
}
function autoscale(value,text,size,kilo) {
if (kilo==null) kilo = 1000;
+2 -1
View File
@@ -115,7 +115,8 @@ if ($run) {
exec("/usr/local/sbin/create_network_ini >/dev/null");
// restart dashboard Nchan port monitoring
exec('pkill update_3');
file_put_contents('/tmp/nchan',implode(',',array_filter(explode(',',file_get_contents('/tmp/nchan')),function($n){return $n!='update_3';})));
$nchan = '/tmp/nchan';
if (file_exists($nchan)) file_put_contents($nchan,implode(',',array_filter(explode(',',file_get_contents($nchan)),function($n){return $n!='update_3';})));
}
exit(0);
?>