Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Errordays fix & draggable modal fix (#6821)

christof-wittreich2f2448c00968
diff --git a/web/js/components/sidebar/charting-mode-options.js b/web/js/components/sidebar/charting-mode-options.js
index c6df6130d..48edd102d 100644
--- a/web/js/components/sidebar/charting-mode-options.js
+++ b/web/js/components/sidebar/charting-mode-options.js
@@ -369,6 +369,21 @@ function ChartingModeOptions(props) {
return requestURL;
}
+ // eslint-disable-next-line
+ const mockData = [
+ // eslint-disable-next-line
+ `{"status": 204, "details": "No results found for the request.", "errors": {"error_count": 31, "error_days": ["2023-05-25T00:00:00Z", "2023-06-03T00:00:00Z", "2023-06-12T00:00:00Z", "2023-06-21T00:00:00Z", "2023-06-30T00:00:00Z", "2023-07-09T00:00:00Z", "2023-07-18T00:00:00Z", "2023-07-27T00:00:00Z", "2023-08-05T00:00:00Z", "2023-08-14T00:00:00Z", "2023-08-23T00:00:00Z", "2023-09-01T00:00:00Z", "2023-09-10T00:00:00Z", "2023-09-19T00:00:00Z", "2023-09-28T00:00:00Z", "2023-10-07T00:00:00Z", "2023-10-16T00:00:00Z", "2023-10-25T00:00:00Z", "2023-11-03T00:00:00Z", "2023-11-12T00:00:00Z", "2023-11-21T00:00:00Z", "2023-11-30T00:00:00Z", "2023-12-09T00:00:00Z", "2023-12-18T00:00:00Z", "2023-12-27T00:00:00Z", "2024-01-05T00:00:00Z", "2024-01-14T00:00:00Z", "2024-01-23T00:00:00Z", "2024-02-01T00:00:00Z", "2024-02-10T00:00:00Z", "2024-02-25T00:00:00Z"]}}`,
+ // eslint-disable-next-line
+ `{"mean": {"2024-07-10T00:00:00Z": 1298570339506173.0, "2024-07-19T00:00:00Z": 1396611280864197.5, "2024-07-28T00:00:00Z": 1966755709876543.0, "2024-08-06T00:00:00Z": 2334351095679012.5, "2024-08-15T00:00:00Z": 1845970462962963.0, "2024-08-24T00:00:00Z": 1169353456790123.5, "2024-09-02T00:00:00Z": 2583643209876543.0, "2024-09-11T00:00:00Z": 1410417268518518.5, "2024-09-20T00:00:00Z": 1233416867283950.8, "2024-09-29T00:00:00Z": 1501184876543210.0, "2024-10-08T00:00:00Z": 1302489537037037.0, "2024-10-17T00:00:00Z": 2373889891975308.5, "2024-10-26T00:00:00Z": 2643220216049383.0, "2024-11-04T00:00:00Z": 2028689305555555.2, "2024-11-13T00:00:00Z": 2602564475308642.0, "2024-11-28T00:00:00Z": 2371455595667870.0}, "median": {"2024-07-10T00:00:00Z": "1380000000000000.0", "2024-07-19T00:00:00Z": "1380000000000000.0", "2024-07-28T00:00:00Z": "2120000000000000.0", "2024-08-06T00:00:00Z": "2330000000000000.0", "2024-08-15T00:00:00Z": "1700000000000000.0", "2024-08-24T00:00:00Z": "1270000000000000.0", "2024-09-02T00:00:00Z": "2330000000000000.0", "2024-09-11T00:00:00Z": "1480000000000000.0", "2024-09-20T00:00:00Z": "1270000000000000.0", "2024-09-29T00:00:00Z": "1480000000000000.0", "2024-10-08T00:00:00Z": "1270000000000000.0", "2024-10-17T00:00:00Z": "2330000000000000.0", "2024-10-26T00:00:00Z": "2760000000000000.0", "2024-11-04T00:00:00Z": "1910000000000000.0", "2024-11-13T00:00:00Z": "2650000000000000.0", "2024-11-28T00:00:00Z": "2230000000000000.0"}, "max": {"2024-07-10T00:00:00Z": 2010000000000000.0, "2024-07-19T00:00:00Z": 2010000000000000.0, "2024-07-28T00:00:00Z": 2540000000000000.0, "2024-08-06T00:00:00Z": 3180000000000000.0, "2024-08-15T00:00:00Z": 2860000000000000.0, "2024-08-24T00:00:00Z": 1480000000000000.0, "2024-09-02T00:00:00Z": 3820000000000000.0, "2024-09-11T00:00:00Z": 2440000000000000.0, "2024-09-20T00:00:00Z": 2120000000000000.0, "2024-09-29T00:00:00Z": 2120000000000000.0, "2024-10-08T00:00:00Z": 2760000000000000.0, "2024-10-17T00:00:00Z": 3290000000000000.0, "2024-10-26T00:00:00Z": 3500000000000000.0, "2024-11-04T00:00:00Z": 3180000000000000.0, "2024-11-13T00:00:00Z": 3920000000000000.0, "2024-11-28T00:00:00Z": 4880000000000000.0}, "min": {"2024-07-10T00:00:00Z": 424000000000000.0, "2024-07-19T00:00:00Z": 954000000000000.0, "2024-07-28T00:00:00Z": 1060000000000000.0, "2024-08-06T00:00:00Z": 848000000000000.0, "2024-08-15T00:00:00Z": 954000000000000.0, "2024-08-24T00:00:00Z": 424000000000000.0, "2024-09-02T00:00:00Z": 1590000000000000.0, "2024-09-11T00:00:00Z": 424000000000000.0, "2024-09-20T00:00:00Z": 424000000000000.0, "2024-09-29T00:00:00Z": 1060000000000000.0, "2024-10-08T00:00:00Z": -0.0, "2024-10-17T00:00:00Z": 1380000000000000.0, "2024-10-26T00:00:00Z": 2120000000000000.0, "2024-11-04T00:00:00Z": 848000000000000.0, "2024-11-13T00:00:00Z": 742000000000000.0, "2024-11-28T00:00:00Z": 848000000000000.0}, "stdev": {"2024-07-10T00:00:00Z": 393067350223359.5, "2024-07-19T00:00:00Z": 300738169224156.94, "2024-07-28T00:00:00Z": 395720655558837.2, "2024-08-06T00:00:00Z": 537627406981821.44, "2024-08-15T00:00:00Z": 548312497288835.25, "2024-08-24T00:00:00Z": 281343284568871.88, "2024-09-02T00:00:00Z": 751094440263429.9, "2024-09-11T00:00:00Z": 648841978273369.4, "2024-09-20T00:00:00Z": 454008793817523.9, "2024-09-29T00:00:00Z": 278720982688842.7, "2024-10-08T00:00:00Z": 606685302457284.6, "2024-10-17T00:00:00Z": 464465422578780.0, "2024-10-26T00:00:00Z": 386527060875228.0, "2024-11-04T00:00:00Z": 681491009750089.6, "2024-11-13T00:00:00Z": 764387845698488.8, "2024-11-28T00:00:00Z": 1061628543981786.1}, "stderr": "382824688884.0622", "hist": [["0.0", "87482"], ["488000000000000.0", "341868"], ["976000000000000.0", "854218"], ["1464000000000000.0", "1104676"], ["1952000000000000.0", "690118"], ["2440000000000000.0", "659648"], ["2928000000000000.0", "239040"], ["3416000000000000.0", "78186"], ["3904000000000000.0", "13778"], ["4392000000000000.0", "18426"]], "errors": {"error_count": 15, "error_days": ["2024-02-26T00:00:00Z", "2024-03-06T00:00:00Z", "2024-03-15T00:00:00Z", "2024-03-24T00:00:00Z", "2024-04-02T00:00:00Z", "2024-04-11T00:00:00Z", "2024-04-20T00:00:00Z", "2024-04-29T00:00:00Z", "2024-05-08T00:00:00Z", "2024-05-17T00:00:00Z", "2024-05-26T00:00:00Z", "2024-06-04T00:00:00Z", "2024-06-13T00:00:00Z", "2024-06-22T00:00:00Z", "2024-07-01T00:00:00Z"]}}`,
+ // eslint-disable-next-line
+ `{"mean": {"2024-11-29T00:00:00Z": 2362192129629629.5, "2024-12-17T00:00:00Z": 2818459259259259.5, "2024-12-26T00:00:00Z": 2555032716049382.5, "2025-01-04T00:00:00Z": 2694089043209877.0, "2025-01-13T00:00:00Z": 4472722530864197.5, "2025-01-22T00:00:00Z": 3908756404320987.5, "2025-01-31T00:00:00Z": 0, "2025-02-09T00:00:00Z": 4674034336419753.0, "2025-02-18T00:00:00Z": 4558620679012346.0, "2025-02-27T00:00:00Z": 3006325848765432.5, "2025-03-08T00:00:00Z": 5272614429012345.0, "2025-03-17T00:00:00Z": 2376134336419753.0, "2025-03-26T00:00:00Z": 2125870524691358.0, "2025-04-04T00:00:00Z": 1577604043209876.8, "2025-04-13T00:00:00Z": 1258674043209876.8, "2025-04-22T00:00:00Z": 2667074922839506.0, "2025-05-01T00:00:00Z": 2003061805555555.5, "2025-05-10T00:00:00Z": 2155233179012345.8, "2025-05-19T00:00:00Z": 1953246064814814.8, "2025-05-28T00:00:00Z": 1470706712962963.0, "2025-06-06T00:00:00Z": 1235315401234568.0, "2025-06-15T00:00:00Z": 1752439814814814.8, "2025-06-24T00:00:00Z": 1743416373456790.0, "2025-07-03T00:00:00Z": 2749083487654321.0, "2025-07-12T00:00:00Z": 2263141280864197.5, "2025-07-21T00:00:00Z": 3094957021604938.5, "2025-07-30T00:00:00Z": 2030017592592592.5, "2025-08-08T00:00:00Z": 1077574737654321.0, "2025-08-17T00:00:00Z": 2568771682098765.0, "2025-09-01T00:00:00Z": 871387376543209.9}, "median": {"2024-11-29T00:00:00Z": "2230000000000000.0", "2024-12-17T00:00:00Z": "2650000000000000.0", "2024-12-26T00:00:00Z": "2330000000000000.0", "2025-01-04T00:00:00Z": "2650000000000000.0", "2025-01-13T00:00:00Z": "4450000000000000.0", "2025-01-22T00:00:00Z": "3820000000000000.0", "2025-01-31T00:00:00Z": 0, "2025-02-09T00:00:00Z": "4560000000000000.0", "2025-02-18T00:00:00Z": "4350000000000000.0", "2025-02-27T00:00:00Z": "2970000000000000.0", "2025-03-08T00:00:00Z": "5300000000000000.0", "2025-03-17T00:00:00Z": "2440000000000000.0", "2025-03-26T00:00:00Z": "2230000000000000.0", "2025-04-04T00:00:00Z": "1380000000000000.0", "2025-04-13T00:00:00Z": "1060000000000000.0", "2025-04-22T00:00:00Z": "2540000000000000.0", "2025-05-01T00:00:00Z": "2010000000000000.0", "2025-05-10T00:00:00Z": "2010000000000000.0", "2025-05-19T00:00:00Z": "1910000000000000.0", "2025-05-28T00:00:00Z": "1380000000000000.0", "2025-06-06T00:00:00Z": "954000000000000.0", "2025-06-15T00:00:00Z": "1700000000000000.0", "2025-06-24T00:00:00Z": "1590000000000000.0", "2025-07-03T00:00:00Z": "2760000000000000.0", "2025-07-12T00:00:00Z": "2330000000000000.0", "2025-07-21T00:00:00Z": "3180000000000000.0", "2025-07-30T00:00:00Z": "2010000000000000.0", "2025-08-08T00:00:00Z": "1060000000000000.0", "2025-08-17T00:00:00Z": "2440000000000000.0", "2025-09-01T00:00:00Z": "848000000000000.0"}, "max": {"2024-11-29T00:00:00Z": 3820000000000000.0, "2024-12-17T00:00:00Z": 4350000000000000.0, "2024-12-26T00:00:00Z": 3600000000000000.0, "2025-01-04T00:00:00Z": 3390000000000000.0, "2025-01-13T00:00:00Z": 5940000000000000.0, "2025-01-22T00:00:00Z": 4770000000000000.0, "2025-01-31T00:00:00Z": 0, "2025-02-09T00:00:00Z": 6250000000000000.0, "2025-02-18T00:00:00Z": 5940000000000000.0, "2025-02-27T00:00:00Z": 5720000000000000.0, "2025-03-08T00:00:00Z": 6150000000000000.0, "2025-03-17T00:00:00Z": 3070000000000000.0, "2025-03-26T00:00:00Z": 2970000000000000.0, "2025-04-04T00:00:00Z": 4660000000000000.0, "2025-04-13T00:00:00Z": 2330000000000000.0, "2025-04-22T00:00:00Z": 3920000000000000.0, "2025-05-01T00:00:00Z": 2540000000000000.0, "2025-05-10T00:00:00Z": 3390000000000000.0, "2025-05-19T00:00:00Z": 2650000000000000.0, "2025-05-28T00:00:00Z": 2230000000000000.0, "2025-06-06T00:00:00Z": 2330000000000000.0, "2025-06-15T00:00:00Z": 2540000000000000.0, "2025-06-24T00:00:00Z": 3180000000000000.0, "2025-07-03T00:00:00Z": 3600000000000000.0, "2025-07-12T00:00:00Z": 3390000000000000.0, "2025-07-21T00:00:00Z": 3820000000000000.0, "2025-07-30T00:00:00Z": 2650000000000000.0, "2025-08-08T00:00:00Z": 1800000000000000.0, "2025-08-17T00:00:00Z": 3290000000000000.0, "2025-09-01T00:00:00Z": 1590000000000000.0}, "min": {"2024-11-29T00:00:00Z": 1480000000000000.0, "2024-12-17T00:00:00Z": 1800000000000000.0, "2024-12-26T00:00:00Z": 2010000000000000.0, "2025-01-04T00:00:00Z": 1380000000000000.0, "2025-01-13T00:00:00Z": 3070000000000000.0, "2025-01-22T00:00:00Z": 3390000000000000.0, "2025-01-31T00:00:00Z": 0, "2025-02-09T00:00:00Z": 3390000000000000.0, "2025-02-18T00:00:00Z": 3180000000000000.0, "2025-02-27T00:00:00Z": 1700000000000000.0, "2025-03-08T00:00:00Z": 4660000000000000.0, "2025-03-17T00:00:00Z": 1170000000000000.0, "2025-03-26T00:00:00Z": 1170000000000000.0, "2025-04-04T00:00:00Z": 106000000000000.0, "2025-04-13T00:00:00Z": 212000000000000.0, "2025-04-22T00:00:00Z": 1590000000000000.0, "2025-05-01T00:00:00Z": 1380000000000000.0, "2025-05-10T00:00:00Z": 1480000000000000.0, "2025-05-19T00:00:00Z": 1380000000000000.0, "2025-05-28T00:00:00Z": 1060000000000000.0, "2025-06-06T00:00:00Z": 424000000000000.0, "2025-06-15T00:00:00Z": 1170000000000000.0, "2025-06-24T00:00:00Z": 742000000000000.0, "2025-07-03T00:00:00Z": 1910000000000000.0, "2025-07-12T00:00:00Z": 1380000000000000.0, "2025-07-21T00:00:00Z": 1800000000000000.0, "2025-07-30T00:00:00Z": 1480000000000000.0, "2025-08-08T00:00:00Z": 530000000000000.0, "2025-08-17T00:00:00Z": 1590000000000000.0, "2025-09-01T00:00:00Z": -0.0}, "stdev": {"2024-11-29T00:00:00Z": 629167147510070.2, "2024-12-17T00:00:00Z": 675505676754715.6, "2024-12-26T00:00:00Z": 461407804994569.8, "2025-01-04T00:00:00Z": 439369259374904.94, "2025-01-13T00:00:00Z": 697915570381725.4, "2025-01-22T00:00:00Z": 427328021772513.0, "2025-01-31T00:00:00Z": 0, "2025-02-09T00:00:00Z": 867210511110347.1, "2025-02-18T00:00:00Z": 734997778785277.8, "2025-02-27T00:00:00Z": 971745607695588.4, "2025-03-08T00:00:00Z": 539295213746220.25, "2025-03-17T00:00:00Z": 529069320596966.94, "2025-03-26T00:00:00Z": 568872213754392.6, "2025-04-04T00:00:00Z": 1077399302852067.6, "2025-04-13T00:00:00Z": 541726947060900.8, "2025-04-22T00:00:00Z": 723437892641811.4, "2025-05-01T00:00:00Z": 331516520370914.2, "2025-05-10T00:00:00Z": 512381119555483.8, "2025-05-19T00:00:00Z": 366023076932546.2, "2025-05-28T00:00:00Z": 354540697616880.9, "2025-06-06T00:00:00Z": 603930463173718.1, "2025-06-15T00:00:00Z": 327327363915495.06, "2025-06-24T00:00:00Z": 613241206570150.2, "2025-07-03T00:00:00Z": 517701141329160.4, "2025-07-12T00:00:00Z": 476075930999199.4, "2025-07-21T00:00:00Z": 449948955957975.75, "2025-07-30T00:00:00Z": 315886435972235.8, "2025-08-08T00:00:00Z": 326340047292317.7, "2025-08-17T00:00:00Z": 434501354649123.75, "2025-09-01T00:00:00Z": 407582269133795.0}, "stderr": "454862346656.93945", "hist": [["0.0", "188576"], ["625000000000000.0", "770038"], ["1250000000000000.0", "1409914"], ["1875000000000000.0", "1994970"], ["2500000000000000.0", "1248284"], ["3125000000000000.0", "688772"], ["3750000000000000.0", "383534"], ["4375000000000000.0", "429350"], ["5000000000000000.0", "231478"], ["5625000000000000.0", "171884"]], "errors": {"error_count": 1, "error_days": ["2024-12-08T00:00:00Z"]}}`,
+ // eslint-disable-next-line
+ `{"mean": {"2025-09-02T00:00:00Z": 1263596404320987.8, "2025-09-11T00:00:00Z": 2412414814814815.0, "2025-09-20T00:00:00Z": 1819447114197531.0, "2025-09-29T00:00:00Z": 4338623533950617.5, "2025-10-08T00:00:00Z": 2868823456790123.5, "2025-10-17T00:00:00Z": 1859784753086419.8, "2025-10-26T00:00:00Z": 969998796296296.2, "2025-11-04T00:00:00Z": 3517168904320987.5, "2025-11-13T00:00:00Z": 2992521682098765.5, "2025-11-22T00:00:00Z": 0, "2025-12-01T00:00:00Z": 2410808024691358.0, "2025-12-10T00:00:00Z": 848000000000000.0, "2025-12-19T00:00:00Z": 1176986373456790.0, "2025-12-28T00:00:00Z": 0, "2026-01-06T00:00:00Z": 0, "2026-01-15T00:00:00Z": 2630035416666666.5, "2026-01-24T00:00:00Z": 0, "2026-02-02T00:00:00Z": 3742260802469135.5, "2026-02-11T00:00:00Z": 5545614506172840.0, "2026-02-20T00:00:00Z": 7389896907216495.0, "2026-03-01T00:00:00Z": 3960576466049382.5, "2026-03-10T00:00:00Z": 3721199382716049.5, "2026-03-19T00:00:00Z": 4159307175925926.0, "2026-03-28T00:00:00Z": 1140770802469135.8, "2026-04-06T00:00:00Z": 1489383611111111.0, "2026-04-15T00:00:00Z": 2322318209876543.5, "2026-04-24T00:00:00Z": 2176131558641975.2, "2026-05-03T00:00:00Z": 1125514274691358.0, "2026-05-12T00:00:00Z": 1958229830246913.5, "2026-05-21T00:00:00Z": 1707812916666666.8, "2026-06-04T00:00:00Z": 3071444444444444.5}, "median": {"2025-09-02T00:00:00Z": "1270000000000000.0", "2025-09-11T00:00:00Z": "2440000000000000.0", "2025-09-20T00:00:00Z": "2010000000000000.0", "2025-09-29T00:00:00Z": "4240000000000000.0", "2025-10-08T00:00:00Z": "2760000000000000.0", "2025-10-17T00:00:00Z": "2010000000000000.0", "2025-10-26T00:00:00Z": "954000000000000.0", "2025-11-04T00:00:00Z": "3180000000000000.0", "2025-11-13T00:00:00Z": "2970000000000000.0", "2025-11-22T00:00:00Z": 0, "2025-12-01T00:00:00Z": "2440000000000000.0", "2025-12-10T00:00:00Z": "848000000000000.0", "2025-12-19T00:00:00Z": "1270000000000000.0", "2025-12-28T00:00:00Z": 0, "2026-01-06T00:00:00Z": 0, "2026-01-15T00:00:00Z": "2440000000000000.0", "2026-01-24T00:00:00Z": 0, "2026-02-02T00:00:00Z": "3600000000000000.0", "2026-02-11T00:00:00Z": "5720000000000000.0", "2026-02-20T00:00:00Z": "8160000000000000.0", "2026-03-01T00:00:00Z": "4030000000000000.0", "2026-03-10T00:00:00Z": "3710000000000000.0", "2026-03-19T00:00:00Z": "4240000000000000.0", "2026-03-28T00:00:00Z": "1270000000000000.0", "2026-04-06T00:00:00Z": "1480000000000000.0", "2026-04-15T00:00:00Z": "2330000000000000.0", "2026-04-24T00:00:00Z": "2010000000000000.0", "2026-05-03T00:00:00Z": "1170000000000000.0", "2026-05-12T00:00:00Z": "2120000000000000.0", "2026-05-21T00:00:00Z": "1590000000000000.0", "2026-06-04T00:00:00Z": "2970000000000000.0"}, "max": {"2025-09-02T00:00:00Z": 2120000000000000.0, "2025-09-11T00:00:00Z": 2860000000000000.0, "2025-09-20T00:00:00Z": 2860000000000000.0, "2025-09-29T00:00:00Z": 6360000000000000.0, "2025-10-08T00:00:00Z": 3820000000000000.0, "2025-10-17T00:00:00Z": 2760000000000000.0, "2025-10-26T00:00:00Z": 2970000000000000.0, "2025-11-04T00:00:00Z": 4880000000000000.0, "2025-11-13T00:00:00Z": 4030000000000000.0, "2025-11-22T00:00:00Z": 0, "2025-12-01T00:00:00Z": 3180000000000000.0, "2025-12-10T00:00:00Z": 1060000000000000.0, "2025-12-19T00:00:00Z": 2120000000000000.0, "2025-12-28T00:00:00Z": 0, "2026-01-06T00:00:00Z": 0, "2026-01-15T00:00:00Z": 4450000000000000.0, "2026-01-24T00:00:00Z": 0, "2026-02-02T00:00:00Z": 4880000000000000.0, "2026-02-11T00:00:00Z": 9650000000000000.0, "2026-02-20T00:00:00Z": 8160000000000000.0, "2026-03-01T00:00:00Z": 5410000000000000.0, "2026-03-10T00:00:00Z": 4660000000000000.0, "2026-03-19T00:00:00Z": 6890000000000000.0, "2026-03-28T00:00:00Z": 2330000000000000.0, "2026-04-06T00:00:00Z": 4350000000000000.0, "2026-04-15T00:00:00Z": 3070000000000000.0, "2026-04-24T00:00:00Z": 3820000000000000.0, "2026-05-03T00:00:00Z": 1590000000000000.0, "2026-05-12T00:00:00Z": 2970000000000000.0, "2026-05-21T00:00:00Z": 2970000000000000.0, "2026-06-04T00:00:00Z": 3920000000000000.0}, "min": {"2025-09-02T00:00:00Z": 848000000000000.0, "2025-09-11T00:00:00Z": 1700000000000000.0, "2025-09-20T00:00:00Z": 954000000000000.0, "2025-09-29T00:00:00Z": 3070000000000000.0, "2025-10-08T00:00:00Z": 1910000000000000.0, "2025-10-17T00:00:00Z": 742000000000000.0, "2025-10-26T00:00:00Z": -0.0, "2025-11-04T00:00:00Z": 2650000000000000.0, "2025-11-13T00:00:00Z": 1270000000000000.0, "2025-11-22T00:00:00Z": 0, "2025-12-01T00:00:00Z": 1800000000000000.0, "2025-12-10T00:00:00Z": 636000000000000.0, "2025-12-19T00:00:00Z": 0.0, "2025-12-28T00:00:00Z": 0, "2026-01-06T00:00:00Z": 0, "2026-01-15T00:00:00Z": 1590000000000000.0, "2026-01-24T00:00:00Z": 0, "2026-02-02T00:00:00Z": 2970000000000000.0, "2026-02-11T00:00:00Z": 2650000000000000.0, "2026-02-20T00:00:00Z": 6360000000000000.0, "2026-03-01T00:00:00Z": 2120000000000000.0, "2026-03-10T00:00:00Z": 2860000000000000.0, "2026-03-19T00:00:00Z": 2330000000000000.0, "2026-03-28T00:00:00Z": 106000000000000.0, "2026-04-06T00:00:00Z": -0.0, "2026-04-15T00:00:00Z": 1270000000000000.0, "2026-04-24T00:00:00Z": 1270000000000000.0, "2026-05-03T00:00:00Z": 636000000000000.0, "2026-05-12T00:00:00Z": 954000000000000.0, "2026-05-21T00:00:00Z": 530000000000000.0, "2026-06-04T00:00:00Z": 2230000000000000.0}, "stdev": {"2025-09-02T00:00:00Z": 350188796935905.3, "2025-09-11T00:00:00Z": 372559228238884.7, "2025-09-20T00:00:00Z": 495518032861936.8, "2025-09-29T00:00:00Z": 840804724361062.1, "2025-10-08T00:00:00Z": 596354152074664.9, "2025-10-17T00:00:00Z": 543639239006240.94, "2025-10-26T00:00:00Z": 836021576305261.2, "2025-11-04T00:00:00Z": 582030587251238.6, "2025-11-13T00:00:00Z": 653257062754889.6, "2025-11-22T00:00:00Z": 0, "2025-12-01T00:00:00Z": 388259397106853.2, "2025-12-10T00:00:00Z": 212000000000000.03, "2025-12-19T00:00:00Z": 513341735079869.75, "2025-12-28T00:00:00Z": 0, "2026-01-06T00:00:00Z": 0, "2026-01-15T00:00:00Z": 729507768563027.6, "2026-01-24T00:00:00Z": 0, "2026-02-02T00:00:00Z": 592500447888019.9, "2026-02-11T00:00:00Z": 1674887788439466.0, "2026-02-20T00:00:00Z": 890576663457778.5, "2026-03-01T00:00:00Z": 1015059627848595.1, "2026-03-10T00:00:00Z": 597787340949621.5, "2026-03-19T00:00:00Z": 1179741894412957.5, "2026-03-28T00:00:00Z": 563769421717384.0, "2026-04-06T00:00:00Z": 1335930795780275.8, "2026-04-15T00:00:00Z": 539317307631023.25, "2026-04-24T00:00:00Z": 577549348921144.0, "2026-05-03T00:00:00Z": 254059986773924.16, "2026-05-12T00:00:00Z": 531281540111495.6, "2026-05-21T00:00:00Z": 663958206725095.1, "2026-06-04T00:00:00Z": 414011631687854.25}, "stderr": "559804433986.9126", "hist": [["0.0", "717840"], ["965000000000000.0", "1631652"], ["1930000000000000.0", "1788578"], ["2895000000000000.0", "1324902"], ["3860000000000000.0", "680988"], ["4825000000000000.0", "193446"], ["5790000000000000.0", "105742"], ["6755000000000000.0", "50630"], ["7720000000000000.0", "32204"], ["8685000000000000.0", "13778"]]}`,
+ ];
+
+ // eslint-disable-next-line
+ let mockCounter = 0;
+
/**
* Execute the ImageStat API request
* @param {String} simpleStatsURI
@@ -382,6 +397,7 @@ function ChartingModeOptions(props) {
try {
const response = await fetch(simpleStatsURI, requestOptions);
const data = await response.text();
+ // const data = mockData[mockCounter++];
// This is the response when the imageStat server fails
if (!data || data === 'null') {
@@ -515,7 +531,7 @@ function ChartingModeOptions(props) {
if (dataset.ok && !!dataset.body) {
Object.keys(dataset.body).forEach((key) => {
if (key === 'errors') {
- const errorDays = normalizeErrorDays(dataset.body.errors.error_days);
+ const errorDays = normalizeErrorDays(dataset.body.errors);
output.body.errors.error_count += dataset.body.errors.error_count;
output.body.errors.error_days.push(...errorDays);
} else if (key === 'hist') {
diff --git a/web/js/containers/modal.js b/web/js/containers/modal.js
index f2f1357d2..eb9b8e30c 100644
--- a/web/js/containers/modal.js
+++ b/web/js/containers/modal.js
@@ -54,9 +54,11 @@ function ModalContainer(props) {
const [height, setHeight] = useState(propsHeight);
const [offsetLeft, setOffsetLeft] = useState(propsOffsetLeft);
const [offsetTop, setOffsetTop] = useState(propsOffsetTop);
- const [offsetRight, setOffsetRight] = useState(propsOffsetRight);
- const [measuredElement, setMeasuredElement] = useState();
+ const [offsetRight] = useState(propsOffsetRight);
const [isDragging, setIsDragging] = useState(false);
+ const measuredElementRef = useRef();
+ const widthRef = useRef(width);
+ const heightRef = useRef(height);
const dragStartRef = useRef({
x: 0,
y: 0,
@@ -70,15 +72,10 @@ function ModalContainer(props) {
const prevScreenWidth = usePrevious(screenWidth);
const prevWidth = usePrevious(width);
const prevHeight = usePrevious(height);
- const prevMeasuredElement = usePrevious(measuredElement);
- const prevMeasuredWidth = usePrevious(measuredElement?.getBoundingClientRect().width);
- const prevMeasuredHeight = usePrevious(measuredElement?.getBoundingClientRect().height);
-
- const handleElement = useCallback((node) => {
- if (node !== null) {
- setMeasuredElement(node);
- }
- }, []);
+ const prevMeasuredElement = usePrevious(measuredElementRef.current);
+ const prevMeasuredWidth = usePrevious(measuredElementRef.current?.getBoundingClientRect().width);
+ const prevMeasuredHeight = usePrevious(
+ measuredElementRef.current?.getBoundingClientRect().height);
const beginDrag = useCallback((e, { dragHandle, stayOnscreen }) => {
if (!e || e.button !== 0) return;
@@ -86,11 +83,11 @@ function ModalContainer(props) {
if (!e.target?.closest?.(dragHandle)) return;
if (e.target?.closest?.('button, a, input, select, textarea')) return;
- const rect = measuredElement?.getBoundingClientRect?.();
+ const rect = measuredElementRef.current?.getBoundingClientRect?.();
const startLeft = typeof offsetLeft === 'number' ? offsetLeft : (rect?.left || 0);
const startTop = typeof offsetTop === 'number' ? offsetTop : (rect?.top || 0);
- const elWidth = width || rect?.width || 0;
- const elHeight = height || rect?.height || 0;
+ const elWidth = widthRef.current || width || rect?.width || 0;
+ const elHeight = heightRef.current || height || rect?.height || 0;
dragStartRef.current = {
x: e.clientX,
@@ -103,7 +100,7 @@ function ModalContainer(props) {
};
setIsDragging(true);
- }, [measuredElement, offsetLeft, offsetTop, width, height]);
+ }, [measuredElementRef.current, offsetLeft, offsetTop, width, height]);
useEffect(() => {
if (!isDragging) return undefined;
@@ -116,9 +113,9 @@ function ModalContainer(props) {
let nextLeft = start.left + dx;
let nextTop = start.top + dy;
- if (start.stayOnscreen && start.width && start.height) {
- const maxLeft = Math.max(0, screenWidth - start.width);
- const maxTop = Math.max(0, screenHeight - start.height);
+ if (start.stayOnscreen && widthRef.current && heightRef.current) {
+ const maxLeft = Math.max(0, screenWidth - widthRef.current);
+ const maxTop = Math.max(0, screenHeight - heightRef.current - 2.5);
nextLeft = Math.min(Math.max(0, nextLeft), maxLeft);
nextTop = Math.min(Math.max(0, nextTop), maxTop);
}
@@ -140,21 +137,36 @@ function ModalContainer(props) {
};
}, [isDragging, screenWidth, screenHeight]);
+ useEffect(() => {
+ widthRef.current = width;
+ }, [width]);
+
+ useEffect(() => {
+ heightRef.current = height;
+ }, [height]);
+
const onParamChange = (e, { size }) => {
if (e) {
e.stopPropagation();
}
- const elWidth = autoSetWidth && measuredElement
- ? measuredElement.getBoundingClientRect().width
+ const elWidth = autoSetWidth && measuredElementRef.current
+ ? measuredElementRef.current.getBoundingClientRect().width
: size.width;
- const elHeight = autoSetHeight && measuredElement
- ? measuredElement.getBoundingClientRect().height
+ const elHeight = autoSetHeight && measuredElementRef.current
+ ? measuredElementRef.current.getBoundingClientRect().height
: size.height;
setWidth(elWidth);
setHeight(elHeight);
- setOffsetLeft(size.offsetLeft);
- setOffsetTop(size.offsetTop);
- setOffsetRight(size.offsetRight);
+ if (size.stayOnscreen) {
+ const maxLeft = Math.max(0, screenWidth - elWidth);
+ const maxTop = Math.max(0, screenHeight - elHeight - 2.5);
+ if (measuredElementRef.current?.getBoundingClientRect().left > maxLeft) {
+ setOffsetLeft(maxLeft);
+ }
+ if (measuredElementRef.current?.getBoundingClientRect().top > maxTop) {
+ setOffsetTop(maxTop);
+ }
+ }
};
const onResize = (e, { size }) => {
@@ -178,11 +190,11 @@ function ModalContainer(props) {
const modalWidthChanged = propsWidth !== prevWidth;
const modalHeightChanged = propsHeight !== prevHeight;
const measuredElementChanged = (autoSetWidth || autoSetHeight) &&
- measuredElement !== prevMeasuredElement;
+ measuredElementRef.current !== prevMeasuredElement;
const measuredWidthChanged = autoSetWidth &&
- measuredElement?.getBoundingClientRect().width !== prevMeasuredWidth;
+ measuredElementRef.current?.getBoundingClientRect().width !== prevMeasuredWidth;
const measuredHeightChanged = autoSetHeight &&
- measuredElement?.getBoundingClientRect().height !== prevMeasuredHeight;
+ measuredElementRef.current?.getBoundingClientRect().height !== prevMeasuredHeight;
const measureChange = measuredElementChanged || measuredWidthChanged || measuredHeightChanged;
const toggleFunction = toggleWithClose(onToggle, onClose, isOpen);
if ((modalWidthChanged || modalHeightChanged || measureChange) && isOpen) {
@@ -328,14 +340,14 @@ function ModalContainer(props) {
backdrop={backdrop}
id={lowerCaseId}
size={size}
- className={isTemplateModal ? 'template-modal' : modalClassName || 'default-modal'}
+ className={`${isTemplateModal ? 'template-modal' : modalClassName || 'default-modal'}${isDraggable ? ' draggable-modal' : ''}`}
autoFocus={autoFocus || false}
style={style}
wrapClassName={`${modalWrapClass} ${lowerCaseId}`}
modalTransition={{ timeout: isDraggable ? 0 : timeout || 100 }}
fade={!isDraggable}
>
- <div ref={handleElement} onMouseDown={handleModalMouseDown} style={{ height: '100%' }}>
+ <div ref={measuredElementRef} onMouseDown={handleModalMouseDown} style={{ height: '100%' }}>
{CompletelyCustomModal
? (
<CompletelyCustomModal
diff --git a/web/js/containers/modal.test.js b/web/js/containers/modal.test.js
index a6c94094e..26d932e36 100644
--- a/web/js/containers/modal.test.js
+++ b/web/js/containers/modal.test.js
@@ -344,7 +344,7 @@ describe('dragging', () => {
});
// maxLeft = 1200-300, maxTop = 800-200
expect(mockModalProps.style.left).toBe(900);
- expect(mockModalProps.style.top).toBe(600);
+ expect(mockModalProps.style.top).toBe(597.5);
});
it('ignores non-left-button mousedown', () => {
diff --git a/web/scss/components/modal.scss b/web/scss/components/modal.scss
index 59512136b..b8381bd83 100644
--- a/web/scss/components/modal.scss
+++ b/web/scss/components/modal.scss
@@ -4,6 +4,10 @@
.modal-dialog {
@include variables.wv-modal-dialog;
+ &.draggable-modal {
+ user-select: none;
+ }
+
h1 {
font-size: 22px;
}
@@ -51,6 +55,7 @@
.modal-body {
background-color: #222;
border-radius: variables.$wv-menu-border-radius;
+ user-select: text;
& .modal-footer {
padding-bottom: 0;
diff --git a/web/scss/features/sidebar.scss b/web/scss/features/sidebar.scss
index c8c47d9fc..3a65cb445 100644
--- a/web/scss/features/sidebar.scss
+++ b/web/scss/features/sidebar.scss
@@ -718,6 +718,7 @@ div#group-overlays-checkbox-case {
.charting-disclaimer-dates {
margin-left: 17px;
+ line-height: 20px;
}
.error-expand-button {
@@ -741,7 +742,7 @@ div#group-overlays-checkbox-case {
}
}
-.charting-disclaimer-block {
+.charting-disclaimer-lower > .charting-disclaimer-block {
line-height: 35px;
display: block;
margin-left: 40px;