summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-vnstat2/htdocs/luci-static/resources
AgeCommit message (Collapse)Author
2023-12-06luci-app-vnstat2: fix configuration page when database is empty (#6746)Jan Hoffmann
The output of the command "vnstat --dbiflist 1" is empty when there are no interfaces in the database. Add a check to avoid a "result.stdout is undefined" error in that case. Ref: https://forum.openwrt.org/t/error-in-luci-vnstat2-configuration-menu/179700 Fixes: 3ac4f567dfdf ("luci-app-vnstat2: use more efficient way to get database interfaces") Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2023-11-18luci-app-vnstat2: use more efficient way to get database interfacesJan Hoffmann
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>
2022-02-03uci-app-vnstat2: refactoringHelge Mader
This is a huge change to the already existing vnstat2 LuCI module with some improvements and some new features. "Graphs Page": - Implementation of refreshing the graphs. - Only in the UCI configuration existing interfaces will be shown in any case. Before this change, all interfaces existing in the database were shown. - Introduced a button to clear the statistics for all interfaces (in fact this is removing and adding again the interfaces from/to the database). Before clearing the data a confirmation dialog is shown. - Show user hint if service is not running, so no updating of graphs. - "Error image" for a graph which can not be loaded General: - Updated translations, added missing translations for ./po/de - Renamed the menu entry from "vnStat Traffic Monitor" to "Traffic Monitor" only Signed-off-by: Helge Mader <ma@dev.tdt.de>
2021-08-11vnstat2: allow graphs side by sideFritz D. Ansel
an a full-hd screen you will have now 2x3 graphs instead scrolling through 1x6 graphs Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
2020-11-27treewide: transition div tables to actual table markupJo-Philipp Wich
Modern browsers allow decomposing table markup equally well as nested div constructs, therefor migrate our <div> table markup to actual <table> tags but keep the old table/tr/th/td CSS classes for now to allow for a smooth theme transition. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-24luci-app-vnstat2: fix ACL rules, disable button on insufficient ACLsJan Hoffmann
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2020-04-03treewide: import utility classes explicitlyJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-31luci-app-vnstat2: fully convert to client side renderingJo-Philipp Wich
This converts the graph rendering to client side JavaScript and replaces the route registration with declarative JSON. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-23luci-app-vnstat2: add applicationJan Hoffmann
This adds an application for vnStat version 2. Signed-off-by: Jan Hoffmann <jan@3e8.eu>