const statusOptions: Array<{ label: string; value: string }> = [
{ value: HotspotStatusFilter.TO_REVIEW, label: translate('hotspot.filters.status.to_review') },
+ {
+ value: HotspotStatusFilter.ACKNOWLEDGED,
+ label: translate('hotspot.filters.status.acknowledged')
+ },
{ value: HotspotStatusFilter.FIXED, label: translate('hotspot.filters.status.fixed') },
{ value: HotspotStatusFilter.SAFE, label: translate('hotspot.filters.status.safe') }
];
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import classNames from 'classnames';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { Button, ButtonLink } from '../../../components/controls/buttons';
return (
<Modal contentLabel={modalTitle}>
- <div className="modal-head">
- <h2
- className={classNames('huge text-normal', {
- 'text-success': closingHotspots
- })}>
- {modalTitle}
- </h2>
+ <div className="modal-head huge text-center text-bold">
+ <p>{translateWithParameters('hotspots.successful_status_change_to_x', statusLabel)}</p>
</div>
- <div className="modal-body">
+ <div className="modal-body text-center big">
<FormattedMessage
id="hotspots.successfully_changed_to_x"
- defaultMessage={translate('hotspots.successfully_changed_to_x')}
+ defaultMessage={translate('hotspots.find_in_status_filter_x')}
values={{
- status_label: statusLabel,
- status_change: (
- <strong>
- {translateWithParameters('hotspots.successful_status_change_to_x', statusLabel)}
- </strong>
- )
+ status_label: <strong>{statusLabel}</strong>
}}
/>
{closingHotspots && (
<ButtonLink onClick={props.onSwitchFilterToStatusOfUpdatedHotspot}>
{translateWithParameters('hotspots.see_x_hotspots', statusLabel)}
</ButtonLink>
- <Button className="button-primary padded" onClick={props.onClose}>
+ <Button className="button padded" onClick={props.onClose}>
{translate('hotspots.continue_to_next_hotspot')}
</Button>
</div>
"label": "hotspot.filters.status.to_review",
"value": "TO_REVIEW",
},
+ Object {
+ "label": "hotspot.filters.status.acknowledged",
+ "value": "ACKNOWLEDGED",
+ },
Object {
"label": "hotspot.filters.status.fixed",
"value": "FIXED",
"label": "hotspot.filters.status.to_review",
"value": "TO_REVIEW",
},
+ Object {
+ "label": "hotspot.filters.status.acknowledged",
+ "value": "ACKNOWLEDGED",
+ },
Object {
"label": "hotspot.filters.status.fixed",
"value": "FIXED",
"label": "hotspot.filters.status.to_review",
"value": "TO_REVIEW",
},
+ Object {
+ "label": "hotspot.filters.status.acknowledged",
+ "value": "ACKNOWLEDGED",
+ },
Object {
"label": "hotspot.filters.status.fixed",
"value": "FIXED",
"label": "hotspot.filters.status.to_review",
"value": "TO_REVIEW",
},
+ Object {
+ "label": "hotspot.filters.status.acknowledged",
+ "value": "ACKNOWLEDGED",
+ },
Object {
"label": "hotspot.filters.status.fixed",
"value": "FIXED",
"label": "hotspot.filters.status.to_review",
"value": "TO_REVIEW",
},
+ Object {
+ "label": "hotspot.filters.status.acknowledged",
+ "value": "ACKNOWLEDGED",
+ },
Object {
"label": "hotspot.filters.status.fixed",
"value": "FIXED",
contentLabel="hotspots.congratulations"
>
<div
- className="modal-head"
+ className="modal-head huge text-center text-bold"
>
- <h2
- className="huge text-normal text-success"
- >
- hotspots.congratulations
- </h2>
+ <p>
+ hotspots.successful_status_change_to_x.hotspots.status_option.FIXED
+ </p>
</div>
<div
- className="modal-body"
+ className="modal-body text-center big"
>
<FormattedMessage
- defaultMessage="hotspots.successfully_changed_to_x"
+ defaultMessage="hotspots.find_in_status_filter_x"
id="hotspots.successfully_changed_to_x"
values={
Object {
- "status_change": <strong>
- hotspots.successful_status_change_to_x.hotspots.status_option.FIXED
+ "status_label": <strong>
+ hotspots.status_option.FIXED
</strong>,
- "status_label": "hotspots.status_option.FIXED",
}
}
/>
hotspots.see_x_hotspots.hotspots.status_option.FIXED
</ButtonLink>
<Button
- className="button-primary padded"
+ className="button padded"
onClick={[MockFunction]}
>
hotspots.continue_to_next_hotspot
contentLabel="hotspots.update.success"
>
<div
- className="modal-head"
+ className="modal-head huge text-center text-bold"
>
- <h2
- className="huge text-normal"
- >
- hotspots.update.success
- </h2>
+ <p>
+ hotspots.successful_status_change_to_x.hotspots.status_option.TO_REVIEW
+ </p>
</div>
<div
- className="modal-body"
+ className="modal-body text-center big"
>
<FormattedMessage
- defaultMessage="hotspots.successfully_changed_to_x"
+ defaultMessage="hotspots.find_in_status_filter_x"
id="hotspots.successfully_changed_to_x"
values={
Object {
- "status_change": <strong>
- hotspots.successful_status_change_to_x.hotspots.status_option.TO_REVIEW
+ "status_label": <strong>
+ hotspots.status_option.TO_REVIEW
</strong>,
- "status_label": "hotspots.status_option.TO_REVIEW",
}
}
/>
hotspots.see_x_hotspots.hotspots.status_option.TO_REVIEW
</ButtonLink>
<Button
- className="button-primary padded"
+ className="button padded"
onClick={[MockFunction]}
>
hotspots.continue_to_next_hotspot
<div className="abs-width-400">
<div className="big-padded">
{renderOption(HotspotStatusOption.TO_REVIEW)}
+ {renderOption(HotspotStatusOption.ACKNOWLEDGED)}
{renderOption(HotspotStatusOption.FIXED)}
{renderOption(HotspotStatusOption.SAFE)}
</div>
statusOption="TO_REVIEW"
/>
</Radio>
+ <Radio
+ checked={false}
+ className="big-spacer-bottom"
+ onCheck={[MockFunction]}
+ value="ACKNOWLEDGED"
+ >
+ <StatusDescription
+ statusOption="ACKNOWLEDGED"
+ />
+ </Radio>
<Radio
checked={false}
className="big-spacer-bottom"
statusOption="TO_REVIEW"
/>
</Radio>
+ <Radio
+ checked={false}
+ className="big-spacer-bottom"
+ onCheck={[MockFunction]}
+ value="ACKNOWLEDGED"
+ >
+ <StatusDescription
+ statusOption="ACKNOWLEDGED"
+ />
+ </Radio>
<Radio
checked={false}
className="big-spacer-bottom"
const STATUS_AND_RESOLUTION_TO_STATUS_OPTION = {
[HotspotStatus.TO_REVIEW]: HotspotStatusOption.TO_REVIEW,
[HotspotStatus.REVIEWED]: HotspotStatusOption.FIXED,
+ [HotspotResolution.ACKNOWLEDGED]: HotspotStatusOption.ACKNOWLEDGED,
[HotspotResolution.FIXED]: HotspotStatusOption.FIXED,
[HotspotResolution.SAFE]: HotspotStatusOption.SAFE
};
const STATUS_OPTION_TO_STATUS_AND_RESOLUTION_MAP = {
[HotspotStatusOption.TO_REVIEW]: { status: HotspotStatus.TO_REVIEW, resolution: undefined },
+ [HotspotStatusOption.ACKNOWLEDGED]: {
+ status: HotspotStatus.REVIEWED,
+ resolution: HotspotResolution.ACKNOWLEDGED
+ },
[HotspotStatusOption.FIXED]: {
status: HotspotStatus.REVIEWED,
resolution: HotspotResolution.FIXED
const STATUS_OPTION_TO_STATUS_FILTER = {
[HotspotStatusOption.TO_REVIEW]: HotspotStatusFilter.TO_REVIEW,
+ [HotspotStatusOption.ACKNOWLEDGED]: HotspotStatusFilter.ACKNOWLEDGED,
[HotspotStatusOption.FIXED]: HotspotStatusFilter.FIXED,
[HotspotStatusOption.SAFE]: HotspotStatusFilter.SAFE
};
export enum HotspotResolution {
FIXED = 'FIXED',
- SAFE = 'SAFE'
+ SAFE = 'SAFE',
+ ACKNOWLEDGED = 'ACKNOWLEDGED'
}
export enum HotspotStatusFilter {
FIXED = 'FIXED',
SAFE = 'SAFE',
- TO_REVIEW = 'TO_REVIEW'
+ TO_REVIEW = 'TO_REVIEW',
+ ACKNOWLEDGED = 'ACKNOWLEDGED'
}
export enum HotspotStatusOption {
FIXED = 'FIXED',
SAFE = 'SAFE',
- TO_REVIEW = 'TO_REVIEW'
+ TO_REVIEW = 'TO_REVIEW',
+ ACKNOWLEDGED = 'ACKNOWLEDGED'
}
export interface HotspotFilters {
hotspots.learn_more=Learn more about Security Hotspots
hotspots.list_title={0} Security Hotspots
hotspots.list_title.TO_REVIEW={0} Security Hotspots to review
+hotspots.list_title.ACKNOWLEDGED={0} Security Hotspots reviewed as acknowledged
hotspots.list_title.FIXED={0} Security Hotspots reviewed as fixed
hotspots.list_title.SAFE={0} Security Hotspots reviewed as safe
hotspots.risk_exposure=Review priority
hotspots.status.add_comment=Add a comment (Optional)
hotspots.status.change_status=Change status
hotspots.status_option.TO_REVIEW=To review
-hotspots.status_option.TO_REVIEW.description=This Security Hotspot needs to be reviewed to assess whether the code poses a risk.
+hotspots.status_option.TO_REVIEW.description=This security hotspot needs to be reviewed to assess whether the code poses a risk.
+hotspots.status_option.ACKNOWLEDGED=Acknowledged
+hotspots.status_option.ACKNOWLEDGED.description=The code has been reviewed and does pose a risk. A fix is required.
hotspots.status_option.FIXED=Fixed
-hotspots.status_option.FIXED.description=The code has been modified to follow recommended secure coding practices.
+hotspots.status_option.FIXED.description=The code has been reviewed and modified to follow the recommended secure coding practices.
hotspots.status_option.SAFE=Safe
-hotspots.status_option.SAFE.description=The code is not at risk and doesn't need to be modified.
+hotspots.status_option.SAFE.description=The code has been reviewed and does not pose a risk. It does not need to be modified.
hotspots.get_permalink=Get Permalink
hotspots.no_associated_lines=Security Hotspot raised on the following file:
hotspots.congratulations=Congratulations!
-hotspots.successfully_changed_to_x=The Security Hotspot was {status_change}. You can find it by changing the top filter to display "{status_label}" Security Hotspots.
-hotspots.successful_status_change_to_x=successfully changed to "{0}"
+hotspots.find_in_status_filter_x= You can find it again by setting status filter to {status_label}.
+hotspots.successful_status_change_to_x=The Security Hotspot was successfully changed to {0}.
hotspots.x_done_keep_going={percentage} of the Security Hotspots have been reviewed, keep going!
hotspots.see_x_hotspots=See "{0}" Security Hotspots
-hotspots.continue_to_next_hotspot=Continue reviewing next Security Hotspot
+hotspots.continue_to_next_hotspot=Continue Reviewing
hotspot.filters.title=Filters
hotspot.filters.assignee.assigned_to_me=Assigned to me
hotspot.filters.assignee.all=All
hotspot.filters.status.to_review=To review
-hotspot.filters.status.fixed=Reviewed as fixed
+hotspot.filters.status.acknowledged=Acknowledged
+hotspot.filters.status.fixed=Fixed
hotspot.filters.period.since_leak_period=New code
hotspot.filters.period.overall=Overall code
-hotspot.filters.status.safe=Reviewed as safe
+hotspot.filters.status.safe=Safe
hotspot.filters.show_all=Show all hotspots
hotspot.section.activity=Recent activity:
-hotspots.reviewed.tooltip=Percentage of Security Hotspots reviewed (fixed or safe) among all non-closed Security Hotspots.
+hotspots.reviewed.tooltip=Percentage of Security Hotspots reviewed (Acknowledged, Fixed or Safe) among all non-closed Security Hotspots.
hotspots.review_hotspot=Review Hotspot
hotspots.assign.success=Security Hotspot was successfully assigned to {0}