mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-30 17:36:40 +00:00
Merge branch 'master' of ssh://195.227.10.246/home/trac/git
This commit is contained in:
commit
7a49984692
9 files changed
+49
-4
No files matched your search
@@ -47,6 +47,8 @@ Inbound Port Assignments
|
||||
8888: servlet container of "prod1" Java instance
|
||||
8889: servlet container of "prod2" Java instance
|
||||
10200: MongoDB "dev" instance
|
||||
10201: MongoDB "test" instance
|
||||
10202: MontoDB "prod" instance
|
||||
12347: SSH forward to localhost:22 required for "mvn deploy"
|
||||
- UDP
|
||||
2010: wind input for "dev" Java instance
|
||||
|
||||
+7
-1
@@ -150,7 +150,13 @@ public class RaceTrackerImpl implements Listener, RaceTracker {
|
||||
receiver.stop();
|
||||
}
|
||||
ioThread.join(3000); // wait no more than three seconds
|
||||
trackedEvent.removedTrackedRace(trackedEvent.getTrackedRace(getRace()));
|
||||
RaceDefinition race = getRace();
|
||||
if (race != null) {
|
||||
TrackedRace trackedRace = trackedEvent.getExistingTrackedRace(race);
|
||||
if (trackedRace != null) {
|
||||
trackedEvent.removedTrackedRace(trackedRace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected DataController getController() {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dorg.osgi.service.http.port=8888"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dorg.osgi.service.http.port=8888 -Xmx4096m"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<booleanAttribute key="show_selected_only" value="false"/>
|
||||
<stringAttribute key="target_bundles" value="javax.servlet.jsp@default:default,javax.servlet@default:default,org.apache.ant@default:default,org.apache.commons.el@default:default,org.apache.commons.logging@default:default,org.apache.jasper@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.common@2:true,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit*3.8.2.v3_8_2_v20100427-1100@default:default,org.junit4@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default"/>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dhttp.proxyHost=proxy.wdf.sap.corp -Dhttp.proxyPort=8080 -Dorg.osgi.service.http.port=8888"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dhttp.proxyHost=proxy.wdf.sap.corp -Dhttp.proxyPort=8080 -Dorg.osgi.service.http.port=8888 -Xmx4096m"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<booleanAttribute key="show_selected_only" value="false"/>
|
||||
<stringAttribute key="target_bundles" value="javax.servlet.jsp@default:default,javax.servlet@default:default,org.apache.ant@default:default,org.apache.commons.el@default:default,org.apache.commons.logging@default:default,org.apache.jasper@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.common@2:true,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.update.configurator@3:true,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default"/>
|
||||
|
||||
@@ -9,6 +9,7 @@ import java.net.URL;
|
||||
import java.net.UnknownHostException;
|
||||
import java.text.ParseException;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -38,6 +39,7 @@ import com.sap.sailing.domain.tracking.WindStore;
|
||||
import com.sap.sailing.domain.tracking.WindTrack;
|
||||
import com.sap.sailing.domain.tracking.impl.EmptyWindStore;
|
||||
import com.sap.sailing.domain.tracking.impl.WindImpl;
|
||||
import com.sap.sailing.domain.tractracadapter.RaceRecord;
|
||||
import com.sap.sailing.mongodb.MongoObjectFactory;
|
||||
import com.sap.sailing.mongodb.MongoWindStoreFactory;
|
||||
import com.sap.sailing.server.util.InvalidDateException;
|
||||
@@ -51,6 +53,8 @@ public class AdminApp extends Servlet {
|
||||
private static final String ACTION_NAME_ADD_EVENT = "addevent";
|
||||
|
||||
private static final String ACTION_NAME_ADD_RACE = "addrace";
|
||||
|
||||
private static final String ACTION_NAME_LIST_RACES_IN_EVENT = "listracesinevent";
|
||||
|
||||
private static final String ACTION_NAME_STOP_EVENT = "stopevent";
|
||||
|
||||
@@ -120,6 +124,8 @@ public class AdminApp extends Servlet {
|
||||
stopEvent(req, resp);
|
||||
} else if (ACTION_NAME_ADD_RACE.equals(action)) {
|
||||
addRace(req, resp);
|
||||
} else if (ACTION_NAME_LIST_RACES_IN_EVENT.equals(action)) {
|
||||
listRacesInEvent(req, resp);
|
||||
} else if (ACTION_NAME_STOP_RACE.equals(action)) {
|
||||
stopRace(req, resp);
|
||||
} else if (ACTION_NAME_SUBSCRIBE_RACE_FOR_EXPEDITION_WIND.equals(action)) {
|
||||
@@ -150,6 +156,21 @@ public class AdminApp extends Servlet {
|
||||
}
|
||||
}
|
||||
|
||||
private void listRacesInEvent(HttpServletRequest req, HttpServletResponse resp) throws IOException, ParseException, org.json.simple.parser.ParseException {
|
||||
URL jsonURL = new URL(req.getParameter(PARAM_NAME_EVENT_JSON_URL));
|
||||
List<RaceRecord> raceRecords = getService().getRaceRecords(jsonURL);
|
||||
JSONArray result = new JSONArray();
|
||||
for (RaceRecord raceRecord : raceRecords) {
|
||||
JSONObject jsonRaceRecord = new JSONObject();
|
||||
jsonRaceRecord.put("name", raceRecord.getName());
|
||||
jsonRaceRecord.put("ID", raceRecord.getID());
|
||||
jsonRaceRecord.put("paramURL", raceRecord.getParamURL());
|
||||
jsonRaceRecord.put("replayURL", raceRecord.getReplayURL());
|
||||
result.add(jsonRaceRecord);
|
||||
}
|
||||
result.writeJSONString(resp.getWriter());
|
||||
}
|
||||
|
||||
private void addWindToMarks(HttpServletRequest req, HttpServletResponse resp) throws IOException,
|
||||
InvalidDateException, NoWindException {
|
||||
Event event = getEvent(req);
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.declination.DeclinationService;
|
||||
import com.sap.sailing.domain.base.Event;
|
||||
@@ -17,6 +18,7 @@ import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.WindStore;
|
||||
import com.sap.sailing.domain.tractracadapter.DomainFactory;
|
||||
import com.sap.sailing.domain.tractracadapter.RaceHandle;
|
||||
import com.sap.sailing.domain.tractracadapter.RaceRecord;
|
||||
import com.sap.sailing.domain.tractracadapter.RaceTracker;
|
||||
import com.sap.sailing.util.Util.Triple;
|
||||
|
||||
@@ -111,4 +113,11 @@ public interface RacingEventService {
|
||||
|
||||
Iterable<Triple<Event, RaceDefinition, Integer>> getWindTrackedRaces();
|
||||
|
||||
/**
|
||||
* For the JSON URL of an account / event, lists the paramURLs that can be used for {@link #addRace(URL, URI, URI, WindStore)}
|
||||
* calls to individually start tracking races of this event, rather than tracking <em>all</em> races in the event which
|
||||
* is hardly ever useful.
|
||||
*/
|
||||
List<RaceRecord> getRaceRecords(URL jsonURL) throws IOException, ParseException, org.json.simple.parser.ParseException;
|
||||
|
||||
}
|
||||
@@ -91,6 +91,12 @@ public class RacingEventServiceImpl implements RacingEventService {
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RaceRecord> getRaceRecords(URL jsonURL) throws IOException, ParseException, org.json.simple.parser.ParseException {
|
||||
JSONService jsonService = getDomainFactory().parseJSONURL(jsonURL);
|
||||
return jsonService.getRaceRecords();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RaceHandle addRace(URL paramURL, URI liveURI, URI storedURI, WindStore windStore) throws MalformedURLException, FileNotFoundException,
|
||||
URISyntaxException {
|
||||
|
||||
+1
-1
@@ -142,7 +142,7 @@
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>ssh-repository</id>
|
||||
<url>scpexe://trac@localhost:12347/home/trac/maven-repositories/test</url>
|
||||
<url>scpexe://trac@localhost:12347/home/trac/maven-repositories/prod</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
|
||||
@@ -4,3 +4,4 @@ osgi.bundles=org.eclipse.core.runtime@1:start,org.eclipse.equinox.common@2:start
|
||||
eclipse.ignoreApp=true
|
||||
osgi.noShutdown=true
|
||||
org.osgi.service.http.port=8888
|
||||
mongo.port=10200
|
||||
Reference in new issue
Block a user