mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 10:30:03 -03:30
Merge pull request #6261 from mabashian/inventory-bug-fixes
Fixed inventory limit panels bug, breadcrumb and redirect bugs
This commit is contained in:
commit
ee0ac72c89
@ -2,8 +2,8 @@ export default {
|
||||
name: "inventories.edit.groups.edit.nested_hosts.edit",
|
||||
url: "/edit/:host_id",
|
||||
ncyBreadcrumb: {
|
||||
parent: "inventories.edit.groups.edit",
|
||||
label: "ASSOCIATED HOSTS"
|
||||
parent: "inventories.edit.groups.edit.nested_hosts",
|
||||
label: "{{breadcrumb.host_name}}"
|
||||
},
|
||||
views: {
|
||||
'hostForm@inventories': {
|
||||
|
||||
@ -52,7 +52,7 @@ export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition'
|
||||
// assign the host to current group if not at the root level
|
||||
if ($stateParams.group_id) {
|
||||
HostManageService.associateGroup(res.data, $stateParams.group_id).then(function() {
|
||||
$state.go('inventories.edit.groups.edit.nested_hosts', { group_id: $stateParams.group_id }, { reload: true });
|
||||
$state.go('^.edit', { group_id: $stateParams.group_id, host_id: res.data.id }, { reload: true });
|
||||
});
|
||||
} else {
|
||||
$state.go('^.edit', { host_id: res.data.id }, { reload: true });
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
*************************************************/
|
||||
|
||||
export default
|
||||
['$scope', '$state', '$stateParams', 'DashboardHostsForm', 'GenerateForm', 'ParseTypeChange', 'DashboardHostService', 'host',
|
||||
function($scope, $state, $stateParams, DashboardHostsForm, GenerateForm, ParseTypeChange, DashboardHostService, host){
|
||||
['$scope', '$state', '$stateParams', 'DashboardHostsForm', 'GenerateForm', 'ParseTypeChange', 'DashboardHostService', 'host', '$rootScope',
|
||||
function($scope, $state, $stateParams, DashboardHostsForm, GenerateForm, ParseTypeChange, DashboardHostService, host, $rootScope){
|
||||
$scope.parseType = 'yaml';
|
||||
$scope.formCancel = function(){
|
||||
$state.go('^', null, {reload: true});
|
||||
@ -36,6 +36,7 @@
|
||||
var init = function(){
|
||||
$scope.host = host;
|
||||
$scope.name = host.name;
|
||||
$rootScope.breadcrumb.host_name = host.name;
|
||||
$scope.description = host.description;
|
||||
$scope.variables = getVars(host.variables);
|
||||
ParseTypeChange({
|
||||
|
||||
@ -3,7 +3,7 @@ export default {
|
||||
url: "/edit/:host_id",
|
||||
ncyBreadcrumb: {
|
||||
parent: "inventories.edit.hosts",
|
||||
label: "HOSTS"
|
||||
label: "{{breadcrumb.host_name}}"
|
||||
},
|
||||
views: {
|
||||
'hostForm@inventories': {
|
||||
|
||||
@ -18,6 +18,9 @@ export default ['$rootScope', function($rootScope) {
|
||||
if(index+1 > scope.maxPanels) {
|
||||
$(this).addClass('Panel-hidden');
|
||||
}
|
||||
else {
|
||||
$(this).removeClass('Panel-hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user