From acbea93d57235156dabd62eb2d080056abcb14d7 Mon Sep 17 00:00:00 2001 From: Antoine Fourmy Date: Sun, 15 Dec 2019 10:44:50 -0500 Subject: [PATCH] fix bug display of newly created workflow --- docs/base/release_notes.rst | 4 ++-- eNMS/static/workflowBuilder.js | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/base/release_notes.rst b/docs/base/release_notes.rst index 2a90e3a59..861e9e168 100644 --- a/docs/base/release_notes.rst +++ b/docs/base/release_notes.rst @@ -10,8 +10,8 @@ Version 3.18.1 - Improve display of filtering forms - Reduce size of the service and workflow edit panel for low-resolution screens - Add "success" key before result postprocessing -- Remove "Enter subworfklow button", add button to switch to parent workflow -- +- Remove "Enter subworfklow" button in toolbar and add the same button in right-click menu +- Add button to switch to parent workflow Version 3.18 ------------ diff --git a/eNMS/static/workflowBuilder.js b/eNMS/static/workflowBuilder.js index 9d687c929..dbd3fb36e 100644 --- a/eNMS/static/workflowBuilder.js +++ b/eNMS/static/workflowBuilder.js @@ -269,7 +269,7 @@ function processWorkflowData(instance, id) { $("#current-workflow") .val(instance.id) .trigger("change"); - displayWorkflow({ workflow: instance, runtimes: [] }); + displayWorkflow({ service: instance, runtimes: [] }); } } else { call( @@ -642,7 +642,10 @@ Object.assign(action, { Backward: () => switchToWorkflow(arrowHistory[arrowPointer - 1], "left"), Forward: () => switchToWorkflow(arrowHistory[arrowPointer + 1], "right"), Upward: () => { - parentPath = currentPath.split(">").slice(0, -1).join(">"); + const parentPath = currentPath + .split(">") + .slice(0, -1) + .join(">"); if (parentPath) switchToWorkflow(parentPath); }, });