From dc53423183a0c459284ebd139022b707f01af006 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 27 Jul 2007 12:53:38 +0000 Subject: moved core files to new dir structure git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@219 ab2d0c66-481e-0410-8bed-d214d4d58bed --- lib/log_view.lua | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 lib/log_view.lua (limited to 'lib/log_view.lua') diff --git a/lib/log_view.lua b/lib/log_view.lua new file mode 100644 index 0000000..f32400e --- /dev/null +++ b/lib/log_view.lua @@ -0,0 +1,56 @@ +require ("web_elements") + +local function fwrite(fmt, ...) + return io.write(string.format(fmt, ...)) +end + +local function footer(time) + fwrite("
\n

This request was processed in approximately %d seconds

\n
",time) +end + +header = [[ +content-type: text/html + + + + + + +Alpine log view + + + +]] + +-- + +print(header) +print("\n
") + +fwrite("

%s

",cf.hostinfo.alpine_hostname) + +fwrite("

%s

",cf.hostinfo.alpine_release) + +print("
") + +print (' + + + +
+

]]) +-- get the wc and view tables +-- walk the tree +web_elements.render_table ( view ) +print("

\n
") + +print(footer(cf.time)) +print("") + +-- /* vim: set filetype=lua : */ -- cgit v1.2.3