(improvement)(headless) When the drill-down dimension inherited from the model is removed from the model's settings, it will no longer be displayed in the drill-down dimension of the metric (#751)

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2024-02-23 20:30:04 +08:00
committed by GitHub
parent 042a610231
commit 617cd87a48

View File

@@ -360,7 +360,12 @@ public class MetricServiceImpl implements MetricService {
} }
if (metricResp.getRelateDimension() != null if (metricResp.getRelateDimension() != null
&& !CollectionUtils.isEmpty(metricResp.getRelateDimension().getDrillDownDimensions())) { && !CollectionUtils.isEmpty(metricResp.getRelateDimension().getDrillDownDimensions())) {
drillDownDimensions.addAll(metricResp.getRelateDimension().getDrillDownDimensions()); for (DrillDownDimension drillDownDimension : metricResp.getRelateDimension().getDrillDownDimensions()) {
if (drillDownDimension.isInheritedFromModel() && !drillDownDimension.isNecessary()) {
continue;
}
drillDownDimensions.add(drillDownDimension);
}
} }
ModelResp modelResp = modelService.getModel(metricResp.getModelId()); ModelResp modelResp = modelService.getModel(metricResp.getModelId());
if (modelResp.getDrillDownDimensions() == null) { if (modelResp.getDrillDownDimensions() == null) {