mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-21 14:24:06 +01:00
Set CET for date display of monitor. Fix numErrors display
This commit is contained in:
parent
f9f510ef1b
commit
a5e3072772
1 changed files with 7 additions and 2 deletions
|
@ -81,6 +81,11 @@ public class MetricsByNodeAddressMap extends HashMap<NodeAddress, Metrics> {
|
|||
averageValues.put(e.getKey(), e.getValue() / items[0]);
|
||||
});
|
||||
|
||||
Calendar calendar = new GregorianCalendar();
|
||||
calendar.setTimeZone(TimeZone.getTimeZone("CET"));
|
||||
calendar.setTimeInMillis(lastCheckTs);
|
||||
final String time = calendar.getTime().toString();
|
||||
|
||||
StringBuilder html = new StringBuilder();
|
||||
html.append("<html>" +
|
||||
"<head>" +
|
||||
|
@ -89,7 +94,7 @@ public class MetricsByNodeAddressMap extends HashMap<NodeAddress, Metrics> {
|
|||
"<body>" +
|
||||
"<h1>")
|
||||
.append("Seed nodes in error: <b>" + totalErrors + "</b><br/>" +
|
||||
"Last check started at: " + new Date(lastCheckTs).toString() + "<br/>" +
|
||||
"Last check started at: " + time + "<br/>" +
|
||||
"<table style=\"width:100%\">" +
|
||||
"<tr>" +
|
||||
"<th align=\"left\">Operator</th>" +
|
||||
|
@ -113,7 +118,7 @@ public class MetricsByNodeAddressMap extends HashMap<NodeAddress, Metrics> {
|
|||
final NodeAddress nodeAddress = e.getKey();
|
||||
final String operator = seedNodesRepository.getOperator(nodeAddress);
|
||||
final List<String> errorMessages = e.getValue().getErrorMessages();
|
||||
final int numErrors = errorMessages.size();
|
||||
final int numErrors = (int) errorMessages.stream().filter(s -> !s.isEmpty()).count();
|
||||
int numRequests = allDurations.size();
|
||||
final String lastErrorMsg = numErrors > 0 ? errorMessages.get(errorMessages.size() - 1) : "";
|
||||
final List<Map<String, Integer>> allReceivedData = e.getValue().getReceivedObjectsList();
|
||||
|
|
Loading…
Add table
Reference in a new issue