feature: databricks sync

This commit is contained in:
Scott Wilson
2025-02-10 18:38:27 -08:00
parent 4e48ab1eeb
commit 4de8888843
105 changed files with 1548 additions and 173 deletions
@@ -0,0 +1,14 @@
import { TDatabricksSync } from "@app/hooks/api/secretSyncs/types/databricks-sync";
import { getSecretSyncDestinationColValues } from "../helpers";
import { SecretSyncTableCell } from "../SecretSyncTableCell";
type Props = {
secretSync: TDatabricksSync;
};
export const DatabricksSyncDestinationCol = ({ secretSync }: Props) => {
const { primaryText } = getSecretSyncDestinationColValues(secretSync);
return <SecretSyncTableCell primaryText={primaryText} secondaryText="Secret Scope" />;
};
@@ -4,6 +4,7 @@ import { AwsParameterStoreSyncDestinationCol } from "./AwsParameterStoreSyncDest
import { AwsSecretsManagerSyncDestinationCol } from "./AwsSecretsManagerSyncDestinationCol";
import { AzureAppConfigurationDestinationSyncCol } from "./AzureAppConfigurationDestinationSyncCol";
import { AzureKeyVaultDestinationSyncCol } from "./AzureKeyVaultDestinationSyncCol";
import { DatabricksSyncDestinationCol } from "./DatabricksSyncDestinationCol";
import { GcpSyncDestinationCol } from "./GcpSyncDestinationCol";
import { GitHubSyncDestinationCol } from "./GitHubSyncDestinationCol";
@@ -25,7 +26,8 @@ export const SecretSyncDestinationCol = ({ secretSync }: Props) => {
return <AzureKeyVaultDestinationSyncCol secretSync={secretSync} />;
case SecretSync.AzureAppConfiguration:
return <AzureAppConfigurationDestinationSyncCol secretSync={secretSync} />;
case SecretSync.Databricks:
return <DatabricksSyncDestinationCol secretSync={secretSync} />;
default:
throw new Error(
`Unhandled Secret Sync Destination Col: ${(secretSync as TSecretSync).destination}`
@@ -56,6 +56,9 @@ export const getSecretSyncDestinationColValues = (secretSync: TSecretSync) => {
secondaryText = `Label - ${destinationConfig.label}`;
}
break;
case SecretSync.Databricks:
primaryText = destinationConfig.scope;
break;
default:
throw new Error(`Unhandled Destination Col Values ${destination}`);
}
@@ -0,0 +1,14 @@
import { SecretSyncLabel } from "@app/components/secret-syncs";
import { TDatabricksSync } from "@app/hooks/api/secretSyncs/types/databricks-sync";
type Props = {
secretSync: TDatabricksSync;
};
export const DatabricksSyncDestinationSection = ({ secretSync }: Props) => {
const {
destinationConfig: { scope }
} = secretSync;
return <SecretSyncLabel label="Secret Scope">{scope}</SecretSyncLabel>;
};
@@ -11,6 +11,7 @@ import { APP_CONNECTION_MAP } from "@app/helpers/appConnections";
import { SecretSync, TSecretSync } from "@app/hooks/api/secretSyncs";
import { AwsParameterStoreSyncDestinationSection } from "@app/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AwsParameterStoreSyncDestinationSection";
import { AwsSecretsManagerSyncDestinationSection } from "@app/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AwsSecretsManagerSyncDestinationSection";
import { DatabricksSyncDestinationSection } from "@app/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DatabricksSyncDestinationSection";
import { GitHubSyncDestinationSection } from "@app/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitHubSyncDestinationSection";
import { AzureAppConfigurationSyncDestinationSection } from "./AzureAppConfigurationSyncDestinationSection";
@@ -49,7 +50,9 @@ export const SecretSyncDestinationSection = ({ secretSync, onEditDestination }:
<AzureAppConfigurationSyncDestinationSection secretSync={secretSync} />
);
break;
case SecretSync.Databricks:
DestinationComponents = <DatabricksSyncDestinationSection secretSync={secretSync} />;
break;
default:
throw new Error(`Unhandled Destination Section components: ${destination}`);
}