Skip to content

Commit

Permalink
PMM-12547 non-clustered services view fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BupycHuk authored Sep 28, 2023
1 parent 4a59c23 commit b98a915
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/app/percona/inventory/Tabs/Services/Clusters.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { FlattenService } from '../../Inventory.types';
import { ServicesCluster } from './Clusters.type';

export const getClustersFromServices = (services: FlattenService[]): ServicesCluster[] => {
const clusterNames = [...new Set(services.map((s) => s.cluster || s.serviceName))];
const clusterNames = [...new Set(services.map((s) => s.cluster || ''))];
return clusterNames.map<ServicesCluster>((clusterName) => {
const clusterServices = services.filter((s) => s.cluster === clusterName);

return {
name: clusterName,
name: clusterName || 'Non-clustered services',
type: clusterServices[0]?.type as Databases,
services: clusterServices,
};
Expand Down

0 comments on commit b98a915

Please sign in to comment.