mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 00:57:48 -02:30
related groups for host-edit form
This commit is contained in:
@@ -88,9 +88,7 @@ function(i18n, nestedGroupListState, nestedHostsListState, buildHostAddState){
|
|||||||
includeForm: "NestedGroupFormDefinition",
|
includeForm: "NestedGroupFormDefinition",
|
||||||
title: i18n._('Groups'),
|
title: i18n._('Groups'),
|
||||||
iterator: 'nested_group',
|
iterator: 'nested_group',
|
||||||
listState: nestedGroupListState,
|
listState: nestedGroupListState
|
||||||
// addState: buildGroupsAddState,
|
|
||||||
// editState: buildGroupsEditState
|
|
||||||
},
|
},
|
||||||
nested_hosts: {
|
nested_hosts: {
|
||||||
name: 'nested_hosts',
|
name: 'nested_hosts',
|
||||||
|
|||||||
@@ -20,6 +20,10 @@
|
|||||||
$scope.toggleEnabled = function(){
|
$scope.toggleEnabled = function(){
|
||||||
$scope.host.enabled = !$scope.host.enabled;
|
$scope.host.enabled = !$scope.host.enabled;
|
||||||
};
|
};
|
||||||
|
$scope.groupsTab = function(){
|
||||||
|
let id = $scope.host.summary_fields.inventory.id;
|
||||||
|
$state.go('hosts.edit.nested_groups', {inventory_id: id});
|
||||||
|
};
|
||||||
$scope.formSave = function(){
|
$scope.formSave = function(){
|
||||||
var host = {
|
var host = {
|
||||||
id: $scope.host.id,
|
id: $scope.host.id,
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
* @description This form is for adding/editing a host on the inventory page
|
* @description This form is for adding/editing a host on the inventory page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default ['i18n', function(i18n) {
|
export default ['i18n', 'nestedGroupListState',
|
||||||
|
function(i18n, nestedGroupListState) {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
addTitle: i18n._('CREATE HOST'),
|
addTitle: i18n._('CREATE HOST'),
|
||||||
@@ -107,6 +108,21 @@ export default ['i18n', function(i18n) {
|
|||||||
name: 'ansible_facts',
|
name: 'ansible_facts',
|
||||||
title: i18n._('Facts'),
|
title: i18n._('Facts'),
|
||||||
skipGenerator: true
|
skipGenerator: true
|
||||||
|
},
|
||||||
|
nested_groups: {
|
||||||
|
name: 'nested_groups',
|
||||||
|
// ngClick: "$state.go('hosts.edit.nested_groups')",
|
||||||
|
ngClick: "groupsTab()",
|
||||||
|
include: "NestedGroupListDefinition",
|
||||||
|
includeForm: "NestedGroupFormDefinition",
|
||||||
|
title: i18n._('Groups'),
|
||||||
|
iterator: 'nested_group',
|
||||||
|
listState: nestedGroupListState
|
||||||
|
},
|
||||||
|
insights: {
|
||||||
|
name: 'insights',
|
||||||
|
title: i18n._('Insights'),
|
||||||
|
skipGenerator: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
* @description This form is for adding/editing a host on the inventory page
|
* @description This form is for adding/editing a host on the inventory page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default ['i18n', function(i18n) {
|
export default ['i18n', 'nestedGroupListState',
|
||||||
|
function(i18n,nestedGroupListState) {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
addTitle: i18n._('CREATE HOST'),
|
addTitle: i18n._('CREATE HOST'),
|
||||||
@@ -108,6 +109,20 @@ export default ['i18n', function(i18n) {
|
|||||||
name: 'ansible_facts',
|
name: 'ansible_facts',
|
||||||
title: i18n._('Facts'),
|
title: i18n._('Facts'),
|
||||||
skipGenerator: true
|
skipGenerator: true
|
||||||
|
},
|
||||||
|
nested_groups: {
|
||||||
|
name: 'nested_groups',
|
||||||
|
ngClick: "$state.go('inventories.edit.hosts.edit.nested_groups')",
|
||||||
|
include: "NestedGroupListDefinition",
|
||||||
|
includeForm: "NestedGroupFormDefinition",
|
||||||
|
title: i18n._('Groups'),
|
||||||
|
iterator: 'nested_group',
|
||||||
|
listState: nestedGroupListState
|
||||||
|
},
|
||||||
|
insights: {
|
||||||
|
name: 'insights',
|
||||||
|
title: i18n._('Insights'),
|
||||||
|
skipGenerator: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user