Skip to content

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

fix: ux (#15108)

ecmadao1ce980321032
diff --git a/frontend/src/components/MonacoEditor/composables/useSelectedContent.ts b/frontend/src/components/MonacoEditor/composables/useSelectedContent.ts
index b35ff65d65..f6aac49663 100644
--- a/frontend/src/components/MonacoEditor/composables/useSelectedContent.ts
+++ b/frontend/src/components/MonacoEditor/composables/useSelectedContent.ts
@@ -38,8 +38,8 @@ export const getActiveContentByCursor = (
}
return model.getValueInRange({
startLineNumber: position.lineNumber,
- startColumn: 0,
- endLineNumber: position.lineNumber,
- endColumn: editor.getBottomForLineNumber(position.lineNumber),
+ startColumn: 1,
+ endLineNumber: position.lineNumber + 1,
+ endColumn: 0,
});
};
diff --git a/frontend/src/components/SensitiveData/ClassificationView.vue b/frontend/src/components/SensitiveData/ClassificationView.vue
index 849e2de08a..a07eac95c5 100644
--- a/frontend/src/components/SensitiveData/ClassificationView.vue
+++ b/frontend/src/components/SensitiveData/ClassificationView.vue
@@ -11,7 +11,9 @@
<div class="flex items-center space-x-2">
<NSwitch
:value="!state.classification.classificationFromConfig"
- :disabled="!allowEdit || !hasSensitiveDataFeature"
+ :disabled="
+ !allowEdit || !hasSensitiveDataFeature || !hasClassificationConfig
+ "
@update:value="onClassificationConfigChange"
/>
<div class="font-medium leading-7 text-main">
@@ -140,6 +142,10 @@ const formerConfig = computed(() =>
})
);
+const hasClassificationConfig = computed(
+ () => settingStore.classification.length > 0
+);
+
const state = reactive<LocalState>({
showExampleModal: false,
classification: { ...formerConfig.value },