-
{message}
+
+
+
{rule.name}
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.css b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.css
index 3ac44e26a5e..8dbb2909014 100644
--- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.css
+++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.css
@@ -116,3 +116,12 @@
.hotspot-box-filename {
direction: rtl;
}
+
+.hotspot-header .issue-message-highlight-CODE {
+ background-color: var(--blacka06);
+ border-radius: 5px;
+}
+
+.hotspot-item .issue-message-highlight-CODE {
+ background-color: var(--blacka06);
+}
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListItem.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListItem.tsx
index df0e499d2e6..260e71d489d 100644
--- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListItem.tsx
+++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListItem.tsx
@@ -21,6 +21,7 @@ import classNames from 'classnames';
import * as React from 'react';
import { ButtonPlain } from '../../../components/controls/buttons';
import QualifierIcon from '../../../components/icons/QualifierIcon';
+import { IssueMessageHighlighting } from '../../../components/issue/IssueMessageHighlighting';
import LocationsList from '../../../components/locations/LocationsList';
import { ComponentQualifier } from '../../../types/component';
import { RawHotspot } from '../../../types/security-hotspots';
@@ -51,7 +52,10 @@ export default function HotspotListItem(props: HotspotListItemProps) {
className={classNames('little-spacer-left text-bold', { 'cursor-pointer': selected })}
onClick={selected ? () => props.onLocationClick() : undefined}
>
- {hotspot.message}
+
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotPrimaryLocationBox.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotPrimaryLocationBox.tsx
index bc297c01249..d9e6e798565 100644
--- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotPrimaryLocationBox.tsx
+++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotPrimaryLocationBox.tsx
@@ -21,6 +21,7 @@ import classNames from 'classnames';
import * as React from 'react';
import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext';
import { ButtonLink } from '../../../components/controls/buttons';
+import { IssueMessageHighlighting } from '../../../components/issue/IssueMessageHighlighting';
import { translate } from '../../../helpers/l10n';
import { Hotspot } from '../../../types/security-hotspots';
import { CurrentUser, isLoggedIn } from '../../../types/users';
@@ -55,7 +56,12 @@ export function HotspotPrimaryLocationBox(props: HotspotPrimaryLocationBoxProps)
)}
ref={locationRef}
>
-
{hotspot.message}
+
+
+
{isLoggedIn(currentUser) && (
- '3' is a magic number.
+
- '3' is a magic number.
+
- '3' is a magic number.
+
- '3' is a magic number.
+
- '3' is a magic number.
+
`;
diff --git a/server/sonar-web/src/main/js/types/security-hotspots.ts b/server/sonar-web/src/main/js/types/security-hotspots.ts
index abf1e09b607..7cf67d7e996 100644
--- a/server/sonar-web/src/main/js/types/security-hotspots.ts
+++ b/server/sonar-web/src/main/js/types/security-hotspots.ts
@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { ComponentQualifier } from './component';
+import { MessageFormatting } from './issues';
import { FlowLocation, IssueChangelog, IssueChangelogDiff, Paging, TextRange } from './types';
import { UserBase } from './users';
@@ -66,6 +67,7 @@ export interface RawHotspot {
key: string;
line?: number;
message: string;
+ messageFormattings?: MessageFormatting[];
project: string;
resolution?: HotspotResolution;
rule: string;
@@ -92,6 +94,7 @@ export interface Hotspot {
key: string;
line?: number;
message: string;
+ messageFormattings?: MessageFormatting[];
project: HotspotComponent;
resolution?: HotspotResolution;
rule: HotspotRule;
--
2.39.5