mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
fixed jshint errors
This commit is contained in:
@@ -27,10 +27,10 @@
|
|||||||
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});
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
var init = function(){
|
var init = function(){
|
||||||
$scope.host = host;
|
$scope.host = host;
|
||||||
@@ -38,13 +38,13 @@
|
|||||||
generator.inject(form, {mode: 'edit', related: false, scope: $scope});
|
generator.inject(form, {mode: 'edit', related: false, scope: $scope});
|
||||||
$scope.extraVars = $scope.host.variables === '' ? '---' : $scope.host.variables;
|
$scope.extraVars = $scope.host.variables === '' ? '---' : $scope.host.variables;
|
||||||
$scope.name = host.name;
|
$scope.name = host.name;
|
||||||
$scope.description = host.description;
|
$scope.description = host.description;
|
||||||
ParseTypeChange({
|
ParseTypeChange({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
field_id: 'host_variables',
|
field_id: 'host_variables',
|
||||||
variable: 'extraVars',
|
variable: 'extraVars',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
init();
|
init();
|
||||||
}];
|
}];
|
||||||
|
|||||||
@@ -5,9 +5,17 @@
|
|||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
export default
|
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;
|
||||||
@@ -61,4 +61,4 @@ export default
|
|||||||
$scope.hostLoading = false;
|
$scope.hostLoading = false;
|
||||||
};
|
};
|
||||||
init();
|
init();
|
||||||
}];
|
}];
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export default function(){
|
|||||||
"YAML:<br />\n" +
|
"YAML:<br />\n" +
|
||||||
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n" +
|
"<blockquote>---<br />somevar: somevalue<br />password: magic<br /></blockquote>\n" +
|
||||||
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
|
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
|
||||||
'<p>View YAML examples at <a href="http://docs.ansible.com/YAMLSyntax.html" target="_blank">docs.ansible.com</a></p>',
|
'<p>View YAML examples at <a href="http://docs.ansible.com/YAMLSyntax.html" target="_blank">docs.ansible.com</a></p>',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
@@ -74,4 +74,4 @@ export default function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -89,5 +89,5 @@ export default function(){
|
|||||||
actions: {
|
actions: {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
});
|
});
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
@@ -61,4 +61,4 @@ var dashboardHostsEdit = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export {dashboardHostsList, dashboardHostsEdit};
|
export {dashboardHostsList, dashboardHostsEdit};
|
||||||
|
|||||||
@@ -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') {
|
||||||
@@ -81,7 +81,7 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', '$log', fu
|
|||||||
Rest.setUrl(needsRequest[0].basePath ? GetBasePath(needsRequest[0].basePath) : basePath);
|
Rest.setUrl(needsRequest[0].basePath ? GetBasePath(needsRequest[0].basePath) : basePath);
|
||||||
Rest.options()
|
Rest.options()
|
||||||
.success(function (data) {
|
.success(function (data) {
|
||||||
try {
|
try {
|
||||||
var options = data.actions.GET;
|
var options = data.actions.GET;
|
||||||
needsRequest = needsRequest
|
needsRequest = needsRequest
|
||||||
.map(function (option) {
|
.map(function (option) {
|
||||||
|
|||||||
Reference in New Issue
Block a user