Make it possible to display notes in flow

This commit is contained in:
Jan Oberhauser 2020-05-05 17:34:12 +02:00
parent adff086ea2
commit 3d330a94d3
3 changed files with 19 additions and 0 deletions

View file

@ -129,6 +129,10 @@ export default mixins(nodeBase, workflowHelpers).extend({
}
},
nodeSubtitle (): string | undefined {
if (this.data.notesInFlow) {
return this.data.notes;
}
if (this.nodeType !== null && this.nodeType.subtitle !== undefined) {
return this.workflow.getSimpleParameterValue(this.data as INode, this.nodeType.subtitle) as string | undefined;
}

View file

@ -142,6 +142,7 @@ export default mixins(
nodeValues: {
color: '#ff0000',
alwaysOutputData: false,
notesInFlow: false,
continueOnFail: false,
retryOnFail: false,
maxTries: 3,
@ -162,6 +163,14 @@ export default mixins(
noDataExpression: true,
description: 'Notes to save with the node.',
},
{
displayName: 'Notes In Flow',
name: 'notesInFlow',
type: 'boolean',
default: false,
noDataExpression: true,
description: 'If activated it will display the above notes in the flow as subtitle.',
},
{
displayName: 'Node Color',
name: 'color',
@ -438,6 +447,11 @@ export default mixins(
Vue.set(this.nodeValues, 'continueOnFail', this.node.continueOnFail);
}
if (this.node.notesInFlow) {
foundNodeSettings.push('notesInFlow');
Vue.set(this.nodeValues, 'notesInFlow', this.node.notesInFlow);
}
if (this.node.retryOnFail) {
foundNodeSettings.push('retryOnFail');
Vue.set(this.nodeValues, 'retryOnFail', this.node.retryOnFail);

View file

@ -289,6 +289,7 @@ export interface INode {
type: string;
position: [number, number];
disabled?: boolean;
notesInFlow?: boolean;
retryOnFail?: boolean;
maxTries?: number;
waitBetweenTries?: number;