From ec52fcd237f1dfe6b478b1c277ec31c57a8e1403 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sun, 28 Oct 2012 22:33:02 +0000 Subject: Removed unneeded views by updating CFE for autoview --- qos-config-html.lsp | 11 ----------- qos-model.lua | 14 +++++++------- 2 files changed, 7 insertions(+), 18 deletions(-) delete mode 100644 qos-config-html.lsp diff --git a/qos-config-html.lsp b/qos-config-html.lsp deleted file mode 100644 index 65364a9..0000000 --- a/qos-config-html.lsp +++ /dev/null @@ -1,11 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -

<%= html.html_escape(form.label) %>

-<% - local order = {"DEV", "DEV_RATE", "INGRESS_ALG", "IFB_DEV", "INGRESS_RATE", "EGRESS_ALG", "EGRESS_RATE"} - form.value.DEV.readonly = true - htmlviewfunctions.displayform(form, order, nil, page_info) -%> diff --git a/qos-model.lua b/qos-model.lua index 584a3d5..88d2874 100644 --- a/qos-model.lua +++ b/qos-model.lua @@ -144,13 +144,13 @@ function get_config(self, clientdata) end local configfile = conffile.."."..interface local configopts = format.parse_ini_file(fs.read_file(configfile) or "", "") or {} - config.DEV = cfe({ value=configopts.DEV or interface, label="Network device" }) - config.DEV_RATE = cfe({ value=configopts.DEV_RATE or "", label="Device Rate", descr="Actual speed of physical device (units: mbps, mbit, kbit, kbps, bps)"}) - config.INGRESS_ALG = cfe({ type="select", value=configopts.INGRESS_ALG or "none", label="Ingress Algorithm", option={"police", "cpolice", "ifb", "none"} }) - config.IFB_DEV = cfe({ type="select", value=configopts.IFB_DEV or "", label="Inbound IFB device", option=ifbs }) - config.INGRESS_RATE = cfe({ value=configopts.INGRESS_RATE or "", label="Ingress rate", descr="(units: mbps, mbit, kbit, kbps, bps)"}) - config.EGRESS_ALG = cfe({ type="select", value=configopts.EGRESS_ALG or "none", label="Egress Algorithm", option={"htb", "hfsc", "prio", "none"} }) - config.EGRESS_RATE = cfe({ value=configopts.EGRESS_RATE or "", label="Egress rate", descr="(units: mbps, mbit, kbit, kbps, bps)"}) + config.DEV = cfe({ value=configopts.DEV or interface, label="Network device", readonly=true, seq=1 }) + config.DEV_RATE = cfe({ value=configopts.DEV_RATE or "", label="Device Rate", descr="Actual speed of physical device (units: mbps, mbit, kbit, kbps, bps)", seq=2 }) + config.INGRESS_ALG = cfe({ type="select", value=configopts.INGRESS_ALG or "none", label="Ingress Algorithm", option={"police", "cpolice", "ifb", "none"}, seq=3 }) + config.IFB_DEV = cfe({ type="select", value=configopts.IFB_DEV or "", label="Inbound IFB device", option=ifbs, seq=4 }) + config.INGRESS_RATE = cfe({ value=configopts.INGRESS_RATE or "", label="Ingress rate", descr="(units: mbps, mbit, kbit, kbps, bps)", seq=5 }) + config.EGRESS_ALG = cfe({ type="select", value=configopts.EGRESS_ALG or "none", label="Egress Algorithm", option={"htb", "hfsc", "prio", "none"}, seq=6 }) + config.EGRESS_RATE = cfe({ value=configopts.EGRESS_RATE or "", label="Egress rate", descr="(units: mbps, mbit, kbit, kbps, bps)", seq=7 }) config.DEV.errtxt = "Invalid device" for i,int in ipairs(list_interfaces(self)) do -- cgit v1.2.3