aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/overview
diff options
context:
space:
mode:
authorMatteo Mara <matteo.mara@sonarsource.com>2023-01-27 16:16:07 +0100
committersonartech <sonartech@sonarsource.com>2023-02-02 20:03:40 +0000
commit2d60913db1dc3a499ab5d681b7b2ad324b3ac19d (patch)
treeaed34a02b8c7fd4bc3047ba26ad001cd0cc6461f /server/sonar-web/src/main/js/apps/overview
parent54301a6bf2874d5ab2319805b93aa47dae21d961 (diff)
downloadsonarqube-2d60913db1dc3a499ab5d681b7b2ad324b3ac19d.tar.gz
sonarqube-2d60913db1dc3a499ab5d681b7b2ad324b3ac19d.zip
SONAR-17815 implement updated logic for CaYC quality gates
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/ApplicationNonCaycProjectWarning.tsx86
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx30
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarningOverCompliant.tsx62
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx61
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanelSection.tsx25
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-test.tsx30
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/__tests__/QualityGatePanelSection-test.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanel-test.tsx.snap12
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanelSection-test.tsx.snap8
10 files changed, 246 insertions, 80 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/ApplicationNonCaycProjectWarning.tsx b/server/sonar-web/src/main/js/apps/overview/branches/ApplicationNonCaycProjectWarning.tsx
new file mode 100644
index 00000000000..e1fc30b255b
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/overview/branches/ApplicationNonCaycProjectWarning.tsx
@@ -0,0 +1,86 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2023 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 * as React from 'react';
+import DocLink from '../../../components/common/DocLink';
+import Link from '../../../components/common/Link';
+import QualifierIcon from '../../../components/icons/QualifierIcon';
+import { Alert } from '../../../components/ui/Alert';
+import { getBranchLikeQuery } from '../../../helpers/branch-like';
+import { translate, translateWithParameters } from '../../../helpers/l10n';
+import { getProjectQueryUrl } from '../../../helpers/urls';
+import { ComponentQualifier } from '../../../types/component';
+import { QualityGateStatus } from '../../../types/quality-gates';
+import { CaycStatus } from '../../../types/types';
+
+interface Props {
+ projects: QualityGateStatus[];
+ caycStatus: CaycStatus;
+}
+
+export default function ApplicationNonCaycProjectWarning({ projects, caycStatus }: Props) {
+ return (
+ <div className="overview-quality-gate-conditions-list padded big-spacer-top">
+ {caycStatus === CaycStatus.NonCompliant ? (
+ <Alert variant="warning">
+ {translateWithParameters(
+ 'overview.quality_gate.application.non_cayc.projects_x',
+ projects.length
+ )}
+ </Alert>
+ ) : (
+ <p className="padded">
+ {translateWithParameters(
+ 'overview.quality_gate.application.cayc_over_compliant.projects_x',
+ projects.length
+ )}
+ </p>
+ )}
+
+ <ul className="spacer-left spacer-bottom big-spacer-top">
+ {projects.map(({ key, name, branchLike }) => (
+ <li key={key} className="text-ellipsis spacer-bottom" title={name}>
+ <Link
+ className="link-no-underline"
+ to={getProjectQueryUrl(key, getBranchLikeQuery(branchLike))}
+ >
+ <QualifierIcon
+ className="little-spacer-right"
+ qualifier={ComponentQualifier.Project}
+ />
+ {name}
+ </Link>
+ </li>
+ ))}
+ </ul>
+ <hr className="big-spacer-top big-spacer-bottom" />
+ <div className="spacer spacer-bottom big-spacer-top">
+ {caycStatus === CaycStatus.NonCompliant ? (
+ <DocLink to="/user-guide/clean-as-you-code/">
+ {translate('overview.quality_gate.conditions.cayc.link')}
+ </DocLink>
+ ) : (
+ <DocLink to="/user-guide/clean-as-you-code/#potential-drawbacks">
+ {translate('overview.quality_gate.conditions.cayc_over_compliant.link')}
+ </DocLink>
+ )}
+ </div>
+ </div>
+ );
+}
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx
index e7953550f34..6c021598d32 100644
--- a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx
@@ -187,13 +187,13 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
if (this.mounted) {
const qgStatuses = results
.map(({ measures = [], project, projectBranchLike }) => {
- const { key, name, status, isCaycCompliant } = project;
+ const { key, name, status, caycStatus } = project;
const conditions = extractStatusConditionsFromApplicationStatusChildProject(project);
const failedConditions = this.getFailedConditions(conditions, measures);
return {
failedConditions,
- isCaycCompliant,
+ caycStatus,
key,
name,
status,
@@ -241,13 +241,13 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
this.loadMeasuresAndMeta(key, branch, metricKeys).then(
({ measures, metrics, period }) => {
if (this.mounted && measures) {
- const { ignoredConditions, isCaycCompliant, status } = projectStatus;
+ const { ignoredConditions, caycStatus, status } = projectStatus;
const conditions = extractStatusConditionsFromProjectStatus(projectStatus);
const failedConditions = this.getFailedConditions(conditions, measures);
const qgStatus = {
ignoredConditions,
- isCaycCompliant,
+ caycStatus,
failedConditions,
key,
name,
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx b/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx
index d72d68a4066..19a876a7889 100644
--- a/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx
@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { FormattedMessage } from 'react-intl';
import DocLink from '../../../components/common/DocLink';
import Link from '../../../components/common/Link';
import { Alert } from '../../../components/ui/Alert';
@@ -33,17 +34,24 @@ export default function CleanAsYouCodeWarning({ component }: Props) {
return (
<>
<Alert variant="warning">{translate('overview.quality_gate.conditions.cayc.warning')}</Alert>
-
- <p className="big-spacer-top big-spacer-bottom">
- {translate('overview.quality_gate.conditions.cayc.details')}
- </p>
-
- {component.qualityGate && (
- <div className="big-spacer-bottom">
- <Link className="button" to={getQualityGateUrl(component.qualityGate.name)}>
- {translate('overview.quality_gate.conditions.cayc.review')}
- </Link>
- </div>
+ {component.qualityGate ? (
+ <p className="big-spacer-top big-spacer-bottom">
+ <FormattedMessage
+ id="overview.quality_gate.conditions.cayc.details_with_link"
+ defaultMessage={translate('overview.quality_gate.conditions.cayc.details_with_link')}
+ values={{
+ link: (
+ <Link to={getQualityGateUrl(component.qualityGate.name)}>
+ {translate('overview.quality_gate.conditions.non_cayc.warning.link')}
+ </Link>
+ ),
+ }}
+ />
+ </p>
+ ) : (
+ <p className="big-spacer-top big-spacer-bottom">
+ {translate('overview.quality_gate.conditions.cayc.details')}
+ </p>
)}
<DocLink to="/user-guide/clean-as-you-code/">
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarningOverCompliant.tsx b/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarningOverCompliant.tsx
new file mode 100644
index 00000000000..f055badf67c
--- /dev/null
+++ b/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarningOverCompliant.tsx
@@ -0,0 +1,62 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2023 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 * as React from 'react';
+import { FormattedMessage } from 'react-intl';
+import DocLink from '../../../components/common/DocLink';
+import Link from '../../../components/common/Link';
+import { translate } from '../../../helpers/l10n';
+import { getQualityGateUrl } from '../../../helpers/urls';
+import { Component } from '../../../types/types';
+
+interface Props {
+ component: Pick<Component, 'key' | 'qualifier' | 'qualityGate'>;
+}
+
+export default function CleanAsYouCodeWarningOverCompliant({ component }: Props) {
+ return (
+ <>
+ {component.qualityGate ? (
+ <p className="big-spacer-bottom">
+ <FormattedMessage
+ id="overview.quality_gate.conditions.cayc_over_compliant.details_with_link"
+ defaultMessage={translate(
+ 'overview.quality_gate.conditions.cayc_over_compliant.details_with_link'
+ )}
+ values={{
+ link: (
+ <Link to={getQualityGateUrl(component.qualityGate.name)}>
+ {translate('overview.quality_gate.conditions.cayc_over_compliant.warning.link')}
+ </Link>
+ ),
+ }}
+ />
+ </p>
+ ) : (
+ <p className="big-spacer-bottom">
+ {translate('overview.quality_gate.conditions.cayc_over_compliant.details')}
+ </p>
+ )}
+
+ <DocLink to="/user-guide/clean-as-you-code/#potential-drawbacks">
+ {translate('overview.quality_gate.conditions.cayc_over_compliant.link')}
+ </DocLink>
+ </>
+ );
+}
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx
index 25610006a7b..dd41fa73376 100644
--- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx
@@ -20,18 +20,15 @@
import classNames from 'classnames';
import { flatMap } from 'lodash';
import * as React from 'react';
-import Link from '../../../components/common/Link';
import HelpTooltip from '../../../components/controls/HelpTooltip';
-import QualifierIcon from '../../../components/icons/QualifierIcon';
import { Alert } from '../../../components/ui/Alert';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
-import { getBranchLikeQuery } from '../../../helpers/branch-like';
import { translate, translateWithParameters } from '../../../helpers/l10n';
-import { getProjectQueryUrl } from '../../../helpers/urls';
import { ComponentQualifier, isApplication } from '../../../types/component';
import { QualityGateStatus } from '../../../types/quality-gates';
-import { Component } from '../../../types/types';
+import { CaycStatus, Component } from '../../../types/types';
import SonarLintPromotion from '../components/SonarLintPromotion';
+import ApplicationNonCaycProjectWarning from './ApplicationNonCaycProjectWarning';
import QualityGatePanelSection from './QualityGatePanelSection';
export interface QualityGatePanelProps {
@@ -57,7 +54,13 @@ export function QualityGatePanel(props: QualityGatePanelProps) {
const nonCaycProjectsInApp = isApplication(component.qualifier)
? qgStatuses
- .filter(({ isCaycCompliant }) => !isCaycCompliant)
+ .filter(({ caycStatus }) => caycStatus === CaycStatus.NonCompliant)
+ .sort(({ name: a }, { name: b }) => a.localeCompare(b, undefined, { sensitivity: 'base' }))
+ : [];
+
+ const overCompliantCaycProjectsInApp = isApplication(component.qualifier)
+ ? qgStatuses
+ .filter(({ caycStatus }) => caycStatus === CaycStatus.OverCompliant)
.sort(({ name: a }, { name: b }) => a.localeCompare(b, undefined, { sensitivity: 'base' }))
: [];
@@ -118,7 +121,7 @@ export function QualityGatePanel(props: QualityGatePanelProps) {
</div>
{(overallFailedConditionsCount > 0 ||
- qgStatuses.some(({ isCaycCompliant }) => !isCaycCompliant)) && (
+ qgStatuses.some(({ caycStatus }) => caycStatus !== CaycStatus.Compliant)) && (
<div data-test="overview__quality-gate-conditions">
{qgStatuses.map((qgStatus) => (
<QualityGatePanelSection
@@ -131,39 +134,17 @@ export function QualityGatePanel(props: QualityGatePanelProps) {
)}
{nonCaycProjectsInApp.length > 0 && (
- <div className="overview-quality-gate-conditions-list padded big-spacer-top">
- <Alert variant="warning">
- {translateWithParameters(
- 'overview.quality_gate.application.non_cayc.projects_x',
- nonCaycProjectsInApp.length
- )}
- </Alert>
- <div className="spacer big-spacer-bottom big-spacer-top">
- <Link
- target="_blank"
- to="https://docs.sonarqube.org/latest/user-guide/clean-as-you-code/#quality-gate"
- >
- {translate('overview.quality_gate.conditions.cayc.link')}
- </Link>
- </div>
- <hr className="big-spacer-top big-spacer-bottom" />
- <ul className="spacer-left spacer-bottom">
- {nonCaycProjectsInApp.map(({ key, name, branchLike }) => (
- <li key={key} className="text-ellipsis spacer-bottom" title={name}>
- <Link
- className="link-no-underline"
- to={getProjectQueryUrl(key, getBranchLikeQuery(branchLike))}
- >
- <QualifierIcon
- className="little-spacer-right"
- qualifier={ComponentQualifier.Project}
- />
- {name}
- </Link>
- </li>
- ))}
- </ul>
- </div>
+ <ApplicationNonCaycProjectWarning
+ projects={nonCaycProjectsInApp}
+ caycStatus={CaycStatus.NonCompliant}
+ />
+ )}
+
+ {overCompliantCaycProjectsInApp.length > 0 && (
+ <ApplicationNonCaycProjectWarning
+ projects={overCompliantCaycProjectsInApp}
+ caycStatus={CaycStatus.OverCompliant}
+ />
)}
</>
)}
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanelSection.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanelSection.tsx
index 62eba2a1c20..fe6547c7175 100644
--- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanelSection.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanelSection.tsx
@@ -29,9 +29,10 @@ import {
QualityGateStatus,
QualityGateStatusConditionEnhanced,
} from '../../../types/quality-gates';
-import { Component } from '../../../types/types';
+import { CaycStatus, Component } from '../../../types/types';
import QualityGateConditions from '../components/QualityGateConditions';
import CleanAsYouCodeWarning from './CleanAsYouCodeWarning';
+import CleanAsYouCodeWarningOverCompliant from './CleanAsYouCodeWarningOverCompliant';
export interface QualityGatePanelSectionProps {
branchLike?: BranchLike;
@@ -85,7 +86,7 @@ export function QualityGatePanelSection(props: QualityGatePanelSectionProps) {
if (
!(
qgStatus.failedConditions.length > 0 ||
- (!qgStatus.isCaycCompliant && !isApplication(component.qualifier))
+ (qgStatus.caycStatus !== CaycStatus.Compliant && !isApplication(component.qualifier))
)
) {
return null;
@@ -99,7 +100,7 @@ export function QualityGatePanelSection(props: QualityGatePanelSectionProps) {
const showSectionTitles =
isApplication(component.qualifier) ||
- !qgStatus.isCaycCompliant ||
+ qgStatus.caycStatus !== CaycStatus.Compliant ||
(overallFailedConditions.length > 0 && newCodeFailedConditions.length > 0);
const toggleLabel = collapsed
@@ -130,11 +131,19 @@ export function QualityGatePanelSection(props: QualityGatePanelSectionProps) {
{!collapsed && (
<>
- {!qgStatus.isCaycCompliant && !isApplication(component.qualifier) && (
- <div className="big-padded bordered-bottom overview-quality-gate-conditions-list">
- <CleanAsYouCodeWarning component={component} />
- </div>
- )}
+ {qgStatus.caycStatus === CaycStatus.NonCompliant &&
+ !isApplication(component.qualifier) && (
+ <div className="big-padded bordered-bottom overview-quality-gate-conditions-list">
+ <CleanAsYouCodeWarning component={component} />
+ </div>
+ )}
+
+ {qgStatus.caycStatus === CaycStatus.OverCompliant &&
+ !isApplication(component.qualifier) && (
+ <div className="big-padded bordered-bottom overview-quality-gate-conditions-list">
+ <CleanAsYouCodeWarningOverCompliant component={component} />
+ </div>
+ )}
{newCodeFailedConditions.length > 0 && (
<>
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-test.tsx b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-test.tsx
index 24c1b6dbf33..428ef513c29 100644
--- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-test.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-test.tsx
@@ -42,7 +42,7 @@ import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { ComponentQualifier } from '../../../../types/component';
import { MetricKey } from '../../../../types/metrics';
import { GraphType } from '../../../../types/project-activity';
-import { Measure, Metric } from '../../../../types/types';
+import { CaycStatus, Measure, Metric } from '../../../../types/types';
import BranchOverview, { BRANCH_OVERVIEW_ACTIVITY_GRAPH, NO_CI_DETECTED } from '../BranchOverview';
jest.mock('../../../../api/measures', () => {
@@ -223,7 +223,7 @@ describe('project overview', () => {
jest
.mocked(getQualityGateProjectStatus)
.mockResolvedValueOnce(
- mockQualityGateProjectStatus({ status: 'OK', isCaycCompliant: false })
+ mockQualityGateProjectStatus({ status: 'OK', caycStatus: CaycStatus.NonCompliant })
);
renderBranchOverview();
@@ -267,9 +267,27 @@ describe('application overview', () => {
it("should show projects that don't have a compliant quality gate", async () => {
const appStatus = mockQualityGateApplicationStatus({
projects: [
- { key: '1', name: 'first project', conditions: [], isCaycCompliant: false, status: 'OK' },
- { key: '2', name: 'second', conditions: [], isCaycCompliant: true, status: 'OK' },
- { key: '3', name: 'number 3', conditions: [], isCaycCompliant: false, status: 'OK' },
+ {
+ key: '1',
+ name: 'first project',
+ conditions: [],
+ caycStatus: CaycStatus.NonCompliant,
+ status: 'OK',
+ },
+ {
+ key: '2',
+ name: 'second',
+ conditions: [],
+ caycStatus: CaycStatus.Compliant,
+ status: 'OK',
+ },
+ {
+ key: '3',
+ name: 'number 3',
+ conditions: [],
+ caycStatus: CaycStatus.NonCompliant,
+ status: 'OK',
+ },
{
key: '4',
name: 'four',
@@ -282,7 +300,7 @@ describe('application overview', () => {
errorThreshold: '0',
},
],
- isCaycCompliant: false,
+ caycStatus: CaycStatus.NonCompliant,
status: 'ERROR',
},
],
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/QualityGatePanelSection-test.tsx b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/QualityGatePanelSection-test.tsx
index 6d151b5bff1..1345e86bd6a 100644
--- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/QualityGatePanelSection-test.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/QualityGatePanelSection-test.tsx
@@ -27,6 +27,7 @@ import {
} from '../../../../helpers/mocks/quality-gates';
import { ComponentQualifier } from '../../../../types/component';
import { MetricKey } from '../../../../types/metrics';
+import { CaycStatus } from '../../../../types/types';
import { QualityGatePanelSection, QualityGatePanelSectionProps } from '../QualityGatePanelSection';
it('should render correctly', () => {
@@ -36,6 +37,7 @@ it('should render correctly', () => {
qgStatus: mockQualityGateStatus({
failedConditions: [],
status: 'OK',
+ caycStatus: CaycStatus.Compliant,
}),
}).type()
).toBeNull();
@@ -55,7 +57,7 @@ function shallowRender(props: Partial<QualityGatePanelSectionProps> = {}) {
mockQualityGateStatusConditionEnhanced({ metric: MetricKey.new_bugs }),
],
status: 'ERROR',
- isCaycCompliant: false,
+ caycStatus: CaycStatus.NonCompliant,
})}
{...props}
/>
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanel-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanel-test.tsx.snap
index 3ae184caf52..f0dd91c82f5 100644
--- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanel-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanel-test.tsx.snap
@@ -69,6 +69,7 @@ exports[`should render correctly for applications 1`] = `
key="foo"
qgStatus={
{
+ "caycStatus": "compliant",
"failedConditions": [
{
"actual": "10",
@@ -95,7 +96,6 @@ exports[`should render correctly for applications 1`] = `
},
],
"ignoredConditions": false,
- "isCaycCompliant": true,
"key": "foo",
"name": "Foo",
"status": "ERROR",
@@ -128,6 +128,7 @@ exports[`should render correctly for applications 1`] = `
key="foo"
qgStatus={
{
+ "caycStatus": "compliant",
"failedConditions": [
{
"actual": "10",
@@ -177,7 +178,6 @@ exports[`should render correctly for applications 1`] = `
},
],
"ignoredConditions": false,
- "isCaycCompliant": true,
"key": "foo",
"name": "Foo",
"status": "ERROR",
@@ -333,6 +333,7 @@ exports[`should render correctly for applications 2`] = `
key="foo"
qgStatus={
{
+ "caycStatus": "compliant",
"failedConditions": [
{
"actual": "10",
@@ -359,7 +360,6 @@ exports[`should render correctly for applications 2`] = `
},
],
"ignoredConditions": false,
- "isCaycCompliant": true,
"key": "foo",
"name": "Foo",
"status": "ERROR",
@@ -392,9 +392,9 @@ exports[`should render correctly for applications 2`] = `
key="foo"
qgStatus={
{
+ "caycStatus": "compliant",
"failedConditions": [],
"ignoredConditions": false,
- "isCaycCompliant": true,
"key": "foo",
"name": "Foo",
"status": "OK",
@@ -504,6 +504,7 @@ exports[`should render correctly for projects 1`] = `
key="foo"
qgStatus={
{
+ "caycStatus": "compliant",
"failedConditions": [
{
"actual": "10",
@@ -530,7 +531,6 @@ exports[`should render correctly for projects 1`] = `
},
],
"ignoredConditions": false,
- "isCaycCompliant": true,
"key": "foo",
"name": "Foo",
"status": "ERROR",
@@ -702,6 +702,7 @@ exports[`should render correctly for projects 3`] = `
key="foo"
qgStatus={
{
+ "caycStatus": "compliant",
"failedConditions": [
{
"actual": "10",
@@ -728,7 +729,6 @@ exports[`should render correctly for projects 3`] = `
},
],
"ignoredConditions": true,
- "isCaycCompliant": true,
"key": "foo",
"name": "Foo",
"status": "ERROR",
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanelSection-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanelSection-test.tsx.snap
index aff23a9b3bd..15613e9ec23 100644
--- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanelSection-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanelSection-test.tsx.snap
@@ -40,6 +40,7 @@ exports[`should render correctly 1`] = `
<Memo(QualityGateConditions)
component={
{
+ "caycStatus": "non-compliant",
"failedConditions": [
{
"actual": "10",
@@ -89,7 +90,6 @@ exports[`should render correctly 1`] = `
},
],
"ignoredConditions": false,
- "isCaycCompliant": false,
"key": "foo",
"name": "Foo",
"status": "ERROR",
@@ -131,6 +131,7 @@ exports[`should render correctly 1`] = `
<Memo(QualityGateConditions)
component={
{
+ "caycStatus": "non-compliant",
"failedConditions": [
{
"actual": "10",
@@ -180,7 +181,6 @@ exports[`should render correctly 1`] = `
},
],
"ignoredConditions": false,
- "isCaycCompliant": false,
"key": "foo",
"name": "Foo",
"status": "ERROR",
@@ -251,6 +251,7 @@ exports[`should render correctly 2`] = `
<Memo(QualityGateConditions)
component={
{
+ "caycStatus": "non-compliant",
"failedConditions": [
{
"actual": "10",
@@ -300,7 +301,6 @@ exports[`should render correctly 2`] = `
},
],
"ignoredConditions": false,
- "isCaycCompliant": false,
"key": "foo",
"name": "Foo",
"status": "ERROR",
@@ -342,6 +342,7 @@ exports[`should render correctly 2`] = `
<Memo(QualityGateConditions)
component={
{
+ "caycStatus": "non-compliant",
"failedConditions": [
{
"actual": "10",
@@ -391,7 +392,6 @@ exports[`should render correctly 2`] = `
},
],
"ignoredConditions": false,
- "isCaycCompliant": false,
"key": "foo",
"name": "Foo",
"status": "ERROR",