Store workspace id in hash - #5
Open
SuZhou-Joe wants to merge 28 commits into
Open
Conversation
The core workspace module(WorkspaceService) is a foundational component that enables the implementation of workspace features within OSD plugins. The purpose of the core workspace module is to provide a framework for workspace implementations. This module does not implement specific workspace functionality but provides the essential infrastructure for plugins to extend and customize workspace features, it maintains a shared workspace state(observables) across the entire application to ensure a consistent and up-to-date view of workspace-related information to all parts of the application. --------- Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Co-authored-by: Miki <amoo_miki@yahoo.com> Signed-off-by: Yulong Ruan <ruanyu1@gmail.com> Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
* Discover: Fixes state persistence after nav * Fixed breadcrumbs and navigation * fixes mobile view --------- Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5 +/- ##
==========================================
+ Coverage 66.78% 66.79% +0.01%
==========================================
Files 3284 3286 +2
Lines 63092 63126 +34
Branches 10048 10052 +4
==========================================
+ Hits 42134 42164 +30
- Misses 18486 18488 +2
- Partials 2472 2474 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
SuZhou-Joe
pushed a commit
that referenced
this pull request
Jun 11, 2026
…ch-project#12168) * feat: Add Create alert rule button to Metrics page Adds a 'Create alert rule' entry point at the top of the Metrics page that opens a flyout pre-populated with all current PromQL queries. Each query becomes a separate Cortex alerting rule with configurable threshold, operator, and for-duration. - Add CreateMetricsRuleFlyout component - Add button to metrics_page_tabs toolbar (visible in both Explore/Query tabs) - Read queries from QueryStringManager (no Update click required) - Support multi-query rule group creation via POST /api/alerting/prometheus/{dsId}/rules Signed-off-by: Riya Saxena <riysaxen@amazon.com> * fix: Fix deriveRuleName for wrapped PromQL and test timer handling - deriveRuleName now extracts inner metric name from function wrappers (e.g., rate(http_requests_total[5m]) -> http_requests_total) - Tests use fake timers to handle async save/poll/close flow - Add http.get mock for polling logic Signed-off-by: Riyaz Saxena <riysaxen@amazon.com> * test: Add dedicated unit tests for deriveRuleName regex patterns - Export deriveRuleName for direct testing - Add parameterized tests covering: function-wrapped metrics, simple metric names, label selectors, nested functions, and fallback Signed-off-by: Riyaz Saxena <riysaxen@amazon.com> * fix: Read selected metric from Explore tab for alert rule creation When on the Explore tab, parsedQueries now falls back to reading metricsExploreState.metric from Redux state, so the Create alert rule flyout pre-populates with the selected metric name instead of showing 'No queries to create rules from'. Signed-off-by: Riyaz Saxena <riysaxen@amazon.com> * test: Add Explore tab integration tests for flyout - Verify single metric from Explore tab renders one rule card - Verify plain metric name derives correct rule name Signed-off-by: Riyaz Saxena <riysaxen@amazon.com> * fix: Simplify flyout save states - show 'Creating in Prometheus...' throughout - Remove separate 'Confirming rule creation...' state from button - Show 'Creating in Prometheus...' for the entire save duration - Toast now says 'N alert rule(s) created successfully' (matches Rules tab UX) Signed-off-by: Riyaz Saxena <riysaxen@amazon.com> * fix: Pass addToast to flyout so success/error toasts are shown Wire services.notifications.toasts to the CreateMetricsRuleFlyout addToast prop so users see 'N alert rule(s) created successfully' toast on save, matching the Rules tab UX. Signed-off-by: Riyaz Saxena <riysaxen@amazon.com> * fix: Remove 90s polling from Metrics page flyout — close immediately on success Match the optimistic pattern from the Rules tab: POST rules, show success toast, close flyout immediately. Removed 'confirming' state, http.get prop (no longer needed for polling), and the 18x5s polling loop. Signed-off-by: Riyaz Saxena <riysaxen@amazon.com> * fix: Address lezzago + joshuali925 review comments - Deduplicate rule names to prevent Cortex group overwrites (lezzago) - Prevent flyout close during active save (lezzago) - Fix threshold input to allow decimals/negatives (joshuali925 #3) - Use splitMultiQueries helper instead of hand-rolled splitter (joshuali925 #2) - Remove 'as any' cast on http prop (joshuali925 #5) Signed-off-by: Riyaz Saxena <riysaxen@amazon.com> --------- Signed-off-by: Riya Saxena <riysaxen@amazon.com> Signed-off-by: Riyaz Saxena <riysaxen@amazon.com>
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.
Description
Issues Resolved
Screenshot
Testing the changes
Check List
yarn test:jestyarn test:jest_integration