Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: add all mode to database select (#6030)
boojacka4de67286581
diff --git a/frontend/src/components/DatabaseSelect.vue b/frontend/src/components/DatabaseSelect.vueindex 3bffa96ec0..776a621f4c 100644--- a/frontend/src/components/DatabaseSelect.vue+++ b/frontend/src/components/DatabaseSelect.vue@@ -54,7 +54,7 @@ export default defineComponent({},mode: {required: true,- type: String as PropType<"INSTANCE" | "ENVIRONMENT" | "USER">,+ type: String as PropType<"ALL" | "INSTANCE" | "ENVIRONMENT" | "USER">,},environmentId: {type: Number as PropType<EnvironmentId>,@@ -101,7 +101,12 @@ export default defineComponent({const prepareDatabaseList = () => {// TODO(tianzhou): Instead of fetching each time, we maybe able to let the outside context// to provide the database list and we just do a get here.- if (props.mode == "ENVIRONMENT" && props.environmentId != UNKNOWN_ID) {+ if (props.mode === "ALL") {+ databaseStore.fetchDatabaseList();+ } else if (+ props.mode == "ENVIRONMENT" &&+ props.environmentId != UNKNOWN_ID+ ) {databaseStore.fetchDatabaseListByEnvironmentId(props.environmentId);} else if (props.mode == "INSTANCE" && props.instanceId != UNKNOWN_ID) {databaseStore.fetchDatabaseListByInstanceId(props.instanceId);@@ -114,7 +119,12 @@ export default defineComponent({const databaseList = computed(() => {let list: Database[] = [];- if (props.mode == "ENVIRONMENT" && props.environmentId != UNKNOWN_ID) {+ if (props.mode === "ALL") {+ list = databaseStore.getDatabaseList();+ } else if (+ props.mode == "ENVIRONMENT" &&+ props.environmentId != UNKNOWN_ID+ ) {list = databaseStore.getDatabaseListByEnvironmentId(props.environmentId);diff --git a/frontend/src/components/Issue/form/GrantRequestExporterForm.vue b/frontend/src/components/Issue/form/GrantRequestExporterForm.vueindex d7c7655971..02268598a0 100644--- a/frontend/src/components/Issue/form/GrantRequestExporterForm.vue+++ b/frontend/src/components/Issue/form/GrantRequestExporterForm.vue@@ -14,11 +14,11 @@/></div><div class="w-full flex flex-row justify-start items-start">- <span class="flex w-40 items-center">+ <span class="flex w-40 items-center shrink-0">{{ $t("issue.grant-request.database") }}<RequiredStar /></span>- <div v-if="create">+ <div v-if="create" class="flex flex-row justify-start items-center"><EnvironmentSelectclass="!w-60 mr-4 shrink-0"name="environment"@@ -29,7 +29,7 @@<DatabaseSelectclass="!w-128":selected-id="(state.databaseId as DatabaseId)"- :mode="'USER'"+ :mode="'ALL'":environment-id="state.environmentId":project-id="state.projectId":sync-status="'OK'"