You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by li...@apache.org on 2022/05/25 11:22:13 UTC
[dolphinscheduler] branch dev updated: [Fix][UI] Set task group name empty of default value (#10243)
This is an automated email from the ASF dual-hosted git repository.
liudongkai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new b337eef2e6 [Fix][UI] Set task group name empty of default value (#10243)
b337eef2e6 is described below
commit b337eef2e6cc66ec850b77e9114dea8d8ace0871
Author: Devosend <de...@gmail.com>
AuthorDate: Wed May 25 19:22:07 2022 +0800
[Fix][UI] Set task group name empty of default value (#10243)
---
.../src/views/resource/task-group/queue/index.tsx | 5 +-
.../views/resource/task-group/queue/use-table.ts | 57 ++++++++++++----------
2 files changed, 33 insertions(+), 29 deletions(-)
diff --git a/dolphinscheduler-ui/src/views/resource/task-group/queue/index.tsx b/dolphinscheduler-ui/src/views/resource/task-group/queue/index.tsx
index e32fb52b7b..e191ed7212 100644
--- a/dolphinscheduler-ui/src/views/resource/task-group/queue/index.tsx
+++ b/dolphinscheduler-ui/src/views/resource/task-group/queue/index.tsx
@@ -110,9 +110,6 @@ const taskGroupQueue = defineComponent({
queryTaskGroupListPaging(taskGroupOptionsParams).then(
(res: TaskGroupRes) => {
res.totalList.map((item) => {
- if (!searchParamRef.groupId) {
- searchParamRef.groupId = item.id
- }
const option: SelectMixedOption = {
label: item.name,
value: item.id
@@ -165,6 +162,8 @@ const taskGroupQueue = defineComponent({
<NSelect
size='small'
options={taskGroupOptions}
+ clearable
+ style={{ width: '180px' }}
v-model:value={this.searchParamRef.groupId}
placeholder={t('resource.task_group_queue.task_group_name')}
/>
diff --git a/dolphinscheduler-ui/src/views/resource/task-group/queue/use-table.ts b/dolphinscheduler-ui/src/views/resource/task-group/queue/use-table.ts
index 4aa7028806..15fc58fe0f 100644
--- a/dolphinscheduler-ui/src/views/resource/task-group/queue/use-table.ts
+++ b/dolphinscheduler-ui/src/views/resource/task-group/queue/use-table.ts
@@ -132,38 +132,43 @@ export function useTable(
pageNo: 1,
pageSize: 2147483647
}
+
Promise.all([
queryTaskListInTaskGroupQueueById(params),
queryTaskGroupListPaging(taskGroupSearchParams)
- ]).then((values: any[]) => {
- const taskGroupList = values[1].totalList
- variables.totalPage = values[0].totalPage
- variables.tableData = values[0].totalList.map(
- (item: any, unused: number) => {
- let taskGroupName = ''
- if (taskGroupList) {
- const taskGroup = _.find(taskGroupList, { id: item.groupId })
- if (taskGroup) {
- taskGroupName = taskGroup.name
+ ]).then(
+ (values: any[]) => {
+ const taskGroupList = values[1].totalList
+ variables.totalPage = values[0].totalPage
+ variables.tableData = values[0].totalList.map(
+ (item: any, unused: number) => {
+ let taskGroupName = ''
+ if (taskGroupList) {
+ const taskGroup = _.find(taskGroupList, { id: item.groupId })
+ if (taskGroup) {
+ taskGroupName = taskGroup.name
+ }
}
- }
- item.taskGroupName = taskGroupName
- item.createTime = format(
- parseTime(item.createTime),
- 'yyyy-MM-dd HH:mm:ss'
- )
- item.updateTime = format(
- parseTime(item.updateTime),
- 'yyyy-MM-dd HH:mm:ss'
- )
- return {
- ...item
+ item.taskGroupName = taskGroupName
+ item.createTime = format(
+ parseTime(item.createTime),
+ 'yyyy-MM-dd HH:mm:ss'
+ )
+ item.updateTime = format(
+ parseTime(item.updateTime),
+ 'yyyy-MM-dd HH:mm:ss'
+ )
+ return {
+ ...item
+ }
}
- }
- )
- variables.loadingRef = false
- })
+ )
+ },
+ () => {}
+ )
+
+ variables.loadingRef = false
}
return { getTableData, variables, columns }