aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/issues
diff options
context:
space:
mode:
authorPascal Mugnier <pascal.mugnier@sonarsource.com>2018-04-11 14:32:57 +0200
committerSonarTech <sonartech@sonarsource.com>2018-04-17 20:20:47 +0200
commitb9d7623d0ce7d804f0c5a6dcfc476ae96c9b8518 (patch)
treecbde1c6db4914aca80dd68f4660300b54ad4bb90 /server/sonar-web/src/main/js/apps/issues
parentfebe5e5d486667bb8c523825285f1c22e4a48bb6 (diff)
downloadsonarqube-b9d7623d0ce7d804f0c5a6dcfc476ae96c9b8518.tar.gz
sonarqube-b9d7623d0ce7d804f0c5a6dcfc476ae96c9b8518.zip
GOV-288 Portfolio containing only provisioned projects is not 'empty'
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues')
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/App.tsx15
1 files changed, 13 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.tsx b/server/sonar-web/src/main/js/apps/issues/components/App.tsx
index 37e354aca8d..a433057b301 100644
--- a/server/sonar-web/src/main/js/apps/issues/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/issues/components/App.tsx
@@ -67,6 +67,7 @@ import {
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { RawQuery } from '../../../helpers/query';
import { scrollToElement } from '../../../helpers/scrolling';
+import EmptySearch from '../../../components/common/EmptySearch';
import Checkbox from '../../../components/controls/Checkbox';
import '../styles.css';
@@ -926,6 +927,17 @@ export default class App extends React.PureComponent<Props, State> {
return null;
}
+ let noIssuesMessage = null;
+ if (paging.total === 0) {
+ if (this.isFiltered()) {
+ noIssuesMessage = <EmptySearch />;
+ } else if (this.state.myIssues) {
+ noIssuesMessage = <NoMyIssues />;
+ } else {
+ noIssuesMessage = <NoIssues />;
+ }
+ }
+
return (
<div>
{paging.total > 0 && (
@@ -949,8 +961,7 @@ export default class App extends React.PureComponent<Props, State> {
<ListFooter count={issues.length} loadMore={this.fetchMoreIssues} total={paging.total} />
)}
- {paging.total === 0 &&
- (this.state.myIssues && !this.isFiltered() ? <NoMyIssues /> : <NoIssues />)}
+ {noIssuesMessage}
</div>
);
}