From db2da822dee0b066faa2a3632a041ba3229ec72e Mon Sep 17 00:00:00 2001 From: Rick Cheng Date: Thu, 18 May 2023 10:27:36 +0800 Subject: [PATCH] Add supported operations of workflow definition (#14122) --- .../en/guide/project/workflow-definition.md | 64 ++++--------------- .../zh/guide/project/workflow-definition.md | 13 +++- .../src/locales/en_US/project.ts | 2 + .../src/locales/zh_CN/project.ts | 2 + .../projects/workflow/definition/index.tsx | 8 +-- 5 files changed, 32 insertions(+), 57 deletions(-) diff --git a/docs/docs/en/guide/project/workflow-definition.md b/docs/docs/en/guide/project/workflow-definition.md index a809c537f9..c23e70c360 100644 --- a/docs/docs/en/guide/project/workflow-definition.md +++ b/docs/docs/en/guide/project/workflow-definition.md @@ -67,58 +67,7 @@ Click `Project Management -> Workflow -> Workflow Definition` to enter the workf ![workflow-list](../../../../img/new_ui/dev/project/workflow-list.png) -Workflow running parameter description: - -* **Failure strategy**: When a task node fails to execute, other parallel task nodes need to execute the strategy. "Continue" means: After a task fails, other task nodes execute normally; "End" means: Terminate all tasks being executed, and terminate the entire process. -* **Notification strategy**: When the process ends, send process execution information notification emails according to the process status, including no status, success, failure, success or failure. -* **Process priority**: The priority of process execution, there are five different priorities: the highest (HIGHEST), high (HIGH), medium (MEDIUM), low (LOW), the lowest (LOWEST). When the number of master threads is insufficient, processes with higher priorities in the execution queue will run first. Processes with the same priority will run in first-come-first-served fashion. -* **Worker grouping**: This process can only be executed in the specified worker machine group. The default is Default, which can be executed on any worker. -* **Notification Group**: Select Notification Policy||Timeout Alarm||When fault tolerance occurs, process information or emails will be sent to all members in the notification group. -* **Startup parameters**: Set or override the value of global parameters when starting a new process instance. -* **Complement(Backfill)**: Run workflow for a specified historical period. There are two strategies: serial complement and parallel complement. - - > You could select the time period or fill in it manually in UI. The date range is left closed and right closed time interval (startDate <= N <= endDate) - - * Serial complement: Run the workflow from start date to end date according to the time period you set in serial. - - ![workflow-serial](../../../../img/new_ui/dev/project/workflow-serial.png) - - * Parallel complement: Run the workflow from start date to end date according to the time period you set in parallel. - - ![workflow-parallel](../../../../img/new_ui/dev/project/workflow-parallel.png) - - * Parallelism: The max number of workflow instances of the workflow definition you choose for complement. - ![workflow-concurrency-from](../../../../img/new_ui/dev/project/workflow-concurrency-from.png) - - ![workflow-concurrency](../../../../img/new_ui/dev/project/workflow-concurrency.png) - - * Mode of dependent: Whether to trigger downstream workflow definition for complement. - - ![workflow-dependency](../../../../img/new_ui/dev/project/workflow-dependency.png) - - * Schedule date: - - 1. Select from pop-up window: - - ![workflow-pageSelection](../../../../img/new_ui/dev/project/workflow-pageSelection.png) - - 2. Fill in the time period manually: - - ![workflow-input](../../../../img/new_ui/dev/project/workflow-input.png) - - * Complement with or without scheduling: - - 1. `Unconfigured timing` or `Configured timing and timing status offline`: Complement the number according to the selected time range combined with the timing default configuration (0:00 every day). e.g. the workflow scheduling date is from July 7th to July 10th: - - ![workflow-unconfiguredTimingResult](../../../../img/new_ui/dev/project/workflow-unconfiguredTimingResult.png) - - 2. `Configured timing and timing status online`: Complement the number according to the selected time range combined with the timing configuration. e.g. the workflow scheduling date is from July 7th to July 10th, and the timing is configured (running at 5 am every day): - - ![workflow-configuredTiming](../../../../img/new_ui/dev/project/workflow-configuredTiming.png) - - ![workflow-configuredTimingResult](../../../../img/new_ui/dev/project/workflow-configuredTimingResult.png) - -The following are the operation functions of the workflow definition list: +### Actions Supported by a Single Workflow - **Edit:** Only "Offline" workflow definitions can be edited. Workflow DAG editing is the same as [Create Workflow Definition](#create-workflow-definition) - **Online:** When the workflow status is "Offline", used to make workflow online. Only the workflow in the "Online" state can run, but cannot edit. @@ -128,10 +77,21 @@ The following are the operation functions of the workflow definition list: - **Timing Management:** The timing management page can edit, online or offline and delete timing. - **Delete:** Delete the workflow definition. In the same project, only the workflow definition created by yourself can be deleted, and the workflow definition of other users cannot be deleted. If you need to delete it, please contact the user who created it or the administrator. - **Download:** Download workflow definition to local. +- **Copy:** Under the current project, copy a new workflow based on the current workflow, and the name of the new workflow will be suffixed with `_copy_` on the basis of the original workflow name. +- **Export:** Export workflow definition json file. +- **Version Info:** View the workflow version information, and switch the workflow version in the version information list. - **Tree Diagram:** Display the task node type and task status in a tree structure, as shown in the figure below: ![workflow-tree](../../../../img/new_ui/dev/project/workflow-tree.png) +### Workflow batch operations + +After selecting multiple workflows, you can perform batch operations at the bottom of the workflow definition list, as follows: + +- **Batch Delete:** Batch delete multiple workflow definitions. +- **Batch Export:** Batch export multiple workflow definitions to a json file. +- **Batch Copy:** Batch copy multiple workflow definitions, you can choose under which project to generate the copied workflow. + ## Run the Workflow - Click `Project Management -> Workflow -> Workflow Definition` to enter the workflow definition page, as shown in the figure below, click the "Go Online" button to make workflow online. diff --git a/docs/docs/zh/guide/project/workflow-definition.md b/docs/docs/zh/guide/project/workflow-definition.md index d2fca24cff..11a29d730f 100644 --- a/docs/docs/zh/guide/project/workflow-definition.md +++ b/docs/docs/zh/guide/project/workflow-definition.md @@ -51,7 +51,7 @@ ![workflow-list](../../../../img/new_ui/dev/project/workflow-list.png) -工作流定义列表的操作功能如下: +### 单个工作流支持的操作 - **编辑:** 只能编辑"下线"的工作流定义。工作流DAG编辑同创建工作流定义。 - **上线:** 工作流状态为"下线"时,上线工作流,只有"上线"状态的工作流能运行,但不能编辑。 @@ -61,10 +61,21 @@ - **定时管理:** 定时管理页面可编辑、上线/下线、删除定时。 - **删除:** 删除工作流定义。在同一个项目中,只能删除自己创建的工作流定义,其他用户的工作流定义不能进行删除,如果需要删除请联系创建用户或者管理员。 - **下载:** 下载工作流定义到本地。 +- **复制:** 在当前项目下,根据当前工作流复制出一个新的工作流,新工作流的名称会在原工作流名称的基础上加上后缀`_copy_`。 +- **导出:** 导出工作流定义json文件。 +- **版本信息:** 查看工作流版本信息,可在版本信息列表中切换工作流版本。 - **树形图:** 以树形结构展示任务节点的类型及任务状态,如下图所示: ![workflow-tree](../../../../img/new_ui/dev/project/workflow-tree.png) +### 工作流批量操作 + +选中多个工作流后,可以在工作流定义列表底部执行批量操作,如下: + +- **批量删除:** 批量删除多个工作流定义。 +- **批量导出:** 批量导出多个工作流定义到一个json文件。 +- **批量复制:** 批量复制多个工作流定义,可选择在哪个项目下生成复制的工作流。 + ## 运行工作流 - 点击项目管理->工作流->工作流定义,进入工作流定义页面,如下图所示,点击"上线"按钮,上线工作流。 diff --git a/dolphinscheduler-ui/src/locales/en_US/project.ts b/dolphinscheduler-ui/src/locales/en_US/project.ts index 2c8b4350f8..09dbd1156b 100644 --- a/dolphinscheduler-ui/src/locales/en_US/project.ts +++ b/dolphinscheduler-ui/src/locales/en_US/project.ts @@ -87,6 +87,8 @@ export default { tree_limit: 'Limit Size', export: 'Export', batch_copy: 'Batch Copy', + batch_delete: 'Batch Delete', + batch_export: 'Batch Export', version_info: 'Version Info', version: 'Version', file_upload: 'File Upload', diff --git a/dolphinscheduler-ui/src/locales/zh_CN/project.ts b/dolphinscheduler-ui/src/locales/zh_CN/project.ts index ba99ecee68..b0c780386a 100644 --- a/dolphinscheduler-ui/src/locales/zh_CN/project.ts +++ b/dolphinscheduler-ui/src/locales/zh_CN/project.ts @@ -89,6 +89,8 @@ export default { tree_limit: '限制大小', export: '导出', batch_copy: '批量复制', + batch_delete: '批量删除', + batch_export: '批量导出', version_info: '版本信息', version: '版本', file_upload: '文件上传', diff --git a/dolphinscheduler-ui/src/views/projects/workflow/definition/index.tsx b/dolphinscheduler-ui/src/views/projects/workflow/definition/index.tsx index ab5ff4af18..5ec3bee582 100644 --- a/dolphinscheduler-ui/src/views/projects/workflow/definition/index.tsx +++ b/dolphinscheduler-ui/src/views/projects/workflow/definition/index.tsx @@ -207,7 +207,7 @@ export default defineComponent({ {{ - default: () => t('project.workflow.delete'), + default: () => t('project.workflow.batch_delete'), trigger: () => ( {{ @@ -220,7 +220,7 @@ export default defineComponent({ disabled={this.checkedRowKeys.length <= 0} class='btn-delete-all' > - {t('project.workflow.delete')} + {t('project.workflow.batch_delete')} ) }} @@ -230,7 +230,7 @@ export default defineComponent({ {{ - default: () => t('project.workflow.export'), + default: () => t('project.workflow.batch_export'), trigger: () => ( - {t('project.workflow.export')} + {t('project.workflow.batch_export')} ) }}