diff --git a/packages/editor-ui/src/components/MainHeader/MainHeader.vue b/packages/editor-ui/src/components/MainHeader/MainHeader.vue index 0625d2ff2c..47133cc193 100644 --- a/packages/editor-ui/src/components/MainHeader/MainHeader.vue +++ b/packages/editor-ui/src/components/MainHeader/MainHeader.vue @@ -36,6 +36,7 @@ const dirtyState = ref(false); const tabBarItems = computed(() => [ { value: MAIN_HEADER_TABS.WORKFLOW, label: locale.baseText('generic.editor') }, { value: MAIN_HEADER_TABS.EXECUTIONS, label: locale.baseText('generic.executions') }, + { value: MAIN_HEADER_TABS.EVALUATION, label: locale.baseText('generic.tests') }, ]); const activeNode = computed(() => ndvStore.activeNode); @@ -67,6 +68,10 @@ onMounted(async () => { }); function syncTabsWithRoute(to: RouteLocation, from?: RouteLocation): void { + console.log('🚀 ~ syncTabsWithRoute ~ to.name:', to.name); + if (to.name === VIEWS.WORKFLOW_EVALUATION) { + activeHeaderTab.value = MAIN_HEADER_TABS.EVALUATION; + } if ( to.name === VIEWS.EXECUTION_HOME || to.name === VIEWS.WORKFLOW_EXECUTIONS || @@ -106,6 +111,11 @@ function onTabSelected(tab: MAIN_HEADER_TABS, event: MouseEvent) { void navigateToExecutionsView(openInNewTab); break; + case MAIN_HEADER_TABS.EVALUATION: + activeHeaderTab.value = MAIN_HEADER_TABS.EVALUATION; + void router.push({ name: VIEWS.WORKFLOW_EVALUATION }); + break; + default: break; } diff --git a/packages/editor-ui/src/constants.ts b/packages/editor-ui/src/constants.ts index 325a6737fc..415e3addd9 100644 --- a/packages/editor-ui/src/constants.ts +++ b/packages/editor-ui/src/constants.ts @@ -484,6 +484,8 @@ export const enum VIEWS { COMMUNITY_NODES = 'CommunityNodes', WORKFLOWS = 'WorkflowsView', WORKFLOW_EXECUTIONS = 'WorkflowExecutions', + WORKFLOW_EVALUATION = 'WorkflowEvaluation', + NEW_WORKFLOW_EVALUATION = 'NewWorkflowEvaluation', USAGE = 'Usage', LOG_STREAMING_SETTINGS = 'LogStreamingSettingsView', SSO_SETTINGS = 'SSoSettings', @@ -580,6 +582,7 @@ export const enum MAIN_HEADER_TABS { WORKFLOW = 'workflow', EXECUTIONS = 'executions', SETTINGS = 'settings', + EVALUATION = 'evaluation', } export const CURL_IMPORT_NOT_SUPPORTED_PROTOCOLS = [ 'ftp', diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index 2b6f03cb2b..c9cc9c39e6 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -47,6 +47,7 @@ "generic.delete": "Delete", "generic.dontShowAgain": "Don't show again", "generic.executions": "Executions", + "generic.tests": "Tests", "generic.or": "or", "generic.clickToCopy": "Click to copy", "generic.copiedToClipboard": "Copied to clipboard", diff --git a/packages/editor-ui/src/router.ts b/packages/editor-ui/src/router.ts index 8a22cdf2f7..a64c36819d 100644 --- a/packages/editor-ui/src/router.ts +++ b/packages/editor-ui/src/router.ts @@ -18,6 +18,8 @@ import type { RouterMiddleware } from '@/types/router'; import { initializeAuthenticatedFeatures, initializeCore } from '@/init'; import { tryToParseNumber } from '@/utils/typesUtils'; import { projectsRoutes } from '@/routes/projects.routes'; +import WorkflowEvaluationView from './views/WorkflowEvaluationView.vue'; +import NewWorkflowEvaluationView from './views/NewWorkflowEvaluationView.vue'; const ChangePasswordView = async () => await import('./views/ChangePasswordView.vue'); const ErrorView = async () => await import('./views/ErrorView.vue'); @@ -248,6 +250,80 @@ export const routes: RouteRecordRaw[] = [ }, ], }, + { + path: '/workflow/:name/evaluation', + name: VIEWS.WORKFLOW_EVALUATION, + components: { + default: WorkflowEvaluationView, + header: MainHeader, + sidebar: MainSidebar, + }, + meta: { + keepWorkflowAlive: true, + middleware: ['authenticated'], + }, + // children: [ + // { + // path: '', + // name: VIEWS.EXECUTION_HOME, + // components: { + // executionPreview: WorkflowExecutionsLandingPage, + // }, + // meta: { + // keepWorkflowAlive: true, + // middleware: ['authenticated'], + // }, + // }, + // { + // path: ':executionId', + // name: VIEWS.EXECUTION_PREVIEW, + // components: { + // executionPreview: WorkflowExecutionsPreview, + // }, + // meta: { + // keepWorkflowAlive: true, + // middleware: ['authenticated'], + // }, + // }, + // ], + }, + { + path: '/workflow/:name/evaluation/new', + name: VIEWS.NEW_WORKFLOW_EVALUATION, + components: { + default: NewWorkflowEvaluationView, + header: MainHeader, + sidebar: MainSidebar, + }, + meta: { + keepWorkflowAlive: true, + middleware: ['authenticated'], + }, + // children: [ + // { + // path: '', + // name: VIEWS.EXECUTION_HOME, + // components: { + // executionPreview: WorkflowExecutionsLandingPage, + // }, + // meta: { + // keepWorkflowAlive: true, + // middleware: ['authenticated'], + // }, + // }, + // { + // path: ':executionId', + // name: VIEWS.EXECUTION_PREVIEW, + // components: { + // executionPreview: WorkflowExecutionsPreview, + // }, + // meta: { + // keepWorkflowAlive: true, + // middleware: ['authenticated'], + // }, + // }, + // ], + }, { path: '/workflow/:workflowId/history/:versionId?', name: VIEWS.WORKFLOW_HISTORY, diff --git a/packages/editor-ui/src/views/NewWorkflowEvaluationView.vue b/packages/editor-ui/src/views/NewWorkflowEvaluationView.vue new file mode 100644 index 0000000000..037a72768f --- /dev/null +++ b/packages/editor-ui/src/views/NewWorkflowEvaluationView.vue @@ -0,0 +1,25 @@ + + + + diff --git a/packages/editor-ui/src/views/WorkflowEvaluationView.vue b/packages/editor-ui/src/views/WorkflowEvaluationView.vue new file mode 100644 index 0000000000..7df750d898 --- /dev/null +++ b/packages/editor-ui/src/views/WorkflowEvaluationView.vue @@ -0,0 +1,42 @@ + + + +