mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
parent
a22cbebcb9
commit
e7615edd91
@ -10,7 +10,6 @@
|
||||
var generator = GenerateForm,
|
||||
form = HostForm;
|
||||
$scope.parseType = 'yaml';
|
||||
$scope.extraVars = '---';
|
||||
$scope.formCancel = function(){
|
||||
$state.go('^');
|
||||
};
|
||||
@ -19,7 +18,7 @@
|
||||
};
|
||||
$scope.formSave = function(){
|
||||
var params = {
|
||||
variables: $scope.extraVars === '---' || $scope.extraVars === '{}' ? null : $scope.extraVars,
|
||||
variables: $scope.variables === '---' || $scope.variables === '{}' ? null : $scope.variables,
|
||||
name: $scope.name,
|
||||
description: $scope.description,
|
||||
enabled: $scope.host.enabled,
|
||||
@ -43,7 +42,6 @@
|
||||
ParseTypeChange({
|
||||
scope: $scope,
|
||||
field_id: 'host_variables',
|
||||
variable: 'extraVars',
|
||||
});
|
||||
};
|
||||
init();
|
||||
|
@ -19,7 +19,7 @@
|
||||
$scope.formSave = function(){
|
||||
var host = {
|
||||
id: $scope.host.id,
|
||||
variables: $scope.extraVars === '---' || $scope.extraVars === '{}' ? null : $scope.extraVars,
|
||||
variables: $scope.variables === '---' || $scope.variables === '{}' ? null : $scope.variables,
|
||||
name: $scope.name,
|
||||
description: $scope.description,
|
||||
enabled: $scope.host.enabled
|
||||
@ -30,15 +30,13 @@
|
||||
};
|
||||
var init = function(){
|
||||
$scope.host = host;
|
||||
$scope.extraVars = host.variables === '' ? '---' : host.variables;
|
||||
generator.inject(form, {mode: 'edit', related: false, id: 'Inventory-hostManage--panel', scope: $scope});
|
||||
$scope.extraVars = $scope.host.variables === '' ? '---' : $scope.host.variables;
|
||||
$scope.variables = host.variables === '' ? '---' : host.variables;
|
||||
$scope.name = host.name;
|
||||
$scope.description = host.description;
|
||||
ParseTypeChange({
|
||||
scope: $scope,
|
||||
field_id: 'host_variables',
|
||||
variable: 'extraVars',
|
||||
});
|
||||
};
|
||||
init();
|
||||
|
Loading…
Reference in New Issue
Block a user