mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-24 14:38:45 +00:00
bug4643: Added existing WindFinder spot collections to AvailableWindFinderSpotCollections.java. WindFinder Tab in Event Dialog has a suggestion box where they are used. Event Detail panel has a field with the used windfinder collections. Added StringMessages.
This commit is contained in:
+41
@@ -0,0 +1,41 @@
|
||||
package com.sap.sailing.domain.common.windfinder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public enum AvailableWindFinderSpotCollections {
|
||||
KIELERFOERDE("kielerfoerde"),
|
||||
CHIEMSEE("chiemsee"),
|
||||
STARNBERGERSEE("starnbergersee"),
|
||||
WANNSEE("wannsee"),
|
||||
TRAVEMUENDE("travemuende"),
|
||||
BALTIC_OFFSHORE("baltic_offshore"),
|
||||
LITAUEN("litauen"),
|
||||
HAMBURG_ALSTER("hamburg_alster"),
|
||||
GDANSK("gdansk"),
|
||||
BREST("brest"),
|
||||
SZCZECIN("szczecin"),
|
||||
SANKT_PETERSBURG("sankt_petersburg"),
|
||||
SANKT_MORITZ("sankt_moritz"),
|
||||
PORTO_CERVO("porto_cervo");
|
||||
|
||||
private final String name;
|
||||
|
||||
private AvailableWindFinderSpotCollections(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public static List<String> getAllAvailableWindFinderSpotCollectionsInAlphabeticalOrder() {
|
||||
List<String> result = new ArrayList<>();
|
||||
for (AvailableWindFinderSpotCollections awsc : values()) {
|
||||
result.add(awsc.getName());
|
||||
}
|
||||
Collections.sort(result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -57,8 +57,7 @@ Require-Bundle: com.sap.sailing.domain,
|
||||
com.sap.sailing.expeditionconnector,
|
||||
com.sap.sailing.expeditionconnector.common,
|
||||
org.mp4parser.isoparser;bundle-version="1.9.31",
|
||||
com.sap.sailing.domain.windfinderadapter,
|
||||
com.sap.sse.datamining.ui;bundle-version="1.0.0"
|
||||
com.sap.sse.datamining.ui
|
||||
Bundle-Activator: com.sap.sailing.gwt.ui.server.Activator
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Import-Package: javax.servlet;version="3.1.0",
|
||||
|
||||
+10
-1
@@ -40,6 +40,7 @@ public class EventDetailsComposite extends Composite {
|
||||
private final SimpleAnchorListComposite imageURLList;
|
||||
private final SimpleAnchorListComposite videoURLList;
|
||||
private final SimpleStringListComposite leaderboardGroupList;
|
||||
private final SimpleStringListComposite windfinderSpotCollectionsList;
|
||||
|
||||
private final CaptionPanel mainPanel;
|
||||
|
||||
@@ -71,7 +72,10 @@ public class EventDetailsComposite extends Composite {
|
||||
courseAreaNamesList = createLabelAndValueListWidget(grid, currentRow++, stringMessages.courseAreas(), "CourseAreaValueList");
|
||||
imageURLList = createLabelAndAnchorListWidget(grid, currentRow++, stringMessages.images(), "ImageURLValueList");
|
||||
videoURLList = createLabelAndAnchorListWidget(grid, currentRow++, stringMessages.videos(), "VideoURLValueList");
|
||||
leaderboardGroupList = createLabelAndValueListWidget(grid, currentRow++, stringMessages.leaderboardGroups(), "LeaderboardGroupValueList");
|
||||
leaderboardGroupList = createLabelAndValueListWidget(grid, currentRow++, stringMessages.leaderboardGroups(),
|
||||
"LeaderboardGroupValueList");
|
||||
windfinderSpotCollectionsList = createLabelAndValueListWidget(grid, currentRow++,
|
||||
stringMessages.windFinderSpotCollectionsList(), "WindFinderSpotCollectionsList");
|
||||
|
||||
for(int i=0; i < rows; i++) {
|
||||
grid.getCellFormatter().setVerticalAlignment(i, 0, HasVerticalAlignment.ALIGN_TOP);
|
||||
@@ -166,6 +170,11 @@ public class EventDetailsComposite extends Composite {
|
||||
leaderboardGroupNamesAsList.add(leaderboardGroupDTO.getName());
|
||||
}
|
||||
leaderboardGroupList.setValues(leaderboardGroupNamesAsList);
|
||||
List<String> windfinderSpotCollectionsNamesAsList = new ArrayList<>();
|
||||
for (String windfinderSpotCollection : event.getWindFinderReviewedSpotsCollectionIds()) {
|
||||
windfinderSpotCollectionsNamesAsList.add(windfinderSpotCollection);
|
||||
}
|
||||
windfinderSpotCollectionsList.setValues(windfinderSpotCollectionsNamesAsList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+12
-2
@@ -22,6 +22,7 @@ import com.google.gwt.user.client.ui.TextArea;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.domain.common.windfinder.AvailableWindFinderSpotCollections;
|
||||
import com.sap.sailing.gwt.ui.client.DataEntryDialogWithDateTimeBox;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
@@ -32,6 +33,7 @@ import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.VenueDTO;
|
||||
import com.sap.sse.gwt.client.IconResources;
|
||||
import com.sap.sse.gwt.client.controls.datetime.DateAndTimeInput;
|
||||
import com.sap.sse.gwt.client.controls.listedit.GenericStringListEditorComposite;
|
||||
import com.sap.sse.gwt.client.controls.listedit.GenericStringListInlineEditorComposite;
|
||||
import com.sap.sse.gwt.client.controls.listedit.StringConstantsListEditorComposite;
|
||||
import com.sap.sse.gwt.client.controls.listedit.StringListInlineEditorComposite;
|
||||
@@ -162,9 +164,17 @@ public abstract class EventDialog extends DataEntryDialogWithDateTimeBox<EventDT
|
||||
imagesListComposite = new ImagesListComposite(sailingService, stringMessages);
|
||||
videosListComposite = new VideosListComposite(stringMessages);
|
||||
externalLinksComposite = new ExternalLinksComposite(stringMessages);
|
||||
|
||||
final List<String> suggestedWindFinderSpotCollections = AvailableWindFinderSpotCollections
|
||||
.getAllAvailableWindFinderSpotCollectionsInAlphabeticalOrder() == null ? Collections.emptyList()
|
||||
: AvailableWindFinderSpotCollections
|
||||
.getAllAvailableWindFinderSpotCollectionsInAlphabeticalOrder();
|
||||
|
||||
windFinderSpotCollectionIdsComposite = new StringListInlineEditorComposite(Collections.<String> emptyList(),
|
||||
new GenericStringListInlineEditorComposite.ExpandedUi<String>(stringMessages, IconResources.INSTANCE.removeIcon(), /* suggestValues */
|
||||
Collections.emptyList(), stringMessages.enterIdOfWindfinderReviewedSpotCollection(), 80));
|
||||
new GenericStringListEditorComposite.ExpandedUi<String>(stringMessages,
|
||||
IconResources.INSTANCE.removeIcon(), /* suggestValues */
|
||||
suggestedWindFinderSpotCollections, stringMessages.enterIdOfWindFinderReviewedSpotCollection(),
|
||||
35));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-1
@@ -1972,7 +1972,7 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
|
||||
String windFinderWindSourceTypeTooltip();
|
||||
String windFinder();
|
||||
String enterTagsForTheVideo();
|
||||
String enterIdOfWindfinderReviewedSpotCollection();
|
||||
String enterIdOfWindFinderReviewedSpotCollection();
|
||||
String enterTagsForTheImage();
|
||||
String unableToResolveWindFinderSpotId(String id, String message);
|
||||
String windFinderWeatherData();
|
||||
@@ -2080,4 +2080,5 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
|
||||
String manage2SailEventURLBox();
|
||||
String manage2SailEventIdBoxTooltip();
|
||||
String manage2SailPort();
|
||||
String windFinderSpotCollectionsList();
|
||||
}
|
||||
|
||||
+1
@@ -1978,6 +1978,7 @@ windFinderWindSourceTypeTooltip=Measured wind from one or more spots of www.wind
|
||||
windFinder=WindFinder
|
||||
enterTagsForTheVideo=Enter tags for the video
|
||||
enterIdOfWindfinderReviewedSpotCollection=Enter ID of a reviewed WindFinder spot collection, e.g., "schilksee"
|
||||
windFinderSpotCollectionsList=WindFinder spot collections
|
||||
enterTagsForTheImage=Enter tags for the image
|
||||
unableToResolveWindFinderSpotId=Unable to resolve WindFinder spot with ID {0}: {1}
|
||||
windFinderWeatherData=Weather Data
|
||||
|
||||
+1
@@ -1973,6 +1973,7 @@ errorWhileSlicingARace=Ein Fehler ist beim Schneiden eines Rennens aufgetreten
|
||||
windFinderWindSourceTypeName=WindFinder
|
||||
windFinderWindSourceTypeTooltip=Gemessener Wind von einer oder mehreren Stationen von www.windfinder.com
|
||||
windFinder=WindFinder
|
||||
windFinderSpotCollectionsList=WindFinder Messstellen-Sammlungen
|
||||
enterTagsForTheVideo=Tags zum Video erfassen
|
||||
enterIdOfWindfinderReviewedSpotCollection=ID einer geprüften WindFinder Messstellen-Sammlung eingeben, z.B. "schilksee"
|
||||
enterTagsForTheImage=Tags zum Bild erfassen
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
<h2 class="articleSubheadline">June 2018</h2>
|
||||
<ul class="bulletList">
|
||||
<li>Added the available WindFinder Spot Collections. The desired ones can be selected from the WindFinder Tab in the Event Dialog.</li>
|
||||
<li>Added the ability to change the url of multiple Mediatracks with a common prefix at once.
|
||||
This is useful e.g. for video migration scenarios when movin videaos from one server to another.
|
||||
This can be done from the adminconsole->tracked races->audio & videos tab</li>
|
||||
|
||||
+18
-6
@@ -3,6 +3,7 @@ package com.sap.sse.gwt.client.controls.listedit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.dom.client.KeyUpEvent;
|
||||
@@ -85,11 +86,9 @@ public abstract class GenericStringListEditorComposite<ValueType> extends ListEd
|
||||
}
|
||||
|
||||
public static class ExpandedUi<ValueType> extends ExpandedListEditorUi<ValueType> {
|
||||
|
||||
protected final MultiWordSuggestOracle inputOracle;
|
||||
protected final String placeholderTextForAddTextbox;
|
||||
|
||||
|
||||
protected final Integer inputBoxSize;
|
||||
public ExpandedUi(StringMessages stringMessages, ImageResource removeImage, Iterable<String> suggestValues) {
|
||||
this(stringMessages, removeImage, suggestValues, /* placeholderTextForAddTextbox */ null);
|
||||
}
|
||||
@@ -98,8 +97,17 @@ public abstract class GenericStringListEditorComposite<ValueType> extends ListEd
|
||||
* @param suggestValues must not be null but may be empty
|
||||
* @param placeholderTextForAddTextbox may be null
|
||||
*/
|
||||
public ExpandedUi(StringMessages stringMessages, ImageResource removeImage, Iterable<String> suggestValues, String placeholderTextForAddTextbox) {
|
||||
super(stringMessages, removeImage, /*canRemoveItems*/true);
|
||||
public ExpandedUi(StringMessages stringMessages, ImageResource removeImage, Iterable<String> suggestValues,
|
||||
String placeholderTextForAddTextbox) {
|
||||
this(stringMessages, removeImage, suggestValues, placeholderTextForAddTextbox, null);
|
||||
|
||||
}
|
||||
/**
|
||||
* @param inputBoxSize The size of the input box in EM Unit.
|
||||
*/
|
||||
public ExpandedUi(StringMessages stringMessages, ImageResource removeImage, Iterable<String> suggestValues,
|
||||
String placeholderTextForAddTextbox, Integer inputBoxSize) {
|
||||
super(stringMessages, removeImage, /* canRemoveItems */true);
|
||||
this.placeholderTextForAddTextbox = placeholderTextForAddTextbox;
|
||||
this.inputOracle = new MultiWordSuggestOracle();
|
||||
for (String suggestValue : suggestValues) {
|
||||
@@ -108,8 +116,9 @@ public abstract class GenericStringListEditorComposite<ValueType> extends ListEd
|
||||
List<String> defaultSuggestions = new ArrayList<>();
|
||||
Util.addAll(suggestValues, defaultSuggestions);
|
||||
this.inputOracle.setDefaultSuggestionsFromText(defaultSuggestions);
|
||||
this.inputBoxSize = inputBoxSize;
|
||||
}
|
||||
|
||||
|
||||
protected GenericStringListEditorComposite<ValueType> getContext() {
|
||||
return (GenericStringListEditorComposite<ValueType>) context;
|
||||
}
|
||||
@@ -134,6 +143,9 @@ public abstract class GenericStringListEditorComposite<ValueType> extends ListEd
|
||||
protected Widget createAddWidget() {
|
||||
final SuggestBox inputBox = createSuggestBox();
|
||||
inputBox.ensureDebugId("InputSuggestBox");
|
||||
if (inputBoxSize != null) {
|
||||
inputBox.setWidth(Integer.toString(inputBoxSize) + Unit.EM);
|
||||
}
|
||||
final Button addButton = new Button(getStringMessages().add());
|
||||
addButton.ensureDebugId("AddButton");
|
||||
addButton.setEnabled(false);
|
||||
|
||||
+2
-1
@@ -36,7 +36,8 @@ public abstract class GenericStringListInlineEditorComposite<ValueType> extends
|
||||
this(stringMessages, removeImage, suggestValues, /* placeholderTextForAddTextbox */ null, textBoxSize);
|
||||
}
|
||||
|
||||
public ExpandedUi(StringMessages stringMessages, ImageResource removeImage, List<String> suggestValues, String placeholderTextForAddTextbox, int textBoxSize) {
|
||||
public ExpandedUi(StringMessages stringMessages, ImageResource removeImage, List<String> suggestValues,
|
||||
String placeholderTextForAddTextbox, int textBoxSize) {
|
||||
super(stringMessages, removeImage, suggestValues, placeholderTextForAddTextbox);
|
||||
this.textBoxSize = textBoxSize;
|
||||
}
|
||||
|
||||
+2
-1
@@ -82,7 +82,8 @@ public class UserDetailsView extends FlowPanel {
|
||||
for (Permission permission : additionalPermissions) {
|
||||
defaultPermissionNames.add(permission.getStringPermission());
|
||||
}
|
||||
rolesEditor = new StringListEditorComposite(user==null?Collections.<String>emptySet():user.getRoles(), stringMessages, com.sap.sse.gwt.client.IconResources.INSTANCE.removeIcon(), defaultRoleNames,
|
||||
rolesEditor = new StringListEditorComposite(user == null ? Collections.<String> emptySet() : user.getRoles(),
|
||||
stringMessages, com.sap.sse.gwt.client.IconResources.INSTANCE.removeIcon(), defaultRoleNames,
|
||||
stringMessages.enterRoleName());
|
||||
rolesEditor.addValueChangeHandler(new ValueChangeHandler<Iterable<String>>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user