# HG changeset patch # User Thomas Junk # Date 1566918436 -7200 # Node ID e4d6c6339cb474c1d67713222cff77b5a31fa270 # Parent 837f90680d4c96b3d944d29d3d765a451c480c5e identify_tool: accuracy legend improved diff -r 837f90680d4c -r e4d6c6339cb4 client/src/components/identify/Identify.vue --- a/client/src/components/identify/Identify.vue Tue Aug 27 15:51:05 2019 +0200 +++ b/client/src/components/identify/Identify.vue Tue Aug 27 17:07:16 2019 +0200 @@ -41,26 +41,73 @@
- - - {{ recency(feature) }} +
+ + + {{ recency(feature) }} + +
+
+ According gauge data: +
+
+ + + {{ forecastAccuracy(feature) }} + +
+
+ + + {{ gmAvailability(feature) }} + +
+
+ + + {{ forecastVsReality(feature) }} + +
+ + {{ prop.key }} + {{ prop.val }}
- - {{ prop.key }} - {{ prop.val }} -
${nsc24} /24h >${nsc72} / 72h`, WARNING: this.$gettext("Nash-Sutcliffe") + ` < ${nsc72}`, - DANGER: this.$gettext("Nash-Sutcliffe") + ` < ${nsc24}` + DANGER: this.$gettext("Nash-Sutcliffe") + ` < ${nsc24}`, + NEUTRAL: this.$gettext("Nash-Sutcliffe not available") }; return messagesPerState[[classifications.forecastVsReality(feature)]]; }, diff -r 837f90680d4c -r e4d6c6339cb4 client/src/lib/classifications.js --- a/client/src/lib/classifications.js Tue Aug 27 15:51:05 2019 +0200 +++ b/client/src/lib/classifications.js Tue Aug 27 17:07:16 2019 +0200 @@ -16,7 +16,17 @@ const getGauge = f => { if (f.getId().indexOf("bottlenecks") > -1) { - return f.get("gauge_obj"); + const GaugeProxy = (function(feature) { + const gauge = feature.get("gauge_obj"); + const get = function(propName) { + if (gauge) return gauge.get(propName); + return feature.get(propName); + }; + return { + get: get + }; + })(f); + return GaugeProxy; } return f; };