You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rz...@apache.org on 2015/11/03 21:46:48 UTC

ambari git commit: AMBARI-13703. Admin view throws javascript error when user timeout is not defined (rzang)

Repository: ambari
Updated Branches:
  refs/heads/trunk 4763c759c -> 463ed4bd9


AMBARI-13703. Admin view throws javascript error when user timeout is not defined (rzang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/463ed4bd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/463ed4bd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/463ed4bd

Branch: refs/heads/trunk
Commit: 463ed4bd91cfc4ac7a0f199deed1a42b1f511ef9
Parents: 4763c75
Author: Richard Zang <rz...@apache.org>
Authored: Tue Nov 3 12:46:08 2015 -0800
Committer: Richard Zang <rz...@apache.org>
Committed: Tue Nov 3 12:46:08 2015 -0800

----------------------------------------------------------------------
 .../main/resources/ui/admin-web/app/scripts/services/Cluster.js  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/463ed4bd/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
index a602cba..fdfb8e2 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
@@ -65,7 +65,9 @@ angular.module('ambariAdminConsole')
       var url = '/services/AMBARI/components/AMBARI_SERVER?fields=RootServiceComponents/properties/user.inactivity.timeout.default'
       $http.get(Settings.baseUrl + url)
       .then(function(data) {
-        deferred.resolve(data.data.RootServiceComponents.properties['user.inactivity.timeout.default']);
+        var properties = data.data.RootServiceComponents.properties;
+        var timeout = properties? properties['user.inactivity.timeout.default'] : 0;
+        deferred.resolve(timeout);
       })
       .catch(function(data) {
         deferred.reject(data);