branch?: BranchLike;
component: Component;
measures: MeasureEnhanced[];
- failedConditions: QualityGateStatusConditionEnhanced[];
+ conditions: QualityGateStatusConditionEnhanced[];
}
/**
* Renders Coverage and Duplication cards for the Overview page.
*/
export default function MeasuresPanelPercentCards(props: Readonly<Props>) {
- const { useDiffMetric, branch, component, measures, failedConditions } = props;
+ const { useDiffMetric, branch, component, measures, conditions } = props;
const isApp = isApplication(component.qualifier);
<MeasuresCardPercent
branchLike={branch}
componentKey={component.key}
- conditions={failedConditions}
+ conditions={conditions}
measures={measures}
measurementType={MeasurementType.Coverage}
label="overview.quality_gate.coverage"
<MeasuresCardPercent
branchLike={branch}
componentKey={component.key}
- conditions={failedConditions}
+ conditions={conditions}
measures={measures}
measurementType={MeasurementType.Duplication}
label="overview.quality_gate.duplications"
const isApp = isApplication(component.qualifier);
const conditions = qgStatuses?.flatMap((qg) => qg.conditions) ?? [];
- const failedConditions = qgStatuses?.flatMap((qg) => qg.failedConditions) ?? [];
const newIssues = getLeakValue(findMeasure(measures, MetricKey.new_violations));
const newIssuesCondition = conditions.find((c) => c.metric === MetricKey.new_violations);
branch={branch}
component={component}
measures={measures}
- failedConditions={failedConditions}
+ conditions={conditions}
/>
<MeasuresCardNumber
const isApp = isApplication(component.qualifier);
const conditions = qgStatuses?.flatMap((qg) => qg.conditions) ?? [];
- const failedConditions = qgStatuses?.flatMap((qg) => qg.failedConditions) ?? [];
const acceptedIssues = findMeasure(measures, MetricKey.accepted_issues)?.value;
const securityHotspots = findMeasure(measures, MetricKey.security_hotspots)?.value;
const securityRating = findMeasure(measures, MetricKey.security_review_rating)?.value;
branch={branch}
component={component}
measures={measures}
- failedConditions={failedConditions}
+ conditions={conditions}
/>
<MeasuresCardNumber