-
Notifications
You must be signed in to change notification settings - Fork 399
upcoming: [DI-27569] - Integrate endpoints dashboard for object-storage service in CloudPulse Metrics #13133
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
Changes from all commits
cdcd429
3e786a3
dc2b127
840fdb3
57d178e
df75f01
5ce7b58
c1cea5a
54f1d4f
df534e4
5df232b
74ced22
6149f0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@linode/api-v4": Upcoming Features | ||
| --- | ||
|
|
||
| CloudPulse-Metrics: Update `entity_ids` type in `CloudPulseMetricsRequest` for metrics api in endpoints dahsboard ([#13133](https://github.com/linode/manager/pull/13133)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@linode/manager": Upcoming Features | ||
| --- | ||
|
|
||
| CloudPulse-Metrics: Update `FilterConfig.ts` to handle integration of endpoints dashboard for object-storage service in metrics page([#13133](https://github.com/linode/manager/pull/13133)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| import { defaultTimeDuration } from './CloudPulseDateTimePickerUtils'; | ||
| import { FILTER_CONFIG } from './FilterConfig'; | ||
| import { ENDPOINT } from './constants'; | ||
| import { FILTER_CONFIG, isEndpointsOnlyDashboard } from './FilterConfig'; | ||
| import { CloudPulseAvailableViews } from './models'; | ||
|
|
||
| import type { DashboardProperties } from '../Dashboard/CloudPulseDashboard'; | ||
|
|
@@ -55,7 +56,9 @@ export const getDashboardProperties = ( | |
| }), | ||
| dashboardId: dashboardObj.id, | ||
| duration: timeDuration ?? defaultTimeDuration(), | ||
| resources: [String(resource)], | ||
| resources: isEndpointsOnlyDashboard(dashboardObj.id) | ||
| ? [] | ||
| : [String(resource)], | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No entities in case of endpoints dashboard. |
||
| serviceType: dashboardObj.service_type, | ||
| savePref: false, | ||
| groupBy, | ||
|
|
@@ -148,13 +151,20 @@ export const checkIfFilterNeededInMetricsCall = ( | |
| export const constructDimensionFilters = ( | ||
| props: ReusableDashboardFilterUtilProps | ||
| ): CloudPulseMetricsAdditionalFilters[] => { | ||
| const { dashboardObj, filterValue } = props; | ||
| return Object.keys(filterValue) | ||
| const { dashboardObj, filterValue, resource } = props; | ||
| const filters = Object.keys(filterValue) | ||
| .filter((key) => checkIfFilterNeededInMetricsCall(key, dashboardObj.id)) | ||
| .map((key) => ({ | ||
| filterKey: key, | ||
| filterValue: filterValue[key], | ||
| })); | ||
| if (isEndpointsOnlyDashboard(dashboardObj.id)) { | ||
| filters.push({ | ||
| filterKey: ENDPOINT, | ||
| filterValue: [String(resource)], | ||
| }); | ||
| } | ||
| return filters; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As endpoints filter needs to go as a dimension filter in filters obj as part of /metrics api call, this needs to be handled for contextual view. |
||
| }; | ||
|
|
||
| /** | ||
|
|
||
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.
Moved the filtering logic from component to config level as it will be used at multiple places and is easier to handle. This function collects endpoints from available buckets.