aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/background-tasks/views/ScannerContextView.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-08-22 13:20:05 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-08-23 11:42:54 +0200
commit87c95bc05d147ae016dd9ad5ea48961dec01de68 (patch)
treeaddb5a8ced219e8ed44b969723c749124ab8b8a5 /server/sonar-web/src/main/js/apps/background-tasks/views/ScannerContextView.js
parent502b4c6f0d3eca88237f9351f94c675203530184 (diff)
downloadsonarqube-87c95bc05d147ae016dd9ad5ea48961dec01de68.tar.gz
sonarqube-87c95bc05d147ae016dd9ad5ea48961dec01de68.zip
SONAR-7847 Add a way to see scanner context in the background page
Diffstat (limited to 'server/sonar-web/src/main/js/apps/background-tasks/views/ScannerContextView.js')
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/views/ScannerContextView.js47
1 files changed, 47 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/views/ScannerContextView.js b/server/sonar-web/src/main/js/apps/background-tasks/views/ScannerContextView.js
new file mode 100644
index 00000000000..21da975c6bb
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/background-tasks/views/ScannerContextView.js
@@ -0,0 +1,47 @@
+/*
+ * 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 Modal from '../../../components/common/modals';
+import Template from './ScannerContextView.hbs';
+import { getTask } from '../../../api/ce';
+
+export default Modal.extend({
+ template: Template,
+ className: 'modal modal-large',
+
+ initialize () {
+ this.scannerContext = null;
+ this.loadScannerContext();
+ },
+
+ loadScannerContext() {
+ getTask(this.options.task.id, ['scannerContext']).then(task => {
+ this.scannerContext = task.scannerContext;
+ this.render();
+ });
+ },
+
+ serializeData() {
+ return {
+ task: this.options.task,
+ scannerContext: this.scannerContext
+ };
+ }
+});
+