fix(edgejobs): sort logs result in UI EE-5304 (#8746)

pull/8989/head
matias-portainer 2 years ago committed by GitHub
parent c193360741
commit 8acea44ee8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save