fix: [DI-29314] - Wrong time range sent in metrics payload on preference reload in CloudPulse metrics#13287
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where the CloudPulse metrics dashboard was sending an incorrect time range (Last 1 hour instead of the selected preset like Last 30 days) in the metrics payload when the page was reloaded.
Changes:
- Added a check to wait for dashboard list loading to complete before applying preferences
- Modified dashboard change handler to conditionally reset filters and time duration based on whether the selected dashboard matches the preference
- Updated function signatures to support the new conditional reset behavior
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| CloudPulseDashboardSelect.tsx | Added loading check to prevent premature preference application |
| GlobalFilters.tsx | Modified to pass flag indicating whether to reset filters based on dashboard preference match |
| CloudPulseDashboardLanding.tsx | Added conditional logic to skip resetting filters and time duration when dashboard matches preferences |
| pr-13287-fixed-1768562046475.md | Added changeset documenting the bug fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/manager/src/features/CloudPulse/Dashboard/CloudPulseDashboardLanding.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/CloudPulse/Overview/GlobalFilters.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Cloud Manager UI test results🔺 1 failing test on test run #7 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/linodes/clone-linode.spec.ts" |
|||||||||||||||||
|
Merging since it has approvals, small PR, cypress pass, failed one in unrelated and all checks passed |
* upcoming: [DI-29113] - Support for User Channel Details in Alert flows (#13246) * upcoming: [DI-29113] - Support for User Channel Details in Alert flows * add changeset * add support for new alerts object in Notification Channel * changesets --------- Co-authored-by: Ankita <ankitaan@akamai.com> * Revert "upcoming: [DI-29113] - Support for User Channel Details in Alert flow…" (#13252) This reverts commit e77c677. * change: [UIE-9919] - Address post-demo feedback for Network Load Balancers (#13250) * change: [UIE-9919] - Address post-demo feedback(points 1-3) * Added changeset: NLB post-demo feedback-fix empty state title casing,rename LKE-E to Cluster and adjust column visibility for smaller screens to prioritize IPv6 * change: [UIE-9919] - Address post-demo feedback(points 4,5) (#13251) * change: [UIE-9919] - Address post-demo feedback(points 4,5) * Added changeset: NLB post-demo feedback-Resolve special character filtering issue in Nodes table IPv6 column and add NLB to GoTo quick navigation * chore: [UIE-9913] - IAM: Cleanup `iamRbacPrimaryNavChanges` feature flag (#13232) * Save progress * wrap up initial cleanup * fix tests * fix tests * Added changeset: IAM: Cleanup `iamRbacPrimaryNavChanges` feature flag * feedback @bnussman-akamai * small work break fix * fix: [UIE-9841] - Hide dual stack option if no IPv6 prefixes available in create VPC flow (#13245) * change: [UIE-9908] - Update Generational Plans default sort to show newest (G8) -> oldest (G6) (#13234) * Update GP default sort to show newest (G8) -> oldest (G6) * Minor comment updates * Added changeset: Update Generational Plans default sort to show newest (G8) -> oldest (G6) * Make generation plan ranking more scalable * Update some e2e tests * Update more e2e test cases * Update e2e tests from stackscripts and marketplace * change: [UIE-9890] - changes related to private IP field in create linode flow (#13253) * change: [UIE-9919] - Address post-demo feedback(points 6,7) (#13258) * change: [UIE-9919] - Address post-demo feedback(points 6,7) * Added changeset: NLB post-demo feedback-Optimize table col widths and add back button * Address review comments. * Update packages/manager/.changeset/pr-13258-changed-1767876909544.md Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> --------- Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> * change: [UIE-9920] - Billing: Disable "Make payment" button for Akamai users (#13243) * disable make payment button for akamai users * Added changeset: Billing: Disable 'Make payment'button for Akamai users * remove dupe changeset * upcoming: [M3-9225] - Add API queries for MarketplaceV2 (#13255) * upcoming: [M3-9225] - Add API queries for MarketplaceV2 * Added changeset: Add API queries for MarketplaceV2 * PR feedback * fixed api url and factories * added queries for /marketplace/types * PR feedback @pmakode-akamai * fix: [UIE-9933], [UIE-9935] - IAM: UX copy updates, breadcrumbs fix (#13259) * fix: [UIE-9933], [UIE-9935] - IAM: UX copy updates, breadcrumbs fix * Added changeset: IAM Delegation: UX copy update, wrong breadcrumb fix * change: [UIE-9860] - Change the default selection of network interface type to linode interface in Linode create flow (#13221) * chore: [UIE-9926] - Bump `jspdf` to 4.0.0 (#13248) * bump jspdf to 4.0.0 * types and test * oops buffer * Added changeset: Bump jspdf to 4.0.0 * try CI without global * feat: [UIE-9931] - IAM: fix payload for updateChildAccountDelegates (#13260) * feat: [UIE-9931] - IAM: fix payload for updateChildAccountDelegates * update updateChildAccountDelegates * changesets * upcoming: [UIE-9817] - Add Breadcrumb to Marketplace Product Landing Page (#13257) * Add breadcrumb * Add beta chip to Partner Referral breadcrumb * Added changeset: Add Breadcrumb to Marketplace product landing page * Keep label plural * upcoming: [UIE-9826] - Add reusable Product Selection Card component for Marketplace (#13247) * Add Marketplace ProductCard component * More changes * Some clean up * Add tests and some changes * Added changeset: Add reusable Product Selection Card component for Marketplace * Update Marketplace feature folder structure * Add color tokens for badge as per ux mocks * Clean up logo styles * Remove usage of fontWeight * Refactor: simplify component props * Update description truncation from 268 to 200 characters * Make some of the props required and update tests * More refactoring and cleanup * Add logo URL to tests base data * fix: [UIE-9952] - IAM - Fix hydration error on User Detail pages (#13265) * fix console error * Added changeset: IAM hydration error on User Detail pages * change: [UIE-9942] - IAM - Replace `view_account` with fine-grained permissions (#13262) * save progress * remaining instances * cleanup and tests * test: [UIE-9996] - Fix `chooseRegion` mock region test failures when passing override region (#13277) * Fix issue when checking override region capabilities when test depends on mock regions * Added changeset: Fix issue in 'chooseRegion' util when specifying an override region * upcoming: [DI-29059] - Add delete action for user alert channels (#13256) * upcoming: [DI-29059] - Add delete action, related handlers, tests * upcoming: [DI-29059] - Fix tc * upcoming: [DI-29059] - Update type * upcoming: [DI-29059] - Update the statements according to latest figma * upcoming: [DI-29059] - Add changesets * upcoming: [DI-29059] - Address suggestions for delete state * upcoming: [DI-29059] - Update as per dev --------- Co-authored-by: santoshp210-akamai <159890961+santoshp210-akamai@users.noreply.github.com> * change: [UIE-9861] - Handle Incompatibility of linode interfaces in create LKE flow (#13272) * change: [UIE-9859] - Improvements in Add Network interface drawer (#13264) * feat: [UIE-9934] - IAM: reset to prev page when removing last role (#13268) * feat: [UIE-9934] - IAM: reset to prev page when removing last role * Added changeset: IAM: removing entity/role can cause an empty page * upcoming: [UIE-9327] - Add service URIs to Database summary tab (#13261) ## Description 📝 - Display general Service URI for all databases under Connection details in the summary tab - If applicable, display PgBouncer connection details Service URI for postgres clusters with at least one connection pool ## How to test 🧪 ### Prerequisites (How to setup test environment) - Ensure the Database PgBouncer feature flag is enabled and turn on the legacy MSW ### Verification steps (How to verify changes) - [ ] Go to a mysql Database cluster's summary page and confirm that a general mysql service URI displays under Connection Details. There should not be a PgBouncer section. - [ ] Go to a postgres Database cluster's summary page and confirm that a general postgres service URI displays under Connection Details. There should be a PgBouncer section * test: fix previous month calculation tests for year boundaries (#13240) * test: fix previous month calculation tests for year boundaries * Fix[DI-29231] failure specification * Fix[DI-29231] failure specification * Update packages/manager/.changeset/pr-13240-tests-1767941254923.md Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> * fix previous month calculation tests for year boundaries * fix previous month calculation tests for year boundaries * Merge branch 'develop' into time-range-spec-fix_linode_January_03 * Add back scrollbar logic after earlier removal * Add back scrollbar logic after earlier removal * add Cypress spec for custom date/time picker with range and timezone * add Cypress spec for custom date/time picker with range and timezone * add Cypress spec for custom date/time picker with range and timezone * add Cypress spec for custom date/time picker with range and timezone --------- Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> * change: [UIE-9945] - Implement UX and user feedback for linode interfaces feature in Account settings page (#13280) * fix: [UIE-9943], [UIE-9944], [UIE-9950], [UIE-9951], [UIE-9954] - IAM: UI fix for Parent/Child (#13275) * fix: [UIE-9943], [UIE-9944], [UIE-9951], [UIE-9954] - Parent/Child UI fix * fix: [UIE-9950] - Parent/Child dialog fix * e2e fix * changeset * fix: [UIE-10011] - IAM Parent/Child selected roles drawer fix (#13282) * fix: [UIE-10011] - Parent/Child selected roles drawer fix * Added changeset: IAM Delegation: User selector not working in Assign Role/Roles drawer * fix: [UIE-10017] - Account Delegations text fix * chore: [UIE-9953] - IAM - Clean up beta flag + BETA/LA logic (#13266) * clean up beta flag + beta/la logic * more tests * oops skip * Added changeset: IAM - Clean up beta flag + BETA/LA logic * fix: [UIE-9987] - IAM Parent/Child - Various fixes to Parent Account Flow (#13278) * Enhanced SwitchAccount drawer * tests * e2e failur * Added changeset: IAM Parent/Child - Various fixes to Parent Account Flow * upcoming: [UIE-9814] - Implement the main product grid with category grouping and load more functionality (#13267) * upcoming: [UIE-9814] - Implement the main product grid with category grouping and load more functionality * loading skeleton + small fixes * PR feedback * Add card UI changes: background color, logo, grid sizing, and mock logo icon * changed the fitler logic * spacing changes.. * Add defensive check for type chip rendering * styling fixes * ....missed this * Added changeset: Implement the main product grid with category grouping * added unit tests * fixed card height and boxshadow on hover * ...missed fontsize fix for the card chip * Clean up card styles and reduce duplication * Some changes * minor fix Co-authored-by: Purvesh Makode <pmakode@akamai.com> * breadcrumb fix * add check for marketplaceV2 --------- Co-authored-by: pmakode-akamai <pmakode@akamai.com> * fix: [UIE-10043] - Copy in Plans Panel generational plans tooltip (#13289) * fix typo * Added changeset: Copy in Plans Panel generational plans tooltip * casing * upcoming: [DI-29061] - Notification Channel Show Details - Overview, Settings (#13273) * feat: [UIE-9988] - IAM Delegation: fix payload for changing role flow (#13279) * feat: [UIE-9988] - IAM Delegation: fix payload for changing role flow * Added changeset: IAM Delegation: fix payload for changing role flow * chore: [UIE-9949] - Update to linode/design-language-system to v5.3.2 (#13293) * chore: [UIE-9949] - Update to linode/design-language-system to v5.3.2 * Added changeset: Update design-language-system to v5.3.2 * feat [OCA-1602] - Add Mistral 7B Instruct with Open WebUI and Chroma Marketplace Apps (#13270) * feat: add chromadb and mistral-7b instruct with open webui * changelog * add AI category * mistral color correct * Added changeset: Add Mistral 7B instruct and ChromaDB to the Marketplace * fix: [DI-29314] - Wrong time range sent in metrics payload on preference reload in CloudPulse metrics (#13287) * [DI-29167] - Time range preferences bug fix * Update dependencies in GlobalFilters component * fix: [DI-29314] - changeset and code refactoring * fix: [DI-29314] - code refactoring * upcoming: [DI-29061] - Notification Channel Show Details - Associated Alerts (#13294) * upcoming: [DI-29061] - Notification Channel Show Details - Associated Alerts * fix linting issue * service label sorting * add changesets * update changeset * fix: [DI-29215] - sort service type column on label (#13295) * fix: [DI-29215] - sort service type column on label * add changeset * fix: [UIE-10041] - IAM routing cleanup (#13288) * routing tighhtening * Added changeset: IAM routing cleanup * change: STORIF-165 - Updated content usage status format. (#13296) * fix: [DI-29215] - End character validation for specific characters (#13297) * fix: [DI-29215] - End character validation for specific characters * add changesets * upcoming: [DI-29177] - Exclude account/region alerts in api payload while updating alerts for a linode and fix state reset issue on save (#13301) * upcoming: [DI-29177] - Remove account/region alerts from update linode payload * upcoming: [DI-29177] - Add tc * upcoming: [DI-29177] - Update tc * upcoming: [DI-29177] - Update payload for create flow * Revert "upcoming: [DI-29177] - Update payload for create flow" This reverts commit 122d252. * upcoming: [DI-29177] - Initial payload for account and region alerts isnt required * upcoming: [DI-29177] - Remove immediate state * upcoming: [DI-29177] - Add changeset * upcoming: [DI-28506] - Filter linode resources based on associated aclp alerts (#13163) * upcoming: [DI-28506] - filter linode resources based on alerts * upcoming: [DI-28506] - Update comment * upcoming: [DI-28506] - move utils from shared to alerting specific file * upcoming: [DI-28506] - Update mock * upcoming: [DI-28506] - Add changeset * upcoming: [DI-28506] - add copilot suggestion * refine selector (#13091) Co-authored-by: Banks Nussman <115251059+bnussman-akamai@users.noreply.github.com> * upcoming: [UIE-9781] - Add CRUD MSW mocks for Locks(Linodes is in scope). (#13286) * upcoming: [UIE-9781] - Add CRUD MSW mocks for Resource Locking feature(RESPROT2) * Added changeset: Add MSW crud for Resource Locking feature(RESPROT2) * Refactored the types to re-use Entity and entityFactory. * Address review comments by Ganesh * Added changeset: Added locks property to Linode interface,added lock create and delete event keys, refactored Lock types * fix: [UIE-10016] - Show notice in add interface drawer when adding Public Internet interface to Linode with VPC (#13302) * change: [DPS-35018] - Logs: Add new status - Provisioning (#13284) * change: [DPS-35018] - Logs: Add new status - Provisioning * Added changeset: Logs Stream - Provisioning status * change: [DPS-36291] - Text changes after tech writing review (#13291) * change: [DPS-36291] - Text changes after tech writing review * Added changeset: Logs texts updates after tech writing review * change: [UIE-10012] - Implement UX and user feedback for linode interfaces feature in Create linode page (#13281) * change: [UIE-10012] - Implement UX and user feedback for linode interfaces feature in Create linode page * Added changeset: Apply UX and user feedback for linode interfaces feature in Account settings page * fix: UIE-9998 - Reset Private IP value on switching between linode interface and config profile interface in Create linode form * Update spacings within VPC panel in create linode panel * Auto assign VPC IPv6 similar to VPC IPv4 by default in VPC panel * Add divider below VLAN section in networking panel * feat: [UIE-10051] - IAM Delegation: allow sending an empty array (#13300) * feat: [UIE-10051] - IAM Delegation: allow sending an empty array * Added changeset: IAM DElegation: remove restriction to update user delegation with empty array, update the delegations after reopening a drawer * small drawer refactor --------- Co-authored-by: Alban Bailly <abailly@akamai.com> * feat: [UIE-10006] - IAM Delegation: reset to prev page when changing role (#13285) * feat: [UIE-10006] - IAM Delegation: reset to prev page when changing role * Added changeset: IAM: changing entity/role can cause an empty page * Cloud version 1.158.0, API v4 version 0.156.0, Validation version 0.81.0, Queries version 0.20.0 * Update release date * upcoming: [UIE-10042] - Fix error handling in ChildAccountList component (#13299) * Add check to useIsIAMDelegationEnabled * better handling * update relevant tests * Added changeset: Check if IAM Parent/Child is enabled dynamically * remaining test * handle child accounts and delegates * reduce ticket scope * reduce ticket scope * add iamIsEnabled check * tests * new: STORIF-232 - BlockStorageContextualMetrics feature flag added. (#13324) * new: STORIF-231 - ObjectStorageContextualMetrics feature flag added. (#13323) --------- Co-authored-by: santoshp210-akamai <159890961+santoshp210-akamai@users.noreply.github.com> Co-authored-by: Ankita <ankitaan@akamai.com> Co-authored-by: Tanushree Bhattacharji <tbhattac@akamai.com> Co-authored-by: grevanak-akamai <145482092+grevanak-akamai@users.noreply.github.com> Co-authored-by: Purvesh Makode <pmakode@akamai.com> Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com> Co-authored-by: Harsh Shankar Rao <hrao@akamai.com> Co-authored-by: mpolotsk-akamai <157619599+mpolotsk-akamai@users.noreply.github.com> Co-authored-by: aaleksee-akamai <aaleksee@akamai.com> Co-authored-by: Joe D'Amore <jdamore@akamai.com> Co-authored-by: jdamore-linode <97627410+jdamore-linode@users.noreply.github.com> Co-authored-by: Hana Xu <115299789+hana-akamai@users.noreply.github.com> Co-authored-by: agorthi-akamai <agorthi@akamai.com> Co-authored-by: n0vabyte <94801247+n0vabyte@users.noreply.github.com> Co-authored-by: venkatmano-akamai <vmangalr@akamai.com> Co-authored-by: Dmytro Chyrva <dchyrva@akamai.com> Co-authored-by: dmcintyr-akamai <dmcintyr@akamai.com> Co-authored-by: Banks Nussman <115251059+bnussman-akamai@users.noreply.github.com> Co-authored-by: kagora-akamai <kagora@akamai.com>
Description 📝
While reloading the page, after selecting some time range preset like Last 30 days, it is getting correctly applied in the DateTimeRangePicker, but metrics payload Last 1 hour is passed in CloudPulse metrics dashboards page.
The main cause of the issue is while applying the dashboard from preference , on change call resets the time duration to 1 hour.
Changes / Solution 🔄
Scope 🚢
Upon production release, changes in this PR will be visible to:
Target release date 🗓️ Next Release
Preview 📷
How to test 🧪
Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