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: condense quickaction button to save vertical space (#7957)
Tianzhou (天舟)5168a38f872d
diff --git a/frontend/src/components/QuickActionPanel.vue b/frontend/src/components/QuickActionPanel.vueindex f220f261e2..6e375f0741 100644--- a/frontend/src/components/QuickActionPanel.vue+++ b/frontend/src/components/QuickActionPanel.vue@@ -1,6 +1,6 @@<template><div- class="pt-1 overflow-hidden grid grid-cols-5 gap-x-2 gap-y-4 md:inline-flex items-stretch"+ class="pt-1 overflow-hidden grid grid-cols-3 gap-x-2 gap-y-4 md:inline-flex items-stretch"><template v-for="(quickAction, index) in quickActionList" :key="index"><div@@ -9,7 +9,7 @@data-label="bb-quick-action-add-instance"><button class="btn-icon-primary p-3" @click.prevent="createInstance">- <heroicons-outline:plus-sm class="w-5 h-5" />+ <heroicons-outline:plus-sm class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -18,20 +18,6 @@</h3></div>- <div- v-if="quickAction === 'quickaction.bb.user.manage'"- class="flex flex-col items-center w-24"- >- <router-link to="/setting/member" class="btn-icon-primary p-3">- <heroicons-outline:users class="w-5 h-5" />- </router-link>- <h3- class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"- >- {{ $t("quick-action.manage-user") }}- </h3>- </div>-<template v-if="shouldShowAlterDatabaseEntries"><divv-if="quickAction === 'quickaction.bb.database.create'"@@ -39,7 +25,7 @@data-label="bb-quick-action-new-db"><button class="btn-icon-primary p-3" @click.prevent="createDatabase">- <heroicons-outline:database class="w-5 h-5" />+ <heroicons-outline:database class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -57,7 +43,7 @@data-label="bb-alter-schema-button"@click.prevent="alterSchema">- <heroicons-outline:pencil-alt class="w-5 h-5" />+ <heroicons-outline:pencil-alt class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -71,7 +57,7 @@class="flex flex-col items-center w-24"><button class="btn-icon-primary p-3" @click.prevent="changeData">- <heroicons-outline:pencil class="w-5 h-5" />+ <heroicons-outline:pencil class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -85,7 +71,7 @@class="flex flex-col items-center w-24"><button class="btn-icon-primary p-3" @click.prevent="designSchema">- <GitBranch class="w-5 h-auto" />+ <GitBranch class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -95,26 +81,12 @@</div></template>- <div- v-if="isDev() && quickAction === 'quickaction.bb.database.troubleshoot'"- class="flex flex-col items-center w-24"- >- <router-link to="/issue/new" class="btn-icon-primary p-3">- <heroicons-outline:hand class="w-5 h-5" />- </router-link>- <h3- class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"- >- {{ $t("quick-action.troubleshoot") }}- </h3>- </div>-<divv-if="quickAction === 'quickaction.bb.environment.create'"class="flex flex-col items-center w-36"><button class="btn-icon-primary p-3" @click.prevent="createEnvironment">- <heroicons-outline:plus-sm class="w-5 h-5" />+ <heroicons-outline:plus-sm class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -131,7 +103,7 @@class="btn-icon-primary p-3"@click.prevent="reorderEnvironment">- <heroicons-outline:selector class="transform rotate-90 w-5 h-5" />+ <heroicons-outline:selector class="transform rotate-90 w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -146,7 +118,7 @@data-label="bb-quick-action-new-project"><button class="btn-icon-primary p-3" @click.prevent="createProject">- <heroicons-outline:template class="w-5 h-5" />+ <heroicons-outline:template class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -160,7 +132,7 @@class="flex flex-col items-center w-24"><button class="btn-icon-primary p-3" @click.prevent="transferDatabase">- <heroicons-outline:chevron-double-down class="w-5 h-5" />+ <heroicons-outline:chevron-double-down class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -177,7 +149,7 @@class="btn-icon-primary p-3"@click.prevent="transferOutDatabase">- <heroicons-outline:chevron-double-up class="w-5 h-5" />+ <heroicons-outline:chevron-double-up class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -195,7 +167,7 @@class="btn-icon-primary p-3"@click.prevent="state.showRequestQueryPanel = true">- <heroicons-outline:document-search class="w-5 h-5" />+ <heroicons-outline:document-search class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -212,7 +184,7 @@class="btn-icon-primary p-3"@click.prevent="state.showRequestExportPanel = true">- <heroicons-outline:document-download class="w-5 h-5" />+ <heroicons-outline:document-download class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -234,7 +206,7 @@'quickaction.bb.subscription.license-assignment')">- <heroicons-outline:academic-cap class="w-5 h-5" />+ <heroicons-outline:academic-cap class="w-4 h-4" /></button><h3class="flex-1 mt-1.5 text-center text-sm font-normal text-main tracking-tight"@@ -348,7 +320,7 @@ import {useSubscriptionV1Store,} from "@/store";import { QuickActionType } from "@/types";-import { idFromSlug, isDev } from "@/utils";+import { idFromSlug } from "@/utils";interface LocalState {feature?: string;@@ -456,10 +428,6 @@ const QuickActionMap: Record<string, Partial<Action>> = {name: t("quick-action.add-instance"),perform: () => createInstance(),},- "quickaction.bb.user.manage": {- name: t("quick-action.manage-user"),- perform: () => router.push({ name: "setting.workspace.member" }),- },"quickaction.bb.database.create": {name: t("quick-action.new-db"),perform: () => createDatabase(),@@ -468,10 +436,6 @@ const QuickActionMap: Record<string, Partial<Action>> = {name: t("database.alter-schema"),perform: () => alterSchema(),},- "quickaction.bb.database.troubleshoot": {- name: t("quick-action.troubleshoot"),- perform: () => router.push({ path: "/issue/new" }),- },"quickaction.bb.environment.create": {name: t("quick-action.add-environment"),perform: () => createEnvironment(),diff --git a/frontend/src/layouts/BodyLayout.vue b/frontend/src/layouts/BodyLayout.vueindex 12a1613648..17c1b052b4 100644--- a/frontend/src/layouts/BodyLayout.vue+++ b/frontend/src/layouts/BodyLayout.vue@@ -167,12 +167,12 @@<!-- Static sidebar for mobile --><aside class="md:hidden"><div- class="flex items-center justify-start bg-gray-50 border-b border-block-border px-4 py-1.5"+ class="flex items-center justify-start bg-gray-50 border-b border-block-border px-4"><div><buttontype="button"- class="-mr-3 h-12 w-12 inline-flex items-center justify-center rounded-md text-gray-500 hover:text-gray-900"+ class="-mr-3 h-8 w-8 inline-flex items-center justify-center rounded-md text-gray-500 hover:text-gray-900"@click.prevent="state.showMobileOverlay = true"><span class="sr-only">Open sidebar</span>@@ -194,7 +194,7 @@<divclass="w-full flex flex-row justify-between items-center flex-wrap px-4 gap-x-4">- <div v-if="quickActionList.length > 0" class="flex-1 pt-6 pb-2">+ <div v-if="quickActionList.length > 0" class="flex-1 pt-3 pb-2"><QuickActionPanel :quick-action-list="quickActionList" /></div><div@@ -219,7 +219,7 @@<divid="bb-layout-main"class="md:min-w-0 md:flex-1 overflow-y-auto"- :class="showBreadcrumb || quickActionList.length > 0 ? 'mt-2' : ''"+ :class="showBreadcrumb && quickActionList.length == 0 ? 'mt-2' : ''"><!-- Start main area--><router-view name="content" />diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.tsindex 692ec71562..3ea81e841d 100644--- a/frontend/src/router/index.ts+++ b/frontend/src/router/index.ts@@ -162,16 +162,13 @@ const routes: Array<RouteRecordRaw> = ["quickaction.bb.database.branching","quickaction.bb.database.create","quickaction.bb.instance.create",- "quickaction.bb.project.create",];const DEVELOPER_QUICK_ACTION_LIST: QuickActionType[] = ["quickaction.bb.database.schema.update","quickaction.bb.database.data.update","quickaction.bb.database.branching",- "quickaction.bb.database.create","quickaction.bb.issue.grant.request.querier","quickaction.bb.issue.grant.request.exporter",- "quickaction.bb.project.create",];if (hasFeature("bb.feature.dba-workflow")) {pull(diff --git a/frontend/src/types/quickAction.ts b/frontend/src/types/quickAction.tsindex 994649a440..1906fb58c6 100644--- a/frontend/src/types/quickAction.ts+++ b/frontend/src/types/quickAction.ts@@ -6,15 +6,13 @@ export type ProjectQuickActionType =| "quickaction.bb.project.database.transfer"| "quickaction.bb.project.database.transfer-out";export type InstanceQuickActionType = "quickaction.bb.instance.create";-export type UserQuickActionType = "quickaction.bb.user.manage";export type DatabaseQuickActionType =| "quickaction.bb.database.create" // Used by DBA and Owner| "quickaction.bb.database.request" // Used by Developer (not yet)| "quickaction.bb.database.schema.update"| "quickaction.bb.database.data.update"// Schema designer quick action. (Maybe will be removed after changelist is implemented)- | "quickaction.bb.database.branching"- | "quickaction.bb.database.troubleshoot";+ | "quickaction.bb.database.branching";export type IssueQuickActionType =| "quickaction.bb.issue.grant.request.querier"| "quickaction.bb.issue.grant.request.exporter";@@ -25,7 +23,6 @@ export type QuickActionType =| EnvironmentQuickActionType| ProjectQuickActionType| InstanceQuickActionType- | UserQuickActionType| DatabaseQuickActionType| IssueQuickActionType| SubscriptionQuickActionType;