feat(view): sankey, problems only, patterns, change marks; clearer rings, treemap and tree #7

Merged
dawid merged 1 commit from views-polish into main 2026-11-19 20:34:00 +00:00
Owner

Improvements to the existing views, and a new one.

New

  • view=sankey: the BI trees as flows from the aggregations through their rules (up to depth) to their hosts. A host shared by several aggregations is one node, so what they share shows as flows meeting. Worst first; flows take the color of the worst state in them.
  • problems=1 (rings, treemap, tree, sankey): only the paths down to what is not OK; the page says how many aggregations it left out. The details still count everything below a node.
  • patterns=1: a pattern per problem state besides its color, in every view. The chart carries a description for screen readers (ECharts aria).
  • Change marks: an aggregation whose state changed while the page is open is marked for ten minutes (bold with "since hh:mm" in the list, outlined among the tiles, the time in its details).

Better

  • Fewer requests: a tree is loaded again only when its aggregation's answer from the state endpoint changed, or after ten minutes.
  • rings: with hundreds of hosts and services the outer band read as noise (the README's rings screenshot looked corrupted). When it has less than 6 px a pill, neighbours under one rule that share a state are one pill, its details naming them. The room below a rule's higher hosts is filled instead of a dark crack. A hovered segment no longer shows its whole name over the bent one (also on main).
  • treemap: worst first (top left), within its box (it was cut off on the right), opaque fills (pale OK added up to a brighter one over its parent), no drill-down icon.
  • tree: filled nodes in their state's color (the open ones were empty circles), a line of room per row.
  • Labels leave out the parent's name in front ("Frontend" below "Web Shop"); the details keep the whole name.
  • A tap on a touch screen shows the details (it did already; the README said it did not).

Docs and tests

  • README: the new view and parameters, problems only, change marks, the reloading of trees, the touch limitation.
  • Screenshots regenerated with tools/screenshots.py, plus docs/screenshot-sankey.png; the tree's shows problems=1.
  • 16 new unit tests (86 pass locally); the integration test of the tree views covers sankey too. The integration tests were not run locally.
Improvements to the existing views, and a new one. **New** - `view=sankey`: the BI trees as flows from the aggregations through their rules (up to `depth`) to their hosts. A host shared by several aggregations is one node, so what they share shows as flows meeting. Worst first; flows take the color of the worst state in them. - `problems=1` (rings, treemap, tree, sankey): only the paths down to what is not OK; the page says how many aggregations it left out. The details still count everything below a node. - `patterns=1`: a pattern per problem state besides its color, in every view. The chart carries a description for screen readers (ECharts aria). - Change marks: an aggregation whose state changed while the page is open is marked for ten minutes (bold with "since hh:mm" in the list, outlined among the tiles, the time in its details). **Better** - Fewer requests: a tree is loaded again only when its aggregation's answer from the state endpoint changed, or after ten minutes. - rings: with hundreds of hosts and services the outer band read as noise (the README's rings screenshot looked corrupted). When it has less than 6 px a pill, neighbours under one rule that share a state are one pill, its details naming them. The room below a rule's higher hosts is filled instead of a dark crack. A hovered segment no longer shows its whole name over the bent one (also on main). - treemap: worst first (top left), within its box (it was cut off on the right), opaque fills (pale OK added up to a brighter one over its parent), no drill-down icon. - tree: filled nodes in their state's color (the open ones were empty circles), a line of room per row. - Labels leave out the parent's name in front ("Frontend" below "Web Shop"); the details keep the whole name. - A tap on a touch screen shows the details (it did already; the README said it did not). **Docs and tests** - README: the new view and parameters, problems only, change marks, the reloading of trees, the touch limitation. - Screenshots regenerated with `tools/screenshots.py`, plus `docs/screenshot-sankey.png`; the tree's shows `problems=1`. - 16 new unit tests (86 pass locally); the integration test of the tree views covers `sankey` too. The integration tests were not run locally.
feat(view): sankey, problems only, patterns, change marks; clearer rings, treemap and tree
Some checks failed
CI / unit (pull_request) Successful in 1m50s
CI / integration (Checkmk 2.4) (pull_request) Failing after 6m0s
CI / integration (Checkmk 2.5) (pull_request) Failing after 6m9s
CI / integration (update 2.4 to 2.5) (pull_request) Successful in 7m33s
CI / release (pull_request) Has been skipped
95eb6850d7
- sankey: the BI trees as flows from the aggregations through their rules to
  their hosts; a host shared by several aggregations is one node.
