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: ui update (#9873)
ecmadao9a3974c43a74
diff --git a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vueindex 904f84c5ee..d7393a6309 100644--- a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue+++ b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue@@ -91,7 +91,7 @@<div v-else-if="state.databaseSelectedTab === 'DATABASE_GROUP'"><SelectDatabaseGroupTable:show-selection="true"- :database-group-list="databaseGroupList"+ :database-group-list="filteredDatabaseGroupList":selected-database-group-name="state.selectedDatabaseGroupName"@@ -114,6 +114,10 @@/></template><DatabaseLabelFilter+ v-if="+ state.alterType === 'TENANT' ||+ state.databaseSelectedTab === 'DATABASE'+ "v-model:selected="state.selectedLabels":database-list="rawDatabaseList"/>@@ -193,6 +197,7 @@<aside class="flex justify-end"><NInputGroup class="py-0.5"><DatabaseLabelFilter+ v-if="state.databaseSelectedTab === 'DATABASE'"v-model:selected="state.selectedLabels":database-list="rawDatabaseList"/>@@ -212,6 +217,7 @@:database-list="selectableDatabaseList":show-selection-column="true":show-sql-editor-button="false"+ :show-placeholder="true"@select-database="(db: ComposedDatabase) =>toggleDatabasesSelection([db as ComposedDatabase], !isDatabaseSelected(db))@@ -255,7 +261,7 @@</div><div v-else-if="state.databaseSelectedTab === 'DATABASE_GROUP'"><SelectDatabaseGroupTable- :database-group-list="databaseGroupList"+ :database-group-list="filteredDatabaseGroupList":selected-database-group-name="state.selectedDatabaseGroupName"@update="(name) => selectDatabaseGroup(name, true)"/>@@ -485,11 +491,18 @@ const isTenantProject = computed((): boolean => {);});-if (isTenantProject.value) {- // For tenant mode projects, alter multiple db via DeploymentConfig- // is the default suggested way.- state.alterType = "TENANT";-}+watch(+ () => isTenantProject.value,+ (isTenant) => {+ if (isTenant) {+ // For tenant mode projects, alter multiple db via DeploymentConfig+ // is the default suggested way.+ state.alterType = "TENANT";+ state.databaseSelectedTab = "DATABASE_GROUP";+ }+ },+ { immediate: true }+);const environmentList = useEnvironmentV1List(false /* !showDeleted */);@@ -576,6 +589,16 @@ const databaseGroupList = computed(() => {}});+const filteredDatabaseGroupList = computed(() => {+ return databaseGroupList.value.filter((dbGroup) => {+ const keyword = state.searchText.trim().toLowerCase();+ if (!keyword) {+ return true;+ }+ return dbGroup.databaseGroupName.toLowerCase().includes(keyword);+ });+});+const flattenSelectedDatabaseUidList = computed(() => {const flattenDatabaseIdList: string[] = [];if (!props.projectId) {diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleSelect.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleSelect.vueindex f897ad7538..2c67ce45b1 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleSelect.vue+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleSelect.vue@@ -6,7 +6,6 @@><label v-if="label" class="mr-2">{{ label }}</label><SpinnerSelect- style="width: 14rem":value="value":on-update="onUpdate":options="options"diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vueindex a09eb64945..87cc307f3a 100644--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vue+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vue@@ -17,8 +17,9 @@<div class="bb-grid-cell">{{ levelText(row.level) }}</div>- <div class="bb-grid-cell">+ <div class="bb-grid-cell flex items-center space-x-2"><RuleSelect+ class="flex-1 max-w-md min-w-[10rem]":value="row.rule":link="true":on-update="(rule) => updateRow(row, rule)"diff --git a/frontend/src/components/CustomApproval/Settings/components/common/SpinnerSelect.vue b/frontend/src/components/CustomApproval/Settings/components/common/SpinnerSelect.vueindex 7a24fc95c4..3afdfac0c6 100644--- a/frontend/src/components/CustomApproval/Settings/components/common/SpinnerSelect.vue+++ b/frontend/src/components/CustomApproval/Settings/components/common/SpinnerSelect.vue@@ -1,5 +1,5 @@<template>- <NSelect :loading="loading" @update:value="handleUpdate" />+ <NSelect v-bind="$attrs" :loading="loading" @update:value="handleUpdate" /></template><script lang="ts">diff --git a/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue b/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vueindex 7a0e914f05..c161bf5cdd 100644--- a/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue+++ b/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue@@ -1,57 +1,32 @@<template><div class="w-full">- <div class="flex items-center justify-end">- <div class="flex flex-row gap-x-2">- <NButton @click="handleCreateSchemaGroup">- <span class="mr-1">{{- $t("database-group.table-group.create")- }}</span>- <FeatureBadge feature="bb.feature.database-grouping" />- </NButton>- <NButton @click="handleCreateDatabaseGroup">- <span class="mr-1">{{ $t("database-group.create") }}</span>- <FeatureBadge feature="bb.feature.database-grouping" />- </NButton>- </div>- </div>- <div class="mt-4">- <DatabaseGroupTable- :database-group-list="databaseGroupList"- :show-edit="true"- @edit="handleConfigureDatabaseGroup"- />- </div>+ <DatabaseGroupTable+ :database-group-list="databaseGroupList"+ :show-edit="true"+ @edit="handleConfigureDatabaseGroup"+ /></div><DatabaseGroupPanelv-model:show="state.showDatabaseGroupPanel":project="project"- :resource-type="state.resourceType"+ :resource-type="'DATABASE_GROUP'":database-group="state.editingDatabaseGroup"@close="state.showDatabaseGroupPanel = false"/>-- <FeatureModal- feature="bb.feature.database-grouping"- :open="state.showFeatureModal"- @cancel="state.showFeatureModal = false"- /></template><script lang="ts" setup>import { cloneDeep } from "lodash-es";import { computed, onMounted, reactive } from "vue";-import { hasFeature, useDBGroupStore } from "@/store";+import { useDBGroupStore } from "@/store";import { ComposedProject } from "@/types";import { DatabaseGroup } from "@/types/proto/v1/project_service";import DatabaseGroupPanel from "./DatabaseGroupPanel.vue";import DatabaseGroupTable from "./DatabaseGroupTable.vue";-import { ResourceType } from "./common/ExprEditor/context";interface LocalState {- showFeatureModal: boolean;showDatabaseGroupPanel: boolean;- resourceType: ResourceType;editingDatabaseGroup?: DatabaseGroup;}@@ -61,9 +36,7 @@ const props = defineProps<{const dbGroupStore = useDBGroupStore();const state = reactive<LocalState>({- showFeatureModal: false,showDatabaseGroupPanel: false,- resourceType: "DATABASE_GROUP",});const databaseGroupList = computed(() => {@@ -74,28 +47,6 @@ onMounted(async () => {await dbGroupStore.getOrFetchDBGroupListByProjectName(props.project.name);});-const handleCreateDatabaseGroup = () => {- if (!hasFeature("bb.feature.database-grouping")) {- state.showFeatureModal = true;- return;- }-- state.resourceType = "DATABASE_GROUP";- state.editingDatabaseGroup = undefined;- state.showDatabaseGroupPanel = true;-};--const handleCreateSchemaGroup = () => {- if (!hasFeature("bb.feature.database-grouping")) {- state.showFeatureModal = true;- return;- }-- state.resourceType = "SCHEMA_GROUP";- state.editingDatabaseGroup = undefined;- state.showDatabaseGroupPanel = true;-};-const handleConfigureDatabaseGroup = (databaseGroup: DatabaseGroup) => {state.editingDatabaseGroup = cloneDeep(databaseGroup);state.showDatabaseGroupPanel = true;diff --git a/frontend/src/components/DatabaseGroup/SelectDatabaseGroupTable.vue b/frontend/src/components/DatabaseGroup/SelectDatabaseGroupTable.vueindex 96a96ab7a9..055ab563ee 100644--- a/frontend/src/components/DatabaseGroup/SelectDatabaseGroupTable.vue+++ b/frontend/src/components/DatabaseGroup/SelectDatabaseGroupTable.vue@@ -5,6 +5,7 @@row-key="name"class="border":row-clickable="true"+ :show-placeholder="true"@click-row="handleDatabaseGroupSelect"><template #item="{ item: dbGroup }: { item: ComposedDatabaseGroup }">diff --git a/frontend/src/components/IssueV1/components/IssueSearch/AdvancedSearchBox.vue b/frontend/src/components/IssueV1/components/IssueSearch/AdvancedSearchBox.vueindex e8684ef671..10782c1cdb 100644--- a/frontend/src/components/IssueV1/components/IssueSearch/AdvancedSearchBox.vue+++ b/frontend/src/components/IssueV1/components/IssueSearch/AdvancedSearchBox.vue@@ -57,7 +57,7 @@<divv-show="showMenu"v-zindexable="{ enabled: true }"- class="absolute top-[36px] w-full bg-white shadow-md origin-top-left rounded-[3px] overflow-clip"+ class="absolute top-[36px] w-full bg-gray-100 shadow-xl origin-top-left rounded-[3px] overflow-clip"@wheel="console.log('wheel', $event)"><ScopeMenudiff --git a/frontend/src/components/IssueV1/components/IssueSearch/ScopeMenu.vue b/frontend/src/components/IssueV1/components/IssueSearch/ScopeMenu.vueindex b227a720cc..e137a39978 100644--- a/frontend/src/components/IssueV1/components/IssueSearch/ScopeMenu.vue+++ b/frontend/src/components/IssueV1/components/IssueSearch/ScopeMenu.vue@@ -12,11 +12,11 @@:items="options":key-field="`id`":item-resizable="false"- :item-size="32"+ :item-size="38"><template #default="{ item: option, index }: ListItem"><div- class="h-[32px] flex gap-x-1 px-3 items-center cursor-pointer border-t text-sm"+ class="h-[38px] flex gap-x-1 px-3 items-center cursor-pointer border-t text-sm":class="[index === menuIndex && 'bg-gray-200/75',index === 0 ? 'border-transparent' : 'border-block-border',diff --git a/frontend/src/components/IssueV1/components/IssueSearch/ValueMenu.vue b/frontend/src/components/IssueV1/components/IssueSearch/ValueMenu.vueindex 22735aa2e1..b3fa6261e1 100644--- a/frontend/src/components/IssueV1/components/IssueSearch/ValueMenu.vue+++ b/frontend/src/components/IssueV1/components/IssueSearch/ValueMenu.vue@@ -26,11 +26,11 @@:items="valueOptions":key-field="`value`":item-resizable="false"- :item-size="32"+ :item-size="38"><template #default="{ item: option, index }: ListItem"><div- class="h-[32px] flex gap-x-2 px-3 items-center cursor-pointer border-t border-block-border overflow-hidden"+ class="h-[38px] flex gap-x-2 px-3 items-center cursor-pointer border-t border-block-border overflow-hidden":class="[index === menuIndex && 'bg-gray-200/75']":data-index="index":data-value="option.value"diff --git a/frontend/src/components/ProjectDatabasesPanel.vue b/frontend/src/components/ProjectDatabasesPanel.vueindex c9b99fe776..b283efe3f2 100644--- a/frontend/src/components/ProjectDatabasesPanel.vue+++ b/frontend/src/components/ProjectDatabasesPanel.vue@@ -16,68 +16,70 @@/></div>- <DatabaseOperations- v-if="showDatabaseOperations"- :project-uid="project.uid"- :databases="selectedDatabases"- />-- <DatabaseV1Table- mode="PROJECT"- table-class="border"- :show-selection-column="true"- :show-placeholder="true"- :database-list="filteredDatabaseList"- >- <template #selection-all="{ databaseList: selectedDatabaseList }">- <input- v-if="selectedDatabaseList.length > 0"- type="checkbox"- class="h-4 w-4 text-accent rounded disabled:cursor-not-allowed border-control-border focus:ring-accent"- v-bind="getAllSelectionState(selectedDatabaseList as ComposedDatabase[])"- @input="- toggleDatabasesSelection(- selectedDatabaseList as ComposedDatabase[],- ($event.target as HTMLInputElement).checked- )- "- />- </template>- <template #selection="{ database }">- <input- type="checkbox"- class="h-4 w-4 text-accent rounded disabled:cursor-not-allowed border-control-border focus:ring-accent"- :checked="isDatabaseSelected(database as ComposedDatabase)"- @click.stop="- toggleDatabasesSelection(- [database as ComposedDatabase],- ($event.target as HTMLInputElement).checked- )- "- />- </template>- <template v-if="databaseList.length === 0" #placeholder>- <div class="p-8 text-center textinfolabel">- <i18n-t- v-if="showEmptyActions"- keypath="project.overview.no-db-prompt"- tag="p"- >- <template #newDb>- <span class="text-main font-bold">{{- $t("quick-action.new-db")- }}</span>- </template>- <template #transferInDb>- <span class="text-main font-bold">{{- $t("quick-action.transfer-in-db")- }}</span>- </template>- </i18n-t>- <i18n-t v-else keypath="common.no-data" tag="p"></i18n-t>- </div>- </template>- </DatabaseV1Table>+ <div class="space-y-2">+ <DatabaseOperations+ v-if="showDatabaseOperations"+ :project-uid="project.uid"+ :databases="selectedDatabases"+ />++ <DatabaseV1Table+ mode="PROJECT"+ table-class="border"+ :show-selection-column="true"+ :show-placeholder="true"+ :database-list="filteredDatabaseList"+ >+ <template #selection-all="{ databaseList: selectedDatabaseList }">+ <input+ v-if="selectedDatabaseList.length > 0"+ type="checkbox"+ class="h-4 w-4 text-accent rounded disabled:cursor-not-allowed border-control-border focus:ring-accent"+ v-bind="getAllSelectionState(selectedDatabaseList as ComposedDatabase[])"+ @input="+ toggleDatabasesSelection(+ selectedDatabaseList as ComposedDatabase[],+ ($event.target as HTMLInputElement).checked+ )+ "+ />+ </template>+ <template #selection="{ database }">+ <input+ type="checkbox"+ class="h-4 w-4 text-accent rounded disabled:cursor-not-allowed border-control-border focus:ring-accent"+ :checked="isDatabaseSelected(database as ComposedDatabase)"+ @click.stop="+ toggleDatabasesSelection(+ [database as ComposedDatabase],+ ($event.target as HTMLInputElement).checked+ )+ "+ />+ </template>+ <template v-if="databaseList.length === 0" #placeholder>+ <div class="p-8 text-center textinfolabel">+ <i18n-t+ v-if="showEmptyActions"+ keypath="project.overview.no-db-prompt"+ tag="p"+ >+ <template #newDb>+ <span class="text-main font-bold">{{+ $t("quick-action.new-db")+ }}</span>+ </template>+ <template #transferInDb>+ <span class="text-main font-bold">{{+ $t("quick-action.transfer-in-db")+ }}</span>+ </template>+ </i18n-t>+ <i18n-t v-else keypath="common.no-data" tag="p"></i18n-t>+ </div>+ </template>+ </DatabaseV1Table>+ </div></div></template>diff --git a/frontend/src/components/QuickActionPanel.vue b/frontend/src/components/QuickActionPanel.vueindex 4772065c0f..9804be5e85 100644--- a/frontend/src/components/QuickActionPanel.vue+++ b/frontend/src/components/QuickActionPanel.vue@@ -56,6 +56,21 @@/></Drawer>+ <DatabaseGroupPanel+ v-if="project"+ :show="+ state.quickActionType === 'quickaction.bb.group.database-group.create' ||+ state.quickActionType === 'quickaction.bb.group.table-group.create'+ "+ :project="project"+ :resource-type="+ state.quickActionType === 'quickaction.bb.group.database-group.create'+ ? 'DATABASE_GROUP'+ : 'SCHEMA_GROUP'+ "+ @close="state.quickActionType = undefined"+ />+<RequestQueryPanelv-if="state.showRequestQueryPanel"@close="state.showRequestQueryPanel = false"@@ -68,9 +83,9 @@/><FeatureModal- :open="state.showFeatureModal && !!state.feature"- :feature="(state.feature as FeatureType)"- @cancel="state.showFeatureModal = false"+ :open="!!state.feature"+ :feature="state.feature"+ @cancel="state.feature = undefined"/></template>@@ -104,13 +119,17 @@ import {useCurrentUserIamPolicy,useProjectV1ListByCurrentUser,useSubscriptionV1Store,+ useProjectV1Store,} from "@/store";-import { QuickActionType, FeatureType } from "@/types";+import {+ QuickActionType,+ DatabaseGroupQuickActionType,+ FeatureType,+} from "@/types";import { idFromSlug } from "@/utils";interface LocalState {- feature?: string;- showFeatureModal: boolean;+ feature?: FeatureType;quickActionType: QuickActionType | undefined;showRequestQueryPanel: boolean;showRequestExportPanel: boolean;@@ -136,13 +155,13 @@ const router = useRouter();const route = useRoute();const commandStore = useCommandStore();const subscriptionStore = useSubscriptionV1Store();+const projectStore = useProjectV1Store();const hasDBAWorkflowFeature = computed(() => {return subscriptionStore.hasFeature("bb.feature.dba-workflow");});const state = reactive<LocalState>({- showFeatureModal: false,quickActionType: undefined,showRequestQueryPanel: false,showRequestExportPanel: false,@@ -156,6 +175,13 @@ const projectId = computed((): string | undefined => {return undefined;});+const project = computed(() => {+ if (!projectId.value) {+ return;+ }+ return projectStore.getProjectByUID(projectId.value);+});+// Only show alter schema and change data if the user has permission to alter schema of at least one project.const shouldShowAlterDatabaseEntries = computed(() => {const { projectList } = useProjectV1ListByCurrentUser();@@ -183,7 +209,6 @@ const createInstance = () => {const instanceList = useInstanceV1Store().activeInstanceList;if (subscriptionStore.instanceCountLimit <= instanceList.length) {state.feature = "bb.feature.instance-count";- state.showFeatureModal = true;return;}state.quickActionType = "quickaction.bb.instance.create";@@ -209,6 +234,14 @@ const reorderEnvironment = () => {commandStore.dispatchCommand("bb.environment.reorder");};+const openDatabaseGroupDrawer = (quickAction: DatabaseGroupQuickActionType) => {+ if (!subscriptionStore.hasFeature("bb.feature.database-grouping")) {+ state.feature = "bb.feature.database-grouping";+ return;+ }+ state.quickActionType = quickAction;+};+const availableQuickActionList = computed((): QuickAction[] => {const fullList: QuickAction[] = [{@@ -224,6 +257,20 @@ const availableQuickActionList = computed((): QuickAction[] => {action: createDatabase,icon: h(DatabaseIcon),},+ {+ type: "quickaction.bb.group.database-group.create",+ title: t("database-group.create"),+ action: () =>+ openDatabaseGroupDrawer("quickaction.bb.group.database-group.create"),+ icon: h(PlusIcon),+ },+ {+ type: "quickaction.bb.group.table-group.create",+ title: t("database-group.table-group.create"),+ action: () =>+ openDatabaseGroupDrawer("quickaction.bb.group.table-group.create"),+ icon: h(PlusIcon),+ },{type: "quickaction.bb.database.schema.update",title: t("database.edit-schema"),diff --git a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vueindex 4c4f896354..0d527914bf 100644--- a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue+++ b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue@@ -8,7 +8,7 @@n: instanceList.length,})}}- <div class="flex items-center gap-x-4 text-sm ml-5 text-accent">+ <div class="flex items-center"><template v-for="action in actions" :key="action.text"><NButtonquaternarydiff --git a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vue b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vueindex 53ec75724a..cf5b2eaebb 100644--- a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vue+++ b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vue@@ -1,6 +1,6 @@<template>- <div>- <InstanceOperations class="mb-3" :instance-list="selectedInstanceList" />+ <div class="space-y-2">+ <InstanceOperations :instance-list="selectedInstanceList" /><BBGridclass="border-y":column-list="columnList"diff --git a/frontend/src/types/quickAction.ts b/frontend/src/types/quickAction.tsindex 0c2f2dd5b7..b90679bfdb 100644--- a/frontend/src/types/quickAction.ts+++ b/frontend/src/types/quickAction.ts@@ -10,6 +10,9 @@ export type DatabaseQuickActionType =| "quickaction.bb.database.request" // Used by Developer (not yet)| "quickaction.bb.database.schema.update"| "quickaction.bb.database.data.update";+export type DatabaseGroupQuickActionType =+ | "quickaction.bb.group.database-group.create"+ | "quickaction.bb.group.table-group.create";export type IssueQuickActionType =| "quickaction.bb.issue.grant.request.querier"| "quickaction.bb.issue.grant.request.exporter";@@ -19,4 +22,5 @@ export type QuickActionType =| ProjectQuickActionType| InstanceQuickActionType| DatabaseQuickActionType+ | DatabaseGroupQuickActionType| IssueQuickActionType;diff --git a/frontend/src/views/DatabaseDashboard.vue b/frontend/src/views/DatabaseDashboard.vueindex 8c98590357..892e67ebd4 100644--- a/frontend/src/views/DatabaseDashboard.vue+++ b/frontend/src/views/DatabaseDashboard.vue@@ -15,51 +15,53 @@/></div>- <DatabaseOperations class="mb-3" :databases="selectedDatabases" />+ <div class="space-y-2">+ <DatabaseOperations :databases="selectedDatabases" />- <DatabaseV1Table- pagination-class="mb-4"- table-class="border-y"- :database-list="filteredDatabaseList"- :database-group-list="filteredDatabaseGroupList"- :show-placeholder="true"- :show-selection-column="true"- :custom-click="isStandaloneMode"- @select-database="(db: ComposedDatabase) =>+ <DatabaseV1Table+ pagination-class="mb-4"+ table-class="border-y"+ :database-list="filteredDatabaseList"+ :database-group-list="filteredDatabaseGroupList"+ :show-placeholder="true"+ :show-selection-column="true"+ :custom-click="isStandaloneMode"+ @select-database="(db: ComposedDatabase) =>toggleDatabasesSelection([db as ComposedDatabase], !isDatabaseSelected(db))"- >- <template #selection-all="{ databaseList }">- <input- v-if="databaseList.length > 0"- type="checkbox"- class="h-4 w-4 text-accent rounded disabled:cursor-not-allowed border-control-border focus:ring-accent"- v-bind="getAllSelectionState(databaseList)"- @input="- toggleDatabasesSelection(- databaseList,- ($event.target as HTMLInputElement).checked- )- "- />- </template>- <template #selection="{ database }">- <input- v-if="isDatabase(database)"- type="checkbox"- class="h-4 w-4 text-accent rounded disabled:cursor-not-allowed border-control-border focus:ring-accent"- :checked="isDatabaseSelected(database as ComposedDatabase)"- @click.stop="- toggleDatabasesSelection(- [database],- ($event.target as HTMLInputElement).checked- )- "- />- <div v-else class="text-control-light cursor-not-allowed ml-auto">- -- </div>- </template>- </DatabaseV1Table>+ >+ <template #selection-all="{ databaseList }">+ <input+ v-if="databaseList.length > 0"+ type="checkbox"+ class="h-4 w-4 text-accent rounded disabled:cursor-not-allowed border-control-border focus:ring-accent"+ v-bind="getAllSelectionState(databaseList)"+ @input="+ toggleDatabasesSelection(+ databaseList,+ ($event.target as HTMLInputElement).checked+ )+ "+ />+ </template>+ <template #selection="{ database }">+ <input+ v-if="isDatabase(database)"+ type="checkbox"+ class="h-4 w-4 text-accent rounded disabled:cursor-not-allowed border-control-border focus:ring-accent"+ :checked="isDatabaseSelected(database as ComposedDatabase)"+ @click.stop="+ toggleDatabasesSelection(+ [database],+ ($event.target as HTMLInputElement).checked+ )+ "+ />+ <div v-else class="text-control-light cursor-not-allowed ml-auto">+ -+ </div>+ </template>+ </DatabaseV1Table>+ </div><divv-if="state.loading"diff --git a/frontend/src/views/ProjectDetail.vue b/frontend/src/views/ProjectDetail.vueindex 646aa6d2f4..e2a996fd6e 100644--- a/frontend/src/views/ProjectDetail.vue+++ b/frontend/src/views/ProjectDetail.vue@@ -209,6 +209,18 @@ onMounted(() => {});});+const quickActionForDatabaseGroup = computed((): QuickActionType[] => {+ if (project.value.tenantMode !== TenantMode.TENANT_MODE_ENABLED) {+ return [];+ }+ return [+ "quickaction.bb.group.database-group.create",+ "quickaction.bb.group.table-group.create",+ "quickaction.bb.database.data.update",+ "quickaction.bb.database.schema.update",+ ];+});+const quickActionMapByRole = computed(() => {if (project.value.state === State.ACTIVE) {const DBA_AND_OWNER_QUICK_ACTION_LIST: QuickActionType[] = [@@ -252,22 +264,11 @@ const quickActionMapByRole = computed(() => {pull(DEVELOPER_QUICK_ACTION_LIST, "quickaction.bb.database.create");}- const map = new Map([+ return new Map([["OWNER", [...DBA_AND_OWNER_QUICK_ACTION_LIST]],["DBA", [...DBA_AND_OWNER_QUICK_ACTION_LIST]],["DEVELOPER", DEVELOPER_QUICK_ACTION_LIST],]) as Map<RoleType, QuickActionType[]>;-- if (project.value.tenantMode === TenantMode.TENANT_MODE_ENABLED) {- for (const value of map.values()) {- value.push(- "quickaction.bb.database.data.update",- "quickaction.bb.database.schema.update"- );- }- }-- return map;}return new Map<RoleType, QuickActionType[]>();@@ -281,6 +282,9 @@ const quickActionList = computed(() => {if (!isDatabaseHash.value) {return [];}+ if (hash.value === "database-groups") {+ return quickActionForDatabaseGroup.value;+ }return getQuickActionList(quickActionMapByRole.value);});</script>