Skip to content

Commit

Permalink
Merge pull request #1460 from FlowFuse/755-chart-stale-data
Browse files Browse the repository at this point in the history
Chart - Clear stale data from front-end chart
  • Loading branch information
joepavitt authored Nov 29, 2024
2 parents 13c32b0 + b0010cc commit a4fd7c5
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 134 deletions.
6 changes: 3 additions & 3 deletions cypress/fixtures/flows/dashboard-charts.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@
"pointShape": "circle",
"pointRadius": 4,
"showLegend": true,
"removeOlder": 1,
"removeOlderUnit": "3600",
"removeOlder": 1000000,
"removeOlderUnit": "604800",
"removeOlderPoints": "",
"colors": [
"#1f77b4",
Expand Down Expand Up @@ -286,7 +286,7 @@
"className": "",
"icon": "",
"iconPosition": "left",
"payload": "[{\"location\":\"New York\",\"temp\":56,\"datestamp\":1643784000},{\"location\":\"Los Angeles\",\"temp\":67,\"datestamp\":1643784000},{\"location\":\"Chicago\",\"temp\":44,\"datestamp\":1643784000},{\"location\":\"New York\",\"temp\":60,\"datestamp\":1643798400},{\"location\":\"Los Angeles\",\"temp\":71,\"datestamp\":1643798400},{\"location\":\"Chicago\",\"temp\":48,\"datestamp\":1643798400},{\"location\":\"New York\",\"temp\":65,\"datestamp\":1643812800},{\"location\":\"Los Angeles\",\"temp\":74,\"datestamp\":1643812800},{\"location\":\"Chicago\",\"temp\":52,\"datestamp\":1643812800},{\"location\":\"New York\",\"temp\":69,\"datestamp\":1643827200},{\"location\":\"Los Angeles\",\"temp\":77,\"datestamp\":1643827200},{\"location\":\"Chicago\",\"temp\":56,\"datestamp\":1643827200},{\"location\":\"New York\",\"temp\":73,\"datestamp\":1643841600},{\"location\":\"Los Angeles\",\"temp\":80,\"datestamp\":1643841600},{\"location\":\"Chicago\",\"temp\":60,\"datestamp\":1643841600},{\"location\":\"New York\",\"temp\":77,\"datestamp\":1643856000},{\"location\":\"Los Angeles\",\"temp\":82,\"datestamp\":1643856000},{\"location\":\"Chicago\",\"temp\":64,\"datestamp\":1643856000},{\"location\":\"New York\",\"temp\":80,\"datestamp\":1643870400},{\"location\":\"Los Angeles\",\"temp\":84,\"datestamp\":1643870400},{\"location\":\"Chicago\",\"temp\":68,\"datestamp\":1643870400},{\"location\":\"New York\",\"temp\":83,\"datestamp\":1643884800},{\"location\":\"Los Angeles\",\"temp\":86,\"datestamp\":1643884800},{\"location\":\"Chicago\",\"temp\":72,\"datestamp\":1643884800},{\"location\":\"New York\",\"temp\":86,\"datestamp\":1643899200},{\"location\":\"Los Angeles\",\"temp\":88,\"datestamp\":1643899200},{\"location\":\"Chicago\",\"temp\":76,\"datestamp\":1643899200},{\"location\":\"New York\",\"temp\":89,\"datestamp\":1643913600},{\"location\":\"Los Angeles\",\"temp\":89,\"datestamp\":1643913600},{\"location\":\"Chicago\",\"temp\":80,\"datestamp\":1643913600},{\"location\":\"New York\",\"temp\":89,\"datestamp\":1643928000},{\"location\":\"Los Angeles\",\"temp\":88,\"datestamp\":1643928000},{\"location\":\"Chicago\",\"temp\":84,\"datestamp\":1643928000},{\"location\":\"New York\",\"temp\":86,\"datestamp\":1643942400},{\"location\":\"Los Angeles\",\"temp\":86,\"datestamp\":1643942400},{\"location\":\"Chicago\",\"temp\":88,\"datestamp\":1643942400},{\"location\":\"New York\",\"temp\":83,\"datestamp\":1643956800},{\"location\":\"Los Angeles\",\"temp\":84,\"datestamp\":1643956800},{\"location\":\"Chicago\",\"temp\":92,\"datestamp\":1643956800},{\"location\":\"New York\",\"temp\":79,\"datestamp\":1643971200},{\"location\":\"Los Angeles\",\"temp\":82,\"datestamp\":1643971200},{\"location\":\"Chicago\",\"temp\":96,\"datestamp\":1643971200},{\"location\":\"New York\",\"temp\":73,\"datestamp\":1643985600},{\"location\":\"Los Angeles\",\"temp\":80,\"datestamp\":1643985600},{\"location\":\"Chicago\",\"temp\":100,\"datestamp\":1643985600},{\"location\":\"New York\",\"temp\":66,\"datestamp\":1644000000},{\"location\":\"Los Angeles\",\"temp\":78,\"datestamp\":1644000000},{\"location\":\"Chicago\",\"temp\":96,\"datestamp\":1644000000},{\"location\":\"New York\",\"temp\":59,\"datestamp\":1644014400},{\"location\":\"Los Angeles\",\"temp\":76,\"datestamp\":1644014400},{\"location\":\"Chicago\",\"temp\":92,\"datestamp\":1644014400},{\"location\":\"New York\",\"temp\":53,\"datestamp\":1644028800},{\"location\":\"Los Angeles\",\"temp\":74,\"datestamp\":1644028800},{\"location\":\"Chicago\",\"temp\":88,\"datestamp\":1644028800},{\"location\":\"New York\",\"temp\":47,\"datestamp\":1644043200},{\"location\":\"Los Angeles\",\"temp\":72,\"datestamp\":1644043200},{\"location\":\"Chicago\",\"temp\":84,\"datestamp\":1644043200},{\"location\":\"New York\",\"temp\":42,\"datestamp\":1644057600},{\"location\":\"Los Angeles\",\"temp\":70,\"datestamp\":1644057600},{\"location\":\"Chicago\",\"temp\":80,\"datestamp\":1644057600},{\"location\":\"New York\",\"temp\":39,\"datestamp\":1644072000},{\"location\":\"Los Angeles\",\"temp\":68,\"datestamp\":1644072000},{\"location\":\"Chicago\",\"temp\":76,\"datestamp\":1644072000},{\"location\":\"New York\",\"temp\":37,\"datestamp\":1644086400},{\"location\":\"Los Angeles\",\"temp\":66,\"datestamp\":1644086400},{\"location\":\"Chicago\",\"temp\":72,\"datestamp\":1644086400},{\"location\":\"New York\",\"temp\":36,\"datestamp\":1644100800},{\"location\":\"Los Angeles\",\"temp\":64,\"datestamp\":1644100800},{\"location\":\"Chicago\",\"temp\":68,\"datestamp\":1644100800},{\"location\":\"New York\",\"temp\":37,\"datestamp\":1644115200},{\"location\":\"Los Angeles\",\"temp\":62,\"datestamp\":1644115200},{\"location\":\"Chicago\",\"temp\":64,\"datestamp\":1644115200}]",
"payload": "[{\"location\":\"New York\",\"temp\":56,\"datestamp\":1643784000000},{\"location\":\"Los Angeles\",\"temp\":67,\"datestamp\":1643784000000},{\"location\":\"Chicago\",\"temp\":44,\"datestamp\":1643784000000},{\"location\":\"New York\",\"temp\":60,\"datestamp\":1643798400000},{\"location\":\"Los Angeles\",\"temp\":71,\"datestamp\":1643798400000},{\"location\":\"Chicago\",\"temp\":48,\"datestamp\":1643798400000},{\"location\":\"New York\",\"temp\":65,\"datestamp\":1643812800000},{\"location\":\"Los Angeles\",\"temp\":74,\"datestamp\":1643812800000},{\"location\":\"Chicago\",\"temp\":52,\"datestamp\":1643812800000},{\"location\":\"New York\",\"temp\":69,\"datestamp\":1643827200000},{\"location\":\"Los Angeles\",\"temp\":77,\"datestamp\":1643827200000},{\"location\":\"Chicago\",\"temp\":56,\"datestamp\":1643827200000},{\"location\":\"New York\",\"temp\":73,\"datestamp\":1643841600000},{\"location\":\"Los Angeles\",\"temp\":80,\"datestamp\":1643841600000},{\"location\":\"Chicago\",\"temp\":60,\"datestamp\":1643841600000},{\"location\":\"New York\",\"temp\":77,\"datestamp\":1643856000000},{\"location\":\"Los Angeles\",\"temp\":82,\"datestamp\":1643856000000},{\"location\":\"Chicago\",\"temp\":64,\"datestamp\":1643856000000},{\"location\":\"New York\",\"temp\":80,\"datestamp\":1643870400000},{\"location\":\"Los Angeles\",\"temp\":84,\"datestamp\":1643870400000},{\"location\":\"Chicago\",\"temp\":68,\"datestamp\":1643870400},{\"location\":\"New York\",\"temp\":83,\"datestamp\":1643884800000},{\"location\":\"Los Angeles\",\"temp\":86,\"datestamp\":1643884800000},{\"location\":\"Chicago\",\"temp\":72,\"datestamp\":1643884800000},{\"location\":\"New York\",\"temp\":86,\"datestamp\":1643899200000},{\"location\":\"Los Angeles\",\"temp\":88,\"datestamp\":1643899200000},{\"location\":\"Chicago\",\"temp\":76,\"datestamp\":1643899200000},{\"location\":\"New York\",\"temp\":89,\"datestamp\":16439136000000},{\"location\":\"Los Angeles\",\"temp\":89,\"datestamp\":1643913600000},{\"location\":\"Chicago\",\"temp\":80,\"datestamp\":1643913600000},{\"location\":\"New York\",\"temp\":89,\"datestamp\":1643928000000},{\"location\":\"Los Angeles\",\"temp\":88,\"datestamp\":1643928000000},{\"location\":\"Chicago\",\"temp\":84,\"datestamp\":1643928000000},{\"location\":\"New York\",\"temp\":86,\"datestamp\":1643942400000},{\"location\":\"Los Angeles\",\"temp\":86,\"datestamp\":1643942400000},{\"location\":\"Chicago\",\"temp\":88,\"datestamp\":1643942400000},{\"location\":\"New York\",\"temp\":83,\"datestamp\":1643956800000},{\"location\":\"Los Angeles\",\"temp\":84,\"datestamp\":1643956800000},{\"location\":\"Chicago\",\"temp\":92,\"datestamp\":1643956800000},{\"location\":\"New York\",\"temp\":79,\"datestamp\":1643971200000},{\"location\":\"Los Angeles\",\"temp\":82,\"datestamp\":1643971200000},{\"location\":\"Chicago\",\"temp\":96,\"datestamp\":1643971200000},{\"location\":\"New York\",\"temp\":73,\"datestamp\":1643985600000},{\"location\":\"Los Angeles\",\"temp\":80,\"datestamp\":1643985600000},{\"location\":\"Chicago\",\"temp\":100,\"datestamp\":1643985600000},{\"location\":\"New York\",\"temp\":66,\"datestamp\":1644000000000000},{\"location\":\"Los Angeles\",\"temp\":78,\"datestamp\":1644000000000},{\"location\":\"Chicago\",\"temp\":96,\"datestamp\":1644000000000},{\"location\":\"New York\",\"temp\":59,\"datestamp\":1644014400000},{\"location\":\"Los Angeles\",\"temp\":76,\"datestamp\":1644014400000},{\"location\":\"Chicago\",\"temp\":92,\"datestamp\":1644014400000},{\"location\":\"New York\",\"temp\":53,\"datestamp\":1644028800000},{\"location\":\"Los Angeles\",\"temp\":74,\"datestamp\":1644028800000},{\"location\":\"Chicago\",\"temp\":88,\"datestamp\":1644028800000},{\"location\":\"New York\",\"temp\":47,\"datestamp\":1644043200000},{\"location\":\"Los Angeles\",\"temp\":72,\"datestamp\":1644043200000},{\"location\":\"Chicago\",\"temp\":84,\"datestamp\":1644043200000},{\"location\":\"New York\",\"temp\":42,\"datestamp\":1644057600000},{\"location\":\"Los Angeles\",\"temp\":70,\"datestamp\":1644057600000},{\"location\":\"Chicago\",\"temp\":80,\"datestamp\":1644057600000},{\"location\":\"New York\",\"temp\":39,\"datestamp\":1644072000000},{\"location\":\"Los Angeles\",\"temp\":68,\"datestamp\":1644072000000},{\"location\":\"Chicago\",\"temp\":76,\"datestamp\":1644072000000},{\"location\":\"New York\",\"temp\":37,\"datestamp\":1644086400000},{\"location\":\"Los Angeles\",\"temp\":66,\"datestamp\":1644086400000},{\"location\":\"Chicago\",\"temp\":72,\"datestamp\":1644086400000},{\"location\":\"New York\",\"temp\":36,\"datestamp\":1644100800000},{\"location\":\"Los Angeles\",\"temp\":64,\"datestamp\":1644100800000},{\"location\":\"Chicago\",\"temp\":68,\"datestamp\":1644100800000},{\"location\":\"New York\",\"temp\":37,\"datestamp\":1644115200000},{\"location\":\"Los Angeles\",\"temp\":62,\"datestamp\":1644115200000},{\"location\":\"Chicago\",\"temp\":64,\"datestamp\":1644115200000}]",
"payloadType": "json",
"topic": "topic",
"topicType": "msg",
Expand Down
Loading

0 comments on commit a4fd7c5

Please sign in to comment.