From b98c3c71b0d8da30d8014f729f21bbef328a320a Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sat, 16 Dec 2017 08:56:03 +0000 Subject: [PATCH] ntpd: show full remote and style fix #1997 --- src/www/status_ntpd.php | 168 ++++++++++++++++++++-------------------- 1 file changed, 83 insertions(+), 85 deletions(-) diff --git a/src/www/status_ntpd.php b/src/www/status_ntpd.php index c998474e5..75753bb36 100644 --- a/src/www/status_ntpd.php +++ b/src/www/status_ntpd.php @@ -33,7 +33,7 @@ require_once("services.inc"); require_once("interfaces.inc"); if(!isset($config['ntpd']['noquery'])) { - exec("/usr/local/sbin/ntpq -pn | /usr/bin/tail +3", $ntpq_output); + exec("/usr/local/sbin/ntpq -pnw | /usr/bin/tail +3", $ntpq_output); $ntpq_servers = array(); foreach ($ntpq_output as $line) { $server = array(); @@ -151,95 +151,93 @@ include("head.inc");

-
-
- - - - - - - - - - - - - - - - - +
+
+ + + + + + + + + + + + + + + + - - - + if (isset($config['ntpd']['noquery'])): ?> + + + - - - + elseif (count($ntpq_servers) == 0): ?> + + + - - - - - - - - - - - - - - - -
- ','') ?> -
+ ','') ?> +
- ','') ?> -
+ ','') ?> +
- - - - - - - ' . gettext("Clock Altitude") . ''; $gps_goo_lnk++;}?> - ' . gettext("Satellites") . ''; $gps_goo_lnk++;}?> - - - - - - - ' . $gps_alt . ' ' . $gps_alt_unit . '';}?> - - - - - - -
(° ) (° ) - -
Google Maps Link
+ else: + $i = 0; + foreach ($ntpq_servers as $server): ?> + + + + + + + + + + + + + -
+ + + + + + + + + ' . gettext("Clock Altitude") . ''; $gps_goo_lnk++;}?> + ' . gettext("Satellites") . ''; $gps_goo_lnk++;}?> + + + + + + + ' . $gps_alt . ' ' . $gps_alt_unit . '';}?> + + + + + + +
(° ) (° ) + +
Google Maps Link
+