summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2014-12-11 07:13:01 +0545
committerRenato Botelho <garga@FreeBSD.org>2014-12-11 07:40:12 -0200
commitf2d27f9352ab6b87e157dc0ecffc38392e82a1c0 (patch)
treed5d40678446cef38ef15614ebcb12b362da0d75f
parent07ab838e3fd536f68d1970ef76f286a3937673e3 (diff)
downloadpfsense-f2d27f9352ab6b87e157dc0ecffc38392e82a1c0.zip
pfsense-f2d27f9352ab6b87e157dc0ecffc38392e82a1c0.tar.gz
Gateway Status Widget keep IP address bold
Forum: https://forum.pfsense.org/index.php?topic=85187.msg467438#msg467438 The bold is specified literally in gateways.widget.php for the gateway IP box, so we need to send it bold from here also when providing an update. Because this now uses a "/" in the string (to terminate the bold) have to choose another delimiter between the status text and status color - picked "^" because I can't think where it will appear elsewhere in the real data. This whole string of stuff that is returned by getstats.php back to the browser is a long string with a bunch of delimiters inside delimiters already (vertical bar separated fields, inside that comma-separated fields...) and is already subject to stuff going wrong if any of the real text in the fields contains a vertical bar or comma or... Not about to try to re-engineer all that right now!
-rw-r--r--usr/local/www/includes/functions.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php
index e8203f6..f2d8cf0 100644
--- a/usr/local/www/includes/functions.inc.php
+++ b/usr/local/www/includes/functions.inc.php
@@ -42,7 +42,7 @@ function get_gatewaystats() {
$isfirst = false;
$data .= $gw['name'] . ",";
if ($gateways_status[$gname]) {
- $data .= lookup_gateway_ip_by_name($gname) . ",";
+ $data .= "<b>" . lookup_gateway_ip_by_name($gname) . "</b>,";
$gws = $gateways_status[$gname];
switch(strtolower($gws['status'])) {
case "none":
@@ -73,7 +73,7 @@ function get_gatewaystats() {
$bgcolor = "#ADD8E6"; // lightblue
}
$data .= ($online == "Pending") ? "{$online},{$online}," : "{$gws['delay']},{$gws['loss']},";
- $data .= "{$online}/{$bgcolor}";
+ $data .= "{$online}^{$bgcolor}";
}
return $data;
}
OpenPOWER on IntegriCloud