luci-app-statistics: Fix disk usage graphing
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / df.lua
1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
3
4 module("luci.statistics.rrdtool.definitions.df", package.seeall)
5
6 function rrdargs( graph, plugin, plugin_instance, dtype )
7
8         return {
9                 title = "%H: Disk space usage on %di",
10                 vlabel = "Bytes",
11                 per_instance  = true,
12                 number_format = "%5.1lf%sB",
13
14                 data = {
15                         instances = {
16                                 df_complex = { "free", "used", "reserved" }
17                         },
18
19                         options = {
20                                 df_complex_free = {
21                                         color = "00ff00",
22                                         overlay = false,
23                                         title = "free"
24                                 },
25
26                                 df_complex_used = {
27                                         color = "ff0000",
28                                         overlay = false,
29                                         title = "used"
30                                 },
31
32                                 df_complex_reserved = {
33                                         color = "0000ff",
34                                         overlay = false,
35                                         title = "reserved"
36                                 }
37                         }
38                 }
39         }
40 end