Dashboard: remove enhancements

Only fixes are included
This commit is contained in:
bergware
2023-06-18 01:44:47 +02:00
parent 9965273d21
commit 0e14320c96
2 changed files with 2 additions and 19 deletions
+2 -6
View File
@@ -219,7 +219,6 @@ i#mycase[class^="case-"]{font-size:128px}
i#mycase[class^="fa "]{font-size:96px}
a.cpu_close,span.hand{cursor:pointer;z-index:1001}
tr#var1,tr#var4,tr#cpu_chart,.cpu_open{display:none}
tr#var0,tr#var1,tr#var2,tr#var3,tr#var4{cursor:alias}
td.none{text-align:center;padding-top:12px}
input[value=Edit]{margin:12px 0 0 0;padding:5px 10px}
.share1,.share3,.user1,.user3,.view1,.view2,.view3,.view4{display:none}
@@ -1057,14 +1056,11 @@ function addProperties() {
$(this).find('td:first').prepend("<i class='fa fa-fw fa-close control tile' onclick='dismiss($(this))' title=\"_(Close Tile)_\"></i>");
});
$('div.frame tr').attr('title','');
$('tr#var0').hover(function(){$.post('/webGui/include/DashboardApps.php',{sys:0},function(val){$('.sys0').text(val);})});
<?if ($zfs):?>
$('tr#var1').show().hover(function(){$.post('/webGui/include/DashboardApps.php',{sys:1},function(val){$('.sys1').text(val);})});
$('tr#var1').show();
<?endif;?>
$('tr#var2').hover(function(){$.post('/webGui/include/DashboardApps.php',{sys:2},function(val){$('.sys2').text(val);})});
$('tr#var3').hover(function(){$.post('/webGui/include/DashboardApps.php',{sys:3},function(val){$('.sys3').text(val);})});
<?if ($dockerd):?>
$('tr#var4').show().hover(function(){$.post('/webGui/include/DashboardApps.php',{sys:4},function(val){$('.sys4').text(val);})});
$('tr#var4').show();
<?endif;?>
}
function showContent() {
@@ -20,19 +20,6 @@ require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php";
require_once "$docroot/webGui/include/Helpers.php";
if (isset($_POST['sys'])) {
switch ($_POST['sys']) {
case 0: $size = exec("awk '/^MemTotal/{t=$2}/^MemAvailable/{a=$2}END{print (t-a)*1024}' /proc/meminfo 2>/dev/null"); break;
case 1: $size = exec("awk '/^size/{print \$3;exit}' /proc/spl/kstat/zfs/arcstats 2>/dev/null"); break;
case 2: $size = exec("df --output=used /boot 2>/dev/null|awk '$1!=\"Used\" {print $1*1024}'"); break;
case 3: $size = exec("df --output=used /var/log 2>/dev/null|awk '$1!=\"Used\" {print $1*1024}'"); break;
case 4: $size = exec("df --output=used /var/lib/docker 2>/dev/null|awk '$1!=\"Used\" {print $1*1024}'"); break;
default: $size = 0;
}
extract(parse_plugin_cfg('dynamix',true));
die(my_scale($size,$unit,null,-1,1024)." $unit");
}
$display = $_POST['display'];
if ($_POST['docker'] && ($display=='icons' || $display=='docker')) {