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: workspace id location (#14546)
ecmadao639ed7a43461
diff --git a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vueindex 56542282c2..f93bda70b8 100644--- a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue+++ b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue@@ -77,7 +77,6 @@<label>{{ $t("environment.statement-execution.title") }}</label>- <FeatureBadge feature="bb.feature.access-control" /></div><div><div class="w-full inline-flex items-center gap-x-2">diff --git a/frontend/src/components/GeneralSetting/BrandingSetting.vue b/frontend/src/components/GeneralSetting/BrandingSetting.vueindex 84fa5e34a9..256cb304bb 100644--- a/frontend/src/components/GeneralSetting/BrandingSetting.vue+++ b/frontend/src/components/GeneralSetting/BrandingSetting.vue@@ -13,30 +13,6 @@</div><div class="flex-1 lg:px-4"><div class="mb-4 mt-4 lg:mt-0">- <label class="flex items-center gap-x-2">- <span class="font-medium">- {{ $t("settings.general.workspace.id") }}- </span>- </label>- <div class="mb-3 text-sm text-gray-400">- {{ $t("settings.general.workspace.id-description") }}- </div>- <div class="mb-4 flex space-x-2">- <NInput- ref="workspaceIdField"- class="mb-4 w-full"- readonly- :value="workspaceId"- @click="selectWorkspaceId"- />- <NButton- v-if="isSupported"- :disabled="!workspaceId"- @click="handleCopyId"- >- <heroicons-outline:clipboard-document class="w-4 h-4" />- </NButton>- </div><span class="font-medium">{{ $t("settings.general.workspace.logo") }}</span>@@ -104,9 +80,8 @@</template><script lang="ts" setup>-import { useClipboard } from "@vueuse/core";-import { NButton, NInput, NPopconfirm, NTooltip } from "naive-ui";-import { computed, reactive, watchEffect, ref } from "vue";+import { NButton, NPopconfirm, NTooltip } from "naive-ui";+import { computed, reactive, watchEffect } from "vue";import { useI18n } from "vue-i18n";import { featureToRef, pushNotification } from "@/store";import { useActuatorV1Store } from "@/store/modules/v1/actuator";@@ -140,7 +115,6 @@ const convertFileToBase64 = (file: File) =>const settingV1Store = useSettingV1Store();const { t } = useI18n();-const workspaceIdField = ref<HTMLInputElement | null>(null);const state = reactive<LocalState>({displayName: "",@@ -158,31 +132,6 @@ const valid = computed((): boolean => {return !!state.displayName || !!state.logoFile;});-const workspaceId = computed(() => {- return (- settingV1Store.getSettingByName("bb.workspace.id")?.value?.stringValue ?? ""- );-});--const selectWorkspaceId = () => {- workspaceIdField.value?.select();-};--const { copy: copyTextToClipboard, isSupported } = useClipboard({- legacy: true,-});--const handleCopyId = () => {- selectWorkspaceId();- copyTextToClipboard(workspaceId.value).then(() => {- pushNotification({- module: "bytebase",- style: "SUCCESS",- title: t("common.copied"),- });- });-};-const allowDelete = computed(() => {return settingV1Store.brandingLogo !== "";});diff --git a/frontend/src/components/ReleaseRemindModal.vue b/frontend/src/components/ReleaseRemindModal.vueindex 2c20951d96..d406a435ff 100644--- a/frontend/src/components/ReleaseRemindModal.vue+++ b/frontend/src/components/ReleaseRemindModal.vue@@ -1,7 +1,7 @@<template><BBModal:title="$t('settings.release.new-version-available')"- @close="$emit('cancel')"+ @close="onClose"><div class="min-w-0 md:min-w-400"><div>@@ -18,18 +18,9 @@</template></i18n-t></p>- <NCheckbox- class="mt-3 ml-1"- :label="$t('settings.release.not-show-till-next-release')"- :checked="actuatorStore.releaseInfo.ignoreRemindModalTillNextRelease"- @update:checked="- (on: boolean) =>- (actuatorStore.releaseInfo.ignoreRemindModalTillNextRelease = on)- "- /></div><div class="mt-7 flex justify-end space-x-2">- <NButton @click="$emit('cancel')">+ <NButton @click="onClose">{{ $t("common.dismiss") }}</NButton><NButton type="primary" @click="onClick">@@ -41,7 +32,7 @@</template><script lang="ts" setup>-import { NButton, NCheckbox } from "naive-ui";+import { NButton } from "naive-ui";import { computed } from "vue";import { BBModal } from "@/bbkit";import { useActuatorV1Store, useSubscriptionV1Store } from "@/store";@@ -60,6 +51,11 @@ const link = computed(() => {const onClick = () => {window.open(link.value, "_blank");+ onClose();+};++const onClose = () => {+ actuatorStore.releaseInfo.ignoreRemindModalTillNextRelease = true;emit("cancel");};</script>diff --git a/frontend/src/components/WorkspaceInstanceLicenseStats.vue b/frontend/src/components/WorkspaceInstanceLicenseStats.vueindex 6b77046207..54d095ae52 100644--- a/frontend/src/components/WorkspaceInstanceLicenseStats.vue+++ b/frontend/src/components/WorkspaceInstanceLicenseStats.vue@@ -1,6 +1,6 @@<template><div v-if="subscriptionStore.currentPlan === PlanType.FREE" class="my-3">- <dt class="text-gray-400">+ <dt class="text-main">{{ $t("subscription.max-instance-count") }}</dt><dd class="mt-1 text-4xl flex items-center gap-x-2 cursor-pointer group">@@ -10,7 +10,7 @@</dd></div><div v-else class="my-3">- <dt class="text-gray-400">+ <dt class="text-main">{{ $t("subscription.instance-assignment.used-and-total-license") }}</dt><dddiff --git a/frontend/src/views/SettingWorkspaceSubscription.vue b/frontend/src/views/SettingWorkspaceSubscription.vueindex 468c05a010..c78e7bd518 100644--- a/frontend/src/views/SettingWorkspaceSubscription.vue+++ b/frontend/src/views/SettingWorkspaceSubscription.vue@@ -16,9 +16,36 @@</span></span></div>+ <div>+ <label class="flex items-center gap-x-2">+ <span class="text-main">+ {{ $t("settings.general.workspace.id") }}+ </span>+ </label>+ <div class="mb-3 text-sm text-gray-400">+ {{ $t("settings.general.workspace.id-description") }}+ </div>+ <div class="mb-4 flex space-x-2">+ <NInput+ ref="workspaceIdField"+ class="mb-4 w-full"+ readonly+ :value="workspaceId"+ @click="selectWorkspaceId"+ />+ <NButton+ v-if="isSupported"+ :disabled="!workspaceId"+ @click="handleCopyId"+ >+ <heroicons-outline:clipboard-document class="w-4 h-4" />+ </NButton>+ </div>+ </div>+ <NDivider /><dl class="text-left grid grid-cols-2 gap-x-6 my-4 xl:grid-cols-4"><div class="my-3">- <dt class="flex text-gray-400">+ <dt class="flex text-main">{{ $t("subscription.current") }}<spanv-if="isExpired"@@ -41,13 +68,13 @@</div><WorkspaceInstanceLicenseStats v-if="allowManageInstanceLicenses" /><div v-if="!subscriptionStore.isFreePlan" class="my-3">- <dt class="text-gray-400">+ <dt class="text-main">{{ $t("subscription.expires-at") }}</dt><dd class="mt-1 text-4xl">{{ expireAt || "n/a" }}</dd></div><div v-if="subscriptionStore.canTrial && allowEdit" class="my-3">- <dt class="text-gray-400">+ <dt class="text-main">{{ $t("subscription.try-for-free") }}</dt>@@ -68,7 +95,7 @@"class="my-3">- <dt class="text-gray-400">+ <dt class="text-main">{{ $t("subscription.inquire-enterprise-plan") }}</dt>@@ -99,7 +126,8 @@</NButton></div></div>- <div class="sm:flex sm:flex-col sm:align-center pt-5 mt-4 border-t">+ <NDivider />+ <div class="sm:flex sm:flex-col sm:align-center"><div class="textinfolabel">{{ $t("subscription.plan-compare") }}</div>@@ -119,15 +147,20 @@</template><script lang="ts" setup>-import { NButton, NInput } from "naive-ui";+import { useClipboard } from "@vueuse/core";+import { NButton, NDivider, NInput } from "naive-ui";import { storeToRefs } from "pinia";-import { computed, reactive } from "vue";+import { computed, reactive, ref } from "vue";import { useI18n } from "vue-i18n";import TrialModal from "@/components/TrialModal.vue";import WeChatQRModal from "@/components/WeChatQRModal.vue";import WorkspaceInstanceLicenseStats from "@/components/WorkspaceInstanceLicenseStats.vue";import { useLanguage } from "@/composables/useLanguage";-import { pushNotification, useSubscriptionV1Store } from "@/store";+import {+ pushNotification,+ useSubscriptionV1Store,+ useSettingV1Store,+} from "@/store";import { ENTERPRISE_INQUIRE_LINK } from "@/types";import { PlanType } from "@/types/proto/v1/subscription_service";import { hasWorkspacePermissionV2 } from "@/utils";@@ -147,6 +180,7 @@ const props = defineProps<{const { t } = useI18n();const { locale } = useLanguage();const subscriptionStore = useSubscriptionV1Store();+const settingV1Store = useSettingV1Store();const state = reactive<LocalState>({loading: false,@@ -159,6 +193,33 @@ const disabled = computed((): boolean => {return state.loading || !state.license;});+const workspaceIdField = ref<HTMLInputElement | null>(null);++const workspaceId = computed(() => {+ return (+ settingV1Store.getSettingByName("bb.workspace.id")?.value?.stringValue ?? ""+ );+});++const selectWorkspaceId = () => {+ workspaceIdField.value?.select();+};++const { copy: copyTextToClipboard, isSupported } = useClipboard({+ legacy: true,+});++const handleCopyId = () => {+ selectWorkspaceId();+ copyTextToClipboard(workspaceId.value).then(() => {+ pushNotification({+ module: "bytebase",+ style: "SUCCESS",+ title: t("common.copied"),+ });+ });+};+const uploadLicense = async () => {if (disabled.value) return;state.loading = true;