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: refactor component (#10333)
ecmadaoe274b7842248
diff --git a/frontend/src/components/SchemaTemplate/FieldTemplateView.vue b/frontend/src/components/SchemaTemplate/FieldTemplateView.vueindex 6cc6817997..6306588be4 100644--- a/frontend/src/components/SchemaTemplate/FieldTemplateView.vue+++ b/frontend/src/components/SchemaTemplate/FieldTemplateView.vue@@ -1,10 +1,6 @@<template><div v-if="templateList.length === 0" class="bg-white rounded-lg">- <div- class="border-4 border-dashed border-gray-200 rounded-lg h-96 flex justify-center items-center"- >- <NoData />- </div>+ <NoDataPlaceholder /></div><div v-else class="flex"><div@@ -50,7 +46,6 @@ import { reactive, computed } from "vue";import { useI18n } from "vue-i18n";import { Engine } from "@/types/proto/v1/common";import { SchemaTemplateSetting_FieldTemplate } from "@/types/proto/v1/setting_service";-import NoData from "../misc/NoData.vue";import FieldTemplateTable from "./FieldTemplateTable.vue";interface LocalState {diff --git a/frontend/src/components/SchemaTemplate/TableTemplateView.vue b/frontend/src/components/SchemaTemplate/TableTemplateView.vueindex a860c0c47e..c03003e5f4 100644--- a/frontend/src/components/SchemaTemplate/TableTemplateView.vue+++ b/frontend/src/components/SchemaTemplate/TableTemplateView.vue@@ -1,10 +1,6 @@<template><div v-if="templateList.length === 0" class="bg-white rounded-lg">- <div- class="border-4 border-dashed border-gray-200 rounded-lg h-96 flex justify-center items-center"- >- <NoData />- </div>+ <NoDataPlaceholder /></div><div v-else class="flex"><div@@ -48,7 +44,6 @@import { NCheckbox } from "naive-ui";import { reactive, computed } from "vue";import { useI18n } from "vue-i18n";-import NoData from "@/components/misc/NoData.vue";import { Engine } from "@/types/proto/v1/common";import { SchemaTemplateSetting_TableTemplate } from "@/types/proto/v1/setting_service";import TableTemplateTable from "./TableTemplateTable.vue";diff --git a/frontend/src/components/SensitiveData/NoDataPlaceholder.vue b/frontend/src/components/SensitiveData/NoDataPlaceholder.vuedeleted file mode 100644index a63cc1381d..0000000000--- a/frontend/src/components/SensitiveData/NoDataPlaceholder.vue+++ /dev/null@@ -1,14 +0,0 @@-<template>- <div- class="border-4 border-dashed border-gray-200 rounded-lg h-96 flex flex-col justify-center items-center"- >- <NoData- :img-attrs="{- class: '!w-auto max-h-[20vh]',- }"- />- <slot />- </div>-</template>--<script lang="ts" setup></script>diff --git a/frontend/src/components/misc/NoData.vue b/frontend/src/components/misc/NoData.vuedeleted file mode 100644index be22fd7040..0000000000--- a/frontend/src/components/misc/NoData.vue+++ /dev/null@@ -1,18 +0,0 @@-<template>- <div class="text-center flex flex-col justify-center items-center">- <img- src="@/assets/illustration/no-data.webp"- class="w-52"- v-bind="imgAttrs"- />- <slot name="default" />- </div>-</template>--<script setup lang="ts">-import { HTMLAttributes } from "vue";--defineProps<{- imgAttrs?: HTMLAttributes;-}>();-</script>diff --git a/frontend/src/components/misc/NoDataPlaceholder.vue b/frontend/src/components/misc/NoDataPlaceholder.vuenew file mode 100644index 0000000000..85b2bd58f6--- /dev/null+++ b/frontend/src/components/misc/NoDataPlaceholder.vue@@ -0,0 +1,22 @@+<template>+ <div+ class="border-4 border-dashed border-gray-200 rounded-lg h-96 flex flex-col justify-center items-center"+ >+ <div class="text-center flex flex-col justify-center items-center">+ <img+ src="@/assets/illustration/no-data.webp"+ class="!w-auto max-h-[20vh]"+ v-bind="imgAttrs"+ />+ </div>+ <slot />+ </div>+</template>++<script lang="ts" setup>+import { HTMLAttributes } from "vue";++defineProps<{+ imgAttrs?: HTMLAttributes;+}>();+</script>diff --git a/frontend/src/views/SettingWorkspaceSSO.vue b/frontend/src/views/SettingWorkspaceSSO.vueindex 81cac3f794..553445c2b8 100644--- a/frontend/src/views/SettingWorkspaceSSO.vue+++ b/frontend/src/views/SettingWorkspaceSSO.vue@@ -24,15 +24,13 @@</div></div><NoDataPlaceholder v-if="identityProviderList.length === 0">- <div>- <NButton type="primary" @click="handleCreateSSO">- {{ $t("settings.sso.create") }}- <FeatureBadge- :feature="'bb.feature.sso'"- custom-class="ml-2 !text-white"- />- </NButton>- </div>+ <NButton type="primary" @click="handleCreateSSO">+ {{ $t("settings.sso.create") }}+ <FeatureBadge+ :feature="'bb.feature.sso'"+ custom-class="ml-2 !text-white"+ />+ </NButton></NoDataPlaceholder><template v-else><div class="w-full flex flex-col justify-start items-start space-y-4">