From 134ee13df54280441c25b047b406628eeebbb8db Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Thu, 18 Aug 2016 19:38:00 -0400 Subject: [PATCH] Revise widget refresh timing --- src/usr/local/www/system.php | 2 +- src/usr/local/www/widgets/widgets/ntp_status.widget.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php index 01368a8174..6b0e9a91cc 100644 --- a/src/usr/local/www/system.php +++ b/src/usr/local/www/system.php @@ -492,7 +492,7 @@ $section->addInput(new Form_Input( 'Dashboard update period', 'number', $pconfig['dashboardperiod'], - ['min' => '10', 'max' => '600'] + ['min' => '5', 'max' => '600'] ))->setHelp('Time in seconds between dashboard widget updates. Small values cause ' . 'more frequent updates but increase the load on the web server. ' . 'Minimum is 5 seconds, maximum 600 seconds'); diff --git a/src/usr/local/www/widgets/widgets/ntp_status.widget.php b/src/usr/local/www/widgets/widgets/ntp_status.widget.php index 52993d36a8..29ce02534b 100644 --- a/src/usr/local/www/widgets/widgets/ntp_status.widget.php +++ b/src/usr/local/www/widgets/widgets/ntp_status.widget.php @@ -41,7 +41,7 @@ function clockTimeString($inDate, $showSeconds) { // For this widget the update period is 6 x larger than most others. It typically defaults // to once per 60 seconds, not once per 10 seconds -$widgetperiod = isset($config['widgets']['period']) ? $config['widgets']['period'] * 1000 : 10000; +$widgetperiod = isset($config['widgets']['period']) ? $config['widgets']['period'] * 1000 * 6 : 60000; if ($_REQUEST['updateme']) { //this block displays only on ajax refresh