Skip to content

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

fix: database label filter (#15568)

ecmadaode12fe35e7fe
diff --git a/frontend/src/components/AdvancedSearch/useCommonSearchScopeOptions.ts b/frontend/src/components/AdvancedSearch/useCommonSearchScopeOptions.ts
index 012074571c..d48db59398 100644
--- a/frontend/src/components/AdvancedSearch/useCommonSearchScopeOptions.ts
+++ b/frontend/src/components/AdvancedSearch/useCommonSearchScopeOptions.ts
@@ -160,8 +160,8 @@ export const useCommonSearchScopeOptions = (
};
}),
}),
- label: () => ({
- id: "label",
+ "database-label": () => ({
+ id: "database-label",
title: t("issue.advanced-search.scope.database-label.title"),
description: t(
"issue.advanced-search.scope.database-label.description"
diff --git a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
index 4ad0ad1e81..13ed1d2997 100644
--- a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
@@ -190,7 +190,7 @@ const state = reactive<LocalState>({
const scopeOptions = useCommonSearchScopeOptions(
computed(() => state.params),
- computed(() => ["project", "instance", "environment", "label"])
+ computed(() => ["project", "instance", "environment", "database-label"])
);
const selectedInstance = computed(() => {
@@ -215,7 +215,7 @@ const selectedEnvironment = computed(() => {
const selectedLabels = computed(() => {
return state.params.scopes
- .filter((scope) => scope.id === "label")
+ .filter((scope) => scope.id === "database-label")
.map((scope) => scope.value);
});
diff --git a/frontend/src/components/DataExportPrepForm/DataExportPrepForm.vue b/frontend/src/components/DataExportPrepForm/DataExportPrepForm.vue
index ff2bd4f000..c674679184 100644
--- a/frontend/src/components/DataExportPrepForm/DataExportPrepForm.vue
+++ b/frontend/src/components/DataExportPrepForm/DataExportPrepForm.vue
@@ -102,7 +102,7 @@ const state = reactive<LocalState>({
const scopeOptions = useCommonSearchScopeOptions(
computed(() => state.params),
- ["environment", "instance", "label"]
+ ["environment", "instance", "database-label"]
);
const selectedInstance = computed(() => {
@@ -127,7 +127,7 @@ const selectedEnvironment = computed(() => {
const selectedLabels = computed(() => {
return state.params.scopes
- .filter((scope) => scope.id === "label")
+ .filter((scope) => scope.id === "database-label")
.map((scope) => scope.value);
});
diff --git a/frontend/src/components/ProjectDatabasesPanel.vue b/frontend/src/components/ProjectDatabasesPanel.vue
index dcaaf25741..110c0dbbe8 100644
--- a/frontend/src/components/ProjectDatabasesPanel.vue
+++ b/frontend/src/components/ProjectDatabasesPanel.vue
@@ -126,7 +126,7 @@ const allowToCreateDB = computed(() => {
const scopeOptions = useCommonSearchScopeOptions(
computed(() => state.params),
- [...CommonFilterScopeIdList, "label", "engine"]
+ [...CommonFilterScopeIdList, "database-label", "engine"]
);
const selectedInstance = computed(() => {
@@ -151,7 +151,7 @@ const selectedEnvironment = computed(() => {
const selectedLabels = computed(() => {
return state.params.scopes
- .filter((scope) => scope.id === "label")
+ .filter((scope) => scope.id === "database-label")
.map((scope) => scope.value);
});
diff --git a/frontend/src/utils/v1/advanced-search/common.ts b/frontend/src/utils/v1/advanced-search/common.ts
index 31e1d2eb17..3edfa7b463 100644
--- a/frontend/src/utils/v1/advanced-search/common.ts
+++ b/frontend/src/utils/v1/advanced-search/common.ts
@@ -26,9 +26,10 @@ export const AllSearchScopeIdList = [
"status",
// database related search scopes.
"engine",
+ "database-label",
// issue related search scopes.
"subscriber",
- "label", // label is also used by database search
+ "label",
"taskType",
// auditLog related search scopes.
"method",
diff --git a/frontend/src/views/DatabaseDashboard.vue b/frontend/src/views/DatabaseDashboard.vue
index ce53b748e6..74e2d05bbb 100644
--- a/frontend/src/views/DatabaseDashboard.vue
+++ b/frontend/src/views/DatabaseDashboard.vue
@@ -130,12 +130,12 @@ const allowToCreateDB = computed(() => {
const scopeOptions = useCommonSearchScopeOptions(
computed(() => state.params),
- [...CommonFilterScopeIdList, "project", "label", "engine"]
+ [...CommonFilterScopeIdList, "project", "database-label", "engine"]
);
const selectedLabels = computed(() => {
return state.params.scopes
- .filter((scope) => scope.id === "label")
+ .filter((scope) => scope.id === "database-label")
.map((scope) => scope.value);
});
diff --git a/frontend/src/views/InstanceDetail.vue b/frontend/src/views/InstanceDetail.vue
index 70a8412482..2844ca9ab2 100644
--- a/frontend/src/views/InstanceDetail.vue
+++ b/frontend/src/views/InstanceDetail.vue
@@ -184,7 +184,7 @@ const route = useRoute();
const scopeOptions = useCommonSearchScopeOptions(
computed(() => state.params),
- [...CommonFilterScopeIdList, "project", "label"]
+ [...CommonFilterScopeIdList, "project", "database-label"]
);
watch(
@@ -245,7 +245,7 @@ const selectedProject = computed(() => {
const selectedLabels = computed(() => {
return state.params.scopes
- .filter((scope) => scope.id === "label")
+ .filter((scope) => scope.id === "database-label")
.map((scope) => scope.value);
});