]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12092 Fix broken empty portfolio display
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Fri, 21 Jun 2019 13:44:00 +0000 (15:44 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 28 Jun 2019 06:45:48 +0000 (08:45 +0200)
server/sonar-web/src/main/js/apps/portfolio/components/App.tsx
server/sonar-web/src/main/js/apps/portfolio/components/__tests__/__snapshots__/App-test.tsx.snap

index 433a00de531dcc244f8962d88ade9686f6613132..a24788c0bda519464216d604cfe91a8dfda5cb47 100644 (file)
@@ -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>
     );
   }
index 4691a613e06b208111fbdc7ea6af9c929f9d3b30..898a5bf3a71a1f271b05916b6518b736bf449588 100644 (file)
@@ -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>
 `;