diff --git a/Elsa.sln b/Elsa.sln index de0c3cd54..0210bc3ce 100644 --- a/Elsa.sln +++ b/Elsa.sln @@ -366,7 +366,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.Forks", "src\s EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "retention", "retention", "{235ABC3F-A075-4682-B6D7-837098BA6B00}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Retention", "src\modules\Elsa.Retention\Elsa.Retention.csproj", "{6DD8EB07-95CD-4F5A-9C0C-FD7F317EBC5A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Retention", "src\modules\retention\Elsa.Retention\Elsa.Retention.csproj", "{FAEEA170-560C-4AF3-B4A8-92DEBD59D418}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -866,10 +866,10 @@ Global {AB67BA19-5BC2-4C6D-A994-61D51A6A6FD5}.Debug|Any CPU.Build.0 = Debug|Any CPU {AB67BA19-5BC2-4C6D-A994-61D51A6A6FD5}.Release|Any CPU.ActiveCfg = Release|Any CPU {AB67BA19-5BC2-4C6D-A994-61D51A6A6FD5}.Release|Any CPU.Build.0 = Release|Any CPU - {6DD8EB07-95CD-4F5A-9C0C-FD7F317EBC5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6DD8EB07-95CD-4F5A-9C0C-FD7F317EBC5A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6DD8EB07-95CD-4F5A-9C0C-FD7F317EBC5A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6DD8EB07-95CD-4F5A-9C0C-FD7F317EBC5A}.Release|Any CPU.Build.0 = Release|Any CPU + {FAEEA170-560C-4AF3-B4A8-92DEBD59D418}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FAEEA170-560C-4AF3-B4A8-92DEBD59D418}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FAEEA170-560C-4AF3-B4A8-92DEBD59D418}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FAEEA170-560C-4AF3-B4A8-92DEBD59D418}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1033,7 +1033,7 @@ Global {A2572DBF-AF11-4A02-AF99-B343871F2D85} = {22E75696-6FE9-436A-9097-EE21C603F818} {AB67BA19-5BC2-4C6D-A994-61D51A6A6FD5} = {FC9F520F-BA51-4AD2-BFEE-EF787798E734} {235ABC3F-A075-4682-B6D7-837098BA6B00} = {69BB424A-AAA3-415C-9651-9F4349CA3AC5} - {6DD8EB07-95CD-4F5A-9C0C-FD7F317EBC5A} = {235ABC3F-A075-4682-B6D7-837098BA6B00} + {FAEEA170-560C-4AF3-B4A8-92DEBD59D418} = {235ABC3F-A075-4682-B6D7-837098BA6B00} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {8B0975FD-7050-48B0-88C5-48C33378E158} diff --git a/src/core/Elsa.Abstractions/Extensions/ObjectConverter.cs b/src/core/Elsa.Abstractions/Extensions/ObjectConverter.cs index 738227c82..911b5aa24 100644 --- a/src/core/Elsa.Abstractions/Extensions/ObjectConverter.cs +++ b/src/core/Elsa.Abstractions/Extensions/ObjectConverter.cs @@ -9,7 +9,7 @@ namespace Elsa { public static class ObjectConverter { - public static T? ConvertTo(this object? value) => (T?) value.ConvertTo(typeof(T)); + public static T? ConvertTo(this object? value) => value != null ? (T?)value.ConvertTo(typeof(T)) : default; public static object? ConvertTo(this object? value, Type targetType) { diff --git a/src/designer/elsa-workflows-studio/src/components.d.ts b/src/designer/elsa-workflows-studio/src/components.d.ts index c9f06a446..6ad0fbc5b 100644 --- a/src/designer/elsa-workflows-studio/src/components.d.ts +++ b/src/designer/elsa-workflows-studio/src/components.d.ts @@ -43,6 +43,9 @@ export namespace Components { interface ElsaControl { "content": VNode | string | Element; } + interface ElsaCopyButton { + "value": string; + } interface ElsaDesignerTree { "activityBorderColor"?: (activity: ActivityModel) => string; "activityContextMenu"?: ActivityContextMenuState; @@ -54,6 +57,7 @@ export namespace Components { "mode": WorkflowDesignerMode; "model": WorkflowModel; "removeActivity": (activity: ActivityModel) => Promise; + "removeSelectedActivities": () => Promise; "selectedActivityIds": Array; "showActivityEditor": (activity: ActivityModel, animate: boolean) => Promise; } @@ -101,8 +105,8 @@ export namespace Components { "propertyModel": ActivityDefinitionProperty; } interface ElsaModalDialog { - "hide": (animate: boolean) => Promise; - "show": (animate: boolean) => Promise; + "hide": (animate?: boolean) => Promise; + "show": (animate?: boolean) => Promise; } interface ElsaMonaco { "addJavaScriptLib": (libSource: string, libUri: string) => Promise; @@ -248,11 +252,6 @@ export namespace Components { } interface ElsaWorkflowBlueprintPropertiesPanel { "culture": string; - "expandButtonPosition": number; - "serverUrl": string; - "workflowBlueprint": WorkflowBlueprint; - } - interface ElsaWorkflowBlueprintSidePanel { "serverUrl": string; "workflowId": string; } @@ -377,6 +376,12 @@ declare global { prototype: HTMLElsaControlElement; new (): HTMLElsaControlElement; }; + interface HTMLElsaCopyButtonElement extends Components.ElsaCopyButton, HTMLStencilElement { + } + var HTMLElsaCopyButtonElement: { + prototype: HTMLElsaCopyButtonElement; + new (): HTMLElsaCopyButtonElement; + }; interface HTMLElsaDesignerTreeElement extends Components.ElsaDesignerTree, HTMLStencilElement { } var HTMLElsaDesignerTreeElement: { @@ -599,12 +604,6 @@ declare global { prototype: HTMLElsaWorkflowBlueprintPropertiesPanelElement; new (): HTMLElsaWorkflowBlueprintPropertiesPanelElement; }; - interface HTMLElsaWorkflowBlueprintSidePanelElement extends Components.ElsaWorkflowBlueprintSidePanel, HTMLStencilElement { - } - var HTMLElsaWorkflowBlueprintSidePanelElement: { - prototype: HTMLElsaWorkflowBlueprintSidePanelElement; - new (): HTMLElsaWorkflowBlueprintSidePanelElement; - }; interface HTMLElsaWorkflowBlueprintViewerScreenElement extends Components.ElsaWorkflowBlueprintViewerScreen, HTMLStencilElement { } var HTMLElsaWorkflowBlueprintViewerScreenElement: { @@ -685,6 +684,7 @@ declare global { "elsa-confirm-dialog": HTMLElsaConfirmDialogElement; "elsa-context-menu": HTMLElsaContextMenuElement; "elsa-control": HTMLElsaControlElement; + "elsa-copy-button": HTMLElsaCopyButtonElement; "elsa-designer-tree": HTMLElsaDesignerTreeElement; "elsa-dropdown-button": HTMLElsaDropdownButtonElement; "elsa-dropdown-property": HTMLElsaDropdownPropertyElement; @@ -722,7 +722,6 @@ declare global { "elsa-webhook-definition-editor-screen": HTMLElsaWebhookDefinitionEditorScreenElement; "elsa-webhook-definitions-list-screen": HTMLElsaWebhookDefinitionsListScreenElement; "elsa-workflow-blueprint-properties-panel": HTMLElsaWorkflowBlueprintPropertiesPanelElement; - "elsa-workflow-blueprint-side-panel": HTMLElsaWorkflowBlueprintSidePanelElement; "elsa-workflow-blueprint-viewer-screen": HTMLElsaWorkflowBlueprintViewerScreenElement; "elsa-workflow-definition-editor-notifications": HTMLElsaWorkflowDefinitionEditorNotificationsElement; "elsa-workflow-definition-editor-screen": HTMLElsaWorkflowDefinitionEditorScreenElement; @@ -762,6 +761,9 @@ declare namespace LocalJSX { interface ElsaControl { "content"?: VNode | string | Element; } + interface ElsaCopyButton { + "value"?: string; + } interface ElsaDesignerTree { "activityBorderColor"?: (activity: ActivityModel) => string; "activityContextMenu"?: ActivityContextMenuState; @@ -971,11 +973,6 @@ declare namespace LocalJSX { } interface ElsaWorkflowBlueprintPropertiesPanel { "culture"?: string; - "expandButtonPosition"?: number; - "serverUrl"?: string; - "workflowBlueprint"?: WorkflowBlueprint; - } - interface ElsaWorkflowBlueprintSidePanel { "serverUrl"?: string; "workflowId"?: string; } @@ -1061,6 +1058,7 @@ declare namespace LocalJSX { "elsa-confirm-dialog": ElsaConfirmDialog; "elsa-context-menu": ElsaContextMenu; "elsa-control": ElsaControl; + "elsa-copy-button": ElsaCopyButton; "elsa-designer-tree": ElsaDesignerTree; "elsa-dropdown-button": ElsaDropdownButton; "elsa-dropdown-property": ElsaDropdownProperty; @@ -1098,7 +1096,6 @@ declare namespace LocalJSX { "elsa-webhook-definition-editor-screen": ElsaWebhookDefinitionEditorScreen; "elsa-webhook-definitions-list-screen": ElsaWebhookDefinitionsListScreen; "elsa-workflow-blueprint-properties-panel": ElsaWorkflowBlueprintPropertiesPanel; - "elsa-workflow-blueprint-side-panel": ElsaWorkflowBlueprintSidePanel; "elsa-workflow-blueprint-viewer-screen": ElsaWorkflowBlueprintViewerScreen; "elsa-workflow-definition-editor-notifications": ElsaWorkflowDefinitionEditorNotifications; "elsa-workflow-definition-editor-screen": ElsaWorkflowDefinitionEditorScreen; @@ -1124,6 +1121,7 @@ declare module "@stencil/core" { "elsa-confirm-dialog": LocalJSX.ElsaConfirmDialog & JSXBase.HTMLAttributes; "elsa-context-menu": LocalJSX.ElsaContextMenu & JSXBase.HTMLAttributes; "elsa-control": LocalJSX.ElsaControl & JSXBase.HTMLAttributes; + "elsa-copy-button": LocalJSX.ElsaCopyButton & JSXBase.HTMLAttributes; "elsa-designer-tree": LocalJSX.ElsaDesignerTree & JSXBase.HTMLAttributes; "elsa-dropdown-button": LocalJSX.ElsaDropdownButton & JSXBase.HTMLAttributes; "elsa-dropdown-property": LocalJSX.ElsaDropdownProperty & JSXBase.HTMLAttributes; @@ -1161,7 +1159,6 @@ declare module "@stencil/core" { "elsa-webhook-definition-editor-screen": LocalJSX.ElsaWebhookDefinitionEditorScreen & JSXBase.HTMLAttributes; "elsa-webhook-definitions-list-screen": LocalJSX.ElsaWebhookDefinitionsListScreen & JSXBase.HTMLAttributes; "elsa-workflow-blueprint-properties-panel": LocalJSX.ElsaWorkflowBlueprintPropertiesPanel & JSXBase.HTMLAttributes; - "elsa-workflow-blueprint-side-panel": LocalJSX.ElsaWorkflowBlueprintSidePanel & JSXBase.HTMLAttributes; "elsa-workflow-blueprint-viewer-screen": LocalJSX.ElsaWorkflowBlueprintViewerScreen & JSXBase.HTMLAttributes; "elsa-workflow-definition-editor-notifications": LocalJSX.ElsaWorkflowDefinitionEditorNotifications & JSXBase.HTMLAttributes; "elsa-workflow-definition-editor-screen": LocalJSX.ElsaWorkflowDefinitionEditorScreen & JSXBase.HTMLAttributes; diff --git a/src/designer/elsa-workflows-studio/src/components/dashboard/pages/elsa-studio-workflow-blueprint-view/readme.md b/src/designer/elsa-workflows-studio/src/components/dashboard/pages/elsa-studio-workflow-blueprint-view/readme.md index 568418166..88028b9ff 100644 --- a/src/designer/elsa-workflows-studio/src/components/dashboard/pages/elsa-studio-workflow-blueprint-view/readme.md +++ b/src/designer/elsa-workflows-studio/src/components/dashboard/pages/elsa-studio-workflow-blueprint-view/readme.md @@ -26,10 +26,8 @@ graph TD; elsa-workflow-blueprint-viewer-screen --> elsa-flyout-panel elsa-workflow-blueprint-viewer-screen --> elsa-tab-header elsa-workflow-blueprint-viewer-screen --> elsa-tab-content - elsa-workflow-blueprint-viewer-screen --> elsa-workflow-blueprint-side-panel + elsa-workflow-blueprint-viewer-screen --> elsa-workflow-blueprint-properties-panel elsa-workflow-blueprint-viewer-screen --> context-consumer - elsa-workflow-blueprint-side-panel --> elsa-workflow-blueprint-properties-panel - elsa-workflow-blueprint-side-panel --> context-consumer elsa-workflow-blueprint-properties-panel --> context-consumer style elsa-studio-workflow-blueprint-view fill:#f9f,stroke:#333,stroke-width:4px ``` diff --git a/src/designer/elsa-workflows-studio/src/components/dashboard/pages/elsa-studio-workflow-instances-view/readme.md b/src/designer/elsa-workflows-studio/src/components/dashboard/pages/elsa-studio-workflow-instances-view/readme.md index 28a7b9091..a9719eca2 100644 --- a/src/designer/elsa-workflows-studio/src/components/dashboard/pages/elsa-studio-workflow-instances-view/readme.md +++ b/src/designer/elsa-workflows-studio/src/components/dashboard/pages/elsa-studio-workflow-instances-view/readme.md @@ -25,6 +25,8 @@ graph TD; elsa-workflow-instance-viewer-screen --> elsa-workflow-instance-journal elsa-workflow-instance-viewer-screen --> elsa-designer-tree elsa-workflow-instance-viewer-screen --> context-consumer + elsa-workflow-instance-journal --> elsa-copy-button + elsa-workflow-instance-journal --> elsa-workflow-definition-editor-notifications elsa-workflow-instance-journal --> elsa-flyout-panel elsa-workflow-instance-journal --> elsa-tab-header elsa-workflow-instance-journal --> elsa-tab-content diff --git a/src/designer/elsa-workflows-studio/src/components/designers/tree/elsa-designer-tree/elsa-designer-tree.tsx b/src/designer/elsa-workflows-studio/src/components/designers/tree/elsa-designer-tree/elsa-designer-tree.tsx index c8beb8dcc..84e19720a 100644 --- a/src/designer/elsa-workflows-studio/src/components/designers/tree/elsa-designer-tree/elsa-designer-tree.tsx +++ b/src/designer/elsa-workflows-studio/src/components/designers/tree/elsa-designer-tree/elsa-designer-tree.tsx @@ -67,6 +67,7 @@ export class ElsaWorkflowDesigner { x: 0, y: 0, activity: null, + selectedActivities: {} }; @State() connectionContextMenuState: ActivityContextMenuState = { @@ -169,6 +170,17 @@ export class ElsaWorkflowDesigner { this.removeActivityInternal(activity); } + @Method() + async removeSelectedActivities() { + let model = {...this.workflowModel}; + + Object.keys(this.selectedActivities).forEach((key) => { + model = this.removeActivityInternal(this.selectedActivities[key], model); + }); + + this.updateWorkflowModel(model); + } + @Method() async showActivityEditor(activity: ActivityModel, animate: boolean) { await this.showActivityEditorInternal(activity, animate); @@ -369,8 +381,8 @@ export class ElsaWorkflowDesigner { return model; } - removeActivityInternal(activity: ActivityModel) { - let workflowModel = {...this.workflowModel}; + removeActivityInternal(activity: ActivityModel, model?: WorkflowModel) { + let workflowModel = model || {...this.workflowModel}; const incomingConnections = getInboundConnections(workflowModel, activity.activityId); const outgoingConnections = getOutboundConnections(workflowModel, activity.activityId); @@ -395,7 +407,14 @@ export class ElsaWorkflowDesigner { }); } } - this.updateWorkflowModel(workflowModel); + + delete this.selectedActivities[activity.activityId]; + + if (!model) { + this.updateWorkflowModel(workflowModel); + } + + return workflowModel; } newActivity(activityDescriptor: ActivityDescriptor): ActivityModel { @@ -798,7 +817,13 @@ export class ElsaWorkflowDesigner { .select('.context-menu-button-container button') .on('click', evt => { evt.stopPropagation(); - this.handleContextMenuChange({x: evt.clientX, y: evt.clientY, shown: true, activity: node.activity}); + this.handleContextMenuChange({ + x: evt.clientX, + y: evt.clientY, + shown: true, + activity: node.activity, + selectedActivities: this.selectedActivities + }); }); } else if (this.mode == WorkflowDesignerMode.Test) { diff --git a/src/designer/elsa-workflows-studio/src/components/designers/tree/elsa-designer-tree/models.ts b/src/designer/elsa-workflows-studio/src/components/designers/tree/elsa-designer-tree/models.ts index 0b5dd3c59..fc7693eef 100644 --- a/src/designer/elsa-workflows-studio/src/components/designers/tree/elsa-designer-tree/models.ts +++ b/src/designer/elsa-workflows-studio/src/components/designers/tree/elsa-designer-tree/models.ts @@ -1,4 +1,5 @@ -import {ActivityModel, WorkflowFault} from "../../../../models"; +import {ActivityModel} from "../../../../models"; +import {Map} from "../../../../utils/utils"; export enum WorkflowDesignerMode { Edit, @@ -12,9 +13,10 @@ export interface ActivityContextMenuState { x: number; y: number; activity?: ActivityModel | null; + selectedActivities?: Map ; } export enum LayoutDirection { Horizontal, Vertical -} \ No newline at end of file +} diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-properties-panel/elsa-workflow-blueprint-properties-panel.tsx b/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-properties-panel/elsa-workflow-blueprint-properties-panel.tsx index d3d5ff1e5..75158dab3 100644 --- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-properties-panel/elsa-workflow-blueprint-properties-panel.tsx +++ b/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-properties-panel/elsa-workflow-blueprint-properties-panel.tsx @@ -1,6 +1,5 @@ import {Component, Prop, h, State, Watch, Host} from '@stencil/core'; -import {enter, leave} from "el-transition" -import {WorkflowBlueprint, WorkflowDefinition, WorkflowDefinitionSummary} from "../../../../models"; +import {WorkflowBlueprint, WorkflowDefinitionSummary} from "../../../../models"; import {i18n} from "i18next"; import {loadTranslations} from "../../../i18n/i18n-loader"; import {resources} from "./localizations"; @@ -13,111 +12,58 @@ import Tunnel from "../../../../data/dashboard"; }) export class ElsaWorkflowBlueprintPropertiesPanel { - @Prop() workflowBlueprint: WorkflowBlueprint; + @Prop() workflowId: string; @Prop() culture: string; @Prop() serverUrl: string; - @Prop() expandButtonPosition = 1; + @State() workflowBlueprint: WorkflowBlueprint; @State() publishedVersion: number; - @State() expanded: boolean; private i18next: i18n; - el: HTMLElement; - @Watch('workflowBlueprint') - async workflowDefinitionChangedHandler(newWorkflow: WorkflowDefinition, oldWorkflow: WorkflowDefinition) { - if (newWorkflow.version !== oldWorkflow.version || newWorkflow.isPublished !== oldWorkflow.isPublished || newWorkflow.isLatest !== oldWorkflow.isLatest) - await this.loadPublishedVersion(); + @Watch('workflowId') + async workflowIdChangedHandler(newWorkflowId: string) { + await this.loadWorkflowBlueprint(newWorkflowId); + await this.loadPublishedVersion(); } async componentWillLoad() { this.i18next = await loadTranslations(this.culture, resources); + await this.loadWorkflowBlueprint(); await this.loadPublishedVersion(); } render() { const t = (x, params?) => this.i18next.t(x, params); - const {workflowBlueprint, expanded, expandButtonPosition} = this; + const {workflowBlueprint} = this; const name = workflowBlueprint.name || this.i18next.t("Untitled"); const {isPublished} = workflowBlueprint; - const expandPositionClass = expandButtonPosition == 1 ? "elsa-right-12" : "elsa-right-28"; return ( - - +
+
{t('Id')}
+
{workflowBlueprint.id || '-'}
+
+
+
{t('Version')}
+
{workflowBlueprint.version}
+
+
+
{t('PublishedVersion')}
+
{this.publishedVersion || '-'}
+
+
+
{t('Status')}
+
{isPublished ? t('Published') : t('Draft')}
+
+
- ); + ) } createClient() { @@ -128,21 +74,22 @@ export class ElsaWorkflowBlueprintPropertiesPanel { const elsaClient = await this.createClient(); const {workflowBlueprint} = this; - const publishedWorkflowDefinitions = await elsaClient.workflowDefinitionsApi.getMany([workflowBlueprint.id], {isPublished: true}); - const publishedDefinition: WorkflowDefinitionSummary = workflowBlueprint.isPublished ? workflowBlueprint : publishedWorkflowDefinitions.find(x => x.definitionId == workflowBlueprint.id); + if (workflowBlueprint.isPublished) { + const publishedWorkflowDefinitions = await elsaClient.workflowDefinitionsApi.getMany([workflowBlueprint.id], {isPublished: true}); + const publishedDefinition: WorkflowDefinitionSummary = workflowBlueprint.isPublished ? workflowBlueprint : publishedWorkflowDefinitions.find(x => x.definitionId == workflowBlueprint.id); - if (publishedDefinition) { - this.publishedVersion = publishedDefinition.version; + if (publishedDefinition) { + this.publishedVersion = publishedDefinition.version; + } + } else { + this.publishedVersion = 0; } } - toggle = () => { - if (this.expanded) { - leave(this.el).then(() => this.expanded = false); - } else { - this.expanded = true; - enter(this.el); - } + async loadWorkflowBlueprint(workflowId = this.workflowId) { + const elsaClient = await this.createClient(); + + this.workflowBlueprint = await elsaClient.workflowRegistryApi.get(workflowId, {isLatest: true}); } } diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-properties-panel/readme.md b/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-properties-panel/readme.md index 6e042340a..846a2dfab 100644 --- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-properties-panel/readme.md +++ b/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-properties-panel/readme.md @@ -7,19 +7,18 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| ---------------------- | ------------------------ | ----------- | ------------------- | ----------- | -| `culture` | `culture` | | `string` | `undefined` | -| `expandButtonPosition` | `expand-button-position` | | `number` | `1` | -| `serverUrl` | `server-url` | | `string` | `undefined` | -| `workflowBlueprint` | -- | | `WorkflowBlueprint` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ------------ | ------------- | ----------- | -------- | ----------- | +| `culture` | `culture` | | `string` | `undefined` | +| `serverUrl` | `server-url` | | `string` | `undefined` | +| `workflowId` | `workflow-id` | | `string` | `undefined` | ## Dependencies ### Used by - - [elsa-workflow-blueprint-side-panel](../elsa-workflow-blueprint-side-panel) + - [elsa-workflow-blueprint-viewer-screen](../elsa-workflow-blueprint-viewer-screen) ### Depends on @@ -29,7 +28,7 @@ ```mermaid graph TD; elsa-workflow-blueprint-properties-panel --> context-consumer - elsa-workflow-blueprint-side-panel --> elsa-workflow-blueprint-properties-panel + elsa-workflow-blueprint-viewer-screen --> elsa-workflow-blueprint-properties-panel style elsa-workflow-blueprint-properties-panel fill:#f9f,stroke:#333,stroke-width:4px ``` diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-side-panel/elsa-workflow-blueprint-side-panel.tsx b/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-side-panel/elsa-workflow-blueprint-side-panel.tsx deleted file mode 100644 index 4025fd93c..000000000 --- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-side-panel/elsa-workflow-blueprint-side-panel.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import {Component, h, Prop, State, Watch} from '@stencil/core'; -import {WorkflowBlueprint} from "../../../../models"; -import {createElsaClient} from "../../../../services"; -import Tunnel from "../../../../data/dashboard"; - -@Component({ - tag: 'elsa-workflow-blueprint-side-panel', - shadow: false, -}) -export class ElsaWorkflowBlueprintSidePanel { - - @Prop() workflowId: string; - @Prop() serverUrl: string; - @State() workflowBlueprint: WorkflowBlueprint; - - @Watch('workflowId') - async workflowIdChangedHandler(newWorkflowId: string) { - await this.loadWorkflowBlueprint(newWorkflowId); - } - - render() { - return ( - - ); - } - - async componentWillLoad() { - await this.loadWorkflowBlueprint(); - } - - createClient() { - return createElsaClient(this.serverUrl); - } - - async loadWorkflowBlueprint(workflowId = this.workflowId) { - const elsaClient = await this.createClient(); - - this.workflowBlueprint = await elsaClient.workflowRegistryApi.get(workflowId, {isLatest: true}); - } -} - -Tunnel.injectProps(ElsaWorkflowBlueprintSidePanel, ['serverUrl']); diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-side-panel/readme.md b/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-side-panel/readme.md deleted file mode 100644 index 7701d583c..000000000 --- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-side-panel/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# elsa-workflow-blueprint-side-panel - - - - - - -## Properties - -| Property | Attribute | Description | Type | Default | -| ------------ | ------------- | ----------- | -------- | ----------- | -| `serverUrl` | `server-url` | | `string` | `undefined` | -| `workflowId` | `workflow-id` | | `string` | `undefined` | - - -## Dependencies - -### Used by - - - [elsa-workflow-blueprint-viewer-screen](../elsa-workflow-blueprint-viewer-screen) - -### Depends on - -- [elsa-workflow-blueprint-properties-panel](../elsa-workflow-blueprint-properties-panel) -- context-consumer - -### Graph -```mermaid -graph TD; - elsa-workflow-blueprint-side-panel --> elsa-workflow-blueprint-properties-panel - elsa-workflow-blueprint-side-panel --> context-consumer - elsa-workflow-blueprint-properties-panel --> context-consumer - elsa-workflow-blueprint-viewer-screen --> elsa-workflow-blueprint-side-panel - style elsa-workflow-blueprint-side-panel fill:#f9f,stroke:#333,stroke-width:4px -``` - ----------------------------------------------- - -*Built with [StencilJS](https://stenciljs.com/)* diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-viewer-screen/elsa-workflow-blueprint-viewer-screen.tsx b/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-viewer-screen/elsa-workflow-blueprint-viewer-screen.tsx index 26af2860f..9ec57055c 100644 --- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-viewer-screen/elsa-workflow-blueprint-viewer-screen.tsx +++ b/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-viewer-screen/elsa-workflow-blueprint-viewer-screen.tsx @@ -150,12 +150,16 @@ export class ElsaWorkflowBlueprintViewerScreen { renderCanvas() { return (
- this.designer = el} - mode={WorkflowDesignerMode.Blueprint}/> + this.designer = el} + mode={WorkflowDesignerMode.Blueprint} + /> General - +
diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-viewer-screen/readme.md b/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-viewer-screen/readme.md index b62020283..f7513ef44 100644 --- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-viewer-screen/readme.md +++ b/src/designer/elsa-workflows-studio/src/components/screens/workflow-blueprint-viewer/elsa-workflow-blueprint-viewer-screen/readme.md @@ -39,7 +39,7 @@ Type: `Promise` - [elsa-flyout-panel](../../../shared/elsa-flyout-panel) - [elsa-tab-header](../../../shared/elsa-tab-header) - [elsa-tab-content](../../../shared/elsa-tab-content) -- [elsa-workflow-blueprint-side-panel](../elsa-workflow-blueprint-side-panel) +- [elsa-workflow-blueprint-properties-panel](../elsa-workflow-blueprint-properties-panel) - context-consumer ### Graph @@ -49,10 +49,8 @@ graph TD; elsa-workflow-blueprint-viewer-screen --> elsa-flyout-panel elsa-workflow-blueprint-viewer-screen --> elsa-tab-header elsa-workflow-blueprint-viewer-screen --> elsa-tab-content - elsa-workflow-blueprint-viewer-screen --> elsa-workflow-blueprint-side-panel + elsa-workflow-blueprint-viewer-screen --> elsa-workflow-blueprint-properties-panel elsa-workflow-blueprint-viewer-screen --> context-consumer - elsa-workflow-blueprint-side-panel --> elsa-workflow-blueprint-properties-panel - elsa-workflow-blueprint-side-panel --> context-consumer elsa-workflow-blueprint-properties-panel --> context-consumer elsa-studio-workflow-blueprint-view --> elsa-workflow-blueprint-viewer-screen style elsa-workflow-blueprint-viewer-screen fill:#f9f,stroke:#333,stroke-width:4px diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-notifications/elsa-workflow-editor-notifications.tsx b/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-notifications/elsa-workflow-editor-notifications.tsx index 6b22becec..7d7ae0245 100644 --- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-notifications/elsa-workflow-editor-notifications.tsx +++ b/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-notifications/elsa-workflow-editor-notifications.tsx @@ -20,7 +20,7 @@ export class ElsaWorkflowEditorNotifications { disconnectedCallback() { eventBus.detach(EventTypes.WorkflowPublished, this.onWorkflowPublished); - eventBus.detach(EventTypes.WorkflowRetracted, this.onWorkflowRetracted); + eventBus.detach(EventTypes.WorkflowRetracted, this.onWorkflowRetracted); eventBus.detach(EventTypes.WorkflowImported, this.onWorkflowImported); eventBus.detach(EventTypes.ClipboardPermissionDenied, this.onClipboardPermissionsDenied); eventBus.detach(EventTypes.ClipboardCopied, this.onClipboardCopied); @@ -30,5 +30,7 @@ export class ElsaWorkflowEditorNotifications { onWorkflowRetracted = (workflowDefinition: WorkflowDefinition) => toastNotificationService.show('Workflow Retracted', `Workflow successfully retracted at version ${workflowDefinition.version}.`, 1500); onWorkflowImported = () => toastNotificationService.show('Workflow Imported', `Workflow successfully imported.`, 1500); onClipboardPermissionsDenied = () => toastNotificationService.show('Clipboard Error', `Clipboard pemission denied.`, 1500); - onClipboardCopied = () => toastNotificationService.show('Copy to Clipboard', `Activities successfully copied to Clipboard.`, 1500); + onClipboardCopied = (title: string, body: string) => { + toastNotificationService.show(title || 'Copy to Clipboard', body || 'Activities successfully copied to Clipboard.', 1500); + } } diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-notifications/readme.md b/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-notifications/readme.md index 93f3e0c27..f6a2646aa 100644 --- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-notifications/readme.md +++ b/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-notifications/readme.md @@ -10,11 +10,13 @@ ### Used by - [elsa-workflow-definition-editor-screen](../elsa-workflow-definition-editor-screen) + - [elsa-workflow-instance-journal](../../workflow-instance-viewer/elsa-workflow-instance-journal) ### Graph ```mermaid graph TD; elsa-workflow-definition-editor-screen --> elsa-workflow-definition-editor-notifications + elsa-workflow-instance-journal --> elsa-workflow-definition-editor-notifications style elsa-workflow-definition-editor-notifications fill:#f9f,stroke:#333,stroke-width:4px ``` diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-screen/elsa-workflow-definition-editor-screen.tsx b/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-screen/elsa-workflow-definition-editor-screen.tsx index 0210e8f95..7d394c92b 100644 --- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-screen/elsa-workflow-definition-editor-screen.tsx +++ b/src/designer/elsa-workflows-studio/src/components/screens/workflow-definition-editor/elsa-workflow-definition-editor-screen/elsa-workflow-definition-editor-screen.tsx @@ -26,6 +26,7 @@ import {i18n} from "i18next"; import {loadTranslations} from "../../../i18n/i18n-loader"; import {resources} from "./localizations"; import * as collection from 'lodash/collection'; +import {Map} from "../../../../utils/utils"; @Component({ tag: 'elsa-workflow-definition-editor-screen', @@ -59,6 +60,7 @@ export class ElsaWorkflowDefinitionEditorScreen { x: 0, y: 0, activity: null, + selectedActivities: {} }; @State() connectionContextMenuState: ActivityContextMenuState = { @@ -79,6 +81,7 @@ export class ElsaWorkflowDefinitionEditorScreen { el: HTMLElement; designer: HTMLElsaDesignerTreeElement; configureComponentCustomButtonContext: ConfigureComponentCustomButtonContext = null; + helpDialog: HTMLElsaModalDialogElement; @Method() async getServerUrl(): Promise { @@ -323,7 +326,7 @@ export class ElsaWorkflowDefinitionEditorScreen { } } - updateUrl(id){ + updateUrl(id) { this.history.push(`/workflow-definitions/${id}`, {}); } @@ -403,8 +406,15 @@ export class ElsaWorkflowDefinitionEditorScreen { async onDeleteActivityClick(e: Event) { e.preventDefault(); - await this.designer.removeActivity(this.activityContextMenuState.activity); - this.handleContextMenuChange({x: 0, y: 0, shown: false, activity: null}); + const {activity, selectedActivities} = this.activityContextMenuState; + + if (selectedActivities[activity.activityId]) { + await this.designer.removeSelectedActivities(); + } else { + await this.designer.removeActivity(activity); + } + + this.handleContextMenuChange({x: 0, y: 0, shown: false, activity: null, selectedActivities: {}}); await eventBus.emit(EventTypes.HideModalDialog); } @@ -569,6 +579,7 @@ export class ElsaWorkflowDefinitionEditorScreen { ref={el => this.designer = el}/> {this.renderPanel()} {this.renderWorkflowSettingsButton()} + {this.renderWorkflowHelpButton()} {this.renderActivityContextMenu()} {this.renderConnectionContextMenu()} @@ -735,6 +746,8 @@ export class ElsaWorkflowDefinitionEditorScreen { renderActivityContextMenu() { const t = this.t; + const selectedActivities = Object.keys(this.activityContextMenuState.selectedActivities); + const {activity} = this.activityContextMenuState; return
registerClickOutside(this, el, () => { - this.handleContextMenuChange({x: 0, y: 0, shown: false, activity: null}); + this.handleContextMenuChange({x: 0, y: 0, shown: false, activity: null, selectedActivities: {}}); }) } > @@ -769,7 +782,7 @@ export class ElsaWorkflowDefinitionEditorScreen { href="#" class="elsa-block elsa-px-4 elsa-py-2 elsa-text-sm elsa-leading-5 elsa-text-gray-700 hover:elsa-bg-gray-100 hover:elsa-text-gray-900 focus:elsa-outline-none focus:elsa-bg-gray-100 focus:elsa-text-gray-900" role="menuitem"> - {t('ActivityContextMenu.Delete')} + {(selectedActivities.length > 1 && selectedActivities.indexOf(activity.activityId) !== -1) ? t('ActivityContextMenu.DeleteSelected') : t('ActivityContextMenu.Delete')}
@@ -831,8 +844,48 @@ export class ElsaWorkflowDefinitionEditorScreen { ); } - renderWorkflowSettingsModal() { - return; + renderWorkflowHelpButton() { + return ( + + + this.helpDialog = el}> +
+

Actions

+
+
+
Delete connections
+
RIGHT-click the connection to delete.
+
+
+
Connect outcomes to existing activity
+
Press and hold SHIFT while LEFT-clicking the outcome to connect. Release SHIFT and LEFT-click the target activity.
+
+
+
Pan
+
Click anywhere on the designer and drag mouse.
+
+
+
Zoom
+
Use scroll-wheel on mouse.
+
+
+
+
+
+ ); + } + + showHelpModal = async () => { + await this.helpDialog.show(); } renderSavingIndicator() { @@ -891,7 +944,7 @@ export class ElsaWorkflowDefinitionEditorScreen { private renderPanel() { return ( - + General {this.renderPanel()} + ); } @@ -233,12 +252,18 @@ export class ElsaWorkflowInstanceJournal {
-
Activity ID
+
+ Activity ID + +
{record.activityId}
{outcomes.length > 0 ? (
-
Outcomes
+
+ Outcomes + +
@@ -252,7 +277,8 @@ export class ElsaWorkflowInstanceJournal { {!!record.message && !exception ? (
- Message + Message +
{record.message} @@ -262,7 +288,8 @@ export class ElsaWorkflowInstanceJournal { {!!exception ? ( [
- Exception + Exception +
{renderExceptionMessage(exception)} @@ -270,7 +297,8 @@ export class ElsaWorkflowInstanceJournal {
,
- Exception Details + Exception Details +
 clip(e.currentTarget)}>{JSON.stringify(exception, null, 1)}
@@ -279,7 +307,10 @@ export class ElsaWorkflowInstanceJournal { ) : undefined} {collection.map(filteredRecordData, (v, k) => (
-
{k}
+
+ {k} + +
 clip(e.currentTarget)}>{v}
@@ -324,6 +355,7 @@ export class ElsaWorkflowInstanceJournal { const {workflowInstance, workflowBlueprint} = this; const {finishedAt, lastExecutedAt, faultedAt} = workflowInstance; const format = 'DD-MM-YYYY HH:mm:ss'; + const eventColor = this.getStatusColor(workflowInstance.workflowStatus); return (
@@ -349,7 +381,15 @@ export class ElsaWorkflowInstanceJournal {
Workflow Status
-
{workflowInstance.workflowStatus || '-'}
+
+ + + + {workflowInstance.workflowStatus || '-'} + +
Created
diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-instance-viewer/elsa-workflow-instance-journal/readme.md b/src/designer/elsa-workflows-studio/src/components/screens/workflow-instance-viewer/elsa-workflow-instance-journal/readme.md index 6120b1ad5..a6fc23808 100644 --- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-instance-viewer/elsa-workflow-instance-journal/readme.md +++ b/src/designer/elsa-workflows-studio/src/components/screens/workflow-instance-viewer/elsa-workflow-instance-journal/readme.md @@ -45,6 +45,8 @@ Type: `Promise` ### Depends on +- [elsa-copy-button](../../../shared/elsa-copy-button) +- [elsa-workflow-definition-editor-notifications](../../workflow-definition-editor/elsa-workflow-definition-editor-notifications) - [elsa-flyout-panel](../../../shared/elsa-flyout-panel) - [elsa-tab-header](../../../shared/elsa-tab-header) - [elsa-tab-content](../../../shared/elsa-tab-content) @@ -52,6 +54,8 @@ Type: `Promise` ### Graph ```mermaid graph TD; + elsa-workflow-instance-journal --> elsa-copy-button + elsa-workflow-instance-journal --> elsa-workflow-definition-editor-notifications elsa-workflow-instance-journal --> elsa-flyout-panel elsa-workflow-instance-journal --> elsa-tab-header elsa-workflow-instance-journal --> elsa-tab-content diff --git a/src/designer/elsa-workflows-studio/src/components/screens/workflow-instance-viewer/elsa-workflow-instance-viewer-screen/readme.md b/src/designer/elsa-workflows-studio/src/components/screens/workflow-instance-viewer/elsa-workflow-instance-viewer-screen/readme.md index d8c890d9b..89a9156b3 100644 --- a/src/designer/elsa-workflows-studio/src/components/screens/workflow-instance-viewer/elsa-workflow-instance-viewer-screen/readme.md +++ b/src/designer/elsa-workflows-studio/src/components/screens/workflow-instance-viewer/elsa-workflow-instance-viewer-screen/readme.md @@ -45,6 +45,8 @@ graph TD; elsa-workflow-instance-viewer-screen --> elsa-workflow-instance-journal elsa-workflow-instance-viewer-screen --> elsa-designer-tree elsa-workflow-instance-viewer-screen --> context-consumer + elsa-workflow-instance-journal --> elsa-copy-button + elsa-workflow-instance-journal --> elsa-workflow-definition-editor-notifications elsa-workflow-instance-journal --> elsa-flyout-panel elsa-workflow-instance-journal --> elsa-tab-header elsa-workflow-instance-journal --> elsa-tab-content diff --git a/src/designer/elsa-workflows-studio/src/components/shared/elsa-copy-button/elsa-copy-button.tsx b/src/designer/elsa-workflows-studio/src/components/shared/elsa-copy-button/elsa-copy-button.tsx new file mode 100644 index 000000000..b480344ea --- /dev/null +++ b/src/designer/elsa-workflows-studio/src/components/shared/elsa-copy-button/elsa-copy-button.tsx @@ -0,0 +1,40 @@ +import {Component, h, Host, Prop} from '@stencil/core'; +import {eventBus} from "../../../services"; +import {EventTypes} from "../../../models"; + +@Component({ + tag: 'elsa-copy-button', + shadow: false, +}) +export class ElsaCopyButton { + @Prop() value: string; + + render() { + return ( + + + + ); + } + + onCopyClick = async (e) => { + e.stopPropagation(); + + this.checkClipboardPermissions(); + + await navigator.clipboard.writeText(this.value); + await eventBus.emit(EventTypes.ClipboardCopied, this, undefined, 'Data copied to clipboard.'); + } + + checkClipboardPermissions = () => { + navigator.permissions.query({name: 'clipboard-read'}).then((result) => { + if (result.state == 'denied') + eventBus.emit(EventTypes.ClipboardPermissionDenied, this); + }); + } + +} diff --git a/src/designer/elsa-workflows-studio/src/components/shared/elsa-copy-button/readme.md b/src/designer/elsa-workflows-studio/src/components/shared/elsa-copy-button/readme.md new file mode 100644 index 000000000..fe4ae7ca5 --- /dev/null +++ b/src/designer/elsa-workflows-studio/src/components/shared/elsa-copy-button/readme.md @@ -0,0 +1,30 @@ +# elsa-copy-button + + + + + + +## Properties + +| Property | Attribute | Description | Type | Default | +| -------- | --------- | ----------- | -------- | ----------- | +| `value` | `value` | | `string` | `undefined` | + + +## Dependencies + +### Used by + + - [elsa-workflow-instance-journal](../../screens/workflow-instance-viewer/elsa-workflow-instance-journal) + +### Graph +```mermaid +graph TD; + elsa-workflow-instance-journal --> elsa-copy-button + style elsa-copy-button fill:#f9f,stroke:#333,stroke-width:4px +``` + +---------------------------------------------- + +*Built with [StencilJS](https://stenciljs.com/)* diff --git a/src/designer/elsa-workflows-studio/src/components/shared/elsa-flyout-panel/elsa-flyout-panel.tsx b/src/designer/elsa-workflows-studio/src/components/shared/elsa-flyout-panel/elsa-flyout-panel.tsx index e5df0c971..de0588c77 100644 --- a/src/designer/elsa-workflows-studio/src/components/shared/elsa-flyout-panel/elsa-flyout-panel.tsx +++ b/src/designer/elsa-workflows-studio/src/components/shared/elsa-flyout-panel/elsa-flyout-panel.tsx @@ -33,20 +33,22 @@ export class ElsaFlyoutPanel { render() { const {expanded, expandButtonPosition} = this; - const expandPositionClass = expandButtonPosition == 1 ? "elsa-right-12" : "elsa-right-28"; + const expandPositionClass = `elsa-right-${16 * (expandButtonPosition - 1) + 12}`; + + console.log('eee', this.expanded); return ( diff --git a/src/designer/elsa-workflows-studio/src/components/shared/elsa-modal-dialog/elsa-modal-dialog.tsx b/src/designer/elsa-workflows-studio/src/components/shared/elsa-modal-dialog/elsa-modal-dialog.tsx index 271ffc7d7..677a38807 100644 --- a/src/designer/elsa-workflows-studio/src/components/shared/elsa-modal-dialog/elsa-modal-dialog.tsx +++ b/src/designer/elsa-workflows-studio/src/components/shared/elsa-modal-dialog/elsa-modal-dialog.tsx @@ -19,16 +19,21 @@ export class ElsaModalDialog { } @Method() - async show(animate: boolean) { + async show(animate: boolean = true) { this.showInternal(animate); } @Method() - async hide(animate: boolean) { + async hide(animate: boolean = true) { await eventBus.emit(EventTypes.HideModalDialog); this.hideInternal(animate); } + handleDefaultClose = async () => { + console.log('handleDefaultClose'); + await this.hide(); + } + showInternal(animate: boolean) { this.isVisible = true; @@ -92,6 +97,7 @@ export class ElsaModalDialog {
diff --git a/src/designer/elsa-workflows-studio/src/components/shared/elsa-tab-content/elsa-tab-content.tsx b/src/designer/elsa-workflows-studio/src/components/shared/elsa-tab-content/elsa-tab-content.tsx index 5e51e4ba0..31597f000 100644 --- a/src/designer/elsa-workflows-studio/src/components/shared/elsa-tab-content/elsa-tab-content.tsx +++ b/src/designer/elsa-workflows-studio/src/components/shared/elsa-tab-content/elsa-tab-content.tsx @@ -11,7 +11,7 @@ export class ElsaTabContent { render() { return ( -
+
diff --git a/src/designer/elsa-workflows-studio/src/components/shared/elsa-tab-header/elsa-tab-header.tsx b/src/designer/elsa-workflows-studio/src/components/shared/elsa-tab-header/elsa-tab-header.tsx index 7e4dec1ae..e0082fd5c 100644 --- a/src/designer/elsa-workflows-studio/src/components/shared/elsa-tab-header/elsa-tab-header.tsx +++ b/src/designer/elsa-workflows-studio/src/components/shared/elsa-tab-header/elsa-tab-header.tsx @@ -14,7 +14,7 @@ export class ElsaTabHeader { return ( -
+
diff --git a/src/designer/elsa-workflows-studio/src/globals/tailwind.css b/src/designer/elsa-workflows-studio/src/globals/tailwind.css index bc2d4f9ca..7c518cb3d 100644 --- a/src/designer/elsa-workflows-studio/src/globals/tailwind.css +++ b/src/designer/elsa-workflows-studio/src/globals/tailwind.css @@ -3935,10 +3935,6 @@ select { top: 4rem; } -.elsa-top-18 { - top: 4.5rem; -} - .elsa-top-20 { top: 5rem; } diff --git a/src/modules/Elsa.Retention/Elsa.Retention.csproj b/src/modules/Elsa.Retention/Elsa.Retention.csproj deleted file mode 100644 index 17a65f405..000000000 --- a/src/modules/Elsa.Retention/Elsa.Retention.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - netstandard2.1 - enable - - - - - - - - - - - - diff --git a/src/modules/retention/Elsa.Retention/Elsa.Retention.csproj b/src/modules/retention/Elsa.Retention/Elsa.Retention.csproj new file mode 100644 index 000000000..28e2a94a2 --- /dev/null +++ b/src/modules/retention/Elsa.Retention/Elsa.Retention.csproj @@ -0,0 +1,23 @@ + + + + + + + netstandard2.1 + + Elsa Retention is an optional part of Elsa Workflows that adds retention settings to the system. + + elsa, workflow settings + + + + + + + + + + + + diff --git a/src/modules/Elsa.Retention/Extensions/ServiceCollectionExtensions.cs b/src/modules/retention/Elsa.Retention/Extensions/ServiceCollectionExtensions.cs similarity index 100% rename from src/modules/Elsa.Retention/Extensions/ServiceCollectionExtensions.cs rename to src/modules/retention/Elsa.Retention/Extensions/ServiceCollectionExtensions.cs diff --git a/src/modules/retention/Elsa.Retention/FodyWeavers.xml b/src/modules/retention/Elsa.Retention/FodyWeavers.xml new file mode 100644 index 000000000..00e1d9a1c --- /dev/null +++ b/src/modules/retention/Elsa.Retention/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/modules/Elsa.Retention/HostedServices/CleanupService.cs b/src/modules/retention/Elsa.Retention/HostedServices/CleanupService.cs similarity index 100% rename from src/modules/Elsa.Retention/HostedServices/CleanupService.cs rename to src/modules/retention/Elsa.Retention/HostedServices/CleanupService.cs diff --git a/src/modules/Elsa.Retention/Jobs/CleanupJob.cs b/src/modules/retention/Elsa.Retention/Jobs/CleanupJob.cs similarity index 97% rename from src/modules/Elsa.Retention/Jobs/CleanupJob.cs rename to src/modules/retention/Elsa.Retention/Jobs/CleanupJob.cs index f097dbdd8..39116c7b8 100644 --- a/src/modules/Elsa.Retention/Jobs/CleanupJob.cs +++ b/src/modules/retention/Elsa.Retention/Jobs/CleanupJob.cs @@ -31,7 +31,7 @@ namespace Elsa.Retention.Jobs public async Task ExecuteAsync(CancellationToken cancellationToken = default) { var threshold = _clock.GetCurrentInstant().Minus(_options.TimeToLive); - var specification = new WorkflowCreatedBeforeSpecification(threshold); + var specification = new WorkflowCreatedBeforeSpecification(threshold).And(new WorkflowFinishedStatusSpecification()); var take = _options.PageSize; IList workflowInstanceIds; diff --git a/src/modules/Elsa.Retention/Options/CleanupOptions.cs b/src/modules/retention/Elsa.Retention/Options/CleanupOptions.cs similarity index 100% rename from src/modules/Elsa.Retention/Options/CleanupOptions.cs rename to src/modules/retention/Elsa.Retention/Options/CleanupOptions.cs diff --git a/src/modules/workflowsettings/Elsa.WorkflowSettings/Elsa.WorkflowSettings.csproj b/src/modules/workflowsettings/Elsa.WorkflowSettings/Elsa.WorkflowSettings.csproj index ec4ed3c48..cf437ad6c 100644 --- a/src/modules/workflowsettings/Elsa.WorkflowSettings/Elsa.WorkflowSettings.csproj +++ b/src/modules/workflowsettings/Elsa.WorkflowSettings/Elsa.WorkflowSettings.csproj @@ -9,7 +9,7 @@ Elsa Workflow Settings is an optional part of Elsa Workflows. This package contains Workflow Settings. - elsa, workflow settings, orchard + elsa, workflow settings diff --git a/src/samples/server/Elsa.Samples.Server.Host/Elsa.Samples.Server.Host.csproj b/src/samples/server/Elsa.Samples.Server.Host/Elsa.Samples.Server.Host.csproj index cc375458c..964865ad5 100644 --- a/src/samples/server/Elsa.Samples.Server.Host/Elsa.Samples.Server.Host.csproj +++ b/src/samples/server/Elsa.Samples.Server.Host/Elsa.Samples.Server.Host.csproj @@ -36,7 +36,7 @@ - +