]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-22727 Add new metric to changelog in webapi
authorLéo Geoffroy <leo.geoffroy@sonarsource.com>
Tue, 13 Aug 2024 13:49:15 +0000 (15:49 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 26 Aug 2024 20:03:06 +0000 (20:03 +0000)
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistLiveMeasuresStep.java
server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx

index 9177eaca0bb47e28c9979d963a0db633f865f221..7ec45800832c979cf5832bbd88a3ae3dab9213e0 100644 (file)
@@ -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;
index d4271a980b54b78c6b7494280756d8cdbf2505d1..b540822929a9c071ff93d5841f10293ab4cc4c7b 100644 (file)
@@ -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';