summaryrefslogtreecommitdiffstats
path: root/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@world.inf.org>2013-03-21 08:36:40 +0545
committerPhil Davis <phil.davis@world.inf.org>2013-03-21 08:36:40 +0545
commitb23e1a70346f3d98815ec3bfa0636e9ac8c4f28f (patch)
tree66a395b0cbb5365b52c6639c47954006a2e68819 /usr/local/www/widgets/widgets/dyn_dns_status.widget.php
parentc1dcb7abe7ed1bfb4ac1e00f16eb47e7887ccf8f (diff)
downloadpfsense-b23e1a70346f3d98815ec3bfa0636e9ac8c4f28f.zip
pfsense-b23e1a70346f3d98815ec3bfa0636e9ac8c4f28f.tar.gz
DynDNS status widget add 5 minute refresh
It was easy to add the code to refresh the status every 5 minutes. I think 5 minutes is a reasonable refresh time for dynamic DNS.
Diffstat (limited to 'usr/local/www/widgets/widgets/dyn_dns_status.widget.php')
-rw-r--r--usr/local/www/widgets/widgets/dyn_dns_status.widget.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/widgets/widgets/dyn_dns_status.widget.php b/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
index 0c35e4e..2ae268b 100644
--- a/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
+++ b/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
@@ -65,7 +65,7 @@ if($_REQUEST['getdyndnsstatus']) {
echo htmlspecialchars($cached_ip);
echo "</font>";
} else {
- echo "N/A";
+ echo "N/A " . date("H:i:s");
}
}
exit;
@@ -146,6 +146,8 @@ if($_REQUEST['getdyndnsstatus']) {
data: pars,
complete: dyndnscallback
});
+ // Refresh the status every 5 minutes
+ setTimeout('dyndns_getstatus()', 5*60*1000);
}
function dyndnscallback(transport) {
// The server returns a string of statuses separated by vertical bars
@@ -156,6 +158,7 @@ if($_REQUEST['getdyndnsstatus']) {
jQuery(divlabel).prop('innerHTML',responseStrings[count]);
}
}
+ // Do the first status check 2 seconds after the dashboard opens
setTimeout('dyndns_getstatus()', 2000);
//]]>
</script>
OpenPOWER on IntegriCloud