mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
fix(core): prevent default namespace from being applied to filters without namespace key (#13767)
This commit is contained in:
@@ -4,7 +4,7 @@ import {useMiscStore} from "override/stores/misc";
|
||||
import {defaultNamespace} from "../../../composables/useNamespaces";
|
||||
|
||||
interface DefaultFilterOptions {
|
||||
namespace?: string;
|
||||
namespace?: string | null;
|
||||
includeTimeRange?: boolean;
|
||||
includeScope?: boolean;
|
||||
legacyQuery?: boolean;
|
||||
@@ -29,7 +29,8 @@ export function applyDefaultFilters(
|
||||
const query = {...currentQuery};
|
||||
let change = false;
|
||||
|
||||
if (namespace === undefined && defaultNamespace() && !hasFilterKey(query, NAMESPACE_FILTER_PREFIX)) {
|
||||
|
||||
if (namespace !== null && defaultNamespace() && !hasFilterKey(query, NAMESPACE_FILTER_PREFIX)) {
|
||||
query[legacyQuery ? "namespace" : `${NAMESPACE_FILTER_PREFIX}[PREFIX]`] = defaultNamespace();
|
||||
change = true;
|
||||
}
|
||||
|
||||
@@ -399,6 +399,7 @@ export function useFilters(
|
||||
|
||||
const {resetDefaultFilter} = useDefaultFilter({
|
||||
legacyQuery,
|
||||
namespace: configuration.keys?.some((k) => k.key === "namespace") ? undefined : null,
|
||||
includeScope: defaultScope ?? configuration.keys?.some((k) => k.key === "scope"),
|
||||
includeTimeRange: defaultTimeRange ?? configuration.keys?.some((k) => k.key === "timeRange"),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user