-
-
-
-
-
+
+
-
-
-
diff --git a/web/app/src/stores/notifications.js b/web/app/src/stores/notifications.js
index 405dbf87..537b17cf 100644
--- a/web/app/src/stores/notifications.js
+++ b/web/app/src/stores/notifications.js
@@ -74,8 +74,8 @@ export const useNotifs = defineStore('notifications', {
let msg = `Worker ${workerUpdate.name}`;
if (workerUpdate.previous_status && workerUpdate.previous_status != workerUpdate.status) {
msg += ` changed status ${workerUpdate.previous_status} ➜ ${workerUpdate.status}`;
+ this.add(msg);
}
- this.add(msg)
},
/* Ensure there is only 1000 items in the history. */
diff --git a/web/app/src/stores/workers.js b/web/app/src/stores/workers.js
index 315c09a0..d90a9788 100644
--- a/web/app/src/stores/workers.js
+++ b/web/app/src/stores/workers.js
@@ -1,11 +1,5 @@
import { defineStore } from 'pinia'
-import { WorkerMgtApi, WorkerStatusChangeRequest } from '@/manager-api';
-import { apiClient } from '@/stores/api-query-count';
-
-
-const api = new WorkerMgtApi(apiClient);
-
// 'use' prefix is idiomatic for Pinia stores.
// See https://pinia.vuejs.org/core-concepts/
export const useWorkers = defineStore('workers', {
@@ -43,23 +37,5 @@ export const useWorkers = defineStore('workers', {
activeWorkerID: "",
});
},
-
- reqStatusAwake() { return this.requestStatus("awake"); },
- reqStatusAsleep() { return this.requestStatus("asleep"); },
- reqStatusOffline() { return this.requestStatus("offline"); },
-
- /**
- * Transition the active worker to the new status.
- * @param {string} newStatus
- * @returns a Promise for the API request.
- */
- requestStatus(newStatus) {
- if (!this.activeWorkerID) {
- console.warn(`requestStatus(${newStatus}) impossible, no active worker ID`);
- return;
- }
- const statuschange = new WorkerStatusChangeRequest(newStatus, false);
- return api.requestWorkerStatusChange(this.activeWorkerID, statuschange);
- },
},
})