@CliCommand(value = {"admin config info"}, help = "Show the XD admin server being used")
public String info() {
final Map<String, String> statusValues = new TreeMap<String, String>();
final Target target = configuration.getTarget();
statusValues.put("Target", target.getTargetUriAsString());
if (target.getTargetCredentials() != null) {
statusValues.put("Credentials", target.getTargetCredentials().getDisplayableContents());
}
statusValues.put("Result", target.getTargetResultMessage() != null ? target.getTargetResultMessage() : "");
statusValues.put("Timezone used", CommonUtils.getTimeZoneNameWithOffset(this.configuration.getClientTimeZone()));
final StringBuilder sb = new StringBuilder(UiUtils.renderParameterInfoDataAsTable(statusValues, false, 66));
if (TargetStatus.ERROR.equals(target.getStatus())) {
sb.append(UiUtils.HORIZONTAL_LINE);
sb.append("An exception ocurred during targeting:\n");
final StringWriter stringWriter = new StringWriter();
target.getTargetException().printStackTrace(new PrintWriter(stringWriter));
sb.append(stringWriter.toString());
}
return sb.toString();
}