mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-30 15:57:11 +00:00
Merge branch 'bug3027' into ubilabs--rcapp--bug-3010
This commit is contained in:
commit
e9b46abbf2
7 files changed
+34
-9
No files matched your search
@@ -51,5 +51,7 @@ bin.includes = META-INF/,\
|
||||
AutoPlay.html,\
|
||||
Home.css,\
|
||||
Home.html,\
|
||||
SettingsDialog.css
|
||||
SettingsDialog.css,\
|
||||
EmbeddedMapAndWindChart.css,\
|
||||
EmbeddedMapAndWindChart.html
|
||||
output.. = WEB-INF/classes/
|
||||
Binary file not shown.
+1
-1
@@ -157,7 +157,7 @@ public class EventDetailsComposite extends Composite {
|
||||
}
|
||||
videoURLList.setValues(videoURLStringsAsList);
|
||||
List<String> leaderboardGroupNamesAsList = new ArrayList<>();
|
||||
for(LeaderboardGroupDTO leaderboardGroupDTO: event.getLeaderboardGroups()) {
|
||||
for (LeaderboardGroupDTO leaderboardGroupDTO : event.getLeaderboardGroups()) {
|
||||
leaderboardGroupNamesAsList.add(leaderboardGroupDTO.getName());
|
||||
}
|
||||
leaderboardGroupList.setValues(leaderboardGroupNamesAsList);
|
||||
|
||||
+11
-5
@@ -4,7 +4,9 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
@@ -45,7 +47,7 @@ public abstract class EventDialog extends DataEntryDialogWithBootstrap<EventDTO>
|
||||
protected TextBox sailorsInfoWebsiteURLEntryField;
|
||||
protected StringListInlineEditorComposite courseAreaNameList;
|
||||
protected StringConstantsListEditorComposite leaderboardGroupList;
|
||||
protected List<LeaderboardGroupDTO> availableLeaderboardGroups;
|
||||
protected Map<String, LeaderboardGroupDTO> availableLeaderboardGroupsByName;
|
||||
protected ImagesListComposite imagesListComposite;
|
||||
protected VideosListComposite videosListComposite;
|
||||
|
||||
@@ -120,7 +122,10 @@ public abstract class EventDialog extends DataEntryDialogWithBootstrap<EventDTO>
|
||||
super(stringMessages.event(), null, stringMessages.ok(), stringMessages.cancel(), validator,
|
||||
callback);
|
||||
this.stringMessages = stringMessages;
|
||||
this.availableLeaderboardGroups = availableLeaderboardGroups;
|
||||
this.availableLeaderboardGroupsByName = new HashMap<>();
|
||||
for (final LeaderboardGroupDTO lgDTO : availableLeaderboardGroups) {
|
||||
availableLeaderboardGroupsByName.put(lgDTO.getName(), lgDTO);
|
||||
}
|
||||
getDialogBox().getWidget().setWidth("730px");
|
||||
final ValueChangeHandler<Iterable<String>> valueChangeHandler = new ValueChangeHandler<Iterable<String>>() {
|
||||
@Override
|
||||
@@ -150,9 +155,10 @@ public abstract class EventDialog extends DataEntryDialogWithBootstrap<EventDTO>
|
||||
protected EventDTO getResult() {
|
||||
EventDTO result = new EventDTO();
|
||||
List<String> leaderboardGroupNames = leaderboardGroupList.getValue();
|
||||
for(LeaderboardGroupDTO lg: availableLeaderboardGroups) {
|
||||
if(leaderboardGroupNames.contains(lg.getName())) {
|
||||
result.addLeaderboardGroup(lg);
|
||||
for (final String lgName : leaderboardGroupNames) {
|
||||
final LeaderboardGroupDTO lgDTO = availableLeaderboardGroupsByName.get(lgName);
|
||||
if (lgDTO != null) {
|
||||
result.addLeaderboardGroup(lgDTO);
|
||||
}
|
||||
}
|
||||
result.setName(nameEntryField.getText());
|
||||
|
||||
+2
-1
@@ -772,7 +772,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
|
||||
private MarkDTO convertToMarkDTO(Mark mark, Position position) {
|
||||
MarkDTO markDTO;
|
||||
if(position != null) {
|
||||
if (position != null) {
|
||||
markDTO = new MarkDTO(mark.getId().toString(), mark.getName(), position.getLatDeg(), position.getLngDeg());
|
||||
} else {
|
||||
markDTO = new MarkDTO(mark.getId().toString(), mark.getName());
|
||||
@@ -1864,6 +1864,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
result.totalLegsCount = trackedRace.getRace().getCourse().getLegs().size();
|
||||
result.currentLegNumber = trackedRace.getLastLegStarted(dateAsTimePoint);
|
||||
result.marks = new HashSet<MarkDTO>();
|
||||
result.course = new ArrayList<>();
|
||||
result.waypointPositions = new ArrayList<>();
|
||||
Set<Mark> marks = new HashSet<Mark>();
|
||||
Course course = trackedRace.getRace().getCourse();
|
||||
|
||||
+1
@@ -8,6 +8,7 @@ import com.sap.sailing.domain.common.NauticalSide;
|
||||
import com.sap.sailing.domain.common.Position;
|
||||
|
||||
public class CoursePositionsDTO implements IsSerializable {
|
||||
public List<WaypointDTO> course;
|
||||
public List<Position> waypointPositions;
|
||||
public List<Position> startMarkPositions;
|
||||
public List<Position> finishMarkPositions;
|
||||
|
||||
+16
-1
@@ -3,6 +3,7 @@ package com.sap.sailing.gwt.ui.shared;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -21,7 +22,21 @@ public class RaceCourseDTO implements IsSerializable {
|
||||
}
|
||||
|
||||
public RaceCourseDTO(List<WaypointDTO> waypoints) {
|
||||
this(waypoints, null);
|
||||
this(waypoints, getMarksFromWaypoints(waypoints));
|
||||
}
|
||||
|
||||
private static List<MarkDTO> getMarksFromWaypoints(List<WaypointDTO> waypoints) {
|
||||
final LinkedHashSet<MarkDTO> marks = new LinkedHashSet<>();
|
||||
for (final WaypointDTO waypoint : waypoints) {
|
||||
for (final MarkDTO m : waypoint.controlPoint.getMarks()) {
|
||||
marks.add(m);
|
||||
}
|
||||
}
|
||||
final List<MarkDTO> result = new ArrayList<>();
|
||||
for (final MarkDTO m : marks) {
|
||||
result.add(m);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public RaceCourseDTO(List<WaypointDTO> waypoints, List<MarkDTO> allMarks) {
|
||||
|
||||
Reference in new issue
Block a user