mirror of
https://github.com/ansible/awx.git
synced 2026-03-17 08:57:33 -02:30
Fix jshint confusing semantics error
This commit is contained in:
@@ -313,12 +313,15 @@ export default ['$filter', '$state', '$stateParams', '$http', 'Wait',
|
|||||||
$http.post('/api/v2/schedules/preview/', {'rrule': req})
|
$http.post('/api/v2/schedules/preview/', {'rrule': req})
|
||||||
.then(({data}) => {
|
.then(({data}) => {
|
||||||
$scope.preview_list = data;
|
$scope.preview_list = data;
|
||||||
for (let tz in data) {
|
let parsePreviewList = (tz) => {
|
||||||
$scope.preview_list.isEmpty = data[tz].length === 0;
|
return data[tz].map(function(date) {
|
||||||
$scope.preview_list[tz] = data[tz].map(function(date) {
|
|
||||||
date = date.replace(/Z/, '');
|
date = date.replace(/Z/, '');
|
||||||
return moment.parseZone(date).format("MM-DD-YYYY HH:mm:ss");
|
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);
|
}, 300);
|
||||||
|
|||||||
@@ -89,12 +89,15 @@ function($filter, $state, $stateParams, Wait, $scope, moment,
|
|||||||
$http.post('/api/v2/schedules/preview/', {'rrule': req})
|
$http.post('/api/v2/schedules/preview/', {'rrule': req})
|
||||||
.then(({data}) => {
|
.then(({data}) => {
|
||||||
$scope.preview_list = data;
|
$scope.preview_list = data;
|
||||||
for (let tz in data) {
|
let parsePreviewList = (tz) => {
|
||||||
$scope.preview_list.isEmpty = data[tz].length === 0;
|
return data[tz].map(function(date) {
|
||||||
$scope.preview_list[tz] = data[tz].map(function(date) {
|
|
||||||
date = date.replace(/Z/, '');
|
date = date.replace(/Z/, '');
|
||||||
return moment.parseZone(date).format("MM-DD-YYYY HH:mm:ss");
|
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);
|
}, 300);
|
||||||
|
|||||||
Reference in New Issue
Block a user