aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/background-tasks/components
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-11-29 17:03:24 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-12-07 14:36:18 +0100
commitf1976a3f56f03c67ccbf6dca7ee5060b6a21a1da (patch)
treef8741034e51ae45b37201e90a305ebb3802da7c7 /server/sonar-web/src/main/js/apps/background-tasks/components
parentb117943f3efa541d6c8cd8e62ad157c4f8194211 (diff)
downloadsonarqube-f1976a3f56f03c67ccbf6dca7ee5060b6a21a1da.tar.gz
sonarqube-f1976a3f56f03c67ccbf6dca7ee5060b6a21a1da.zip
SONAR-8451 Run js app outside of ruby container
Diffstat (limited to 'server/sonar-web/src/main/js/apps/background-tasks/components')
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js
index 0fa65014b61..94c5459e0fd 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js
@@ -17,11 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
- /* @flow */
+// @flow
import React from 'react';
import shallowCompare from 'react-addons-shallow-compare';
import debounce from 'lodash/debounce';
-
+import { connect } from 'react-redux';
import { DEFAULT_FILTERS, DEBOUNCE_DELAY, STATUSES, CURRENTS } from './../constants';
import Header from './Header';
import Footer from './Footer';
@@ -31,9 +31,10 @@ import Tasks from '../components/Tasks';
import { getTypes, getActivity, getStatus, cancelAllTasks, cancelTask as cancelTaskAPI } from '../../../api/ce';
import { updateTask, mapFiltersToParameters } from '../utils';
import { Task } from '../types';
+import { getComponent } from '../../../app/store/rootReducer';
import '../background-tasks.css';
-export default class BackgroundTasksApp extends React.Component {
+class BackgroundTasksApp extends React.Component {
static contextTypes = {
router: React.PropTypes.object.isRequired
};
@@ -229,3 +230,9 @@ export default class BackgroundTasksApp extends React.Component {
);
}
}
+
+const mapStateToProps = (state, ownProps) => ({
+ component: ownProps.location.query.id ? getComponent(state, ownProps.location.query.id) : undefined
+});
+
+export default connect(mapStateToProps)(BackgroundTasksApp);