diff options
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); + }); + } }); + + |