@@ -20,10 +20,13 @@ | |||
import classNames from 'classnames'; | |||
import { orderBy } from 'lodash'; | |||
import * as React from 'react'; | |||
import { FormattedMessage } from 'react-intl'; | |||
import { getBranches } from '../../../../../../api/branches'; | |||
import { getRegulatoryReportUrl } from '../../../../../../api/regulatory-report'; | |||
import DocLink from '../../../../../../components/common/DocLink'; | |||
import { ButtonLink } from '../../../../../../components/controls/buttons'; | |||
import Select, { LabelValueSelectOption } from '../../../../../../components/controls/Select'; | |||
import { Alert } from '../../../../../../components/ui/Alert'; | |||
import { | |||
getBranchLikeDisplayName, | |||
isBranch, | |||
@@ -123,6 +126,24 @@ export default class RegulatoryReport extends React.PureComponent<Props, State> | |||
value={branchLikesOptions.find((o) => o.value === selectedBranch)} | |||
/> | |||
</div> | |||
<Alert variant="info"> | |||
<div> | |||
{translate('regulatory_page.available_branches_info.only_keep_when_inactive')} | |||
</div> | |||
<div> | |||
<FormattedMessage | |||
id="regulatory_page.available_branches_info.more_info" | |||
defaultMessage={translate('regulatory_page.available_branches_info.more_info')} | |||
values={{ | |||
doc_link: ( | |||
<DocLink to="/analyzing-source-code/branches/branch-analysis/#inactive-branches"> | |||
{translate('regulatory_page.available_branches_info.more_info.doc_link')} | |||
</DocLink> | |||
), | |||
}} | |||
/> | |||
</div> | |||
</Alert> | |||
<div className="modal-field big-spacer-top"> | |||
{downloadStarted && ( | |||
<div> |
@@ -40,6 +40,10 @@ it('should open the regulatory report page', async () => { | |||
expect(await screen.findByText('regulatory_report.page')).toBeInTheDocument(); | |||
expect(screen.getByText('regulatory_report.description1')).toBeInTheDocument(); | |||
expect(screen.getByText('regulatory_report.description2')).toBeInTheDocument(); | |||
expect( | |||
screen.getByText('regulatory_page.available_branches_info.only_keep_when_inactive') | |||
).toBeInTheDocument(); | |||
expect(screen.getByText('regulatory_page.available_branches_info.more_info')).toBeInTheDocument(); | |||
const branchSelect = screen.getByRole('combobox', { name: 'regulatory_page.select_branch' }); | |||
expect(branchSelect).toBeInTheDocument(); |
@@ -675,6 +675,9 @@ regulatory_report.bullet_point3=Lists of findings for both new and overall code | |||
regulatory_report.description2=The generation and download of the report may take a few minutes. | |||
regulatory_page.download_start.sentence=Your download should start shortly. This may take some time. | |||
regulatory_page.select_branch=Select Branch | |||
regulatory_page.available_branches_info.only_keep_when_inactive=Only branches marked as "Keep when inactive" are available. | |||
regulatory_page.available_branches_info.more_info=For further details, please check the {doc_link}. | |||
regulatory_page.available_branches_info.more_info.doc_link=related documentation | |||
#------------------------------------------------------------------------------ | |||
# |