diff --git a/packages/plugins/workflow/src/client/nodes/index.tsx b/packages/plugins/workflow/src/client/nodes/index.tsx index bb23a7bb9..6489e2c01 100644 --- a/packages/plugins/workflow/src/client/nodes/index.tsx +++ b/packages/plugins/workflow/src/client/nodes/index.tsx @@ -343,6 +343,21 @@ export function NodeDefaultView(props) { } }, properties: { + ...(workflow.executed ? { + alert: { + 'x-component': Alert, + 'x-component-props': { + type: 'warning', + showIcon: true, + message: `{{t("Node in executed workflow cannot be modified", { ns: "${NAMESPACE}" })}}`, + className: css` + width: 100%; + font-size: 85%; + margin-bottom: 2em; + ` + }, + } + } : {}), title: { type: 'string', name: 'title', @@ -368,25 +383,12 @@ export function NodeDefaultView(props) { }, properties: instruction.fieldset }, - actions: { + actions: workflow.executed + ? null + : { type: 'void', 'x-component': 'Action.Drawer.Footer', - properties: workflow.executed - ? { - alert: { - 'x-component': Alert, - 'x-component-props': { - type: 'warning', - showIcon: true, - message: `{{t("Node in executed workflow cannot be modified", { ns: "${NAMESPACE}" })}}`, - className: css` - width: 100%; - font-size: 85%; - ` - }, - } - } - : { + properties: { cancel: { title: '{{t("Cancel")}}', 'x-component': 'Action', diff --git a/packages/plugins/workflow/src/client/triggers/index.tsx b/packages/plugins/workflow/src/client/triggers/index.tsx index 428da8e82..442223737 100644 --- a/packages/plugins/workflow/src/client/triggers/index.tsx +++ b/packages/plugins/workflow/src/client/triggers/index.tsx @@ -179,27 +179,31 @@ export const TriggerConfig = () => { } ` }, - properties: fieldset + properties: { + ...(executed ? { + alert: { + 'x-component': Alert, + 'x-component-props': { + type: 'warning', + showIcon: true, + message: `{{t("Trigger in executed workflow cannot be modified", { ns: "${NAMESPACE}" })}}`, + className: css` + width: 100%; + font-size: 85%; + margin-bottom: 2em; + ` + }, + } + } : {}), + ...fieldset + } }, - actions: { + actions: executed + ? null + : { type: 'void', 'x-component': 'Action.Drawer.Footer', - properties: executed - ? { - alert: { - 'x-component': Alert, - 'x-component-props': { - type: 'warning', - showIcon: true, - message: `{{t("Trigger in executed workflow cannot be modified", { ns: "${NAMESPACE}" })}}`, - className: css` - width: 100%; - font-size: 85%; - ` - }, - } - } - : { + properties: { cancel: { title: '{{t("Cancel")}}', 'x-component': 'Action',