mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
Change Storage Space Style - Green / Orange / Red button style shows the status of the remaining space
This commit is contained in:
parent
72795698b0
commit
2a63c08e01
@ -183,7 +183,16 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
if($space->mount == "unknown"){
|
||||
$spacedata = "unknown";
|
||||
}else{
|
||||
$spacedata = "{$gsprache->status_space_mount}{$space->mount}: {$gsprache->status_space_size}{$space->size} / {$gsprache->status_space_used}{$space->used} / {$gsprache->status_space_free}{$space->avil}";
|
||||
$perc = substr($space->perc, 0, -1);
|
||||
if($perc <= 50){
|
||||
$btn = "btn-success";
|
||||
}else if($perc > 50 && $perc <= 80){
|
||||
$btn = "btn-warning";
|
||||
}else{
|
||||
$btn = "btn-danger";
|
||||
}
|
||||
$spacedata = '<a href="javascript:void(0);"><span class="btn ' . $btn . ' btn-sm"> ' . $gsprache->status_space_used . ' ' . $space->perc . ' - ' . $space->mount . '</span></a>';
|
||||
$spacedata .= ' <a href="javascript:void(0);"><span class="btn ' . $btn . ' btn-sm">' . $gsprache->status_space_size . '' .$space->size . ' / ' . $gsprache->status_space_free . ' ' . $space->avil . '</span></a>';
|
||||
}
|
||||
|
||||
$array['aaData'][] = array($row['ip'], $row['id'], $description, returnButton($template_to_use, 'ajax_admin_master_list.tpl', $statusList, '', '', ''), returnButton($template_to_use, 'ajax_admin_buttons_dl.tpl', 'ma', 'dl', $row['id'], $gsprache->del) . ' ' . returnButton($template_to_use, 'ajax_admin_buttons_add.tpl', 'ma', 'ad', $row['id'], $gsprache->add), $spacedata);
|
||||
|
Loading…
x
Reference in New Issue
Block a user