summaryrefslogtreecommitdiffstats
path: root/health-storage-html.lsp
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2007-12-22 11:40:31 +0000
committerMika Havela <mika.havela@gmail.com>2007-12-22 11:40:31 +0000
commit508d3b942ab47fa7d2fb065ca0737ebe839a6672 (patch)
treed12d20ae31351a7649a18f34bd35e6d8a9fa472a /health-storage-html.lsp
parente0b7bd24427cdc3b98a35c2105063d42a05dbab7 (diff)
downloadacf-alpine-baselayout-508d3b942ab47fa7d2fb065ca0737ebe839a6672.tar.bz2
acf-alpine-baselayout-508d3b942ab47fa7d2fb065ca0737ebe839a6672.tar.xz
Hide label when label is too big for the bar
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@449 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'health-storage-html.lsp')
-rw-r--r--health-storage-html.lsp4
1 files changed, 2 insertions, 2 deletions
diff --git a/health-storage-html.lsp b/health-storage-html.lsp
index 693822a..15830c3 100644
--- a/health-storage-html.lsp
+++ b/health-storage-html.lsp
@@ -10,7 +10,7 @@
<? if (view.storage.floppycapacity.used) then ?>
<TABLE STYLE="margin:0px;padding:0px;border:0px">
<TR>
- <TD>0%</TD><TD WIDTH="<?= view.storage.floppycapacity.used ?>%" STYLE="background:red;"><CENTER><?= view.storage.floppycapacity.used ?>%</CENTER></TD><TD WIDTH="<?= (100-view.storage.floppycapacity.used) ?>%" STYLE="background:green;"><CENTER><?= (100-view.storage.floppycapacity.used) ?>%</CENTER></TD><TD>100%</TD>
+ <TD>0%</TD><TD WIDTH="<?= view.storage.floppycapacity.used ?>%" STYLE="background:red;"><CENTER><? if ( tonumber(view.storage.floppycapacity.used) > 10) then io.write(view.storage.floppycapacity.used .. "%") end ?></CENTER></TD><TD WIDTH="<?= (100-view.storage.floppycapacity.used) ?>%" STYLE="background:green;"><CENTER><? if ( 90 > tonumber(view.storage.floppycapacity.used)) then io.write((100-view.storage.floppycapacity.used) .. "%") end ?></CENTER></TD><TD>100%</TD>
</TR>
</TABLE>
<TABLE STYLE="margin:0px;padding:0px;border:0px">
@@ -26,7 +26,7 @@
<? if (view.storage.hdcapacity.used) then ?>
<TABLE STYLE="margin:0px;padding:0px;border:0px">
<TR>
- <TD>0%</TD><TD WIDTH="<?= view.storage.hdcapacity.used ?>%" STYLE="background:red;"><CENTER><?= view.storage.hdcapacity.used ?>%</CENTER></TD><TD WIDTH="<?= (100-view.storage.hdcapacity.used) ?>%" STYLE="background:green;"><CENTER><?= (100-view.storage.hdcapacity.used) ?>%</CENTER></TD><TD>100%</TD>
+ <TD>0%</TD><TD WIDTH="<?= view.storage.hdcapacity.used ?>%" STYLE="background:red;"><CENTER><? if ( tonumber(view.storage.hdcapacity.used) > 10) then io.write(view.storage.hdcapacity.used .. "%") end ?></CENTER></TD><TD WIDTH="<?= (100-view.storage.hdcapacity.used) ?>%" STYLE="background:green;"><CENTER><? if ( 90 > tonumber(view.storage.hdcapacity.used)) then io.write((100-view.storage.hdcapacity.used) .. "%") end ?></CENTER></TD><TD>100%</TD>
</TR>
</TABLE>
<TABLE STYLE="margin:0px;padding:0px;border:0px">