Commit graph

13 commits

Author SHA1 Message Date
Balázs Úr
8767267487 luci-app-nlbwmon: fix typos
Signed-off-by: Balázs Úr <balazs@urbalazs.hu>
(cherry picked from commit 44cef2ab44)
2020-05-07 19:40:50 +02:00
Jo-Philipp Wich
9d6b01974e luci-app-nlbwon: fix parsing relative interval values from config
Fixes: #3302
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2e8aa301aa)
2019-11-13 17:09:59 +01:00
Jo-Philipp Wich
1fb069f235 luci-app-nlbwmon: rewrite display section
- Move CSS and JS code to external files
 - Use responsive table markup

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-11 11:54:42 +01:00
Jo-Philipp Wich
fb859e602b luci-app-nlbwmon: fix nil value concat
Do not concatenate the yet undefined mtime variable to avoid a controller
error with backtrace.

Fixes: b3642f476 ("luci-app-nlbwmon: add proper file names for json and csv exports.")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-10-02 19:20:53 +02:00
Ameer Dawood
15fc6bf48d luci-app-nlbwmon: the default CSV delimiter should be a comma
Suggested-by: Ameer Dawood <ameer1234567890@gmail.com>
[slightly reword commit subject]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-09-29 15:01:57 +02:00
Ameer Dawood
b3642f4762 luci-app-nlbwmon: add proper file names for json and csv exports.
Currently, the json and csv exports are just named `data` which is not
intuitive. This adds proper file name extensions using the
Content-disposition HTTP header.

Suggested-by: Ameer Dawood <ameer1234567890@gmail.com>
[slightly reword commit message, squash commits]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-09-29 14:59:42 +02:00
Jo-Philipp Wich
c0de036b31 treewide: always include cbi.js
Include cbi.js in the main header template like it is done for xhr.js and
remove the page specific includes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09 11:51:43 +02:00
Jo-Philipp Wich
08916f4335 luci-app-nlbw: fix sporadic premature EOF when rendering JSON data
Specific timing patterns sometimes caused the LuCI controller to prematurely
stop reading data, resulting in truncated JSON output.

Turn the nonblocking waitpid() call into a blocking call after the IO read
loop to avoid this issue.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-17 21:15:47 +01:00
Jo-Philipp Wich
1fdad2616d luci-app-nlbw: make display template XHTML compliant
This allows proper rendering in OpenWrt theme. Fixes #1284.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-08-07 09:56:30 +02:00
Jo-Philipp Wich
e276df2051 luci-app-nlbwmon: always fetch latest data
When displaying the most current accounting period, pass an empty timestamp
to the backend in order to query the current in-memory data instead of the
latest committed values.

This ensures that the dashboard always renders the most current data in its
default view.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-08-01 13:51:45 +02:00
Jo-Philipp Wich
6f9b75cc42 luci-app-nlbwmon: remove version marker from javascripts
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-07-31 19:32:02 +02:00
Jo-Philipp Wich
3722aa0286 luci-app-nlbwmon: improve initial view
Make sure that placeholder pie charts are rendered, display a hint about
yet missing data in the tables and offer a link to force-commit ("Reload")
the data.

Also fix some mixed white space, an imbalanced dom operation and sync
translation template.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-07-31 19:15:17 +02:00
Jo-Philipp Wich
0fe93fc3a3 luci-app-nlbwmon: new package
This commit introduces luci-app-nlbwmon, a frontend for nlbwmon, the
lightweight NetLink BandWidth Montor.

The nlbwmon daemon gathers per-host traffic statistics by querying netlink
accounting data. Due to this approach, the executable is very small and does
not rely on libpcap and CPU intensive raw sockets to monitor traffic.

Depends on PR https://github.com/openwrt/packages/pull/4646

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-07-28 16:26:42 +02:00