mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-10 22:30:56 +00:00
Merge branch 'master' into bug3875
This commit is contained in:
commit
a0f99f52af
14 files changed
+119
-24
No files matched your search
+6
-1
@@ -305,7 +305,12 @@ public abstract class AbstractEventActivity<PLACE extends AbstractEventPlace> ex
|
||||
public boolean isMultiRegattaEvent() {
|
||||
return getEventDTO().getType() == EventType.MULTI_REGATTA;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isSingleRegattaEvent() {
|
||||
return getEventDTO().getType() == EventType.SINGLE_REGATTA;
|
||||
}
|
||||
|
||||
protected List<NavigationItem> getNavigationPathToEventLevel() {
|
||||
List<NavigationItem> navigationItems = new ArrayList<>();
|
||||
if(getEventDTO().getType() == EventType.SERIES_EVENT) {
|
||||
|
||||
+2
@@ -58,5 +58,7 @@ public interface EventViewBase extends IsWidget {
|
||||
EventViewDTO getEventDTO();
|
||||
|
||||
boolean isMultiRegattaEvent();
|
||||
|
||||
boolean isSingleRegattaEvent();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -44,7 +44,7 @@ public class RegattaOverviewImpl extends AbstractEventOverview {
|
||||
this.setupUpdateBox(container);
|
||||
this.setupImpressions(container);
|
||||
}
|
||||
this.setupStatisticsBox(container, presenter.isMultiRegattaEvent());
|
||||
this.setupStatisticsBox(container, !presenter.isSingleRegattaEvent());
|
||||
setViewContent(container);
|
||||
}
|
||||
|
||||
|
||||
+26
@@ -701,4 +701,30 @@ public abstract class AbstractLeaderboardConfigPanel extends FormPanel implement
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks up the regatta for the selected leaderboard by name in {@link #allRegattas}
|
||||
*/
|
||||
protected RegattaDTO getSelectedRegatta() {
|
||||
final String regattaName = getSelectedLeaderboard().regattaName;
|
||||
return getRegattaByName(regattaName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks up a regatta with name {@code regattaName} in {@link #allRegattas}
|
||||
*/
|
||||
protected RegattaDTO getRegattaByName(final String regattaName) {
|
||||
RegattaDTO regatta = null;
|
||||
if (regattaName != null) {
|
||||
if (allRegattas != null) {
|
||||
for (RegattaDTO i : allRegattas) {
|
||||
if (regattaName.equals(i.getName())) {
|
||||
regatta = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return regatta;
|
||||
}
|
||||
}
|
||||
+7
-7
@@ -178,27 +178,27 @@ public abstract class ImageDialog extends DataEntryDialog<ImageDTO> {
|
||||
|
||||
Grid grid = new Grid(11, 2);
|
||||
|
||||
grid.setWidget(0, 0, new Label("Created at:"));
|
||||
grid.setWidget(0, 0, new Label(stringMessages.createdAt() + ":"));
|
||||
grid.setWidget(0, 1, createdAtLabel);
|
||||
grid.setWidget(1, 0, new HTML(" "));
|
||||
grid.setWidget(1, 1, busyIndicator);
|
||||
grid.setWidget(2, 0, new Label("Image URL:"));
|
||||
grid.setWidget(2, 0, new Label(stringMessages.imageURL() + ":"));
|
||||
grid.setWidget(2, 1, imageURLAndUploadComposite);
|
||||
grid.setWidget(3, 0, new HTML(" "));
|
||||
|
||||
grid.setWidget(4, 0, new Label(stringMessages.title() + ":"));
|
||||
grid.setWidget(4, 1, titleTextBox);
|
||||
grid.setWidget(5, 0, new Label("Subtitle:"));
|
||||
grid.setWidget(5, 0, new Label(stringMessages.subtitle() + ":"));
|
||||
grid.setWidget(5, 1, subtitleTextBox);
|
||||
grid.setWidget(6, 0, new Label("Copyright:"));
|
||||
grid.setWidget(6, 0, new Label(stringMessages.copyright() + ":"));
|
||||
grid.setWidget(6, 1, copyrightTextBox);
|
||||
grid.setWidget(7, 0, new Label("Width in px:"));
|
||||
grid.setWidget(7, 0, new Label(stringMessages.widthInPx() + ":"));
|
||||
grid.setWidget(7, 1, widthInPxBox);
|
||||
grid.setWidget(8, 0, new Label("Height in px:"));
|
||||
grid.setWidget(8, 0, new Label(stringMessages.heightInPx() + ":"));
|
||||
grid.setWidget(8, 1, heightInPxBox);
|
||||
|
||||
grid.setWidget(9, 0, new HTML(" "));
|
||||
grid.setWidget(10, 0, new Label("Tags:"));
|
||||
grid.setWidget(10, 0, new Label(stringMessages.tags() + ":"));
|
||||
grid.setWidget(10, 1, tagsListEditor);
|
||||
|
||||
panel.add(grid);
|
||||
|
||||
+4
-4
@@ -222,11 +222,11 @@ public class ImagesListComposite extends Composite {
|
||||
titleColumn.setSortable(true);
|
||||
createdAtDateColumn.setSortable(true);
|
||||
|
||||
table.addColumn(shortImageNameColumn, "Short name:");
|
||||
table.addColumn(shortImageNameColumn, stringMessages.name());
|
||||
table.addColumn(titleColumn, stringMessages.title());
|
||||
table.addColumn(createdAtDateColumn, "Created At");
|
||||
table.addColumn(sizeColumn, "Size");
|
||||
table.addColumn(tagsColumn, "Tags");
|
||||
table.addColumn(createdAtDateColumn, stringMessages.createdAt());
|
||||
table.addColumn(sizeColumn, stringMessages.size());
|
||||
table.addColumn(tagsColumn, stringMessages.tags());
|
||||
table.addColumn(imageActionColumn, stringMessages.actions());
|
||||
table.addColumnSortHandler(getImageTableColumnSortHandler(imageListDataProvider.getList(), titleColumn, createdAtDateColumn));
|
||||
table.getColumnSortList().push(createdAtDateColumn);
|
||||
|
||||
+31
-11
@@ -25,8 +25,11 @@ import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.view.client.ListDataProvider;
|
||||
import com.google.gwt.view.client.SelectionChangeEvent;
|
||||
import com.google.gwt.view.client.SelectionChangeEvent.Handler;
|
||||
import com.sap.sailing.domain.common.CourseDesignerMode;
|
||||
import com.sap.sailing.domain.common.PassingInstruction;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.domain.common.RegattaIdentifier;
|
||||
import com.sap.sailing.domain.common.RegattaName;
|
||||
import com.sap.sailing.domain.common.TrackedRaceStatusEnum;
|
||||
import com.sap.sailing.domain.common.abstractlog.TimePointSpecificationFoundInLog;
|
||||
import com.sap.sailing.domain.common.dto.CompetitorDTO;
|
||||
@@ -42,6 +45,7 @@ import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
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.shared.ControlPointDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.DeviceConfigurationDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceLogSetStartTimeAndProcedureDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
|
||||
@@ -540,6 +544,7 @@ public class SmartphoneTrackingEventManagementPanel extends AbstractLeaderboardC
|
||||
@Override
|
||||
public void onSuccess(Void result) {
|
||||
loadAndRefreshLeaderboard(leaderboard.name);
|
||||
updateRegattaConfigDesignerModeToByMarks(leaderboard.regattaName);
|
||||
raceColumnTableSelectionModel.clear();
|
||||
}
|
||||
|
||||
@@ -550,6 +555,31 @@ public class SmartphoneTrackingEventManagementPanel extends AbstractLeaderboardC
|
||||
});
|
||||
}
|
||||
|
||||
private void updateRegattaConfigDesignerModeToByMarks(final String regattaName) {
|
||||
final RegattaDTO regatta = getRegattaByName(regattaName);
|
||||
if (regatta != null) {
|
||||
DeviceConfigurationDTO.RegattaConfigurationDTO configuration = regatta.configuration;
|
||||
if (configuration == null) {
|
||||
configuration = new DeviceConfigurationDTO.RegattaConfigurationDTO();
|
||||
configuration.defaultCourseDesignerMode = CourseDesignerMode.BY_MARKS;
|
||||
} //TODO: Show message if regatta has configuration with design mode not equal "By marks"
|
||||
|
||||
final RegattaIdentifier regattaIdentifier = new RegattaName(regatta.getName());
|
||||
sailingService.updateRegatta(regattaIdentifier, regatta.startDate, regatta.endDate, regatta.defaultCourseAreaUuid,
|
||||
configuration, regatta.useStartTimeInference, new MarkedAsyncCallback<Void>(new AsyncCallback<Void>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
errorReporter.reportError("Error trying to update regatta " + regattaName + ": "
|
||||
+ caught.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Void result) {
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
private void denoteForRaceLogTracking(final RaceColumnDTO raceColumn, final FleetDTO fleet) {
|
||||
final StrippedLeaderboardDTO leaderboard = getSelectedLeaderboard();
|
||||
sailingService.denoteForRaceLogTracking(leaderboard.name, raceColumn.getName(), fleet.getName(), new AsyncCallback<Void>() {
|
||||
@@ -715,17 +745,7 @@ public class SmartphoneTrackingEventManagementPanel extends AbstractLeaderboardC
|
||||
|
||||
private void searchBoatClass(final ShowWithBoatClass showWithBoatClass) {
|
||||
final String result;
|
||||
RegattaDTO regatta = null;
|
||||
if (getSelectedLeaderboard().regattaName != null) {
|
||||
if (allRegattas != null) {
|
||||
for (RegattaDTO i : allRegattas) {
|
||||
if (getSelectedLeaderboard().regattaName.equals(i.getName())) {
|
||||
regatta = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RegattaDTO regatta = getSelectedRegatta();
|
||||
if (regatta != null) {
|
||||
result = regatta.boatClass.getName();
|
||||
showWithBoatClass.showWithBoatClass(result);
|
||||
|
||||
+6
@@ -475,6 +475,12 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
|
||||
String url();
|
||||
String mimeType();
|
||||
String title();
|
||||
String subtitle();
|
||||
String copyright();
|
||||
String widthInPx();
|
||||
String heightInPx();
|
||||
String tags();
|
||||
String size();
|
||||
String reallyRemoveMediaTrack(String mediaTrackTitle);
|
||||
String duration();
|
||||
String addMediaTrack();
|
||||
|
||||
+6
@@ -493,6 +493,12 @@ mediaPanel=Audio & Video
|
||||
url=URL
|
||||
mimeType=MIME Type
|
||||
title=Title
|
||||
subtitle=Subtitle
|
||||
copyright=Copyright
|
||||
widthInPx=Width (pixel)
|
||||
heightInPx=Height (pixel)
|
||||
tags=Tags
|
||||
size=Size
|
||||
duration=Duration (h:mm:ss.ms)
|
||||
addMediaTrack=Add Audio/Video
|
||||
addYoutubeTrack=Add Youtube
|
||||
|
||||
+6
@@ -487,6 +487,12 @@ mediaPanel=Audio & Video
|
||||
url=URL
|
||||
mimeType=MIME Type
|
||||
title=Titel
|
||||
subtitle=Untertitel
|
||||
copyright=Urheberrecht
|
||||
widthInPx=Breite (Punkte)
|
||||
heightInPx=Höhe (Punkte)
|
||||
tags=Tags
|
||||
size=Größe
|
||||
duration=Dauer (h:mm:ss.ms)
|
||||
addMediaTrack=Audio/Video hinzufügen
|
||||
addYoutubeTrack=Youtube hinzufügen
|
||||
|
||||
+6
@@ -489,6 +489,12 @@ mediaPanel=音声と動画
|
||||
url=URL
|
||||
mimeType=MIME タイプ
|
||||
title=表題
|
||||
subtitle=Subtitle
|
||||
copyright=Copyright
|
||||
widthInPx=Width (pixel)
|
||||
heightInPx=Height (pixel)
|
||||
tags=Tags
|
||||
size=Size
|
||||
duration=時間 (h:mm:ss.ms)
|
||||
addMediaTrack=音声/動画追加
|
||||
addYoutubeTrack=YouTube 追加
|
||||
|
||||
+6
@@ -489,6 +489,12 @@ mediaPanel=Аудио и видео
|
||||
url=URL-адрес
|
||||
mimeType=Тип MIME
|
||||
title=Название
|
||||
subtitle=Subtitle
|
||||
copyright=Copyright
|
||||
widthInPx=Width (pixel)
|
||||
heightInPx=Height (pixel)
|
||||
tags=Tags
|
||||
size=Size
|
||||
duration=Длительность (ч:мм:сс.мс)
|
||||
addMediaTrack=Добавить аудио/видео
|
||||
addYoutubeTrack=Добавить Youtube
|
||||
|
||||
+6
@@ -489,6 +489,12 @@ mediaPanel=音频和视频
|
||||
url=URL
|
||||
mimeType=MIME 类型
|
||||
title=标题
|
||||
subtitle=Subtitle
|
||||
copyright=Copyright
|
||||
widthInPx=Width (pixel)
|
||||
heightInPx=Height (pixel)
|
||||
tags=Tags
|
||||
size=Size
|
||||
duration=持续时间 (h:mm:ss.ms)
|
||||
addMediaTrack=添加音频/视频
|
||||
addYoutubeTrack=添加 Youtube
|
||||
|
||||
+6
@@ -489,6 +489,12 @@ mediaPanel=音频和视频
|
||||
url=URL
|
||||
mimeType=MIME 类型
|
||||
title=标题
|
||||
subtitle=Subtitle
|
||||
copyright=Copyright
|
||||
widthInPx=Width (pixel)
|
||||
heightInPx=Height (pixel)
|
||||
tags=Tags
|
||||
size=Size
|
||||
duration=持续时间 (h:mm:ss.ms)
|
||||
addMediaTrack=添加音频/视频
|
||||
addYoutubeTrack=添加 Youtube
|
||||
|
||||
Reference in new issue
Block a user