mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 02:58:57 -05:00
Archived notifications update: importance sorting on severity
This commit is contained in:
@@ -26,20 +26,21 @@ foreach ($files as $file) {
|
||||
$empty = false;
|
||||
$archive = basename($file);
|
||||
if ($extra = count($fields)>6) {
|
||||
$td_ = "<td data='xxx' rowspan='3'><a href='#' onclick='openClose($row)'>"; $_td = "</a></td>";
|
||||
$td_ = "<td data='*' rowspan='3'><a href='#' onclick='openClose($row)'>"; $_td = "</a></td>";
|
||||
} else {
|
||||
$td_ = "<td data='xxx' style='white-space:nowrap'>"; $_td = "</td>";
|
||||
$td_ = "<td data='*' style='white-space:nowrap'>"; $_td = "</td>";
|
||||
}
|
||||
$c = 0;
|
||||
foreach ($fields as $field) {
|
||||
if ($c==5) break;
|
||||
$item = $field ? explode('=', $field, 2) : ["","-"];
|
||||
echo (!$c++) ? "<tr>".str_replace('xxx',$item[1],$td_).date("{$dynamix['notify']['date']} {$dynamix['notify']['time']}", $item[1])."$_td" : "<td>{$item[1]}</td>";
|
||||
$text = $field ? explode('=',$field,2)[1] : "-";
|
||||
$tag = $c<4 ? "" : " data='".str_replace(['alert','warning','normal'],['0','1','2'],$text)."'";
|
||||
echo (!$c++) ? "<tr>".str_replace('*',$text,$td_).date($dynamix['notify']['date'].' '.$dynamix['notify']['time'],$text)."$_td" : "<td$tag>$text</td>";
|
||||
}
|
||||
echo "<td style='text-align:right'><a href='#' onclick='$.post(\"/webGui/include/DeleteLogFile.php\",{log:\"$archive\"},function(){archiveList();});return false' title='Delete notification'><i class='fa fa-trash-o'></i></a></td></tr>";
|
||||
if ($extra) {
|
||||
$item = explode('=', $field, 2);
|
||||
echo "<tr class='tablesorter-childRow row$row'><td colspan='5'>{$item[1]}</td></tr><tr class='tablesorter-childRow row$row'><td colspan='5'></td></tr>";
|
||||
$text = explode('=',$field,2)[1];
|
||||
echo "<tr class='tablesorter-childRow row$row'><td colspan='5'>$text</td></tr><tr class='tablesorter-childRow row$row'><td colspan='5'></td></tr>";
|
||||
$row++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user