From c1505cace277d5c2e5910e231d340f279e48dd6e Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 12 Nov 2014 20:37:24 -0800 Subject: [PATCH] GUAC-605: Add reconnect button and placeholder. --- .../app/client/controllers/clientController.js | 15 +++++++++++++-- guacamole/src/main/webapp/translations/en_US.json | 3 +++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index 5fcb98070..22d96dbf3 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -209,7 +209,8 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams', statusModal.activate({ className: "error", title: "client.error.connectionErrorTitle", - text: "client.error.clientErrors." + errorName + text: "client.error.clientErrors." + errorName, + actions: [ "client.action.reconnect" ] }); }); @@ -243,11 +244,21 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams', statusModal.activate({ className: "error", title: "client.error.connectionErrorTitle", - text: "client.error.tunnelErrors." + errorName + text: "client.error.tunnelErrors." + errorName, + actions: [ "client.action.reconnect" ] }); }); + // Handle reconnect action + $scope.$on('guacStatusAction', function actionListener(event, action) { + + // TODO: Implement reconnect + if (action === "client.action.reconnect") + console.log("(Reconnect placeholder)"); + + }); + $scope.formattedScale = function formattedScale() { return Math.round($scope.clientProperties.scale * 100); }; diff --git a/guacamole/src/main/webapp/translations/en_US.json b/guacamole/src/main/webapp/translations/en_US.json index ad29126f6..c1b90caac 100644 --- a/guacamole/src/main/webapp/translations/en_US.json +++ b/guacamole/src/main/webapp/translations/en_US.json @@ -265,6 +265,9 @@ "tunnelStates" : { "closed" : "You have been disconnected. Reload the page to reconnect." } + }, + "action" : { + "reconnect" : "Reconnect" } } }