Rework LuCI build system
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / df.lua
1 --[[
2
3 Luci statistics - df plugin diagram definition
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id: df.lua 2274 2008-06-03 23:15:16Z jow $
13
14 ]]--
15
16 module("luci.statistics.rrdtool.definitions.df", package.seeall)
17
18 function rrdargs( graph, plugin, plugin_instance, dtype )
19
20         return {
21                 title = "%H: Disk space usage on %di",
22                 vlabel = "Bytes",
23                 per_instance  = true,
24                 number_format = "%5.1lf%sB",
25
26                 data = {
27                         sources = {
28                                 df = { "free", "used" }
29                         },
30
31                         options = {
32                                 df__free = {
33                                         color = "00ff00",
34                                         overlay = false,
35                                         title = "free"
36                                 },
37
38                                 df__used = {
39                                         color = "ff0000",
40                                         overlay = false,
41                                         title = "used"
42                                 }
43                         }
44                 }
45         }
46 end