mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-04 11:23:50 +00:00
125 lines
6.2 KiB
XML
125 lines
6.2 KiB
XML
<metal:do use-macro="main">
|
|
|
|
<metal:do fill-slot="header">
|
|
<script type="text/javascript" src="${request.application_url}/static/js/jquery-ui/jquery.ui.core.min.js"></script>
|
|
<script type="text/javascript" src="${request.application_url}/static/js/jquery-ui/jquery.ui.widget.min.js"></script>
|
|
<script type="text/javascript" src="${request.application_url}/static/js/jquery-ui/jquery.ui.mouse.min.js"></script>
|
|
<script type="text/javascript" src="${request.application_url}/static/js/jquery-ui/jquery.ui.tabs.min.js"></script>
|
|
<script type="text/javascript" src="${request.application_url}/static/js/jquery-ui/jquery.ui.datepicker.min.js"></script>
|
|
<script type="text/javascript" src="${request.application_url}/static/js/jquery-ui/jquery.ui.slider.min.js"></script>
|
|
<script type="text/javascript" src="${request.application_url}/static/js/jquery-ui-timepicker-addon.js"></script>
|
|
</metal:do>
|
|
|
|
<metal:do fill-slot="main">
|
|
|
|
<h2><a href="${request.application_url}">Sailing Admin Interface</a></h2>
|
|
|
|
<div class="message" tal:condition="request.params.get('message')">
|
|
${request.params.get('message')}
|
|
</div>
|
|
|
|
<div style="text-align: right;margin: 13px 1px 13px 1px;">
|
|
<form method="POST" action="/++/configureListener">
|
|
<div id="listeners-container">
|
|
<select id="listeners">
|
|
<option>Loading....</option>
|
|
</select>
|
|
<input type="button" value="UnPause" onclick="GET('unPauseListener', {tid:$('#listeners option:selected').val()}, loadListeners)"/>
|
|
|
|
<input type="button" value="Pause" onclick="GET('pauseListener', {tid:$('#listeners option:selected').val()}, loadListeners)"/>
|
|
|
|
<input type="button" value="UnPause ALL" onclick="GET('unPauseListener', {all: true, tid:$('#listeners option:selected').val()}, loadListeners)"/>
|
|
|
|
<input type="button" value="Pause ALL" onclick="GET('pauseListener', {all: true, tid:$('#listeners option:selected').val()}, loadListeners)"/>
|
|
|
|
<input type="button" value="Stop" onclick="GET('stopListener', {tid: $('#listeners option:selected').val()}, loadListeners)"/>
|
|
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div id="tabs">
|
|
<ul>
|
|
<li><a href="/@@/java-connector">Server</a></li>
|
|
<li><a href="#tab-simulator">Sim</a></li>
|
|
<li><a href="/@@/wind-settings">Wind</a></li>
|
|
<li><a href="/@@/udp-configurator">Exp Receiver</a></li>
|
|
<li><a href="/@@/general-race-info">Info</a></li>
|
|
<li><a href="/@@/general-competitor-info">Compets</a></li>
|
|
<li><a href="/@@/map-overview">Map</a></li>
|
|
<li><a href="/@@/leaderboard">Leaderboard</a></li>
|
|
<li><a href="/@@/live-info">Live Info</a></li>
|
|
<li><a href="/@@/database-stats">DB</a></li>
|
|
</ul>
|
|
|
|
<div id="tab-simulator">
|
|
<div class="help">
|
|
Here you can control the TracTrac simulator. This application does not the state of the running
|
|
simulator. Please stop it after having finished. Never use this simulator for real races as it would yield
|
|
no data. Make sure to start this simulator before initializing the listener. Wait up to 5 seconds before
|
|
starting the listener. Currently this will start the <b>J80</b> race simulation.
|
|
</div>
|
|
|
|
<div style="margin: 10px;font-weight: bold; font-size: 18px;">
|
|
<fieldset>
|
|
<legend>J80</legend>
|
|
<a style="color:green;" target="_blank" href="http://SAP:ext2Boat@sapsimulation.tracdev.dk/start.php?racenumber=7&speed=10&replaytime=sample">START</a>
|
|
<a style="color:red;" target="_blank" href="http://SAP:ext2Boat@sapsimulation.tracdev.dk/kill.php">STOP</a>
|
|
</fieldset><br/><br/>
|
|
<fieldset>
|
|
<legend>J80 (old)</legend>
|
|
<a style="color:green;" target="_blank" href="http://tracsim:simming10@www.traclive.dk/simulate/start.php?racenumber=7&speed=10&replaytime=sample">START</a>
|
|
<a style="color:red;" target="_blank" href="http://www.traclive.dk/simulate/kill.php">STOP</a>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
var run_listener = true;
|
|
|
|
function loadListeners() {
|
|
if (run_listener == true)
|
|
$('#listeners').html('<option>Checking server...</option>');
|
|
GET('configuredListeners', {}, function(data) {
|
|
options = '';
|
|
for (d in data) {
|
|
options += format('<option value="'+data[d].xid+'">{host}:{port} | {eventname} | {racename} | Last Update: {last_update} Paused: {paused} Running: {running}</option>', data[d]);
|
|
}
|
|
|
|
if (options == '')
|
|
options = '<option>No listener running!</option>';
|
|
|
|
$('#listeners').html(options);
|
|
});
|
|
}
|
|
|
|
function toggleListener() {
|
|
if (run_listener == true) {
|
|
run_listener = false;
|
|
return 'Start';
|
|
} else {
|
|
run_listener = true;
|
|
return 'Pause';
|
|
}
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
$('#tabs').tabs({
|
|
ajaxOptions: {
|
|
error: function(xhr, status, index, anchor) {
|
|
$(anchor.hash).html('An unknown error occured. Please check the logs!');
|
|
}
|
|
}
|
|
});
|
|
|
|
window.setInterval(loadListeners, 2000);
|
|
loadListeners();
|
|
});
|
|
</script>
|
|
|
|
</metal:do>
|
|
|
|
</metal:do>
|