GUAC-800: Display connection and connection group attributes, if present.

This commit is contained in:
Michael Jumper
2015-05-26 14:50:45 -07:00
parent e7574c0276
commit 3a619dbe0a
5 changed files with 42 additions and 1 deletions

View File

@@ -145,6 +145,15 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i
*/
$scope.permissions = null;
/**
* All available connection attributes. This is only the set of attribute
* definitions, organized as logical groupings of attributes, not attribute
* values.
*
* @type Form[]
*/
$scope.attributes = null;
/**
* Returns whether critical data has completed being loaded.
*
@@ -161,12 +170,18 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i
&& $scope.historyDateFormat !== null
&& $scope.historyEntryWrappers !== null
&& $scope.permissions !== null
&& $scope.attributes !== null
&& $scope.canSaveConnection !== null
&& $scope.canDeleteConnection !== null
&& $scope.canCloneConnection !== null;
};
// Pull connection attribute schema
schemaService.getConnectionAttributes().success(function attributesReceived(attributes) {
$scope.attributes = attributes;
});
// Pull connection group hierarchy
connectionGroupService.getConnectionGroupTree(ConnectionGroup.ROOT_IDENTIFIER,
[PermissionSet.ObjectPermissionType.ADMINISTER])

View File

@@ -37,6 +37,7 @@ angular.module('manage').controller('manageConnectionGroupController', ['$scope'
var connectionGroupService = $injector.get('connectionGroupService');
var guacNotification = $injector.get('guacNotification');
var permissionService = $injector.get('permissionService');
var schemaService = $injector.get('schemaService');
/**
* An action to be provided along with the object sent to showStatus which
@@ -94,6 +95,15 @@ angular.module('manage').controller('manageConnectionGroupController', ['$scope'
*/
$scope.permissions = null;
/**
* All available connection group attributes. This is only the set of
* attribute definitions, organized as logical groupings of attributes, not
* attribute values.
*
* @type Form[]
*/
$scope.attributes = null;
/**
* Returns whether critical data has completed being loaded.
*
@@ -106,11 +116,17 @@ angular.module('manage').controller('manageConnectionGroupController', ['$scope'
return $scope.rootGroup !== null
&& $scope.connectionGroup !== null
&& $scope.permissions !== null
&& $scope.attributes !== null
&& $scope.canSaveConnectionGroup !== null
&& $scope.canDeleteConnectionGroup !== null;
};
// Pull connection group attribute schema
schemaService.getConnectionGroupAttributes().success(function attributesReceived(attributes) {
$scope.attributes = attributes;
});
// Query the user's permissions for the current connection group
permissionService.getPermissions(authenticationService.getCurrentUserID())
.success(function permissionsReceived(permissions) {

View File

@@ -37,9 +37,9 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto
var authenticationService = $injector.get('authenticationService');
var connectionGroupService = $injector.get('connectionGroupService');
var guacNotification = $injector.get('guacNotification');
var userService = $injector.get('userService');
var permissionService = $injector.get('permissionService');
var schemaService = $injector.get('schemaService');
var userService = $injector.get('userService');
/**
* An action to be provided along with the object sent to showStatus which