mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 03:47:36 -02:30
cleaning up jshint errors
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
$scope.toggleEnabled = function(){
|
$scope.toggleEnabled = function(){
|
||||||
$scope.host.enabled = !$scope.host.enabled;
|
$scope.host.enabled = !$scope.host.enabled;
|
||||||
};
|
};
|
||||||
$scope.formSave = function(){;
|
$scope.formSave = function(){
|
||||||
var params = {
|
var params = {
|
||||||
variables: $scope.extraVars === '---' || $scope.extraVars === '{}' ? null : $scope.extraVars,
|
variables: $scope.extraVars === '---' || $scope.extraVars === '{}' ? null : $scope.extraVars,
|
||||||
name: $scope.name,
|
name: $scope.name,
|
||||||
@@ -25,18 +25,18 @@
|
|||||||
enabled: $scope.host.enabled,
|
enabled: $scope.host.enabled,
|
||||||
inventory: $stateParams.inventory_id
|
inventory: $stateParams.inventory_id
|
||||||
};
|
};
|
||||||
ManageHostsService.post(params).then(function(res){
|
ManageHostsService.post(params).then(function(){
|
||||||
$state.go('^', null, {reload: true});
|
$state.go('^', null, {reload: true});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var init = function(){
|
var init = function(){
|
||||||
$scope.host = {enabled: true};
|
$scope.host = {enabled: true};
|
||||||
generator.inject(form, {mode: 'add', related: false, id: 'Inventory-hostManage--panel', scope: $scope});
|
generator.inject(form, {mode: 'add', related: false, id: 'Inventory-hostManage--panel', scope: $scope});
|
||||||
ParseTypeChange({
|
ParseTypeChange({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
field_id: 'host_variables',
|
field_id: 'host_variables',
|
||||||
variable: 'extraVars',
|
variable: 'extraVars',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
init();
|
init();
|
||||||
}];
|
}];
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
description: $scope.description,
|
description: $scope.description,
|
||||||
enabled: $scope.host.enabled
|
enabled: $scope.host.enabled
|
||||||
};
|
};
|
||||||
ManageHostsService.put(host).then(function(res){
|
ManageHostsService.put(host).then(function(){
|
||||||
$state.go('^', null, {reload: true});
|
$state.go('^', null, {reload: true});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -34,12 +34,12 @@
|
|||||||
generator.inject(form, {mode: 'edit', related: false, id: 'Inventory-hostManage--panel', scope: $scope});
|
generator.inject(form, {mode: 'edit', related: false, id: 'Inventory-hostManage--panel', 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();
|
||||||
}];
|
}];
|
||||||
|
|||||||
Reference in New Issue
Block a user