This is an automated email from the ASF dual-hosted git repository.
wenjun 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 c3d628667e [Fix-17984][UI] Release workflow definition list loading
lock on request failure (#17989)
c3d628667e is described below
commit c3d628667e4cfb771635bde7f09f3ddd2c732a0c
Author: Muhammad Asad <[email protected]>
AuthorDate: Fri Feb 27 10:27:21 2026 +0500
[Fix-17984][UI] Release workflow definition list loading lock on request
failure (#17989)
---
dolphinscheduler-ui/src/locales/en_US/project.ts | 1 +
dolphinscheduler-ui/src/locales/zh_CN/project.ts | 1 +
.../views/projects/workflow/definition/use-table.ts | 21 ++++++++++++++++-----
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/dolphinscheduler-ui/src/locales/en_US/project.ts
b/dolphinscheduler-ui/src/locales/en_US/project.ts
index 15073a64ae..2553f0df62 100644
--- a/dolphinscheduler-ui/src/locales/en_US/project.ts
+++ b/dolphinscheduler-ui/src/locales/en_US/project.ts
@@ -242,6 +242,7 @@ export default {
'The downstream dependent tasks exists. You can not delete the task.',
warning_delete_scheduler_dependent_tasks_desc:
'The downstream dependent tasks exists. Are you sure to delete the
scheduler?',
+ request_failed: 'Request failed, please retry',
warning_too_large_parallelism_number:
'The parallelism number is too large. It is better not to be over 10.'
},
diff --git a/dolphinscheduler-ui/src/locales/zh_CN/project.ts
b/dolphinscheduler-ui/src/locales/zh_CN/project.ts
index 880c037c96..9440715913 100644
--- a/dolphinscheduler-ui/src/locales/zh_CN/project.ts
+++ b/dolphinscheduler-ui/src/locales/zh_CN/project.ts
@@ -239,6 +239,7 @@ export default {
'下游存在依赖,你不能删除该任务.',
warning_delete_scheduler_dependent_tasks_desc:
'下游存在依赖, 删除定时可能会对下游任务产生影响. 你确定要删除该定时嘛?',
+ request_failed: '请求失败,请重试',
warning_too_large_parallelism_number: '并行度设置太大了, 最好不要超过10.'
},
task: {
diff --git
a/dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts
b/dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts
index 248c9fe609..17d9ca94d7 100644
--- a/dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts
+++ b/dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts
@@ -506,17 +506,28 @@ export function useTable() {
const getTableData = (params: IDefinitionParam) => {
if (variables.loadingRef) return
variables.loadingRef = true
- const { state } = useAsyncState(
- queryListPaging({ ...params }, variables.projectCode).then((res: any) =>
{
+ // Always release loading lock, even when request fails.
+ const queryStatePromise = queryListPaging(
+ { ...params },
+ variables.projectCode
+ )
+ .then((res: any) => {
variables.totalCount = res.total
variables.totalPage = res.totalPage
variables.tableData = res.totalList.map((item: any) => {
return { ...item }
})
+ })
+ .catch((err: Error) => {
+ window.$message.error(
+ err?.message || t('project.workflow.request_failed')
+ )
+ })
+ .finally(() => {
variables.loadingRef = false
- }),
- { total: 0, table: [] }
- )
+ })
+
+ const { state } = useAsyncState(queryStatePromise, { total: 0, table: [] })
return state
}