Merge remote-tracking branch 'origin/master' into ribdashboard

This commit is contained in:
Alexander Ries committed 2016-02-18 12:54:39 +01:00
commit 952eddcbb6
27 files changed
+309 -41

No files matched your search

@@ -7,7 +7,7 @@ public interface TracTracConnectionConstants {
final int PORT_TUNNEL_LIVE = 1520; //For official usage use 4412;
final int PORT_TUNNEL_STORED = PORT_TUNNEL_LIVE + 1; //For official usage use 4413;
final int PORT_LIVE = 4400; //For official usage use 4400; for SAP-dedicated server use 1520
final int PORT_LIVE = 1520; //For official usage use 4400; for SAP-dedicated server use 1520
final int PORT_STORED = PORT_LIVE + 1; //For official usage use 4401;
/*
@@ -51,7 +51,7 @@ public abstract class AbstractRegattaWithSeriesAndFleetsDialog<T> extends DataEn
protected final ListBox courseAreaListBox;
protected final ListBox sailingEventsListBox;
protected final CheckBox useStartTimeInferenceCheckBox;
private final ListEditorComposite<SeriesDTO> seriesEditor;
protected final ListEditorComposite<SeriesDTO> seriesEditor;
private final ListBox rankingMetricListBox;
protected final List<EventDTO> existingEvents;
@@ -0,0 +1,19 @@
package com.sap.sailing.gwt.ui.adminconsole;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sse.gwt.client.ErrorReporter;
import com.sap.sse.gwt.client.dialog.DataEntryDialog;
public class CreateDefaultLeaderboardGroupDialog extends DataEntryDialog<Void> {
public CreateDefaultLeaderboardGroupDialog(SailingServiceAsync sailingService, StringMessages stringMessages,
ErrorReporter errorReporter, DialogCallback<Void> dialogCallBack) {
super(stringMessages.createDefaultLeaderboardGroup(), /* message */ stringMessages.createDefaultLeaderboardGroup(),
stringMessages.yes(), stringMessages.no(), /* validator */ null, dialogCallBack);
}
@Override
protected Void getResult() {
return null;
}
}
@@ -8,7 +8,7 @@ import com.sap.sailing.gwt.ui.shared.RegattaDTO;
import com.sap.sse.gwt.client.ErrorReporter;
import com.sap.sse.gwt.client.dialog.DataEntryDialog;
public class CreateDefaultRegattaLeaderboardDialog extends DataEntryDialog<RegattaIdentifier>{
public class CreateDefaultRegattaLeaderboardDialog extends DataEntryDialog<RegattaIdentifier> {
private RegattaDTO regatta;
@@ -39,5 +39,7 @@ public class EventCreateDialog extends EventDialog {
isPublicCheckBox.setValue(false);
imagesListComposite.fillImages(Collections.<ImageDTO>emptyList());
videosListComposite.fillVideos(Collections.<VideoDTO>emptyList());
// add default course area
courseAreaNameList.setValue(Collections.singletonList("Default"));
}
}
@@ -9,6 +9,8 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
@@ -230,7 +232,6 @@ public abstract class EventDialog extends DataEntryDialogWithBootstrap<EventDTO>
@Override
public void show() {
super.show();
nameEntryField.setFocus(true);
Scheduler.get().scheduleFinally(new ScheduledCommand() { @Override public void execute() { nameEntryField.setFocus(true); }});
}
}
@@ -32,6 +32,7 @@ import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.view.client.ListDataProvider;
import com.google.gwt.view.client.SelectionChangeEvent;
import com.sap.sailing.gwt.ui.adminconsole.LeaderboardGroupDialog.LeaderboardGroupDescriptor;
import com.sap.sailing.gwt.ui.client.EntryPointLinkFactory;
import com.sap.sailing.gwt.ui.client.EventsRefresher;
import com.sap.sailing.gwt.ui.client.LeaderboardGroupsDisplayer;
@@ -41,6 +42,7 @@ import com.sap.sailing.gwt.ui.client.shared.controls.FlushableCellTable;
import com.sap.sailing.gwt.ui.client.shared.controls.SelectionCheckboxColumn;
import com.sap.sailing.gwt.ui.common.client.DateAndTimeFormatterUtil;
import com.sap.sailing.gwt.ui.shared.CourseAreaDTO;
import com.sap.sailing.gwt.ui.shared.EventBaseDTO;
import com.sap.sailing.gwt.ui.shared.EventDTO;
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
@@ -48,6 +50,7 @@ import com.sap.sse.common.Util;
import com.sap.sse.common.Util.Pair;
import com.sap.sse.common.util.NaturalComparator;
import com.sap.sse.gwt.client.ErrorReporter;
import com.sap.sse.gwt.client.async.MarkedAsyncCallback;
import com.sap.sse.gwt.client.celltable.EntityIdentityComparator;
import com.sap.sse.gwt.client.celltable.RefreshableMultiSelectionModel;
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
@@ -433,7 +436,7 @@ public class EventListComposite extends Composite implements EventsRefresher, Le
private void openCreateEventDialog() {
List<EventDTO> existingEvents = new ArrayList<EventDTO>(eventListDataProvider.getList());
List<LeaderboardGroupDTO> existingLeaderboardGroups = new ArrayList<LeaderboardGroupDTO>();
final List<LeaderboardGroupDTO> existingLeaderboardGroups = new ArrayList<LeaderboardGroupDTO>();
Util.addAll(availableLeaderboardGroups, existingLeaderboardGroups);
EventCreateDialog dialog = new EventCreateDialog(Collections.unmodifiableCollection(existingEvents), existingLeaderboardGroups,
sailingService, stringMessages, new DialogCallback<EventDTO>() {
@@ -442,12 +445,57 @@ public class EventListComposite extends Composite implements EventsRefresher, Le
}
@Override
public void ok(EventDTO newEvent) {
createNewEvent(newEvent);
public void ok(final EventDTO newEvent) {
createNewEvent(newEvent, existingLeaderboardGroups);
}
});
dialog.show();
}
/**
* @param newEvent the new event as created by the server, already including a valid {@link EventBaseDTO#id} value.
*/
private void openLeaderboardGroupCreationDialog(final List<LeaderboardGroupDTO> existingLeaderboardGroups, final EventDTO newEvent) {
LeaderboardGroupCreateDialog leaderboardGroupCreateDialog = new LeaderboardGroupCreateDialog(existingLeaderboardGroups, stringMessages, new DialogCallback<LeaderboardGroupDialog.LeaderboardGroupDescriptor>() {
@Override
public void ok(final LeaderboardGroupDescriptor newGroup) {
sailingService.createLeaderboardGroup(newGroup.getName(), newGroup.getDescription(),
newGroup.getDisplayName(), newGroup.isDisplayLeaderboardsInReverseOrder(),
newGroup.getOverallLeaderboardDiscardThresholds(), newGroup.getOverallLeaderboardScoringSchemeType(), new MarkedAsyncCallback<LeaderboardGroupDTO>(
new AsyncCallback<LeaderboardGroupDTO>() {
@Override
public void onFailure(Throwable t) {
errorReporter.reportError("Error trying to create new leaderboard group" + newGroup.getName()
+ ": " + t.getMessage());
}
@Override
public void onSuccess(LeaderboardGroupDTO newGroup) {
newEvent.addLeaderboardGroup(newGroup);
// fillEvents() will have replaced newEvent in allEvents by a new copy coming from the server which
// doesn't know about the new leaderboard group yet. An updateEvent call will link the leaderboard group
// to the event on the server
EventDTO matchingEvent = null;
for (EventDTO event : allEvents) {
if (event.id.equals(newEvent.id)) {
matchingEvent = event;
}
}
if (matchingEvent != null) {
updateEvent(matchingEvent, newEvent);
} else {
errorReporter.reportError("Could not find the event with name "+newEvent.getName()+" to which the leaderboardgroup should be added");
}
}
}));
}
@Override
public void cancel() {
}
});
leaderboardGroupCreateDialog.setFieldsBasedOnEventName(newEvent.getName());
leaderboardGroupCreateDialog.show();
}
private void openEditEventDialog(final EventDTO selectedEvent) {
List<EventDTO> existingEvents = new ArrayList<EventDTO>(eventListDataProvider.getList());
@@ -548,7 +596,7 @@ public class EventListComposite extends Composite implements EventsRefresher, Le
return new Pair<List<CourseAreaDTO>, List<CourseAreaDTO>>(courseAreasToAdd, courseAreasToRemove);
}
private void createNewEvent(final EventDTO newEvent) {
private void createNewEvent(final EventDTO newEvent, final List<LeaderboardGroupDTO> existingLeaderboardGroups) {
List<String> courseAreaNames = new ArrayList<String>();
for (CourseAreaDTO courseAreaDTO : newEvent.venue.getCourseAreas()) {
courseAreaNames.add(courseAreaDTO.getName());
@@ -562,8 +610,21 @@ public class EventListComposite extends Composite implements EventsRefresher, Le
}
@Override
public void onSuccess(EventDTO newEvent) {
public void onSuccess(final EventDTO newEvent) {
fillEvents();
if (newEvent.getLeaderboardGroups().isEmpty()) {
// show simple Dialog
new CreateDefaultLeaderboardGroupDialog(sailingService, stringMessages, errorReporter, new DialogCallback<Void>() {
@Override
public void ok(Void editedObject) {
openLeaderboardGroupCreationDialog(existingLeaderboardGroups, newEvent);
}
@Override
public void cancel() {
}
}).show();
}
}
});
}
@@ -23,4 +23,10 @@ public class LeaderboardGroupCreateDialog extends LeaderboardGroupDialog {
displayLeaderboardsInReverseOrderCheckBox.setValue(false);
useOverallLeaderboardCheckBox.setValue(false);
}
public void setFieldsBasedOnEventName(String name) {
nameEntryField.setText(name);
descriptionEntryField.setText(name);
validate();
}
}
@@ -0,0 +1,61 @@
package com.sap.sailing.gwt.ui.adminconsole;
import java.util.ArrayList;
import java.util.List;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.shared.EventDTO;
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
import com.sap.sse.gwt.client.ErrorReporter;
import com.sap.sse.gwt.client.dialog.DataEntryDialog;
public class LinkRegattaLeaderboardToLeaderboardGroupOfEventDialog extends DataEntryDialog<LeaderboardGroupDTO> {
private final List<LeaderboardGroupDTO> leaderboardGroups;
private ListBox leaderboardGroupsBox;
public LinkRegattaLeaderboardToLeaderboardGroupOfEventDialog(SailingServiceAsync sailingService, final StringMessages stringMessages,
ErrorReporter errorReporter, StrippedLeaderboardDTO leaderboard, EventDTO event, DialogCallback<LeaderboardGroupDTO> callback) {
super(stringMessages.linkLeaderboardToLeaderboardGroupOfEvent(),
/*message*/ stringMessages.doYouWantToLinkLeaderboardToLeaderboardGroupOfEvent(leaderboard.name, event.getName()),
stringMessages.yes(), stringMessages.no(),
/*validator*/ new Validator<LeaderboardGroupDTO>() {
@Override
public String getErrorMessage(LeaderboardGroupDTO selectedLeaderboardGroup) {
final String errorMessage;
if (selectedLeaderboardGroup == null) {
errorMessage = stringMessages.pleaseSelectALeaderboardGroup();
} else {
errorMessage = null;
}
return errorMessage;
}
}, callback);
this.leaderboardGroups = new ArrayList<>();
leaderboardGroupsBox = createListBox(/* isMultipleSelect */ false);
for (final LeaderboardGroupDTO lgDTO : event.getLeaderboardGroups()) {
this.leaderboardGroups.add(lgDTO);
this.leaderboardGroupsBox.addItem(lgDTO.getName());
}
}
@Override
protected Widget getAdditionalWidget() {
return leaderboardGroupsBox;
}
@Override
protected LeaderboardGroupDTO getResult() {
final LeaderboardGroupDTO result;
if (leaderboardGroupsBox.getSelectedItemText() == null) {
result = null;
} else {
result = leaderboardGroups.get(leaderboardGroupsBox.getSelectedIndex());
}
return result;
}
}
@@ -6,6 +6,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.UUID;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
@@ -25,11 +26,14 @@ import com.sap.sailing.gwt.ui.client.RegattaRefresher;
import com.sap.sailing.gwt.ui.client.RegattasDisplayer;
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.shared.CourseAreaDTO;
import com.sap.sailing.gwt.ui.shared.EventDTO;
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
import com.sap.sailing.gwt.ui.shared.SeriesDTO;
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
import com.sap.sse.gwt.client.ErrorReporter;
import com.sap.sse.gwt.client.async.MarkedAsyncCallback;
import com.sap.sse.gwt.client.celltable.RefreshableMultiSelectionModel;
import com.sap.sse.gwt.client.dialog.DataEntryDialog.DialogCallback;
@@ -154,7 +158,6 @@ public class RegattaManagementPanel extends SimplePanel implements RegattasDispl
private void openCreateRegattaDialog() {
final Collection<RegattaDTO> existingRegattas = Collections.unmodifiableCollection(regattaListComposite.getAllRegattas());
sailingService.getEvents(new AsyncCallback<List<EventDTO>>() {
@Override
public void onFailure(Throwable caught) {
@@ -168,7 +171,7 @@ public class RegattaManagementPanel extends SimplePanel implements RegattasDispl
});
}
private void openCreateRegattaDialog(Collection<RegattaDTO> existingRegattas, List<EventDTO> existingEvents) {
private void openCreateRegattaDialog(Collection<RegattaDTO> existingRegattas, final List<EventDTO> existingEvents) {
RegattaWithSeriesAndFleetsCreateDialog dialog = new RegattaWithSeriesAndFleetsCreateDialog(existingRegattas, existingEvents, stringMessages,
new DialogCallback<RegattaDTO>() {
@Override
@@ -177,15 +180,14 @@ public class RegattaManagementPanel extends SimplePanel implements RegattasDispl
@Override
public void ok(RegattaDTO newRegatta) {
createNewRegatta(newRegatta);
openCreateDefaultRegattaLeaderboardDialog(newRegatta);
createNewRegatta(newRegatta, existingEvents);
}
});
dialog.ensureDebugId("RegattaCreateDialog");
dialog.show();
}
private void openCreateDefaultRegattaLeaderboardDialog(final RegattaDTO newRegatta){
private void openCreateDefaultRegattaLeaderboardDialog(final RegattaDTO newRegatta, final List<EventDTO> existingEvents) {
CreateDefaultRegattaLeaderboardDialog dialog = new CreateDefaultRegattaLeaderboardDialog(sailingService, stringMessages, errorReporter, newRegatta, new DialogCallback<RegattaIdentifier>() {
@Override
public void ok(RegattaIdentifier regattaIdentifier) {
@@ -199,7 +201,15 @@ public class RegattaManagementPanel extends SimplePanel implements RegattasDispl
@Override
public void onSuccess(StrippedLeaderboardDTO result) {
if (newRegatta.defaultCourseAreaUuid != null) {
// Show the event's leaderboard groups and allow the user to pick one to assign the regatta leaderboard to
final EventDTO event = getEventForCourseArea(existingEvents, newRegatta.defaultCourseAreaUuid);
if (!event.getLeaderboardGroups().isEmpty()) {
openRegattaLeaderboardToLeaderboardGroupOfEventLinkingDialog(result, event);
}
}
}
});
}
@@ -207,12 +217,66 @@ public class RegattaManagementPanel extends SimplePanel implements RegattasDispl
public void cancel() {
}
});
dialog.ensureDebugId("CreateDefaultRegattaDialog");
dialog.show();
}
private void createNewRegatta(final RegattaDTO newRegatta) {
/**
* When a new regatta with a new regatta leaderboard has been created, the user will now be given the chance to link
* the regatta leaderboard into a leaderboard group of the event out of which the regatta chose its default course area.
*
* @param newRegattaLeaderboard the new regatta leaderboard that the user may link now to a leaderboard group of an event
* @param eventToLinkRegattaTo an event that has at least one {@link EventDTO#getLeaderboardGroups() leaderboard group}
*/
private void openRegattaLeaderboardToLeaderboardGroupOfEventLinkingDialog(final StrippedLeaderboardDTO newRegattaLeaderboard, EventDTO eventToLinkRegattaTo) {
LinkRegattaLeaderboardToLeaderboardGroupOfEventDialog dialog = new LinkRegattaLeaderboardToLeaderboardGroupOfEventDialog(sailingService, stringMessages, errorReporter, newRegattaLeaderboard, eventToLinkRegattaTo,
new DialogCallback<LeaderboardGroupDTO>() {
@Override
public void ok(final LeaderboardGroupDTO selectedLeaderboardGroup) {
final List<String> leaderboardNames = new ArrayList<>();
for (StrippedLeaderboardDTO leaderboard : selectedLeaderboardGroup.getLeaderboards()) {
leaderboardNames.add(leaderboard.name);
}
leaderboardNames.add(newRegattaLeaderboard.name);
sailingService.updateLeaderboardGroup(selectedLeaderboardGroup.getName(), selectedLeaderboardGroup.getName(), selectedLeaderboardGroup.description,
selectedLeaderboardGroup.getDisplayName(), leaderboardNames, selectedLeaderboardGroup.getOverallLeaderboardDiscardThresholds(),
selectedLeaderboardGroup.getOverallLeaderboardScoringSchemeType(), new MarkedAsyncCallback<Void>(new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable caught) {
errorReporter.reportError(stringMessages.failedToLinkLeaderboardToLeaderboardGroup(newRegattaLeaderboard.name, selectedLeaderboardGroup.getName()));
}
@Override
public void onSuccess(Void result) {
}
}));
}
@Override
public void cancel() {
}
});
dialog.ensureDebugId("LinkRegattaLeaderboardToLeaderboardGroupOfEventDialog");
dialog.show();
}
private EventDTO getEventForCourseArea(final List<EventDTO> existingEvents, final UUID courseAreaId) {
EventDTO result = null;
eventLoop:
for (final EventDTO event : existingEvents) {
if (event.venue != null) {
for (CourseAreaDTO courseArea : event.venue.getCourseAreas()) {
if (courseArea.id.equals(courseAreaId)) {
result = event;
break eventLoop;
}
}
}
}
return result;
}
private void createNewRegatta(final RegattaDTO newRegatta, final List<EventDTO> existingEvents) {
LinkedHashMap<String, SeriesCreationParametersDTO> seriesStructure = new LinkedHashMap<String, SeriesCreationParametersDTO>();
for (SeriesDTO seriesDTO : newRegatta.series) {
SeriesCreationParametersDTO seriesPair = new SeriesCreationParametersDTO(seriesDTO.getFleets(),
@@ -234,6 +298,7 @@ public class RegattaManagementPanel extends SimplePanel implements RegattasDispl
@Override
public void onSuccess(RegattaDTO regatta) {
regattaRefresher.fillRegattas();
openCreateDefaultRegattaLeaderboardDialog(regatta, existingEvents);
}
});
}
@@ -11,6 +11,8 @@ import com.google.gwt.core.shared.GWT;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.TabPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.sap.sailing.domain.common.LeaderboardNameConstants;
import com.sap.sailing.domain.common.dto.FleetDTO;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.shared.EventDTO;
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
@@ -103,6 +105,14 @@ public class RegattaWithSeriesAndFleetsCreateDialog extends RegattaWithSeriesAnd
List<EventDTO> existingEvents, StringMessages stringMessages, DialogCallback<RegattaDTO> callback) {
super(new RegattaDTO(), Collections.<SeriesDTO>emptySet(), existingEvents, stringMessages.addRegatta(), stringMessages.ok(),
stringMessages, new RegattaParameterValidator(stringMessages, existingRegattas), callback);
SeriesDTO series = new SeriesDTO();
series.setName("Default");
series.setMedal(false);
series.setStartsWithZeroScore(false);
series.setSplitFleetContiguousScoring(false);
series.setFirstColumnIsNonDiscardableCarryForward(false);
series.setFleets(Collections.singletonList(new FleetDTO(LeaderboardNameConstants.DEFAULT_FLEET_NAME, 0, null)));
seriesEditor.setValue(Collections.singleton(series));
}
@Override
@@ -1477,6 +1477,7 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages, c
String confirmLosingCompetitorEditsWhenTogglingLogBasedView();
String removalOfMarkDisabledMayBeUsedInRaces(String raceNames);
String pleaseCreateAtLeastOneMappingBy();
String createDefaultLeaderboardGroup();
String matcherType();
String matchingDevices();
String addDevice();
@@ -1485,4 +1486,8 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages, c
String create();
String thereIsAlreadyAConfigurationForThisDevice();
String enterDeviceIdentifierName();
String pleaseSelectALeaderboardGroup();
String linkLeaderboardToLeaderboardGroupOfEvent();
String doYouWantToLinkLeaderboardToLeaderboardGroupOfEvent(String leaderboardName, String eventName);
String failedToLinkLeaderboardToLeaderboardGroup(String leaderboardName, String leaderboardGroupName);
}
@@ -1444,6 +1444,8 @@ profile=Profile
showOnlyCompetitorsOfLog=Show only competitors registered in Log
confirmLosingCompetitorEditsWhenTogglingLogBasedView=This will reset your current, unsaved changes to the competitors.\nDo you really want to continue?
removalOfMarkDisabledMayBeUsedInRaces=Removal deavticated, marks are used in races {0}
pleaseCreateAtLeastOneMappingBy=Plase create at list one mapping by first selecting a track on the left hand side and then selecting a mark or competitor on the right hand side
createDefaultLeaderboardGroup=Would you like to create a default LeaderboardGroup for your event?
pleaseCreateAtLeastOneMappingBy=Please create at least one mapping by first selecting a track on the left hand side and then selecting a mark or competitor on the right hand side
matcherType=Matcher type
matchingDevices=Matching devices
@@ -1452,4 +1454,8 @@ createDeviceConfiguration=Create Device Configuration
forWhichDeviceShouldConfigurationApply=Specify for which device the new configuration should apply
create=Create
thereIsAlreadyAConfigurationForThisDevice=There is already a configuration for this device.
enterDeviceIdentifierName=Enter an identifier name
enterDeviceIdentifierName=Enter an identifier name
pleaseSelectALeaderboardGroup=Please select a leaderboard group
linkLeaderboardToLeaderboardGroupOfEvent=Link Leaderboard to Leaderboard Group of Event
doYouWantToLinkLeaderboardToLeaderboardGroupOfEvent=Link leaderboard {0} to a leaderboard group of event {1}
failedToLinkLeaderboardToLeaderboardGroup=Failed to link leaderboard {0} to leaderboard group {1}
@@ -1436,6 +1436,7 @@ scoringSchemeHighPointFirstGetsTwelveOrEightDescription=Scores als Punkte. Der G
scoringSchemeHighPointEssOverall12=High Point System ESS Gesamtwertung (12)
scoringSchemeHighPointEssOverall12Description=High Point System, der Gewinner eines Acts erhält 12 Punkte, der Zweite 11 und so weiter.
pleaseCreateAtLeastOneMappingBy=Bitte erstellen Sie mindestens eine Zuordnung, indem Sie zunächst einen Track auf der linken Seite und anschließend einen Teilnehmer oder eine Tonne auf der rechten Seite auswählen
createDefaultLeaderboardGroup=Möchten Sie eine Default-Ranglisten-Gruppe für ihr Event anlegen?
matcherType=Matcher-Typ
matchingDevices=Passende Geräte
addDevice=Gerät hinzufügen
@@ -1443,4 +1444,8 @@ createDeviceConfiguration=Gerätekonfiguration anlegen
forWhichDeviceShouldConfigurationApply=Für welches Gerät soll die neue Konfiguration gelten?
create=Anlegen
thereIsAlreadyAConfigurationForThisDevice=Es gibt bereits eine Konfiguration für dieses Gerät.
enterDeviceIdentifierName=Geräteidentifikator eingeben
enterDeviceIdentifierName=Geräteidentifikator eingeben
pleaseSelectALeaderboardGroup=Bitte eine Ranglisten-Gruppe auswählen
linkLeaderboardToLeaderboardGroupOfEvent=Ergebnisliste einer Ranglisten-Gruppe einer Veranstaltung hinzufügen
doYouWantToLinkLeaderboardToLeaderboardGroupOfEvent=Ergebnisliste {0} zu einer Ranglisten-Gruppe der Veranstaltung {1} hinzufügen
failedToLinkLeaderboardToLeaderboardGroup=Ergebnisliste {0} konnte nicht in Ranglisten-Gruppe {1} eingefügt werden
@@ -1366,6 +1366,8 @@ scoringSchemeHighPointFirstGetsTwelveOrEight=High Point, winner gets 12 points (
scoringSchemeHighPointFirstGetsTwelveOrEightDescription=Score in points. Winner scores 12 points, 2nd - 11 points, .... A tie is broken in favour of the competitor having won most races, if tie remains then tie is broken by the rank in the last race scored.
scoringSchemeHighPointEssOverall12=High Point System ESS Overall (12)
scoringSchemeHighPointEssOverall12Description=Score in points. Winner of an act scores 12 points, 2nd - 11 points, .... Any tie in the overall Extreme Sailing Series is broken in favour of the competitor with the most Act wins. If that does not break the tie, the result in the last Act will be used.
pleaseCreateAtLeastOneMappingBy=Plase create at list one mapping by first selecting a track on the left hand side and then selecting a mark or competitor on the right hand side
createDefaultLeaderboardGroup=Would you like to create a default LeaderboardGroup for your event?
pleaseCreateAtLeastOneMappingBy=Please create at least one mapping by first selecting a track on the left hand side and then selecting a mark or competitor on the right hand side
matcherType=Matcher type
matchingDevices=Matching devices
@@ -1374,4 +1376,8 @@ createDeviceConfiguration=Create Device Configuration
forWhichDeviceShouldConfigurationApply=Specify for which device the new configuration should apply
create=Create
thereIsAlreadyAConfigurationForThisDevice=There is already a configuration for this device.
enterDeviceIdentifierName=Enter an identifier name
enterDeviceIdentifierName=Enter an identifier name
pleaseSelectALeaderboardGroup=Please select a leaderboard group
linkLeaderboardToLeaderboardGroupOfEvent=Link Leaderboard to Leaderboard Group of Event
doYouWantToLinkLeaderboardToLeaderboardGroupOfEvent=Link leaderboard {0} to a leaderboard group of event {1}
failedToLinkLeaderboardToLeaderboardGroup=Failed to link leaderboard {0} to leaderboard group {1}
@@ -1381,6 +1381,8 @@ scoringSchemeHighPointFirstGetsTwelveOrEight=High Point, winner gets 12 points (
scoringSchemeHighPointFirstGetsTwelveOrEightDescription=Score in points. Winner scores 12 points, 2nd - 11 points, .... A tie is broken in favour of the competitor having won most races, if tie remains then tie is broken by the rank in the last race scored.
scoringSchemeHighPointEssOverall12=High Point System ESS Overall (12)
scoringSchemeHighPointEssOverall12Description=Score in points. Winner of an act scores 12 points, 2nd - 11 points, .... Any tie in the overall Extreme Sailing Series is broken in favour of the competitor with the most Act wins. If that does not break the tie, the result in the last Act will be used.
pleaseCreateAtLeastOneMappingBy=Plase create at list one mapping by first selecting a track on the left hand side and then selecting a mark or competitor on the right hand side
createDefaultLeaderboardGroup=Would you like to create a default LeaderboardGroup for your event?
pleaseCreateAtLeastOneMappingBy=Please create at least one mapping by first selecting a track on the left hand side and then selecting a mark or competitor on the right hand side
matcherType=Matcher type
matchingDevices=Matching devices
@@ -1389,4 +1391,8 @@ createDeviceConfiguration=Create Device Configuration
forWhichDeviceShouldConfigurationApply=Specify for which device the new configuration should apply
create=Create
thereIsAlreadyAConfigurationForThisDevice=There is already a configuration for this device.
enterDeviceIdentifierName=Enter an identifier name
enterDeviceIdentifierName=Enter an identifier name
pleaseSelectALeaderboardGroup=Please select a leaderboard group
linkLeaderboardToLeaderboardGroupOfEvent=Link Leaderboard to Leaderboard Group of Event
doYouWantToLinkLeaderboardToLeaderboardGroupOfEvent=Link leaderboard {0} to a leaderboard group of event {1}
failedToLinkLeaderboardToLeaderboardGroup=Failed to link leaderboard {0} to leaderboard group {1}
@@ -9,7 +9,7 @@ import com.sap.sailing.selenium.pages.PageArea;
import com.sap.sailing.selenium.pages.adminconsole.regatta.RegattaListCompositePO.RegattaDescriptor;
public class RegattaStructureManagementPanelPO extends PageArea {
public static final String DEFAULT_SERIES_NAME = "Default"; //$NON-NLS-1$
public static final String DEFAULT_SERIES_NAME = "DefaultSelenium"; //$NON-NLS-1$
@FindBy(how = BySeleniumId.class, using = "AddRegattaButton")
WebElement addRegattaButton;
@@ -57,7 +57,7 @@ public class TestSmartphoneTrackingEventManagementPanel extends AbstractSelenium
String raceName = String.format(RACE, i);
TrackableRaceDescriptor trackableRace = new TrackableRaceDescriptor(EVENT, raceName, BOAT_CLASS);
TrackedRaceDescriptor trackedRace = new TrackedRaceDescriptor(this.regatta.toString(), BOAT_CLASS, raceName);
RaceDescriptor leaderboardRace = new RaceDescriptor(String.format("R%s", i), "Default", false, false, 0);
RaceDescriptor leaderboardRace = new RaceDescriptor(String.format("D%s", i), "Default", false, false, 0);
this.trackableRaces.add(trackableRace);
this.trackedRaces.add(trackedRace);
@@ -50,7 +50,7 @@ public class TestColumnsInLeaderboard extends AbstractSeleniumTest {
this.regatta = new RegattaDescriptor(REGATTA, BOAT_CLASS);
this.trackableRace = new TrackableRaceDescriptor(EVENT, RACE, BOAT_CLASS);
this.trackedRace = new TrackedRaceDescriptor(this.regatta.toString(), BOAT_CLASS, RACE);
this.raceColumn = new RaceDescriptor("R1", "Default", false, false, 0.0);
this.raceColumn = new RaceDescriptor("D1", "Default", false, false, 0.0);
clearState(getContextRoot());
super.setUp();
configureLeaderboard();
@@ -60,7 +60,7 @@ public class TestLeaderboardConfiguration extends AbstractSeleniumTest {
String raceName = String.format(RACE, i);
TrackableRaceDescriptor trackableRace = new TrackableRaceDescriptor(EVENT, raceName, BOAT_CLASS);
TrackedRaceDescriptor trackedRace = new TrackedRaceDescriptor(this.regatta.toString(), BOAT_CLASS, raceName);
RaceDescriptor leaderboardRace = new RaceDescriptor(String.format("R%s", i), "Default", false, false, 0);
RaceDescriptor leaderboardRace = new RaceDescriptor(String.format("D%s", i), "Default", false, false, 0);
this.trackableRaces.add(trackableRace);
this.trackedRaces.add(trackedRace);
@@ -100,12 +100,12 @@ public class TestLeaderboardConfiguration extends AbstractSeleniumTest {
leaderboard.refresh();
List<LeaderboardEntry> allEntries = table.getEntries();
LeaderboardEntry findelJens = table.getEntry("8875");
Integer points = findelJens.getPointsForRace(String.format("R%s", i + 1));
Integer points = findelJens.getPointsForRace(String.format("D%s", i + 1));
Integer rank = findelJens.getTotalRank();
// Assertions
assertThat("Number of competitors does not match",
allEntries.size(), equalTo(28));
assertThat("Points for race 'R" + (i + 1) + "' do not match for competitor '8875' (Findel, Jens)",
assertThat("Points for race 'D" + (i + 1) + "' do not match for competitor '8875' (Findel, Jens)",
points, equalTo(expectedPointsForFindelJens[i]));
assertThat("Total rank after " + (i + 1) + " race(s) does not match for competitor '8875' (Findel, Jens)",
rank, equalTo(expectedRankForFindelJens[i]));
@@ -136,13 +136,13 @@ public class TestLeaderboardConfiguration extends AbstractSeleniumTest {
RegattaStructureManagementPanelPO regattaStructure = adminConsole.goToRegattaStructure();
RegattaDetailsCompositePO regattaDetails = regattaStructure.getRegattaDetails(this.regatta);
SeriesEditDialogPO seriesDialog = regattaDetails.editSeries(RegattaStructureManagementPanelPO.DEFAULT_SERIES_NAME);
seriesDialog.deleteRace("R3");
seriesDialog.deleteRace("D3");
seriesDialog.pressOk(true);
// Now we can check the result with our expectation
leaderboardWindow.switchToWindow();
leaderboard.refresh();
assertThat("Race names do not match after deletion of race 'R3'",
table.getRaceNames(), equalTo(Arrays.asList("R1", "R2", "R4", "R5")));
assertThat("Race names do not match after deletion of race 'D3'",
table.getRaceNames(), equalTo(Arrays.asList("D1", "D2", "D4", "D5")));
}
@Ignore("This test belongs to bug 1892 and currently fails. It is currently enabled on branch bug1892.")
@@ -175,15 +175,15 @@ public class TestLeaderboardConfiguration extends AbstractSeleniumTest {
RegattaStructureManagementPanelPO regattaStructure = adminConsole.goToRegattaStructure();
RegattaDetailsCompositePO regattaDetails = regattaStructure.getRegattaDetails(this.regatta);
SeriesEditDialogPO seriesDialog = regattaDetails.editSeries(RegattaStructureManagementPanelPO.DEFAULT_SERIES_NAME);
seriesDialog.renameRace("R1", "Q");
seriesDialog.renameRace("D1", "Q");
seriesDialog.pressOk(true);
// Now we can check the result with our expectation
leaderboardWindow.switchToWindow();
leaderboard.refresh();
List<String> races = table.getRaceNames();
assertThat("Race names do not match after renaming race 'R1' to 'Q'",
races, equalTo(Arrays.asList("Q", "R2", "R3", "R4", "R5")));
assertThat("Race names do not match after renaming race 'D1' to 'Q'",
races, equalTo(Arrays.asList("Q", "D2", "D3", "D4", "D5")));
}
private void configureLeaderboard() {
@@ -54,7 +54,7 @@ public class TestSwitchingOffStartOfRaceInference extends AbstractSeleniumTest {
this.regatta = new RegattaDescriptor(REGATTA, BOAT_CLASS);
this.trackableRace = new TrackableRaceDescriptor(EVENT, RACE, BOAT_CLASS);
this.trackedRace = new TrackedRaceDescriptor(this.regatta.toString(), BOAT_CLASS, RACE);
this.raceColumn = new RaceDescriptor("R3", "Default", false, false, 0.0);
this.raceColumn = new RaceDescriptor("D3", "Default", false, false, 0.0);
clearState(getContextRoot());
super.setUp();
adminConsole = configureRegattaAndLeaderboard();
@@ -69,10 +69,10 @@ public class TestSwitchingOffStartOfRaceInference extends AbstractSeleniumTest {
LeaderboardPage leaderboard = LeaderboardPage.goToPage(getWebDriver(), getContextRoot(), LEADERBOARD, /* race details */ false);
LeaderboardTablePO leaderboardTable = leaderboard.getLeaderboardTable();
List<String> races = leaderboardTable.getRaceNames();
assertThat("Expected only R3", races, equalTo(Arrays.asList("R3")));
int r3ColumnIndex = leaderboardTable.getColumnIndex("R3");
assertThat("Expected only D3", races, equalTo(Arrays.asList("D3")));
int d3ColumnIndex = leaderboardTable.getColumnIndex("D3");
for (LeaderboardEntry e : leaderboardTable.getEntries()) {
String raceColumnContent = e.getColumnContent(r3ColumnIndex);
String raceColumnContent = e.getColumnContent(d3ColumnIndex);
assertTrue(Integer.parseInt(raceColumnContent) > 0); // all competitors have a positive score in R3
}
adminConsoleWindow.switchToWindow();
@@ -85,7 +85,7 @@ public class TestSwitchingOffStartOfRaceInference extends AbstractSeleniumTest {
leaderboardWindow.switchToWindow();
leaderboard.refresh();
for (LeaderboardEntry e : leaderboardTable.getEntries()) {
String raceColumnContent = e.getColumnContent(r3ColumnIndex);
String raceColumnContent = e.getColumnContent(d3ColumnIndex);
assertEquals("", raceColumnContent); // all competitors have an empty score because there is no start time anymore
}
leaderboardWindow.close();
@@ -27,6 +27,9 @@
<div class="innerContent">
<h2 class="articleSubheadline">February 2016</h2>
<ul class="bulletList">
<li>Several improvements regarding the creation of race metadata (events, regatta, etc.) including:
automatic creation of default series, dialog for creating a default leaderboard group
</li>
<li>The RaceBoard URL Parameter "canReplayDuringLiveRaces" has been removed.
This parameter was used to allow users to trigger autoplay for live races on non-live points in time.
The permission "CAN_REPLAY_DURING_LIVE_RACES" and role "moderator" now grant this functionality to users.
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: TracTrac Client module
Bundle-SymbolicName: com.tractrac.clientmodule
Bundle-Version: 3.1.4
Bundle-Version: 3.1.5
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: .,
lib/TracAPI.jar
+13 -1
View File
@@ -16,6 +16,18 @@ It contains also some files:
- test.sh -> script that compiles the code in the src folder, creates the test.jar library and execute the code of the example.
- Manifest.txt -> manifest used to create the test.jar file
********************************************
************* TracAPI 3.1.5 ****************
********************************************
This is a final version. Only fixes bugs in the implementation
Release date: 17/02/2016
Build number: 11948
1) Bugs
- The bug of the previous release (3.1.2) was not fixed.
********************************************
************* TracAPI 3.1.4 ****************
********************************************
@@ -39,7 +51,7 @@ Build number: 11888
1) Bugs
- The bug of the previous release (3.1.3) was not fixed.
- The bug of the previous release (3.1.2) was not fixed.
********************************************
************* TracAPI 3.1.2 ****************
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -8,6 +8,6 @@
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.tractrac.clientmodule</artifactId>
<version>3.1.4</version>
<version>3.1.5</version>
<packaging>eclipse-plugin</packaging>
</project>