mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-21 05:05:31 +00:00
Merge branch 'master' of ssh://sapsailing.com/home/trac/git
This commit is contained in:
+5
-9
@@ -42,12 +42,10 @@ public class ExpeditionWindMeasureStatusGetServlet extends SailingServerHttpServ
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
if(!isExpeditionListenerRegistered) {
|
||||
if (!isExpeditionListenerRegistered) {
|
||||
isExpeditionListenerRegistered = registerExpeditionListener();
|
||||
}
|
||||
|
||||
resp.setContentType("text/html");
|
||||
|
||||
PrintWriter out = resp.getWriter();
|
||||
out.println("<html>");
|
||||
out.println("<head>");
|
||||
@@ -56,17 +54,16 @@ public class ExpeditionWindMeasureStatusGetServlet extends SailingServerHttpServ
|
||||
out.println("<body>");
|
||||
out.println("<h3>Expedition Wind Status</h3>");
|
||||
out.println("<input type='button' value='Refresh' onClick='window.location.reload()'><br/>");
|
||||
|
||||
if(lastMessageInfosPerBoat.size() > 0) {
|
||||
if (lastMessageInfosPerBoat.size() > 0) {
|
||||
Date now = new Date();
|
||||
List<Integer> messagesToDrop = new ArrayList<Integer>();
|
||||
for(ExpeditionMessageInfo info: lastMessageInfosPerBoat.values()) {
|
||||
for (ExpeditionMessageInfo info: lastMessageInfosPerBoat.values()) {
|
||||
out.println("Boat-No:" + " " + info.boatID);
|
||||
out.println("<br/>");
|
||||
long timeSinceLastMessageInMs = now.getTime() - info.messageReceivedAt.getTime();
|
||||
if(timeSinceLastMessageInMs > MAX_TIME_SINCE_LAST_MESSAGE) {
|
||||
if (timeSinceLastMessageInMs > MAX_TIME_SINCE_LAST_MESSAGE) {
|
||||
messagesToDrop.add(info.boatID);
|
||||
} else if(timeSinceLastMessageInMs > MIN_TIME_SINCE_LAST_MESSAGE) {
|
||||
} else if (timeSinceLastMessageInMs > MIN_TIME_SINCE_LAST_MESSAGE) {
|
||||
long hours = TimeUnit.MILLISECONDS.toHours(timeSinceLastMessageInMs);
|
||||
long minutes = TimeUnit.MILLISECONDS.toMinutes(timeSinceLastMessageInMs) - TimeUnit.HOURS.toMinutes(hours);
|
||||
long seconds = TimeUnit.MILLISECONDS.toSeconds(timeSinceLastMessageInMs) - (TimeUnit.MINUTES.toSeconds(minutes) + TimeUnit.HOURS.toSeconds(hours));
|
||||
@@ -90,7 +87,6 @@ public class ExpeditionWindMeasureStatusGetServlet extends SailingServerHttpServ
|
||||
} else {
|
||||
out.println("No expedition wind sources available.");
|
||||
}
|
||||
|
||||
out.println("</body>");
|
||||
out.println("</html>");
|
||||
out.close();
|
||||
|
||||
-2
@@ -66,7 +66,6 @@ public class TrackedRaceListResource extends AbstractSailingServerResource {
|
||||
public Response raceList(@QueryParam("transitive") Boolean transitive) {
|
||||
final boolean includeRemotes = transitive != null && Boolean.TRUE.equals(transitive);
|
||||
final Map<RegattaAndRaceIdentifier, SimpleRaceInfo> distinctRaces = getDistinctRaces(includeRemotes);
|
||||
|
||||
final HashMap<String, List<SimpleRaceInfo>> raceData = new HashMap<>();
|
||||
distinctRaces.values().forEach(raceInfo -> {
|
||||
final String remoteUrl = raceInfo.getRemoteUrl() == null ? null : raceInfo.getRemoteUrl().toExternalForm();
|
||||
@@ -76,7 +75,6 @@ public class TrackedRaceListResource extends AbstractSailingServerResource {
|
||||
}
|
||||
remoteList.add(raceInfo);
|
||||
});
|
||||
|
||||
final JSONArray json = new JSONArray();
|
||||
for (Entry<String, List<SimpleRaceInfo>> raced : raceData.entrySet()) {
|
||||
JSONArray list = new JSONArray();
|
||||
|
||||
@@ -1 +1 @@
|
||||
See http://wiki.sapsailing.com/wiki/info/landscape/typical-development-scenarios#typical-development-scenarios_adding-a-bundle-to-the-target-platform
|
||||
See https://wiki.sapsailing.com/wiki/info/landscape/typical-development-scenarios#typical-development-scenarios_adding-a-bundle-to-the-target-platform
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user