private void styleDistributionTableOnPinning() { managementUIState.getDistributionTableFilters().getPinnedTarget().map(TargetIdName::getControllerId) .ifPresent(controllerId -> { final Long installedDistId = deploymentManagement.getInstalledDistributionSet(controllerId) .map(DistributionSet::getId).orElse(null); final Long assignedDistId = deploymentManagement.getAssignedDistributionSet(controllerId) .map(DistributionSet::getId).orElse(null); styleDistributionSetTable(installedDistId, assignedDistId); }); }
private void styleDistributionTableOnPinning() { managementUIState.getDistributionTableFilters().getPinnedTarget().map(TargetIdName::getControllerId) .ifPresent(controllerId -> { final Long installedDistId = deploymentManagement.getInstalledDistributionSet(controllerId) .map(DistributionSet::getId).orElse(null); final Long assignedDistId = deploymentManagement.getAssignedDistributionSet(controllerId) .map(DistributionSet::getId).orElse(null); styleDistributionSetTable(installedDistId, assignedDistId); }); }
@Override public ResponseEntity<MgmtDistributionSet> getInstalledDistributionSet( @PathVariable("targetId") final String targetId) { final MgmtDistributionSet distributionSetRest = deploymentManagement.getInstalledDistributionSet(targetId) .map(set -> { final MgmtDistributionSet response = MgmtDistributionSetMapper.toResponse(set); MgmtDistributionSetMapper.addLinks(set, response); return response; }).orElse(null); if (distributionSetRest == null) { return ResponseEntity.noContent().build(); } return ResponseEntity.ok(distributionSetRest); }
@Override protected void populateDetailsWidget() { if (getSelectedBaseEntity() != null) { final String controllerId = getSelectedBaseEntity().getControllerId(); updateAttributesLayout(controllerId); updateDetailsLayout(controllerId, getSelectedBaseEntity().getAddress(), getSelectedBaseEntity().getSecurityToken(), SPDateTimeUtil.getFormattedDate(getSelectedBaseEntity().getLastTargetQuery())); populateDistributionDtls(assignedDistLayout, deploymentManagement.getAssignedDistributionSet(controllerId).orElse(null)); populateDistributionDtls(installedDistLayout, deploymentManagement.getInstalledDistributionSet(controllerId).orElse(null)); } else { updateAttributesLayout(null); updateDetailsLayout(null, null, null, null); populateDistributionDtls(installedDistLayout, null); populateDistributionDtls(assignedDistLayout, null); } populateTags(targetTagToken); populateMetadataDetails(); }
@Override protected void populateDetailsWidget() { if (getSelectedBaseEntity() != null) { final String controllerId = getSelectedBaseEntity().getControllerId(); updateAttributesLayout(controllerId); updateDetailsLayout(controllerId, getSelectedBaseEntity().getAddress(), getSelectedBaseEntity().getSecurityToken(), SPDateTimeUtil.getFormattedDate(getSelectedBaseEntity().getLastTargetQuery())); populateDistributionDtls(assignedDistLayout, deploymentManagement.getAssignedDistributionSet(controllerId).orElse(null)); populateDistributionDtls(installedDistLayout, deploymentManagement.getInstalledDistributionSet(controllerId).orElse(null)); } else { updateAttributesLayout(null); updateDetailsLayout(null, null, null, null); populateDistributionDtls(installedDistLayout, null); populateDistributionDtls(assignedDistLayout, null); } populateTags(targetTagToken); populateMetadataDetails(); }
getDeploymentManagement().getAssignedDistributionSet(targ.getControllerId()) .ifPresent(prxyTarget::setAssignedDistributionSet); getDeploymentManagement().getInstalledDistributionSet(targ.getControllerId()) .ifPresent(prxyTarget::setInstalledDistributionSet);
getDeploymentManagement().getAssignedDistributionSet(targ.getControllerId()) .ifPresent(prxyTarget::setAssignedDistributionSet); getDeploymentManagement().getInstalledDistributionSet(targ.getControllerId()) .ifPresent(prxyTarget::setInstalledDistributionSet);