Closed UnkwUsr closed 2 months ago
Add formatter option for type Number, like ignore_zero or ignore_threshold. This is more general approach.
I like this. Or even add an option to .eng
formatter. Maybe .eng(allow:1..100)
or something.
Maybe .eng(allow:1..100) or something.
So the above came up as a potential solution for #1768 as well. Usecase being: showing disk usage, memory usage and other blocks conditionally. Should we rephrase this issue a little broader to encompass that? Or maybe create a new issue that specifically mentions the creation of an (allow:1..100)
formatter?
Problem
Formatting doc says (if I understand it correctly) that we can write conditions like
Percentage: $percentage|nothing here
.I would like to make
memory
block hidden whenswap_used
is zero, so I'm tryingformat = "$swap_used|nothing"
but it shows "0B".Possible solutions
swap_used
so zero value will fallback to category "missing placeholder"?ignore_zero
orignore_threshold
. This is more general approach.