prometheus: Add per-view timespan/resolution controls to DiskMetricsChart - #1180
Open
iqraurooj111 wants to merge 20 commits into
Open
prometheus: Add per-view timespan/resolution controls to DiskMetricsChart#1180iqraurooj111 wants to merge 20 commits into
iqraurooj111 wants to merge 20 commits into
Conversation
iqraurooj111
requested review from
ashu8912,
illume,
joaquimrocha,
skoeva,
sniok,
vyncent-t and
yolossn
as code owners
August 14, 2026 18:53
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.
Related to #82
Problem
Issue #82 originally reported that the Prometheus chart time range was
hardcoded, making it too short for debugging purposes. Since that report,
a global "default timespan" setting was added to the plugin's Settings
page, and the
GenericMetricsChartcomponent (used for Pod, Deployment,StatefulSet, DaemonSet, ReplicaSet, Job, and CronJob detail views) was
updated to include a per-view Timespan and Resolution dropdown, so users
can override the global default on each resource's page.
However,
DiskMetricsChart(used for PersistentVolumeClaim detail views)was never updated to match. It still read
intervalandresolutiondirectly from the global config store (
getPrometheusInterval/getPrometheusResolution) with no way for the user to change the rangefor that specific view — the exact limitation the issue describes, just
on a different resource type.
What this PR changes
Selectdropdowns for Timespan and Resolutionto
DiskMetricsChartthat already exist inGenericMetricsChart,using identical option values and labels for consistency.
timespan,resolution) initializedfrom the cluster's global default, so existing behavior is unchanged
until the user actively picks a different value.
DiskChartinstead of the raw globalconfig values, so changing the dropdown immediately updates the
rendered chart's time range and step size.
page — this is purely adding a per-view override, following the
existing pattern rather than introducing a new one.
Why this approach
Rather than building a new UI pattern, this reuses the dropdown
component and option list already reviewed and merged for
GenericMetricsChart, so the UX stays consistent across resource typesand there's nothing new for maintainers to review from a design
standpoint — only the wiring into
DiskMetricsChart.Testing
shows the Timespan/Resolution dropdowns.
chart's X-axis range and refetches data for the new range.
when no selection has been made.
Scope / follow-up
This PR only covers
DiskMetricsChart. Other resource-specific charts(
KedaChart,KarpenterChart,StrimziChart,KnativeChart,VolcanoChart,CapiChart) still use the global-only interval/resolutionand would benefit from the same treatment. Happy to follow up with
separate PRs for those if maintainers agree with this approach — flagging
here so #82 isn't fully closed until those are addressed too.