summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/status_gateways.php
diff options
context:
space:
mode:
authorJared Dillard <jdillard@netgate.com>2016-03-02 11:51:59 -0600
committerJared Dillard <jdillard@netgate.com>2016-03-02 11:51:59 -0600
commit5a331169906645774e7d077112bfbcec684c2915 (patch)
tree315512de63ff19e9093a6568c4c7c89e9faabc5b /src/usr/local/www/status_gateways.php
parentb18c31498e95ced3c55377a9e3f9197c973c8017 (diff)
downloadpfsense-5a331169906645774e7d077112bfbcec684c2915.zip
pfsense-5a331169906645774e7d077112bfbcec684c2915.tar.gz
change hardcoded colors to classes
Diffstat (limited to 'src/usr/local/www/status_gateways.php')
-rw-r--r--src/usr/local/www/status_gateways.php23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/usr/local/www/status_gateways.php b/src/usr/local/www/status_gateways.php
index 8049837..cf1de75 100644
--- a/src/usr/local/www/status_gateways.php
+++ b/src/usr/local/www/status_gateways.php
@@ -64,11 +64,6 @@
require("guiconfig.inc");
define('COLOR', true);
-define('LIGHTGREEN', '#90EE90');
-define('LIGHTCORAL', '#F08080');
-define('KHAKI', '#F0E68C');
-define('LIGHTGRAY', '#D3D3D3');
-define('WHITE', '#FFFFFF');
$a_gateways = return_gateways_array();
$gateways_status = array();
@@ -162,36 +157,36 @@ display_top_tabs($tab_array);
$status = $gateways_status[$gname];
if (stristr($status['status'], "force_down")) {
$online = gettext("Offline (forced)");
- $bgcolor = LIGHTCORAL;
+ $bgcolor = "bg-danger";
} elseif (stristr($status['status'], "down")) {
$online = gettext("Offline");
- $bgcolor = LIGHTCORAL;
+ $bgcolor = "bg-danger";
} elseif (stristr($status['status'], "loss")) {
$online = gettext("Warning, Packetloss") . ': ' . $status['loss'];
- $bgcolor = KHAKI;
+ $bgcolor = "bg-warning";
} elseif (stristr($status['status'], "delay")) {
$online = gettext("Warning, Latency") . ': ' . $status['delay'];
- $bgcolor = KHAKI;
+ $bgcolor = "bg-warning";
} elseif ($status['status'] == "none") {
$online = gettext("Online");
- $bgcolor = LIGHTGREEN;
+ $bgcolor = "bg-success";
}
} else if (isset($gateway['monitor_disable'])) {
$online = gettext("Online");
- $bgcolor = LIGHTGREEN;
+ $bgcolor = "bg-success";
} else {
$online = gettext("Pending");
- $bgcolor = LIGHTGRAY;
+ $bgcolor = "bg-info";
}
$lastchange = $gateways_status[$gname]['lastcheck'];
if (!COLOR) {
- $bgcolor = WHITE;
+ $bgcolor = "";
}
?>
- <td style="background-color:<?=$bgcolor?>">
+ <td class="<?=$bgcolor?>">
<strong><?=$online?></strong> <?php
if (!empty($lastchange)) { ?>
<br /><i><?=gettext("Last checked")?> <?=$lastchange?></i>
OpenPOWER on IntegriCloud