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)) {
|
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||||
$debug->append('No cached version available, fetching from backend', 3);
|
$debug->append('No cached version available, fetching from backend', 3);
|
||||||
if ($setting->getValue('monitoring_uptimerobot_api_keys')) {
|
if ($setting->getValue('monitoring_uptimerobot_api_keys') && $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("UPDATED", $setting->getValue('monitoring_uptimerobot_lastcheck'));
|
$smarty->assign("CODES", array(
|
||||||
$smarty->assign("CODES", array(
|
0 => 'Paused',
|
||||||
0 => 'Paused',
|
1 => 'Unchecked',
|
||||||
1 => 'Unchecked',
|
2 => 'Up',
|
||||||
2 => 'Up',
|
8 => 'Down',
|
||||||
8 => 'Down',
|
9 => 'Down'
|
||||||
9 => 'Down'
|
));
|
||||||
));
|
|
||||||
}
|
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
} else {
|
} else {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'UptimeRobot API Key not configured.', 'TYPE' => 'info');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'UptimeRobot API Key not configured.', 'TYPE' => 'info');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user