Skip to content
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-21520] - Added default xFilter for fetching aiven clusters for dbass and fixed label fallback for service-type label #11150

Merged
merged 7 commits into from
Oct 25, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Add default xfilter for DBasS aiven clusters fetch in resource selection component ([#11150](https://github.com/linode/manager/pull/11150))
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const CloudPulseDashboard = (props: DashboardProperties) => {
Boolean(dashboard?.service_type),
dashboard?.service_type,
{},
{}
dashboard?.service_type === 'dbaas' ? { platform: 'rdbms-default' } : {}
);

const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ export const CloudPulseDashboardSelect = React.memo(
renderGroup={(params) => (
<Box key={params.key}>
<Typography sx={{ marginLeft: '3.5%' }} variant="h3">
{serviceTypeMap.has(params.group)
? serviceTypeMap.get(params.group)
: params.group}
{serviceTypeMap.get(params.group) || params.group}
</Typography>
{params.children}
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,22 @@ export const CloudPulseResourcesSelect = React.memo(
xFilter,
} = props;

const platformFilter =
resourceType === 'dbaas' ? { platform: 'rdbms-default' } : {};

const { data: resources, isLoading } = useResourcesQuery(
disabled !== undefined ? !disabled : Boolean(region && resourceType),
resourceType,
{},
xFilter ? xFilter : { region }
xFilter
? {
...platformFilter,
...xFilter,
}
: {
...platformFilter,
region,
}
abailly-akamai marked this conversation as resolved.
Show resolved Hide resolved
);

const [selectedResources, setSelectedResources] = React.useState<
Expand Down