mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
chore: Clean up Schema Preview feature flag (no-changelog) (#15191)
This commit is contained in:
@@ -35,13 +35,8 @@ import {
|
||||
} from 'vue-virtual-scroller';
|
||||
import MappingPill from './MappingPill.vue';
|
||||
|
||||
import {
|
||||
EnterpriseEditionFeature,
|
||||
PLACEHOLDER_FILLED_AT_EXECUTION_TIME,
|
||||
SCHEMA_PREVIEW_EXPERIMENT,
|
||||
} from '@/constants';
|
||||
import { EnterpriseEditionFeature, PLACEHOLDER_FILLED_AT_EXECUTION_TIME } from '@/constants';
|
||||
import useEnvironmentsStore from '@/stores/environments.ee.store';
|
||||
import { usePostHog } from '@/stores/posthog.store';
|
||||
import { useSchemaPreviewStore } from '@/stores/schemaPreview.store';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { isEmpty } from '@/utils/typesUtils';
|
||||
@@ -81,7 +76,6 @@ const workflowsStore = useWorkflowsStore();
|
||||
const schemaPreviewStore = useSchemaPreviewStore();
|
||||
const environmentsStore = useEnvironmentsStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
const posthogStore = usePostHog();
|
||||
|
||||
const { getSchemaForExecutionData, getSchemaForJsonSchema, getSchema, filterSchema } =
|
||||
useDataSchema();
|
||||
@@ -131,7 +125,7 @@ const getNodeSchema = async (fullNode: INodeUi, connectedNode: IConnectedNode) =
|
||||
let schema = getSchemaForExecutionData(data);
|
||||
let preview = false;
|
||||
|
||||
if (data.length === 0 && isSchemaPreviewEnabled.value) {
|
||||
if (data.length === 0) {
|
||||
const previewSchema = await getSchemaPreview(fullNode);
|
||||
if (previewSchema.ok) {
|
||||
schema = getSchemaForJsonSchema(previewSchema.result);
|
||||
@@ -151,10 +145,6 @@ const getNodeSchema = async (fullNode: INodeUi, connectedNode: IConnectedNode) =
|
||||
};
|
||||
};
|
||||
|
||||
const isSchemaPreviewEnabled = computed(() =>
|
||||
posthogStore.isVariantEnabled(SCHEMA_PREVIEW_EXPERIMENT.name, SCHEMA_PREVIEW_EXPERIMENT.variant),
|
||||
);
|
||||
|
||||
const isVariablesEnabled = computed(
|
||||
() => settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.Variables],
|
||||
);
|
||||
@@ -228,7 +218,7 @@ const contextItems = computed(() => {
|
||||
|
||||
const nodeSchema = asyncComputed(async () => {
|
||||
const search = props.search;
|
||||
if (props.data.length === 0 && isSchemaPreviewEnabled.value) {
|
||||
if (props.data.length === 0) {
|
||||
const previewSchema = await getSchemaPreview(props.node);
|
||||
if (previewSchema.ok) {
|
||||
return filterSchema(getSchemaForJsonSchema(previewSchema.result), search);
|
||||
|
||||
Reference in New Issue
Block a user