From 5413b494f1ea49e6eb30a7e46fd89a3e35fd567b Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 22 Feb 2016 16:59:53 +0100 Subject: refactor quality gates page --- .../src/main/js/apps/quality-gates/copy-view.js | 41 ---------------------- 1 file changed, 41 deletions(-) delete mode 100644 server/sonar-web/src/main/js/apps/quality-gates/copy-view.js (limited to 'server/sonar-web/src/main/js/apps/quality-gates/copy-view.js') diff --git a/server/sonar-web/src/main/js/apps/quality-gates/copy-view.js b/server/sonar-web/src/main/js/apps/quality-gates/copy-view.js deleted file mode 100644 index 638ca97eacc..00000000000 --- a/server/sonar-web/src/main/js/apps/quality-gates/copy-view.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import FormView from './form-view'; - -export default FormView.extend({ - method: 'copy', - - prepareRequest () { - const that = this; - const url = '/api/qualitygates/copy'; - const name = this.$('#quality-gate-form-name').val(); - const options = { - url, - data: { id: this.model.id, name } - }; - return this.sendRequest(options) - .done(function (r) { - const gate = that.addGate(r); - gate.trigger('select', gate); - }); - } -}); - - -- cgit v1.2.3