feat(FR-2494): add Prometheus query result preview in editor modal#6642
Merged
graphite-app[bot] merged 1 commit intomainfrom Apr 16, 2026
Conversation
This was referenced Apr 13, 2026
Contributor
Author
Contributor
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 8.7% (-0.01% 🔻) |
1738/19978 |
| 🔴 | Branches | 7.92% (-0.01% 🔻) |
1104/13944 |
| 🔴 | Functions | 5.22% (-0% 🔻) |
283/5422 |
| 🔴 | Lines | 8.4% (-0.01% 🔻) |
1630/19404 |
Test suite run success
847 tests passing in 38 suites.
Report generated by 🧪jest coverage report action from 0a1624c
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an inline “current value” preview for selected Prometheus query presets inside the autoscaling rule editor modal, helping users validate query templates before saving an autoscaling rule.
Changes:
- Introduces a Suspense-powered
PrometheusPresetPreviewthat fetchesprometheusQueryPresetResultand displays the latest value with a manual refresh control. - Extends the autoscaling i18n namespace with new strings used by the preview UI.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| resources/i18n/en.json | Adds new autoScalingRule.* translation entries for the preview UI (current value, refresh, empty state, multi-series summary). |
| react/src/components/AutoScalingRuleEditorModal.tsx | Adds the inline preview component and wires it into the Prometheus preset section via Form.Item.extra with Suspense + error boundary. |
e393255 to
5ee0503
Compare
5ee0503 to
be00f49
Compare
8fb120a to
9c9286d
Compare
9be608e to
d5c0406
Compare
9c9286d to
ad49b5e
Compare
d5c0406 to
8086c01
Compare
ad49b5e to
d2270c4
Compare
e6965ed to
9a9551a
Compare
2321b26 to
74a8ee8
Compare
74a8ee8 to
3050b47
Compare
9a9551a to
29b12aa
Compare
This was referenced Apr 15, 2026
nowgnuesLee
requested changes
Apr 15, 2026
3050b47 to
7e058a6
Compare
29b12aa to
1fe42af
Compare
1fe42af to
137a879
Compare
This was referenced Apr 15, 2026
yomybaby
approved these changes
Apr 16, 2026
Merge activity
|
…6642) Resolves #6642 (FR-2494) Blocked by lablup/backend.ai#11036 > [!NOTE] > Test Node: /serving/e21d2f21-028a-405b-b196-69736b7343b0 with 10.122.10.215 ## Summary - Add Prometheus query result preview in the auto-scaling rule editor modal - When a Prometheus preset is selected, an instant query result is displayed below the query template using `prometheusQueryPresetResult` API - Shows current metric value with a refresh button to re-fetch on demand - Handles multiple series results, empty results, loading (Suspense), and errors (ErrorBoundary) ## Changes - `react/src/components/AutoScalingRuleEditorModal.tsx`: Added `PrometheusPresetPreview` component using `useLazyLoadQuery` with `fetchKey` for manual refresh support - `resources/i18n/en.json`: Added i18n keys for preview UI (`CurrentValue`, `MultipleSeriesResult`, `NoDataAvailable`, `RefreshPreview`)
graphite-app Bot
pushed a commit
that referenced
this pull request
Apr 16, 2026
Resolves #6485 (FR-2494) - Sub-task 2 > [!NOTE] > Translation is handled in #6642 ## Summary - Create new `AutoScalingRuleList.tsx` component that uses the Strawberry API (`ModelDeployment.autoScalingRules` nested connection) for `>=26.4.0` backends - Display conditions using `minThreshold`/`maxThreshold` with normalized `<` direction: - `maxThreshold` only: `[metric_name] < [maxThreshold]` - `minThreshold` only: `[minThreshold] < [metric_name]` - Both set: `[minThreshold] < [metric_name] < [maxThreshold]` - Show Prometheus preset name for `PROMETHEUS` metric source rules by matching `prometheusQueryPresetId` (raw UUID) with `toLocalId(presetGlobalId)` - Wire up `deleteAutoScalingRule` Strawberry mutation - Update `EndpointDetailPage.tsx` to render the new list when `isSupportPrometheusAutoScalingRule` is true - Add i18n keys: `TimeWindow`, `PrometheusPreset` ## Changed files - `react/src/components/AutoScalingRuleList.tsx` (new) - `react/src/pages/EndpointDetailPage.tsx` (conditional rendering for Strawberry path) - `resources/i18n/en.json` (new i18n keys) ## Verification ``` === ALL PASS === ```
graphite-app Bot
pushed a commit
that referenced
this pull request
Apr 16, 2026
…range mode and Prometheus preset (#6641) Resolves #6485 (FR-2494) > [!NOTE] > Translation is handled in #6642 ## Summary - Add `AutoScalingRuleEditorModal.tsx` (Strawberry API, >=26.4.0) with: - Segmented single/range condition mode toggle - Single mode: direction selector (Upper sets `maxThreshold`, Lower sets `minThreshold`) - Range mode: both `minThreshold` + `maxThreshold` with validation (min >= max shows error) - Metric source dropdown with KERNEL, INFERENCE_FRAMEWORK, PROMETHEUS options - Prometheus preset selection: auto-fills `metricName`, shows `queryTemplate` read-only, auto-applies `timeWindow` - `prometheusQueryPresetId` stored as raw UUID via `toLocalId(globalId)` - Strawberry `createAutoScalingRule` / `updateAutoScalingRule` mutations - Wire `AutoScalingRuleEditorModal` into `AutoScalingRuleList.tsx` (create + edit flows) - Add i18n keys for new UI elements (Single, Range, Upper, Lower, QueryTemplate, validation messages, etc.) ## Verification ``` === Relay: PASS === === Lint: PASS === === Format: PASS === === TypeScript: PASS === === ALL PASS === ```
7e058a6 to
15d6897
Compare
137a879 to
0a1624c
Compare
Base automatically changed from
04-13-feat_fr-2494_add_strawberry_autoscalingruleeditormodal_with_single_range_mode_and_prometheus_preset
to
main
April 16, 2026 06:52
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.

Resolves #6642 (FR-2494)
Blocked by lablup/backend.ai#11036
Note
Test Node: /serving/e21d2f21-028a-405b-b196-69736b7343b0 with 10.122.10.215
Summary
prometheusQueryPresetResultAPIChanges
react/src/components/AutoScalingRuleEditorModal.tsx: AddedPrometheusPresetPreviewcomponent usinguseLazyLoadQuerywithfetchKeyfor manual refresh supportresources/i18n/en.json: Added i18n keys for preview UI (CurrentValue,MultipleSeriesResult,NoDataAvailable,RefreshPreview)