Commit graph

12 commits

Author SHA1 Message Date
Hannu Nyman
5b3fa3cdc7 luci-app-statistics: adjust graph size fallback to defaults
Adjust the fallback timespan and graph width to the current config
defaults. (The default width in /etc/config/luci_statistics has been
600 already since commit 7ab8b51bd in March 2010.)

Expose the graph height in the config file and
increase it from 100 to 150 to keep the original aspect ratio.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-11-10 22:27:43 +02:00
Hannu Nyman
0d25e3869a
Merge pull request #4358 from plm/remove-rrd-path-triple-escape
luci-app-statistics: remove rrd path triple escape
2021-03-23 17:30:33 +02:00
Hannu Nyman
b43a5da43e luci-app-statistics: shorten delay at graph endpoint to 15s
Shorten the visible delay at the statistics graph endpoint
from 60 seconds to 15 seconds.

The 60s delay was recently added as a way to remove a possible
visible gap at the end of the hourly graph due to absence of
recent data. Default data collection interval is 30s, so that
60s guarantees that there is data upto to the end of the graph.

However, that 60s makes any recent activity to get displayed
really slowly, after a 60-89 second delay.

Shortening the gap to 15s, half of the default data collection
period, should balance things:
* Half of the time there may be a really narrow gap visible and
  half of the time there is no gap at all.
* The most recent displayed data point is from 15-44 seconds ago
  (instead of 60-89 seconds ago).

Neither 15 or 60 seconds makes any impact to the longer graphs.
To accommodate to possibly shorter timespans, and to avoid the
occasional wrong data series selected for longer period graphs
(see #4065) the endpoint delay might be relative to the timespan.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2020-12-18 17:41:18 +02:00
Hannu Nyman
b95ac83ffd luci-app-statistics: fix comment
Update comment to reflect 'noavg' option introduced by 64bb82d03

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2020-09-08 08:21:55 +03:00
Florian Eckert
4d3f61d7c7 luci-app-statistics: add noavg option
It is sometimes useful not to display avg values int the graph.
This option is used to prevent this from appearing in the graph.
In a graph definition this option must be set to *true*,
 if the avg values should not be displayed.

```
options = {
	gauge = {
		title = "Status",
		color = "0000ff",
		noarea = true,
		noavg = true
	}
```

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-09-08 07:57:35 +03:00
Philip L. McMahon
d44302b3ac luci-app-statistics: remove rrd path triple escape
Fixes rendering errors when RRD file names contain IPv6 addresses and the
colon (":") characters are triple escaped.

Adapts the Lua-specific fix in #4340 to Javascript.

Signed-off-by: Philip L. McMahon <philip.l.mcmahon@gmail.com>
2020-08-16 23:57:34 -07:00
Jo-Philipp Wich
3c4bc228a1 treewide: import utility classes explicitly
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-03 10:00:06 +02:00
Jo-Philipp Wich
72da3c4c55 luci-app-statistics: rearrange graph display
- Add a per-plugin overview tab that contains the (non-detail) graphs of
   each plugin instance, similar to the old Lua based implementation
 - Numerically order plugin instances starting with numbers
 - Avoid multiple renderings of the same graphs
 - Fix legend of tcpconns graphs
 - Move cpufreq distribution and transition charts to detail tabs

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-22 23:32:44 +01:00
Jo-Philipp Wich
96dcae3a34 luci-app-statistics: use stable random seed for dynamic graph colors
Fixes: #3666
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-21 23:01:22 +01:00
Jo-Philipp Wich
4b1a43fc86 luci-app-statistics: fix data source ordering
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-20 13:48:20 +01:00
Jo-Philipp Wich
eec30a2b7d luci-app-statistics: fix datasource selection in graph rendering
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-19 14:28:35 +01:00
Jo-Philipp Wich
9680fdea9e luci-app-statistics: convert graph rendering to client side js
This conversion requires cgi-io >= version 17 and uhttpd version >= 2020-02-12
to function properly.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-13 20:45:26 +01:00