display ">100%" when past maxsize
This is to avoid a value like 1000% causing the table to not align.
This commit is contained in:
parent
76ece2a699
commit
a643699b7b
1 changed files with 6 additions and 4 deletions
|
@ -98,7 +98,7 @@ sizeOverview o = do
|
|||
(widths, headers) = unzip
|
||||
[ (7, "size")
|
||||
, (7, "maxsize")
|
||||
, (5, "%full")
|
||||
, (6, "%full")
|
||||
, (0, "repository")
|
||||
]
|
||||
|
||||
|
@ -109,9 +109,11 @@ sizeOverview o = do
|
|||
[ formatsize size
|
||||
, formatsize maxsize
|
||||
, case (size, maxsize) of
|
||||
(Just size', Just maxsize') ->
|
||||
showPercentage 0 $
|
||||
percentage maxsize' size'
|
||||
(Just size', Just maxsize')
|
||||
| size' <= maxsize' ->
|
||||
showPercentage 0 $
|
||||
percentage maxsize' size'
|
||||
| otherwise -> ">100%"
|
||||
_ -> ""
|
||||
, ""
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue