Skip to content

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

fix: add missing level badge (#9372)

ecmadaoe78693155b14
diff --git a/frontend/src/components/SchemaTemplate/ClassificationLevelBadge.vue b/frontend/src/components/SchemaTemplate/ClassificationLevelBadge.vue
index 6db12aef00..8e7e299cff 100644
--- a/frontend/src/components/SchemaTemplate/ClassificationLevelBadge.vue
+++ b/frontend/src/components/SchemaTemplate/ClassificationLevelBadge.vue
@@ -1,5 +1,5 @@
<template>
- {{ columnClassification?.title ?? placeholder }}
+ {{ showText ? columnClassification?.title ?? placeholder : "" }}
<span v-if="level" :class="['px-1 py-0.5 rounded text-xs', levelColor]">
{{ level.title }}
</span>
@@ -9,11 +9,20 @@
import { computed } from "vue";
import { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
-const props = defineProps<{
- classification?: string;
- classificationConfig?: DataClassificationSetting_DataClassificationConfig;
- placeholder?: string;
-}>();
+const props = withDefaults(
+ defineProps<{
+ showText?: boolean;
+ classification?: string;
+ classificationConfig?: DataClassificationSetting_DataClassificationConfig;
+ placeholder?: string;
+ }>(),
+ {
+ showText: true,
+ classification: undefined,
+ classificationConfig: undefined,
+ placeholder: undefined,
+ }
+);
const bgColorList = [
"bg-green-200",
diff --git a/frontend/src/components/SchemaTemplate/SelectClassificationDrawer.vue b/frontend/src/components/SchemaTemplate/SelectClassificationDrawer.vue
index 986f06a67d..49d52f2c04 100644
--- a/frontend/src/components/SchemaTemplate/SelectClassificationDrawer.vue
+++ b/frontend/src/components/SchemaTemplate/SelectClassificationDrawer.vue
@@ -149,8 +149,10 @@ const renderSuffix = ({ option }: { option: TreeOption }) => {
if (!node.levelId) {
return null;
}
+
return h(ClassificationLevelBadge, {
- levelId: node.levelId,
+ showText: false,
+ classification: node.key,
classificationConfig: props.classificationConfig,
});
};