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.totalPage = values[0].totalPage
variables.tableData = values[0].totalList.map( variables.tableData = values[0].totalList.map(
(item: any, index: number) => { (item: any, index: number) => {
item.projectName = _.find(values[1], { let projectName = ''
code: item.projectCode if (values[1]) {
}).name let project = _.find(values[1], { code: item.projectCode })
if (project) {
projectName = project.name
}
}
item.projectName = projectName
item.createTime = format( item.createTime = format(
new Date(item.createTime), new Date(item.createTime),
'yyyy-MM-dd HH:mm:ss' '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> </NCard>
<Card <Card
class={styles['table-card']} class={styles['table-card']}
title={t('resource.task_group_option.option')} title={t('resource.task_group_queue.queue')}
> >
<div> <div>
<NDataTable <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.totalPage = values[0].totalPage
variables.tableData = values[0].totalList.map( variables.tableData = values[0].totalList.map(
(item: any, index: number) => { (item: any, index: number) => {
item.taskGroupName = _.find(taskGroupList, { let taskGroupName = ''
id: item.groupId if (taskGroupList) {
}).name let taskGroup = _.find(taskGroupList, { id: item.groupId })
if (taskGroup) {
taskGroupName = taskGroup.name
}
}
item.taskGroupName = taskGroupName
item.createTime = format( item.createTime = format(
new Date(item.createTime), new Date(item.createTime),
'yyyy-MM-dd HH:mm:ss' 'yyyy-MM-dd HH:mm:ss'

Loading…
Cancel
Save