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:34 +0000 (01:01 +0100)
commit2762cd8e0418ab03b329b30489244b3133cfe4ca
treed59be8bd471872564ec1d6875d1ea93bf37a5a2f
parent09bc48218151627c2fb3cda34ef6d9b1bcd0bce3
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