|
|
@ -19,25 +19,24 @@ if($result = mysql_query_cached("SELECT * FROM containers"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach($result->data as $row)
|
|
|
|
foreach($result->data as $row)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$sContainer = new Container($row);
|
|
|
|
$sVps = new Container($row);
|
|
|
|
|
|
|
|
|
|
|
|
$sContainerList[] = array(
|
|
|
|
$sVpsList[] = array(
|
|
|
|
'id' => $sContainer->sId,
|
|
|
|
'id' => $sVps->sId,
|
|
|
|
'hostname' => $sContainer->sHostname,
|
|
|
|
'hostname' => $sVps->sHostname,
|
|
|
|
'node' => $sContainer->sNode->sName,
|
|
|
|
'node' => $sVps->sNode->sName,
|
|
|
|
'node-hostname' => $sContainer->sNode->sHostname,
|
|
|
|
'node-hostname' => $sVps->sNode->sHostname,
|
|
|
|
'template' => $sContainer->sTemplate->sName,
|
|
|
|
'template' => $sVps->sTemplate->sName,
|
|
|
|
'diskspace' => number_format($sContainer->sDiskSpace / 1024),
|
|
|
|
'diskspace' => number_format($sVps->sDiskSpace / 1024),
|
|
|
|
'diskspace-unit' => "GB",
|
|
|
|
'diskspace-unit' => "GB",
|
|
|
|
'guaranteed-ram' => $sContainer->sGuaranteedRam,
|
|
|
|
'guaranteed-ram' => $sVps->sGuaranteedRam,
|
|
|
|
'guaranteed-ram-unit' => "MB",
|
|
|
|
'guaranteed-ram-unit' => "MB",
|
|
|
|
'status' => $sContainer->sStatusText,
|
|
|
|
'status' => $sVps->sStatusText,
|
|
|
|
'virtualization-type' => $sContainer->sVirtualizationType
|
|
|
|
'virtualization-type' => $sVps->sVirtualizationType
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* TODO: Change variable name to phase out the use of the term "container". */
|
|
|
|
|
|
|
|
$sPageContents = Templater::AdvancedParse("{$sTheme}/admin/vps/list", $locale->strings, array(
|
|
|
|
$sPageContents = Templater::AdvancedParse("{$sTheme}/admin/vps/list", $locale->strings, array(
|
|
|
|
'containers' => $sContainerList
|
|
|
|
'vpses' => $sVpsList
|
|
|
|
));
|
|
|
|
));
|
|
|
|