mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 01:27:41 +00:00
misc: updated ui to show cluster name instead of just ID
This commit is contained in:
@@ -11,6 +11,7 @@ export type TCamundaSync = TRootSecretSync & {
|
|||||||
destinationConfig: {
|
destinationConfig: {
|
||||||
scope: string;
|
scope: string;
|
||||||
clusterUUID: string;
|
clusterUUID: string;
|
||||||
|
clusterName?: string;
|
||||||
};
|
};
|
||||||
connection: {
|
connection: {
|
||||||
app: AppConnection.Camunda;
|
app: AppConnection.Camunda;
|
||||||
|
|||||||
+12
-1
@@ -1,3 +1,4 @@
|
|||||||
|
import { useCamundaConnectionListClusters } from "@app/hooks/api/appConnections/camunda";
|
||||||
import { TCamundaSync } from "@app/hooks/api/secretSyncs/types/camunda-sync";
|
import { TCamundaSync } from "@app/hooks/api/secretSyncs/types/camunda-sync";
|
||||||
|
|
||||||
import { getSecretSyncDestinationColValues } from "../helpers";
|
import { getSecretSyncDestinationColValues } from "../helpers";
|
||||||
@@ -8,7 +9,17 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const CamundaDestinationSyncCol = ({ secretSync }: Props) => {
|
export const CamundaDestinationSyncCol = ({ secretSync }: Props) => {
|
||||||
const { primaryText, secondaryText } = getSecretSyncDestinationColValues(secretSync);
|
const { data: clusters } = useCamundaConnectionListClusters(secretSync.connectionId);
|
||||||
|
|
||||||
|
const { primaryText, secondaryText } = getSecretSyncDestinationColValues({
|
||||||
|
...secretSync,
|
||||||
|
destinationConfig: {
|
||||||
|
...secretSync.destinationConfig,
|
||||||
|
clusterName: clusters?.find(
|
||||||
|
(cluster) => cluster.uuid === secretSync.destinationConfig.clusterUUID
|
||||||
|
)?.name
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return <SecretSyncTableCell primaryText={primaryText} secondaryText={secondaryText} />;
|
return <SecretSyncTableCell primaryText={primaryText} secondaryText={secondaryText} />;
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ export const getSecretSyncDestinationColValues = (secretSync: TSecretSync) => {
|
|||||||
secondaryText = `Organization - ${destinationConfig.org}`;
|
secondaryText = `Organization - ${destinationConfig.org}`;
|
||||||
break;
|
break;
|
||||||
case SecretSync.Camunda:
|
case SecretSync.Camunda:
|
||||||
primaryText = destinationConfig.clusterUUID;
|
primaryText = destinationConfig.clusterName ?? destinationConfig.clusterUUID;
|
||||||
secondaryText = "Cluster";
|
secondaryText = "Cluster";
|
||||||
break;
|
break;
|
||||||
case SecretSync.Vercel:
|
case SecretSync.Vercel:
|
||||||
|
|||||||
+4
-1
@@ -1,4 +1,5 @@
|
|||||||
import { GenericFieldLabel } from "@app/components/secret-syncs";
|
import { GenericFieldLabel } from "@app/components/secret-syncs";
|
||||||
|
import { useCamundaConnectionListClusters } from "@app/hooks/api/appConnections/camunda";
|
||||||
import { TCamundaSync } from "@app/hooks/api/secretSyncs/types/camunda-sync";
|
import { TCamundaSync } from "@app/hooks/api/secretSyncs/types/camunda-sync";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -6,9 +7,11 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const CamundaSyncDestinationSection = ({ secretSync }: Props) => {
|
export const CamundaSyncDestinationSection = ({ secretSync }: Props) => {
|
||||||
|
const { data: clusters } = useCamundaConnectionListClusters(secretSync.connectionId);
|
||||||
const {
|
const {
|
||||||
destinationConfig: { clusterUUID }
|
destinationConfig: { clusterUUID }
|
||||||
} = secretSync;
|
} = secretSync;
|
||||||
|
|
||||||
return <GenericFieldLabel label="Cluster UUID">{clusterUUID}</GenericFieldLabel>;
|
const clusterName = clusters?.find((cluster) => cluster.uuid === clusterUUID)?.name;
|
||||||
|
return <GenericFieldLabel label="Cluster">{clusterName ?? clusterUUID}</GenericFieldLabel>;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user