From 4b9f0125157633ed5b75ca7e9c4d28d85f974847 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 14 May 2008 20:44:18 +0000 Subject: 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 --- alpine-baselayout.roles | 2 +- hostname-controller.lua | 4 ++-- hostname-html.lsp | 2 +- hostname-model.lua | 2 +- 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 @@

Hostname

The Hostname is
-
+
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 -- cgit v1.2.3