mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Remove dead code
This commit is contained in:
parent
6679afe190
commit
40690df347
@ -22,29 +22,6 @@ function (Rest, GetBasePath, ProcessErrors, _) {
|
||||
}
|
||||
|
||||
return {
|
||||
getHostFacts: function(host, moduleName, date, fetchScanNumber) {
|
||||
|
||||
var getVersion = _.partial(this.getVersion, host, moduleName);
|
||||
var getFacts = this.getFacts;
|
||||
|
||||
return getVersion(date.from, date.to, fetchScanNumber)
|
||||
.then(function(versionData) {
|
||||
if (_.isEmpty(versionData)) {
|
||||
var retryStartDate = date.from.clone().subtract(1, 'year');
|
||||
return getVersion(retryStartDate, date.from, fetchScanNumber);
|
||||
} else {
|
||||
return versionData;
|
||||
}
|
||||
})
|
||||
.then(function(versionData) {
|
||||
if (_.isEmpty(versionData)) {
|
||||
return { fact: [] };
|
||||
} else {
|
||||
return getFacts(versionData);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
getFacts: function(version) {
|
||||
var promise;
|
||||
Rest.setUrl(version.related.fact_view);
|
||||
|
||||
@ -29,9 +29,6 @@ function controller($rootScope,
|
||||
|
||||
$scope.modules = initialFactData.moduleOptions;
|
||||
|
||||
// Use this to determine how to orchestrate the services
|
||||
var viewType = hostIds.length > 1 ? 'multiHost' : 'singleHost';
|
||||
|
||||
var searchConfig =
|
||||
{ leftRange: initialFactData.leftSearchRange,
|
||||
rightRange: initialFactData.rightSearchRange
|
||||
@ -46,16 +43,6 @@ function controller($rootScope,
|
||||
$scope.leftHostname = hosts[0].name;
|
||||
$scope.rightHostname = hosts.length > 1 ? hosts[1].name : hosts[0].name;
|
||||
|
||||
function setHeaderValues(viewType) {
|
||||
if (viewType === 'singleHost') {
|
||||
$scope.comparisonLeftHeader = $scope.leftScanDate;
|
||||
$scope.comparisonRightHeader = $scope.rightScanDate;
|
||||
} else {
|
||||
$scope.comparisonLeftHeader = hosts[0].name;
|
||||
$scope.comparisonRightHeader = hosts[1].name;
|
||||
}
|
||||
}
|
||||
|
||||
function reloadData(params, initialData) {
|
||||
|
||||
searchConfig = _.assign({}, searchConfig, params);
|
||||
@ -141,8 +128,6 @@ function controller($rootScope,
|
||||
|
||||
$scope.factData = info;
|
||||
|
||||
setHeaderValues(viewType);
|
||||
|
||||
return info;
|
||||
|
||||
}).finally(function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user