summaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-12-08 12:18:42 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-12-08 12:18:42 +0100
commitbf3e3086b732f27947b6ad8a1ecd91c70d27632f (patch)
treeb878a210fa791b05b8b1a382083e38c54b135d1b /server/sonar-web
parentbc42f31f26309e25ce11b1749a9134fb31ebf359 (diff)
downloadsonarqube-bf3e3086b732f27947b6ad8a1ecd91c70d27632f.tar.gz
sonarqube-bf3e3086b732f27947b6ad8a1ecd91c70d27632f.zip
fix background tasks page on a project level
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/search.js2
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/tasks.js2
-rw-r--r--server/sonar-web/tests/apps/background-tasks-test.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/search.js b/server/sonar-web/src/main/js/apps/background-tasks/search.js
index 92f9cc5d1a8..5d122b614ab 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/search.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/search.js
@@ -94,7 +94,7 @@ export default React.createClass({
},
renderSearchBox() {
- if (this.props.options.component) {
+ if (this.props.options && this.props.options.component) {
// do not render search form on the project-level page
return null;
}
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/tasks.js b/server/sonar-web/src/main/js/apps/background-tasks/tasks.js
index ffd4af2782d..54b05fa0eed 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/tasks.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/tasks.js
@@ -93,7 +93,7 @@ export default React.createClass({
},
renderFilter(task) {
- if (this.props.options.component) {
+ if (this.props.options && this.props.options.component) {
return null;
}
return <td className="thin nowrap">
diff --git a/server/sonar-web/tests/apps/background-tasks-test.js b/server/sonar-web/tests/apps/background-tasks-test.js
index 15ac381e2a0..9bc486c7d63 100644
--- a/server/sonar-web/tests/apps/background-tasks-test.js
+++ b/server/sonar-web/tests/apps/background-tasks-test.js
@@ -49,7 +49,7 @@ describe('Background Tasks', function () {
it('should not render search form', () => {
let spy = sinon.spy();
- let component = TestUtils.renderIntoDocument(<Search options={{ componentId: 'ABCD' }}
+ let component = TestUtils.renderIntoDocument(<Search options={{ component: { id: 'ABCD' } }}
onStatusChange={spy}
onCurrentsChange={spy}
onDateChange={spy}/>),