[ADDED] Last check footer
This commit is contained in:
parent
88a2a29b3b
commit
ef5ac9cbfd
@ -17,7 +17,7 @@ class Monitoring extends Base {
|
||||
$this->setErrorMessage('Failed to run API call: ' . $this->tools->getError());
|
||||
return false;
|
||||
}
|
||||
if (!$this->setting->setValue('monitoring_uptimerobot_status', $json)) {
|
||||
if (!$this->setting->setValue('monitoring_uptimerobot_status', $json) || !$this->setting->setValue('monitoring_uptimerobot_lastcheck', time())) {
|
||||
$this->setErrorMessage('Failed to store uptime status: ' . $setting->getError());
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
if ($setting->getValue('monitoring_uptimerobot_private_key')) {
|
||||
if ($aStatus = $monitoring->getUptimeRobotStatus()) {
|
||||
$smarty->assign("STATUS", $aStatus);
|
||||
$smarty->assign("UPDATED", $setting->getValue('monitoring_uptimerobot_lastcheck'));
|
||||
$smarty->assign("CODES", array(
|
||||
0 => 'Paused',
|
||||
1 => 'Unchecked',
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<ul><li>Last update {$UPDATED|date_format:"%b %d, %Y %H:%M"}</li></ul>
|
||||
|
||||
<script>
|
||||
{literal}
|
||||
@ -50,6 +51,4 @@ $(document).ready(function(){
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
{if !$GLOBAL.website.api.disabled}<li>These stats are also available in JSON format <a href="{$smarty.server.PHP_SELF}?page=api&action=public" target="_api">HERE</a></li>{/if}
|
||||
{include file="global/block_footer.tpl"}
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
<tr>
|
||||
<th align="center">Location</th>
|
||||
<th align="center">Service</th>
|
||||
<th align="center">State Since</th>
|
||||
<th align="center">Status</th>
|
||||
<th align="center">Status Since</th>
|
||||
<th align="center" style="padding-right: 10px">Uptime</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -18,13 +18,16 @@
|
||||
<tr>
|
||||
<td align="center"><img src="{$GLOBALASSETS}/images/flags/{$node.0}.png"/></td>
|
||||
<td align="center">{$node.1}</td>
|
||||
<td align="center">{$item.log.1.datetime|date_format:"%b %d, %Y %H:%M"}</td>
|
||||
<td align="center"><span class="ur-status-{$CODES[$item.status]|lower}">{$CODES[$item.status]}</span></td>
|
||||
<td align="center">{$item.log.1.datetime|date_format:"%b %d, %Y %H:%M"}</td>
|
||||
<td align="center"><span class="chart-{$item.id}" data-percent="{$item.customuptimeratio}"><span class="percent"></span></span></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<footer>
|
||||
<ul><li>Last update {$UPDATED|date_format:"%b %d, %Y %H:%M"}</li></ul>
|
||||
</footer>
|
||||
</article>
|
||||
|
||||
<script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user