1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

Fix jshint confusing semantics error

This commit is contained in:
Marliana Lara 2018-02-21 11:36:19 -05:00
parent b9a2f7a87e
commit d71ecf1eee
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE
2 changed files with 12 additions and 6 deletions

View File

@ -313,12 +313,15 @@ export default ['$filter', '$state', '$stateParams', '$http', 'Wait',
$http.post('/api/v2/schedules/preview/', {'rrule': req})
.then(({data}) => {
$scope.preview_list = data;
for (let tz in data) {
$scope.preview_list.isEmpty = data[tz].length === 0;
$scope.preview_list[tz] = data[tz].map(function(date) {
let parsePreviewList = (tz) => {
return data[tz].map(function(date) {
date = date.replace(/Z/, '');
return moment.parseZone(date).format("MM-DD-YYYY HH:mm:ss");
});
};
for (let tz in data) {
$scope.preview_list.isEmpty = data[tz].length === 0;
$scope.preview_list[tz] = parsePreviewList(tz);
}
});
}, 300);

View File

@ -89,12 +89,15 @@ function($filter, $state, $stateParams, Wait, $scope, moment,
$http.post('/api/v2/schedules/preview/', {'rrule': req})
.then(({data}) => {
$scope.preview_list = data;
for (let tz in data) {
$scope.preview_list.isEmpty = data[tz].length === 0;
$scope.preview_list[tz] = data[tz].map(function(date) {
let parsePreviewList = (tz) => {
return data[tz].map(function(date) {
date = date.replace(/Z/, '');
return moment.parseZone(date).format("MM-DD-YYYY HH:mm:ss");
});
};
for (let tz in data) {
$scope.preview_list.isEmpty = data[tz].length === 0;
$scope.preview_list[tz] = parsePreviewList(tz);
}
});
}, 300);