Input to run Jobs with Parameters (#1850)
Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
c53870e540
commit
b50ac452f5
@@ -4,6 +4,7 @@ import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
import { RunJobWithParamPayloadType } from './manage-jobs/scheduler-jobs/custom-parameters-popover/custom-parameters-popover.component';
|
||||
|
||||
/**
|
||||
* System service.
|
||||
@@ -323,6 +324,14 @@ export class SystemService {
|
||||
return this.http.post(`/jobs/${jobId}?command=executeJob`, this.emptyPayload).toPromise();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} jobId Job Id on which jobs to run
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
runSelectedJobWithParameters(jobId: string, jobParameters: RunJobWithParamPayloadType): Promise<any> {
|
||||
return this.http.post(`/jobs/${jobId}?command=executeJob`, jobParameters, { observe: 'response' }).toPromise();
|
||||
}
|
||||
|
||||
/*
|
||||
* @param jobId Job Id to view the history.
|
||||
* @returns {Observable<any>} Fetches History of the Job.
|
||||
|
||||
Reference in New Issue
Block a user