mirror of
https://github.com/ansible/awx.git
synced 2026-03-29 06:45:09 -02:30
Remove dead code
This commit is contained in:
@@ -22,29 +22,6 @@ function (Rest, GetBasePath, ProcessErrors, _) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
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) {
|
getFacts: function(version) {
|
||||||
var promise;
|
var promise;
|
||||||
Rest.setUrl(version.related.fact_view);
|
Rest.setUrl(version.related.fact_view);
|
||||||
|
|||||||
@@ -29,9 +29,6 @@ function controller($rootScope,
|
|||||||
|
|
||||||
$scope.modules = initialFactData.moduleOptions;
|
$scope.modules = initialFactData.moduleOptions;
|
||||||
|
|
||||||
// Use this to determine how to orchestrate the services
|
|
||||||
var viewType = hostIds.length > 1 ? 'multiHost' : 'singleHost';
|
|
||||||
|
|
||||||
var searchConfig =
|
var searchConfig =
|
||||||
{ leftRange: initialFactData.leftSearchRange,
|
{ leftRange: initialFactData.leftSearchRange,
|
||||||
rightRange: initialFactData.rightSearchRange
|
rightRange: initialFactData.rightSearchRange
|
||||||
@@ -46,16 +43,6 @@ function controller($rootScope,
|
|||||||
$scope.leftHostname = hosts[0].name;
|
$scope.leftHostname = hosts[0].name;
|
||||||
$scope.rightHostname = hosts.length > 1 ? hosts[1].name : 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) {
|
function reloadData(params, initialData) {
|
||||||
|
|
||||||
searchConfig = _.assign({}, searchConfig, params);
|
searchConfig = _.assign({}, searchConfig, params);
|
||||||
@@ -141,8 +128,6 @@ function controller($rootScope,
|
|||||||
|
|
||||||
$scope.factData = info;
|
$scope.factData = info;
|
||||||
|
|
||||||
setHeaderValues(viewType);
|
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
|
||||||
}).finally(function() {
|
}).finally(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user