mirror of
https://github.com/unraid/webgui.git
synced 2026-04-22 10:08:25 -05:00
Usage bars updates
This commit is contained in:
@@ -110,8 +110,8 @@ foreach ($containers as $ct) {
|
||||
echo "<td>{$ct['NetworkMode']}</td>";
|
||||
echo "<td style='white-space:nowrap'><span class='docker_readmore'>".implode('<br>',$ports)."</span></td>";
|
||||
echo "<td style='word-break:break-all'><span class='docker_readmore'>".implode('<br>',$paths)."</span></td>";
|
||||
echo "<td class='advanced'><span class='cpu-$id'>0%</span><div class='usage-disk mm'><span id='cpu-$id' style='width:0'></span></div></td>";
|
||||
echo "<td class='advanced'><span class='mem-$id'>0%</span><div class='usage-disk mm'><span id='mem-$id' style='width:0'></span></div></td>";
|
||||
echo "<td class='advanced'><span class='cpu-$id'>0%</span><div class='usage-disk mm'><span id='cpu-$id' style='width:0'></span><span></span></div></td>";
|
||||
echo "<td class='advanced'><span class='mem-$id'>0%</span><div class='usage-disk mm'><span id='mem-$id' style='width:0'></span><span></span></div></td>";
|
||||
echo "<td><input type='checkbox' id='$id-auto' class='autostart' container='".htmlspecialchars($name)."'".($info['autostart'] ? ' checked':'').">";
|
||||
echo "<span id='$id-wait' style='float:right;display:none'>wait<input class='wait' container='".htmlspecialchars($name)."' type='number' value='$wait' placeholder='0' title='seconds'></span></td>";
|
||||
echo "<td><a class='log' onclick=\"containerLogs('".addslashes(htmlspecialchars($name))."','$id',false,false)\"><img class='basic' src='/plugins/dynamix/icons/log.png'><div class='advanced'>";
|
||||
|
||||
@@ -204,9 +204,9 @@ function device_usage(&$disk, $array, &$full, &$high) {
|
||||
} else $class = false;
|
||||
} else $used = false;
|
||||
if ($used) {
|
||||
return $text%10==0 ? $used : "<span class='load'>$used</span><div class='usage-disk sys'><span style='width:$used'".($class?" class='$class'":"")."></span></div>";
|
||||
return $text%10==0 ? $used : "<span class='load'>$used</span><div class='usage-disk sys'><span style='width:$used'".($class?" class='$class'":"")."></span><span></span></div>";
|
||||
} else {
|
||||
return $text%10==0 ? "-" : "<span class='load'>-</span><div class='usage-disk sys none'></div>";
|
||||
return $text%10==0 ? "-" : "<span class='load'>-</span><div class='usage-disk sys none'><span></span></div>";
|
||||
}
|
||||
}
|
||||
function array_group($type) {
|
||||
|
||||
@@ -143,13 +143,13 @@ function fs_info(&$disk) {
|
||||
echo "<td>".my_scale($disk['fsUsed']*1024,$unit)." $unit</td>";
|
||||
} else {
|
||||
$used = isset($disk['fsSize']) && $disk['fsSize']>0 ? 100-round(100*$disk['fsFree']/$disk['fsSize']) : 0;
|
||||
echo "<td><div class='usage-disk'><span style='width:$used%' class='".usage_color($disk,$used,false)."'></span>".my_scale($disk['fsUsed']*1024,$unit)." $unit</div></td>";
|
||||
echo "<td><div class='usage-disk'><span style='width:$used%' class='".usage_color($disk,$used,false)."'></span><span>".my_scale($disk['fsUsed']*1024,$unit)." $unit</span></div></td>";
|
||||
}
|
||||
if ($display['text']<10 ? $display['text']%10==0 : $display['text']%10!=0) {
|
||||
echo "<td>".my_scale($disk['fsFree']*1024,$unit)." $unit</td>";
|
||||
} else {
|
||||
$free = isset($disk['fsSize']) && $disk['fsSize']>0 ? round(100*$disk['fsFree']/$disk['fsSize']) : 0;
|
||||
echo "<td><div class='usage-disk'><span style='width:$free%' class='".usage_color($disk,$free,true)."'></span>".my_scale($disk['fsFree']*1024,$unit)." $unit</div></td>";
|
||||
echo "<td><div class='usage-disk'><span style='width:$free%' class='".usage_color($disk,$free,true)."'></span><span>".my_scale($disk['fsFree']*1024,$unit)." $unit</span></div></td>";
|
||||
}
|
||||
echo "<td>".device_browse($disk)."</td>";
|
||||
} else
|
||||
@@ -301,13 +301,13 @@ function show_totals($text) {
|
||||
echo "<td>".my_scale($sum['fsUsed']*1024,$unit)." $unit</td>";
|
||||
} else {
|
||||
$used = $sum['fsSize'] ? 100-round(100*$sum['fsFree']/$sum['fsSize']) : 0;
|
||||
echo "<td><div class='usage-disk'><span style='width:$used%' class='".usage_color($display,$used,false)."'></span>".my_scale($sum['fsUsed']*1024,$unit)." $unit</div></td>";
|
||||
echo "<td><div class='usage-disk'><span style='width:$used%' class='".usage_color($display,$used,false)."'></span><span>".my_scale($sum['fsUsed']*1024,$unit)." $unit</span></div></td>";
|
||||
}
|
||||
if ($display['text']<10 ? $display['text']%10==0 : $display['text']%10!=0) {
|
||||
echo "<td>".my_scale($sum['fsFree']*1024,$unit)." $unit</td>";
|
||||
} else {
|
||||
$free = $sum['fsSize'] ? round(100*$sum['fsFree']/$sum['fsSize']) : 0;
|
||||
echo "<td><div class='usage-disk'><span style='width:$free%' class='".usage_color($display,$free,true)."'></span>".my_scale($sum['fsFree']*1024,$unit)." $unit</div></td>";
|
||||
echo "<td><div class='usage-disk'><span style='width:$free%' class='".usage_color($display,$free,true)."'></span><span>".my_scale($sum['fsFree']*1024,$unit)." $unit</span></div></td>";
|
||||
}
|
||||
echo "<td></td>";
|
||||
} else
|
||||
|
||||
@@ -104,11 +104,13 @@ span.tub span[id^='txt-tub']{margin-top:7px}
|
||||
.red-orb{color:#ff3300}
|
||||
.usage-bar{position:fixed;top:60px;right:450px;height:2.2rem;line-height:2.2rem;width:14rem;background-color:rgba(228,226,228,0.4)}
|
||||
.usage-bar>span{display:block;height:5px;text-align:right;color:#606e7f;background-color:#606e7f}
|
||||
.usage-disk{height:2rem;line-height:2rem;background-color:#eceaec;vertical-align:top;padding:0 2px 4px 0}
|
||||
.usage-disk>span{margin:0!important;display:block;height:3px;background-color:#606e7f}
|
||||
.usage-disk.sys{background-color:transparent;margin:-14px 20px 0 44px}
|
||||
.usage-disk.sys>span{height:12px}
|
||||
.usage-disk.mm{margin:4px 20px 0 0}
|
||||
.usage-disk{position:relative;height:2.2rem;line-height:2.2rem;background-color:#eceaec;margin:0}
|
||||
.usage-disk>span:first-child{position:absolute;left:0;margin:0!important;height:3px;line-height:3px;background-color:#606e7f}
|
||||
.usage-disk>span:last-child{position:relative;padding-right:4px;z-index:1}
|
||||
.usage-disk.sys{line-height:normal;background-color:transparent;margin:-16px 20px 0 44px}
|
||||
.usage-disk.sys>span{line-height:normal;height:12px;padding:0}
|
||||
.usage-disk.mm{height:3px;line-height:normal;background-color:transparent;margin:5px 20px 0 0}
|
||||
.usage-disk.mm>span:first-child{height:3px;line-height:normal}
|
||||
.notice{background:#fff6bf url(../images/notice.png) no-repeat;background-position:60px 50%;font-size:1.4rem;text-align:left;padding:15px 0 15px 130px;display:block;height:7rem;line-height:7rem;vertical-align:middle;border-top:1px solid #ffd324;border-bottom:1px solid #ffd324}
|
||||
.greenbar{background:-webkit-radial-gradient(#127a05,#17bf0b);background:linear-gradient(#127a05,#17bf0b)}
|
||||
.orangebar{background:-webkit-radial-gradient(#ce7c10,#f0b400);background:linear-gradient(#ce7c10,#f0b400)}
|
||||
|
||||
@@ -94,12 +94,14 @@ textarea{resize:none}
|
||||
.red-orb{color:#ff3300}
|
||||
.usage-bar{float:left;height:2rem;line-height:2rem;width:14rem;padding:1px 1px 1px 2px;margin:8px 12px;border-radius:3px;background-color:#585858;box-shadow:0 1px 0 #989898,inset 0 1px 0 #202020}
|
||||
.usage-bar>span{display:block;height:100%;text-align:right;border-radius:2px;color:#f2f2f2;background-color:#808080;box-shadow:inset 0 1px 0 rgba(255,255,255,.5)}
|
||||
.usage-disk{height:3px;background-color:#505050;margin:-12px 0 0 0}
|
||||
.usage-disk>span{margin:0!important;display:block;height:3px;background-color:#b0b0b0}
|
||||
.usage-disk{position:relative;height:1.8rem;background-color:#505050;margin:0}
|
||||
.usage-disk>span:first-child{position:absolute;left:0;margin:0!important;height:1.8rem;background-color:#b0b0b0}
|
||||
.usage-disk>span:last-child{position:relative;padding-right:4px;z-index:1}
|
||||
.usage-disk.sys{height:12px;margin:-15px 20px 0 44px}
|
||||
.usage-disk.sys>span{height:12px}
|
||||
.usage-disk.sys>span{height:12px;padding:0}
|
||||
.usage-disk.sys.none{background-color:transparent}
|
||||
.usage-disk.mm{margin:5px 20px 0 0}
|
||||
.usage-disk.mm{height:3px;margin:5px 20px 0 0}
|
||||
.usage-disk.mm>span:first-child{height:3px}
|
||||
.notice{background:#fff6bf url(../images/notice.png) no-repeat;background-position:60px 50%;color:#1c1b1b;font-size:1.4rem;text-align:left;padding:15px 0 15px 130px;display:block;height:7rem;line-height:7rem;vertical-align:middle;border-top:2px solid #ffd324;border-bottom:2px solid #ffd324}
|
||||
.notice.shift{margin-top:160px}
|
||||
.greenbar{background:-webkit-gradient(linear,left top,right top,from(#127a05),to(#17bf0b));background:linear-gradient(90deg,#127a05 0,#17bf0b)}
|
||||
|
||||
@@ -45,7 +45,7 @@ select.slot{min-width:44rem;max-width:44rem}
|
||||
input.narrow{width:174px}
|
||||
input.trim{width:74px;min-width:74px}
|
||||
textarea{resize:none}
|
||||
#header{position:fixed;top:0;left:0;width:100%;height:90px;z-index:100;margin:0;background-color:#121510;background-size:100% 90px;background-repeat:no-repeat;border-bottom:1px solid #82857e}
|
||||
#header{position:fixed;top:0;left:0;width:100%;height:90px;z-index:100;margin:0;background-color:#121510;background-size:100% 90px;background-repeat:no-repeat;border-bottom:1px solid #42453e}
|
||||
#header .logo{float:left;margin-left:75px;color:#e22828;width:160px;text-align:center}
|
||||
#header .logo svg{width:160px;display:block;margin:25px 50px 8px 0}
|
||||
#header .block{margin:0;float:right;text-align:right;background-color:rgba(18,21,16,0.7);padding:10px 12px}
|
||||
@@ -59,7 +59,7 @@ textarea{resize:none}
|
||||
#nav-block{-ms-overflow-style:none;overflow:-moz-scrollbars-none}
|
||||
#nav-block.mozilla{margin-left:-17px;overflow-y:scroll}
|
||||
#nav-block>div{direction:ltr}
|
||||
#nav-item{width:40px;text-align:left;padding:14px 24px 14px 0;border-bottom:1px solid #82857e;font-size:18px;overflow:hidden;transition:.2s background-color ease}
|
||||
#nav-item{width:40px;text-align:left;padding:14px 24px 14px 0;border-bottom:1px solid #42453e;font-size:18px;overflow:hidden;transition:.2s background-color ease}
|
||||
#nav-item:hover{width:170px;color:#ffdfb9;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f));background:linear-gradient(90deg,#e22828 0,#ff8c2f);-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;border-bottom-color:#e22828}
|
||||
#nav-item:hover a{color:#ffdfb9;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f));background:linear-gradient(90deg,#e22828 0,#ff8c2f);border-bottom-color:#e22828}
|
||||
#nav-item img{display:none}
|
||||
@@ -104,11 +104,13 @@ span.tub span[id^='txt-tub']{margin-top:7px}
|
||||
.red-orb{color:#ff3300}
|
||||
.usage-bar{position:fixed;top:60px;right:450px;height:2.2rem;line-height:2.2rem;width:14rem;background-color:rgba(27,29,27,0.2)}
|
||||
.usage-bar>span{display:block;height:5px;text-align:right;color:#606e7f;background-color:#606e7f}
|
||||
.usage-disk{height:2rem;line-height:2rem;background-color:#232523;vertical-align:top;padding:0 2px 4px 0}
|
||||
.usage-disk>span{margin:0!important;display:block;height:3px;background-color:#606e7f}
|
||||
.usage-disk.sys{background-color:transparent;margin:-14px 20px 0 44px}
|
||||
.usage-disk.sys>span{height:12px}
|
||||
.usage-disk.mm{margin:4px 20px 0 0}
|
||||
.usage-disk{position:relative;height:2.2rem;line-height:2.2rem;background-color:#232523;margin:0}
|
||||
.usage-disk>span:first-child{position:absolute;left:0;margin:0!important;height:3px;line-height:3px;background-color:#606e7f}
|
||||
.usage-disk>span:last-child{position:relative;padding-right:4px;z-index:1}
|
||||
.usage-disk.sys{line-height:normal;background-color:transparent;margin:-16px 20px 0 44px}
|
||||
.usage-disk.sys>span{line-height:normal;height:12px;padding:0}
|
||||
.usage-disk.mm{height:3px;line-height:normal;background-color:transparent;margin:5px 20px 0 0}
|
||||
.usage-disk.mm>span:first-child{height:3px;line-height:normal}
|
||||
.notice{background:#fff6bf url(../images/notice.png) no-repeat;background-position:60px 50%;font-size:1.4rem;text-align:left;padding:15px 0 15px 130px;display:block;height:7rem;line-height:7rem;vertical-align:middle;border-top:1px solid #ffd324;border-bottom:1px solid #ffd324}
|
||||
.greenbar{background:-webkit-radial-gradient(#127a05,#17bf0b);background:linear-gradient(#127a05,#17bf0b)}
|
||||
.orangebar{background:-webkit-radial-gradient(#ce7c10,#f0b400);background:linear-gradient(#ce7c10,#f0b400)}
|
||||
|
||||
@@ -94,12 +94,14 @@ textarea{resize:none}
|
||||
.red-orb{color:#ff3300}
|
||||
.usage-bar{float:left;height:2rem;line-height:2rem;width:14rem;padding:1px 1px 1px 2px;margin:8px 12px;border-radius:3px;background-color:#585858;box-shadow:0 1px 0 #989898,inset 0 1px 0 #202020}
|
||||
.usage-bar>span{display:block;height:100%;text-align:right;border-radius:2px;color:#f2f2f2;background-color:#808080;box-shadow:inset 0 1px 0 rgba(255,255,255,.5)}
|
||||
.usage-disk{height:3px;background-color:#d0d0d0;margin:-12px 0 0 0}
|
||||
.usage-disk>span{margin:0!important;display:block;height:3px;background-color:#606060}
|
||||
.usage-disk{position:relative;height:1.8rem;background-color:#d0d0d0;margin:0}
|
||||
.usage-disk>span:first-child{position:absolute;left:0;margin:0!important;height:1.8rem;background-color:#606060}
|
||||
.usage-disk>span:last-child{position:relative;padding-right:4px;z-index:1}
|
||||
.usage-disk.sys{height:12px;margin:-15px 20px 0 44px}
|
||||
.usage-disk.sys>span{height:12px}
|
||||
.usage-disk.sys>span{height:12px;padding:0}
|
||||
.usage-disk.sys.none{background-color:transparent}
|
||||
.usage-disk.mm{margin:5px 20px 0 0}
|
||||
.usage-disk.mm{height:3px;margin:5px 20px 0 0}
|
||||
.usage-disk.mm>span:first-child{height:3px}
|
||||
.notice{background:#fff6bf url(../images/notice.png) no-repeat;background-position:60px 50%;color:#1c1b1b;font-size:1.4rem;text-align:left;padding:15px 0 15px 130px;display:block;height:7rem;line-height:7rem;vertical-align:middle;border-top:2px solid #ffd324;border-bottom:2px solid #ffd324}
|
||||
.notice.shift{margin-top:160px}
|
||||
.greenbar{background:-webkit-gradient(linear,left top,right top,from(#127a05),to(#17bf0b));background:linear-gradient(90deg,#127a05 0,#17bf0b)}
|
||||
|
||||
Reference in New Issue
Block a user