diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-09-17 16:15:28 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-09-18 10:47:27 +0200 |
commit | 890ab0b59cdb3902f4869eabf8ca534814f1b3dd (patch) | |
tree | 0ed74726957e590f6506e378366ea15bf21bfcbd /server/sonar-web/src/main/js/apps/quality-gates/create-view.js | |
parent | ce60ac8d2e137f33bb111668e54e78c195c73d79 (diff) | |
download | sonarqube-890ab0b59cdb3902f4869eabf8ca534814f1b3dd.tar.gz sonarqube-890ab0b59cdb3902f4869eabf8ca534814f1b3dd.zip |
migrate js apps to es2015 modules
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-gates/create-view.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/quality-gates/create-view.js | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/create-view.js b/server/sonar-web/src/main/js/apps/quality-gates/create-view.js index f58863ba315..4adbd45552b 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/create-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/create-view.js @@ -1,24 +1,22 @@ -define([ - './form-view' -], function (FormView) { +import FormView from './form-view'; - return FormView.extend({ - method: 'create', - - prepareRequest: function () { - var that = this; - var url = baseUrl + '/api/qualitygates/create', - name = this.$('#quality-gate-form-name').val(), - options = { - url: url, - data: { name: name } - }; - return this.sendRequest(options) - .done(function (r) { - var gate = that.addGate(r); - gate.trigger('select', gate); - }); - } - }); +export default FormView.extend({ + method: 'create', + prepareRequest: function () { + var that = this; + var url = baseUrl + '/api/qualitygates/create', + name = this.$('#quality-gate-form-name').val(), + options = { + url: url, + data: { name: name } + }; + return this.sendRequest(options) + .done(function (r) { + var gate = that.addGate(r); + gate.trigger('select', gate); + }); + } }); + + |