This is an automated email from the ASF dual-hosted git repository.
chufenggao pushed a commit to branch 3.0.2-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/3.0.2-prepare by this push:
new 0b9ef7107c [Fix-11583][UI] Fix the API usage of gantt graph (#11642)
(#12631)
0b9ef7107c is described below
commit 0b9ef7107c62073fc642471ceda9ca1fe69c2a95
Author: Eric Gao <[email protected]>
AuthorDate: Tue Nov 1 11:23:07 2022 +0800
[Fix-11583][UI] Fix the API usage of gantt graph (#11642) (#12631)
Co-authored-by: Chris <[email protected]>
---
.../api/service/impl/ProcessInstanceServiceImpl.java | 2 +-
.../projects/workflow/instance/gantt/components/gantt-chart.tsx | 2 +-
.../src/views/projects/workflow/instance/gantt/use-gantt.ts | 5 +----
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessInstanceServiceImpl.java
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessInstanceServiceImpl.java
index 519c449cdb..62f8b4fe7d 100644
---
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessInstanceServiceImpl.java
+++
b/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);
diff --git
a/dolphinscheduler-ui/src/views/projects/workflow/instance/gantt/components/gantt-chart.tsx
b/dolphinscheduler-ui/src/views/projects/workflow/instance/gantt/components/gantt-chart.tsx
index 1b7f08ae97..6a7a245d04 100644
---
a/dolphinscheduler-ui/src/views/projects/workflow/instance/gantt/components/gantt-chart.tsx
+++
b/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
diff --git
a/dolphinscheduler-ui/src/views/projects/workflow/instance/gantt/use-gantt.ts
b/dolphinscheduler-ui/src/views/projects/workflow/instance/gantt/use-gantt.ts
index 1560d456f1..195d24ce6b 100644
---
a/dolphinscheduler-ui/src/views/projects/workflow/instance/gantt/use-gantt.ts
+++
b/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
}