Web: simplify log tail fetching a bit
This commit is contained in:
parent
326e54e45a
commit
72fd1ac761
@ -34,10 +34,7 @@ onMounted(() => {
|
|||||||
tabulator.on("tableBuilt", _subscribeToPinia);
|
tabulator.on("tableBuilt", _subscribeToPinia);
|
||||||
console.log("Task log list: mounted on task ID", tasks.activeTaskID);
|
console.log("Task log list: mounted on task ID", tasks.activeTaskID);
|
||||||
|
|
||||||
if (tasks.activeTaskID)
|
_fetchLogTail(tasks.activeTaskID);
|
||||||
_fetchLogTail(tasks.activeTaskID);
|
|
||||||
else
|
|
||||||
taskLog.clear();
|
|
||||||
});
|
});
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
taskLog.clear();
|
taskLog.clear();
|
||||||
@ -62,6 +59,8 @@ function _subscribeToPinia() {
|
|||||||
function _fetchLogTail(taskID) {
|
function _fetchLogTail(taskID) {
|
||||||
taskLog.clear();
|
taskLog.clear();
|
||||||
|
|
||||||
|
if (!taskID) return;
|
||||||
|
|
||||||
const jobsAPI = new API.JobsApi(apiClient);
|
const jobsAPI = new API.JobsApi(apiClient);
|
||||||
return jobsAPI.fetchTaskLogTail(taskID)
|
return jobsAPI.fetchTaskLogTail(taskID)
|
||||||
.then((logTail) => {
|
.then((logTail) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user