- problems=1 (rings, treemap, tree, sankey): only the paths down to what is not
  OK; the page says how many aggregations it left out.
- patterns=1: a pattern per problem state besides its color; the chart carries a
  description for screen readers.
- An aggregation whose state changed while the page is open is marked for ten
  minutes (list, tiles, details).
- A tree is loaded again only when its aggregation's answer from the state
  endpoint changed, or after ten minutes.
- rings: neighbouring hosts and services of one state are one pill when the
  band is crowded (it read as noise with hundreds of them); the room below a
  rule's higher hosts is filled instead of a dark crack; a hovered segment no
  longer shows its whole name over the bent one.
- treemap: worst first, within its box, opaque fills, no drill-down icon.
- tree: filled nodes in their state's color, a line of room per row.
- Labels leave out the parent's name in front ("Frontend" below "Web Shop").
dawid merged commit a219ad63ae into main 2026-11-19 20:34:00 +00:00
dawid deleted branch views-polish 2026-11-19 20:34:00 +00:00

Tests of CI / unit: passed

86 passed, 0 failed, 0 skipped (86 tests, 55.8 s)

Of 95eb6850d7, the run, updated by every run.

<!-- ci-report tests: CI-unit --> ### Tests of CI / unit: passed **86 passed, 0 failed, 0 skipped** (86 tests, 55.8 s) <sub>Of 95eb6850d7, [the run](https://git.ciepiela.org/dawid/checkmk-bi-charts/actions/runs/19), updated by every run.</sub>

Tests of CI / integration (Checkmk 2.4): failed

17 passed, 1 failed, 0 skipped (18 tests, 306.6 s)

Failed tests

