Fixes for missing button actions

This commit is contained in:
Jose Alberto Hernandez
2022-06-02 17:25:00 -05:00
parent bc8169002c
commit a95a4dd4b9
6 changed files with 99 additions and 299 deletions
+19 -1
View File
@@ -12,6 +12,7 @@ import { Observable } from 'rxjs';
providedIn: 'root'
})
export class SystemService {
emptyPayload: any = {};
/**
* @param {HttpClient} http Http Client to send requests.
@@ -257,10 +258,27 @@ export class SystemService {
* @param {any} Job Job to be updated.
* @returns {Observable<any>}
*/
updateScheduler(jobId: string, job: any): Observable<any> {
runCommandOnScheduler(command: string): Observable<any> {
return this.http.post(`/scheduler?command=` + command, this.emptyPayload);
}
/**
* @param {string} jobId Job ID of Job to be updated.
* @param {any} Job Job to be updated.
* @returns {Observable<any>}
*/
updateScheduler(jobId: string, job: any): Observable<any> {
return this.http.put(`/jobs/${jobId}`, job);
}
/**
* @param jobId Job Id to be edited
* @returns {Observable<any>} Fetches Scheduler Job.
*/
runSelectedJob(jobId: string): Observable<any> {
return this.http.post(`/jobs/${jobId}?command=executeJob`, this.emptyPayload);
}
/*
* @param jobId Job Id to view the history.
* @returns {Observable<any>} Fetches History of the Job.