fixed jshint errors

This commit is contained in:
John Mitchell
2016-04-27 11:31:35 -04:00
parent e3d0309089
commit deee1bafc7
6 changed files with 29 additions and 29 deletions

View File

@@ -27,7 +27,7 @@
description: $scope.description, description: $scope.description,
enabled: $scope.host.enabled enabled: $scope.host.enabled
}; };
DashboardHostService.putHost(host).then(function(res){ DashboardHostService.putHost(host).then(function(){
$state.go('^', null, {reload: true}); $state.go('^', null, {reload: true});
}); });

View File

@@ -8,6 +8,14 @@ export default
['$scope', '$state', '$stateParams', 'PageRangeSetup', 'GetBasePath', 'DashboardHostsList', ['$scope', '$state', '$stateParams', 'PageRangeSetup', 'GetBasePath', 'DashboardHostsList',
'generateList', 'PaginateInit', 'SetStatus', 'DashboardHostService', 'hosts', 'generateList', 'PaginateInit', 'SetStatus', 'DashboardHostService', 'hosts',
function($scope, $state, $stateParams, PageRangeSetup, GetBasePath, DashboardHostsList, GenerateList, PaginateInit, SetStatus, DashboardHostService, hosts){ function($scope, $state, $stateParams, PageRangeSetup, GetBasePath, DashboardHostsList, GenerateList, PaginateInit, SetStatus, DashboardHostService, hosts){
var setJobStatus = function(){
_.forEach($scope.hosts, function(value){
SetStatus({
scope: $scope,
host: value
});
});
};
var generator = GenerateList, var generator = GenerateList,
list = DashboardHostsList, list = DashboardHostsList,
defaultUrl = GetBasePath('hosts'); defaultUrl = GetBasePath('hosts');
@@ -23,21 +31,13 @@ export default
}); });
}; };
$scope.$on('PostRefresh', function(){ $scope.$on('PostRefresh', function(){
$scope.hosts = _.map($scope.hosts, function(value, key){ $scope.hosts = _.map($scope.hosts, function(value){
value.inventory_name = value.summary_fields.inventory.name; value.inventory_name = value.summary_fields.inventory.name;
value.inventory_id = value.summary_fields.inventory.id; value.inventory_id = value.summary_fields.inventory.id;
return value; return value;
}); });
setJobStatus(); setJobStatus();
}); });
var setJobStatus = function(){
_.forEach($scope.hosts, function(value, key){
SetStatus({
scope: $scope,
host: value
});
});
};
var init = function(){ var init = function(){
$scope.list = list; $scope.list = list;
$scope.host_active_search = false; $scope.host_active_search = false;

View File

@@ -74,4 +74,4 @@ export default function(){
} }
} }
}; };
}; }

View File

@@ -89,5 +89,5 @@ export default function(){
actions: { actions: {
} }
} };
}; }

View File

@@ -29,13 +29,13 @@ var dashboardHostsList = {
var defaultUrl = GetBasePath('hosts') + '?page_size=10'; var defaultUrl = GetBasePath('hosts') + '?page_size=10';
Rest.setUrl(defaultUrl); Rest.setUrl(defaultUrl);
return Rest.get().then(function(res){ return Rest.get().then(function(res){
var results = _.map(res.data.results, function(value, key){ var results = _.map(res.data.results, function(value){
value.inventory_name = value.summary_fields.inventory.name; value.inventory_name = value.summary_fields.inventory.name;
value.inventory_id = value.summary_fields.inventory.id; value.inventory_id = value.summary_fields.inventory.id;
return value; return value;
}); });
res.data.results = results; res.data.results = results;
return res.data return res.data;
}); });
}] }]
} }

View File

@@ -35,7 +35,7 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', '$log', fu
obj.value = value; obj.value = value;
obj.label = label; obj.label = label;
obj.type = type; obj.type = type;
obj.basePath = field['basePath'] || null; obj.basePath = field.basePath || null;
// return the built option // return the built option
if (type === 'select') { if (type === 'select') {