diff --git a/src/main/java/org/openepics/names/rest/controller/ReportController.java b/src/main/java/org/openepics/names/rest/controller/ReportController.java index 8086a027ea86d774d93027bcaeef066e65ff0d00..146c0f5adc9d8ed2ec40182be2e8cbff05844dd1 100644 --- a/src/main/java/org/openepics/names/rest/controller/ReportController.java +++ b/src/main/java/org/openepics/names/rest/controller/ReportController.java @@ -62,7 +62,6 @@ public class ReportController { private static final String SPACE = " "; private static final String DIVIDER_32 = "--------------------------------"; - private static final String DIVIDER_64 = DIVIDER_32 + DIVIDER_32; private static final String DIVIDER_96 = DIVIDER_32 + DIVIDER_32 + DIVIDER_32; private static final String DIVIDER_128 = DIVIDER_32 + DIVIDER_32 + DIVIDER_32 + DIVIDER_32; @@ -71,11 +70,11 @@ public class ReportController { private static final String NBR_ALL = "# all: "; private static final String NBR_CANCELLED = "# cancelled: "; private static final String NBR_DELETED = "# deleted: "; + private static final String NBR_LEGACY = "# legacy: "; private static final String NBR_OTHER = "# other: "; private static final String NBR_PENDING = "# pending: "; private static final String NBR_REJECTED = "# rejected: "; - private NamesService namesService; private StructuresService structuresService; @@ -143,11 +142,13 @@ public class ReportController { ResponsePageNameElements nameElementsEssNames = namesService.readNames(null, null, null, null, null, null, null, null, Boolean.FALSE, null, null, null, null); ResponsePageNameElements nameElementsEssNamesDeleted = namesService.readNames(Boolean.TRUE, null, null, null, null, null, null, null, Boolean.FALSE, null, null, null, null); ResponsePageNameElements nameElementsEssNamesNotDeleted = namesService.readNames(Boolean.FALSE, null, null, null, null, null, null, null, Boolean.FALSE, null, null, null, null); + ResponsePageNameElements nameElementsEssNamesNotDeletedLegacy = namesService.readNamesLegacy(null, null, null, null, null); long nbrEssNameSystemstructure = 0; long nbrEssNameSystemstructureDevicestructure = 0; long nbrEssNameSystemstructureDevicestructureIndex = 0; long nbrEssNameOther = 0; + long nbrEssNameLegacy = nameElementsEssNamesNotDeletedLegacy.getTotalCount(); for (NameElement nameElement : nameElementsEssNamesNotDeleted.getList()) { if (!StringUtils.isEmpty(nameElement.getSystemStructure()) @@ -451,7 +452,8 @@ public class ReportController { sb.append(DIVIDER_96).append(NEWLINE); // # names with system structure only - system group, system, system + subsystem sb.append("ESS Name " + metricsEssName).append(NEWLINE); - sb.append(DIVIDER_64).append(NEWLINE); + sb.append(addSpaceUntilSize("", 47) + NBR_LEGACY + nbrEssNameLegacy).append(NEWLINE); + sb.append(DIVIDER_96).append(NEWLINE); sb.append("System structure " + metricsEssNameSystemstructure).append(NEWLINE); sb.append("System structure + Device structure " + metricsEssNameSystemstructureDevicestructure).append(NEWLINE); sb.append("System structure + Device structure + Index " + metricsEssNameSystemstructureDevicestructureIndex).append(NEWLINE);