aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc
diff options
context:
space:
mode:
authorPim van den Berg2014-12-13 13:40:36 +0100
committerPim van den Berg2014-12-13 13:43:26 +0100
commit6c39bf06e43fd97fc821cf1dcd11636532512ff0 (patch)
tree543a69efd7bd399a6e125b7a523fe4cf5fc8caf3 /inc
parentAdding option to show time since last update on dashboard. (diff)
downloadapt-panopticon_cgp-6c39bf06e43fd97fc821cf1dcd11636532512ff0.zip
apt-panopticon_cgp-6c39bf06e43fd97fc821cf1dcd11636532512ff0.tar.gz
apt-panopticon_cgp-6c39bf06e43fd97fc821cf1dcd11636532512ff0.tar.bz2
apt-panopticon_cgp-6c39bf06e43fd97fc821cf1dcd11636532512ff0.tar.xz
dashboard: make timeago dynamic using jquery + timeago
Diffstat (limited to 'inc')
-rw-r--r--inc/html.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/inc/html.inc.php b/inc/html.inc.php
index a263a58..5bf0ff0 100644
--- a/inc/html.inc.php
+++ b/inc/html.inc.php
@@ -47,6 +47,8 @@ EOT;
47 } 47 }
48 48
49echo <<<EOT 49echo <<<EOT
50 <script type="text/javascript" src="//code.jquery.com/jquery-2.1.1.min.js"></script>
51 <script type="text/javascript" src="{$html_weburl}js/jquery.timeago.js"></script>
50</head> 52</head>
51<body> 53<body>
52 54
@@ -291,7 +293,8 @@ function host_summary($cat, $hosts) {
291 elseif ($time > 60) 293 elseif ($time > 60)
292 $class .= ' warn'; 294 $class .= ' warn';
293 295
294 printf('<td class="%s">%d seconds ago</td>',$class, $time); 296 printf('<td class="%s"><time class="timeago" datetime="%s">%d seconds ago</time></td>',
297 $class, date('c', $rrd_info['last_update']), $time);
295 } 298 }
296 299
297 print "</tr>\n"; 300 print "</tr>\n";