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 | 				var location | ||||||
| 				// get location, try this in order:
 | 				// get location, try this in order:
 | ||||||
| 				// regional map name, given value, cached value,  or nominatim lookup
 | 				// regional map name, given value, cached value,  or nominatim lookup
 | ||||||
| 				location = ( getLocation(lat, lng)[0] || $(this).find('description > text').text() ); | 				geolocationTable[id] ? null : getGeolocation(id, lat, lng); // do AJAX lookup if not cached, location will be updated later
 | ||||||
| 				location = ( geolocationTable[id] || getGeolocation(id, lat, lng) ); | 				location = ( geolocationTable[id] || getLocation(lat, lng)[0] || $(this).find('description > text').text() ); | ||||||
| 				// create table row: Date, Time, Mag, Location
 | 				// 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'] ) { | 				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)
 | 					// general event info (1st line)
 | ||||||
|  | |||||||
| @ -40,7 +40,7 @@ function loadStations(stime, etime) { | |||||||
| 	var request_data = { | 	var request_data = { | ||||||
| 		endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()), | 		endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()), | ||||||
| 		startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()), | 		startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()), | ||||||
| 		level: 'station', | 		level: 'channel', | ||||||
| 		minlat: S-config['map']['latlngDelta'], | 		minlat: S-config['map']['latlngDelta'], | ||||||
| 		maxlat: N+config['map']['latlngDelta'], | 		maxlat: N+config['map']['latlngDelta'], | ||||||
| 		minlon: W-config['map']['latlngDelta'], | 		minlon: W-config['map']['latlngDelta'], | ||||||
| @ -57,8 +57,8 @@ function loadStations(stime, etime) { | |||||||
| 				if ( $.inArray(network, config['station']['networkBlacklist'])<0 ) { | 				if ( $.inArray(network, config['station']['networkBlacklist'])<0 ) { | ||||||
| 					$(this).find('Station').each(function () { | 					$(this).find('Station').each(function () { | ||||||
| 						var station = $(this).attr('code'), | 						var station = $(this).attr('code'), | ||||||
| 							lat = $(this).find('Latitude').text(), | 							lat = $(this).find('Latitude:first').text(), | ||||||
| 							lng = $(this).find('Longitude').text(), | 							lng = $(this).find('Longitude:first').text(), | ||||||
| 							stationID = network+'_'+station, | 							stationID = network+'_'+station, | ||||||
| 							stationText = network+'.'+station; | 							stationText = network+'.'+station; | ||||||
| 						if ( !stationTable[stationID] ) { | 						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>' ; | 							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 ) { | 							if ( network == 'RN' || network == 'X5' || $.inArray(station, bochumStation)+1 ) { | ||||||
| 								// setting up station details (3rd line)
 | 								// 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)
 | 								// setting up download links (4th line)
 | ||||||
| 								var URL, fdsnxmlURL, fdsnxmlRespURL, sc3mlURL, sc3mlRespURL, dlsvURL; | 								var URL, fdsnxmlURL, fdsnxmlRespURL, sc3mlURL, sc3mlRespURL, dlsvURL; | ||||||
| 								URL = sprintf('%s?network=%s&station=%s', config['ajax']['stationURL'], network, station); | 								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)); | 	$('#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 */ | /* initStationTable */ | ||||||
| function initStationTable() { | function initStationTable() { | ||||||
| 	// tablesorter for station list
 | 	// tablesorter for station list
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user