aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/users
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-01-20 11:07:40 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-01-20 11:07:40 +0100
commit0ae5844018f67dcdfc2c72251164b72048ba7392 (patch)
tree0a5fcfc52ff8090c4a96ed7572732b41c6ab5554 /server/sonar-web/src/main/js/apps/users
parentf59c1f35ccfc62df60dc97a7290c8416852ad234 (diff)
downloadsonarqube-0ae5844018f67dcdfc2c72251164b72048ba7392.tar.gz
sonarqube-0ae5844018f67dcdfc2c72251164b72048ba7392.zip
display name of just created token
Diffstat (limited to 'server/sonar-web/src/main/js/apps/users')
-rw-r--r--server/sonar-web/src/main/js/apps/users/templates/users-tokens.hbs6
-rw-r--r--server/sonar-web/src/main/js/apps/users/tokens-view.js2
2 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/users/templates/users-tokens.hbs b/server/sonar-web/src/main/js/apps/users/templates/users-tokens.hbs
index 2cadb3a1437..e520db60f5a 100644
--- a/server/sonar-web/src/main/js/apps/users/templates/users-tokens.hbs
+++ b/server/sonar-web/src/main/js/apps/users/templates/users-tokens.hbs
@@ -62,17 +62,17 @@
{{#if newToken}}
<div class="panel panel-white big-spacer-top">
<div class="alert alert-warning">
- Make sure you copy the token now. You won’t be able to see it again!
+ New token "{{newToken.name}}" has been created. Make sure you copy it now, you won’t be able to see it again!
</div>
<table class="data">
<tr>
<td class="thin">
- <button class="js-copy-to-clipboard" data-clipboard-text="{{newToken}}">Copy</button>
+ <button class="js-copy-to-clipboard" data-clipboard-text="{{newToken.token}}">Copy</button>
</td>
<td class="nowrap">
- <code class="text-success">{{newToken}}</code>
+ <code class="text-success">{{newToken.token}}</code>
</td>
</tr>
</table>
diff --git a/server/sonar-web/src/main/js/apps/users/tokens-view.js b/server/sonar-web/src/main/js/apps/users/tokens-view.js
index 56c0b8e16f4..12989a52a52 100644
--- a/server/sonar-web/src/main/js/apps/users/tokens-view.js
+++ b/server/sonar-web/src/main/js/apps/users/tokens-view.js
@@ -58,7 +58,7 @@ export default Modal.extend({
let tokenName = this.$('.js-generate-token-form input').val();
generateToken(this.model.id, tokenName)
.then(response => {
- this.newToken = response.token;
+ this.newToken = response;
this.requestTokens();
})
.catch(error => {