mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-01 08:40:52 +00:00
Merge remote-tracking branch 'server/master' into bug2825
This commit is contained in:
commit
5469972ff0
18 files changed
+184
-18
No files matched your search
+3
-2
@@ -11,13 +11,14 @@ import com.sap.sailing.domain.common.impl.MeterDistance;
|
||||
public enum BoatClassMasterdata {
|
||||
_18Footer ("18Footer", true, 8.90, 2.00, BoatHullType.MONOHULL, true, "18.Footer", "18ft", "18ft Skiff", "18. Footer"),
|
||||
_2_4M ("2.4 Meter", true, 4.11, 0.81, BoatHullType.MONOHULL, false, "2.4M", "2.4mR", "2.4 Metre", "2.4-metre", "24MR"),
|
||||
_5O5 ("5O5", true, 5.03, 1.88, BoatHullType.MONOHULL, true, "505", "5o5", "505er", "5o5er"),
|
||||
_12M ("12 Meter", true, 5.97, 1.43, BoatHullType.MONOHULL, true, "12M", "12mR", "12SQM", "12-metre", "12 metre"),
|
||||
_12M ("12 Meter", true, 21.50, 3.60, BoatHullType.MONOHULL, true, "12M", "12mR", "12SQM", "12-metre", "12 metre"),
|
||||
_29ER ("29er", true, 4.45, 1.70, BoatHullType.MONOHULL, true),
|
||||
_49ER ("49er", true, 4.88, 1.93, BoatHullType.MONOHULL, true),
|
||||
_49ERFX ("49erFX", true, 4.88, 1.93, BoatHullType.MONOHULL, true, "49FX"),
|
||||
_420 ("420", true, 4.20, 1.65, BoatHullType.MONOHULL, true, "420er", "420M", "420W"),
|
||||
_470 ("470", true, 4.70, 1.68, BoatHullType.MONOHULL, true, "470er", "470M", "470W"),
|
||||
_5O5 ("5O5", true, 5.03, 1.88, BoatHullType.MONOHULL, true, "505", "5o5", "505er", "5o5er"),
|
||||
_5_5MR ("5.5mR", true, 9.50, 1.92, BoatHullType.MONOHULL, true, "5.5 Meter", "5.5 Metre", "5.5", "5.5M", "5.5-metre", "5.5 metre"),
|
||||
RS800 ("RS 800", true, 4.80, 1.88, BoatHullType.MONOHULL, true, "RS800"),
|
||||
A_CAT ("A-Catamaran", true, 5.49, 2.30, BoatHullType.CATAMARAN, false, "A-Cat", "ACat", "A-Class Catamaran"),
|
||||
ALBIN_EXPRESS ("Albin Express", true, 7.77, 2.50, BoatHullType.MONOHULL, false),
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
+1
@@ -35,6 +35,7 @@ public class BoatClassImageResolver {
|
||||
boatClassIconsMap.put(BoatClassMasterdata._49ERFX.getDisplayName(), imageResources._49erFXIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata._49ER.getDisplayName(), imageResources._49erIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata._5O5.getDisplayName(), imageResources._505mIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata._5_5MR.getDisplayName(), imageResources._5_5MRIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.A_CAT.getDisplayName(), imageResources.A_CatIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.ALBIN_EXPRESS.getDisplayName(), imageResources.AlbinExpressIcon());
|
||||
boatClassIconsMap.put(BoatClassMasterdata.B_ONE.getDisplayName(), imageResources.BOne());
|
||||
|
||||
+3
@@ -37,6 +37,9 @@ public interface BoatClassImageResources extends ClientBundle {
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/505.png")
|
||||
ImageResource _505mIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/5.5mR.png")
|
||||
ImageResource _5_5MRIcon();
|
||||
|
||||
@Source("com/sap/sailing/gwt/ui/client/images/boatclass/A_CAT.png")
|
||||
ImageResource A_CatIcon();
|
||||
|
||||
|
||||
+40
@@ -2,6 +2,7 @@ package com.sap.sailing.gwt.home.communication.eventview;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.sap.sse.gwt.dispatch.shared.commands.DTO;
|
||||
|
||||
public class RegattaMetadataDTO extends RegattaReferenceDTO implements HasRegattaMetadata {
|
||||
private int raceCount;
|
||||
@@ -14,6 +15,7 @@ public class RegattaMetadataDTO extends RegattaReferenceDTO implements HasRegatt
|
||||
private Date endDate;
|
||||
private RegattaState state;
|
||||
private boolean flexibleLeaderboard;
|
||||
private RaceDataInfo raceDataInfo;
|
||||
|
||||
public RegattaMetadataDTO() {
|
||||
}
|
||||
@@ -104,4 +106,42 @@ public class RegattaMetadataDTO extends RegattaReferenceDTO implements HasRegatt
|
||||
public void setDefaultCourseAreaId(String defaultCourseAreaId) {
|
||||
this.defaultCourseAreaId = defaultCourseAreaId;
|
||||
}
|
||||
|
||||
public RaceDataInfo getRaceDataInfo() {
|
||||
return raceDataInfo;
|
||||
}
|
||||
|
||||
public void setRaceDataInfo(RaceDataInfo raceDataInfo) {
|
||||
this.raceDataInfo = raceDataInfo;
|
||||
}
|
||||
|
||||
public static class RaceDataInfo implements DTO {
|
||||
private boolean hasGPSData, hasWindData, hasVideoData, hasAudioData;
|
||||
|
||||
protected RaceDataInfo() {
|
||||
}
|
||||
|
||||
public RaceDataInfo(boolean hasGPSData, boolean hasWindData, boolean hasVideoData, boolean hasAudioData) {
|
||||
this.hasGPSData = hasGPSData;
|
||||
this.hasWindData = hasWindData;
|
||||
this.hasVideoData = hasVideoData;
|
||||
this.hasAudioData = hasAudioData;
|
||||
}
|
||||
|
||||
public boolean hasGPSData() {
|
||||
return hasGPSData;
|
||||
}
|
||||
|
||||
public boolean hasWindData() {
|
||||
return hasWindData;
|
||||
}
|
||||
|
||||
public boolean hasVideoData() {
|
||||
return hasVideoData;
|
||||
}
|
||||
|
||||
public boolean hasAudioData() {
|
||||
return hasAudioData;
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -31,6 +31,7 @@ public class MultiRegattaListItem extends Composite {
|
||||
public MultiRegattaListItem(RegattaWithProgressDTO regattaWithProgress, Presenter presenter) {
|
||||
this(regattaWithProgress, presenter.getEventDTO().isRunning());
|
||||
regattaHeaderUi.setRegattaNavigation(presenter.getRegattaNavigation(regattaWithProgress.getId()));
|
||||
regattaHeaderUi.setRegattaRacesNavigation(presenter.getRegattaRacesNavigation(regattaWithProgress.getId()));
|
||||
PlaceNavigation<?> leaderboardNavigation = presenter.getRegattaLeaderboardNavigation(regattaWithProgress.getId());
|
||||
regattaStepsUi.setLeaderboardNavigation(regattaWithProgress.getState(), leaderboardNavigation);
|
||||
}
|
||||
|
||||
+44
-2
@@ -13,7 +13,7 @@
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.regattaheaderpadding {
|
||||
padding-right: 5em;
|
||||
padding-right: 9.666667em;
|
||||
}
|
||||
.regattaheader_logo {
|
||||
float: left;
|
||||
@@ -99,7 +99,7 @@
|
||||
bottom: 0;
|
||||
text-align: right;
|
||||
padding: 0.666666666666667em;
|
||||
padding-right: 4.666666666666667em;
|
||||
padding-right: 5.333333333333333em;
|
||||
background-image: url("images/home/arrow-down-grey.png");
|
||||
background-size: 1.333333333333333em 1.333333333333333em;
|
||||
background-position: center;
|
||||
@@ -109,6 +109,48 @@
|
||||
-ms-transform: rotate(-90deg);
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.regattaheader_indicators {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 1em;
|
||||
bottom: 0;
|
||||
width: 4.666667em;
|
||||
margin: .666666666666667em 0 1em;
|
||||
cursor: default;
|
||||
font-size: 1rem;
|
||||
border-left: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.regattaheader_indicators:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.regattaheader_indicators.regattaheader_indicators_next_to_arrow {
|
||||
right: 5em;
|
||||
border-right: 1px solid #ccc;
|
||||
cursor: inherit;
|
||||
}
|
||||
.regattaheader_indicators > div {
|
||||
font-size: 0;
|
||||
text-align: center;
|
||||
margin-top: -0.1rem;
|
||||
}
|
||||
|
||||
.regattaheader_indicators > div > div {
|
||||
background-size: 1.666666666666667rem 1.666666666666667rem;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
width: 1.666666666666667rem;
|
||||
height: 1.666666666666667rem;
|
||||
display: inline-block;
|
||||
margin: 0.1rem 0.2rem
|
||||
}
|
||||
|
||||
.regattaheader_indicators > div > div.regattaheader_indicator_disabled {
|
||||
opacity: 0.15;
|
||||
}
|
||||
|
||||
.regattaheader_update {
|
||||
width: 20%;
|
||||
float: right;
|
||||
|
||||
+25
@@ -2,11 +2,14 @@ package com.sap.sailing.gwt.home.desktop.partials.regattaheader;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.AnchorElement;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.UIObject;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.home.communication.eventview.RegattaMetadataDTO;
|
||||
import com.sap.sailing.gwt.home.communication.eventview.RegattaMetadataDTO.RaceDataInfo;
|
||||
import com.sap.sailing.gwt.home.shared.app.PlaceNavigation;
|
||||
|
||||
public class RegattaHeader extends Composite {
|
||||
@@ -16,18 +19,40 @@ public class RegattaHeader extends Composite {
|
||||
interface RegattaHeaderUiBinder extends UiBinder<Widget, RegattaHeader> {
|
||||
}
|
||||
|
||||
@UiField RegattaHeaderResources local_res;
|
||||
|
||||
@UiField AnchorElement headerBodyUi;
|
||||
@UiField AnchorElement headerArrowUi;
|
||||
@UiField AnchorElement dataIndicatorsUi;
|
||||
@UiField DivElement gpsDataIndicatorUi;
|
||||
@UiField DivElement windDataIndicatorUi;
|
||||
@UiField DivElement videoDataIndicatorUi;
|
||||
@UiField DivElement audioDataIndicatorUi;
|
||||
|
||||
public RegattaHeader(RegattaMetadataDTO regattaMetadata, boolean showStateMarker) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
headerBodyUi.appendChild(new RegattaHeaderBody(regattaMetadata, showStateMarker).getElement());
|
||||
this.initDataIndicators(regattaMetadata.getRaceDataInfo());
|
||||
}
|
||||
|
||||
public void setRegattaNavigation(PlaceNavigation<?> placeNavigation) {
|
||||
headerArrowUi.getStyle().clearDisplay();
|
||||
dataIndicatorsUi.addClassName(local_res.css().regattaheader_indicators_next_to_arrow());
|
||||
placeNavigation.configureAnchorElement(headerBodyUi);
|
||||
placeNavigation.configureAnchorElement(headerArrowUi);
|
||||
}
|
||||
|
||||
public void setRegattaRacesNavigation(PlaceNavigation<?> placeNavigation) {
|
||||
placeNavigation.configureAnchorElement(dataIndicatorsUi);
|
||||
}
|
||||
|
||||
private void initDataIndicators(RaceDataInfo raceDataInfo) {
|
||||
String disabledStyle = local_res.css().regattaheader_indicator_disabled();
|
||||
UIObject.setStyleName(gpsDataIndicatorUi, disabledStyle, !raceDataInfo.hasGPSData());
|
||||
UIObject.setStyleName(windDataIndicatorUi, disabledStyle, !raceDataInfo.hasWindData());
|
||||
UIObject.setStyleName(videoDataIndicatorUi, disabledStyle, !raceDataInfo.hasVideoData());
|
||||
UIObject.setStyleName(audioDataIndicatorUi, disabledStyle, !raceDataInfo.hasAudioData());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+8
-6
@@ -9,13 +9,15 @@
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}">
|
||||
<a class="{local_res.css.regattaheader} {local_res.css.regattaheaderpadding}" ui:field="headerBodyUi"></a>
|
||||
<!-- <a class="{local_res.css.regattaheader_toggle}"> -->
|
||||
<!-- <img src="images/home/arrow-down-grey.png" class="{local_res.css.regattaheader_toggle_icon}"></img> -->
|
||||
<!-- </a> -->
|
||||
<a class="{local_res.css.regattaheader_indicators}" ui:field="dataIndicatorsUi">
|
||||
<div>
|
||||
<div style="background-image:url('images/home/raw_gps_fixes.png');" ui:field="gpsDataIndicatorUi"></div>
|
||||
<div style="background-image:url('images/home/icon-wind.png');" ui:field="windDataIndicatorUi"></div>
|
||||
<div style="background-image:url('images/home/icon-video.png');" ui:field="videoDataIndicatorUi"></div>
|
||||
<div style="background-image:url('images/home/icon-audio.png');" ui:field="audioDataIndicatorUi"></div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="{local_res.css.regattaheader_arrow}" style="display:none;" ui:field="headerArrowUi"></a>
|
||||
<!-- <div class="{local_res.css.regattaheader} {local_res.css.regattaheaderpadding}"></div> -->
|
||||
<!-- <div class="{local_res.css.regattaheader_toggle}"></div> -->
|
||||
<!-- <div class="{local_res.css.regattaheader_arrow}"></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
-6
@@ -12,13 +12,7 @@
|
||||
<div class="{res.mainCss.label}" ui:field="labelUi"></div>
|
||||
</div>
|
||||
<div class="{local_res.css.regattaheader_content_details}" ui:field="detailsItemContainerUi">
|
||||
<!-- <div class="{local_res.css.regattaheader_content_details_item}"></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- IF content.isLive <div class="{local_res.css.regattaheader_update}">
|
||||
<div class="{local_res.css.regattaheader_update_title}"> <img src="images/home/reload-green.png"
|
||||
class="{local_res.css.regattaheader_update_title_icon}"></img> <ui:text from='{i18n.lastUpdate}'
|
||||
/> </div> <div class="{local_res.css.regattaheader_update_timestamp}"></div>
|
||||
</div> IFEND content.isLive -->
|
||||
</div>
|
||||
</ui:UiBinder>
|
||||
+3
@@ -22,6 +22,9 @@ public interface RegattaHeaderResources extends ClientBundle {
|
||||
String regattaheader_toggle_icon();
|
||||
String standings_listhidden();
|
||||
String regattaheader_arrow();
|
||||
String regattaheader_indicators();
|
||||
String regattaheader_indicators_next_to_arrow();
|
||||
String regattaheader_indicator_disabled();
|
||||
String regattaheader_update();
|
||||
String regattaheader_update_title();
|
||||
String regattaheader_update_title_icon();
|
||||
|
||||
+4
@@ -231,6 +231,10 @@ public class LeaderboardContext {
|
||||
regattaDTO.setDefaultCourseAreaName(HomeServiceUtil.getCourseAreaNameForRegattaIdThereIsMoreThanOne(event, leaderboard));
|
||||
regattaDTO.setDefaultCourseAreaId(HomeServiceUtil.getCourseAreaIdForRegatta(event, leaderboard));
|
||||
regattaDTO.setFlexibleLeaderboard(leaderboard instanceof FlexibleLeaderboard);
|
||||
|
||||
RegattaRaceDataInfoCalculator regattaRaceDataInfoCalculator = new RegattaRaceDataInfoCalculator();
|
||||
forRaces(regattaRaceDataInfoCalculator);
|
||||
regattaDTO.setRaceDataInfo(regattaRaceDataInfoCalculator.getRaceDataInfo());
|
||||
}
|
||||
|
||||
private static boolean hasMultipleLeaderboardGroups(EventBase event) {
|
||||
|
||||
+7
@@ -51,6 +51,7 @@ import com.sap.sailing.domain.tracking.WindWithConfidence;
|
||||
import com.sap.sailing.gwt.home.communication.event.LiveRaceDTO;
|
||||
import com.sap.sailing.gwt.home.communication.event.RaceListRaceDTO;
|
||||
import com.sap.sailing.gwt.home.communication.event.SimpleCompetitorDTO;
|
||||
import com.sap.sailing.gwt.home.communication.eventview.RegattaMetadataDTO.RaceDataInfo;
|
||||
import com.sap.sailing.gwt.home.communication.race.FlagStateDTO;
|
||||
import com.sap.sailing.gwt.home.communication.race.FleetMetadataDTO;
|
||||
import com.sap.sailing.gwt.home.communication.race.RaceMetadataDTO;
|
||||
@@ -654,4 +655,10 @@ public class RaceContext {
|
||||
Fleet fleetOfCompetitor = raceColumn.getFleetOfCompetitor(competitor);
|
||||
return fleetOfCompetitor != null && Util.equalsWithNull(fleet.getName(), fleetOfCompetitor.getName());
|
||||
}
|
||||
|
||||
public RaceDataInfo getRaceDataInfo() {
|
||||
boolean hasGPSData = getRaceTrackingState() == RaceTrackingState.TRACKED_VALID_DATA;
|
||||
boolean hasWindData = getWindSourceCount() > 0, hasVideo = getVideoCount() > 0, hasAudioData = getAudioCount() > 0;
|
||||
return new RaceDataInfo(hasGPSData, hasWindData, hasVideo, hasAudioData);
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.sap.sailing.gwt.home.server;
|
||||
|
||||
import com.sap.sailing.gwt.home.communication.eventview.RegattaMetadataDTO.RaceDataInfo;
|
||||
|
||||
public class RegattaRaceDataInfoCalculator implements EventActionUtil.RaceCallback {
|
||||
|
||||
private boolean hasGPSData, hasWindData, hasVideoData, hasAudioData;
|
||||
|
||||
@Override
|
||||
public void doForRace(RaceContext context) {
|
||||
RaceDataInfo raceDataInfo = context.getRaceDataInfo();
|
||||
hasGPSData |= raceDataInfo.hasGPSData();
|
||||
hasWindData |= raceDataInfo.hasWindData();
|
||||
hasVideoData |= raceDataInfo.hasVideoData();
|
||||
hasAudioData |= raceDataInfo.hasAudioData();
|
||||
}
|
||||
|
||||
public RaceDataInfo getRaceDataInfo() {
|
||||
return new RaceDataInfo(hasGPSData, hasWindData, hasVideoData, hasAudioData);
|
||||
}
|
||||
|
||||
}
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Reference in new issue
Block a user