From: Stas Vilchik Date: Wed, 20 Jan 2016 10:07:40 +0000 (+0100) Subject: display name of just created token X-Git-Tag: 5.4-M9~19 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0ae5844018f67dcdfc2c72251164b72048ba7392;p=sonarqube.git display name of just created token --- diff --git a/server/sonar-web/src/main/js/apps/account/templates/account-tokens.hbs b/server/sonar-web/src/main/js/apps/account/templates/account-tokens.hbs index 3b0d29d938b..faae3a4e20c 100644 --- a/server/sonar-web/src/main/js/apps/account/templates/account-tokens.hbs +++ b/server/sonar-web/src/main/js/apps/account/templates/account-tokens.hbs @@ -57,17 +57,17 @@ {{#if newToken}}
- 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!
- + - {{newToken}} + {{newToken.token}}
diff --git a/server/sonar-web/src/main/js/apps/account/tokens-view.js b/server/sonar-web/src/main/js/apps/account/tokens-view.js index 55beb5689bd..1a6f6b192d9 100644 --- a/server/sonar-web/src/main/js/apps/account/tokens-view.js +++ b/server/sonar-web/src/main/js/apps/account/tokens-view.js @@ -57,7 +57,7 @@ export default Marionette.ItemView.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 => { 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}}
- 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!
- + - {{newToken}} + {{newToken.token}}
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 => {