openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
212 stars 232 forks source link

Charts: Add option to extend initial period to future & Refactor prop defs #2545

Closed florian-h05 closed 3 weeks ago

florian-h05 commented 3 weeks ago

This adds a new option to charts which allows to extend the initial period to the future by default. Until now, when a chart was opened its period always extended to the past. This is especially useful with the new timeseries support for Items as it allows to display forecasts.

Example: When opening a temperature chart with period D, the chart opened up with the temperature for the last 24h. When setting the new future prop to true, the chart will now open up with the temperature for the next 24h.

This also refactors the chart property definitions to use the helpers.

image

florian-h05 commented 3 weeks ago

@jlaur FYI, since you work much with forecasts in your energy data service binding, you might find this useful.

relativeci[bot] commented 3 weeks ago

Job #1912: Bundle Size — 10.57MiB (+0.1%).

0181592(current) vs 736d12c main#1910(baseline)

[!WARNING] Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  Change 7 changes Regression 3 regressions
                 Current
Job #1912
     Baseline
Job #1910
Regression  Initial JS 1.86MiB(~+0.01%) 1.86MiB
No change  Initial CSS 607.87KiB 607.87KiB
Change  Cache Invalidation 19.9% 18.3%
Change  Chunks 222(-0.45%) 223
Change  Assets 245(-0.41%) 246
Change  Modules 2866(+0.07%) 2864
Regression  Duplicate Modules 143(+1.42%) 141
Regression  Duplicate Code 1.83%(+5.78%) 1.73%
No change  Packages 95 95
No change  Duplicate Packages 2 2

Bundle size by type  Change 1 change Regression 1 regression
|            |       Current
[Job #1912](https://app.relative-ci.com/projects/ZNG5hy4VeSJQVQcq1Kvu/jobs/1912-GQC7PDt52fuUfHeDphe7?utm_source=github&utm_medium=pr-report "View job report") |      Baseline
[Job #1910](https://app.relative-ci.com/projects/ZNG5hy4VeSJQVQcq1Kvu/jobs/1910-l4hf44VwWbQrJWTjbBNT?utm_source=github&utm_medium=pr-report "View baseline job report") | |:--|--:|--:| | Regression  [JS](https://app.relative-ci.com/projects/ZNG5hy4VeSJQVQcq1Kvu/jobs/1912-GQC7PDt52fuUfHeDphe7/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-1_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-0%22%7D "View JS assets") | `8.76MiB` (`+0.12%`) | `8.75MiB` | | Not changed  [CSS](https://app.relative-ci.com/projects/ZNG5hy4VeSJQVQcq1Kvu/jobs/1912-GQC7PDt52fuUfHeDphe7/assets?ba=%7B%22filters%22%3A%22ft.CSS-1_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-0%22%7D "View CSS assets") | `890.07KiB` | `890.07KiB` | | Not changed  [Fonts](https://app.relative-ci.com/projects/ZNG5hy4VeSJQVQcq1Kvu/jobs/1912-GQC7PDt52fuUfHeDphe7/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-1_ft.HTML-0_ft.OTHER-0%22%7D "View Fonts assets") | `526.1KiB` | `526.1KiB` | | Not changed  [Media](https://app.relative-ci.com/projects/ZNG5hy4VeSJQVQcq1Kvu/jobs/1912-GQC7PDt52fuUfHeDphe7/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-0_ft.MEDIA-1_ft.FONT-0_ft.HTML-0_ft.OTHER-0%22%7D "View Media assets") | `295.6KiB` | `295.6KiB` | | Not changed  [IMG](https://app.relative-ci.com/projects/ZNG5hy4VeSJQVQcq1Kvu/jobs/1912-GQC7PDt52fuUfHeDphe7/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-1_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-0%22%7D "View IMG assets") | `140.74KiB` | `140.74KiB` | | Not changed  [HTML](https://app.relative-ci.com/projects/ZNG5hy4VeSJQVQcq1Kvu/jobs/1912-GQC7PDt52fuUfHeDphe7/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-1_ft.OTHER-0%22%7D "View HTML assets") | `1.24KiB` | `1.24KiB` | | Not changed  [Other](https://app.relative-ci.com/projects/ZNG5hy4VeSJQVQcq1Kvu/jobs/1912-GQC7PDt52fuUfHeDphe7/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-1%22%7D "View Other assets") | `871B` | `871B` |

View job #1912 reportView florian-h05:charts-future-rfc branch activityView project dashboard