mirror of
https://github.com/go-gitea/gitea.git
synced 2025-02-02 15:09:33 -05:00
fix: avoid multiplue fetching
This commit is contained in:
parent
d7b99e0028
commit
15db111df1
@ -140,7 +140,7 @@ const sfc = {
|
|||||||
toggleStepLogs(idx) {
|
toggleStepLogs(idx) {
|
||||||
this.currentJobStepsStates[idx].expanded = !this.currentJobStepsStates[idx].expanded;
|
this.currentJobStepsStates[idx].expanded = !this.currentJobStepsStates[idx].expanded;
|
||||||
if (this.currentJobStepsStates[idx].expanded) {
|
if (this.currentJobStepsStates[idx].expanded) {
|
||||||
this.loadJobData();
|
this.loadJobData(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -260,7 +260,7 @@ const sfc = {
|
|||||||
return await resp.json();
|
return await resp.json();
|
||||||
},
|
},
|
||||||
|
|
||||||
async loadJobData() {
|
async loadJobData(once) {
|
||||||
if (this.loading) return;
|
if (this.loading) return;
|
||||||
try {
|
try {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -297,7 +297,9 @@ const sfc = {
|
|||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
setTimeout(() => this.loadJobData(), 1000);
|
if (!once) {
|
||||||
|
setTimeout(() => this.loadJobData(), 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user