aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/account
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-12-29 11:37:28 +0100
committerGitHub <noreply@github.com>2016-12-29 11:37:28 +0100
commitc85948205409283fa7dec4ab1db9764acc0d3ce9 (patch)
treeb4fbd692e4ce6cc93ccf417173242398adecf9c1 /server/sonar-web/src/main/js/apps/account
parent5595c2f862cca1d07312c9219013f836e45a5f90 (diff)
downloadsonarqube-c85948205409283fa7dec4ab1db9764acc0d3ce9.tar.gz
sonarqube-c85948205409283fa7dec4ab1db9764acc0d3ce9.zip
remove explicit _ and $ dependecies (#1487)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/account')
-rw-r--r--server/sonar-web/src/main/js/apps/account/tokens-view.js8
1 files changed, 4 insertions, 4 deletions
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 5ba74f49104..46757ec4486 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
@@ -18,7 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import $ from 'jquery';
-import _ from 'underscore';
import Marionette from 'backbone.marionette';
import Clipboard from 'clipboard';
import Template from './templates/account-tokens.hbs';
@@ -69,7 +68,7 @@ export default Marionette.ItemView.extend({
onRevokeTokenFormSubmit (e) {
e.preventDefault();
const tokenName = $(e.currentTarget).data('token');
- const token = _.findWhere(this.tokens, { name: `${tokenName}` });
+ const token = this.tokens.find(token => token.name === `${tokenName}`);
if (token) {
if (token.deleting) {
revokeToken(this.model.id, tokenName).then(this.requestTokens.bind(this));
@@ -93,11 +92,12 @@ export default Marionette.ItemView.extend({
},
serializeData () {
- return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), {
+ return {
+ ...Marionette.ItemView.prototype.serializeData.apply(this, arguments),
tokens: this.tokens,
newToken: this.newToken,
errors: this.errors
- });
+ };
}
});