Skip to content

Commit

Permalink
Bug 1460990 - show underlying username in several places where user m…
Browse files Browse the repository at this point in the history
…ay look
  • Loading branch information
jwforres committed Jun 15, 2017
1 parent 6e95ce2 commit 20af7f5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/scripts/extensions/nav/userDropdown.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';

angular.module('openshiftConsole')
.run(function(extensionRegistry) {
.run(function(extensionRegistry, $rootScope) {
extensionRegistry
.add('nav-user-dropdown', function() {
return [{
type: 'dom',
node: '<li><a href="logout">Log out</a></li>'
node: '<li><a href="logout">Log out (' + $rootScope.user.metadata.name + ')</a></li>'
}];
});
});
3 changes: 3 additions & 0 deletions app/views/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ <h2 id="version">Version</h2>
<p>With the OpenShift command line interface (CLI), you can create applications and manage OpenShift projects from a terminal. To get started using the CLI, visit <a href="command-line">Command Line Tools</a>.
</p>

<h2>Account</h2>
<p>Your are currently logged in under the user account <strong>{{user.metadata.name}}</strong>.</p>

</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/command-line.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h1 id="cli">Command Line Tools</h1>
</div>
</p>
<p>
After downloading and installing it, you can start by logging in using<span ng-if="sessionToken"> this current session token</span>:
After downloading and installing it, you can start by logging in. You are currently logged into this console as <strong>{{user.metadata.name}}</strong>. If you want to log into the CLI using the same session token:
<copy-to-clipboard display-wide="true" clipboard-text="'oc login ' + loginBaseURL + ' --token=' + sessionToken" input-text="'oc login ' + loginBaseURL + ' --token=<hidden>'"></copy-to-clipboard>
<pre class="code prettyprint ng-binding" ng-if="!sessionToken">
oc login {{loginBaseURL}}
Expand Down
4 changes: 2 additions & 2 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14838,11 +14838,11 @@ type:"dom",
node:'<li><a href="about">About</a></li>'
}), a;
});
} ]), angular.module("openshiftConsole").run([ "extensionRegistry", function(a) {
} ]), angular.module("openshiftConsole").run([ "extensionRegistry", "$rootScope", function(a, b) {
a.add("nav-user-dropdown", function() {
return [ {
type:"dom",
node:'<li><a href="logout">Log out</a></li>'
node:'<li><a href="logout">Log out (' + b.user.metadata.name + ")</a></li>"
} ];
});
} ]), angular.module("openshiftConsole").run([ "extensionRegistry", "Constants", function(a, b) {
Expand Down
4 changes: 3 additions & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<p>The <a target=\"_blank\" ng-href=\"{{'welcome' | helpLink}}\">documentation</a> helps you learn about OpenShift and start exploring its features. From getting started with creating your first application to trying out more advanced build and deployment techniques, it provides guidance on setting up and managing your OpenShift environment as an application developer.</p>\n" +
"<p>With the OpenShift command line interface (CLI), you can create applications and manage OpenShift projects from a terminal. To get started using the CLI, visit <a href=\"command-line\">Command Line Tools</a>.\n" +
"</p>\n" +
"<h2>Account</h2>\n" +
"<p>Your are currently logged in under the user account <strong>{{user.metadata.name}}</strong>.</p>\n" +
"</div>\n" +
"</div>\n" +
"</div>\n" +
Expand Down Expand Up @@ -4439,7 +4441,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</div>\n" +
"</p>\n" +
"<p>\n" +
"After downloading and installing it, you can start by logging in using<span ng-if=\"sessionToken\"> this current session token</span>:\n" +
"After downloading and installing it, you can start by logging in. You are currently logged into this console as <strong>{{user.metadata.name}}</strong>. If you want to log into the CLI using the same session token:\n" +
"<copy-to-clipboard display-wide=\"true\" clipboard-text=\"'oc login ' + loginBaseURL + ' --token=' + sessionToken\" input-text=\"'oc login ' + loginBaseURL + ' --token=<hidden>'\"></copy-to-clipboard>\n" +
"<pre class=\"code prettyprint ng-binding\" ng-if=\"!sessionToken\">\n" +
" oc login {{loginBaseURL}}\n" +
Expand Down

0 comments on commit 20af7f5

Please sign in to comment.