mirror of
https://github.com/unraid/webgui.git
synced 2026-02-26 12:18:56 -06:00
Styling enhancements to improve consistency
This commit is contained in:
@@ -109,7 +109,7 @@ case "attributes":
|
||||
if ($empty) echo "<tr><td colspan='10' style='text-align:center;padding-top:12px'>"._('Attributes not available')."</td></tr>";
|
||||
break;
|
||||
case "capabilities":
|
||||
echo '<table id="disk_capabilities_table" class="share_status small"><thead><td style="width:33%">'._('Feature').'</td><td>'._('Value').'</td><td>'._('Information').'</td></thead><tbody>' ;
|
||||
echo '<table id="disk_capabilities_table" class="unraid"><thead><td style="width:33%">'._('Feature').'</td><td>'._('Value').'</td><td>'._('Information').'</td></thead><tbody>' ;
|
||||
exec("smartctl -n standby -c $type ".escapeshellarg("/dev/$port")."|awk 'NR>5'",$output);
|
||||
$row = ['','',''];
|
||||
$empty = true;
|
||||
@@ -120,27 +120,25 @@ case "capabilities":
|
||||
$line = preg_replace('/^_/','__',preg_replace(['/__+/','/_ +_/'],'_',str_replace([chr(9),')','('],'_',$line)));
|
||||
$info = array_map('trim', explode('_', preg_replace('/_( +)_ /','__',$line), 3));
|
||||
if ($nvme && $info[0]=="Supported Power States" ) { $nvme_section="psheading" ;echo "</body></table><div class='title'><span>{$line}</span></div>"; $row = ['','',''] ; continue ;}
|
||||
if ($nvme && $info[0]=="Supported LBA Sizes" ) {
|
||||
if ($nvme && $info[0]=="Supported LBA Sizes" ) {
|
||||
echo "</body></table><div class='title'>{$info[0]} {$info[1]} {$info[2]}</span></div>";
|
||||
$row = ['','',''];
|
||||
$nvme_section="lbaheading" ;
|
||||
$nvme_section="lbaheading" ;
|
||||
continue ;
|
||||
}
|
||||
}
|
||||
append($row[0],$info[0]);
|
||||
append($row[1],$info[1]);
|
||||
append($row[2],$info[2]);
|
||||
|
||||
if (substr($row[2],-1)=='.' || ($nvme && $nvme_section=="info")) {
|
||||
echo "<tr><td>{$row[0]}</td><td>{$row[1]}</td><td>{$row[2]}</td></tr>";
|
||||
$row = ['','',''];
|
||||
$empty = false;
|
||||
}
|
||||
|
||||
if ($nvme && $nvme_section == "psheading") {
|
||||
echo '<table id="disk_capabilities_table2" class="share_status small"><thead>' ;
|
||||
echo '<table id="disk_capabilities_table2" class="unraid"><thead>' ;
|
||||
$nvme_section = "psdetail";
|
||||
preg_match('/^(?P<data1>.\S+)\s+(?P<data2>\S+)\s+(?P<data3>\S+)\s+(?P<data4>\S+)\s+(?P<data5>\S+)\s+(?P<data6>\S+)\s+(?P<data7>\S+)\s+(?P<data8>\S+)\s+(?P<data9>\S+)\s+(?P<data10>\S+)\s+(?P<data11>\S+)$/',$line, $psheadings);
|
||||
for ($i = 1; $i <= 11; $i++) {
|
||||
for ($i = 1; $i <= 11; $i++) {
|
||||
echo "<td>"._var($psheadings,'data'.$i)."</td>" ;
|
||||
}
|
||||
$row = ['','',''];
|
||||
@@ -150,17 +148,17 @@ case "capabilities":
|
||||
$nvme_section = "psdetail";
|
||||
echo '<tr>' ;
|
||||
preg_match('/^(?P<data1>.\S+)\s+(?P<data2>\S\s+)\s+(?P<data3>\S+)\s+(?P<data4>\S\s+)\s+(?P<data5>\S+)\s+(?P<data6>\S+)\s+(?P<data7>\S+)\s+(?P<data8>\S+)\s+(?P<data9>\S+)\s+(?P<data10>\S+)\s+(?P<data11>\S+)$/',$line, $psdetails);
|
||||
for ($i = 1; $i <= 11; $i++) {
|
||||
for ($i = 1; $i <= 11; $i++) {
|
||||
echo "<td>"._var($psdetails,'data'.$i)."</td>" ;
|
||||
}
|
||||
$row = ['','',''];
|
||||
echo '</tr>' ;
|
||||
}
|
||||
if ($nvme && $nvme_section == "lbaheading") {
|
||||
echo '<table id="disk_capabilities_table3" class="share_status small"><thead>' ;
|
||||
echo '<table id="disk_capabilities_table3" class="unraid"><thead>' ;
|
||||
$nvme_section = "lbadetail";
|
||||
preg_match('/^(?P<data1>.\S+)\s+(?P<data2>\S+)\s+(?P<data3>\S+)\s+(?P<data4>\S+)\s+(?P<data5>\S+)$/',$line, $lbaheadings);
|
||||
for ($i = 1; $i <= 5; $i++) {
|
||||
for ($i = 1; $i <= 5; $i++) {
|
||||
echo "<td>"._var($lbaheadings,'data'.$i)."</td>" ;
|
||||
}
|
||||
$row = ['','',''];
|
||||
@@ -170,7 +168,7 @@ case "capabilities":
|
||||
$nvme_section = "lbadetail";
|
||||
preg_match('/^(?P<data1>.\S+)\s+(?P<data2>\S\s+)\s+(?P<data3>\S+)\s+(?P<data4>\S\s+)\s+(?P<data5>\S+)$/',$line, $lbadetails);
|
||||
echo '<tr>' ;
|
||||
for ($i = 1; $i <= 5; $i++) {
|
||||
for ($i = 1; $i <= 5; $i++) {
|
||||
echo "<td>"._var($lbadetails,'data'.$i)."</td>" ;
|
||||
}
|
||||
$row = ['','',''];
|
||||
@@ -236,7 +234,7 @@ case "update":
|
||||
if ($progress) {
|
||||
if ($transport == 'nvme') echo "<span class='big'><i class='fa fa-spinner fa-pulse'></i> "._('self-test in progress').", ".(substr($progress,0,-1))."% "._('complete')."</span>"; else echo "<span class='big'><i class='fa fa-spinner fa-pulse'></i> "._('self-test in progress').", ".(100-substr($progress,0,-1))."% "._('complete')."</span>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$progress = exec("smartctl -n standby -c $type ".escapeshellarg("/dev/$port")."|grep -Pom1 '\d+%'");
|
||||
if ($progress) {
|
||||
|
||||
Reference in New Issue
Block a user