diff options
author | Phil Davis <phil.davis@inf.org> | 2014-12-11 07:13:01 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2014-12-11 07:13:01 +0545 |
commit | 6385c335159c9f208e9165d6e03e61563e1b3f29 (patch) | |
tree | 912e49addbd26dc215ebdb4b427a7d0feba212d5 /usr/local/www | |
parent | 6346f188e1c48de0457c9b39b0a1807b04355969 (diff) | |
download | pfsense-6385c335159c9f208e9165d6e03e61563e1b3f29.zip pfsense-6385c335159c9f208e9165d6e03e61563e1b3f29.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!
Diffstat (limited to 'usr/local/www')
-rw-r--r-- | usr/local/www/includes/functions.inc.php | 4 |
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; } |