feat(secret-sync): add Zabbix secret sync

This commit is contained in:
carlosmonastyrski
2025-06-27 13:31:41 -03:00
parent 9366428091
commit cf3113ac89
90 changed files with 1774 additions and 38 deletions
@@ -33,6 +33,7 @@ import { TeamCitySyncDestinationSection } from "./TeamCitySyncDestinationSection
import { TerraformCloudSyncDestinationSection } from "./TerraformCloudSyncDestinationSection";
import { VercelSyncDestinationSection } from "./VercelSyncDestinationSection";
import { WindmillSyncDestinationSection } from "./WindmillSyncDestinationSection";
import { ZabbixSyncDestinationSection } from "./ZabbixSyncDestinationSection";
type Props = {
secretSync: TSecretSync;
@@ -114,6 +115,9 @@ export const SecretSyncDestinationSection = ({ secretSync, onEditDestination }:
case SecretSync.CloudflarePages:
DestinationComponents = <CloudflarePagesSyncDestinationSection secretSync={secretSync} />;
break;
case SecretSync.Zabbix:
DestinationComponents = <ZabbixSyncDestinationSection secretSync={secretSync} />;
break;
default:
throw new Error(`Unhandled Destination Section components: ${destination}`);
}
@@ -0,0 +1,31 @@
import { GenericFieldLabel } from "@app/components/secret-syncs";
import { ZabbixSyncScope } from "@app/hooks/api/appConnections/zabbix";
import { TZabbixSync } from "@app/hooks/api/secretSyncs/types/zabbix-sync";
type Props = {
secretSync: TZabbixSync;
};
export const ZabbixSyncDestinationSection = ({ secretSync }: Props) => {
const {
destinationConfig: { macroType }
} = secretSync;
return (
<>
{secretSync.destinationConfig.scope === ZabbixSyncScope.Host && (
<>
<GenericFieldLabel label="Host Name">
{secretSync.destinationConfig.hostName}
</GenericFieldLabel>
<GenericFieldLabel label="Host ID">
{secretSync.destinationConfig.hostId}
</GenericFieldLabel>
</>
)}
<GenericFieldLabel label="Macro Type">
{macroType === 0 ? "Text" : "Secret"}
</GenericFieldLabel>
</>
);
};
@@ -60,6 +60,7 @@ export const SecretSyncOptionsSection = ({ secretSync, onEditOptions }: Props) =
case SecretSync.Flyio:
case SecretSync.GitLab:
case SecretSync.CloudflarePages:
case SecretSync.Zabbix:
AdditionalSyncOptionsComponent = null;
break;
default: