Add metric selector to performance data graph tab#100
Closed
gdm-maha wants to merge 7 commits into
Closed
Conversation
need javascript for shift click to work
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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