Browse Source

[Fix-11583][UI] Fix the API usage of gantt graph (#11642) (#12631)

Co-authored-by: Chris <realhezean@gmail.com>
3.0.2-release
Eric Gao 2 years ago committed by GitHub
parent
commit
0b9ef7107c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessInstanceServiceImpl.java
  2. 2
      dolphinscheduler-ui/src/views/projects/workflow/instance/gantt/components/gantt-chart.tsx
  3. 5
      dolphinscheduler-ui/src/views/projects/workflow/instance/gantt/use-gantt.ts

2
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessInstanceServiceImpl.java

@ -795,7 +795,7 @@ public class ProcessInstanceServiceImpl extends BaseServiceImpl implements Proce
task.getEndDate().add(endTime.getTime());
task.setIsoStart(startTime);
task.setIsoEnd(endTime);
task.setStatus(taskInstance.getState().toString());
task.setStatus(taskInstance.getState().getDescp().toUpperCase());
task.setExecutionDate(taskInstance.getStartTime());
task.setDuration(DateUtils.format2Readable(endTime.getTime() - startTime.getTime()));
taskList.add(task);

2
dolphinscheduler-ui/src/views/projects/workflow/instance/gantt/components/gantt-chart.tsx

@ -80,7 +80,7 @@ const GanttChart = defineComponent({
minTime = minTime < start ? minTime : start
maxTime = maxTime > end ? maxTime : end
data[task.status].push({
name: task.name,
name: task.taskName,
value: [index, start, end, end - start],
itemStyle: {
color: state[task.status as ITaskState].color

5
dolphinscheduler-ui/src/views/projects/workflow/instance/gantt/use-gantt.ts

@ -32,10 +32,7 @@ export function useGantt() {
variables.seriesData = obj.tasks.map((item) => {
variables.taskList.push(item.taskName)
return {
name: item.taskName,
...item
}
return item
}) as any
}

Loading…
Cancel
Save