mirror of https://github.com/MISP/misp-dashboard
Few cleanup
parent
c137932770
commit
0e63e47364
|
@ -194,15 +194,9 @@ def getCoordsByRadius():
|
||||||
dico_coord[str(coord)] = [data]
|
dico_coord[str(coord)] = [data]
|
||||||
|
|
||||||
for dicoCoord, array in dico_coord.items():
|
for dicoCoord, array in dico_coord.items():
|
||||||
print(array)
|
|
||||||
dicoCoord = json.loads(dicoCoord)
|
dicoCoord = json.loads(dicoCoord)
|
||||||
to_return.append([array, dicoCoord])
|
to_return.append([array, dicoCoord])
|
||||||
|
|
||||||
#res = [ [json.loads(data), coord] for data, coord in res ] #correctly send the json
|
|
||||||
#to_return.append(res)
|
|
||||||
import pprint
|
|
||||||
pprint.pprint(to_return)
|
|
||||||
|
|
||||||
return jsonify(to_return)
|
return jsonify(to_return)
|
||||||
|
|
||||||
@app.route("/_logs")
|
@app.route("/_logs")
|
||||||
|
|
|
@ -335,17 +335,6 @@ small {
|
||||||
savedMarkerRadius[i].remove(); // remove marker
|
savedMarkerRadius[i].remove(); // remove marker
|
||||||
}
|
}
|
||||||
|
|
||||||
//for (var listIndex in allList) {
|
|
||||||
// var list = allList[listIndex];
|
|
||||||
// for (var dayListIndex in list) {
|
|
||||||
// var jsonData = list[dayListIndex][0];
|
|
||||||
// var coordJson = list[dayListIndex][1];
|
|
||||||
|
|
||||||
// var marker = L.marker([coordJson[1], coordJson[0]]).addTo(radiusOpenStreetMap);
|
|
||||||
// savedMarkerRadius.push(marker);
|
|
||||||
// marker.bindPopup('<strong>'+jsonData.categ+': </strong> '+jsonData.value, {autoClose:false}).openPopup();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
for (var listIndex in allList) {
|
for (var listIndex in allList) {
|
||||||
var curMarker = allList[listIndex];
|
var curMarker = allList[listIndex];
|
||||||
var dataText = "";
|
var dataText = "";
|
||||||
|
@ -405,7 +394,7 @@ small {
|
||||||
datePickerWidget.datepicker("setDate", new Date());
|
datePickerWidget.datepicker("setDate", new Date());
|
||||||
|
|
||||||
// radius
|
// radius
|
||||||
radiusOpenStreetMap = L.map('radiusMap', {closePopupOnClick: false} ).setView([30, 0], 2);
|
radiusOpenStreetMap = L.map('radiusMap').setView([30, 0], 2);
|
||||||
new L.TileLayer(OSMURL, {minZoom: 0, maxZoom: 18}).addTo(radiusOpenStreetMap);
|
new L.TileLayer(OSMURL, {minZoom: 0, maxZoom: 18}).addTo(radiusOpenStreetMap);
|
||||||
datePickersRadiusWidgetFrom = $( "#datepickerRadiusFrom" )
|
datePickersRadiusWidgetFrom = $( "#datepickerRadiusFrom" )
|
||||||
datePickersRadiusWidgetFrom.datepicker(datePickerRadiusOptions);
|
datePickersRadiusWidgetFrom.datepicker(datePickerRadiusOptions);
|
||||||
|
|
Loading…
Reference in New Issue