feat(secret-sync): add re2 on replacements

This commit is contained in:
carlosmonastyrski
2025-06-27 14:03:59 -03:00
parent defe7b8f0b
commit f4779de051
6 changed files with 30 additions and 13 deletions
@@ -6,6 +6,8 @@ type Props = {
secretSync: TZabbixSync;
};
const isTextMacro = (macroType: number) => macroType === 0;
export const ZabbixSyncDestinationSection = ({ secretSync }: Props) => {
const {
destinationConfig: { macroType }
@@ -24,7 +26,7 @@ export const ZabbixSyncDestinationSection = ({ secretSync }: Props) => {
</>
)}
<GenericFieldLabel label="Macro Type">
{macroType === 0 ? "Text" : "Secret"}
{isTextMacro(macroType) ? "Text" : "Secret"}
</GenericFieldLabel>
</>
);