Browse Source

[Fix][UI Next] Fix a few errors in the task group. (#8322)

3.0.0/version-upgrade
calvin 3 years ago committed by GitHub
parent
commit
222506ae35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      dolphinscheduler-ui-next/src/views/resource/task-group/option/use-table.ts
  2. 2
      dolphinscheduler-ui-next/src/views/resource/task-group/queue/index.tsx
  3. 12
      dolphinscheduler-ui-next/src/views/resource/task-group/queue/use-table.ts

12
dolphinscheduler-ui-next/src/views/resource/task-group/option/use-table.ts

@ -97,9 +97,15 @@ export function useTable(
variables.totalPage = values[0].totalPage
variables.tableData = values[0].totalList.map(
(item: any, index: number) => {
item.projectName = _.find(values[1], {
code: item.projectCode
}).name
let projectName = ''
if (values[1]) {
let project = _.find(values[1], { code: item.projectCode })
if (project) {
projectName = project.name
}
}
item.projectName = projectName
item.createTime = format(
new Date(item.createTime),
'yyyy-MM-dd HH:mm:ss'

2
dolphinscheduler-ui-next/src/views/resource/task-group/queue/index.tsx

@ -193,7 +193,7 @@ const taskGroupQueue = defineComponent({
</NCard>
<Card
class={styles['table-card']}
title={t('resource.task_group_option.option')}
title={t('resource.task_group_queue.queue')}
>
<div>
<NDataTable

12
dolphinscheduler-ui-next/src/views/resource/task-group/queue/use-table.ts

@ -98,9 +98,15 @@ export function useTable(
variables.totalPage = values[0].totalPage
variables.tableData = values[0].totalList.map(
(item: any, index: number) => {
item.taskGroupName = _.find(taskGroupList, {
id: item.groupId
}).name
let taskGroupName = ''
if (taskGroupList) {
let taskGroup = _.find(taskGroupList, { id: item.groupId })
if (taskGroup) {
taskGroupName = taskGroup.name
}
}
item.taskGroupName = taskGroupName
item.createTime = format(
new Date(item.createTime),
'yyyy-MM-dd HH:mm:ss'

Loading…
Cancel
Save