]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-11076 add more docs links and tool tips
authorPascal Mugnier <pascal.mugnier@sonarsource.com>
Fri, 27 Jul 2018 09:57:40 +0000 (11:57 +0200)
committerSonarTech <sonartech@sonarsource.com>
Thu, 2 Aug 2018 18:21:32 +0000 (20:21 +0200)
server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx
server/sonar-web/src/main/js/apps/securityReports/components/App.tsx
server/sonar-web/src/main/js/apps/securityReports/components/__tests__/__snapshots__/App-test.tsx.snap

index 88733a585e9c79cbf17465a5c1285a9c822dcf9f..0f1c8cc3a4935e2bdc90eb7099b0e892cb63d5e1 100644 (file)
@@ -123,7 +123,15 @@ export default class Conditions extends React.PureComponent<Props> {
           <table className="data zebra zebra-hover" id="quality-gate-conditions">
             <thead>
               <tr>
-                <th className="nowrap">{translate('quality_gates.conditions.metric')}</th>
+                <th className="nowrap">
+                  <div className="display-inline-flex-center">
+                    {translate('quality_gates.conditions.metric')}
+                    <DocTooltip
+                      className="spacer-left"
+                      doc={import(/* webpackMode: "eager" */ 'Docs/tooltips/quality-gates/metric.md')}
+                    />
+                  </div>
+                </th>
                 <th className="thin nowrap">{translate('quality_gates.conditions.leak')}</th>
                 <th className="thin nowrap">{translate('quality_gates.conditions.operator')}</th>
                 <th className="thin nowrap">{translate('quality_gates.conditions.warning')}</th>
index 1373fa0f309960722a8ba3f6eb2b08b432f8696a..4bfb1c02c774e85f283ed20ccbd77860a143724a 100644 (file)
@@ -19,6 +19,7 @@
  */
 import * as React from 'react';
 import * as PropTypes from 'prop-types';
+import { Link } from 'react-router';
 import CreateProfileForm from './CreateProfileForm';
 import RestoreProfileForm from './RestoreProfileForm';
 import { Profile } from '../types';
@@ -100,6 +101,12 @@ export default class PageHeader extends React.PureComponent<Props, State> {
           {translate('quality_profiles.intro1')}
           <br />
           {translate('quality_profiles.intro2')}
+          <Link
+            className="spacer-left"
+            target="_blank"
+            to={{ pathname: '/documentation/quality-profiles' }}>
+            {translate('learn_more')}
+          </Link>
         </div>
 
         {this.state.restoreFormOpen && (
index 2395da7da870e9fafe9ac766277554c92f4009d7..653f0ae26ffe35a9ecc123769e72761fcc42c171 100755 (executable)
@@ -20,6 +20,7 @@
 import * as React from 'react';
 import * as PropTypes from 'prop-types';
 import Helmet from 'react-helmet';
+import { Link } from 'react-router';
 import VulnerabilityList from './VulnerabilityList';
 import Suggestions from '../../../app/components/embed-docs-modal/Suggestions';
 import { translate } from '../../../helpers/l10n';
@@ -135,6 +136,12 @@ export default class App extends React.PureComponent<Props, State> {
           <h1 className="page-title">{translate('security_reports', type, 'page')}</h1>
           <div className="page-description">
             {translate('security_reports', type, 'description')}
+            <Link
+              className="spacer-left"
+              target="_blank"
+              to={{ pathname: '/documentation/security-reports' }}>
+              {translate('learn_more')}
+            </Link>
           </div>
         </header>
         <div className="display-inline-flex-center">
index b0059c48b8154c258466970c32e5b97b596ad700..7a82485d1b778655892c14f1db1d375f4b653044 100644 (file)
@@ -25,6 +25,19 @@ exports[`handle checkbox for cwe display 1`] = `
       className="page-description"
     >
       security_reports.owaspTop10.description
+      <Link
+        className="spacer-left"
+        onlyActiveOnIndex={false}
+        style={Object {}}
+        target="_blank"
+        to={
+          Object {
+            "pathname": "/documentation/security-reports",
+          }
+        }
+      >
+        learn_more
+      </Link>
     </div>
   </header>
   <div
@@ -95,6 +108,19 @@ exports[`handle checkbox for cwe display 2`] = `
       className="page-description"
     >
       security_reports.owaspTop10.description
+      <Link
+        className="spacer-left"
+        onlyActiveOnIndex={false}
+        style={Object {}}
+        target="_blank"
+        to={
+          Object {
+            "pathname": "/documentation/security-reports",
+          }
+        }
+      >
+        learn_more
+      </Link>
     </div>
   </header>
   <div
@@ -208,6 +234,19 @@ exports[`renders owaspTop10 1`] = `
       className="page-description"
     >
       security_reports.owaspTop10.description
+      <Link
+        className="spacer-left"
+        onlyActiveOnIndex={false}
+        style={Object {}}
+        target="_blank"
+        to={
+          Object {
+            "pathname": "/documentation/security-reports",
+          }
+        }
+      >
+        learn_more
+      </Link>
     </div>
   </header>
   <div
@@ -278,6 +317,19 @@ exports[`renders sansTop25 1`] = `
       className="page-description"
     >
       security_reports.sansTop25.description
+      <Link
+        className="spacer-left"
+        onlyActiveOnIndex={false}
+        style={Object {}}
+        target="_blank"
+        to={
+          Object {
+            "pathname": "/documentation/security-reports",
+          }
+        }
+      >
+        learn_more
+      </Link>
     </div>
   </header>
   <div
@@ -348,6 +400,19 @@ exports[`renders with cwe 1`] = `
       className="page-description"
     >
       security_reports.owaspTop10.description
+      <Link
+        className="spacer-left"
+        onlyActiveOnIndex={false}
+        style={Object {}}
+        target="_blank"
+        to={
+          Object {
+            "pathname": "/documentation/security-reports",
+          }
+        }
+      >
+        learn_more
+      </Link>
     </div>
   </header>
   <div