mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
Merge remote-tracking branch 'server/master'
This commit is contained in:
commit
7f114e2234
17 files changed
+165
-13
No files matched your search
+7
@@ -67,6 +67,13 @@ public class GetEventViewAction implements SailingAction<EventViewDTO>, IsClient
|
||||
dto.setState(HomeServiceUtil.calculateEventState(event));
|
||||
// bug2982: always show leaderboard and competitor analytics
|
||||
dto.setHasAnalytics(true);
|
||||
|
||||
String description = event.getDescription();
|
||||
if (description == null || description.trim().isEmpty() || event.getName().equalsIgnoreCase(description)) {
|
||||
// If a description isn't useful, it should not be shown in the UI
|
||||
description = null;
|
||||
}
|
||||
dto.setDescription(description);
|
||||
|
||||
final EventType eventType = EventUtil.getEventType(event);
|
||||
dto.setType(eventType);
|
||||
|
||||
+9
@@ -23,6 +23,7 @@ public class EventViewDTO extends EventMetadataDTO implements Result, HasLogo {
|
||||
private ImageDTO logoImage;
|
||||
private String officialWebsiteURL;
|
||||
private String sailorsInfoWebsiteURL;
|
||||
private String description;
|
||||
|
||||
public EventType getType() {
|
||||
return type;
|
||||
@@ -116,4 +117,12 @@ public class EventViewDTO extends EventMetadataDTO implements Result, HasLogo {
|
||||
}
|
||||
return venue;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
.box {
|
||||
font-size: 1rem;
|
||||
border: 1px solid #dedede;
|
||||
border-radius: 0.333333333333333em;
|
||||
overflow: hidden;
|
||||
}
|
||||
.box_header {
|
||||
color: #333;
|
||||
font-size: 1.2em;
|
||||
font-weight: 700;
|
||||
background: #f2f2f2;
|
||||
padding: 1.111111111111111em;
|
||||
border-bottom: 1px solid #dedede;
|
||||
}
|
||||
.box_content {
|
||||
margin: 0;
|
||||
padding: 1em;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.sap.sailing.gwt.home.desktop.partials.eventdescription;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
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.Widget;
|
||||
|
||||
public class EventDescription extends Composite {
|
||||
|
||||
private static StatisticsBoxUiBinder uiBinder = GWT.create(StatisticsBoxUiBinder.class);
|
||||
|
||||
interface StatisticsBoxUiBinder extends UiBinder<Widget, EventDescription> {
|
||||
}
|
||||
|
||||
@UiField DivElement descriptionUi;
|
||||
|
||||
public EventDescription(String description) {
|
||||
EventDescriptionResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
descriptionUi.setInnerText(description);
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.desktop.partials.eventdescription.EventDescriptionResources" />
|
||||
<g:HTMLPanel addStyleNames="{local_res.css.box}">
|
||||
<div class="{local_res.css.box_header}" ui:field="titleUi"><ui:text from="{i18n.description}" /></div>
|
||||
<div class="{local_res.css.box_content}" ui:field="descriptionUi"></div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.sap.sailing.gwt.home.desktop.partials.eventdescription;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
public interface EventDescriptionResources extends ClientBundle {
|
||||
public static final EventDescriptionResources INSTANCE = GWT.create(EventDescriptionResources.class);
|
||||
|
||||
@Source("EventDescription.gss")
|
||||
LocalCss css();
|
||||
|
||||
public interface LocalCss extends CssResource {
|
||||
String box();
|
||||
String box_header();
|
||||
String box_content();
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -94,10 +94,11 @@ public class MultiRegattaListStepsBody extends UIObject implements RequiresResiz
|
||||
}
|
||||
|
||||
private String caculateSeriesName(RegattaProgressSeriesDTO seriesProgress) {
|
||||
if (seriesProgress.getName() == null || seriesProgress.getName().isEmpty()) {
|
||||
if (seriesProgress.getName() == null || seriesProgress.getName().isEmpty()
|
||||
|| DEFAULT_SERIES_NAME.equals(seriesProgress.getName())) {
|
||||
return I18N.races();
|
||||
} else {
|
||||
return DEFAULT_SERIES_NAME.equals(seriesProgress.getName()) ? I18N.races() : seriesProgress.getName();
|
||||
return seriesProgress.getName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+12
@@ -8,11 +8,13 @@ import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.SimplePanel;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
|
||||
import com.sap.sailing.gwt.home.communication.event.GetLiveRacesForEventAction;
|
||||
import com.sap.sailing.gwt.home.communication.event.GetRegattaListViewAction;
|
||||
import com.sap.sailing.gwt.home.communication.event.statistics.GetEventStatisticsAction;
|
||||
import com.sap.sailing.gwt.home.communication.regatta.RegattaWithProgressDTO;
|
||||
import com.sap.sailing.gwt.home.desktop.partials.eventdescription.EventDescription;
|
||||
import com.sap.sailing.gwt.home.desktop.partials.eventstage.EventOverviewStage;
|
||||
import com.sap.sailing.gwt.home.desktop.partials.liveraces.LiveRacesList;
|
||||
import com.sap.sailing.gwt.home.desktop.partials.multiregattalist.MultiRegattaList;
|
||||
@@ -41,6 +43,7 @@ public class MultiregattaOverviewTabView extends Composite implements Multiregat
|
||||
private static MyBinder ourUiBinder = GWT.create(MyBinder.class);
|
||||
|
||||
@UiField(provided = true) EventOverviewStage stageUi;
|
||||
@UiField SimplePanel descriptionUi;
|
||||
@UiField(provided = true) LiveRacesList liveRacesListUi;
|
||||
@UiField(provided = true) DropdownFilter<String> boatCategoryFilterUi;
|
||||
@UiField(provided = true) MultiRegattaList regattaListUi;
|
||||
@@ -71,7 +74,16 @@ public class MultiregattaOverviewTabView extends Composite implements Multiregat
|
||||
boatCategoryFilterUi = new DropdownFilter<String>(StringMessages.INSTANCE.all(), regattaFilterList);
|
||||
regattaListUi = new MultiRegattaList(currentPresenter, false);
|
||||
statisticsBoxUi = new EventStatisticsBox(true, new DesktopStatisticsBoxView());
|
||||
|
||||
initWidget(ourUiBinder.createAndBindUi(this));
|
||||
|
||||
final String description = currentPresenter.getEventDTO().getDescription();
|
||||
if (description != null) {
|
||||
descriptionUi.add(new EventDescription(description));
|
||||
} else {
|
||||
descriptionUi.removeFromParent();
|
||||
}
|
||||
|
||||
raceOfficeSectionUi.addLink(StringMessages.INSTANCE.racesOverview(), currentPresenter.getRegattaOverviewLink());
|
||||
|
||||
RefreshManager refreshManager = new RefreshManagerWithErrorAndBusy(this, contentArea, currentPresenter.getDispatch(), currentPresenter.getErrorAndBusyClientFactory());
|
||||
|
||||
+6
-5
@@ -1,17 +1,18 @@
|
||||
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui'
|
||||
xmlns:dp='urn:import:com.sap.sailing.gwt.home.desktop.partials'
|
||||
xmlns:sp='urn:import:com.sap.sailing.gwt.home.shared.partials'>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
|
||||
<g:HTMLPanel>
|
||||
<dp:eventstage.EventOverviewStage ui:field="stageUi" />
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns} {res.mainCss.spacermarginbottommedium}">
|
||||
<g:SimplePanel ui:field="descriptionUi" addStyleNames="{res.mainCss.spacermargin} {res.mainCss.spacermargintopmedium}" />
|
||||
<dp:liveraces.LiveRacesList ui:field="liveRacesListUi" addStyleNames="{res.mainCss.spacermargin} {res.mainCss.spacermargintopmedium}" />
|
||||
<dp:regattanavigation.DropdownFilter ui:field="boatCategoryFilterUi"
|
||||
addStyleNames="{res.mainCss.spacermargintopmedium} {res.mainCss.spacermarginbottombig}"/>
|
||||
<dp:multiregattalist.MultiRegattaList ui:field="regattaListUi" />
|
||||
<sp:statistics.EventStatisticsBox addStyleNames="{res.mainCss.spacermargin} {res.mainCss.spacermargintopmedium}" ui:field="statisticsBoxUi"/>
|
||||
addStyleNames="{res.mainCss.spacermargintopmedium} {res.mainCss.spacermarginbottombig}"/>
|
||||
<dp:multiregattalist.MultiRegattaList ui:field="regattaListUi" />
|
||||
<sp:statistics.EventStatisticsBox addStyleNames="{res.mainCss.spacermargin} {res.mainCss.spacermargintopmedium}" ui:field="statisticsBoxUi"/>
|
||||
</div>
|
||||
</div>
|
||||
<dp:raceoffice.RaceOfficeSection ui:field="raceOfficeSectionUi" />
|
||||
|
||||
+13
-1
@@ -17,6 +17,7 @@ import com.sap.sailing.gwt.home.communication.event.statistics.GetEventStatistic
|
||||
import com.sap.sailing.gwt.home.communication.eventview.HasRegattaMetadata;
|
||||
import com.sap.sailing.gwt.home.communication.eventview.HasRegattaMetadata.RegattaState;
|
||||
import com.sap.sailing.gwt.home.communication.regatta.RegattaWithProgressDTO;
|
||||
import com.sap.sailing.gwt.home.desktop.partials.eventdescription.EventDescription;
|
||||
import com.sap.sailing.gwt.home.desktop.partials.eventstage.EventOverviewStage;
|
||||
import com.sap.sailing.gwt.home.desktop.partials.liveraces.LiveRacesList;
|
||||
import com.sap.sailing.gwt.home.desktop.partials.multiregattalist.MultiRegattaListItem;
|
||||
@@ -42,10 +43,11 @@ public class RegattaOverviewTabView extends Composite implements RegattaTabView<
|
||||
|
||||
private static MyBinder ourUiBinder = GWT.create(MyBinder.class);
|
||||
private Presenter currentPresenter;
|
||||
|
||||
|
||||
@UiField SimplePanel regattaInfoContainerUi;
|
||||
@UiField(provided = true) LiveRacesList liveRacesListUi;
|
||||
@UiField(provided = true) EventOverviewStage stageUi;
|
||||
@UiField SimplePanel descriptionUi;
|
||||
@UiField(provided = true) StandingsList standingsUi;
|
||||
@UiField(provided = true) EventStatisticsBox statisticsBoxUi;
|
||||
@UiField RaceOfficeSection raceOfficeSectionUi;
|
||||
@@ -71,6 +73,16 @@ public class RegattaOverviewTabView extends Composite implements RegattaTabView<
|
||||
final HasRegattaMetadata regattaMetadata = currentPresenter.getRegattaMetadata();
|
||||
standingsUi = new StandingsList(regattaMetadata != null && regattaMetadata.getState() == RegattaState.FINISHED, currentPresenter.getRegattaLeaderboardNavigation(currentPresenter.getRegattaId()));
|
||||
initWidget(ourUiBinder.createAndBindUi(this));
|
||||
|
||||
if (!currentPresenter.showRegattaMetadata()) {
|
||||
final String description = currentPresenter.getEventDTO().getDescription();
|
||||
if (description != null) {
|
||||
descriptionUi.add(new EventDescription(description));
|
||||
} else {
|
||||
descriptionUi.removeFromParent();
|
||||
}
|
||||
}
|
||||
|
||||
raceOfficeSectionUi.addLink(StringMessages.INSTANCE.racesOverview(), currentPresenter.getRegattaOverviewLink());
|
||||
|
||||
RefreshManager refreshManager = new RefreshManagerWithErrorAndBusy(this, contentArea, currentPresenter.getDispatch(), currentPresenter.getErrorAndBusyClientFactory());
|
||||
|
||||
+4
-3
@@ -1,15 +1,16 @@
|
||||
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui'
|
||||
xmlns:dp='urn:import:com.sap.sailing.gwt.home.desktop.partials'
|
||||
xmlns:sp='urn:import:com.sap.sailing.gwt.home.shared.partials'>
|
||||
xmlns:dp='urn:import:com.sap.sailing.gwt.home.desktop.partials'
|
||||
xmlns:sp='urn:import:com.sap.sailing.gwt.home.shared.partials'>
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<g:HTMLPanel>
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<g:SimplePanel addStyleNames="{res.mediaCss.small12} {res.mediaCss.columns}" ui:field="regattaInfoContainerUi"/>
|
||||
<dp:liveraces.LiveRacesList ui:field="liveRacesListUi" addStyleNames="{res.mediaCss.small12} {res.mediaCss.columns} {res.mainCss.spacermargintopmedium}" />
|
||||
<dp:liveraces.LiveRacesList ui:field="liveRacesListUi" addStyleNames="{res.mediaCss.small12} {res.mediaCss.columns} {res.mainCss.spacermargintopmedium}" />
|
||||
</div>
|
||||
<dp:eventstage.EventOverviewStage ui:field="stageUi" addStyleNames="{res.mainCss.spacermargin} {res.mainCss.spacermargintopsmall}" />
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}">
|
||||
<g:SimplePanel ui:field="descriptionUi" addStyleNames="{res.mainCss.spacermargin} {res.mainCss.spacermargintopmedium}" />
|
||||
<dp:standings.StandingsList ui:field="standingsUi" addStyleNames="{res.mainCss.spacermargin} {res.mainCss.spacermargintopmedium}" />
|
||||
<sp:statistics.EventStatisticsBox addStyleNames="{res.mainCss.spacermargin} {res.mainCss.spacermargintopmedium} {res.mainCss.spacermarginbottommedium}" ui:field="statisticsBoxUi" />
|
||||
</div>
|
||||
|
||||
+2
@@ -15,6 +15,8 @@
|
||||
the grouping dimension. If that was the last dimension removed, the user is asked to provide a new
|
||||
grouping dimension.
|
||||
</li>
|
||||
<li>If available, an event description is now shown on event overview pages.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h5 class="articleSubheadline">September 2017</h5>
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.sap.sailing.gwt.home.mobile.partials.eventdescription;
|
||||
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
import com.sap.sailing.gwt.home.mobile.partials.section.MobileSection;
|
||||
import com.sap.sailing.gwt.home.mobile.partials.sectionHeader.SectionHeaderContent;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
|
||||
public class EventDescription extends Composite {
|
||||
|
||||
public EventDescription(String description) {
|
||||
final MobileSection section = new MobileSection();
|
||||
SectionHeaderContent header = new SectionHeaderContent();
|
||||
header.setSectionTitle(StringMessages.INSTANCE.description());
|
||||
section.addHeader(header);
|
||||
final Label content = new Label(description);
|
||||
content.getElement().getStyle().setPaddingTop(0.5, Unit.EM);
|
||||
content.getElement().getStyle().setPaddingBottom(0.75, Unit.EM);
|
||||
section.addContent(content);
|
||||
initWidget(section);
|
||||
}
|
||||
|
||||
}
|
||||
+8
@@ -10,6 +10,7 @@ import com.sap.sailing.gwt.home.communication.event.eventoverview.GetEventOvervi
|
||||
import com.sap.sailing.gwt.home.communication.event.news.GetEventOverviewNewsAction;
|
||||
import com.sap.sailing.gwt.home.communication.event.statistics.GetEventStatisticsAction;
|
||||
import com.sap.sailing.gwt.home.communication.media.SailingImageDTO;
|
||||
import com.sap.sailing.gwt.home.mobile.partials.eventdescription.EventDescription;
|
||||
import com.sap.sailing.gwt.home.mobile.partials.impressions.Impressions;
|
||||
import com.sap.sailing.gwt.home.mobile.partials.statisticsBox.MobileStatisticsBoxView;
|
||||
import com.sap.sailing.gwt.home.mobile.partials.updatesBox.UpdatesBox;
|
||||
@@ -62,4 +63,11 @@ public abstract class AbstractEventOverview extends AbstractEventView<EventViewB
|
||||
// TODO: desktop media navigation
|
||||
impressionsUi.setClickDestinaton(currentPresenter.getMediaPageNavigation());
|
||||
}
|
||||
|
||||
protected void setupEventDescription(Panel container) {
|
||||
final String description = currentPresenter.getEventDTO().getDescription();
|
||||
if (description != null) {
|
||||
container.add(new EventDescription(description));
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -26,6 +26,7 @@ public class MultiRegattaViewImpl extends AbstractEventOverview {
|
||||
super(presenter, false, false);
|
||||
FlowPanel container = new FlowPanel();
|
||||
this.setupOverviewStage(container);
|
||||
this.setupEventDescription(container);
|
||||
this.setupRegattaStatusList(container);
|
||||
this.setupUpdateBox(container);
|
||||
this.setupImpressions(container);
|
||||
|
||||
+1
@@ -37,6 +37,7 @@ public class RegattaOverviewImpl extends AbstractEventOverview {
|
||||
}
|
||||
if (!isMultiRegattaEvent()) {
|
||||
this.setupOverviewStage(container);
|
||||
this.setupEventDescription(container);
|
||||
}
|
||||
this.setupMiniLeaderboard(container);
|
||||
initRacesNavigation(container);
|
||||
|
||||
+4
-2
@@ -5288,8 +5288,10 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
private class TimeoutExtendingInputStream extends FilterInputStream {
|
||||
|
||||
// default timeout is high to ensure that long running client operations
|
||||
// such as compressing data will not have the server run into a timeout
|
||||
private static final int DEFAULT_TIMEOUT_IN_SECONDS = 60*10;
|
||||
// such as compressing data will not have the server run into a timeout.
|
||||
// this especially applies to foiling data where compression on slower machines
|
||||
// can take up to two hours.
|
||||
private static final int DEFAULT_TIMEOUT_IN_SECONDS = 60*60*2;
|
||||
|
||||
private final HttpURLConnection connection;
|
||||
|
||||
|
||||
Reference in new issue
Block a user