Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Change policy type value according to backend change
天舟0a7155a25ee4
diff --git a/frontend/src/components/EnvironmentForm.vue b/frontend/src/components/EnvironmentForm.vueindex 61601f734b..ac26647640 100644--- a/frontend/src/components/EnvironmentForm.vue+++ b/frontend/src/components/EnvironmentForm.vue@@ -85,7 +85,7 @@disabled:text-accent-disabledfocus:ring-accent"- value="NEVER"+ value="UNSET":disabled="!allowEdit"v-model="state.backupPolicy.payload.schedule"/>@@ -326,7 +326,7 @@ export default {emit("update-policy",(state.environment as Environment).id,- "backup_plan",+ "bb.policy.backup-plan",state.backupPolicy);}diff --git a/frontend/src/types/common.ts b/frontend/src/types/common.tsindex 3e6ed0df61..e7cf7373a5 100644--- a/frontend/src/types/common.ts+++ b/frontend/src/types/common.ts@@ -287,7 +287,7 @@ export const unknown = (updater: UNKNOWN_PRINCIPAL,updatedTs: 0,environment: UNKNOWN_ENVIRONMENT,- type: "approval_policy",+ type: "bb.policy.pipeline-approval",payload: "",};@@ -611,7 +611,7 @@ export const empty = (updater: EMPTY_PRINCIPAL,updatedTs: 0,environment: EMPTY_ENVIRONMENT,- type: "approval_policy",+ type: "bb.policy.pipeline-approval",payload: "",};diff --git a/frontend/src/types/policy.ts b/frontend/src/types/policy.tsindex 28aa520fca..5273f03c63 100644--- a/frontend/src/types/policy.ts+++ b/frontend/src/types/policy.ts@@ -1,10 +1,12 @@import { Environment, PolicyId, Principal } from ".";-export type PolicyType = "approval_policy" | "backup_plan";+export type PolicyType =+ | "bb.policy.pipeline-approval"+ | "bb.policy.backup-plan";export type PolicyApporvalPolicyPayload = {};-export type BackupPlanPolicySchedule = "NEVER" | "DAILY" | "WEEKLY";+export type BackupPlanPolicySchedule = "UNSET" | "DAILY" | "WEEKLY";export type PolicyBackupPlanPolicyPayload = {schedule: BackupPlanPolicySchedule;diff --git a/frontend/src/views/EnvironmentDashboard.vue b/frontend/src/views/EnvironmentDashboard.vueindex fd74b1b297..934c46af6c 100644--- a/frontend/src/views/EnvironmentDashboard.vue+++ b/frontend/src/views/EnvironmentDashboard.vue@@ -99,7 +99,7 @@ const DEFAULT_NEW_ENVIRONMENT: EnvironmentCreate = {// The default value should be consistent with the GetDefaultPolicy from the backend.const DEFAULT_NEW_BACKUP_PLAN_POLICY: PolicyUpsert = {payload: {- schedule: "NEVER",+ schedule: "UNSET",},};@@ -235,7 +235,7 @@ export default {store.dispatch("policy/upsertPolicyByEnvironmentAndType", {environmentId: environment.id,- type: "backup_plan",+ type: "bb.policy.backup-plan",policyUpsert: { payload: backupPolicy.payload },}).then((policy: Policy) => {diff --git a/frontend/src/views/EnvironmentDetail.vue b/frontend/src/views/EnvironmentDetail.vueindex a91c3a0b19..3970c0f10e 100644--- a/frontend/src/views/EnvironmentDetail.vue+++ b/frontend/src/views/EnvironmentDetail.vue@@ -62,7 +62,7 @@ export default {store.dispatch("policy/fetchPolicyByEnvironmentAndType", {environmentId: (state.environment as Environment).id,- type: "backup_plan",+ type: "bb.policy.backup-plan",}).then((policy: Policy) => {state.backupPolicy = policy;