ability to start jobs individually

This commit is contained in:
orangecoding
2025-12-18 19:16:28 +01:00
parent 05f1bc61c9
commit 5dc976c7e3
17 changed files with 727 additions and 138 deletions

View File

@@ -100,6 +100,14 @@ export const useFredyState = create(
console.error(`Error while trying to get resource for api/jobs. Error:`, Exception);
}
},
setJobRunning(jobId, running) {
if (!jobId) return;
set((state) => {
const list = state.jobs.jobs || [];
const updated = list.map((j) => (j.id === jobId ? { ...j, running: !!running } : j));
return { jobs: { ...state.jobs, jobs: Object.freeze(updated) } };
});
},
},
user: {
async getUsers() {