feat(editor): Add execute workflow functionality and statuses to new canvas (no-changelog) (#9902)

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
Alex Grozav
2024-07-08 13:25:18 +03:00
committed by GitHub
parent 1807835740
commit 8f970b5d37
33 changed files with 1394 additions and 330 deletions

View File

@@ -70,6 +70,10 @@ function getTemplatesRedirect(defaultRedirect: VIEWS[keyof VIEWS]): { name: stri
return false;
}
function nodeViewV2CustomMiddleware() {
return !!localStorage.getItem('features.NodeViewV2');
}
export const routes: RouteRecordRaw[] = [
{
path: '/',
@@ -367,13 +371,29 @@ export const routes: RouteRecordRaw[] = [
sidebar: MainSidebar,
},
meta: {
nodeView: true,
keepWorkflowAlive: true,
middleware: ['authenticated', 'custom'],
middlewareOptions: {
custom: () => {
return !!localStorage.getItem('features.NodeViewV2');
},
custom: nodeViewV2CustomMiddleware,
},
},
},
{
path: '/workflow-v2/new',
name: VIEWS.NEW_WORKFLOW_V2,
components: {
default: NodeViewV2,
header: MainHeader,
sidebar: MainSidebar,
},
meta: {
nodeView: true,
keepWorkflowAlive: true,
middleware: ['authenticated', 'custom'],
middlewareOptions: {
custom: nodeViewV2CustomMiddleware,
},
},
},
{