tests.integration.test_checkmk.test_page_draws_the_trees_in_a_browser[2.4-chromium-sankey]
…
.venv/lib/python3.12/site-packages/playwright/_impl/frame.py:1209: in wait_for_function
    result = await self._channel.waitForFunction(
.venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:398: in _mapped
    return mapper(await awaitable)
                  ^^^^^^^^^^^^^^^
.venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:387: in finish
    raise e from None
.venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:352: in finish
    result = await zone.run_async(lambda: awaitable)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <playwright._impl.utils.zones.Zone object at 0x77767c2d1e20>
func = <function ChannelOwner._wrap_api_call.<locals>.finish.<locals>.<lambda> at 0x77767c2e6e80>

    async def run_async(self, func: Callable[[], Awaitable[R]]) -> R:
        # Python: run() of an async function. The coroutine runs when it is awaited,
        # so the zone must be current while it is awaited, not while it is created.
        token = _async_local_storage.set(self)
        try:
>           return await func()
                   ^^^^^^^^^^^^
E           playwright._impl._errors.TimeoutError: Page.wait_for_function: Timeout 60000ms exceeded.

.venv/lib/python3.12/site-packages/playwright/_impl/utils/zones.py:58: TimeoutError

Of 95eb6850d7, the run, updated by every run.

<!-- ci-report tests: CI-integration-Checkmk-2.4- --> ### Tests of CI / integration (Checkmk 2.4): failed **17 passed, 1 failed, 0 skipped** (18 tests, 306.6 s) #### Failed tests <details><summary><code>tests.integration.test_checkmk.test_page_draws_the_trees_in_a_browser[2.4-chromium-sankey]</code></summary> ```text … .venv/lib/python3.12/site-packages/playwright/_impl/frame.py:1209: in wait_for_function result = await self._channel.waitForFunction( .venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:398: in _mapped return mapper(await awaitable) ^^^^^^^^^^^^^^^ .venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:387: in finish raise e from None .venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:352: in finish result = await zone.run_async(lambda: awaitable) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <playwright._impl.utils.zones.Zone object at 0x77767c2d1e20> func = <function ChannelOwner._wrap_api_call.<locals>.finish.<locals>.<lambda> at 0x77767c2e6e80> async def run_async(self, func: Callable[[], Awaitable[R]]) -> R: # Python: run() of an async function. The coroutine runs when it is awaited, # so the zone must be current while it is awaited, not while it is created. token = _async_local_storage.set(self) try: > return await func() ^^^^^^^^^^^^ E playwright._impl._errors.TimeoutError: Page.wait_for_function: Timeout 60000ms exceeded. .venv/lib/python3.12/site-packages/playwright/_impl/utils/zones.py:58: TimeoutError ``` </details> <sub>Of 95eb6850d7, [the run](https://git.ciepiela.org/dawid/checkmk-bi-charts/actions/runs/19), updated by every run.</sub>

Tests of CI / integration (Checkmk 2.5): failed

17 passed, 1 failed, 0 skipped (18 tests, 313.3 s)

Failed tests

tests.integration.test_checkmk.test_page_draws_the_trees_in_a_browser[2.5-chromium-sankey]
…
.venv/lib/python3.12/site-packages/playwright/_impl/frame.py:1209: in wait_for_function
    result = await self._channel.waitForFunction(
.venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:398: in _mapped
    return mapper(await awaitable)
                  ^^^^^^^^^^^^^^^
.venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:387: in finish
    raise e from None
.venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:352: in finish
    result = await zone.run_async(lambda: awaitable)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <playwright._impl.utils.zones.Zone object at 0x74abac47de80>
func = <function ChannelOwner._wrap_api_call.<locals>.finish.<locals>.<lambda> at 0x74abac492e80>

    async def run_async(self, func: Callable[[], Awaitable[R]]) -> R:
        # Python: run() of an async function. The coroutine runs when it is awaited,
        # so the zone must be current while it is awaited, not while it is created.
        token = _async_local_storage.set(self)
        try:
>           return await func()
                   ^^^^^^^^^^^^
E           playwright._impl._errors.TimeoutError: Page.wait_for_function: Timeout 60000ms exceeded.

.venv/lib/python3.12/site-packages/playwright/_impl/utils/zones.py:58: TimeoutError

Of 95eb6850d7, the run, updated by every run.

<!-- ci-report tests: CI-integration-Checkmk-2.5- --> ### Tests of CI / integration (Checkmk 2.5): failed **17 passed, 1 failed, 0 skipped** (18 tests, 313.3 s) #### Failed tests <details><summary><code>tests.integration.test_checkmk.test_page_draws_the_trees_in_a_browser[2.5-chromium-sankey]</code></summary> ```text … .venv/lib/python3.12/site-packages/playwright/_impl/frame.py:1209: in wait_for_function result = await self._channel.waitForFunction( .venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:398: in _mapped return mapper(await awaitable) ^^^^^^^^^^^^^^^ .venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:387: in finish raise e from None .venv/lib/python3.12/site-packages/playwright/_impl/channel_owner.py:352: in finish result = await zone.run_async(lambda: awaitable) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <playwright._impl.utils.zones.Zone object at 0x74abac47de80> func = <function ChannelOwner._wrap_api_call.<locals>.finish.<locals>.<lambda> at 0x74abac492e80> async def run_async(self, func: Callable[[], Awaitable[R]]) -> R: # Python: run() of an async function. The coroutine runs when it is awaited, # so the zone must be current while it is awaited, not while it is created. token = _async_local_storage.set(self) try: > return await func() ^^^^^^^^^^^^ E playwright._impl._errors.TimeoutError: Page.wait_for_function: Timeout 60000ms exceeded. .venv/lib/python3.12/site-packages/playwright/_impl/utils/zones.py:58: TimeoutError ``` </details> <sub>Of 95eb6850d7, [the run](https://git.ciepiela.org/dawid/checkmk-bi-charts/actions/runs/19), updated by every run.</sub>

Tests of CI / integration (update 2.4 to 2.5): passed

6 passed, 0 failed, 0 skipped (6 tests, 397.2 s)

Of 95eb6850d7, the run, updated by every run.

<!-- ci-report tests: CI-integration-update-2.4-to-2.5- --> ### Tests of CI / integration (update 2.4 to 2.5): passed **6 passed, 0 failed, 0 skipped** (6 tests, 397.2 s) <sub>Of 95eb6850d7, [the run](https://git.ciepiela.org/dawid/checkmk-bi-charts/actions/runs/19), updated by every run.</sub>
Sign in to join this conversation.
No description provided.