diff options
author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-07-16 19:15:14 +0100 |
---|---|---|
committer | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-07-16 19:15:14 +0100 |
commit | 16edf0a9cd3a7ee230135f8ed301fc9e8c3c6f2c (patch) | |
tree | d962426085500edf5f97c0050ab6eeff3cbb0e82 /templates | |
parent | 8daa6330396b7adbf408755882283f1520b48944 (diff) | |
download | lorry-controller-16edf0a9cd3a7ee230135f8ed301fc9e8c3c6f2c.tar.gz |
status: Show free disk space in MiB when it's < 1 GiB
Showing free disk space as 0 when it drops below 1 GiB may be
unncessarily alarming, so show it in units of MiB if that happens.
The status dictionary already includes it in both units.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/status.tpl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/status.tpl b/templates/status.tpl index 277b4b8..ff572de 100644 --- a/templates/status.tpl +++ b/templates/status.tpl @@ -46,7 +46,13 @@ <p>Maximum number of jobs: {{max_jobs}}.</p> - <p>Free disk space: {{disk_free_gib}} GiB.</p> + <p>Free disk space: +% if disk_free_gib: + {{disk_free_gib}} GiB. +% else: + {{disk_free_mib}} MiB. +% end + </p> <h2>Upstream Hosts</h2> |