Browse Source

Requests the previous page when there is no data on the list page(#1768) (#1832)

* fix udfs assignment and task instance page jump #1789

* jest add coverage display

* Fix data echo, style, popup cannot be closed and license

* Fix data echo, style, popup cannot be closed and license

* fix

* Requests the previous page when there is no data on the list page
pull/2/head
break60 5 years ago committed by qiaozhanwei
parent
commit
d02422d030
  1. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue
  2. 12
      dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/index.vue
  3. 12
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue
  4. 12
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue
  5. 12
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue
  6. 10
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue
  7. 12
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue
  8. 12
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue
  9. 12
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue
  10. 12
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/index.vue
  11. 12
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue
  12. 12
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue
  13. 12
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue
  14. 12
      dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue

@ -20,7 +20,7 @@
v-model="sqlTypeId"
:disabled="isDetails"
@on-change="_handleSqlTypeChanged"
style="width: 90px;">
style="width: 120px;">
<x-option
v-for="city in sqlTypeList"
:key="city.id"

12
dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/index.vue

@ -124,10 +124,14 @@
_getList (flag) {
this.isLoading = !flag
this.getDatasourcesListP(this.searchParams).then(res => {
this.datasourcesList = []
this.datasourcesList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.datasourcesList = []
this.datasourcesList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

12
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue

@ -100,10 +100,14 @@
_getList (flag) {
this.isLoading = !flag
this.getProcessListP(this.searchParams).then(res => {
this.processListP = []
this.processListP = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.processListP = []
this.processListP = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

12
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue

@ -105,10 +105,14 @@
_getProcessInstanceListP (flag) {
this.isLoading = !flag
this.getProcessInstance(this.searchParams).then(res => {
this.processInstanceList = []
this.processInstanceList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.processInstanceList = []
this.processInstanceList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

12
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue

@ -110,10 +110,14 @@
_getList (flag) {
this.isLoading = !flag
this.getProjectsList(this.searchParams).then(res => {
this.projectsList = []
this.projectsList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.projectsList = []
this.projectsList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

10
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue

@ -91,9 +91,13 @@
_getList (flag) {
this.isLoading = !flag
this.getResourcesListP(this.searchParams).then(res => {
this.fileResourcesList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.fileResourcesList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

12
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue

@ -109,10 +109,14 @@
_getList (flag) {
this.isLoading = !flag
this.getUdfFuncListP(this.searchParams).then(res => {
this.udfFuncList = []
this.udfFuncList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.udfFuncList = []
this.udfFuncList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

12
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue

@ -96,10 +96,14 @@
_getList (flag) {
this.isLoading = !flag
this.getResourcesListP(this.searchParams).then(res => {
this.udfResourcesList = []
this.udfResourcesList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.udfResourcesList = []
this.udfResourcesList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

12
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue

@ -118,10 +118,14 @@
_getList (flag) {
this.isLoading = !flag
this.getQueueListP(this.searchParams).then(res => {
this.queueList = []
this.queueList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.queueList = []
this.queueList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

12
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/index.vue

@ -122,10 +122,14 @@
_getList (flag) {
this.isLoading = !flag
this.getTenantListP(this.searchParams).then(res => {
this.tenementList = []
this.tenementList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.tenementList = []
this.tenementList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

12
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue

@ -120,10 +120,14 @@
_getList (flag) {
this.isLoading = !flag
this.getUsersListP(this.searchParams).then(res => {
this.userList = []
this.userList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.userList = []
this.userList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

12
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue

@ -122,10 +122,14 @@
_getList (flag) {
this.isLoading = !flag
this.getAlertgroupP(this.searchParams).then(res => {
this.alertgroupList = []
this.alertgroupList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.alertgroupList = []
this.alertgroupList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

12
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue

@ -121,10 +121,14 @@
_getList (flag) {
this.isLoading = !flag
this.getWorkerGroups(this.searchParams).then(res => {
this.workerGroupList = []
this.workerGroupList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.workerGroupList = []
this.workerGroupList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

12
dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue

@ -122,10 +122,14 @@
_getList (flag) {
this.isLoading = !flag
this.getTokenListP(this.searchParams).then(res => {
this.tokenList = []
this.tokenList = res.totalList
this.total = res.total
this.isLoading = false
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.searchParams.pageNo = this.searchParams.pageNo -1
} else {
this.tokenList = []
this.tokenList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => {
this.isLoading = false
})

Loading…
Cancel
Save