Hosts side of inventory detail page now working through modal dialogs. Fixed pagination on modal list. Test Add/Edit/Delete host buttons. Only piece left is to fix the host name link, which should bring up the Edit dialog.

This commit is contained in:
chouseknecht
2013-06-04 19:12:28 -04:00
parent 4575faf831
commit 2accb94972
10 changed files with 475 additions and 90 deletions

View File

@@ -1,10 +1,9 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* InventoryHelper
* Routines for building the tree. Everything related to the tree is here except
* for the menu piece. The routine for building the menu is in InventoriesEdit controller
* (controllers/Inventories.js)
* GroupsHelper
*
* Routines that handle group add/edit/delete on the Inventory tree widget.
*
*/
@@ -33,8 +32,8 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
selectButton: false
});
scope.formModalActionLabel = 'Finished'
scope.formModalHeader = 'Add Group'
scope.formModalActionLabel = 'Finished';
scope.formModalHeader = 'Add Group';
$('#form-modal').modal();
@@ -62,7 +61,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
});
SearchInit({ scope: scope, set: 'groups', list: list, url: defaultUrl });
PaginateInit({ scope: scope, list: list, url: defaultUrl });
PaginateInit({ scope: scope, list: list, url: defaultUrl, mode: 'lookup' });
scope.search(list.iterator);
if (!scope.$$phase) {
@@ -276,7 +275,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
.error( function(data, status, headers, config) {
scope.variables = null;
ProcessErrors(scope, data, status, form,
{ hdr: 'Error!', msg: 'Failed to retrieve host variables. GET returned status: ' + status });
{ hdr: 'Error!', msg: 'Failed to retrieve group variables. GET returned status: ' + status });
});
}
else {
@@ -370,7 +369,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
function($rootScope, $location, $log, $routeParams, Rest, Alert, GroupForm, GenerateForm, Prompt, ProcessErrors,
GetBasePath) {
return function(params) {
// Delete the selected group node. Disassociates it from
// Delete the selected group node. Disassociates it from its parent.
var scope = params.scope;
var group_id = params.group_id;
var inventory_id = params.inventory_id;