|
|
@ -1,4 +1,5 @@
|
|
|
|
import angular from 'angular';
|
|
|
|
import angular from 'angular';
|
|
|
|
|
|
|
|
import _ from 'lodash-es';
|
|
|
|
|
|
|
|
|
|
|
|
import { ScheduleCreateRequest, ScheduleUpdateRequest } from '@/portainer/models/schedule';
|
|
|
|
import { ScheduleCreateRequest, ScheduleUpdateRequest } from '@/portainer/models/schedule';
|
|
|
|
|
|
|
|
|
|
|
@ -26,7 +27,9 @@ function EdgeJobService(EdgeJobs, EdgeJobResults, FileUploadService) {
|
|
|
|
service.jobResults = jobResults;
|
|
|
|
service.jobResults = jobResults;
|
|
|
|
async function jobResults(edgeJobId) {
|
|
|
|
async function jobResults(edgeJobId) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
return await EdgeJobResults.query({ id: edgeJobId }).$promise;
|
|
|
|
const results = await EdgeJobResults.query({ id: edgeJobId }).$promise;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return _.sortBy(results, ['Id']);
|
|
|
|
} catch (err) {
|
|
|
|
} catch (err) {
|
|
|
|
throw { msg: 'Unable to retrieve results associated to the edgeJob', err: err };
|
|
|
|
throw { msg: 'Unable to retrieve results associated to the edgeJob', err: err };
|
|
|
|
}
|
|
|
|
}
|
|
|
|