MAPREDUCE-2987. Fixed display of logged user on RM Web-UI. Contributed by Thomas Graves.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1171901 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2011-09-17 05:52:49 +00:00
parent 9a11a3a0b3
commit 2eab7a28c7
2 changed files with 8 additions and 1 deletions

View File

@ -1336,6 +1336,9 @@ Release 0.23.0 - Unreleased
MAPREDUCE-3007. Fixed Yarn Mapreduce client to be able to connect to
JobHistoryServer in secure mode. (vinodkv)
MAPREDUCE-2987. Fixed display of logged user on RM Web-UI. (Thomas Graves
via acmurthy)
Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES

View File

@ -23,10 +23,14 @@ import static org.apache.hadoop.yarn.webapp.Params.*;
public class HeaderBlock extends HtmlBlock {
@Override protected void render(Block html) {
String loggedIn = "";
if (request().getRemoteUser() != null) {
loggedIn = "Logged in as: " + request().getRemoteUser();
}
html.
div("#header.ui-widget").
div("#user").
_("Logged in as: "+ request().getRemoteUser())._().
_(loggedIn)._().
div("#logo").
img("/static/hadoop-st.png")._().
h1($(TITLE))._();