comparison client/src/lib/classifications.js @ 3497:1457e2b9d900

Set threshold for green gauge data availability to 85%. The SRS reads like 100%, but that seems unrealistic and the threshold shall be configurable anyway. In the meantime 85% makes things look nicer...
author Sascha Wilde <wilde@intevation.de>
date Mon, 27 May 2019 18:45:20 +0200
parents 965b2fbb1890
children 4d44eda484dd
comparison
equal deleted inserted replaced
3496:f10d606b2931 3497:1457e2b9d900
43 Date.parse(gmDate) > Date.now() - 86400000 // latest value within 24 h 43 Date.parse(gmDate) > Date.now() - 86400000 // latest value within 24 h
44 ) { 44 ) {
45 if ( 45 if (
46 gmN !== undefined && 46 gmN !== undefined &&
47 gmN !== null && 47 gmN !== null &&
48 gmN >= 1344 // one value every 15 min in 14 days 48 gmN >= 1124 // 1344: one value every 15 min in 14 days, but the Hydra says:
49 // let 85% be enough for now.
49 ) { 50 ) {
50 return "lime"; 51 return "lime";
51 } 52 }
52 return "yellow"; 53 return "yellow";
53 } 54 }