Skip to content

Add metric selector to performance data graph tab#100

Closed
gdm-maha wants to merge 7 commits into
NETWAYS:mainfrom
gdm-maha:main
Closed

Add metric selector to performance data graph tab#100
gdm-maha wants to merge 7 commits into
NETWAYS:mainfrom
gdm-maha:main

Conversation

@gdm-maha
Copy link
Copy Markdown

@gdm-maha gdm-maha commented May 8, 2026

Summary:

This change adds a collapsible metric selector to the IcingaDB performance data graph tab so users can choose which perfdata metrics to display instead of always showing all metrics

Changes:

New file library Perfdatagraphs Widget MetricSelector.php. New MetricSelector widget that renders a CSS only collapsible dropdown with one checkbox for each available metric. Uses GET form submission so IcingaWeb2 handles navigation normally without custom ajax handling

Adds perfdatagraphs.noselector=1 to submitted URLs so dashboard tiles can suppress the selector and show only the chart

Parses perfdatagraphs label with support for both repeated parameters and comma separated values used by dashboard tile links, maybe we only want one as they do the same thing.

Collects available metric labels from response datasets. Shows the metric selector only when datasets are available and noselector is not enabled, might want to add default behavior when only one metric is available.

Updated file public css module.less:
Adds styling for the metric selector to better match the IcingaWeb2 look. Uses CSS only open and close behavior through checked sibling selectors.

Adds custom checkbox styling and selected state highlighting.

Updated file public js module.js:
Adds shift click range selection for metric checkboxes, some JS was needed for this to work.
Closes the selector flyout on rendered when metrics are already selected so ajax navigation does not leave it open

@martialblog
Copy link
Copy Markdown
Member

Hi, before we dive into implementations I want to think a bit about what a good solution might look like. I want to be very deliberate when introducing new features and especially UI deliberate.

I opened an issue for discussing this #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants