diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-12-08 12:18:42 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-12-08 12:18:42 +0100 |
commit | bf3e3086b732f27947b6ad8a1ecd91c70d27632f (patch) | |
tree | b878a210fa791b05b8b1a382083e38c54b135d1b /server/sonar-web | |
parent | bc42f31f26309e25ce11b1749a9134fb31ebf359 (diff) | |
download | sonarqube-bf3e3086b732f27947b6ad8a1ecd91c70d27632f.tar.gz sonarqube-bf3e3086b732f27947b6ad8a1ecd91c70d27632f.zip |
fix background tasks page on a project level
Diffstat (limited to 'server/sonar-web')
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}/>), |