GUAC-932: Begin migration of admin to new guacGroupList. Remove unused util module.

This commit is contained in:
Michael Jumper
2014-12-19 00:11:29 -08:00
parent 2d60d2a4f9
commit 45e107f5a9
10 changed files with 118 additions and 182 deletions

View File

@@ -28,7 +28,6 @@ angular.module('manage').controller('connectionEditModalController', ['$scope',
var connectionEditModal = $injector.get('connectionEditModal');
var connectionService = $injector.get('connectionService');
var displayObjectPreparationService = $injector.get('displayObjectPreparationService');
var Connection = $injector.get('Connection');
var HistoryEntryWrapper = $injector.get('HistoryEntryWrapper');
@@ -39,9 +38,6 @@ angular.module('manage').controller('connectionEditModalController', ['$scope',
$scope.connection = new Connection($scope.connection);
var newConnection = !$scope.connection.identifier;
if(newConnection)
// Prepare this connection for display
displayObjectPreparationService.prepareConnection($scope.connection);
// Set it to VNC by default
if(!$scope.connection.protocol)
@@ -50,9 +46,13 @@ angular.module('manage').controller('connectionEditModalController', ['$scope',
$scope.historyEntryWrappers = [];
// Wrap all the history entries
$scope.connection.history.forEach(function wrapHistoryEntry(historyEntry) {
$scope.historyEntryWrappers.push(new HistoryEntryWrapper(historyEntry));
});
if (!newConnection) {
connectionService.getConnectionHistory($scope.connection.identifier).success(function wrapHistoryEntries(historyEntries) {
historyEntries.forEach(function wrapHistoryEntry(historyEntry) {
$scope.historyEntryWrappers.push(new HistoryEntryWrapper(historyEntry));
});
});
}
/**
* Close the modal.