[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());
|
$this->setErrorMessage('Failed to run API call: ' . $this->tools->getError());
|
||||||
return false;
|
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());
|
$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 ($setting->getValue('monitoring_uptimerobot_private_key')) {
|
||||||
if ($aStatus = $monitoring->getUptimeRobotStatus()) {
|
if ($aStatus = $monitoring->getUptimeRobotStatus()) {
|
||||||
$smarty->assign("STATUS", $aStatus);
|
$smarty->assign("STATUS", $aStatus);
|
||||||
|
$smarty->assign("UPDATED", $setting->getValue('monitoring_uptimerobot_lastcheck'));
|
||||||
$smarty->assign("CODES", array(
|
$smarty->assign("CODES", array(
|
||||||
0 => 'Paused',
|
0 => 'Paused',
|
||||||
1 => 'Unchecked',
|
1 => 'Unchecked',
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<ul><li>Last update {$UPDATED|date_format:"%b %d, %Y %H:%M"}</li></ul>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
{literal}
|
{literal}
|
||||||
@ -50,6 +51,4 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
{/literal}
|
{/literal}
|
||||||
</script>
|
</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"}
|
{include file="global/block_footer.tpl"}
|
||||||
|
|||||||
@ -7,8 +7,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th align="center">Location</th>
|
<th align="center">Location</th>
|
||||||
<th align="center">Service</th>
|
<th align="center">Service</th>
|
||||||
<th align="center">State Since</th>
|
|
||||||
<th align="center">Status</th>
|
<th align="center">Status</th>
|
||||||
|
<th align="center">Status Since</th>
|
||||||
<th align="center" style="padding-right: 10px">Uptime</th>
|
<th align="center" style="padding-right: 10px">Uptime</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -18,13 +18,16 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td align="center"><img src="{$GLOBALASSETS}/images/flags/{$node.0}.png"/></td>
|
<td align="center"><img src="{$GLOBALASSETS}/images/flags/{$node.0}.png"/></td>
|
||||||
<td align="center">{$node.1}</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"><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>
|
<td align="center"><span class="chart-{$item.id}" data-percent="{$item.customuptimeratio}"><span class="percent"></span></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<footer>
|
||||||
|
<ul><li>Last update {$UPDATED|date_format:"%b %d, %Y %H:%M"}</li></ul>
|
||||||
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user