From 4f4d0e0fc29c156393c42fd179495db301a928d0 Mon Sep 17 00:00:00 2001 From: Pascal Mugnier Date: Fri, 27 Jul 2018 11:57:40 +0200 Subject: [PATCH] SONAR-11076 add more docs links and tool tips --- .../quality-gates/components/Conditions.tsx | 10 ++- .../apps/quality-profiles/home/PageHeader.tsx | 7 ++ .../apps/securityReports/components/App.tsx | 7 ++ .../__tests__/__snapshots__/App-test.tsx.snap | 65 +++++++++++++++++++ 4 files changed, 88 insertions(+), 1 deletion(-) diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx index 88733a585e9..0f1c8cc3a49 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx @@ -123,7 +123,15 @@ export default class Conditions extends React.PureComponent { - + diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx index 1373fa0f309..4bfb1c02c77 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx @@ -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 { {translate('quality_profiles.intro1')}
{translate('quality_profiles.intro2')} + + {translate('learn_more')} + {this.state.restoreFormOpen && ( diff --git a/server/sonar-web/src/main/js/apps/securityReports/components/App.tsx b/server/sonar-web/src/main/js/apps/securityReports/components/App.tsx index 2395da7da87..653f0ae26ff 100755 --- a/server/sonar-web/src/main/js/apps/securityReports/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/securityReports/components/App.tsx @@ -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 {

{translate('security_reports', type, 'page')}

{translate('security_reports', type, 'description')} + + {translate('learn_more')} +
diff --git a/server/sonar-web/src/main/js/apps/securityReports/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/securityReports/components/__tests__/__snapshots__/App-test.tsx.snap index b0059c48b81..7a82485d1b7 100644 --- a/server/sonar-web/src/main/js/apps/securityReports/components/__tests__/__snapshots__/App-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/securityReports/components/__tests__/__snapshots__/App-test.tsx.snap @@ -25,6 +25,19 @@ exports[`handle checkbox for cwe display 1`] = ` className="page-description" > security_reports.owaspTop10.description + + learn_more +
security_reports.owaspTop10.description + + learn_more +
security_reports.owaspTop10.description + + learn_more +
security_reports.sansTop25.description + + learn_more +
security_reports.owaspTop10.description + + learn_more +
{translate('quality_gates.conditions.metric')} +
+ {translate('quality_gates.conditions.metric')} + +
+
{translate('quality_gates.conditions.leak')} {translate('quality_gates.conditions.operator')} {translate('quality_gates.conditions.warning')}