Skip to content

feat(FR-2451): add Prometheus Query Preset edit modal with live preview#7094

Open
agatha197 wants to merge 1 commit into04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmationfrom
04-27-feat_fr-2451_add_prometheus_query_preset_edit_modal_with_live_preview
Open

feat(FR-2451): add Prometheus Query Preset edit modal with live preview#7094
agatha197 wants to merge 1 commit into04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmationfrom
04-27-feat_fr-2451_add_prometheus_query_preset_edit_modal_with_live_preview

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 27, 2026

Resolves #6357 (FR-2451)

Stacked on top of #7086

Summary

  • Extracted PrometheusPresetPreview from AutoScalingRuleEditorModal.tsx into a new shared PrometheusPresetPreview.tsx module. This is a pure move — zero behavior change in AutoScalingRuleEditorModal. The Relay query (PrometheusPresetPreviewResultQuery) now lives in the new file.
  • Edit mutation wired in PrometheusQueryPresetEditorModal: calls adminModifyPrometheusQueryPreset with a diff-only input (only changed fields are sent; label arrays correctly distinguish "user cleared to []" from "unchanged/omitted").
  • Live preview rendered in edit mode under the QueryTemplate field using <PrometheusPresetPreview presetGlobalId={preset.id} />. Preview is edit-only (no ID available in create mode).
  • Edit button (EditOutlined) added to the left of the Delete button in the PrometheusQueryPresetList action column.
  • AutoScalingRulePresetTab wires editingPreset state and passes the fragment ref into <PrometheusQueryPresetEditorModal presetFrgmt={editingPreset} />.
  • i18n: added prometheusQueryPreset.SuccessfullyUpdated to en.json.

Verification

=== Relay ===
--- Relay: PASS ---

=== Lint ===
--- Lint: PASS ---

=== Format ===
--- Format: PASS ---

=== TypeScript ===
--- TypeScript: PASS ---

=== ALL PASS ===

Copy link
Copy Markdown
Contributor Author

agatha197 commented Apr 27, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

Coverage report for ./packages/backend.ai-ui

St.
Category Percentage Covered / Total
🟢 Statements 81.87% 429/524
🟡 Branches 70.43% 362/514
🟡 Functions 76.86% 93/121
🟢 Lines 83.19% 391/470

Test suite run success

319 tests passing in 13 suites.

Report generated by 🧪jest coverage report action from 1e12616

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
8.97% (-0.01% 🔻)
1859/20733
🔴 Branches
8.12% (-0.02% 🔻)
1187/14625
🔴 Functions
5.29% (+0.02% 🔼)
297/5617
🔴 Lines
8.7% (-0.01% 🔻)
1750/20114
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / PrometheusPresetPreview.tsx
0% 0% 0% 0%

Test suite run success

865 tests passing in 40 suites.

Report generated by 🧪jest coverage report action from 1e12616

@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation branch from 8973048 to 274f8d7 Compare April 28, 2026 06:06
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_edit_modal_with_live_preview branch from d5b7705 to 747c4a3 Compare April 28, 2026 06:06
@agatha197 agatha197 changed the base branch from 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation to graphite-base/7094 April 28, 2026 06:18
Comment thread react/src/components/AutoScalingRulePresetTab.tsx Outdated
Comment thread resources/i18n/en.json
Comment thread react/src/components/PrometheusQueryPresetNodes.tsx
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_edit_modal_with_live_preview branch from 747c4a3 to f93b2b9 Compare April 28, 2026 07:13
@agatha197 agatha197 force-pushed the graphite-base/7094 branch from 274f8d7 to ad7bcd7 Compare April 28, 2026 07:13
@agatha197 agatha197 changed the base branch from graphite-base/7094 to 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation April 28, 2026 07:13
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation branch from ad7bcd7 to d27efb4 Compare April 28, 2026 07:14
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_edit_modal_with_live_preview branch 2 times, most recently from 9049625 to 16f01ea Compare April 28, 2026 07:51
@agatha197 agatha197 requested a review from nowgnuesLee April 28, 2026 07:52
Comment thread react/src/components/PrometheusPresetPreview.tsx Outdated
Comment thread react/src/components/PrometheusPresetPreview.tsx Outdated
Comment thread react/src/components/PrometheusPresetPreview.tsx Outdated
Comment thread react/src/components/PrometheusQueryPresetEditorModal.tsx Outdated
Comment thread react/src/components/PrometheusQueryPresetEditorModal.tsx Outdated
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation branch from d27efb4 to 6a520df Compare April 28, 2026 11:38
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_edit_modal_with_live_preview branch 2 times, most recently from 1ab0fc6 to 76ca308 Compare April 28, 2026 12:21
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_delete_confirmation branch 2 times, most recently from 44475aa to f6aee58 Compare April 28, 2026 12:26
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_edit_modal_with_live_preview branch from 76ca308 to 4a72130 Compare April 28, 2026 12:26
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2451_add_prometheus_query_preset_edit_modal_with_live_preview branch from 4a72130 to 1e12616 Compare April 28, 2026 12:37
@agatha197 agatha197 requested a review from nowgnuesLee April 30, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:ux UI / UX issue. size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants