aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLéo Geoffroy <leo.geoffroy@sonarsource.com>2024-08-13 15:49:15 +0200
committersonartech <sonartech@sonarsource.com>2024-08-26 20:03:06 +0000
commitdca06894a62db2826103a1e046ae78ee0ef1294a (patch)
tree7e6829ee1470540929c7743e3f93331f4b7c2822
parente697fb5a3d3c531f82993912cb5f5a870144a5a2 (diff)
downloadsonarqube-dca06894a62db2826103a1e046ae78ee0ef1294a.tar.gz
sonarqube-dca06894a62db2826103a1e046ae78ee0ef1294a.zip
SONAR-22727 Add new metric to changelog in webapi
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistLiveMeasuresStep.java13
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx24
2 files changed, 24 insertions, 13 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistLiveMeasuresStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistLiveMeasuresStep.java
index 9177eaca0bb..7ec45800832 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistLiveMeasuresStep.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistLiveMeasuresStep.java
@@ -39,6 +39,7 @@ import org.sonar.ce.task.projectanalysis.measure.MeasureToMeasureDto;
import org.sonar.ce.task.projectanalysis.metric.Metric;
import org.sonar.ce.task.projectanalysis.metric.MetricRepository;
import org.sonar.ce.task.step.ComputationStep;
+import org.sonar.core.metric.SoftwareQualitiesMetrics;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.measure.LiveMeasureDto;
@@ -108,7 +109,17 @@ public class PersistLiveMeasuresStep implements ComputationStep {
MAJOR_VIOLATIONS_KEY, MINOR_VIOLATIONS_KEY, NCLOC_KEY, NCLOC_DATA_KEY, NCLOC_LANGUAGE_DISTRIBUTION_KEY, OPEN_ISSUES_KEY, RELIABILITY_RATING_KEY,
RELIABILITY_REMEDIATION_EFFORT_KEY, REOPENED_ISSUES_KEY, SECURITY_HOTSPOTS_KEY, SECURITY_HOTSPOTS_REVIEWED_KEY, SECURITY_HOTSPOTS_REVIEWED_STATUS_KEY,
SECURITY_HOTSPOTS_TO_REVIEW_STATUS_KEY, SECURITY_RATING_KEY, SECURITY_REMEDIATION_EFFORT_KEY, SECURITY_REVIEW_RATING_KEY, SQALE_DEBT_RATIO_KEY, TECHNICAL_DEBT_KEY,
- SQALE_RATING_KEY, STATEMENTS_KEY, VIOLATIONS_KEY, VULNERABILITIES_KEY, ACCEPTED_ISSUES_KEY
+ SQALE_RATING_KEY, STATEMENTS_KEY, VIOLATIONS_KEY, VULNERABILITIES_KEY, ACCEPTED_ISSUES_KEY,
+
+ SoftwareQualitiesMetrics.SOFTWARE_QUALITY_MAINTAINABILITY_RATING_KEY,
+ SoftwareQualitiesMetrics.SOFTWARE_QUALITY_RELIABILITY_RATING_KEY,
+ SoftwareQualitiesMetrics.SOFTWARE_QUALITY_SECURITY_RATING_KEY,
+ SoftwareQualitiesMetrics.SOFTWARE_QUALITY_SECURITY_REVIEW_RATING_KEY,
+ SoftwareQualitiesMetrics.EFFORT_TO_REACH_SOFTWARE_QUALITY_MAINTAINABILITY_RATING_A_KEY,
+ SoftwareQualitiesMetrics.SOFTWARE_QUALITY_MAINTAINABILITY_REMEDIATION_EFFORT_KEY,
+ SoftwareQualitiesMetrics.SOFTWARE_QUALITY_SECURITY_REMEDIATION_EFFORT_KEY,
+ SoftwareQualitiesMetrics.SOFTWARE_QUALITY_RELIABILITY_REMEDIATION_EFFORT_KEY,
+ SoftwareQualitiesMetrics.SOFTWARE_QUALITY_MAINTAINABILITY_DEBT_RATIO_KEY
);
private final DbClient dbClient;
private final MetricRepository metricRepository;
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
index d4271a980b5..b540822929a 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
@@ -31,21 +31,21 @@ import {
Spinner,
SubHeading,
} from 'design-system';
-import {differenceWith, map, uniqBy} from 'lodash';
+import { differenceWith, map, uniqBy } from 'lodash';
import * as React from 'react';
-import {FormattedMessage} from 'react-intl';
+import { FormattedMessage } from 'react-intl';
import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip';
-import {MetricKey} from '~sonar-aligned/types/metrics';
-import {useAvailableFeatures} from '../../../app/components/available-features/withAvailableFeatures';
-import {useMetrics} from '../../../app/components/metrics/withMetricsContext';
+import { MetricKey } from '~sonar-aligned/types/metrics';
+import { useAvailableFeatures } from '../../../app/components/available-features/withAvailableFeatures';
+import { useMetrics } from '../../../app/components/metrics/withMetricsContext';
import DocumentationLink from '../../../components/common/DocumentationLink';
-import ModalButton, {ModalProps} from '../../../components/controls/ModalButton';
-import {DocLink} from '../../../helpers/doc-links';
-import {useDocUrl} from '../../../helpers/docs';
-import {getLocalizedMetricName, translate} from '../../../helpers/l10n';
-import {Feature} from '../../../types/features';
-import {CaycStatus, Condition as ConditionType, QualityGate} from '../../../types/types';
-import {groupAndSortByPriorityConditions, isQualityGateOptimized} from '../utils';
+import ModalButton, { ModalProps } from '../../../components/controls/ModalButton';
+import { DocLink } from '../../../helpers/doc-links';
+import { useDocUrl } from '../../../helpers/docs';
+import { getLocalizedMetricName, translate } from '../../../helpers/l10n';
+import { Feature } from '../../../types/features';
+import { CaycStatus, Condition as ConditionType, QualityGate } from '../../../types/types';
+import { groupAndSortByPriorityConditions, isQualityGateOptimized } from '../utils';
import AddConditionModal from './AddConditionModal';
import CaycCompliantBanner from './CaycCompliantBanner';
import CaycCondition from './CaycCondition';