aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/portfolio
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2019-06-21 15:44:00 +0200
committersonartech <sonartech@sonarsource.com>2019-06-28 08:45:48 +0200
commit36a2571ece01e51f104523ed98f43e6f27f03f75 (patch)
tree47fd875e4013f6bdc0105a27ce5ca0d6a88ac22d /server/sonar-web/src/main/js/apps/portfolio
parentb441258d1f170791208c001f1fd25bbd8f59e0ff (diff)
downloadsonarqube-36a2571ece01e51f104523ed98f43e6f27f03f75.tar.gz
sonarqube-36a2571ece01e51f104523ed98f43e6f27f03f75.zip
SONAR-12092 Fix broken empty portfolio display
Diffstat (limited to 'server/sonar-web/src/main/js/apps/portfolio')
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/App.tsx20
-rw-r--r--server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/App-test.tsx.snap24
2 files changed, 28 insertions, 16 deletions
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx
index 433a00de531..a24788c0bda 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx
@@ -118,20 +118,24 @@ export class App extends React.PureComponent<Props, State> {
renderEmpty() {
return (
- <div className="empty-search">
- <h3>
- {!this.state.measures || !this.state.measures['projects']
- ? translate('portfolio.empty')
- : translate('portfolio.no_lines_of_code')}
- </h3>
+ <div className="page page-limited">
+ <div className="empty-search">
+ <h3>
+ {!this.state.measures || !this.state.measures['projects']
+ ? translate('portfolio.empty')
+ : translate('portfolio.no_lines_of_code')}
+ </h3>
+ </div>
</div>
);
}
renderWhenNotComputed() {
return (
- <div className="empty-search">
- <h3>{translate('portfolio.not_computed')}</h3>
+ <div className="page page-limited">
+ <div className="empty-search">
+ <h3>{translate('portfolio.not_computed')}</h3>
+ </div>
</div>
);
}
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/App-test.tsx.snap
index 4691a613e06..898a5bf3a71 100644
--- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -148,20 +148,28 @@ exports[`renders 1`] = `
exports[`renders when portfolio is empty 1`] = `
<div
- className="empty-search"
+ className="page page-limited"
>
- <h3>
- portfolio.empty
- </h3>
+ <div
+ className="empty-search"
+ >
+ <h3>
+ portfolio.empty
+ </h3>
+ </div>
</div>
`;
exports[`renders when portfolio is not computed 1`] = `
<div
- className="empty-search"
+ className="page page-limited"
>
- <h3>
- portfolio.not_computed
- </h3>
+ <div
+ className="empty-search"
+ >
+ <h3>
+ portfolio.not_computed
+ </h3>
+ </div>
</div>
`;