Added componentDidMount heatmap initializer
This commit is contained in:
parent
39a38fe8eb
commit
181985859e
@ -42,7 +42,14 @@ export default class MapContainer extends Component {
|
||||
|
||||
componentDidMount() {
|
||||
this.context.addHandler(C.probability_method_name, this.probabilityHandler);
|
||||
this.setState({ heatmapPoints: [...this.context.heatmapPoints] });
|
||||
const newPoints = [];
|
||||
for (var p of this.context.heatmapPoints) {
|
||||
if (p.prob > 0.5) {
|
||||
newPoints.push(p)
|
||||
}
|
||||
}
|
||||
|
||||
this.setState({ heatmapPoints: newPoints });
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
@ -20,6 +20,9 @@
|
||||
<target xsi:type="File" name="mqttFile" fileName="${basedir}Log/birdmap-mqtt-${shortdate}.log"
|
||||
layout="${longdate} [${threadname:whenEmpty=${threadid}}] ${uppercase:${level}} ${logger} - ${message} ${exception:format=tostring}" />
|
||||
|
||||
<target xsi:type="File" name="hubsFile" fileName="${basedir}Log/birdmap-hubs-${shortdate}.log"
|
||||
layout="${longdate} [${threadname:whenEmpty=${threadid}}] ${uppercase:${level}} ${logger} - ${message} ${exception:format=tostring}" />
|
||||
|
||||
<!-- another file log, only own logs. Uses some ASP.NET core renderers -->
|
||||
<target xsi:type="File" name="ownFile" fileName="${basedir}Log/birdmap-own-${shortdate}.log"
|
||||
layout="${longdate} [${threadname:whenEmpty=${threadid}}] ${uppercase:${level}} ${callsite} - ${message} ${exception:format=tostring} (url: ${aspnet-request-url})(action: ${aspnet-mvc-action})" />
|
||||
@ -33,6 +36,9 @@
|
||||
<!--Skip non-critical Mqtt logs-->
|
||||
<logger name="*.*Mqtt*.*" minlevel="Trace" maxlevel="Warning" writeTo="mqttFile" final="true"/>
|
||||
|
||||
<!--Skip non-critical Hub logs-->
|
||||
<logger name="*.*Hubs*.*" minlevel="Trace" maxlevel="Warning" writeTo="hubsFile" final="true"/>
|
||||
|
||||
<!--Skip non-critical Microsoft logs-->
|
||||
<logger name="Microsoft.*" maxlevel="Info" final="true" />
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user