GUACAMOLE-220: Allow attributes to be specified via the template supplied to 
REST object constructors, for consistency's sake.

Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/7917f46b
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/7917f46b
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/7917f46b

Branch: refs/heads/master
Commit: 7917f46b36fb04565c0e1d4119c0136c8f987fcd
Parents: 6aaef76
Author: Michael Jumper <mjum...@apache.org>
Authored: Thu Aug 9 10:43:46 2018 -0700
Committer: Michael Jumper <mjum...@apache.org>
Committed: Thu Aug 9 10:46:06 2018 -0700

----------------------------------------------------------------------
 guacamole/src/main/webapp/app/rest/types/Connection.js      | 2 +-
 guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js | 2 +-
 guacamole/src/main/webapp/app/rest/types/SharingProfile.js  | 2 +-
 guacamole/src/main/webapp/app/rest/types/User.js            | 2 +-
 guacamole/src/main/webapp/app/rest/types/UserGroup.js       | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/Connection.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/rest/types/Connection.js 
b/guacamole/src/main/webapp/app/rest/types/Connection.js
index 76ece9d..89da4e1 100644
--- a/guacamole/src/main/webapp/app/rest/types/Connection.js
+++ b/guacamole/src/main/webapp/app/rest/types/Connection.js
@@ -84,7 +84,7 @@ angular.module('rest').factory('Connection', [function 
defineConnection() {
          *
          * @type Object.<String, String>
          */
-        this.attributes = {};
+        this.attributes = template.attributes || {};
 
         /**
          * The count of currently active connections using this connection.

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js 
b/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
index a40dba1..6da754c 100644
--- a/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
+++ b/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
@@ -95,7 +95,7 @@ angular.module('rest').factory('ConnectionGroup', [function 
defineConnectionGrou
          *
          * @type Object.<String, String>
          */
-        this.attributes = {};
+        this.attributes = template.attributes || {};
 
         /**
          * The count of currently active connections using this connection

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/rest/types/SharingProfile.js 
b/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
index ea8287d..50f1307 100644
--- a/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
+++ b/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
@@ -76,7 +76,7 @@ angular.module('rest').factory('SharingProfile', [function 
defineSharingProfile(
          *
          * @type Object.<String, String>
          */
-        this.attributes = {};
+        this.attributes = template.attributes || {};
 
     };
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/User.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/rest/types/User.js 
b/guacamole/src/main/webapp/app/rest/types/User.js
index f796147..3ca138d 100644
--- a/guacamole/src/main/webapp/app/rest/types/User.js
+++ b/guacamole/src/main/webapp/app/rest/types/User.js
@@ -69,7 +69,7 @@ angular.module('rest').factory('User', [function defineUser() 
{
          *
          * @type Object.<String, String>
          */
-        this.attributes = {};
+        this.attributes = template.attributes || {};
 
     };
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/UserGroup.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/rest/types/UserGroup.js 
b/guacamole/src/main/webapp/app/rest/types/UserGroup.js
index 03b73e2..f4bf26c 100644
--- a/guacamole/src/main/webapp/app/rest/types/UserGroup.js
+++ b/guacamole/src/main/webapp/app/rest/types/UserGroup.js
@@ -50,7 +50,7 @@ angular.module('rest').factory('UserGroup', [function 
defineUserGroup() {
          *
          * @type Object.<String, String>
          */
-        this.attributes = {};
+        this.attributes = template.attributes || {};
 
     };
 

Reply via email to