Also deal with unreachable nodes on user and node lookup pages.

feature/node-rewrite
Sven Slootweg 12 years ago
parent d403684d93
commit fd14f1728b

@ -23,6 +23,15 @@ try
{ {
$sContainer = new Container($row); $sContainer = new Container($row);
try
{
$sStatus = $sContainer->sStatusText;
}
catch (SshException $e)
{
$sStatus = "unknown";
}
$sContainerList[] = array( $sContainerList[] = array(
'id' => $sContainer->sId, 'id' => $sContainer->sId,
'hostname' => $sContainer->sHostname, 'hostname' => $sContainer->sHostname,
@ -33,7 +42,7 @@ try
'diskspace-unit' => "GB", 'diskspace-unit' => "GB",
'guaranteed-ram' => $sContainer->sGuaranteedRam, 'guaranteed-ram' => $sContainer->sGuaranteedRam,
'guaranteed-ram-unit' => "MB", 'guaranteed-ram-unit' => "MB",
'status' => $sContainer->sStatusText, 'status' => $sStatus,
'virtualization-type' => $sContainer->sVirtualizationType 'virtualization-type' => $sContainer->sVirtualizationType
); );
} }

@ -27,7 +27,14 @@ try
{ {
$sContainer = new Container($row); $sContainer = new Container($row);
/* TODO: Deal with unreachable servers (SshException). */ try
{
$sStatus = $sContainer->sStatusText;
}
catch (SshException $e)
{
$sStatus = "unknown";
}
$sContainerList[] = array( $sContainerList[] = array(
'id' => $sContainer->sId, 'id' => $sContainer->sId,
@ -39,7 +46,7 @@ try
'diskspace-unit' => "GB", 'diskspace-unit' => "GB",
'guaranteed-ram' => $sContainer->sGuaranteedRam, 'guaranteed-ram' => $sContainer->sGuaranteedRam,
'guaranteed-ram-unit' => "MB", 'guaranteed-ram-unit' => "MB",
'status' => $sContainer->sStatusText, 'status' => $sStatus,
'virtualization-type' => $sContainer->sVirtualizationType 'virtualization-type' => $sContainer->sVirtualizationType
); );
} }

Loading…
Cancel
Save