GUAC-932: Fix display of history.

This commit is contained in:
Michael Jumper
2014-12-21 20:14:11 -08:00
parent c3bdbcd013
commit 60f249aa6f
2 changed files with 5 additions and 8 deletions

View File

@@ -43,12 +43,11 @@ angular.module('manage').controller('connectionEditModalController', ['$scope',
if(!$scope.connection.protocol)
$scope.connection.protocol = "vnc";
$scope.historyEntryWrappers = [];
// Wrap all the history entries
if (!newConnection) {
connectionService.getConnectionHistory($scope.connection.identifier).success(function wrapHistoryEntries(historyEntries) {
$scope.historyEntryWrappers = [];
historyEntries.forEach(function wrapHistoryEntry(historyEntry) {
$scope.historyEntryWrappers.push(new HistoryEntryWrapper(historyEntry));
});
@@ -60,6 +59,7 @@ angular.module('manage').controller('connectionEditModalController', ['$scope',
}
else {
$scope.historyEntryWrappers = [];
$scope.connection.parameters = {};
}