This is an automated email from the ASF dual-hosted git repository.
nixon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 4235fba ATLAS-3364 : UI: Compose logout url from Atlas base path (URI)
4235fba is described below
commit 4235fbaf6d774e3628b4b1b0e46d9530e0458d57
Author: kevalbhatt <[email protected]>
AuthorDate: Fri Aug 9 16:06:46 2019 +0530
ATLAS-3364 : UI: Compose logout url from Atlas base path (URI)
Signed-off-by: nixonrodrigues <[email protected]>
---
dashboardv2/public/js/templates/site/Header.html | 2 +-
dashboardv2/public/js/views/site/Header.js | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dashboardv2/public/js/templates/site/Header.html
b/dashboardv2/public/js/templates/site/Header.html
index d7b731d..8adc13f 100644
--- a/dashboardv2/public/js/templates/site/Header.html
+++ b/dashboardv2/public/js/templates/site/Header.html
@@ -44,7 +44,7 @@
<li class="aboutAtlas"><a
href="javascript:void(0)">About</a></li>
<li role="separator" class="divider"></li>
<li>
- <a href="logout.html"><i class="fa
fa-sign-out"></i>Logout</a>
+ <a data-id="signOut"
href="javascript:void(0)"><i class="fa fa-sign-out"></i>Logout</a>
</li>
</ul>
</td>
diff --git a/dashboardv2/public/js/views/site/Header.js
b/dashboardv2/public/js/views/site/Header.js
index 6ed42fb..b8ce4a8 100644
--- a/dashboardv2/public/js/views/site/Header.js
+++ b/dashboardv2/public/js/views/site/Header.js
@@ -33,7 +33,8 @@ define(['require',
backButton: "[data-id='backButton']",
menuHamburger: "[data-id='menuHamburger']",
globalSearch: "[data-id='globalSearch']",
- clearGlobalSearch: "[data-id='clearGlobalSearch']"
+ clearGlobalSearch: "[data-id='clearGlobalSearch']",
+ signOut: "[data-id='signOut']"
},
events: function() {
var events = {};
@@ -68,6 +69,10 @@ define(['require',
});
$('body').toggleClass("full-screen");
};
+ events['click ' + this.ui.signOut] = function() {
+ var path = Utils.getBaseUrl(window.location.pathname);
+ window.location = path + "/logout.html";
+ };
return events;
},