aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenuItem.tsx2
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx2
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranchesMenuItem-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavWarnings-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/app/components/notifications/NavLatestNotification.tsx2
-rw-r--r--server/sonar-web/src/main/js/app/components/notifications/__tests__/__snapshots__/NavLatestNotification-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/app/components/notifications/notifications.css6
-rw-r--r--server/sonar-web/src/main/js/app/styles/components/badges.css126
-rw-r--r--server/sonar-web/src/main/js/apps/account/organizations/OrganizationCard.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/TaskStatus-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/code/code.css3
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/__tests__/__snapshots__/ComponentName-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/create/components/OrganizationSelect.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/AlmRepositoryItem.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AlmRepositoryItem-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMeta.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchRow-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/BuiltInQualityGateBadge-test.tsx30
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/BuiltInQualityGateBadge-test.tsx.snap13
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/BuiltInQualityProfileBadge-test.tsx31
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/__snapshots__/BuiltInQualityProfileBadge-test.tsx.snap21
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSonarCloud.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/__snapshots__/AnalyzeTutorialSonarCloud-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/PrivacyBadgeContainer-test.tsx.snap6
-rw-r--r--server/sonar-web/src/main/js/components/facet/FacetHeader.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/FacetHeader-test.tsx.snap6
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx6
-rw-r--r--server/sonar-web/src/main/js/components/ui/OrganizationListItem.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/OrganizationListItem-test.tsx.snap2
41 files changed, 162 insertions, 170 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenuItem.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenuItem.tsx
index 3a0987ed042..d4f76e2761f 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenuItem.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranchesMenuItem.tsx
@@ -65,7 +65,7 @@ export default function ComponentNavBranchesMenuItem({ branchLike, ...props }: P
/>
{displayName}
{isMainBranch(branchLike) && (
- <div className="outline-badge spacer-left">{translate('branches.main_branch')}</div>
+ <div className="badge spacer-left">{translate('branches.main_branch')}</div>
)}
</div>
<div className="big-spacer-left note">
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx
index d37b6f06ccd..08cdbbc097f 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx
@@ -51,7 +51,7 @@ export default class ComponentNavWarnings extends React.PureComponent<Props, Sta
render() {
return (
<>
- <div className="badge badge-focus badge-medium display-inline-flex-center js-component-analysis-warnings flex-1">
+ <div className="badge display-inline-flex-center js-component-analysis-warnings flex-1">
<WarningIcon className="spacer-right" />
<FormattedMessage
defaultMessage={translate('component_navigation.last_analysis_had_warnings')}
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranchesMenuItem-test.tsx.snap b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranchesMenuItem-test.tsx.snap
index 04c1bf0c791..9f65d7011e0 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranchesMenuItem-test.tsx.snap
+++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranchesMenuItem-test.tsx.snap
@@ -34,7 +34,7 @@ exports[`renders main branch 1`] = `
/>
master
<div
- className="outline-badge spacer-left"
+ className="badge spacer-left"
>
branches.main_branch
</div>
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavWarnings-test.tsx.snap b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavWarnings-test.tsx.snap
index c4d0380903f..5f49bd0b039 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavWarnings-test.tsx.snap
+++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavWarnings-test.tsx.snap
@@ -3,7 +3,7 @@
exports[`should render 1`] = `
<Fragment>
<div
- className="badge badge-focus badge-medium display-inline-flex-center js-component-analysis-warnings flex-1"
+ className="badge display-inline-flex-center js-component-analysis-warnings flex-1"
>
<WarningIcon
className="spacer-right"
diff --git a/server/sonar-web/src/main/js/app/components/notifications/NavLatestNotification.tsx b/server/sonar-web/src/main/js/app/components/notifications/NavLatestNotification.tsx
index df1cb34c902..872b159fc43 100644
--- a/server/sonar-web/src/main/js/app/components/notifications/NavLatestNotification.tsx
+++ b/server/sonar-web/src/main/js/app/components/notifications/NavLatestNotification.tsx
@@ -71,7 +71,7 @@ export default class NavLatestNotification extends React.PureComponent<Props> {
<>
<li className="navbar-latest-notification" onClick={this.props.onClick}>
<div className="navbar-latest-notification-wrapper">
- <span className="badge badge-new">{translate('new')}</span>
+ <span className="badge badge-info">{translate('new')}</span>
<span className="label">{lastNews.notification}</span>
</div>
</li>
diff --git a/server/sonar-web/src/main/js/app/components/notifications/__tests__/__snapshots__/NavLatestNotification-test.tsx.snap b/server/sonar-web/src/main/js/app/components/notifications/__tests__/__snapshots__/NavLatestNotification-test.tsx.snap
index 4e32113a75c..c748dbfcf16 100644
--- a/server/sonar-web/src/main/js/app/components/notifications/__tests__/__snapshots__/NavLatestNotification-test.tsx.snap
+++ b/server/sonar-web/src/main/js/app/components/notifications/__tests__/__snapshots__/NavLatestNotification-test.tsx.snap
@@ -10,7 +10,7 @@ exports[`should render correctly if there are new features, and the user has not
className="navbar-latest-notification-wrapper"
>
<span
- className="badge badge-new"
+ className="badge badge-info"
>
new
</span>
diff --git a/server/sonar-web/src/main/js/app/components/notifications/notifications.css b/server/sonar-web/src/main/js/app/components/notifications/notifications.css
index 2f4b3a42ce3..be010caa722 100644
--- a/server/sonar-web/src/main/js/app/components/notifications/notifications.css
+++ b/server/sonar-web/src/main/js/app/components/notifications/notifications.css
@@ -46,11 +46,11 @@
color: var(--sonarcloudBlack300);
}
-.navbar-latest-notification-wrapper .badge-new {
+.navbar-latest-notification-wrapper .badge-info {
position: absolute;
margin-right: var(--gridSize);
- left: calc(var(--gridSize) / 2);
- top: 5px;
+ left: 6px;
+ top: 6px;
}
.navbar-latest-notification-wrapper .label {
diff --git a/server/sonar-web/src/main/js/app/styles/components/badges.css b/server/sonar-web/src/main/js/app/styles/components/badges.css
index 89b735f3b71..02a9d1cd71c 100644
--- a/server/sonar-web/src/main/js/app/styles/components/badges.css
+++ b/server/sonar-web/src/main/js/app/styles/components/badges.css
@@ -19,20 +19,16 @@
*/
.badge {
display: inline-block;
- vertical-align: middle;
- height: var(--smallControlHeight);
- line-height: calc(var(--smallControlHeight) - 1px);
- padding: 0 var(--gridSize);
- border-radius: 10px;
+ padding: 2px 4px;
+ background-color: var(--barBorderColor);
+ border-radius: 3px;
font-size: var(--smallFontSize);
- min-width: 10px;
- letter-spacing: 0.03em;
- color: #ffffff;
+ font-weight: normal;
+ color: var(--baseFontColor);
+ text-transform: uppercase;
white-space: nowrap;
- text-align: center;
- background-color: var(--blue);
+ line-height: 1;
}
-
.badge:empty {
display: none;
}
@@ -42,126 +38,44 @@ a.badge:focus,
a.badge:active {
color: #ffffff;
}
-
a.badge {
border-bottom: none;
}
-.badge-medium {
- height: var(--controlHeight);
- line-height: calc(var(--controlHeight));
- letter-spacing: 0.01em;
-}
-
.list-group-item > .badge,
.list-group-item-heading > .badge {
float: right;
margin: 3px;
}
-
.list-group-item > .badge + .badge,
.list-group-item-heading > .badge + .badge {
margin-right: 5px;
}
-.badge-normal-size {
- font-size: inherit;
- letter-spacing: inherit;
-}
-
-.badge-tiny-height {
- height: var(--tinyControlHeight) !important;
- line-height: var(--tinyControlHeight) !important;
+.badge-info {
+ background-color: var(--alertBackgroundInfo);
+ color: var(--alertTextInfo);
}
-.badge-new {
- height: 18px;
- font-size: var(--verySmallFontSize);
- text-transform: uppercase;
- background-color: var(--lightBlue);
- color: var(--veryDarkBlue);
- font-weight: 600;
+.badge-success {
+ background-color: var(--alertBackgroundSuccess);
+ color: var(--alertTextSuccess);
}
-.badge-muted {
- background-color: var(--gray80);
- color: var(--secondFontColor);
+.badge-warning {
+ background-color: var(--alertBackgroundWarning);
+ color: var(--alertTextWarning);
}
-.badge-success,
-.badge-ok {
- background-color: var(--green);
-}
-
-.badge-warning,
-.badge-warn {
- background-color: var(--orange);
-}
-
-.badge-danger,
.badge-error {
- background-color: var(--red);
-}
-
-.badge-danger-light {
- border: 1px solid var(--alertBorderError) !important;
background-color: var(--alertBackgroundError);
- color: #a94442;
-}
-
-a.badge-danger-light:hover,
-a.badge-danger-light:focus,
-a.badge-danger-light:active {
- color: #a94442;
-}
-
-.badge-focus {
- border: 1px solid #faebcc;
- background-color: #fcf8e3;
- color: #8a6d3b;
- font-weight: 400;
-}
-
-a.badge-focus:hover,
-a.badge-focus:focus,
-a.badge-focus:active {
- color: #8a6d3b;
-}
-
-.badge-secondary {
- background-color: var(--gray71);
-}
-
-.outline-badge {
- display: inline-block;
- vertical-align: middle;
- height: var(--smallControlHeight);
- line-height: calc(var(--smallControlHeight) - 1px);
- padding: 0 var(--gridSize);
- border: 1px solid var(--gray80);
- border-radius: 10px;
- box-sizing: border-box;
- background-color: var(--gray80);
- font-size: var(--smallFontSize);
- font-weight: 400;
- white-space: nowrap;
+ color: var(--alertTextError);
}
-.outline-badge.active {
- color: var(--baseFontColor);
- border-color: var(--blue);
- background-color: var(--lightBlue);
-}
-
-.outline-badge.badge-info {
- border-color: var(--blue);
- background-color: var(--lightBlue);
-}
-
-.outline-badge.badge-icon {
+/* TODO: remove after SC fork */
+.badge-icon {
padding-left: calc(var(--gridSize) / 2);
}
-
-.outline-badge.badge-icon svg {
+.badge-icon svg {
height: calc(var(--smallControlHeight) - 2px);
}
diff --git a/server/sonar-web/src/main/js/apps/account/organizations/OrganizationCard.tsx b/server/sonar-web/src/main/js/apps/account/organizations/OrganizationCard.tsx
index 29c9402ed0c..6baaa79bb2f 100644
--- a/server/sonar-web/src/main/js/apps/account/organizations/OrganizationCard.tsx
+++ b/server/sonar-web/src/main/js/apps/account/organizations/OrganizationCard.tsx
@@ -39,7 +39,7 @@ export default function OrganizationCard({ organization }: Props) {
<OrganizationLink className="spacer-left text-middle" organization={organization}>
{organization.name}
</OrganizationLink>
- {actions.admin && <span className="outline-badge spacer-left">{translate('admin')}</span>}
+ {actions.admin && <span className="badge spacer-left">{translate('admin')}</span>}
</h3>
{!!organization.description && (
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.tsx
index 192907dd60f..52818dcb0ee 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.tsx
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.tsx
@@ -43,13 +43,11 @@ export default function TaskStatus({ status }: Props) {
break;
case STATUSES.FAILED:
inner = (
- <span className="badge badge-danger">{translate('background_task.status.FAILED')}</span>
+ <span className="badge badge-error">{translate('background_task.status.FAILED')}</span>
);
break;
case STATUSES.CANCELED:
- inner = (
- <span className="badge badge-muted">{translate('background_task.status.CANCELED')}</span>
- );
+ inner = <span className="badge">{translate('background_task.status.CANCELED')}</span>;
break;
default:
inner = '';
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/TaskStatus-test.tsx.snap b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/TaskStatus-test.tsx.snap
index 02e803cd510..d4df3ea0961 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/TaskStatus-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/TaskStatus-test.tsx.snap
@@ -35,7 +35,7 @@ exports[`renders 4`] = `
className="thin spacer-right"
>
<span
- className="badge badge-danger"
+ className="badge badge-error"
>
background_task.status.FAILED
</span>
@@ -47,7 +47,7 @@ exports[`renders 5`] = `
className="thin spacer-right"
>
<span
- className="badge badge-muted"
+ className="badge"
>
background_task.status.CANCELED
</span>
diff --git a/server/sonar-web/src/main/js/apps/code/code.css b/server/sonar-web/src/main/js/apps/code/code.css
index bb08188fd70..bea6c0a78c5 100644
--- a/server/sonar-web/src/main/js/apps/code/code.css
+++ b/server/sonar-web/src/main/js/apps/code/code.css
@@ -69,8 +69,7 @@
}
@media (max-width: 1200px) {
- .code-name-cell .badge,
- .code-name-cell .outline-badge {
+ .code-name-cell .badge {
display: none;
}
}
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx
index ab46a4ec50f..7b1777b019f 100644
--- a/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx
@@ -119,9 +119,7 @@ export default function ComponentName({
<span className="note">{component.branch}</span>
</span>
) : (
- <span className="spacer-left outline-badge flex-1">
- {translate('branches.main_branch')}
- </span>
+ <span className="spacer-left badge flex-1">{translate('branches.main_branch')}</span>
)}
</span>
);
diff --git a/server/sonar-web/src/main/js/apps/code/components/__tests__/__snapshots__/ComponentName-test.tsx.snap b/server/sonar-web/src/main/js/apps/code/components/__tests__/__snapshots__/ComponentName-test.tsx.snap
index ff35466d366..df54b7a90a7 100644
--- a/server/sonar-web/src/main/js/apps/code/components/__tests__/__snapshots__/ComponentName-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/code/components/__tests__/__snapshots__/ComponentName-test.tsx.snap
@@ -132,7 +132,7 @@ foo:src/index.tsx"
</span>
</span>
<span
- className="spacer-left outline-badge flex-1"
+ className="spacer-left badge flex-1"
>
branches.main_branch
</span>
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx
index d48523fafb1..16b33c164d7 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx
@@ -80,9 +80,7 @@ export default class RuleDetailsMeta extends React.PureComponent<Props> {
return (
<Tooltip overlay={translate('status')}>
<li className="coding-rules-detail-property" data-meta="status">
- <span className="badge badge-normal-size badge-danger-light">
- {translate('rules.status', ruleDetails.status)}
- </span>
+ <span className="badge badge-error">{translate('rules.status', ruleDetails.status)}</span>
</li>
</Tooltip>
);
@@ -223,7 +221,7 @@ export default class RuleDetailsMeta extends React.PureComponent<Props> {
return (
<Tooltip overlay={translateWithParameters('coding_rules.external_rule.engine', engine)}>
<li className="coding-rules-detail-property">
- <div className="outline-badge badge-tiny-height spacer-left text-text-top">{engine}</div>
+ <div className="badge spacer-left text-text-top">{engine}</div>
</li>
</Tooltip>
);
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx
index 5fdd95ec7d6..4bed1a8943b 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx
@@ -213,7 +213,7 @@ export default class RuleListItem extends React.PureComponent<Props> {
</Link>
{rule.isTemplate && (
<Tooltip overlay={translate('coding_rules.rule_template.title')}>
- <span className="outline-badge spacer-left">
+ <span className="badge spacer-left">
{translate('coding_rules.rule_template')}
</span>
</Tooltip>
@@ -224,7 +224,7 @@ export default class RuleListItem extends React.PureComponent<Props> {
<td className="coding-rule-table-meta-cell">
<div className="display-flex-center coding-rule-meta">
{rule.status !== 'READY' && (
- <span className="spacer-left badge badge-normal-size badge-tiny-height badge-danger-light">
+ <span className="spacer-left badge badge-error">
{translate('rules.status', rule.status)}
</span>
)}
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap
index ed9ef894352..be77ee6e3b2 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap
@@ -265,7 +265,7 @@ exports[`should display right meta info 3`] = `
className="coding-rules-detail-property"
>
<div
- className="outline-badge badge-tiny-height spacer-left text-text-top"
+ className="badge spacer-left text-text-top"
>
xoo
</div>
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx
index 6e29e3a9095..4f8271724dd 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx
@@ -80,7 +80,7 @@ export default class ComponentCell extends React.PureComponent<Props> {
<span className="note">{component.branch}</span>
</>
) : (
- <span className="spacer-left outline-badge">{translate('branches.main_branch')}</span>
+ <span className="spacer-left badge">{translate('branches.main_branch')}</span>
)}
</>
)}
diff --git a/server/sonar-web/src/main/js/apps/create/components/OrganizationSelect.tsx b/server/sonar-web/src/main/js/apps/create/components/OrganizationSelect.tsx
index af551bf825b..9ff35a2df0f 100644
--- a/server/sonar-web/src/main/js/apps/create/components/OrganizationSelect.tsx
+++ b/server/sonar-web/src/main/js/apps/create/components/OrganizationSelect.tsx
@@ -77,9 +77,7 @@ export function getOptionRenderer(hideIcons?: boolean) {
{organization.name}
<span className="note little-spacer-left">{organization.key}</span>
</span>
- {isPaidOrg && (
- <div className="outline-badge">{translate('organization.paid_plan.badge')}</div>
- )}
+ {isPaidOrg && <div className="badge">{translate('organization.paid_plan.badge')}</div>}
</div>
);
};
diff --git a/server/sonar-web/src/main/js/apps/create/project/AlmRepositoryItem.tsx b/server/sonar-web/src/main/js/apps/create/project/AlmRepositoryItem.tsx
index 7063e40b451..4b1964f7c05 100644
--- a/server/sonar-web/src/main/js/apps/create/project/AlmRepositoryItem.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/AlmRepositoryItem.tsx
@@ -95,7 +95,7 @@ export default class AlmRepositoryItem extends React.PureComponent<Props> {
/>
<span className="spacer-left">{this.props.repository.label}</span>
{repository.private && (
- <div className="outline-badge spacer-left">{translate('visibility.private')}</div>
+ <div className="badge spacer-left">{translate('visibility.private')}</div>
)}
</div>
diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AlmRepositoryItem-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AlmRepositoryItem-test.tsx.snap
index 12bde76d9dc..4ac954219d5 100644
--- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AlmRepositoryItem-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AlmRepositoryItem-test.tsx.snap
@@ -165,7 +165,7 @@ exports[`should render private repositories 1`] = `
Awesome Project
</span>
<div
- className="outline-badge spacer-left"
+ className="badge spacer-left"
>
visibility.private
</div>
diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMeta.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMeta.tsx
index 5dca58a6fcc..893fae2e9f9 100644
--- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMeta.tsx
+++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationMeta.tsx
@@ -53,7 +53,7 @@ export default function OrganizationNavigationMeta({
<DocTooltip
className="spacer-right"
doc={import(/* webpackMode: "eager" */ 'Docs/tooltips/organizations/subscription-paid-plan.md')}>
- <div className="outline-badge">{translate('organization.paid_plan.badge')}</div>
+ <div className="badge">{translate('organization.paid_plan.badge')}</div>
</DocTooltip>
)}
<div className="text-muted">
diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx
index 6dc8f5e82a8..b35f229419a 100644
--- a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx
+++ b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx
@@ -167,7 +167,7 @@ export default class BranchRow extends React.PureComponent<Props, State> {
/>
{getBranchLikeDisplayName(branchLike)}
{isMainBranch(branchLike) && (
- <div className="outline-badge spacer-left">{translate('branches.main_branch')}</div>
+ <div className="badge spacer-left">{translate('branches.main_branch')}</div>
)}
</td>
<td className="thin nowrap">
diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchRow-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchRow-test.tsx.snap
index 800b10d0601..498bdbe9ab8 100644
--- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchRow-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchRow-test.tsx.snap
@@ -14,7 +14,7 @@ exports[`renders main branch 1`] = `
/>
master
<div
- className="outline-badge spacer-left"
+ className="badge spacer-left"
>
branches.main_branch
</div>
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx
index cca68961575..9acb218d71c 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx
@@ -27,16 +27,10 @@ interface Props {
}
export default function BuiltInQualityGateBadge({ className }: Props) {
- const badge = (
- <div className={classNames('outline-badge', className)}>
- {translate('quality_gates.built_in')}
- </div>
- );
-
return (
<DocTooltip
doc={import(/* webpackMode: "eager" */ 'Docs/tooltips/quality-gates/built-in-quality-gate.md')}>
- {badge}
+ <div className={classNames('badge', className)}>{translate('quality_gates.built_in')}</div>
</DocTooltip>
);
}
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/BuiltInQualityGateBadge-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/BuiltInQualityGateBadge-test.tsx
new file mode 100644
index 00000000000..4998f68c05d
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/BuiltInQualityGateBadge-test.tsx
@@ -0,0 +1,30 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+import { shallow } from 'enzyme';
+import * as React from 'react';
+import BuiltInQualityGateBadge from '../BuiltInQualityGateBadge';
+
+it('should render correctly', () => {
+ expect(shallowRender()).toMatchSnapshot();
+});
+
+function shallowRender(props = {}) {
+ return shallow(<BuiltInQualityGateBadge {...props} />);
+}
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/BuiltInQualityGateBadge-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/BuiltInQualityGateBadge-test.tsx.snap
new file mode 100644
index 00000000000..76f55d531f8
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/BuiltInQualityGateBadge-test.tsx.snap
@@ -0,0 +1,13 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render correctly 1`] = `
+<DocTooltip
+ doc={Promise {}}
+>
+ <div
+ className="badge"
+ >
+ quality_gates.built_in
+ </div>
+</DocTooltip>
+`;
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx
index b8dcedb1c3f..58afabbc5ab 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx
@@ -29,7 +29,7 @@ interface Props {
export default function BuiltInQualityProfileBadge({ className, tooltip = true }: Props) {
const badge = (
- <div className={classNames('outline-badge', className)}>
+ <div className={classNames('badge badge-info', className)}>
{translate('quality_profiles.built_in')}
</div>
);
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/BuiltInQualityProfileBadge-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/BuiltInQualityProfileBadge-test.tsx
new file mode 100644
index 00000000000..eaec6dfc27e
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/BuiltInQualityProfileBadge-test.tsx
@@ -0,0 +1,31 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2019 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+import { shallow } from 'enzyme';
+import * as React from 'react';
+import BuiltInQualityProfileBadge from '../BuiltInQualityProfileBadge';
+
+it('should render correctly', () => {
+ expect(shallowRender()).toMatchSnapshot();
+ expect(shallowRender({ tooltip: false })).toMatchSnapshot();
+});
+
+function shallowRender(props = {}) {
+ return shallow(<BuiltInQualityProfileBadge {...props} />);
+}
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/__snapshots__/BuiltInQualityProfileBadge-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/__snapshots__/BuiltInQualityProfileBadge-test.tsx.snap
new file mode 100644
index 00000000000..a5171e5461f
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/__snapshots__/BuiltInQualityProfileBadge-test.tsx.snap
@@ -0,0 +1,21 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render correctly 1`] = `
+<DocTooltip
+ doc={Promise {}}
+>
+ <div
+ className="badge badge-info"
+ >
+ quality_profiles.built_in
+ </div>
+</DocTooltip>
+`;
+
+exports[`should render correctly 2`] = `
+<div
+ className="badge badge-info"
+>
+ quality_profiles.built_in
+</div>
+`;
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx
index fbafb80a7de..8c36db28cbc 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx
@@ -95,7 +95,7 @@ export default class ProfilesListRow extends React.PureComponent<Props> {
{profile.activeDeprecatedRuleCount > 0 && (
<span className="spacer-right">
<Tooltip overlay={translate('quality_profiles.deprecated_rules')}>
- <Link className="badge badge-normal-size badge-danger-light" to={deprecatedRulesUrl}>
+ <Link className="badge badge-error" to={deprecatedRulesUrl}>
{profile.activeDeprecatedRuleCount}
</Link>
</Tooltip>
diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSonarCloud.tsx b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSonarCloud.tsx
index 94beebfeff4..a05106bf351 100644
--- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSonarCloud.tsx
+++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/AnalyzeTutorialSonarCloud.tsx
@@ -288,7 +288,7 @@ export default class AnalyzeTutorialSonarCloud extends React.PureComponent<Props
{isAutoScanEnabled && (
<div className={`${getClassnames(autoScanMode)} huge-spacer-top huge-spacer-bottom`}>
<div className="icon">
- <div className="badge badge-new">BETA</div>
+ <div className="badge badge-info">BETA</div>
</div>
<p>{autoScanMode.name}</p>
<button
diff --git a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/__snapshots__/AnalyzeTutorialSonarCloud-test.tsx.snap b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/__snapshots__/AnalyzeTutorialSonarCloud-test.tsx.snap
index 777e9501b59..5a58e7ecf54 100644
--- a/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/__snapshots__/AnalyzeTutorialSonarCloud-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/tutorials/analyzeProject/__tests__/__snapshots__/AnalyzeTutorialSonarCloud-test.tsx.snap
@@ -103,7 +103,7 @@ exports[`renders for GitHub 1`] = `
className="icon"
>
<div
- className="badge badge-new"
+ className="badge badge-info"
>
BETA
</div>
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx b/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx
index 0259922365d..8c0e398274c 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx
+++ b/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx
@@ -24,7 +24,7 @@ import { translate } from 'sonar-ui-common/helpers/l10n';
export default function InternalBadge() {
return (
<Tooltip overlay={translate('api_documentation.internal_tooltip')}>
- <span className="badge badge-danger">{translate('internal')}</span>
+ <span className="badge badge-error">{translate('internal')}</span>
</Tooltip>
);
}
diff --git a/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx b/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx
index 4f8235b099f..00fa3a13c89 100644
--- a/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx
+++ b/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx
@@ -76,7 +76,7 @@ export function PrivacyBadge({
const badge = (
<div
- className={classNames('outline-badge', className, {
+ className={classNames('badge', className, {
'badge-info': Boolean(icon),
'badge-icon': Boolean(icon)
})}>
diff --git a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/PrivacyBadgeContainer-test.tsx.snap b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/PrivacyBadgeContainer-test.tsx.snap
index 87309d6a317..f6aec9bf389 100644
--- a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/PrivacyBadgeContainer-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/PrivacyBadgeContainer-test.tsx.snap
@@ -7,7 +7,7 @@ exports[`renders 1`] = `
overlay="visibility.private.description.TRK"
>
<div
- className="outline-badge"
+ className="badge"
>
visibility.private
</div>
@@ -24,7 +24,7 @@ exports[`renders public 1`] = `
}
>
<div
- className="outline-badge"
+ className="badge"
>
visibility.public
</div>
@@ -41,7 +41,7 @@ exports[`renders public with icon 1`] = `
}
>
<div
- className="outline-badge badge-info badge-icon"
+ className="badge badge-info badge-icon"
>
<VisibleIcon
className="little-spacer-right"
diff --git a/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx b/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx
index 9b50252859f..a1b3a15ece2 100644
--- a/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx
+++ b/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx
@@ -60,7 +60,7 @@ export default class FacetHeader extends React.PureComponent<Props> {
const value =
values.length === 1 ? values[0] : translateWithParameters('x_selected', values.length);
return (
- <span className="badge badge-secondary text-ellipsis" title={value}>
+ <span className="badge text-ellipsis" title={value}>
{value}
</span>
);
diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/FacetHeader-test.tsx.snap b/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/FacetHeader-test.tsx.snap
index d0b3085bc68..04208a3c2de 100644
--- a/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/FacetHeader-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/FacetHeader-test.tsx.snap
@@ -22,7 +22,7 @@ exports[`should clear 1`] = `
className="search-navigator-facet-header-value spacer-left spacer-right "
>
<span
- className="badge badge-secondary text-ellipsis"
+ className="badge text-ellipsis"
title="x_selected.3"
>
x_selected.3
@@ -59,7 +59,7 @@ exports[`should render closed facet with value 1`] = `
className="search-navigator-facet-header-value spacer-left spacer-right "
>
<span
- className="badge badge-secondary text-ellipsis"
+ className="badge text-ellipsis"
title="foo"
>
foo
@@ -114,7 +114,7 @@ exports[`should render open facet with value 1`] = `
className="search-navigator-facet-header-value spacer-left spacer-right "
>
<span
- className="badge badge-secondary text-ellipsis"
+ className="badge text-ellipsis"
title="foo"
>
foo
diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx
index dbc965ea924..dba797fae45 100644
--- a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx
+++ b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx
@@ -53,14 +53,12 @@ export default class IssueMessage extends React.PureComponent<Props> {
{this.props.engine && (
<Tooltip
overlay={translateWithParameters('issue.from_external_rule_engine', this.props.engine)}>
- <div className="outline-badge badge-tiny-height spacer-right text-top">
- {this.props.engine}
- </div>
+ <div className="badge spacer-right text-top">{this.props.engine}</div>
</Tooltip>
)}
{this.props.manualVulnerability && (
<Tooltip overlay={translate('issue.manual_vulnerability.description')}>
- <div className="outline-badge badge-tiny-height spacer-right text-top">
+ <div className="badge spacer-right text-top">
{translate('issue.manual_vulnerability')}
</div>
</Tooltip>
diff --git a/server/sonar-web/src/main/js/components/ui/OrganizationListItem.tsx b/server/sonar-web/src/main/js/components/ui/OrganizationListItem.tsx
index 53285415dea..d72628271d1 100644
--- a/server/sonar-web/src/main/js/components/ui/OrganizationListItem.tsx
+++ b/server/sonar-web/src/main/js/components/ui/OrganizationListItem.tsx
@@ -35,7 +35,7 @@ export default function OrganizationListItem({ organization }: Props) {
<OrganizationAvatar organization={organization} small={true} />
<span className="spacer-left">{organization.name}</span>
</div>
- {actions.admin && <span className="outline-badge spacer-left">{translate('admin')}</span>}
+ {actions.admin && <span className="badge spacer-left">{translate('admin')}</span>}
</OrganizationLink>
</li>
);
diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/OrganizationListItem-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/OrganizationListItem-test.tsx.snap
index da344815e73..a2f7dde9ca0 100644
--- a/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/OrganizationListItem-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/OrganizationListItem-test.tsx.snap
@@ -36,7 +36,7 @@ exports[`renders 1`] = `
</span>
</div>
<span
- className="outline-badge spacer-left"
+ className="badge spacer-left"
>
admin
</span>