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);
|
||||
console.log("Task log list: mounted on task ID", tasks.activeTaskID);
|
||||
|
||||
if (tasks.activeTaskID)
|
||||
_fetchLogTail(tasks.activeTaskID);
|
||||
else
|
||||
taskLog.clear();
|
||||
});
|
||||
onUnmounted(() => {
|
||||
taskLog.clear();
|
||||
@ -62,6 +59,8 @@ function _subscribeToPinia() {
|
||||
function _fetchLogTail(taskID) {
|
||||
taskLog.clear();
|
||||
|
||||
if (!taskID) return;
|
||||
|
||||
const jobsAPI = new API.JobsApi(apiClient);
|
||||
return jobsAPI.fetchTaskLogTail(taskID)
|
||||
.then((logTail) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user