summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-05-14 20:44:18 +0000
committerTed Trask <ttrask01@yahoo.com>2008-05-14 20:44:18 +0000
commit4b9f0125157633ed5b75ca7e9c4d28d85f974847 (patch)
treea36a6200183383e9468f3eb9730ebb5a75d88d92
parent811043a4a1290d3ee9f3998d14e2ae20b6ab8ccb (diff)
downloadacf-alpine-baselayout-4b9f0125157633ed5b75ca7e9c4d28d85f974847.tar.bz2
acf-alpine-baselayout-4b9f0125157633ed5b75ca7e9c4d28d85f974847.tar.xz
Added suppress_view option to dispatch_component and return viewtable.
Removed hostname from pageinfo and replaced with component load in template. A little cleanup to use pageinfo in views. git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@1119 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--alpine-baselayout.roles2
-rw-r--r--hostname-controller.lua4
-rw-r--r--hostname-html.lsp2
-rw-r--r--hostname-model.lua2
4 files changed, 5 insertions, 5 deletions
diff --git a/alpine-baselayout.roles b/alpine-baselayout.roles
index 7c1ab0d..f0647c6 100644
--- a/alpine-baselayout.roles
+++ b/alpine-baselayout.roles
@@ -2,4 +2,4 @@ CREATE=interfaces:create
READ=health:storage,health:proc,health:network,health:modules,interfaces:read,logfiles:status,logfiles:view,logfiles:download,syslog:status,syslog:basicstatus
UPDATE=interfaces:update,skins:update,skins:read,syslog:startstop,syslog:config,syslog:expert,interfaces:config
DELETE=interfaces:delete,logfiles:delete
-ALL=health:system
+ALL=health:system, hostname:read
diff --git a/hostname-controller.lua b/hostname-controller.lua
index 8a6ead8..3164ac6 100644
--- a/hostname-controller.lua
+++ b/hostname-controller.lua
@@ -8,11 +8,11 @@ module (..., package.seeall)
default_action = "read"
read = function (self )
- return ({hostname = self.model:get()} )
+ return self.model:get()
end
update = function (self)
- return ( {hostname = self.model:set(cfe({value=self.clientdata.hostname}))})
+ return self.model:set(cfe({value=self.clientdata.hostname}))
end
--[[
diff --git a/hostname-html.lsp b/hostname-html.lsp
index 6fa260f..1fd32c7 100644
--- a/hostname-html.lsp
+++ b/hostname-html.lsp
@@ -1,4 +1,4 @@
<? local view = ... ?>
<h1>Hostname</h1>
<dt>The Hostname is</dt>
-<dd><?= view.hostname.value ?></dd>
+<dd><?= view.value ?></dd>
diff --git a/hostname-model.lua b/hostname-model.lua
index 9638ad7..ba0c117 100644
--- a/hostname-model.lua
+++ b/hostname-model.lua
@@ -8,7 +8,7 @@ get = function (self)
local f = io.popen("/bin/hostname")
local n = f:read("*a") or "unknown"
f:close()
- return (cfe{value=n, name="hostname"})
+ return (cfe{value=n, label="hostname"})
end