luci-app-statistics: regenerate graphs on window resize
authorRani Hod <rani.hod@gmail.com>
Mon, 2 Oct 2023 15:01:54 +0000 (18:01 +0300)
committerPaul Donald <newtwen@gmail.com>
Mon, 4 Dec 2023 22:47:17 +0000 (23:47 +0100)
commitb47850a94ef78739c7d01d5711a94f394a09fce8
tree6cc8f4913837cae9112f65e3c567d205db675943
parent7ea18061093fcb63e7bb9aab046d7064152a999c
luci-app-statistics: regenerate graphs on window resize

Currently graphs are redrawn only based on the refresh interval
(never or every 5/30/60 seconds).
Since the image size is calculated based on the window size,
redraw graphs (once) also after resizing the window.
This also captures window resize due to orientation change
(e.g., for mobile).
Since multiple resize events are fired when dragging the window
border, there is a 250ms delay for debouncing.

Signed-off-by: Rani Hod <rani.hod@gmail.com>
Tested-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 8fcd52f5130acd1a0738ff47f9bba2c9cc42e662)
applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js