]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13129 Remove Quality Gate and Quality Profiles from Applications information
authorJeremy Davis <jeremy.davis@sonarsource.com>
Wed, 26 Feb 2020 12:54:50 +0000 (13:54 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 28 Feb 2020 20:04:11 +0000 (20:04 +0000)
server/sonar-web/src/main/js/app/components/nav/component/projectInformation/ProjectInformationRenderer.tsx
server/sonar-web/src/main/js/app/components/nav/component/projectInformation/__tests__/__snapshots__/ProjectInformationRenderer-test.tsx.snap

index 4bee5cdeac68e89431aa042b2482b5d1ad0fb0ad..1aff0f9cf33d0cfce55bf90e8c131d356e9ab7b5 100644 (file)
@@ -79,21 +79,22 @@ export function ProjectInformationRenderer(props: ProjectInformationRendererProp
           <MetaSize component={component} measures={measures} />
         </div>
 
-        {(component.qualityGate ||
-          (component.qualityProfiles && component.qualityProfiles.length > 0)) && (
-          <>
-            <div className="big-padded bordered-bottom">
-              {component.qualityGate && <MetaQualityGate qualityGate={component.qualityGate} />}
+        {!isApp &&
+          (component.qualityGate ||
+            (component.qualityProfiles && component.qualityProfiles.length > 0)) && (
+            <>
+              <div className="big-padded bordered-bottom">
+                {component.qualityGate && <MetaQualityGate qualityGate={component.qualityGate} />}
 
-              {component.qualityProfiles && component.qualityProfiles.length > 0 && (
-                <MetaQualityProfiles
-                  headerClassName={component.qualityGate ? 'big-spacer-top' : undefined}
-                  profiles={component.qualityProfiles}
-                />
-              )}
-            </div>
-          </>
-        )}
+                {component.qualityProfiles && component.qualityProfiles.length > 0 && (
+                  <MetaQualityProfiles
+                    headerClassName={component.qualityGate ? 'big-spacer-top' : undefined}
+                    profiles={component.qualityProfiles}
+                  />
+                )}
+              </div>
+            </>
+          )}
 
         {!isApp && <MetaLinks component={component} />}
 
index f1d2b875e965fc7ae580b1909542b8ce119dd638..d071690097a5984b430522ffb1f1df8383e7af4b 100644 (file)
@@ -303,32 +303,6 @@ exports[`should render an app correctly: default 1`] = `
         measures={Array []}
       />
     </div>
-    <div
-      className="big-padded bordered-bottom"
-    >
-      <MetaQualityGate
-        qualityGate={
-          Object {
-            "isDefault": true,
-            "key": "30",
-            "name": "Sonar way",
-          }
-        }
-      />
-      <Connect(MetaQualityProfiles)
-        headerClassName="big-spacer-top"
-        profiles={
-          Array [
-            Object {
-              "deleted": false,
-              "key": "my-qp",
-              "language": "ts",
-              "name": "Sonar way",
-            },
-          ]
-        }
-      />
-    </div>
     <div
       className="big-padded bordered-bottom"
     >