summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rrdtool-config-html.lsp10
-rw-r--r--rrdtool-createrrd-html.lsp10
-rw-r--r--rrdtool-listgraphcfg-html.lsp11
-rw-r--r--rrdtool-listrrd-html.lsp9
-rw-r--r--rrdtool-model.lua12
5 files changed, 14 insertions, 38 deletions
diff --git a/rrdtool-config-html.lsp b/rrdtool-config-html.lsp
index fa879a1..a1e0210 100644
--- a/rrdtool-config-html.lsp
+++ b/rrdtool-config-html.lsp
@@ -5,9 +5,11 @@ htmlviewfunctions = require("htmlviewfunctions")
<% htmlviewfunctions.displaycommandresults({"install","editgraphcfg"}, session) %>
<% htmlviewfunctions.displaycommandresults({"delete", "rrdinfo"}, session) %>
-<h1>Configure</h1>
-
-<% if viewlibrary and viewlibrary.dispatch_component then
+<%
+local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Configure"}), page_info)
+if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("listrrd")
viewlibrary.dispatch_component("listgraphcfg")
-end %>
+end
+htmlviewfunctions.displaysectionend(header_level)
+%>
diff --git a/rrdtool-createrrd-html.lsp b/rrdtool-createrrd-html.lsp
deleted file mode 100644
index 8522a0d..0000000
--- a/rrdtool-createrrd-html.lsp
+++ /dev/null
@@ -1,10 +0,0 @@
-<% local form, viewlibrary, page_info, session = ...
-htmlviewfunctions = require("htmlviewfunctions")
-%>
-<% htmlviewfunctions.displaycommandresults({"createrrd"}, session) %>
-
-<h1>Create new RRD</h1>
-<%
- local order = {"filename", "start", "step", "ds", "rra"}
- htmlviewfunctions.displayform(form, order)
-%>
diff --git a/rrdtool-listgraphcfg-html.lsp b/rrdtool-listgraphcfg-html.lsp
index db6ef05..1b844d3 100644
--- a/rrdtool-listgraphcfg-html.lsp
+++ b/rrdtool-listgraphcfg-html.lsp
@@ -47,7 +47,7 @@ function javascript_confirm_graph(formID,filename) {
}
</script>
-<h2><%= form.label %></h2>
+<% local header_level = htmlviewfunctions.displaysectionstart(form, page_info) %>
<form id="confirmDisplay" action="#" onsubmit="return false"></form>
@@ -84,11 +84,4 @@ function javascript_confirm_graph(formID,filename) {
</tr>
<% end %>
</tbody></table>
-
-<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("newfile") then
- local newfileform = viewlibrary.dispatch_component("newfile", nil, true) %>
-<h2>Create new Domain</h2>
-<%
- newfileform.action = page_info.script .. page_info.prefix .. page_info.controller .. "/newfile"
- htmlviewfunctions.displayform(newfileform)
-end %>
+<% htmlviewfunctions.displaysectionend(header_level) %>
diff --git a/rrdtool-listrrd-html.lsp b/rrdtool-listrrd-html.lsp
index cee087c..c9aaf24 100644
--- a/rrdtool-listrrd-html.lsp
+++ b/rrdtool-listrrd-html.lsp
@@ -84,12 +84,3 @@ function javascript_confirm_demo(formID,filename) {
</tr>
<% end %>
</tbody></table>
-
-<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("newfile") then
- local newfileform = viewlibrary.dispatch_component("newfile", nil, true) %>
-<h2>Create new Domain</h2>
-<%
- newfileform.action = page_info.script .. page_info.prefix .. page_info.controller .. "/newfile"
- htmlviewfunctions.displayform(newfileform)
-end %>
-
diff --git a/rrdtool-model.lua b/rrdtool-model.lua
index 8f97738..ea92fc4 100644
--- a/rrdtool-model.lua
+++ b/rrdtool-model.lua
@@ -83,16 +83,16 @@ end
function mymodule.createnewrrd()
local newdb = {}
- newdb.filename = cfe({label="Name",value="mydb.rrd",descr="The name of the RRD you want to create. RRD files should end with the extension .rrd. However, RRDtool will accept any filename."})
+ newdb.filename = cfe({label="Name",value="mydb.rrd",descr="The name of the RRD you want to create. RRD files should end with the extension .rrd. However, RRDtool will accept any filename.", seq=1})
newdb.start = cfe({label="Start",value="",descr="Specifies the time in seconds since 1970-01-01 UTC when the first value should be added to the RRD. RRDtool will not accept any data timed before or at the time specified.\
(Your system saids that your current time is '" .. tostring(os.time(os.date("*t"))) .. "' in the format you should specify above. The startvalue should be smaller than your current time.)\
-(Default: now - 10s)"})
+(Default: now - 10s)", seq=2})
newdb.step = cfe({label="Step",value="",descr="Specifies the base interval in seconds with which data will be fed into the RRD.\
-(Default: 300)"})
+(Default: 300)", seq=3})
newdb.ds = cfe({label="Data store(s)",value="",descr="DS:ds-name:GAUGE | COUNTER | DERIVE | ABSOLUTE:heartbeat:min:max \
-DS:ds-name:COMPUTE:rpn-expression",type="longtext"})
- newdb.rra = cfe({label="Round Robin Archive(s)",value="",descr="RRA:AVERAGE | MIN | MAX | LAST:xff:steps:rows",type="longtext"})
- return {value=newdb}
+DS:ds-name:COMPUTE:rpn-expression",type="longtext", seq=4})
+ newdb.rra = cfe({label="Round Robin Archive(s)",value="",descr="RRA:AVERAGE | MIN | MAX | LAST:xff:steps:rows",type="longtext", seq=5})
+ return cfe({value=newdb, label="Create new RRD"})
end
function mymodule.remove_file(self, path, userid)