Skip to content

Commit

Permalink
upcoming: [DI-21520] - Added default xFilter for fetching aiven clust…
Browse files Browse the repository at this point in the history
…ers for dbass and fixed label fallback for service-type label (#11150)

* Merge pull request #39 from ACLPManager/feature/dbass_aiven_fetch_aclp

upcoming: [DI-21520] - Added default xFilter for fetching aiven clusters for dbass

* Added changeset: Add default xfilter for DBasS aiven clusters fetch in resource selection component

* upcoming: [DI-21520] - Add platform filter for jwe token fetch for aiven clusters in DBasS

* upcoming: [DI-21520] - PR Comments

* upcoming: [DI-21520] - PR Comments

* upcoming: [DI-21520] - PR Comments

---------

Co-authored-by: venkatmano-akamai <chk-Venkatesh@outlook.com>
  • Loading branch information
ankita-akamai and venkymano-akamai authored Oct 25, 2024
1 parent 52052ce commit 688f35f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
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,
}
);

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

0 comments on commit 688f35f

Please sign in to comment.