Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: multiple ui detail update (#9518)

ecmadao83011b1a2491
diff --git a/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue b/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue
index 221f0de438..6c6efde240 100644
--- a/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue
+++ b/frontend/src/components/AnomalyCenter/AnomalyCenterDashboard.vue
@@ -1,15 +1,10 @@
<template>
- <div class="flex flex-col">
+ <div class="flex flex-col space-y-4">
<FeatureAttentionForInstanceLicense
v-if="hasSchemaDriftFeature"
- custom-class="mb-4"
- feature="bb.feature.schema-drift"
- />
- <FeatureAttention
- v-else
- custom-class="my-4"
feature="bb.feature.schema-drift"
/>
+ <FeatureAttention v-else feature="bb.feature.schema-drift" />
<div class="textinfolabel">
{{ $t("anomaly.attention-desc") }}
@@ -23,7 +18,7 @@
</a>
</div>
- <div class="mt-4 space-y-4">
+ <div class="space-y-4">
<div v-for="(item, i) in anomalySummaryList" :key="i" class="space-y-2">
<h3 class="text-lg leading-6 font-medium text-main">
{{ i == 0 ? $t("common.database") : $t("common.instance") }}
diff --git a/frontend/src/components/Breadcrumb.vue b/frontend/src/components/Breadcrumb.vue
index 53d42632d1..39fbf9e069 100644
--- a/frontend/src/components/Breadcrumb.vue
+++ b/frontend/src/components/Breadcrumb.vue
@@ -1,6 +1,6 @@
<template>
<nav
- class="flex flex-row justify-between"
+ class="flex flex-row items-center justify-between"
aria-label="Breadcrumb"
data-label="bb-breadcrumb"
>
@@ -42,18 +42,19 @@
</div>
</div>
- <div class="tooltip-wrapper">
- <span class="tooltip-left whitespace-nowrap">
- {{ $t("common.show-help") }}
- </span>
- <HelpTriggerIcon v-if="helpName" :id="helpName" :is-guide="true" />
- </div>
+ <NTooltip v-if="helpName">
+ <template #trigger>
+ <HelpTriggerIcon class="ml-1" :id="helpName" :is-guide="true" />
+ </template>
+ {{ $t("common.show-help") }}
+ </NTooltip>
</nav>
</template>
-<script lang="ts">
+<script lang="ts" setup>
import { useTitle } from "@vueuse/core";
-import { computed, ComputedRef, defineComponent, onMounted, ref } from "vue";
+import { NTooltip } from "naive-ui";
+import { computed, ComputedRef, watchEffect, ref } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import HelpTriggerIcon from "@/components/HelpTriggerIcon.vue";
@@ -68,250 +69,229 @@ interface BreadcrumbItem {
path?: string;
}
-export default defineComponent({
- // eslint-disable-next-line vue/multi-word-component-names
- name: "Breadcrumb",
- components: {
- HelpTriggerIcon,
- TenantIcon,
- },
- setup() {
- const routerStore = useRouterStore();
- const currentRoute = useRouter().currentRoute;
- const { t } = useI18n();
- const projectV1Store = useProjectV1Store();
-
- const documentTitle = useTitle(null, { observe: true });
+const routerStore = useRouterStore();
+const currentRoute = useRouter().currentRoute;
+const { t } = useI18n();
+const projectV1Store = useProjectV1Store();
- const routeHelpNameMapList = ref<RouteMapList>([]);
- const helpName = computed(
- () =>
- routeHelpNameMapList.value.find(
- (pair) => pair.routeName === currentRoute.value.name
- )?.helpName
- );
+const documentTitle = useTitle(null, { observe: true });
- onMounted(async () => {
- const res = await fetch("/help/routeMapList.json");
- routeHelpNameMapList.value = await res.json();
- });
+const routeHelpNameMapList = ref<RouteMapList>([]);
+const helpName = computed(
+ () =>
+ routeHelpNameMapList.value.find(
+ (pair) => pair.routeName === currentRoute.value.name
+ )?.helpName
+);
- const isTenantProject: ComputedRef<boolean> = computed(() => {
- const routeSlug = routerStore.routeSlug(currentRoute.value);
- const projectSlug = routeSlug.projectSlug;
- if (projectSlug === undefined) {
- return false;
- }
- const project = projectV1Store.getProjectByUID(
- String(idFromSlug(projectSlug))
- );
- return project.tenantMode == TenantMode.TENANT_MODE_ENABLED;
- });
+watchEffect(async () => {
+ const res = await fetch("/help/routeMapList.json");
+ routeHelpNameMapList.value = await res.json();
+});
- const breadcrumbList = computed(() => {
- const route = currentRoute.value;
- const routeSlug = routerStore.routeSlug(currentRoute.value);
- const environmentSlug = routeSlug.environmentSlug;
- const projectSlug = routeSlug.projectSlug;
- const projectWebhookSlug = routeSlug.projectWebhookSlug;
- const instanceSlug = routeSlug.instanceSlug;
- const databaseSlug = routeSlug.databaseSlug;
- const tableName = routeSlug.tableName;
- const vcsSlug = routeSlug.vcsSlug;
- const sqlReviewPolicySlug = routeSlug.sqlReviewPolicySlug;
- const ssoName = routeSlug.ssoName;
+const isTenantProject: ComputedRef<boolean> = computed(() => {
+ const routeSlug = routerStore.routeSlug(currentRoute.value);
+ const projectSlug = routeSlug.projectSlug;
+ if (projectSlug === undefined) {
+ return false;
+ }
+ const project = projectV1Store.getProjectByUID(
+ String(idFromSlug(projectSlug))
+ );
+ return project.tenantMode == TenantMode.TENANT_MODE_ENABLED;
+});
- const changelistName = routeSlug.changelistName;
- const databaseGroupName = routeSlug.databaseGroupName;
- const schemaGroupName = routeSlug.schemaGroupName;
+const breadcrumbList = computed(() => {
+ const route = currentRoute.value;
+ const routeSlug = routerStore.routeSlug(currentRoute.value);
+ const environmentSlug = routeSlug.environmentSlug;
+ const projectSlug = routeSlug.projectSlug;
+ const projectWebhookSlug = routeSlug.projectWebhookSlug;
+ const instanceSlug = routeSlug.instanceSlug;
+ const databaseSlug = routeSlug.databaseSlug;
+ const tableName = routeSlug.tableName;
+ const vcsSlug = routeSlug.vcsSlug;
+ const sqlReviewPolicySlug = routeSlug.sqlReviewPolicySlug;
+ const ssoName = routeSlug.ssoName;
- const list: Array<BreadcrumbItem> = [];
- if (environmentSlug) {
- list.push({
- name: t("common.environments"),
- path: "/environment",
- });
- } else if (projectSlug) {
- list.push({
- name: t("common.projects"),
- path: "/project",
- });
+ const changelistName = routeSlug.changelistName;
+ const databaseGroupName = routeSlug.databaseGroupName;
+ const schemaGroupName = routeSlug.schemaGroupName;
- const project = projectV1Store.getProjectByUID(
- String(idFromSlug(projectSlug))
- );
+ const list: Array<BreadcrumbItem> = [];
+ if (environmentSlug) {
+ list.push({
+ name: t("common.environments"),
+ path: "/environment",
+ });
+ } else if (projectSlug) {
+ list.push({
+ name: t("common.projects"),
+ path: "/project",
+ });
- if (projectWebhookSlug) {
- list.push({
- name: `${project.title}`,
- path: `/project/${projectSlug}`,
- });
- } else if (databaseGroupName) {
- list.push(
- {
- name: project.title,
- path: `/project/${projectV1Slug(project)}`,
- },
- {
- name: t("common.database-groups"),
- path: `/project/${projectSlug}#database-groups`,
- }
- );
+ const project = projectV1Store.getProjectByUID(
+ String(idFromSlug(projectSlug))
+ );
- if (schemaGroupName) {
- list.push(
- {
- name: databaseGroupName,
- path: `/project/${projectSlug}/database-groups/${databaseGroupName}`,
- },
- {
- name: `Tables - ${schemaGroupName}`,
- }
- );
- } else {
- list.push({
- name: databaseGroupName,
- });
- }
- } else if (changelistName) {
- list.push(
- {
- name: project.title,
- path: `/project/${projectV1Slug(project)}`,
- },
- {
- name: t("changelist.self"),
- path: `/project/${projectSlug}#changelists`,
- }
- );
- } else if (route.name === "workspace.branch.detail") {
- list.push(
- {
- name: project.title,
- path: `/project/${projectV1Slug(project)}`,
- },
- {
- name: t("common.branches"),
- path: `/project/${projectV1Slug(project)}#branches`,
- }
- );
+ if (projectWebhookSlug) {
+ list.push({
+ name: `${project.title}`,
+ path: `/project/${projectSlug}`,
+ });
+ } else if (databaseGroupName) {
+ list.push(
+ {
+ name: project.title,
+ path: `/project/${projectV1Slug(project)}`,
+ },
+ {
+ name: t("common.database-groups"),
+ path: `/project/${projectSlug}#database-groups`,
}
- } else if (instanceSlug) {
- list.push({
- name: t("common.instances"),
- path: "/instance",
- });
- } else if (databaseSlug) {
- const database = useDatabaseV1Store().getDatabaseByUID(
- String(idFromSlug(databaseSlug))
- );
+ );
+ if (schemaGroupName) {
list.push(
{
- name: t("common.projects"),
- path: "/project",
+ name: databaseGroupName,
+ path: `/project/${projectSlug}/database-groups/${databaseGroupName}`,
},
{
- name: `${database.projectEntity.title}`,
- path: `/project/${projectV1Slug(database.projectEntity)}`,
- },
- {
- name: t("common.databases"),
- path: "/db",
+ name: `Tables - ${schemaGroupName}`,
}
);
-
- if (tableName) {
- list.push({
- name: database.databaseName,
- path: `/db/${databaseSlug}`,
- });
- }
- } else if (vcsSlug) {
+ } else {
list.push({
- name: t("common.gitops"),
- path: "/setting/gitops",
+ name: databaseGroupName,
});
- } else if (sqlReviewPolicySlug) {
- list.push({
- name: t("sql-review.title"),
- path: "/setting/sql-review",
- });
- } else if (ssoName) {
- if (route.name !== "setting.workspace.sso.create") {
- list.push({
- name: t("settings.sidebar.sso"),
- path: "/setting/sso",
- });
- }
}
- if (route.name === "workspace.database.history.detail") {
- const parent = `instances/${route.params.instance}/databases/${route.params.database}`;
- const database = useDatabaseV1Store().getDatabaseByName(parent);
+ } else if (changelistName) {
+ list.push(
+ {
+ name: project.title,
+ path: `/project/${projectV1Slug(project)}`,
+ },
+ {
+ name: t("changelist.self"),
+ path: `/project/${projectSlug}#changelists`,
+ }
+ );
+ } else if (route.name === "workspace.branch.detail") {
+ list.push(
+ {
+ name: project.title,
+ path: `/project/${projectV1Slug(project)}`,
+ },
+ {
+ name: t("common.branches"),
+ path: `/project/${projectV1Slug(project)}#branches`,
+ }
+ );
+ }
+ } else if (instanceSlug) {
+ list.push({
+ name: t("common.instances"),
+ path: "/instance",
+ });
+ } else if (databaseSlug) {
+ const database = useDatabaseV1Store().getDatabaseByUID(
+ String(idFromSlug(databaseSlug))
+ );
- list.push(
- {
- name: t("common.projects"),
- path: "/project",
- },
- {
- name: `${database.projectEntity.title}`,
- path: `/project/${projectV1Slug(database.projectEntity)}`,
- },
- {
- name: t("common.databases"),
- path: "/db",
- },
- {
- name: database.databaseName,
- path: `/db/${databaseV1Slug(database)}`,
- },
- {
- name: t("common.change"),
- path: `/db/${databaseV1Slug(database)}#change-history`,
- }
- );
- } else if ((route.name ?? "")?.toString().startsWith("setting.")) {
- list.push({
- name: t("common.settings"),
- });
+ list.push(
+ {
+ name: t("common.projects"),
+ path: "/project",
+ },
+ {
+ name: `${database.projectEntity.title}`,
+ path: `/project/${projectV1Slug(database.projectEntity)}`,
+ },
+ {
+ name: t("common.databases"),
+ path: "/db",
}
+ );
- const {
- title: routeTitle,
- overrideTitle,
- overrideBreadcrumb,
- } = route.meta;
+ if (tableName) {
+ list.push({
+ name: database.databaseName,
+ path: `/db/${databaseSlug}`,
+ });
+ }
+ } else if (vcsSlug) {
+ list.push({
+ name: t("common.gitops"),
+ path: "/setting/gitops",
+ });
+ } else if (sqlReviewPolicySlug) {
+ list.push({
+ name: t("sql-review.title"),
+ path: "/setting/sql-review",
+ });
+ } else if (ssoName) {
+ if (route.name !== "setting.workspace.sso.create") {
+ list.push({
+ name: t("settings.sidebar.sso"),
+ path: "/setting/sso",
+ });
+ }
+ }
+ if (route.name === "workspace.database.history.detail") {
+ const parent = `instances/${route.params.instance}/databases/${route.params.database}`;
+ const database = useDatabaseV1Store().getDatabaseByName(parent);
- // Dynamic title priorities
- // 1. documentTitle - if (overrideTitle === true)
- // 2. routeTitle - if (routeTitle !== undefined)
- // 3. nothing - otherwise
- const title = overrideTitle
- ? documentTitle.value ?? ""
- : routeTitle?.(route) ?? "";
- if (title) {
- if (overrideBreadcrumb && overrideBreadcrumb(route)) {
- list.length = 0; // empty the array
- }
- list.push({
- name: title,
- // Set empty path for the current route to make the link not clickable.
- // We do this because clicking the current route path won't trigger reload and would
- // confuse user since UI won't change while we may have cleared all query parameters.
- path: "",
- });
+ list.push(
+ {
+ name: t("common.projects"),
+ path: "/project",
+ },
+ {
+ name: `${database.projectEntity.title}`,
+ path: `/project/${projectV1Slug(database.projectEntity)}`,
+ },
+ {
+ name: t("common.databases"),
+ path: "/db",
+ },
+ {
+ name: database.databaseName,
+ path: `/db/${databaseV1Slug(database)}`,
+ },
+ {
+ name: t("common.change"),
+ path: `/db/${databaseV1Slug(database)}#change-history`,
}
+ );
+ } else if ((route.name ?? "")?.toString().startsWith("setting.")) {
+ list.push({
+ name: t("common.settings"),
+ });
+ }
+
+ const { title: routeTitle, overrideTitle, overrideBreadcrumb } = route.meta;
- return list;
+ // Dynamic title priorities
+ // 1. documentTitle - if (overrideTitle === true)
+ // 2. routeTitle - if (routeTitle !== undefined)
+ // 3. nothing - otherwise
+ const title = overrideTitle
+ ? documentTitle.value ?? ""
+ : routeTitle?.(route) ?? "";
+ if (title) {
+ if (overrideBreadcrumb && overrideBreadcrumb(route)) {
+ list.length = 0; // empty the array
+ }
+ list.push({
+ name: title,
+ // Set empty path for the current route to make the link not clickable.
+ // We do this because clicking the current route path won't trigger reload and would
+ // confuse user since UI won't change while we may have cleared all query parameters.
+ path: "",
});
+ }
- return {
- isTenantProject,
- breadcrumbList,
- currentRoute,
- helpName,
- };
- },
+ return list;
});
</script>
diff --git a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue
index aacdb8b210..c00abaaed5 100644
--- a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue
+++ b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue
@@ -1,5 +1,5 @@
<template>
- <div class="flex flex-col gap-y-2">
+ <div class="flex flex-col gap-y-3">
<NavBar :disable-project-select="!!project" />
<ChangelistTable
diff --git a/frontend/src/components/Changelist/ChangelistDashboard/NavBar.vue b/frontend/src/components/Changelist/ChangelistDashboard/NavBar.vue
index 1b2b8e965d..b8ba56c483 100644
--- a/frontend/src/components/Changelist/ChangelistDashboard/NavBar.vue
+++ b/frontend/src/components/Changelist/ChangelistDashboard/NavBar.vue
@@ -1,5 +1,5 @@
<template>
- <div class="flex flex-row items-center justify-between py-0.5">
+ <div class="flex flex-row items-center justify-between">
<div class="flex items-center justify-start">
<ProjectSelect
v-if="!disableProjectSelect"
diff --git a/frontend/src/components/DatabaseBackupPanel.vue b/frontend/src/components/DatabaseBackupPanel.vue
index 560507bcd6..d6261c415b 100644
--- a/frontend/src/components/DatabaseBackupPanel.vue
+++ b/frontend/src/components/DatabaseBackupPanel.vue
@@ -89,14 +89,14 @@
<span class="ml-1 text-control-light">{{
$t("database.backup.disabled")
}}</span>
- <button
- v-if="allowAdmin && !state.autoBackupEnabled"
- type="button"
- class="ml-4 btn-primary"
- @click.prevent="state.showBackupSettingModal = true"
- >
- {{ $t("database.enable-backup") }}
- </button>
+ <div v-if="allowAdmin && !state.autoBackupEnabled" class="ml-4">
+ <NButton
+ type="primary"
+ @click.prevent="state.showBackupSettingModal = true"
+ >
+ {{ $t("database.enable-backup") }}
+ </NButton>
+ </div>
</div>
</div>
<div class="pt-6 space-y-4">
@@ -112,14 +112,13 @@
:allow-admin="allowAdmin"
/>
- <button
+ <NButton
v-if="allowEdit && !disableBackupButton"
- type="button"
- class="btn-normal whitespace-nowrap items-center"
+ type="primary"
@click.prevent="state.showCreateBackupModal = true"
>
{{ $t("database.backup-now") }}
- </button>
+ </NButton>
</div>
</div>
<BackupTable
diff --git a/frontend/src/components/DebugLog/DebugLogEmptyView.vue b/frontend/src/components/DebugLog/DebugLogEmptyView.vue
deleted file mode 100644
index d525c0d77f..0000000000
--- a/frontend/src/components/DebugLog/DebugLogEmptyView.vue
+++ /dev/null
@@ -1,14 +0,0 @@
-<template>
- <div class="bg-white rounded-lg py-6">
- <div
- class="border-4 border-dashed border-gray-200 rounded-lg h-96 flex justify-center items-center"
- >
- <div class="text-center flex flex-col justify-center items-center">
- <img src="../../assets/illustration/no-data.webp" class="w-52" />
- <h3 class="mt-2 font-medium text-gray-900">
- {{ $t("debug-log.no-logs") }}
- </h3>
- </div>
- </div>
- </div>
-</template>
diff --git a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
index 4782366c94..d2b81bc53b 100644
--- a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
+++ b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
@@ -1,5 +1,5 @@
<template>
- <div ref="containerRef" class="px-4 py-6 lg:flex">
+ <div ref="containerRef" class="py-6 lg:flex">
<div class="text-left lg:w-1/4">
<h1 class="text-2xl font-bold">
{{ $t("settings.general.workspace.plugin.openai.ai-augmentation") }}
@@ -86,15 +86,14 @@
:value="state.openAIEndpoint"
@input="handleOpenAIEndpointChange"
/>
- <div class="flex">
- <button
- type="button"
- class="btn-primary ml-auto"
+ <div class="flex justify-end">
+ <NButton
+ type="primary"
:disabled="!allowSave"
@click.prevent="updateOpenAIKeyEndpoint"
>
{{ $t("common.update") }}
- </button>
+ </NButton>
</div>
</div>
</div>
diff --git a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue b/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
index 2216c75552..0e61ed6f68 100644
--- a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
+++ b/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
@@ -1,5 +1,5 @@
<template>
- <div class="px-4 py-6 lg:flex">
+ <div class="py-6 lg:flex">
<div class="text-left lg:w-1/4">
<h1 class="text-2xl font-bold">
{{ $t("settings.general.workspace.announcement.self") }}
@@ -103,15 +103,14 @@
@input="handleExtraDetailsChange"
/>
- <div class="flex">
- <button
- type="button"
- class="btn-primary ml-auto"
+ <div class="flex justify-end">
+ <NButton
+ type="primary"
:disabled="!allowSave"
@click.prevent="updateAnnouncementSetting"
>
{{ $t("common.update") }}
- </button>
+ </NButton>
</div>
</div>
</div>
diff --git a/frontend/src/components/GeneralSetting/BrandingSetting.vue b/frontend/src/components/GeneralSetting/BrandingSetting.vue
index eb53981e40..6e096ae6ec 100644
--- a/frontend/src/components/GeneralSetting/BrandingSetting.vue
+++ b/frontend/src/components/GeneralSetting/BrandingSetting.vue
@@ -1,5 +1,5 @@
<template>
- <div class="px-4 py-6 lg:flex">
+ <div class="py-6 lg:flex">
<div class="text-left lg:w-1/4">
<h1 class="text-2xl font-bold">
{{ $t("settings.general.workspace.branding") }}
@@ -77,9 +77,8 @@
{{ t("settings.general.workspace.confirm-delete-custom-logo") }}
</template>
</NPopconfirm>
- <button
- type="button"
- class="btn-primary"
+ <NButton
+ type="primary"
:disabled="!allowSave"
@click.prevent="uploadLogo"
>
@@ -88,7 +87,7 @@
custom-class="text-white pointer-events-none"
/>
{{ $t("common.update") }}
- </button>
+ </NButton>
</div>
</div>
</div>
diff --git a/frontend/src/components/GeneralSetting/NetworkSetting.vue b/frontend/src/components/GeneralSetting/NetworkSetting.vue
index a7ef857857..5fbf11b0e9 100644
--- a/frontend/src/components/GeneralSetting/NetworkSetting.vue
+++ b/frontend/src/components/GeneralSetting/NetworkSetting.vue
@@ -1,5 +1,5 @@
<template>
- <div class="px-4 py-6 lg:flex">
+ <div class="lg:flex">
<div class="text-left lg:w-1/4">
<h1 class="text-2xl font-bold">
{{ $t("settings.general.workspace.network") }}
@@ -71,15 +71,14 @@
@input="handleGitOpsWebhookUrlChange"
/>
- <div class="flex">
- <button
- type="button"
- class="btn-primary ml-auto"
+ <div class="flex justify-end">
+ <NButton
+ type="primary"
:disabled="!allowSave"
@click.prevent="updateNetworkSetting"
>
{{ $t("common.update") }}
- </button>
+ </NButton>
</div>
</div>
</div>
diff --git a/frontend/src/components/GeneralSetting/SecuritySetting.vue b/frontend/src/components/GeneralSetting/SecuritySetting.vue
index 5ffb752b7d..30dac8c9b9 100644
--- a/frontend/src/components/GeneralSetting/SecuritySetting.vue
+++ b/frontend/src/components/GeneralSetting/SecuritySetting.vue
@@ -1,5 +1,5 @@
<template>
- <div class="px-4 py-6 lg:flex">
+ <div class="py-6 lg:flex">
<div class="text-left lg:w-1/4">
<h1 class="text-2xl font-bold">
{{ $t("settings.general.workspace.security") }}
diff --git a/frontend/src/components/HelpTriggerIcon.vue b/frontend/src/components/HelpTriggerIcon.vue
index fb2790f631..2150c2f406 100644
--- a/frontend/src/components/HelpTriggerIcon.vue
+++ b/frontend/src/components/HelpTriggerIcon.vue
@@ -1,36 +1,18 @@
<template>
- <heroicons-outline:question-mark-circle
- class="w-5 h-5 cursor-pointer"
- @click="handleClick"
- />
+ <HelpCircleIcon class="w-4 h-4 cursor-pointer" @click="handleClick" />
</template>
-<script lang="ts">
-import { defineComponent } from "vue";
+<script lang="ts" setup>
+import { HelpCircleIcon } from "lucide-vue-next";
import { useHelpStore } from "@/store";
-export default defineComponent({
- name: "HelpTrigger",
- props: {
- id: {
- type: String,
- required: true,
- default: "",
- },
- openByDefault: {
- type: Boolean,
- required: false,
- default: false,
- },
- },
- setup: (props) => {
- const helpStore = useHelpStore();
- const handleClick = () => {
- helpStore.showHelp(props.id, props.openByDefault);
- };
- return {
- handleClick,
- };
- },
-});
+const props = defineProps<{
+ id: string;
+ openByDefault?: boolean;
+}>();
+
+const helpStore = useHelpStore();
+const handleClick = () => {
+ helpStore.showHelp(props.id, props.openByDefault);
+};
</script>
diff --git a/frontend/src/components/Project/ProjectGeneralSettingPanel.vue b/frontend/src/components/Project/ProjectGeneralSettingPanel.vue
index 684ee4cd21..0bd9de2830 100644
--- a/frontend/src/components/Project/ProjectGeneralSettingPanel.vue
+++ b/frontend/src/components/Project/ProjectGeneralSettingPanel.vue
@@ -91,14 +91,9 @@
</div>
<div v-if="allowEdit" class="flex justify-end">
- <button
- type="button"
- class="btn-primary"
- :disabled="!allowSave"
- @click.prevent="save"
- >
+ <NButton type="primary" :disabled="!allowSave" @click.prevent="save">
{{ $t("common.update") }}
- </button>
+ </NButton>
</div>
<FeatureModal
diff --git a/frontend/src/components/Project/ProjectIssuesPanel.vue b/frontend/src/components/Project/ProjectIssuesPanel.vue
index ecd0fac83d..4457198389 100644
--- a/frontend/src/components/Project/ProjectIssuesPanel.vue
+++ b/frontend/src/components/Project/ProjectIssuesPanel.vue
@@ -1,5 +1,5 @@
<template>
- <div class="flex flex-col gap-y-2 -mt-4">
+ <div class="flex flex-col gap-y-2">
<IssueSearch
v-model:params="state.params"
:readonly-scopes="readonlyScopes"
diff --git a/frontend/src/components/ProjectBranchesPanel.vue b/frontend/src/components/ProjectBranchesPanel.vue
index c4c9120a18..ad5e7c5cc5 100644
--- a/frontend/src/components/ProjectBranchesPanel.vue
+++ b/frontend/src/components/ProjectBranchesPanel.vue
@@ -1,5 +1,5 @@
<template>
- <div class="space-y-3 pt-2 w-full overflow-x-auto">
+ <div class="space-y-3 w-full overflow-x-auto">
<div class="w-full flex flex-row justify-between items-center">
<div class="flex flex-row justify-start items-center"></div>
<div class="flex flex-row justify-end items-center gap-x-2">
diff --git a/frontend/src/components/ProjectDatabasesPanel.vue b/frontend/src/components/ProjectDatabasesPanel.vue
index a56d0040f3..0d0c862c8c 100644
--- a/frontend/src/components/ProjectDatabasesPanel.vue
+++ b/frontend/src/components/ProjectDatabasesPanel.vue
@@ -1,15 +1,13 @@
<template>
<div class="space-y-2">
<div
- class="text-lg font-medium leading-7 text-main flex items-center justify-between"
+ class="text-lg font-medium leading-7 text-main flex flex-col lg:flex-row items-start lg:items-center justify-between space-y-2"
>
- <div class="flex items-center">
- <EnvironmentTabFilter
- :environment="state.environment"
- :include-all="true"
- @update:environment="state.environment = $event"
- />
- </div>
+ <EnvironmentTabFilter
+ :environment="state.environment"
+ :include-all="true"
+ @update:environment="state.environment = $event"
+ />
<NInputGroup style="width: auto">
<DatabaseLabelFilter
v-model:selected="state.selectedLabels"
@@ -25,11 +23,13 @@
state.instance = $event ? String($event) : String(UNKNOWN_ID)
"
/>
- <SearchBox
- :value="state.keyword"
- :placeholder="$t('common.filter-by-name')"
- @update:value="state.keyword = $event"
- />
+ <div class="hidden md:block">
+ <SearchBox
+ :value="state.keyword"
+ :placeholder="$t('common.filter-by-name')"
+ @update:value="state.keyword = $event"
+ />
+ </div>
</NInputGroup>
</div>
diff --git a/frontend/src/components/ProjectDeploymentConfigPanel.vue b/frontend/src/components/ProjectDeploymentConfigPanel.vue
index 85170e5318..6ef88d95db 100644
--- a/frontend/src/components/ProjectDeploymentConfigPanel.vue
+++ b/frontend/src/components/ProjectDeploymentConfigPanel.vue
@@ -36,32 +36,27 @@
/>
<div class="pt-4 border-t flex justify-between items-center">
<div class="flex items-center space-x-2">
- <button v-if="allowEdit" class="btn-normal" @click="addStage">
+ <NButton v-if="allowEdit" @click="addStage">
{{ $t("deployment-config.add-stage") }}
- </button>
+ </NButton>
</div>
<div class="flex items-center space-x-2">
- <button
+ <NButton
v-if="allowEdit"
- class="btn-normal"
:disabled="!isDeploymentConfigDirty"
@click="revertDeploymentConfig"
>
{{ $t("common.revert") }}
- </button>
+ </NButton>
<NPopover v-if="allowEdit" :disabled="!state.error" trigger="hover">
<template #trigger>
- <div
- class="btn-primary"
- :class="
- !allowUpdateDeploymentConfig
- ? 'bg-accent opacity-50 cursor-not-allowed'
- : ''
- "
+ <NButton
+ type="primary"
+ :disabled="!allowUpdateDeploymentConfig"
@click="updateDeploymentConfig"
>
{{ $t("common.update") }}
- </div>
+ </NButton>
</template>
<span v-if="state.error" class="text-error">
diff --git a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
index 0ad1d1edcc..16fd42cfc6 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
@@ -1,20 +1,8 @@
<template>
- <div class="w-full mx-auto">
- <FeatureAttention custom-class="my-4" feature="bb.feature.rbac" />
+ <div class="w-full mx-auto space-y-4">
+ <FeatureAttention feature="bb.feature.rbac" />
- <div class="mb-4 textinfolabel">
- {{ $t("project.members.description") }}
- <a
- href="https://www.bytebase.com/docs/concepts/roles-and-permissions/#project-roles?source=console"
- target="_blank"
- class="normal-link inline-flex flex-row items-center"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4" />
- </a>
- </div>
-
- <div class="mb-4 w-full flex flex-row justify-between items-center">
+ <div class="w-full flex flex-row justify-between items-center">
<div>
<SearchBox
v-model:value="state.searchText"
@@ -39,6 +27,18 @@
</div>
</div>
+ <div class="textinfolabel">
+ {{ $t("project.members.description") }}
+ <a
+ href="https://www.bytebase.com/docs/concepts/roles-and-permissions/#project-roles?source=console"
+ target="_blank"
+ class="normal-link inline-flex flex-row items-center"
+ >
+ {{ $t("common.learn-more") }}
+ <heroicons-outline:external-link class="w-4 h-4" />
+ </a>
+ </div>
+
<NTabs v-model:value="state.selectedTab" type="bar">
<NTabPane name="users" :tab="$t('project.members.users')">
<ProjectMemberTable
@@ -104,15 +104,13 @@
</NTabPane>
</NTabs>
- <div class="mt-2">
- <BBButtonConfirm
- v-if="allowRemoveExpiredRoles"
- :style="'DELETE'"
- :button-text="$t('project.members.clean-up-expired-roles')"
- :require-confirm="true"
- @confirm="handleRemoveExpiredRoles"
- />
- </div>
+ <BBButtonConfirm
+ v-if="allowRemoveExpiredRoles"
+ :style="'DELETE'"
+ :button-text="$t('project.members.clean-up-expired-roles')"
+ :require-confirm="true"
+ @confirm="handleRemoveExpiredRoles"
+ />
</div>
<AddProjectMembersPanel
diff --git a/frontend/src/components/ProjectWebhookPanel.vue b/frontend/src/components/ProjectWebhookPanel.vue
index 054dbabe35..fbcfc2d671 100644
--- a/frontend/src/components/ProjectWebhookPanel.vue
+++ b/frontend/src/components/ProjectWebhookPanel.vue
@@ -1,13 +1,9 @@
<template>
<div class="space-y-4 divide-y divide-block-border">
<div v-if="allowEdit" class="flex items-center justify-end">
- <button
- type="button"
- class="btn-primary ml-3 inline-flex justify-center py-2 px-4"
- @click.prevent="addProjectWebhook"
- >
+ <NButton type="primary" @click.prevent="addProjectWebhook">
{{ $t("project.webhook.add-a-webhook") }}
- </button>
+ </NButton>
</div>
<div class="pt-4">
<div v-if="projectWebhookList.length > 0" class="space-y-6">
diff --git a/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue b/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
index 399e402f86..688a929179 100644
--- a/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
+++ b/frontend/src/components/SensitiveData/GlobalMaskingRulesView.vue
@@ -1,108 +1,97 @@
<template>
<div class="w-full space-y-4">
- <div
- class="flex flex-col lg:flex-row items-start lg:items-center justify-between space-y-2"
- >
- <div class="textinfolabel">
- {{ $t("settings.sensitive-data.global-rules.description") }}
- <LearnMoreLink
- url="https://www.bytebase.com/docs/security/mask-data?source=console"
- />
+ <div class="flex flex-row items-center justify-end">
+ <div v-if="state.reorderRules" class="flex items-center gap-x-3">
+ <NButton
+ :disabled="state.processing"
+ @click="
+ () => {
+ state.reorderRules = false;
+ updateList();
+ }
+ "
+ >
+ {{ $t("common.cancel") }}
+ </NButton>
+ <NButton
+ type="primary"
+ :disabled="state.processing"
+ @click="onReorderSubmit"
+ >
+ {{ $t("common.confirm") }}
+ </NButton>
</div>
- <div>
- <div v-if="state.reorderRules" class="flex items-center gap-x-3">
- <NButton
- :disabled="state.processing"
- @click="
- () => {
- state.reorderRules = false;
- updateList();
- }
- "
- >
- {{ $t("common.cancel") }}
- </NButton>
- <NButton
- type="primary"
- :disabled="state.processing"
- @click="onReorderSubmit"
- >
- {{ $t("common.confirm") }}
- </NButton>
- </div>
- <div v-else class="flex items-center gap-x-3">
- <NButton
- secondary
- type="primary"
- :disabled="
- !hasPermission ||
- !hasSensitiveDataFeature ||
- state.maskingRuleItemList.length <= 1
- "
- @click="state.reorderRules = true"
- >
- {{ $t("settings.sensitive-data.global-rules.re-order") }}
- </NButton>
- <NButton
- type="primary"
- :disabled="!hasPermission || !hasSensitiveDataFeature"
- @click="addNewRule"
- >
- {{ $t("common.add") }}
- </NButton>
- </div>
+ <div v-else class="flex items-center gap-x-3">
+ <NButton
+ secondary
+ type="primary"
+ :disabled="
+ !hasPermission ||
+ !hasSensitiveDataFeature ||
+ state.maskingRuleItemList.length <= 1
+ "
+ @click="state.reorderRules = true"
+ >
+ {{ $t("settings.sensitive-data.global-rules.re-order") }}
+ </NButton>
+ <NButton
+ type="primary"
+ :disabled="!hasPermission || !hasSensitiveDataFeature"
+ @click="addNewRule"
+ >
+ {{ $t("common.add") }}
+ </NButton>
</div>
</div>
- <div class="space-y-5 divide-y-2 pb-10 divide-gray-100">
- <div
- v-if="state.maskingRuleItemList.length === 0"
- class="border-4 border-dashed border-gray-200 rounded-lg h-96 flex justify-center items-center"
- >
- <NoData />
- </div>
+ <div class="textinfolabel">
+ {{ $t("settings.sensitive-data.global-rules.description") }}
+ <LearnMoreLink
+ url="https://www.bytebase.com/docs/security/mask-data?source=console"
+ />
+ </div>
+ <NoDataPlaceholder v-if="state.maskingRuleItemList.length === 0" />
+ <div
+ v-for="(item, index) in state.maskingRuleItemList"
+ :key="item.rule.id"
+ class="flex items-start gap-x-5 pt-4"
+ >
<div
- v-for="(item, index) in state.maskingRuleItemList"
- :key="item.rule.id"
- class="flex items-start gap-x-5 pt-4"
+ v-if="
+ item.mode === 'NORMAL' && hasPermission && hasSensitiveDataFeature
+ "
>
- <div
- v-if="
- item.mode === 'NORMAL' && hasPermission && hasSensitiveDataFeature
- "
- >
- <div v-if="state.reorderRules" class="pt-2 flex flex-col">
- <MiniActionButton v-if="index > 0" @click="onReorder(item, -1)">
- <ChevronUpIcon class="w-4 h-4" />
- </MiniActionButton>
- <MiniActionButton
- v-if="index !== state.maskingRuleItemList.length - 1"
- @click="onReorder(item, 1)"
- >
- <ChevronDownIcon class="w-4 h-4" />
- </MiniActionButton>
- </div>
- <div v-else class="pt-2">
- <MiniActionButton @click="onEdit(index)">
- <PencilIcon class="w-4 h-4" />
- </MiniActionButton>
- </div>
+ <div v-if="state.reorderRules" class="pt-2 flex flex-col">
+ <MiniActionButton v-if="index > 0" @click="onReorder(item, -1)">
+ <ChevronUpIcon class="w-4 h-4" />
+ </MiniActionButton>
+ <MiniActionButton
+ v-if="index !== state.maskingRuleItemList.length - 1"
+ @click="onReorder(item, 1)"
+ >
+ <ChevronDownIcon class="w-4 h-4" />
+ </MiniActionButton>
</div>
- <div :class="['w-full', item.mode === 'NORMAL' ? '' : 'ml-[42px]']">
- <MaskingRuleConfig
- :key="`expr-${item.rule.id}`"
- :index="index + 1"
- :disabled="state.processing"
- :masking-rule="item.rule"
- :readonly="item.mode === 'NORMAL' || state.reorderRules"
- :factor-list="factorList"
- :factor-options-map="factorOptionsMap"
- :allow-delete="item.mode === 'EDIT'"
- @cancel="onCancel(index)"
- @delete="onRuleDelete(index)"
- @confirm="(rule: MaskingRulePolicy_MaskingRule) => onConfirm(rule)"
- />
+ <div v-else class="pt-2">
+ <MiniActionButton @click="onEdit(index)">
+ <PencilIcon class="w-4 h-4" />
+ </MiniActionButton>
</div>
</div>
+ <div :class="['w-full', item.mode === 'NORMAL' ? '' : 'ml-[42px]']">
+ <MaskingRuleConfig
+ :key="`expr-${item.rule.id}`"
+ :index="index + 1"
+ :disabled="state.processing"
+ :masking-rule="item.rule"
+ :readonly="item.mode === 'NORMAL' || state.reorderRules"
+ :factor-list="factorList"
+ :factor-options-map="factorOptionsMap"
+ :allow-delete="item.mode === 'EDIT'"
+ @cancel="onCancel(index)"
+ @delete="onRuleDelete(index)"
+ @confirm="(rule: MaskingRulePolicy_MaskingRule) => onConfirm(rule)"
+ />
+ </div>
</div>
</div>
</template>
@@ -130,7 +119,6 @@ import {
MaskingRulePolicy_MaskingRule,
} from "@/types/proto/v1/org_policy_service";
import { arraySwap, hasWorkspacePermissionV1 } from "@/utils";
-import NoData from "../misc/NoData.vue";
import { MiniActionButton } from "../v2";
import MaskingRuleConfig from "./components/MaskingRuleConfig.vue";
import {
diff --git a/frontend/src/components/SensitiveData/NoDataPlaceholder.vue b/frontend/src/components/SensitiveData/NoDataPlaceholder.vue
new file mode 100644
index 0000000000..7fc91c9286
--- /dev/null
+++ b/frontend/src/components/SensitiveData/NoDataPlaceholder.vue
@@ -0,0 +1,13 @@
+<template>
+ <div
+ class="border-4 border-dashed border-gray-200 rounded-lg h-96 flex justify-center items-center"
+ >
+ <NoData
+ :img-attrs="{
+ class: '!w-auto max-h-[30vh]',
+ }"
+ />
+ </div>
+</template>
+
+<script lang="ts" setup></script>
diff --git a/frontend/src/components/SensitiveData/SemanticTypesView.vue b/frontend/src/components/SensitiveData/SemanticTypesView.vue
index 16652a50ac..91d157e0fb 100644
--- a/frontend/src/components/SensitiveData/SemanticTypesView.vue
+++ b/frontend/src/components/SensitiveData/SemanticTypesView.vue
@@ -1,37 +1,33 @@
<template>
<div class="w-full space-y-4">
- <div
- class="flex flex-col lg:flex-row items-start lg:items-center justify-between space-y-2 lg:space-x-2"
- >
- <div class="textinfolabel">
- {{ $t("settings.sensitive-data.semantic-types.label") }}
- </div>
- <div class="flex items-center justify-end space-x-2">
- <NButton
- :disabled="!hasPermission || !hasSensitiveDataFeature"
- @click="state.showTemplateDrawer = true"
- >
- {{ $t("settings.sensitive-data.semantic-types.use-predefined-type") }}
- </NButton>
- <NButton
- type="primary"
- :disabled="!hasPermission || !hasSensitiveDataFeature"
- @click="onAdd"
- >
- {{ $t("common.add") }}
- </NButton>
- </div>
+ <div class="flex items-center justify-end space-x-2">
+ <NButton
+ :disabled="!hasPermission || !hasSensitiveDataFeature"
+ @click="state.showTemplateDrawer = true"
+ >
+ {{ $t("settings.sensitive-data.semantic-types.use-predefined-type") }}
+ </NButton>
+ <NButton
+ type="primary"
+ :disabled="!hasPermission || !hasSensitiveDataFeature"
+ @click="onAdd"
+ >
+ {{ $t("common.add") }}
+ </NButton>
</div>
- <div class="space-y-5 divide-y-2 pb-10 divide-gray-100">
- <SemanticTypesTable
- :readonly="!hasPermission || !hasSensitiveDataFeature"
- :row-clickable="false"
- :semantic-item-list="state.semanticItemList"
- @cancel="onCancel"
- @remove="onRemove"
- @confirm="onConfirm"
- />
+ <div class="textinfolabel">
+ {{ $t("settings.sensitive-data.semantic-types.label") }}
</div>
+ <SemanticTypesTable
+ v-if="state.semanticItemList.length > 0"
+ :readonly="!hasPermission || !hasSensitiveDataFeature"
+ :row-clickable="false"
+ :semantic-item-list="state.semanticItemList"
+ @cancel="onCancel"
+ @remove="onRemove"
+ @confirm="onConfirm"
+ />
+ <NoDataPlaceholder v-else />
</div>
<SemanticTemplateDrawer
:show="state.showTemplateDrawer"
diff --git a/frontend/src/components/SensitiveData/SensitiveColumnView.vue b/frontend/src/components/SensitiveData/SensitiveColumnView.vue
index cfc5109805..7ad9ad783e 100644
--- a/frontend/src/components/SensitiveData/SensitiveColumnView.vue
+++ b/frontend/src/components/SensitiveData/SensitiveColumnView.vue
@@ -76,13 +76,7 @@
@checked:update="updateCheckedColumnList($event)"
/>
- <template v-else>
- <NoData
- :img-attrs="{
- class: '!w-auto max-h-[30vh]',
- }"
- />
- </template>
+ <NoDataPlaceholder v-else />
</div>
<FeatureModal
@@ -131,7 +125,6 @@ import { NInputGroup } from "naive-ui";
import { computed, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
-import NoData from "@/components/misc/NoData.vue";
import {
ProjectSelect,
InstanceSelect,
diff --git a/frontend/src/components/SlowQuery/Panel/LogFilter.vue b/frontend/src/components/SlowQuery/Panel/LogFilter.vue
index cc26e483ee..3a8bdebaf7 100644
--- a/frontend/src/components/SlowQuery/Panel/LogFilter.vue
+++ b/frontend/src/components/SlowQuery/Panel/LogFilter.vue
@@ -85,7 +85,7 @@
!filterTypes.includes('project') &&
!filterTypes.includes('environment')
"
- class="flex items-center justify-end"
+ class="flex items-center justify-end space-x-2"
>
<slot name="suffix" />
</div>
diff --git a/frontend/src/components/SlowQuery/Panel/SlowQueryPanel.vue b/frontend/src/components/SlowQuery/Panel/SlowQueryPanel.vue
index 4c2f3bbf2d..e00330f81c 100644
--- a/frontend/src/components/SlowQuery/Panel/SlowQueryPanel.vue
+++ b/frontend/src/components/SlowQuery/Panel/SlowQueryPanel.vue
@@ -12,7 +12,7 @@
{{ $t("common.configure") }}
</NButton>
<NButton
- type="default"
+ type="primary"
:disabled="!allowSync"
:loading="syncing"
@click="syncNow"
diff --git a/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue b/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue
index ab556c7024..c086c85b18 100644
--- a/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue
+++ b/frontend/src/components/SyncDatabaseSchema/DatabaseSchemaSelector.vue
@@ -4,7 +4,7 @@
>
<div
v-if="!disableProjectSelect"
- class="w-full flex flex-row justify-start items-center"
+ class="w-full flex flex-col gap-y-2 lg:flex-row justify-start items-start lg:items-center"
>
<span class="flex w-40 items-center shrink-0 text-sm">
{{ $t("common.project") }}
@@ -15,7 +15,9 @@
@update:project="handleProjectSelect"
/>
</div>
- <div class="w-full flex flex-row justify-start items-center">
+ <div
+ class="w-full flex flex-col gap-y-2 lg:flex-row justify-start items-start lg:items-center"
+ >
<span class="flex w-40 items-center shrink-0 text-sm">
{{ $t("common.database") }}
</span>
@@ -35,7 +37,9 @@
@update:database="handleDatabaseSelect"
/>
</div>
- <div class="w-full flex flex-row justify-start items-center">
+ <div
+ class="w-full flex flex-col gap-y-2 lg:flex-row justify-start items-start lg:items-center"
+ >
<span class="flex w-40 items-center shrink-0 text-sm">
{{ $t("database.sync-schema.schema-version.self") }}
</span>
diff --git a/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vue b/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vue
index 0d7269ac3b..fae6e91e69 100644
--- a/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vue
+++ b/frontend/src/components/SyncDatabaseSchema/SelectTargetDatabasesView.vue
@@ -2,7 +2,7 @@
<div
class="select-target-database-view h-full overflow-y-hidden flex flex-col gap-y-4"
>
- <div class="w-full flex flex-row gap-8">
+ <div class="w-full flex flex-col md:flex-row gap-y-4 md:gap-8">
<span>{{ $t("database.sync-schema.source-schema") }}</span>
<template
v-if="
diff --git a/frontend/src/components/User/Settings/MemberAddOrInvite.vue b/frontend/src/components/User/Settings/MemberAddOrInvite.vue
index bee9392ee5..0167507a8e 100644
--- a/frontend/src/components/User/Settings/MemberAddOrInvite.vue
+++ b/frontend/src/components/User/Settings/MemberAddOrInvite.vue
@@ -1,5 +1,5 @@
<template>
- <div class="space-y-4">
+ <div class="w-full space-y-4">
<div class="space-y-2">
<div
v-for="(user, index) in state.userList"
@@ -14,7 +14,6 @@
<NInput
v-model:value="user.email"
:input-props="{ type: 'text', autocomplete: 'off' }"
- class="!w-10 sm:!w-20 shrink-0"
placeholder="foo"
@blur="validateUser(user, index)"
@input="clearValidationError(index)"
diff --git a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue
index 5723632ae5..97d577f538 100644
--- a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue
+++ b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue
@@ -1,20 +1,22 @@
<template>
<div
v-bind="$attrs"
- class="flex items-center bg-blue-100 py-3 px-2 text-main"
+ class="flex flex-col lg:flex-row items-start lg:items-center bg-blue-100 py-3 px-2 text-main gap-y-2"
>
- <button
- v-if="!isStandaloneMode"
- class="w-7 h-7 p-1 mr-3 rounded cursor-pointer"
- @click.prevent="$emit('dismiss')"
- >
- <heroicons-outline:x class="w-5 h-5" />
- </button>
- {{
- $t("database.selected-n-databases", {
- n: databases.length,
- })
- }}
+ <div class="flex items-center">
+ <button
+ v-if="!isStandaloneMode"
+ class="w-7 h-7 p-1 mr-3 rounded cursor-pointer"
+ @click.prevent="$emit('dismiss')"
+ >
+ <heroicons-outline:x class="w-5 h-5" />
+ </button>
+ {{
+ $t("database.selected-n-databases", {
+ n: databases.length,
+ })
+ }}
+ </div>
<div class="flex items-center gap-x-4 text-sm ml-5 text-accent">
<template v-for="action in actions" :key="action.text">
<NTooltip :disabled="!action.disabled">
diff --git a/frontend/src/layouts/BodyLayout.vue b/frontend/src/layouts/BodyLayout.vue
index 0cfed69a3b..dda86ac1c1 100644
--- a/frontend/src/layouts/BodyLayout.vue
+++ b/frontend/src/layouts/BodyLayout.vue
@@ -185,17 +185,11 @@
<heroicons-outline:menu class="h-4 w-4" />
</button>
</div>
- <div v-if="showBreadcrumb" class="ml-4">
- <Breadcrumb />
- </div>
</div>
</aside>
<div class="w-full mx-auto md:flex">
<div class="md:min-w-0 md:flex-1">
- <div v-if="showBreadcrumb" class="hidden md:block px-4 pt-4">
- <Breadcrumb />
- </div>
<div
class="w-full flex flex-row justify-between items-center flex-wrap px-2 gap-x-4"
>
@@ -224,17 +218,7 @@
</div>
</HideInStandaloneMode>
<!-- This area may scroll -->
- <div
- id="bb-layout-main"
- class="md:min-w-0 md:flex-1 overflow-y-auto"
- :class="
- pageMode !== 'STANDALONE' &&
- showBreadcrumb &&
- quickActionList.length == 0
- ? 'mt-2'
- : ''
- "
- >
+ <div id="bb-layout-main" class="md:min-w-0 md:flex-1 overflow-y-auto">
<!-- Start main area-->
<router-view name="content" />
<!-- End main area -->
@@ -274,7 +258,6 @@ import { PlanType } from "@/types/proto/v1/subscription_service";
import { hasWorkspacePermissionV1 } from "@/utils";
import { getQuickActionList } from "@/utils";
import DashboardHeader from "@/views/DashboardHeader.vue";
-import Breadcrumb from "../components/Breadcrumb.vue";
import QuickActionPanel from "../components/QuickActionPanel.vue";
import Quickstart from "../components/Quickstart.vue";
@@ -320,11 +303,6 @@ const quickActionList = computed(() => {
return getQuickActionList(listByRole);
});
-const showBreadcrumb = computed(() => {
- const name = router.currentRoute.value.name;
- return !(name === "workspace.home" || name === "workspace.profile");
-});
-
const version = computed(() => {
const v = actuatorStore.version;
if (v.split(".").length == 3) {
diff --git a/frontend/src/layouts/ProjectLayout.vue b/frontend/src/layouts/ProjectLayout.vue
index e5fd6f1411..f80f1c7942 100644
--- a/frontend/src/layouts/ProjectLayout.vue
+++ b/frontend/src/layouts/ProjectLayout.vue
@@ -14,7 +14,7 @@
/>
</HideInStandaloneMode>
- <div class="py-4 px-6 h-full">
+ <div class="p-6 h-full">
<router-view
:project-slug="projectSlug"
:project-webhook-slug="projectWebhookSlug"
diff --git a/frontend/src/layouts/SettingLayout.vue b/frontend/src/layouts/SettingLayout.vue
index 0f5fd7dc04..0a3f1f2072 100644
--- a/frontend/src/layouts/SettingLayout.vue
+++ b/frontend/src/layouts/SettingLayout.vue
@@ -1,5 +1,5 @@
<template>
- <div class="px-6">
+ <div class="p-6">
<router-view />
</div>
</template>
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 2f013155fc..92e1590df3 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -2377,7 +2377,7 @@
"successfully-upgrade-trial": "Successfully upgrade free trial to {plan}",
"require-subscription": "This feature requires {requiredPlan}, please purchase Bytebase license to unlock this feature.",
"feature-require-subscription": "{feature} requires {requiredPlan}.",
- "required-plan-with-trial": "This feature requires {requiredPlan}. {startTrial}.",
+ "required-plan-with-trial": "This feature requires {requiredPlan}. {startTrial}",
"trial-for-plan": "You can start a free trial for {plan} with {days} days - no credit card required.",
"trial-for-days": "You can start a free trial for {days} days - no credit card required.",
"upgrade-trial": "You can upgrade your free trial to this plan.",
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 678d018073..85e0f4a34d 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -2373,7 +2373,7 @@
"successfully-upgrade-trial": "Prueba gratuita actualizada con éxito a {plan}",
"require-subscription": "Esta función requiere {requiredPlan}, por favor compra la licencia Bytebase para desbloquear esta función.",
"feature-require-subscription": "{feature} requiere {requiredPlan}.",
- "required-plan-with-trial": "Esta función requiere {requiredPlan}. {startTrial}.",
+ "required-plan-with-trial": "Esta función requiere {requiredPlan}. {startTrial}",
"trial-for-plan": "Puedes iniciar una prueba gratuita de {plan} por {days} días - no se requiere tarjeta de crédito.",
"trial-for-days": "Puedes iniciar una prueba gratuita por {days} días - no se requiere tarjeta de crédito.",
"upgrade-trial": "Puedes actualizar tu prueba gratuita a este plan.",
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 507c02ad5a..e840636b57 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -2372,7 +2372,7 @@
"successfully-start-trial": "成功开启 {days} 天的免费试用",
"successfully-upgrade-trial": "成功升级为{plan}试用",
"require-subscription": "这个功能需要{requiredPlan}订阅,请购买 Bytebase 证书来解锁该功能。",
- "required-plan-with-trial": "这个功能需要{requiredPlan}订阅,{startTrial}。",
+ "required-plan-with-trial": "这个功能需要{requiredPlan}订阅,{startTrial}",
"trial-for-plan": "您可以开启{plan}的 {days} 天免费试用 - 无需任何信用卡或预付费。",
"trial-for-days": "您可以开启 {days} 天的免费试用 - 无需任何信用卡或预付费。",
"upgrade-trial": "您可以直接将现有的试用升级到这个版本。",
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index 07b14bc5b0..4fdf11d73f 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -307,19 +307,6 @@ const routes: Array<RouteRecordRaw> = [
leftSidebar: true,
},
},
- {
- path: "archive",
- name: "workspace.archive",
- meta: { title: () => t("common.archived") },
- components: {
- content: () => import("../views/Archive.vue"),
- leftSidebar: SettingSidebar,
- },
- props: {
- content: true,
- leftSidebar: true,
- },
- },
{
// "u" stands for user. Strictly speaking, it's not accurate because we
// may refer to other principal type in the future. But from the endusers'
@@ -598,6 +585,13 @@ const routes: Array<RouteRecordRaw> = [
import("../views/SettingWorkspaceDebugLog.vue"),
props: true,
},
+ {
+ path: "archive",
+ name: "setting.workspace.archive",
+ meta: { title: () => t("common.archived") },
+ component: () => import("../views/Archive.vue"),
+ props: true,
+ },
],
},
{
@@ -1133,7 +1127,6 @@ router.beforeEach((to, from, next) => {
to.name === "workspace.project" ||
to.name === "workspace.instance" ||
to.name === "workspace.database" ||
- to.name === "workspace.archive" ||
to.name === "workspace.issue" ||
to.name === "workspace.environment" ||
to.name === "sql-editor.home" ||
diff --git a/frontend/src/views/AnomalyCenterDashboard.vue b/frontend/src/views/AnomalyCenterDashboard.vue
index 43b6586121..32f6f0218d 100644
--- a/frontend/src/views/AnomalyCenterDashboard.vue
+++ b/frontend/src/views/AnomalyCenterDashboard.vue
@@ -1,5 +1,5 @@
<template>
- <div class="p-4">
+ <div class="p-6">
<AnomalyCenterDashboard :selected-tab="selectedTab" />
</div>
</template>
diff --git a/frontend/src/views/Archive.vue b/frontend/src/views/Archive.vue
index 1d0db99293..3a4fae6cbf 100644
--- a/frontend/src/views/Archive.vue
+++ b/frontend/src/views/Archive.vue
@@ -1,6 +1,6 @@
<template>
- <div class="flex px-4 flex-col">
- <div class="py-2 flex justify-between items-center">
+ <div class="flex flex-col space-y-2">
+ <div class="flex justify-between items-center">
<BBTabFilter
:tab-item-list="tabItemList"
:selected-index="state.selectedIndex"
diff --git a/frontend/src/views/DashboardHeader.vue b/frontend/src/views/DashboardHeader.vue
index d237127dc7..7acfe16e3c 100644
--- a/frontend/src/views/DashboardHeader.vue
+++ b/frontend/src/views/DashboardHeader.vue
@@ -1,36 +1,56 @@
<template>
- <div class="flex items-center justify-between h-10 pl-2 pr-4 space-x-2">
- <div class="flex-1 flex items-center">
+ <div class="flex items-center justify-between h-10 pl-2 pr-4 space-x-3">
+ <div class="flex items-center">
<BytebaseLogo class="block md:hidden" />
+ <div v-if="showBreadcrumb" class="hidden md:block">
+ <Breadcrumb />
+ </div>
</div>
- <div>
- <div class="flex items-center space-x-3">
- <div
- v-if="currentPlan === PlanType.FREE"
- class="flex justify-between items-center min-w-fit px-4 py-1 bg-emerald-500 text-sm font-medium text-white rounded-md cursor-pointer"
- @click="handleWantHelp"
- >
- <span class="hidden lg:block mr-2">{{ $t("common.want-help") }}</span>
- <heroicons-outline:chat-bubble-left-right class="w-4 h-4" />
- </div>
- <a href="/sql-editor" target="_blank">
- <heroicons-outline:terminal class="w-6 h-6" />
- </a>
- <router-link to="/setting/general" exact-active-class="">
- <Settings class="w-6 h-6" />
- </router-link>
- <router-link to="/inbox" exact-active-class="">
- <span
- v-if="inboxSummary.unread > 0"
- class="absolute rounded-full ml-4 -mt-1 h-2 w-2 bg-accent opacity-75"
- ></span>
- <heroicons-outline:bell class="w-6 h-6" />
- </router-link>
- <div class="ml-2">
- <ProfileBrandingLogo>
- <ProfileDropdown />
- </ProfileBrandingLogo>
- </div>
+ <div class="flex-1 flex justify-end items-center space-x-3">
+ <button
+ class="hidden w-full max-w-xs md:flex items-center justify-between rounded-md border border-control-border bg-white hover:bg-control-bg-hover pl-2 pr-1 py-0.5 outline-none"
+ @click="onClickSearchButton"
+ >
+ <span class="text-control-placeholder text-sm">
+ {{ $t("common.search") }}
+ </span>
+ <span class="flex items-center space-x-1">
+ <kbd
+ class="h-5 flex items-center justify-center bg-black bg-opacity-10 rounded text-sm px-1 text-control overflow-y-hidden"
+ >
+ <span v-if="isMac" class="text-xl px-0.5">⌘</span>
+ <span v-else class="tracking-tighter transform scale-x-90">
+ Ctrl
+ </span>
+ <span class="ml-1 mr-0.5">K</span>
+ </kbd>
+ </span>
+ </button>
+ <div
+ v-if="currentPlan === PlanType.FREE"
+ class="flex justify-between items-center min-w-fit px-4 py-1 bg-emerald-500 text-sm font-medium text-white rounded-md cursor-pointer"
+ @click="handleWantHelp"
+ >
+ <span class="hidden lg:block mr-2">{{ $t("common.want-help") }}</span>
+ <heroicons-outline:chat-bubble-left-right class="w-4 h-4" />
+ </div>
+ <a href="/sql-editor" target="_blank">
+ <heroicons-outline:terminal class="w-6 h-6" />
+ </a>
+ <router-link to="/setting/general" exact-active-class="">
+ <Settings class="w-6 h-6" />
+ </router-link>
+ <router-link to="/inbox" exact-active-class="">
+ <span
+ v-if="inboxSummary.unread > 0"
+ class="absolute rounded-full ml-4 -mt-1 h-2 w-2 bg-accent opacity-75"
+ ></span>
+ <heroicons-outline:bell class="w-6 h-6" />
+ </router-link>
+ <div class="ml-2">
+ <ProfileBrandingLogo>
+ <ProfileDropdown />
+ </ProfileBrandingLogo>
</div>
</div>
</div>
@@ -50,6 +70,7 @@
<script lang="ts" setup>
import { defineAction, useRegisterActions } from "@bytebase/vue-kbar";
+import { useKBarHandler } from "@bytebase/vue-kbar";
import { Settings } from "lucide-vue-next";
import { storeToRefs } from "pinia";
import { computed, reactive, watchEffect } from "vue";
@@ -81,6 +102,17 @@ const state = reactive<LocalState>({
showQRCodeModal: false,
});
+const showBreadcrumb = computed(() => {
+ const name = router.currentRoute.value.name;
+ return !(name === "workspace.home" || name === "workspace.profile");
+});
+
+const isMac = navigator.platform.match(/mac/i);
+const handler = useKBarHandler();
+const onClickSearchButton = () => {
+ handler.value.show();
+};
+
const currentUser = useCurrentUser();
const { currentPlan } = storeToRefs(subscriptionStore);
diff --git a/frontend/src/views/DashboardSidebar.vue b/frontend/src/views/DashboardSidebar.vue
index cbd3ee210d..75d148cd8d 100644
--- a/frontend/src/views/DashboardSidebar.vue
+++ b/frontend/src/views/DashboardSidebar.vue
@@ -4,24 +4,6 @@
<BytebaseLogo class="w-full px-4 shrink-0" />
<div class="flex-1 overflow-y-auto px-2">
- <button
- class="mb-2 w-full flex items-center justify-between rounded-md border border-control-border bg-white hover:bg-control-bg-hover pl-2 pr-1 py-0.5 outline-none"
- @click="onClickSearchButton"
- >
- <span class="text-control-placeholder">{{ $t("common.search") }}</span>
- <span class="flex items-center space-x-1">
- <kbd
- class="h-5 flex items-center justify-center bg-black bg-opacity-10 rounded text-sm px-1 text-control overflow-y-hidden"
- >
- <span v-if="isMac" class="text-xl px-0.5">⌘</span>
- <span v-else class="tracking-tighter transform scale-x-90"
- >Ctrl</span
- >
- <span class="ml-1 mr-0.5">K</span>
- </kbd>
- </span>
- </button>
-
<router-link to="/" class="outline-item group flex items-center">
<div
class="outline-item group flex items-center px-2 py-1.5 capitalize"
@@ -113,7 +95,6 @@
</template>
<script lang="ts" setup>
-import { useKBarHandler } from "@bytebase/vue-kbar";
import {
HomeIcon,
DatabaseIcon,
@@ -136,8 +117,6 @@ import {
import { hasWorkspacePermissionV1 } from "../utils";
const currentUserV1 = useCurrentUserV1();
-const isMac = navigator.platform.match(/mac/i);
-const handler = useKBarHandler();
// Only show sync schema if the user has permission to alter schema of at least one project.
const shouldShowSyncSchemaEntry = computed(() => {
@@ -150,10 +129,6 @@ const shouldShowSyncSchemaEntry = computed(() => {
.includes(true);
});
-const onClickSearchButton = () => {
- handler.value.show();
-};
-
const shouldShowInstanceEntry = computed(() => {
return hasWorkspacePermissionV1(
"bb.permission.workspace.manage-instance",
diff --git a/frontend/src/views/DatabaseDetail.vue b/frontend/src/views/DatabaseDetail.vue
index c09d063e59..3cfcbf52da 100644
--- a/frontend/src/views/DatabaseDetail.vue
+++ b/frontend/src/views/DatabaseDetail.vue
@@ -1,13 +1,13 @@
<template>
<div
- class="flex-1 overflow-auto focus:outline-none"
+ class="flex-1 overflow-auto focus:outline-none p-6 space-y-4"
tabindex="0"
v-bind="$attrs"
>
- <main class="flex-1 relative overflow-y-auto">
+ <main class="flex-1 relative">
<!-- Highlight Panel -->
<div
- class="px-4 pb-4 space-y-2 lg:space-y-0 lg:flex lg:items-center lg:justify-between"
+ class="gap-y-2 flex flex-col items-start lg:flex-row lg:items-center lg:justify-between"
>
<div class="flex-1 min-w-0 shrink-0">
<!-- Summary -->
@@ -15,7 +15,7 @@
<div>
<div class="flex items-center">
<h1
- class="pt-2 pb-2.5 text-xl font-bold leading-6 text-main truncate flex items-center gap-x-3"
+ class="pb-2.5 text-xl font-bold leading-6 text-main truncate flex items-center gap-x-3"
>
{{ database.databaseName }}
@@ -85,85 +85,87 @@
</div>
<div
v-if="allowToChangeDatabase"
- class="flex flex-row justify-end items-center flex-wrap shrink gap-x-2 gap-y-2"
+ class="flex flex-row justify-start items-center flex-wrap shrink gap-x-2 gap-y-2"
data-label="bb-database-detail-action-buttons-container"
>
<BBSpin v-if="state.syncingSchema" :title="$t('instance.syncing')" />
- <button
- type="button"
- class="btn-normal"
+ <NButton
:disabled="state.syncingSchema"
@click.prevent="syncDatabaseSchema"
>
{{ $t("common.sync-now") }}
- </button>
- <button
+ </NButton>
+ <NButton
v-if="allowTransferProject"
- type="button"
- class="btn-normal"
@click.prevent="tryTransferProject"
>
<span>{{ $t("database.transfer-project") }}</span>
<heroicons-outline:switch-horizontal
class="-mr-1 ml-2 h-5 w-5 text-control-light"
/>
- </button>
- <button
+ </NButton>
+ <NButton
v-if="allowAlterSchemaOrChangeData"
- type="button"
- class="btn-normal"
@click="createMigration('bb.issue.database.data.update')"
>
<span>{{ $t("database.change-data") }}</span>
- </button>
- <button
+ </NButton>
+ <NButton
v-if="allowAlterSchema"
- type="button"
- class="btn-normal"
@click="createMigration('bb.issue.database.schema.update')"
>
<span>{{ $t("database.edit-schema") }}</span>
- </button>
+ </NButton>
</div>
</div>
</main>
- <BBTabFilter
- class="px-3 pb-2 border-b border-block-border"
- :responsive="false"
- :tab-item-list="tabItemList"
- :selected-index="state.selectedIndex"
- data-label="bb-database-detail-tab"
- @select-index="
- (index: number) => {
- selectTab(index);
- }
- "
- />
- <div class="py-6 px-6">
- <template v-if="selectedTabItem?.hash === 'overview'">
+ <NTabs v-model:value="state.selectedTab">
+ <NTabPane name="overview" :tab="$t('common.overview')">
<DatabaseOverviewPanel :database="database" />
- </template>
- <template v-if="selectedTabItem?.hash === 'change-history'">
+ </NTabPane>
+ <NTabPane
+ v-if="allowToChangeDatabase"
+ name="change-history"
+ :tab="$t('change-history.self')"
+ >
<DatabaseChangeHistoryPanel
:database="database"
:allow-edit="allowEdit"
/>
- </template>
- <template v-if="selectedTabItem?.hash === 'backup-and-restore'">
+ </NTabPane>
+ <NTabPane
+ v-if="
+ allowToChangeDatabase &&
+ instanceV1HasBackupRestore(database.instanceEntity)
+ "
+ name="backup-and-restore"
+ :tab="$t('common.backup-and-restore')"
+ >
<DatabaseBackupPanel
:database="database"
:allow-admin="allowAdmin"
:allow-edit="allowEdit"
/>
- </template>
- <template v-if="selectedTabItem?.hash === 'slow-query'">
+ </NTabPane>
+ <NTabPane
+ v-if="
+ allowToChangeDatabase &&
+ instanceV1SupportSlowQuery(database.instanceEntity)
+ "
+ name="slow-query"
+ :tab="$t('slow-query.slow-queries')"
+ >
<DatabaseSlowQueryPanel :database="database" />
- </template>
- <template v-if="selectedTabItem?.hash === 'settings'">
+ </NTabPane>
+ <NTabPane
+ v-if="allowToChangeDatabase"
+ name="setting"
+ :tab="$t('common.settings')"
+ >
<DatabaseSettingsPanel :database="database" :allow-edit="allowEdit" />
- </template>
- </div>
+ </NTabPane>
+ </NTabs>
<TransferSingleDatabase
v-if="state.showTransferDatabaseModal"
@@ -228,13 +230,12 @@
<script lang="ts" setup>
import dayjs from "dayjs";
-import { startCase } from "lodash-es";
+import { NButton, NTabPane, NTabs } from "naive-ui";
import { ClientError } from "nice-grpc-web";
-import { computed, onMounted, reactive, watch } from "vue";
+import { computed, reactive, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { useRoute } from "vue-router";
-import { BBTabFilterItem } from "@/bbkit/types";
import DatabaseBackupPanel from "@/components/DatabaseBackupPanel.vue";
import DatabaseChangeHistoryPanel from "@/components/DatabaseChangeHistoryPanel.vue";
import {
@@ -279,10 +280,16 @@ import {
allowUsingSchemaEditorV1,
} from "@/utils";
-type DatabaseTabItem = {
- name: string;
- hash: string;
-};
+const databaseHashList = [
+ "overview",
+ "change-history",
+ "backup-and-restore",
+ "slow-query",
+ "setting",
+] as const;
+export type DatabaseHash = typeof databaseHashList[number];
+const isDatabaseHash = (x: any): x is DatabaseHash =>
+ databaseHashList.includes(x);
interface LocalState {
showTransferDatabaseModal: boolean;
@@ -292,6 +299,7 @@ interface LocalState {
selectedIndex: number;
syncingSchema: boolean;
showSchemaDiagram: boolean;
+ selectedTab: DatabaseHash;
}
const props = defineProps({
@@ -306,20 +314,6 @@ const router = useRouter();
const databaseV1Store = useDatabaseV1Store();
const dbSchemaStore = useDBSchemaV1Store();
-const databaseTabItemList = computed((): DatabaseTabItem[] => {
- if (!allowToChangeDatabase.value) {
- return [{ name: t("common.overview"), hash: "overview" }];
- }
-
- return [
- { name: t("common.overview"), hash: "overview" },
- { name: t("change-history.self"), hash: "change-history" },
- { name: t("common.backup-and-restore"), hash: "backup-and-restore" },
- { name: startCase(t("slow-query.slow-queries")), hash: "slow-query" },
- { name: t("common.settings"), hash: "settings" },
- ];
-});
-
const state = reactive<LocalState>({
showTransferDatabaseModal: false,
showIncorrectProjectModal: false,
@@ -328,11 +322,37 @@ const state = reactive<LocalState>({
selectedIndex: 0,
syncingSchema: false,
showSchemaDiagram: false,
+ selectedTab: "overview",
});
const route = useRoute();
const currentUserV1 = useCurrentUserV1();
const currentUserIamPolicy = useCurrentUserIamPolicy();
+watch(
+ () => route.hash,
+ (hash) => {
+ let targetHash = hash.replace(/^#?/g, "") as DatabaseHash;
+ if (!isDatabaseHash(targetHash)) {
+ targetHash = "overview";
+ }
+ state.selectedTab = targetHash;
+ },
+ {
+ immediate: true,
+ }
+);
+
+watch(
+ () => state.selectedTab,
+ (tab) => {
+ router.replace({
+ name: "workspace.database.detail",
+ hash: `#${tab}`,
+ query: route.query,
+ });
+ }
+);
+
const database = computed(() => {
return databaseV1Store.getDatabaseByUID(
String(idFromSlug(props.databaseSlug))
@@ -468,25 +488,6 @@ const allowAlterSchema = computed(() => {
);
});
-const availableDatabaseTabItemList = computed(() => {
- const db = database.value;
- return databaseTabItemList.value.filter((item) => {
- if (item.hash === "backup-and-restore") {
- return instanceV1HasBackupRestore(db.instanceEntity);
- }
- if (item.hash === "slow-query") {
- return instanceV1SupportSlowQuery(db.instanceEntity);
- }
- return true;
- });
-});
-
-const tabItemList = computed((): BBTabFilterItem[] => {
- return availableDatabaseTabItemList.value.map((item) => {
- return { title: item.name, alert: false };
- });
-});
-
const tryTransferProject = () => {
state.currentProjectId = project.value.uid;
state.showTransferDatabaseModal = true;
@@ -531,54 +532,11 @@ const createMigration = async (
});
};
-const selectedTabItem = computed(() => {
- return availableDatabaseTabItemList.value[state.selectedIndex];
-});
-
-const selectTab = (index: number) => {
- const item = availableDatabaseTabItemList.value[index];
- state.selectedIndex = index;
- router.replace({
- name: "workspace.database.detail",
- hash: "#" + item.hash,
- query: route.query,
- });
-};
-
-const selectDatabaseTabOnHash = () => {
- if (router.currentRoute.value.hash) {
- for (let i = 0; i < availableDatabaseTabItemList.value.length; i++) {
- if (
- availableDatabaseTabItemList.value[i].hash ==
- router.currentRoute.value.hash.slice(1)
- ) {
- selectTab(i);
- break;
- }
- }
- } else {
- selectTab(0);
- }
-};
-
const handleGotoSQLEditorFailed = () => {
state.currentProjectId = database.value.projectEntity.uid;
state.showIncorrectProjectModal = true;
};
-onMounted(() => {
- selectDatabaseTabOnHash();
-});
-
-watch(
- () => router.currentRoute.value.hash,
- () => {
- if (router.currentRoute.value.name == "workspace.database.detail") {
- selectDatabaseTabOnHash();
- }
- }
-);
-
const syncDatabaseSchema = async () => {
state.syncingSchema = true;
diff --git a/frontend/src/views/ExportCenter/index.vue b/frontend/src/views/ExportCenter/index.vue
index 8afc160e4f..fac96f0a59 100644
--- a/frontend/src/views/ExportCenter/index.vue
+++ b/frontend/src/views/ExportCenter/index.vue
@@ -1,6 +1,8 @@
<template>
- <div class="w-full px-4 py-1 pt-2">
- <div class="w-full flex flex-row justify-between items-center">
+ <div class="w-full p-6">
+ <div
+ class="w-full flex flex-col lg:flex-row items-start lg:items-center justify-between gap-y-2"
+ >
<div class="flex items-center gap-x-4">
<NInputGroup>
<ProjectSelect
@@ -31,7 +33,7 @@
</NButton>
</div>
<div>
- <NButton @click="handleRequestExportClick">
+ <NButton type="primary" @click="handleRequestExportClick">
<FeatureBadge
feature="bb.feature.access-control"
custom-class="mr-2"
diff --git a/frontend/src/views/InstanceDetail.vue b/frontend/src/views/InstanceDetail.vue
index 84b388b88f..202b9dcc1c 100644
--- a/frontend/src/views/InstanceDetail.vue
+++ b/frontend/src/views/InstanceDetail.vue
@@ -1,8 +1,8 @@
<template>
- <div class="py-4 space-y-2">
+ <div class="p-6 space-y-2">
<ArchiveBanner v-if="instance.state === State.DELETED" />
- <div class="px-6 flex items-center justify-between">
+ <div class="flex items-center justify-between">
<div class="flex items-center gap-x-2">
<EngineIcon :engine="instance.engine" custom-class="!h-6" />
<span class="text-lg font-medium">{{ instanceV1Name(instance) }}</span>
@@ -33,23 +33,21 @@
</div>
</div>
- <div class="px-6">
- <NTabs>
- <NTabPane name="OVERVIEW" :tab="$t('common.overview')">
- <InstanceForm :instance="instance" />
- </NTabPane>
- <NTabPane name="DATABASES" :tab="$t('common.databases')">
- <DatabaseV1Table
- mode="INSTANCE"
- :scroll-on-page-change="false"
- :database-list="databaseV1List"
- />
- </NTabPane>
- <NTabPane name="USERS" :tab="$t('instance.users')">
- <InstanceRoleTable :instance-role-list="instanceRoleList" />
- </NTabPane>
- </NTabs>
- </div>
+ <NTabs>
+ <NTabPane name="OVERVIEW" :tab="$t('common.overview')">
+ <InstanceForm :instance="instance" />
+ </NTabPane>
+ <NTabPane name="DATABASES" :tab="$t('common.databases')">
+ <DatabaseV1Table
+ mode="INSTANCE"
+ :scroll-on-page-change="false"
+ :database-list="databaseV1List"
+ />
+ </NTabPane>
+ <NTabPane name="USERS" :tab="$t('instance.users')">
+ <InstanceRoleTable :instance-role-list="instanceRoleList" />
+ </NTabPane>
+ </NTabs>
</div>
<Drawer
diff --git a/frontend/src/views/ProfileDashboard.vue b/frontend/src/views/ProfileDashboard.vue
index cab4c69974..04ca460e7b 100644
--- a/frontend/src/views/ProfileDashboard.vue
+++ b/frontend/src/views/ProfileDashboard.vue
@@ -5,7 +5,7 @@
>
<!-- Profile header -->
<div>
- <div class="h-32 w-full bg-accent lg:h-48"></div>
+ <div class="-m-6 h-32 bg-accent lg:h-48"></div>
<div class="max-w-5xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="-mt-20 sm:flex sm:items-end sm:space-x-5">
<UserAvatar :user="user" size="HUGE" />
diff --git a/frontend/src/views/ProjectDashboard.vue b/frontend/src/views/ProjectDashboard.vue
index f96c38a79f..5ea1a7bac3 100644
--- a/frontend/src/views/ProjectDashboard.vue
+++ b/frontend/src/views/ProjectDashboard.vue
@@ -1,6 +1,6 @@
<template>
<div class="flex flex-col">
- <div class="px-2 py-2 flex justify-between items-center">
+ <div class="px-2 py-2 flex justify-end items-center">
<SearchBox
:value="state.searchText"
:placeholder="$t('common.filter-by-name')"
diff --git a/frontend/src/views/SchemaTemplate/ColumnTypes.vue b/frontend/src/views/SchemaTemplate/ColumnTypes.vue
index b498d7513c..aaa200336f 100644
--- a/frontend/src/views/SchemaTemplate/ColumnTypes.vue
+++ b/frontend/src/views/SchemaTemplate/ColumnTypes.vue
@@ -7,7 +7,7 @@
</div>
</div>
</div>
- <div class="w-full max-w-lg flex flex-col justify-start items-start gap-2">
+ <div class="w-full flex flex-col justify-start items-start gap-2">
<div class="w-full flex flex-row justify-between items-center">
<div class="flex flex-row justify-start items-center">
<EngineIcon :engine="Engine.MYSQL" :custom-class="'mr-1'" />
@@ -46,7 +46,7 @@
maxRows: 10,
}"
/>
- <div class="w-full flex flex-row justify-end items-center">
+ <div class="w-full flex flex-row justify-end items-center mt-2">
<NButton
type="primary"
:disabled="!allowToUpdateColumnTypeTemplateForMySQL"
@@ -56,8 +56,8 @@
</NButton>
</div>
</div>
- <NDivider class="w-full max-w-lg" />
- <div class="w-full max-w-lg flex flex-col justify-start items-start gap-2">
+ <NDivider class="w-full" />
+ <div class="w-full flex flex-col justify-start items-start gap-2">
<div class="w-full flex flex-row justify-between items-center">
<div class="flex flex-row justify-start items-center">
<EngineIcon :engine="Engine.POSTGRES" :custom-class="'mr-1'" />
@@ -96,7 +96,7 @@
maxRows: 10,
}"
/>
- <div class="w-full flex flex-row justify-end items-center">
+ <div class="w-full flex flex-row justify-end items-center mt-2">
<NButton
type="primary"
:disabled="!allowToUpdateColumnTypeTemplateForPostgreSQL"
diff --git a/frontend/src/views/SettingSidebar.vue b/frontend/src/views/SettingSidebar.vue
index 2ea9b2135a..48bc89a93b 100644
--- a/frontend/src/views/SettingSidebar.vue
+++ b/frontend/src/views/SettingSidebar.vue
@@ -173,7 +173,7 @@ const settingSidebarItemList = computed((): SidebarItem[] => {
{
title: t("common.archived"),
icon: h(Archive),
- path: "/archive",
+ path: "/setting/archive",
},
];
});
diff --git a/frontend/src/views/SettingWorkspaceAccessControl.vue b/frontend/src/views/SettingWorkspaceAccessControl.vue
index a2c5a037fa..a77f01d65b 100644
--- a/frontend/src/views/SettingWorkspaceAccessControl.vue
+++ b/frontend/src/views/SettingWorkspaceAccessControl.vue
@@ -1,5 +1,5 @@
<template>
- <div class="w-full mt-4 space-y-4">
+ <div class="w-full space-y-4">
<FeatureAttention
v-if="!hasDataAccessControlFeature"
feature="bb.feature.access-control"
diff --git a/frontend/src/views/SettingWorkspaceAuditLog.vue b/frontend/src/views/SettingWorkspaceAuditLog.vue
index 6c79476caa..583169434c 100644
--- a/frontend/src/views/SettingWorkspaceAuditLog.vue
+++ b/frontend/src/views/SettingWorkspaceAuditLog.vue
@@ -1,7 +1,7 @@
<template>
- <div class="w-full mt-4 space-y-4">
+ <div class="w-full space-y-4">
<FeatureAttention feature="bb.feature.audit-log" />
- <div class="flex justify-end items-center mt-1 space-x-2">
+ <div class="flex justify-end items-center space-x-2">
<MemberSelect
class="w-52"
:disabled="!hasAuditLogFeature"
diff --git a/frontend/src/views/SettingWorkspaceCustomApproval.vue b/frontend/src/views/SettingWorkspaceCustomApproval.vue
index d90988656c..ebe1465bb1 100644
--- a/frontend/src/views/SettingWorkspaceCustomApproval.vue
+++ b/frontend/src/views/SettingWorkspaceCustomApproval.vue
@@ -1,5 +1,5 @@
<template>
- <div class="w-full mt-4 space-y-4 text-sm">
+ <div class="w-full space-y-4 text-sm">
<FeatureAttentionForInstanceLicense
v-if="hasCustomApprovalFeature"
feature="bb.feature.custom-approval"
diff --git a/frontend/src/views/SettingWorkspaceDebugLog.vue b/frontend/src/views/SettingWorkspaceDebugLog.vue
index 44d1d636ce..a80bac3ab5 100644
--- a/frontend/src/views/SettingWorkspaceDebugLog.vue
+++ b/frontend/src/views/SettingWorkspaceDebugLog.vue
@@ -71,7 +71,7 @@
</div>
</BBDialog>
</div>
- <DebugLogEmptyView v-else />
+ <NoDataPlaceholder v-else />
</div>
</template>
diff --git a/frontend/src/views/SettingWorkspaceMailDelivery.vue b/frontend/src/views/SettingWorkspaceMailDelivery.vue
index 93d69a5dfc..7b3e0e3646 100644
--- a/frontend/src/views/SettingWorkspaceMailDelivery.vue
+++ b/frontend/src/views/SettingWorkspaceMailDelivery.vue
@@ -1,19 +1,19 @@
<template>
- <div class="textinfolabel py-4">
- {{ $t("settings.mail-delivery.description") }}
- <a
- class="normal-link inline-flex items-center"
- href="https://www.bytebase.com/docs/administration/mail-delivery?source=console"
- target="__BLANK"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4 ml-1" />
- </a>
- </div>
<div class="w-full space-y-4">
+ <div class="textinfolabel">
+ {{ $t("settings.mail-delivery.description") }}
+ <a
+ class="normal-link inline-flex items-center"
+ href="https://www.bytebase.com/docs/administration/mail-delivery?source=console"
+ target="__BLANK"
+ >
+ {{ $t("common.learn-more") }}
+ <heroicons-outline:external-link class="w-4 h-4 ml-1" />
+ </a>
+ </div>
<div class="w-full flex flex-col">
<!-- Host and Port -->
- <div class="w-full flex flex-row gap-4 mt-8">
+ <div class="w-full flex flex-row gap-4">
<div class="min-w-max w-80">
<div class="textlabel pl-1">
{{ $t("settings.mail-delivery.field.smtp-server-host") }}
@@ -149,9 +149,8 @@
</div>
<div class="flex flex-row w-full">
<div class="w-auto gap-4 mt-8 flex flex-row">
- <button
- type="button"
- class="btn-primary inline-flex justify-center py-2 px-4"
+ <NButton
+ type="primary"
:disabled="
!allowMailDeliveryActionButton ||
state.isSendLoading ||
@@ -160,7 +159,7 @@
@click.prevent="updateMailDeliverySetting"
>
{{ mailDeliverySettingButtonText }}
- </button>
+ </NButton>
<BBSpin v-if="state.isCreateOrUpdateLoading" class="ml-1" />
</div>
</div>
@@ -171,16 +170,15 @@
<div class="textlabel pl-1">
{{ $t("settings.mail-delivery.field.send-test-email-to") }}
</div>
- <div class="flex flex-row justify-start items-center mt-2">
- <BBTextField
+ <div class="flex flex-row justify-start items-center mt-2 space-x-4">
+ <NInput
class="text-main h-max w-80"
:placeholder="'[email protected]'"
:value="state.testMailTo"
@input="(e: any) => state.testMailTo = e.target.value"
/>
- <button
- type="button"
- class="btn-primary ml-5"
+ <NButton
+ type="primary"
:disabled="
state.testMailTo === '' ||
state.isSendLoading ||
@@ -189,7 +187,7 @@
@click.prevent="testMailDeliverySetting"
>
{{ $t("settings.mail-delivery.field.send") }}
- </button>
+ </NButton>
<BBSpin v-if="state.isSendLoading" class="ml-2" />
</div>
</div>
diff --git a/frontend/src/views/SettingWorkspaceMember.vue b/frontend/src/views/SettingWorkspaceMember.vue
index ff68594210..14b8b8557e 100644
--- a/frontend/src/views/SettingWorkspaceMember.vue
+++ b/frontend/src/views/SettingWorkspaceMember.vue
@@ -1,18 +1,19 @@
<template>
- <FeatureAttention
- v-if="remainingUserCount <= 3"
- custom-class="m-4"
- feature="bb.feature.user-count"
- :description="userCountAttention"
- />
-
- <div class="w-full overflow-x-hidden pb-4">
- <div v-if="allowAddOrInvite" class="w-full flex justify-center mb-6">
+ <div class="w-full overflow-x-hidden space-y-4">
+ <FeatureAttention
+ v-if="remainingUserCount <= 3"
+ feature="bb.feature.user-count"
+ :description="userCountAttention"
+ />
+ <FeatureAttention feature="bb.feature.rbac" />
+
+ <div
+ v-if="allowAddOrInvite"
+ class="w-full flex justify-center mb-6 border-b pb-6"
+ >
<MemberAddOrInvite />
</div>
- <FeatureAttention custom-class="my-4" feature="bb.feature.rbac" />
-
<div class="flex justify-between items-center">
<div class="flex-1 flex space-x-2">
<p class="text-lg font-medium leading-7 text-main">
diff --git a/frontend/src/views/SettingWorkspaceProject.vue b/frontend/src/views/SettingWorkspaceProject.vue
index 0ac96ab678..d77e0d7f10 100644
--- a/frontend/src/views/SettingWorkspaceProject.vue
+++ b/frontend/src/views/SettingWorkspaceProject.vue
@@ -1,29 +1,23 @@
<template>
<div class="flex flex-col">
- <div class="py-2 flex justify-between items-center">
- <div class="flex justify-start items-center gap-x-2">
- <BBAttention
- :style="'INFO'"
- :title="$t('setting.project.description')"
- />
- </div>
-
- <div class="flex justify-end items-center gap-x-2">
- <SearchBox
- :value="state.searchText"
- :placeholder="$t('common.filter-by-name')"
- :autofocus="true"
- @update:value="changeSearchText($event)"
- />
- </div>
- </div>
+ <BBAttention
+ class="mb-4"
+ :style="'INFO'"
+ :title="$t('setting.project.description')"
+ />
- <div class="py-2">
+ <div class="py-2 flex justify-between items-center">
<NCheckbox v-model:checked="state.includesArchived">
<span class="textinfolabel">
{{ $t("setting.project.show-archived") }}
</span>
</NCheckbox>
+ <SearchBox
+ :value="state.searchText"
+ :placeholder="$t('common.filter-by-name')"
+ :autofocus="true"
+ @update:value="changeSearchText($event)"
+ />
</div>
<ProjectV1Table :project-list="filteredProjectList" />
diff --git a/frontend/src/views/SettingWorkspaceRiskCenter.vue b/frontend/src/views/SettingWorkspaceRiskCenter.vue
index 9c3b7e2497..d6e418a3a8 100644
--- a/frontend/src/views/SettingWorkspaceRiskCenter.vue
+++ b/frontend/src/views/SettingWorkspaceRiskCenter.vue
@@ -2,27 +2,26 @@
<FeatureAttentionForInstanceLicense
v-if="hasCustomApprovalFeature"
feature="bb.feature.custom-approval"
- custom-class="my-4"
+ custom-class="mb-4"
/>
<FeatureAttention
v-else
feature="bb.feature.custom-approval"
- custom-class="my-4"
+ custom-class="mb-4"
/>
- <div class="textinfolabel">
- {{ $t("custom-approval.risk.description") }}
- <a
- href="https://www.bytebase.com/docs/administration/risk-center"
- target="_blank"
- class="normal-link inline-flex flex-row items-center"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4" />
- </a>
- </div>
-
- <div class="w-full mt-4 space-y-4 text-sm">
+ <div class="w-full space-y-4 text-sm">
+ <div class="textinfolabel">
+ {{ $t("custom-approval.risk.description") }}
+ <a
+ href="https://www.bytebase.com/docs/administration/risk-center"
+ target="_blank"
+ class="normal-link inline-flex flex-row items-center"
+ >
+ {{ $t("common.learn-more") }}
+ <heroicons-outline:external-link class="w-4 h-4" />
+ </a>
+ </div>
<RiskCenter v-if="state.ready" />
<div v-else class="w-full py-[4rem] flex justify-center items-center">
<BBSpin />
diff --git a/frontend/src/views/SettingWorkspaceRole.vue b/frontend/src/views/SettingWorkspaceRole.vue
index f42e69449a..150295fe95 100644
--- a/frontend/src/views/SettingWorkspaceRole.vue
+++ b/frontend/src/views/SettingWorkspaceRole.vue
@@ -1,5 +1,5 @@
<template>
- <div class="w-full mt-4 space-y-4 text-sm">
+ <div class="w-full space-y-4 text-sm">
<RoleSetting />
</div>
</template>
diff --git a/frontend/src/views/SettingWorkspaceSQLReview.vue b/frontend/src/views/SettingWorkspaceSQLReview.vue
index b8ad4bf468..d2b86b0d34 100644
--- a/frontend/src/views/SettingWorkspaceSQLReview.vue
+++ b/frontend/src/views/SettingWorkspaceSQLReview.vue
@@ -1,6 +1,6 @@
<template>
- <div class="mx-auto">
- <div class="textinfolabel my-4">
+ <div class="mx-auto space-y-4">
+ <div class="textinfolabel">
{{ $t("sql-review.description") }}
<a
href="https://www.bytebase.com/docs/sql-review/review-rules"
@@ -12,7 +12,7 @@
</a>
</div>
- <SQLReviewPolicyTable class="my-4" />
+ <SQLReviewPolicyTable />
</div>
</template>
diff --git a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
index 9be2d4487a..f81e78f5c8 100644
--- a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
+++ b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
@@ -1,5 +1,5 @@
<template>
- <FeatureAttention custom-class="my-4" feature="bb.feature.sql-review" />
+ <FeatureAttention custom-class="mb-4" feature="bb.feature.sql-review" />
<SQLReviewCreation
v-if="state.editMode"
key="sql-review-creation"
@@ -9,7 +9,7 @@
:selected-rule-list="ruleListOfPolicy"
@cancel="state.editMode = false"
/>
- <div v-else class="mt-4">
+ <div v-else>
<div
class="flex flex-col items-center space-x-2 justify-center md:flex-row"
>
diff --git a/frontend/src/views/SettingWorkspaceSSO.vue b/frontend/src/views/SettingWorkspaceSSO.vue
index 181a7bb494..579be7953e 100644
--- a/frontend/src/views/SettingWorkspaceSSO.vue
+++ b/frontend/src/views/SettingWorkspaceSSO.vue
@@ -1,5 +1,5 @@
<template>
- <div class="w-full mt-4 space-y-4">
+ <div class="w-full space-y-4">
<div class="w-full flex flex-row justify-between items-center">
<div class="textinfolabel mr-4">
{{ $t("settings.sso.description") }}
diff --git a/frontend/src/views/SettingWorkspaceSchemaTemplate.vue b/frontend/src/views/SettingWorkspaceSchemaTemplate.vue
index 62fa9c6ae6..49b88b7e32 100644
--- a/frontend/src/views/SettingWorkspaceSchemaTemplate.vue
+++ b/frontend/src/views/SettingWorkspaceSchemaTemplate.vue
@@ -1,31 +1,33 @@
<template>
- <FeatureAttention feature="bb.feature.schema-template" custom-class="my-4" />
- <NTabs v-model:value="state.selectedTab" type="line">
- <NTabPane
- name="FIELD_TEMPLATE"
- :tab="$t('schema-template.field-template.self')"
- >
- <FieldTemplates
- :show-engine-filter="true"
- :readonly="!hasFeature || !hasPermission"
- />
- </NTabPane>
- <NTabPane
- name="TABLE_TEMPLATE"
- :tab="$t('schema-template.table-template.self')"
- >
- <TableTemplates
- :show-engine-filter="true"
- :readonly="!hasFeature || !hasPermission"
- />
- </NTabPane>
- <NTabPane
- name="COLUMN_TYPE_RESTRICTION"
- :tab="$t('schema-template.column-type-restriction.self')"
- >
- <ColumnTypes :readonly="!hasFeature || !hasPermission" />
- </NTabPane>
- </NTabs>
+ <div class="w-full space-y-4">
+ <FeatureAttention feature="bb.feature.schema-template" />
+ <NTabs v-model:value="state.selectedTab" type="line">
+ <NTabPane
+ name="FIELD_TEMPLATE"
+ :tab="$t('schema-template.field-template.self')"
+ >
+ <FieldTemplates
+ :show-engine-filter="true"
+ :readonly="!hasFeature || !hasPermission"
+ />
+ </NTabPane>
+ <NTabPane
+ name="TABLE_TEMPLATE"
+ :tab="$t('schema-template.table-template.self')"
+ >
+ <TableTemplates
+ :show-engine-filter="true"
+ :readonly="!hasFeature || !hasPermission"
+ />
+ </NTabPane>
+ <NTabPane
+ name="COLUMN_TYPE_RESTRICTION"
+ :tab="$t('schema-template.column-type-restriction.self')"
+ >
+ <ColumnTypes :readonly="!hasFeature || !hasPermission" />
+ </NTabPane>
+ </NTabs>
+ </div>
</template>
<script lang="ts" setup>
diff --git a/frontend/src/views/SettingWorkspaceSensitiveData.vue b/frontend/src/views/SettingWorkspaceSensitiveData.vue
index 64c1403062..d23d2d4e3a 100644
--- a/frontend/src/views/SettingWorkspaceSensitiveData.vue
+++ b/frontend/src/views/SettingWorkspaceSensitiveData.vue
@@ -1,5 +1,5 @@
<template>
- <div class="w-full mt-4 space-y-4">
+ <div class="w-full space-y-4">
<FeatureAttention
v-if="!hasSensitiveDataFeature"
feature="bb.feature.sensitive-data"
diff --git a/frontend/src/views/SettingWorkspaceSlowQuery.vue b/frontend/src/views/SettingWorkspaceSlowQuery.vue
index 7d3d163cfa..59b8fb0c91 100644
--- a/frontend/src/views/SettingWorkspaceSlowQuery.vue
+++ b/frontend/src/views/SettingWorkspaceSlowQuery.vue
@@ -1,7 +1,5 @@
<template>
- <div class="w-full mt-4 space-y-4 text-sm">
- <SlowQuerySettings />
- </div>
+ <SlowQuerySettings />
</template>
<script lang="ts" setup>
diff --git a/frontend/src/views/SettingWorkspaceSubscription.vue b/frontend/src/views/SettingWorkspaceSubscription.vue
index 24a3c66108..556b95155c 100644
--- a/frontend/src/views/SettingWorkspaceSubscription.vue
+++ b/frontend/src/views/SettingWorkspaceSubscription.vue
@@ -1,6 +1,6 @@
<template>
<div class="mx-auto">
- <div class="textinfolabel my-4">
+ <div class="textinfolabel mb-4">
{{ $t("subscription.description") }}
<a
class="text-accent"
diff --git a/frontend/src/views/SettingWorkspaceVCS.vue b/frontend/src/views/SettingWorkspaceVCS.vue
index d39dc404c5..7127cb5e62 100644
--- a/frontend/src/views/SettingWorkspaceVCS.vue
+++ b/frontend/src/views/SettingWorkspaceVCS.vue
@@ -1,6 +1,6 @@
<template>
<div class="space-y-4">
- <div class="textinfolabel py-4">
+ <div class="textinfolabel">
{{ $t("gitops.setting.description") }}
<a
class="text-accent hover:opacity-80"
diff --git a/frontend/src/views/SettingWorkspaceVCSCreate.vue b/frontend/src/views/SettingWorkspaceVCSCreate.vue
index 0b117beac5..e360a79471 100644
--- a/frontend/src/views/SettingWorkspaceVCSCreate.vue
+++ b/frontend/src/views/SettingWorkspaceVCSCreate.vue
@@ -1,5 +1,5 @@
<template>
- <div class="mt-4 space-y-4 divide-y divide-block-border">
+ <div class="space-y-4 divide-y divide-block-border">
<div class="textinfolabel">
<i18n-t keypath="gitops.setting.add-git-provider.description">
<template #guide>
diff --git a/frontend/src/views/SettingWorkspaceVCSDetail.vue b/frontend/src/views/SettingWorkspaceVCSDetail.vue
index b71bc83cd1..db469a81e6 100644
--- a/frontend/src/views/SettingWorkspaceVCSDetail.vue
+++ b/frontend/src/views/SettingWorkspaceVCSDetail.vue
@@ -1,5 +1,5 @@
<template>
- <div class="mt-4 space-y-4">
+ <div class="space-y-4">
<div class="flex justify-end">
<div v-if="vcsWithUIType" class="flex flex-row items-center space-x-2">
<div class="textlabel whitespace-nowrap">
diff --git a/frontend/src/views/SlowQuery/SlowQueryDashboard.vue b/frontend/src/views/SlowQuery/SlowQueryDashboard.vue
index 1930bcbac9..18c4bf4728 100644
--- a/frontend/src/views/SlowQuery/SlowQueryDashboard.vue
+++ b/frontend/src/views/SlowQuery/SlowQueryDashboard.vue
@@ -1,5 +1,5 @@
<template>
- <div class="p-2">
+ <div class="p-6">
<SlowQueryPanel v-if="ready" v-model:filter="filter" />
</div>
</template>
diff --git a/frontend/src/views/SyncDatabaseSchema.vue b/frontend/src/views/SyncDatabaseSchema.vue
index c05174ac6b..a5bf5c2743 100644
--- a/frontend/src/views/SyncDatabaseSchema.vue
+++ b/frontend/src/views/SyncDatabaseSchema.vue
@@ -1,5 +1,5 @@
<template>
- <div class="px-4 h-full">
+ <div class="p-6 h-full">
<SyncDatabaseSchema />
</div>
</template>