Enhancement: add valueOnly option to block highlighting feature (#6051)

This commit is contained in:
shamoon
2025-12-04 08:42:24 -08:00
committed by GitHub
parent c77dfa4c64
commit 6d5f35f07e
3 changed files with 23 additions and 4 deletions

View File

@@ -159,6 +159,19 @@ Widgets can tint their metric block text automatically based on rules defined al
Supported numeric operators for the `when` property are `gt`, `gte`, `lt`, `lte`, `eq`, `ne`, `between`, and `outside`. String rules support `equals`, `includes`, `startsWith`, `endsWith`, and `regex`. Each rule can be inverted with `negate: true`, and string rules may pass `caseSensitive: true` or custom regex `flags`. The highlight engine does its best to coerce formatted values, but you will get the most reliable results when you pass plain numbers or strings into `<Block>`.
#### Value Only Highlighting
You can optionally apply highlighting only to the value portion of a block (not the label) by setting `valueOnly: true` on the field configuration. This keeps the label visible while highlighting only the metric value itself.
```yaml
- Sonarr:
...
highlight:
queued:
valueOnly: true
...
```
## Descriptions
Services may have descriptions,