refactor(editor): Extract logStreaming code into features (no-changelog) (#20488)

This commit is contained in:
Alex Grozav 2025-10-07 21:45:52 +03:00 committed by GitHub
parent 64572243c5
commit ffcbb0702f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 14 additions and 12 deletions

View File

@ -79,7 +79,7 @@ import NpsSurvey from '@/components/NpsSurvey.vue';
import PersonalizationModal from '@/components/PersonalizationModal.vue';
import PreBuiltAgentsModal from '@/components/PreBuiltAgentsModal.vue';
import ProjectMoveResourceModal from '@/components/Projects/ProjectMoveResourceModal.vue';
import EventDestinationSettingsModal from '@/components/SettingsLogStreaming/EventDestinationSettingsModal.ee.vue';
import EventDestinationSettingsModal from '@/features/logStreaming.ee/components/EventDestinationSettingsModal.vue';
import SetupWorkflowCredentialsModal from '@/features/templates/components/SetupWorkflowCredentialsModal.vue';
import SourceControlPullModal from '@/features/sourceControl.ee/components/SourceControlPullModal.vue';
import SourceControlPushModal from '@/features/sourceControl.ee/components/SourceControlPushModal.vue';

View File

@ -2,7 +2,7 @@
import { computed, onBeforeMount, onMounted, ref } from 'vue';
import { MODAL_CONFIRM } from '@/constants';
import { useMessage } from '@/composables/useMessage';
import { useLogStreamingStore } from '@/stores/logStreaming.store';
import { useLogStreamingStore } from '../logStreaming.store';
import type { MessageEventBusDestinationOptions } from 'n8n-workflow';
import { deepCopy, defaultMessageEventBusDestinationOptions } from 'n8n-workflow';
import type { BaseTextKey } from '@n8n/i18n';
@ -12,6 +12,7 @@ import { assert } from '@n8n/utils/assert';
import { ElSwitch } from 'element-plus';
import { N8nActionToggle, N8nCard, N8nHeading, N8nText } from '@n8n/design-system';
const DESTINATION_LIST_ITEM_ACTIONS = {
OPEN: 'open',
DELETE: 'delete',

View File

@ -25,7 +25,7 @@ import {
import type { EventBus } from '@n8n/utils/event-bus';
import { createEventBus } from '@n8n/utils/event-bus';
import { useLogStreamingStore } from '@/stores/logStreaming.store';
import { useLogStreamingStore } from '../logStreaming.store';
import { useNDVStore } from '@/stores/ndv.store';
import { useWorkflowsStore } from '@/stores/workflows.store';
import ParameterInputList from '@/components/ParameterInputList.vue';
@ -36,10 +36,10 @@ import { useI18n } from '@n8n/i18n';
import { useMessage } from '@/composables/useMessage';
import { useUIStore } from '@/stores/ui.store';
import { hasPermission } from '@/utils/rbac/permissions';
import { destinationToFakeINodeUi } from '@/components/SettingsLogStreaming/Helpers.ee';
import { destinationToFakeINodeUi } from '../logStreaming.utils';
import type { BaseTextKey } from '@n8n/i18n';
import SaveButton from '@/components/SaveButton.vue';
import EventSelection from '@/components/SettingsLogStreaming/EventSelection.ee.vue';
import EventSelection from './EventSelection.vue';
import { useTelemetry } from '@/composables/useTelemetry';
import { useRootStore } from '@n8n/stores/useRootStore';
@ -47,7 +47,7 @@ import {
webhookModalDescription,
sentryModalDescription,
syslogModalDescription,
} from './descriptions.ee';
} from '../logStreaming.constants';
import { useElementSize } from '@vueuse/core';
import {

View File

@ -1,8 +1,8 @@
import { createTestingPinia } from '@pinia/testing';
import { createComponentRenderer } from '@/__tests__/render';
import { mockedStore, type MockedStore } from '@/__tests__/utils';
import EventSelection from '@/components/SettingsLogStreaming/EventSelection.ee.vue';
import { useLogStreamingStore } from '@/stores/logStreaming.store';
import EventSelection from './EventSelection.vue';
import { useLogStreamingStore } from '../logStreaming.store';
const renderComponent = createComponentRenderer(EventSelection);

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import type { BaseTextKey } from '@n8n/i18n';
import { useLogStreamingStore } from '@/stores/logStreaming.store';
import { useLogStreamingStore } from '../logStreaming.store';
import { computed } from 'vue';
import { useI18n } from '@n8n/i18n';

View File

@ -4,13 +4,13 @@ import { v4 as uuid } from 'uuid';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { hasPermission } from '@/utils/rbac/permissions';
import { useCredentialsStore } from '@/stores/credentials.store';
import { useLogStreamingStore } from '@/stores/logStreaming.store';
import { useLogStreamingStore } from '../logStreaming.store';
import { useSettingsStore } from '@/stores/settings.store';
import { useUIStore } from '@/stores/ui.store';
import { LOG_STREAM_MODAL_KEY, EnterpriseEditionFeature } from '@/constants';
import type { MessageEventBusDestinationOptions } from 'n8n-workflow';
import { deepCopy, defaultMessageEventBusDestinationOptions } from 'n8n-workflow';
import EventDestinationCard from '@/components/SettingsLogStreaming/EventDestinationCard.ee.vue';
import EventDestinationCard from '../components/EventDestinationCard.vue';
import { createEventBus } from '@n8n/utils/event-bus';
import { useDocumentTitle } from '@/composables/useDocumentTitle';
import { useI18n } from '@n8n/i18n';

View File

@ -43,7 +43,8 @@ const SettingsUsersView = async () => await import('./views/SettingsUsersView.vu
const SettingsCommunityNodesView = async () =>
await import('./views/SettingsCommunityNodesView.vue');
const SettingsApiView = async () => await import('./views/SettingsApiView.vue');
const SettingsLogStreamingView = async () => await import('./views/SettingsLogStreamingView.vue');
const SettingsLogStreamingView = async () =>
await import('@/features/logStreaming.ee/views/SettingsLogStreamingView.vue');
const SetupView = async () => await import('./views/SetupView.vue');
const SigninView = async () => await import('./views/SigninView.vue');
const SignupView = async () => await import('./views/SignupView.vue');