mirror of https://github.com/portainer/portainer
fix(edgejobs): sort logs result in UI EE-5304 (#8746)
parent
c193360741
commit
8acea44ee8
|
@ -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…
Reference in New Issue