mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
feat(core): Add advancedFilters feature flag (#5638)
adds advancedFilters feature flag
This commit is contained in:
parent
6c1286fadf
commit
0b5ef09e7c
|
@ -524,6 +524,7 @@ export interface IN8nUISettings {
|
||||||
ldap: boolean;
|
ldap: boolean;
|
||||||
saml: boolean;
|
saml: boolean;
|
||||||
logStreaming: boolean;
|
logStreaming: boolean;
|
||||||
|
advancedFilters: boolean;
|
||||||
};
|
};
|
||||||
hideUsagePage: boolean;
|
hideUsagePage: boolean;
|
||||||
license: {
|
license: {
|
||||||
|
|
|
@ -106,6 +106,10 @@ export class License {
|
||||||
return this.isFeatureEnabled(LICENSE_FEATURES.SAML);
|
return this.isFeatureEnabled(LICENSE_FEATURES.SAML);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isAdvancedFiltersEnabled() {
|
||||||
|
return this.isFeatureEnabled(LICENSE_FEATURES.ADVANCED_FILTERS);
|
||||||
|
}
|
||||||
|
|
||||||
getCurrentEntitlements() {
|
getCurrentEntitlements() {
|
||||||
return this.manager?.getCurrentEntitlements() ?? [];
|
return this.manager?.getCurrentEntitlements() ?? [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,7 +144,10 @@ import { PostHogClient } from './posthog';
|
||||||
import { eventBus } from './eventbus';
|
import { eventBus } from './eventbus';
|
||||||
import { Container } from 'typedi';
|
import { Container } from 'typedi';
|
||||||
import { InternalHooks } from './InternalHooks';
|
import { InternalHooks } from './InternalHooks';
|
||||||
import { getStatusUsingPreviousExecutionStatusMethod } from './executions/executionHelpers';
|
import {
|
||||||
|
getStatusUsingPreviousExecutionStatusMethod,
|
||||||
|
isAdvancedFiltersEnabled,
|
||||||
|
} from './executions/executionHelpers';
|
||||||
import { getSamlLoginLabel, isSamlLoginEnabled, isSamlLicensed } from './sso/saml/samlHelpers';
|
import { getSamlLoginLabel, isSamlLoginEnabled, isSamlLicensed } from './sso/saml/samlHelpers';
|
||||||
import { samlControllerPublic } from './sso/saml/routes/saml.controller.public.ee';
|
import { samlControllerPublic } from './sso/saml/routes/saml.controller.public.ee';
|
||||||
import { SamlService } from './sso/saml/saml.service.ee';
|
import { SamlService } from './sso/saml/saml.service.ee';
|
||||||
|
@ -300,6 +303,7 @@ class Server extends AbstractServer {
|
||||||
ldap: false,
|
ldap: false,
|
||||||
saml: false,
|
saml: false,
|
||||||
logStreaming: config.getEnv('enterprise.features.logStreaming'),
|
logStreaming: config.getEnv('enterprise.features.logStreaming'),
|
||||||
|
advancedFilters: config.getEnv('enterprise.features.advancedFilters'),
|
||||||
},
|
},
|
||||||
hideUsagePage: config.getEnv('hideUsagePage'),
|
hideUsagePage: config.getEnv('hideUsagePage'),
|
||||||
license: {
|
license: {
|
||||||
|
@ -328,6 +332,7 @@ class Server extends AbstractServer {
|
||||||
logStreaming: isLogStreamingEnabled(),
|
logStreaming: isLogStreamingEnabled(),
|
||||||
ldap: isLdapEnabled(),
|
ldap: isLdapEnabled(),
|
||||||
saml: isSamlLicensed(),
|
saml: isSamlLicensed(),
|
||||||
|
advancedFilters: isAdvancedFiltersEnabled(),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isLdapEnabled()) {
|
if (isLdapEnabled()) {
|
||||||
|
|
|
@ -1008,6 +1008,10 @@ export const schema = {
|
||||||
format: Boolean,
|
format: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
advancedFilters: {
|
||||||
|
format: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,7 @@ export enum LICENSE_FEATURES {
|
||||||
LDAP = 'feat:ldap',
|
LDAP = 'feat:ldap',
|
||||||
SAML = 'feat:saml',
|
SAML = 'feat:saml',
|
||||||
LOG_STREAMING = 'feat:logStreaming',
|
LOG_STREAMING = 'feat:logStreaming',
|
||||||
|
ADVANCED_FILTERS = 'feat:advancedFilters',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const CREDENTIAL_BLANKING_VALUE = '__n8n_BLANK_VALUE_e5362baf-c777-4d57-a609-6eaf1f9e87f6';
|
export const CREDENTIAL_BLANKING_VALUE = '__n8n_BLANK_VALUE_e5362baf-c777-4d57-a609-6eaf1f9e87f6';
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import type { IExecutionFlattedDb } from '../Interfaces';
|
import type { IExecutionFlattedDb } from '@/Interfaces';
|
||||||
import type { ExecutionStatus } from 'n8n-workflow';
|
import type { ExecutionStatus } from 'n8n-workflow';
|
||||||
|
import { getLicense } from '@/License';
|
||||||
|
import config from '@/config';
|
||||||
|
|
||||||
export function getStatusUsingPreviousExecutionStatusMethod(
|
export function getStatusUsingPreviousExecutionStatusMethod(
|
||||||
execution: IExecutionFlattedDb,
|
execution: IExecutionFlattedDb,
|
||||||
|
@ -16,3 +18,8 @@ export function getStatusUsingPreviousExecutionStatusMethod(
|
||||||
return 'unknown';
|
return 'unknown';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isAdvancedFiltersEnabled(): boolean {
|
||||||
|
const license = getLicense();
|
||||||
|
return config.getEnv('enterprise.features.advancedFilters') || license.isAdvancedFiltersEnabled();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue