Namespace workflowstate store

This commit is contained in:
mvdbeek
2023-01-09 17:15:42 +01:00
parent 791d7877cb
commit 2d41823acd
4 changed files with 7 additions and 8 deletions
@@ -287,7 +287,7 @@ export default {
return this.nodes[this.activeNodeId];
},
activeNodeId() {
return this.$store.getters.getActiveNode();
return this.$store.getters["workflowState/getActiveNode"]();
},
activeNodeName() {
return this.activeNode?.name;
@@ -463,7 +463,7 @@ export default {
tool_state: JSON.parse(JSON.stringify(node.tool_state)),
post_job_actions: JSON.parse(JSON.stringify(node.postJobActions)),
});
this.$store.commit("setActiveNode", newId);
this.$store.commit("workflowState/setActiveNode", newId);
},
onInsertTool(tool_id, tool_name) {
this._insertStep(tool_id, tool_name, "tool");
@@ -640,7 +640,7 @@ export default {
content_id: contentId,
type: type,
});
this.$store.commit("setActiveNode", this.nodeIndex);
this.$store.commit("workflowState/setActiveNode", this.nodeIndex);
},
async _loadEditorData(data) {
const report = data.report || {};
@@ -120,12 +120,12 @@ export default {
onActivate(nodeId) {
console.log("onNodeId", nodeId);
if (this.activeNodeId != nodeId) {
this.$store.commit("setActiveNode", nodeId);
this.canvasManager.drawOverview();
this.$store.commit("workflowState/setActiveNode", nodeId);
// this.canvasManager.drawOverview();
}
},
onDeactivate() {
this.$store.commit("setActiveNode", null);
this.$store.commit("workflowState/setActiveNode", null);
},
onRemove(nodeId) {
this.$emit("onRemove", nodeId);
-2
View File
@@ -19,7 +19,6 @@ import { collectionElementsStore, datasetStore, historyStore } from "./historySt
import { userStore, userFlagsStore } from "./userStore";
import { configStore } from "./configStore";
import { workflowStateStore } from "./workflowEditorStateStore";
import { workflowStore } from "./workflowStore";
import { toolStore } from "./toolStore";
import { datasetPathDestinationStore } from "./datasetPathDestinationStore";
import { datasetExtFilesStore } from "./datasetExtFilesStore";
@@ -73,7 +72,6 @@ export function createStore() {
tools: toolStore,
user: userStore,
userFlags: userFlagsStore,
workflows: workflowStore,
workflowState: workflowStateStore,
},
};
@@ -40,6 +40,7 @@ const mutations = {
};
export const workflowStateStore = {
namespaced: true,
state,
getters,
actions,