|
|
@ -29,7 +29,7 @@ if(!empty($router->uParameters[2]))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$sPageContents = Templater::InlineRender("vps.overview", $locale->strings, array(
|
|
|
|
$sVariables = array(
|
|
|
|
'id' => $sContainer->sId,
|
|
|
|
'id' => $sContainer->sId,
|
|
|
|
'server-location' => $sContainer->sNode->sPhysicalLocation,
|
|
|
|
'server-location' => $sContainer->sNode->sPhysicalLocation,
|
|
|
|
'operating-system' => $sContainer->sTemplate->sName,
|
|
|
|
'operating-system' => $sContainer->sTemplate->sName,
|
|
|
@ -39,14 +39,50 @@ $sPageContents = Templater::InlineRender("vps.overview", $locale->strings, array
|
|
|
|
'total-traffic-limit' => "{$sContainer->sTotalTrafficLimit} bytes",
|
|
|
|
'total-traffic-limit' => "{$sContainer->sTotalTrafficLimit} bytes",
|
|
|
|
'bandwidth-limit' => "100mbit",
|
|
|
|
'bandwidth-limit' => "100mbit",
|
|
|
|
'status' => $sContainer->sStatusText,
|
|
|
|
'status' => $sContainer->sStatusText,
|
|
|
|
'disk-used' => number_format($sContainer->sDiskUsed / 1024, 2),
|
|
|
|
'traffic-used' => number_format(($sContainer->sIncomingTrafficUsed + $sContainer->sOutgoingTrafficUsed) / 1024 / 1024 / 1024, 2),
|
|
|
|
'disk-total' => number_format($sContainer->sDiskTotal / 1024, 2),
|
|
|
|
'traffic-total' => number_format(($sContainer->sIncomingTrafficLimit + $sContainer->sOutgoingTrafficLimit) / 1024 / 1024 / 1024, 0),
|
|
|
|
'disk-percentage' => number_format(($sContainer->sDiskUsed / $sContainer->sDiskTotal) * 100, 2),
|
|
|
|
'traffic-percentage' => number_format(($sContainer->sIncomingTrafficUsed + $sContainer->sOutgoingTrafficUsed) / ($sContainer->sIncomingTrafficLimit + $sContainer->sOutgoingTrafficLimit), 2),
|
|
|
|
'disk-unit' => "GB",
|
|
|
|
'traffic-unit' => "GB"
|
|
|
|
'ram-used' => $sContainer->sRamUsed,
|
|
|
|
);
|
|
|
|
'ram-total' => $sContainer->sRamTotal,
|
|
|
|
|
|
|
|
'ram-percentage' => ($sContainer->sRamUsed / $sContainer->sRamTotal) * 100,
|
|
|
|
|
|
|
|
'ram-unit' => "MB"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
));
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$sVariables = array_merge($sVariables, array(
|
|
|
|
|
|
|
|
'disk-used' => number_format($sContainer->sDiskUsed / 1024, 2),
|
|
|
|
|
|
|
|
'disk-total' => number_format($sContainer->sDiskTotal / 1024, 2),
|
|
|
|
|
|
|
|
'disk-percentage' => number_format(($sContainer->sDiskUsed / $sContainer->sDiskTotal) * 100, 2),
|
|
|
|
|
|
|
|
'disk-unit' => "GB"
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (SshExitException $e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$sVariables = array_merge($sVariables, array(
|
|
|
|
|
|
|
|
'disk-used' => 0,
|
|
|
|
|
|
|
|
'disk-total' => 0,
|
|
|
|
|
|
|
|
'disk-percentage' => 0,
|
|
|
|
|
|
|
|
'disk-unit' => "GB"
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$sVariables = array_merge($sVariables, array(
|
|
|
|
|
|
|
|
'ram-used' => $sContainer->sRamUsed,
|
|
|
|
|
|
|
|
'ram-total' => $sContainer->sRamTotal,
|
|
|
|
|
|
|
|
'ram-percentage' => ($sContainer->sRamUsed / $sContainer->sRamTotal) * 100,
|
|
|
|
|
|
|
|
'ram-unit' => "MB"
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (SshExitException $e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$sVariables = array_merge($sVariables, array(
|
|
|
|
|
|
|
|
'ram-used' => 0,
|
|
|
|
|
|
|
|
'ram-total' => 0,
|
|
|
|
|
|
|
|
'ram-percentage' => 0,
|
|
|
|
|
|
|
|
'ram-unit' => "MB"
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$sPageContents = Templater::InlineRender("vps.overview", $locale->strings, $sVariables);
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|