Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Add view task link to the new database, new data source member form
天舟2ef999f0e21f
diff --git a/frontend/src/components/DataSourceMemberForm.vue b/frontend/src/components/DataSourceMemberForm.vueindex b452da1b6b..7d9dc2c6eb 100644--- a/frontend/src/components/DataSourceMemberForm.vue+++ b/frontend/src/components/DataSourceMemberForm.vue@@ -121,16 +121,27 @@ input[type="number"] {><span class="text-accent font-semibold sm:text-sm">task/</span></div>- <input- class="textfield w-full pl-12"- id="task"- name="task"- type="number"- placeholder="Your task id (e.g. 1234)"- :disabled="!allowUpdateTaskId"- :value="state.taskId"- @input="updateState('taskId', $event.target.value)"- />+ <div class="flex flex-row space-x-2 items-center">+ <input+ class="textfield w-full pl-12"+ id="task"+ name="task"+ type="number"+ placeholder="Your task id (e.g. 1234)"+ :disabled="!allowUpdateTaskId"+ :value="state.taskId"+ @input="updateState('taskId', $event.target.value)"+ />+ <template v-if="taskLink">+ <router-link+ :to="taskLink"+ target="_blank"+ class="ml-2 normal-link text-sm"+ >+ View+ </router-link>+ </template>+ </div></div></div></div>@@ -271,6 +282,15 @@ export default {return state.dataSourceId && state.granteeId && !state.granteeError;});+ const taskLink = computed((): string => {+ if (state.taskId) {+ // We intentionally not to validate whether the taskId is legit, we will do the validation+ // when actually trying to create the database.+ return `/task/${state.taskId}`;+ }+ return "";+ });+const validateGrantee = () => {if (state.granteeId) {const member = dataSource.value.memberList.find(@@ -363,6 +383,7 @@ export default {allowUpdateDataSourceMember,allowUpdateTaskId,allowCreate,+ taskLink,updateState,cancel,doGrant,diff --git a/frontend/src/views/DatabaseNew.vue b/frontend/src/views/DatabaseNew.vueindex 77837d8131..bbb0b61755 100644--- a/frontend/src/views/DatabaseNew.vue+++ b/frontend/src/views/DatabaseNew.vue@@ -42,7 +42,7 @@ input[type="number"] {"class="ml-2 text-sm normal-link">- View list+ List</router-link></div><div class="flex flex-row space-x-2 items-center">@@ -179,15 +179,26 @@ input[type="number"] {><span class="text-accent font-semibold sm:text-sm">task/</span></div>- <input- class="textfield w-full pl-12"- id="task"- name="task"- type="number"- placeholder="Your task id (e.g. 1234)"- :disabled="!allowEditTask"- v-model="state.taskId"- />+ <div class="flex flex-row space-x-2 items-center">+ <input+ class="textfield w-full pl-12"+ id="task"+ name="task"+ type="number"+ placeholder="Your task id (e.g. 1234)"+ :disabled="!allowEditTask"+ v-model="state.taskId"+ />+ <template v-if="taskLink">+ <router-link+ :to="taskLink"+ target="_blank"+ class="ml-2 normal-link text-sm"+ >+ View+ </router-link>+ </template>+ </div></template></div></div>@@ -226,10 +237,8 @@ import {Task,TaskId,TaskType,- Database,DataSourceNew,EnvironmentId,- Environment,InstanceId,PrincipalId,} from "../types";@@ -335,6 +344,15 @@ export default {return "";});+ const taskLink = computed((): string => {+ if (state.taskId) {+ // We intentionally not to validate whether the taskId is legit, we will do the validation+ // when actually trying to create the database.+ return `/task/${state.taskId}`;+ }+ return "";+ });+const selectEnvironment = (environmentId: EnvironmentId) => {state.environmentId = environmentId;const query = cloneDeep(router.currentRoute.value.query);@@ -518,6 +536,7 @@ export default {allowEditOwner,allowEditTask,instanceLink,+ taskLink,selectEnvironment,selectInstance,changeDatabaseName,