From 0ae5844018f67dcdfc2c72251164b72048ba7392 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Wed, 20 Jan 2016 11:07:40 +0100 Subject: [PATCH] display name of just created token --- .../src/main/js/apps/account/templates/account-tokens.hbs | 6 +++--- server/sonar-web/src/main/js/apps/account/tokens-view.js | 2 +- .../src/main/js/apps/users/templates/users-tokens.hbs | 6 +++--- server/sonar-web/src/main/js/apps/users/tokens-view.js | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) 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 => { -- 2.39.5