luci-app-vnstat2: use more efficient way to get database interfaces
authorJan Hoffmann <jan@3e8.eu>
Sat, 18 Nov 2023 08:52:45 +0000 (09:52 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 19 Nov 2023 00:01:45 +0000 (01:01 +0100)
commit74dd23bdb1c2ba00c68e3abf4d00233bb4f939cd
tree0d3f58336023a4556842e494b11833d8b4988797
parent704a335c5fd89be291bdb08b59c078c06bb73595
luci-app-vnstat2: use more efficient way to get database interfaces

The currently used command "vnstat --json f 1" can be very slow when the
database contains many entries. This can result in an XHR timeout error
on the configuration page.

Use the "--dbiflist" option instead, which was added in vnStat 2.7.

Fixes: #6702
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
(cherry picked from commit 3ac4f567dfdfd6ee989ceffb025241e605790b6d)
applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js