web: don't show host cache size if we don't know it

This commit is contained in:
David Anderson 2013-06-26 16:16:21 -07:00
parent f03c4a0393
commit 2ad0e83417
1 changed files with 5 additions and 3 deletions

View File

@ -124,9 +124,11 @@ function show_host($host, $user, $ipprivate) {
$x = $host->m_nbytes/(1024*1024);
$y = round($x, 2);
row2(tra("Memory"), tra("%1 MB", $y));
if ($host->m_cache > 0) {
$x = $host->m_cache/1024;
$y = round($x, 2);
row2(tra("Cache"), tra("%1 KB", $y));
}
if ($user) {
$x = $host->m_swap/(1024*1024);