Skip to content

Commit

Permalink
fix prsentation of tx server errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Grahame Grieve committed Nov 25, 2024
1 parent 44d682e commit f8071a4
Showing 1 changed file with 39 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -488,21 +488,54 @@ private void genTXServerQA(String title, String path) throws IOException {
ul = x.ul();
ul.li().tx("(No Errors/Reports - all good)");
} else {
x.para().b().tx("Decisions");
XhtmlNode tbl = x.table("grid");
XhtmlNode tr = tbl.tr();
tr.td().b().tx("Message");
tr.td().b().tx("Server");
tr.td().b().tx("ValueSet");
tr.td().b().tx("Systems");
tr.td().b().tx("Choices");
boolean isErr = false;
Set<String> contexts = new HashSet<>();
for (InternalLogEvent log : txServers.getInternalLog()) {
if (!log.isError()) {
tr = tbl.tr();
tr.td().tx(log.getMessage());
tr.td().tx(log.getServer());
tr.td().tx(log.getVs());
tr.td().tx(log.getSystems());
tr.td().tx(log.getChoices());
} else {
isErr = true;
contexts.add(log.getContext());
}
}
if (isErr) {
x.para().b().tx("Errors");
tbl = x.table("grid");
tr = tbl.tr();
tr.td().tx(log.getMessage());
tr.td().tx(log.getServer());
tr.td().tx(log.getVs());
tr.td().tx(log.getSystems());
tr.td().tx(log.getChoices());
}
tr.td().b().tx("URL");
tr.td().b().tx("Message");
for (String c : Utilities.sorted(contexts)) {
tr = tbl.tr();
tr.td().tx(c);
List<InternalLogEvent> list = new ArrayList<TerminologyClientManager.InternalLogEvent>();
for (InternalLogEvent log : txServers.getInternalLog()) {
if (log.isError() && c.equals(log.getContext())) {
list.add(log);
}
}
if (list.size() == 1) {
tr.td().style("background-color: #ffe3e3").span().attribute("title",list.get(0).getRequest()).tx(list.get(0).getMessage());
} else {
ul = tr.td().style("background-color: #ffe3e3").ul();
for (InternalLogEvent log : list) {
ul.li().span().attribute("title", log.getRequest()).tx(log.getMessage());
}
}
}
}
}

TerminologyClientContext master = txServers.getServerList().get(0);
Expand Down

0 comments on commit f8071a4

Please sign in to comment.