Merge pull request #914 from TheSerapher/issue-910
[FIX] No uptime status on empty result
This commit is contained in:
commit
4ab00f01b2
@ -5,18 +5,16 @@ if (!defined('SECURITY')) die('Hacking attempt');
|
||||
|
||||
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
$debug->append('No cached version available, fetching from backend', 3);
|
||||
if ($setting->getValue('monitoring_uptimerobot_api_keys')) {
|
||||
if ($aStatus = $monitoring->getUptimeRobotStatus()) {
|
||||
$smarty->assign("STATUS", $aStatus);
|
||||
$smarty->assign("UPDATED", $setting->getValue('monitoring_uptimerobot_lastcheck'));
|
||||
$smarty->assign("CODES", array(
|
||||
0 => 'Paused',
|
||||
1 => 'Unchecked',
|
||||
2 => 'Up',
|
||||
8 => 'Down',
|
||||
9 => 'Down'
|
||||
));
|
||||
}
|
||||
if ($setting->getValue('monitoring_uptimerobot_api_keys') && $aStatus = $monitoring->getUptimeRobotStatus()) {
|
||||
$smarty->assign("STATUS", $aStatus);
|
||||
$smarty->assign("UPDATED", $setting->getValue('monitoring_uptimerobot_lastcheck'));
|
||||
$smarty->assign("CODES", array(
|
||||
0 => 'Paused',
|
||||
1 => 'Unchecked',
|
||||
2 => 'Up',
|
||||
8 => 'Down',
|
||||
9 => 'Down'
|
||||
));
|
||||
$smarty->assign("CONTENT", "default.tpl");
|
||||
} else {
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => 'UptimeRobot API Key not configured.', 'TYPE' => 'info');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user