From df925fd1944de9ce545e84daa17d078e42943715 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 16 Dec 2012 15:37:55 +0100 Subject: [PATCH] Show VPSes on unreachable nodes as offline --- frontend/module.admin.containers.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/module.admin.containers.php b/frontend/module.admin.containers.php index 05e33e9..ba490ed 100644 --- a/frontend/module.admin.containers.php +++ b/frontend/module.admin.containers.php @@ -21,6 +21,15 @@ if($result = mysql_query_cached("SELECT * FROM containers")) { $sVps = new Container($row); + try + { + $sStatus = $sVps->sStatusText; + } + catch (SshException $e) + { + $sStatus = "stopped"; + } + $sVpsList[] = array( 'id' => $sVps->sId, 'hostname' => $sVps->sHostname, @@ -31,7 +40,7 @@ if($result = mysql_query_cached("SELECT * FROM containers")) 'diskspace-unit' => "GB", 'guaranteed-ram' => $sVps->sGuaranteedRam, 'guaranteed-ram-unit' => "MB", - 'status' => $sVps->sStatusText, + 'status' => $sStatus, 'virtualization-type' => $sVps->sVirtualizationType ); }