-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upcoming: [DI-18419] - API error handling for global filters and dashboard component in ACLP #11170
upcoming: [DI-18419] - API error handling for global filters and dashboard component in ACLP #11170
Conversation
This should be ready for review from the team ✅ |
@@ -105,12 +107,20 @@ export const CloudPulseDashboard = (props: DashboardProperties) => { | |||
Boolean(resourceList) | |||
); | |||
|
|||
if (isDashboardApiError) { | |||
return renderErrorState('Failed to fetch the dashboard details'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this and other errors: it's convention to end error messages with a period.
<ErrorState errorText="Failed to get jwe token" /> | ||
</Grid> | ||
); | ||
return renderErrorState('Failed to get jwe token'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should "jwe" be capitalized? Also, since this is a user-facing message, maybe we should remove "jwe" altogether?
return renderErrorState('Failed to get jwe token'); | |
return renderErrorState('Failed to get token.'); |
} | ||
|
||
if (dashboardsError.length > 0) { | ||
return `Unable to load ${dashboardsError.slice(0, -1)}`; | ||
return `Failed to fetch the dashboards`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use regular single quotes here instead of backticks since there's no string interpolation now.
Coverage Report: ✅ |
@dwiley-akamai / @hkhalil-akamai , addressed the comments and added error messages as per suggestion from tech writer, please check once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for consulting a writer. Included a few possible improvements.
@@ -16,7 +16,7 @@ export const CloudPulseDashboardRenderer = React.memo( | |||
const { dashboard, filterValue, timeDuration } = props; | |||
|
|||
const selectDashboardAndFilterMessage = | |||
'Select Dashboard and filters to visualize metrics.'; | |||
'Select dashboard and filters to visualize metrics.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we consult the tech writer about this suggestion?
'Select dashboard and filters to visualize metrics.'; | |
'Select a dashboard and filters to visualize metrics.'; |
@@ -129,7 +127,7 @@ export const RenderWidgets = React.memo( | |||
!Boolean(resourceList?.length) | |||
) { | |||
return renderPlaceHolder( | |||
'Select Dashboard, Region and Resource to visualize metrics' | |||
'Select dashboard and filters to visualize metrics.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above -- could this be more appropriate? I am not sure.
'Select dashboard and filters to visualize metrics.' | |
'Select a dashboard and filters to visualize metrics.' |
Cloud Manager E2E Run #6770
Run Properties:
|
Project |
Cloud Manager E2E
|
Branch Review |
develop
|
Run status |
Passed #6770
|
Run duration | 26m 43s |
Commit |
898d3bf784: upcoming: [DI-18419] - API error handling for global filters and dashboard compo...
|
Committer | venkatmano-akamai |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
2
|
Pending |
2
|
Skipped |
0
|
Passing |
445
|
View all changes introduced in this branch ↗︎ |
Description 📝
Added code for handling API errors in global filters and dashboard component
Changes 🔄
Target release date 🗓️
11-11-2024
Preview 📷
How to test 🧪
(monitor/services, monitor/services/:serviceType/dashboards, /regions, linode/instances in case of linode dashboard, databases/instances incase of dbaas dashboard) instead of returning a valid response, you can return HttpResponse.error() and see the error messages one by one.
As an Author I have considered 🤔
Check all that apply