Browse Source

[Fix][UI Next][V1.0.0-Alpha] Serial execte proces (#9229)

* add Process execute type for workflow

* fix icon spin
3.0.0/version-upgrade
Devosend 3 years ago committed by GitHub
parent
commit
b2cccc8959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      dolphinscheduler-ui-next/src/locales/modules/en_US.ts
  2. 6
      dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts
  3. 1
      dolphinscheduler-ui-next/src/service/modules/process-definition/types.ts
  4. 6
      dolphinscheduler-ui-next/src/utils/common.ts
  5. 3
      dolphinscheduler-ui-next/src/views/projects/task/instance/use-table.ts
  6. 19
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-save-modal.tsx
  7. 2
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/types.ts
  8. 1
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/create/index.tsx
  9. 1
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/detail/index.tsx

6
dolphinscheduler-ui-next/src/locales/modules/en_US.ts

@ -597,6 +597,12 @@ const project = {
description: 'Description',
tenant: 'Tenant',
timeout_alert: 'Timeout Alert',
process_execute_type: 'Process execute type',
parallel: 'parallel',
serial_wait: 'Serial wait',
serial_discard: 'Serial discard',
serial_priority: 'Serial priority',
recover_serial_wait: 'Recover serial wait',
global_variables: 'Global Variables',
basic_info: 'Basic Information',
minute: 'Minute',

6
dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts

@ -593,6 +593,12 @@ const project = {
description: '描述',
tenant: '租户',
timeout_alert: '超时告警',
process_execute_type: '执行策略',
parallel: '并行',
serial_wait: '串行等待',
serial_discard: '串行抛弃',
serial_priority: '串行优先',
recover_serial_wait: '串行恢复',
global_variables: '全局变量',
basic_info: '基本信息',
minute: '分',

1
dolphinscheduler-ui-next/src/service/modules/process-definition/types.ts

@ -59,6 +59,7 @@ interface ProcessDefinitionReq {
taskDefinitionJson: string
taskRelationJson: string
tenantCode: string
executionType: string
description?: string
globalParams?: string
timeout?: number

6
dolphinscheduler-ui-next/src/utils/common.ts

@ -24,7 +24,7 @@ import {
EditOutlined,
MinusCircleOutlined,
CheckCircleFilled,
LoadingOutlined,
Loading3QuartersOutlined,
PauseCircleFilled,
ClockCircleOutlined,
StopFilled,
@ -319,8 +319,8 @@ export const tasksState = (t: any): ITaskStateConfig => ({
id: 14,
desc: `${t('project.workflow.serial_wait')}`,
color: '#5102ce',
icon: LoadingOutlined,
isSpin: false,
icon: Loading3QuartersOutlined,
isSpin: true,
classNames: 'serial_wait'
}
})

3
dolphinscheduler-ui-next/src/views/projects/task/instance/use-table.ts

@ -333,7 +333,6 @@ export function renderStateCell(state: ITaskState, t: Function) {
NIcon,
{
color: stateOption.color,
size: 18,
class: stateOption.classNames,
style: {
display: 'flex'
@ -344,7 +343,7 @@ export function renderStateCell(state: ITaskState, t: Function) {
return h(NTooltip, null, {
trigger: () => {
if (!stateOption.isSpin) return Icon
return h(NSpin, { size: 'small' }, { icon: () => Icon })
return h(NSpin, { size: 18 }, { icon: () => Icon })
},
default: () => stateOption.desc
})

19
dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-save-modal.tsx

@ -87,6 +87,7 @@ export default defineComponent({
name: '',
description: '',
tenantCode: 'default',
executionType: 'PARALLEL',
timeoutFlag: false,
timeout: 0,
globalParams: [],
@ -94,6 +95,12 @@ export default defineComponent({
sync: false
})
const formRef = ref()
const executeTypeOptions = [
{ value: 'PARALLEL', label: 'parallel' },
{ value: 'SERIAL_WAIT', label: 'Serial wait' },
{ value: 'SERIAL_DISCARD', label: 'Serial discard' },
{ value: 'SERIAL_PRIORITY', label: 'Serial priority' }
]
const rule = {
name: {
required: true,
@ -155,6 +162,7 @@ export default defineComponent({
formValue.value.name = process.name
formValue.value.description = process.description
formValue.value.tenantCode = process.tenantCode || 'default'
formValue.value.executionType = process.executionType || 'PARALLEL'
if (process.timeout && process.timeout > 0) {
formValue.value.timeoutFlag = true
formValue.value.timeout = process.timeout
@ -214,6 +222,17 @@ export default defineComponent({
/>
</NFormItem>
)}
{!props.instance && (
<NFormItem
label={t('project.dag.process_execute_type')}
path='executionType'
>
<NSelect
options={executeTypeOptions}
v-model:value={formValue.value.executionType}
/>
</NFormItem>
)}
<NFormItem
label={t('project.dag.global_variables')}
path='globalParams'

2
dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/types.ts

@ -40,6 +40,7 @@ export interface ProcessDefinition {
timeout: number
tenantId: number
tenantCode: string
executionType: string
modifyBy?: any
warningGroupId: number
}
@ -142,6 +143,7 @@ export interface SaveForm {
name: string
description: string
tenantCode: string
executionType: string
timeoutFlag: boolean
timeout: number
globalParams: GlobalParam[]

1
dolphinscheduler-ui-next/src/views/projects/workflow/definition/create/index.tsx

@ -70,6 +70,7 @@ export default defineComponent({
locations: JSON.stringify(locations),
name: saveForm.name,
tenantCode: saveForm.tenantCode,
executionType: saveForm.executionType,
description: saveForm.description,
globalParams: JSON.stringify(globalParams),
timeout: saveForm.timeoutFlag ? saveForm.timeout : 0

1
dolphinscheduler-ui-next/src/views/projects/workflow/definition/detail/index.tsx

@ -87,6 +87,7 @@ export default defineComponent({
locations: JSON.stringify(locations),
name: saveForm.name,
tenantCode: saveForm.tenantCode,
executionType: saveForm.executionType,
description: saveForm.description,
globalParams: JSON.stringify(globalParams),
timeout: saveForm.timeoutFlag ? saveForm.timeout : 0,

Loading…
Cancel
Save