diff --git a/client/src/components/History/Content/ExpandedItems.js b/client/src/components/History/Content/ExpandedItems.js index 77da8d05ed10..57e0ae3fa228 100644 --- a/client/src/components/History/Content/ExpandedItems.js +++ b/client/src/components/History/Content/ExpandedItems.js @@ -4,6 +4,7 @@ export default { props: { scopeKey: { type: String, required: true }, getItemKey: { type: Function, required: true }, + explicitKey: { type: String, required: false }, }, data() { return { @@ -37,14 +38,21 @@ export default { } }, items(newSet) { + if (this.explicitKey) { + return; + } saveSet(this.key, newSet); }, }, created() { - this.key = "expanded-history-items"; - const cachedSet = loadSet(this.key); - if (cachedSet) { - this.items = cachedSet; + if (this.explicitKey) { + this.key = this.explicitKey; + } else { + this.key = "expanded-history-items"; + const cachedSet = loadSet(this.key); + if (cachedSet) { + this.items = cachedSet; + } } }, render() { diff --git a/client/src/components/Workflow/Editor/Node.vue b/client/src/components/Workflow/Editor/Node.vue index e152292f2db3..c04c41619893 100644 --- a/client/src/components/Workflow/Editor/Node.vue +++ b/client/src/components/Workflow/Editor/Node.vue @@ -12,8 +12,10 @@ :disabled="readonly" @move="onMoveTo" @pan-by="onPanBy"> +
@@ -74,6 +76,12 @@ >{{ step.id + 1 }}: {{ title }} + + +
{{ errors }} -
+ +
-
+
+ , default: null }, name: { type: String as PropType, default: null }, - step: { type: Object as PropType, required: true }, + step: { type: Object as PropType, required: true }, datatypesMapper: { type: DatatypesMapperModel, required: true }, activeNodeId: { type: null as unknown as PropType, @@ -164,6 +185,7 @@ const props = defineProps({ scroll: { type: Object as PropType, required: true }, scale: { type: Number, default: 1 }, highlight: { type: Boolean, default: false }, + isInvocation: { type: Boolean, default: false }, readonly: { type: Boolean, default: false }, }); @@ -220,6 +242,23 @@ const style = computed(() => { return { top: props.step.position!.top + "px", left: props.step.position!.left + "px" }; }); const errors = computed(() => props.step.errors || stateStore.getStepLoadingState(props.id)?.error); +const headerClass = computed(() => { + let cls; + if (props.isInvocation) { + cls = "cursor-pointer"; + if (invocationStep.value.headerClass) { + cls += ` ${invocationStep.value.headerClass}`; + } else { + cls += " node-header"; + } + } else { + cls = "node-header"; + if (!props.readonly && !props.isInvocation) { + cls += " cursor-move"; + } + } + return cls; +}); const inputs = computed(() => { const connections = connectionStore.getConnectionsForStep(props.id); const extraStepInputs = stepStore.getStepExtraInputs(props.id); @@ -248,6 +287,7 @@ const invalidOutputs = computed(() => { return { name, optional: false, datatypes: [], valid: false }; }); }); +const invocationStep = computed(() => props.step as GraphStep); const outputs = computed(() => { return [...props.step.outputs, ...invalidOutputs.value]; }); @@ -318,12 +358,21 @@ function makeActive() { } .node-header { - cursor: move; background: $brand-primary; color: $white; + &.cursor-move { + cursor: move; + } } .node-body { + .invocation-node-output { + position: absolute; + right: 0; + top: 0; + width: 100%; + height: 100%; + } .rule { height: 0; border: none; diff --git a/client/src/components/Workflow/Editor/NodeInput.vue b/client/src/components/Workflow/Editor/NodeInput.vue index 81e5dbcd8c1e..ff9c49400ffd 100644 --- a/client/src/components/Workflow/Editor/NodeInput.vue +++ b/client/src/components/Workflow/Editor/NodeInput.vue @@ -70,6 +70,10 @@ const props = defineProps({ type: Boolean, default: false, }, + blank: { + type: Boolean, + default: false, + }, }); onBeforeUnmount(() => { @@ -144,7 +148,7 @@ const label = computed(() => props.input.label || props.input.name); const hasConnections = computed(() => connections.value.length > 0); const rowClass = computed(() => { const classes = ["form-row", "dataRow", "input-data-row"]; - if (props.input?.valid === false) { + if (!props.blank && props.input?.valid === false) { classes.push("form-row-error"); } return classes; @@ -234,21 +238,23 @@ watch(
- - {{ label }} - - * + + + {{ label }} + + * +
diff --git a/client/src/components/Workflow/Editor/NodeInvocationText.vue b/client/src/components/Workflow/Editor/NodeInvocationText.vue new file mode 100644 index 000000000000..acc3dd31f555 --- /dev/null +++ b/client/src/components/Workflow/Editor/NodeInvocationText.vue @@ -0,0 +1,39 @@ + + diff --git a/client/src/components/Workflow/Editor/NodeOutput.vue b/client/src/components/Workflow/Editor/NodeOutput.vue index 3d21e05105ed..0d82c75e8820 100644 --- a/client/src/components/Workflow/Editor/NodeOutput.vue +++ b/client/src/components/Workflow/Editor/NodeOutput.vue @@ -50,6 +50,7 @@ const props = defineProps<{ datatypesMapper: DatatypesMapperModel; parentNode: HTMLElement | null; readonly: boolean; + blank: boolean; }>(); const emit = defineEmits(["pan-by", "stopDragging", "onDragConnector"]); @@ -321,7 +322,7 @@ const removeTagsAction = computed(() => {