Updated alerts status box

This commit is contained in:
laf 2015-04-29 01:31:52 +01:00
parent 18373c3373
commit 113636cce9
2 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ var grid = $("#alerts").bootgrid({
url: "/ajax_table.php",
formatters: {
"status": function(column,row) {
return "<span class='label label-"+row.extra+"'>" + row.msg + "</span>";
return "<h4><span class='label label-"+row.extra+" threeqtr-width'>" + row.msg + "</span></h4>";
},
"ack": function(column,row) {
return "<button type='button' class='btn btn-"+row.ack_col+" btn-sm command-ack-alert' data-target='#ack-alert' data-state='"+row.state+"' data-alert_id='"+row.alert_id+"' name='ack-alert' id='ack-alert' data-extra='"+row.extra+"'><span class='glyphicon glyphicon-"+row.ack_ico+"'aria-hidden='true'></span></button>";

View File

@ -65,22 +65,22 @@ foreach (dbFetchRows($sql,$param) as $alert) {
$ico = "ok";
$col = "green";
$extra = "success";
$msg = "OK";
$msg = "ok";
} elseif ( (int) $alert['state'] === 1 || (int) $alert['state'] === 3 || (int) $alert['state'] === 4) {
$ico = "volume-up";
$col = "red";
$extra = "danger";
$msg = "ALERT";
$msg = "alert";
if ( (int) $alert['state'] === 3) {
$msg = "WORSE";
$msg = "worse";
} elseif ( (int) $alert['state'] === 4) {
$msg = "BETTER";
$msg = "better";
}
} elseif ( (int) $alert['state'] === 2) {
$ico = "volume-off";
$col = "#800080";
$extra = "warning";
$msg = "MUTED";
$msg = "muted";
}
$alert_checked = '';
$orig_ico = $ico;