merge.
This commit is contained in:
commit
25d397fb0e
Notes:
subgit
2018-03-07 17:59:00 +01:00
r673 www/branches/life
@ -109,8 +109,8 @@ function ajaxLoadEvents(stime, etime, id, target) {
|
||||
var location
|
||||
// get location, try this in order:
|
||||
// regional map name, given value, cached value, or nominatim lookup
|
||||
location = ( getLocation(lat, lng)[0] || $(this).find('description > text').text() );
|
||||
location = ( geolocationTable[id] || getGeolocation(id, lat, lng) );
|
||||
geolocationTable[id] ? null : getGeolocation(id, lat, lng); // do AJAX lookup if not cached, location will be updated later
|
||||
location = ( geolocationTable[id] || getLocation(lat, lng)[0] || $(this).find('description > text').text() );
|
||||
// create table row: Date, Time, Mag, Location
|
||||
if ( !eventTable[id] && $.inArray(type, config['event']['typeWhitelist'] )+1 && $.inArray(evaluationStatus, config['event']['evaluationBlacklist'])<0 && Number(mag)+0.05 >= config['event']['minMag'] ) {
|
||||
// general event info (1st line)
|
||||
|
@ -40,7 +40,7 @@ function loadStations(stime, etime) {
|
||||
var request_data = {
|
||||
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
||||
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
||||
level: 'station',
|
||||
level: 'channel',
|
||||
minlat: S-config['map']['latlngDelta'],
|
||||
maxlat: N+config['map']['latlngDelta'],
|
||||
minlon: W-config['map']['latlngDelta'],
|
||||
@ -57,8 +57,8 @@ function loadStations(stime, etime) {
|
||||
if ( $.inArray(network, config['station']['networkBlacklist'])<0 ) {
|
||||
$(this).find('Station').each(function () {
|
||||
var station = $(this).attr('code'),
|
||||
lat = $(this).find('Latitude').text(),
|
||||
lng = $(this).find('Longitude').text(),
|
||||
lat = $(this).find('Latitude:first').text(),
|
||||
lng = $(this).find('Longitude:first').text(),
|
||||
stationID = network+'_'+station,
|
||||
stationText = network+'.'+station;
|
||||
if ( !stationTable[stationID] ) {
|
||||
@ -69,7 +69,9 @@ function loadStations(stime, etime) {
|
||||
row += ( $.inArray(station, bochumStation)+1 ) ? '</br><em>Betreiber:</em> Ruhr-Universität Bochum</td></tr>' : '</td></tr>' ;
|
||||
if ( network == 'RN' || network == 'X5' || $.inArray(station, bochumStation)+1 ) {
|
||||
// setting up station details (3rd line)
|
||||
row += '<tr class="tablesorter-childRow station-details"><td colspan="4">not implemented</td></tr>';
|
||||
row += '<tr class="tablesorter-childRow station-details"><td colspan="4">';
|
||||
row += stationDetails(station, network, lat, lng, stationID, stationText, $(this));
|
||||
row += '</td></tr>';
|
||||
// setting up download links (4th line)
|
||||
var URL, fdsnxmlURL, fdsnxmlRespURL, sc3mlURL, sc3mlRespURL, dlsvURL;
|
||||
URL = sprintf('%s?network=%s&station=%s', config['ajax']['stationURL'], network, station);
|
||||
@ -116,6 +118,24 @@ function loadStations(stime, etime) {
|
||||
$('#stations-csv-link').attr('href', config['ajax']['stationURL']+'?'+$.param(request_data));
|
||||
};
|
||||
|
||||
/* format station Details */
|
||||
function stationDetails(station, network, lat, lng, stationId, stationText, stationObject) {
|
||||
var output;
|
||||
var elevation = stationObject.find('Elevation:first').text();
|
||||
var name = stationObject.find('Site > Name').text();
|
||||
output = '<pre>'
|
||||
+ name + '</br>'
|
||||
+ 'Position: ' + lat + '°N ' + lng + '°E, Höhe: ' + elevation + ' m NN</br>';
|
||||
stationObject.find('Channel').each(function() {
|
||||
var code = $(this).attr('code');
|
||||
var sensor = $(this).find('Sensor > Type').text().split(',')[0];
|
||||
var sampleRate = $(this).find('SampleRate').text();
|
||||
output += '</br>Kanal ' + code + ', Abtastrate ' + sampleRate + ' Hz, Sensor ' + sensor;
|
||||
});
|
||||
output += '</pre>';
|
||||
return output;
|
||||
};
|
||||
|
||||
/* initStationTable */
|
||||
function initStationTable() {
|
||||
// tablesorter for station list
|
||||
|
Loading…
Reference in New Issue
Block a user