From 5aa214f71f495db0d0d75e9e16f2677d6a09f585 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 28 Jul 2008 06:48:16 +0000 Subject: use <% %> instead of git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@1323 ab2d0c66-481e-0410-8bed-d214d4d58bed --- health-modules-html.lsp | 4 +-- health-network-html.lsp | 6 ++-- health-proc-html.lsp | 6 ++-- health-storage-html.lsp | 30 +++++++++--------- health-system-html.lsp | 18 +++++------ hostname-html.lsp | 4 +-- interfaces-read-html.lsp | 70 +++++++++++++++++++++--------------------- interfaces-status-html.lsp | 16 +++++----- interfaces-update-html.lsp | 76 +++++++++++++++++++++++----------------------- logfiles-status-html.lsp | 28 ++++++++--------- password-read-html.lsp | 4 +-- skins-read-html.lsp | 20 ++++++------ syslog-config-html.lsp | 34 ++++++++++----------- syslog-loginfo-html.lsp | 20 ++++++------ 14 files changed, 168 insertions(+), 168 deletions(-) diff --git a/health-modules-html.lsp b/health-modules-html.lsp index d379d95..ee6e0ad 100644 --- a/health-modules-html.lsp +++ b/health-modules-html.lsp @@ -1,6 +1,6 @@ - +<% local view = ... %>

Modules

Installed modules

-
+
<%= view.value.list.value %>
diff --git a/health-network-html.lsp b/health-network-html.lsp index 6533133..d97322a 100644 --- a/health-network-html.lsp +++ b/health-network-html.lsp @@ -1,9 +1,9 @@ - +<% local view = ... %>

Network

Interface status

-
+
<%= view.value.interfaces.value %>

Routes

-
+
<%= view.value.routes.value %>
diff --git a/health-proc-html.lsp b/health-proc-html.lsp index 299c605..6e52d21 100644 --- a/health-proc-html.lsp +++ b/health-proc-html.lsp @@ -1,9 +1,9 @@ - +<% local view = ... %>

Process information

Processor

-
+
<%= view.value.processor.value %>

Memory

-
+
<%= view.value.memory.value %>
diff --git a/health-storage-html.lsp b/health-storage-html.lsp index 4e9a0a8..cd9162e 100644 --- a/health-storage-html.lsp +++ b/health-storage-html.lsp @@ -1,6 +1,6 @@ - +<% local view = ... %> -"..disk.value.."\n") io.write('\n') io.write(" \n") @@ -27,39 +27,39 @@ io.write(" \n") io.write(' \n') io.write(" \n") io.write("
'..name..'=Used=Free
\n") -end ?> +end %>

Storage

Floppy capacity

- +else %> No Floppy mounted - +<% end %>

Harddrive capacity

- +else %> No Harddrive mounted - +<% end %>

RAM Disk capacity

- +else %> No RAM Disk mounted - +<% end %> - +<% if view.value.partitions then %>

Disk partitions

-
- +
<%= view.value.partitions.value %>
+<% end %> diff --git a/health-system-html.lsp b/health-system-html.lsp index ec6ea12..69f3dad 100644 --- a/health-system-html.lsp +++ b/health-system-html.lsp @@ -1,25 +1,25 @@ - +<% local view = ... %>

System

Versions and names

-
-
+
<%= view.value.version.value %>
+
<%= view.value.uname.value %>

Uptime

-
+
<%= view.value
+.uptime.value %>

Time/TimeZone

-
-
+
<%= view.value.date.value %>
+
<%= view.value.timezone.value %>

Memory

-
+
<%= view.value.memory.value %>
- +
0%
10) then io.write(view.value.memory.used .. "%") end ?>
tonumber(view.value.memory.used)) then io.write((100-view.value.memory.used) .. "%") end ?>
100%0%
<% if ( tonumber(view.value.memory.used) > 10) then io.write(view.value.memory.used .. "%") end %>
<% if ( 90 > tonumber(view.value.memory.used)) then io.write((100-view.value.memory.used) .. "%") end %>
100%
diff --git a/hostname-html.lsp b/hostname-html.lsp index 1fd32c7..b27d0d5 100644 --- a/hostname-html.lsp +++ b/hostname-html.lsp @@ -1,4 +1,4 @@ - +<% local view = ... %>

Hostname

The Hostname is
-
+
<%= view.value %>
diff --git a/interfaces-read-html.lsp b/interfaces-read-html.lsp index 54908cf..ac910a9 100644 --- a/interfaces-read-html.lsp +++ b/interfaces-read-html.lsp @@ -1,68 +1,68 @@ - - +<% --[[ DEBUG INFORMATION io.write("

DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(view)) io.write("
") --]] -?> +%> - - - + - - + <% end %> +<% end %> - +<% displaycommandresults({"delete", "ifup", "ifdown"}, session) %> - +end %>

Configured interfaces

- -
+<% for i,entry in ipairs(view.value) do + local interface = entry.value %> +
<%= interface.name.value %>
> - ") ?> - "..option.errtxt) end ?> +<% showoption = function(option) + if option.errtxt or option.value ~= "" then %> +
<%= option.label %>> + <%= string.gsub(tostring(option.value), "\n", "
") %> + <% if option.errtxt then io.write("
"..option.errtxt) end %>
- + end %> - - Edit - - Delete - - ifup - - ifdown - + <% if session.permissions.interfaces.update then %> + Edit + <% end + if session.permissions.interfaces.delete then %> + Delete + <% end + if session.permissions.interfaces.ifup then %> + ifup + <% end + if session.permissions.interfaces.ifdown then %> + ifdown + <% end %>
- +<% end %> -DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(form)) io.write("
") --]] -?> +%> diff --git a/interfaces-status-html.lsp b/interfaces-status-html.lsp index aa36c99..8ab9596 100644 --- a/interfaces-status-html.lsp +++ b/interfaces-status-html.lsp @@ -1,28 +1,28 @@ - - - +<% require("viewfunctions") %> +<% --[[ DEBUG INFORMATION io.write("

DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(view)) io.write("
") --]] -?> +%>

SYSTEM INFO

- +%>
-DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(form)) io.write("
") --]] -?> +%> diff --git a/interfaces-update-html.lsp b/interfaces-update-html.lsp index 13e7181..ced2d86 100644 --- a/interfaces-update-html.lsp +++ b/interfaces-update-html.lsp @@ -1,11 +1,11 @@ - +%> -DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(form)) io.write("
") --]] -?> +%> -

-<%= form.label %><% if page_info.action == "update" then io.write(" - "..form.value.name.value) end %> +<% if page_info.action == "update" then form.value.name.contenteditable = false end local order = {"name", "comment", "auto", "family", "method", "pre-up", "up", "down", "post-down"} displayform(form, order) -?> +%> diff --git a/logfiles-status-html.lsp b/logfiles-status-html.lsp index d7cbe6c..f25d8a4 100644 --- a/logfiles-status-html.lsp +++ b/logfiles-status-html.lsp @@ -1,7 +1,7 @@ - - +<% local view, viewlibrary, page_info, session = ... %> +<% require("viewfunctions") %> - +<% displaycommandresults({"delete"}, session) %>

Available Logfiles

@@ -15,19 +15,19 @@ File - +<% for i,file in ipairs(view.value) do %> - + <% if file.value.inuse.value then %> in use - - - - - - - - + <% else %> + <%= html.link{value = "delete?name="..file.value.filename.value, label="Delete" } %> + <% end %> + <%= html.link{value = "view?name="..file.value.filename.value, label="View" } %> + <%= html.link{value = "download?name="..file.value.filename.value, label="Download" } %> + <%= file.value.filesize.value %> + <%= file.value.mtime.value %> + <%= file.value.filename.value %> - +<% end %> diff --git a/password-read-html.lsp b/password-read-html.lsp index 9ab91bf..1636cdc 100644 --- a/password-read-html.lsp +++ b/password-read-html.lsp @@ -1,2 +1,2 @@ - -

The local root password is

+<% local view = ... %> +

The local root password is <%= view.password.value %>

diff --git a/skins-read-html.lsp b/skins-read-html.lsp index 25ed300..9bb70a0 100644 --- a/skins-read-html.lsp +++ b/skins-read-html.lsp @@ -1,17 +1,17 @@ - - +<% local view, viewlibrary, page_info, session = ... %> +<% require("viewfunctions") %> - +<% displaycommandresults({"update"}, session) %>

Available skins

- -
- +<% for i,skin in ipairs(view.value) do %> +
<%= skin.value %>
+ <% if (skin.inuse) then %>
in use
- -
[use this skin]
- - + <% else %> +
[use this skin]
+ <% end %> +<% end %>
diff --git a/syslog-config-html.lsp b/syslog-config-html.lsp index 5d4061f..e6001b3 100644 --- a/syslog-config-html.lsp +++ b/syslog-config-html.lsp @@ -1,49 +1,49 @@ - - - +<% require("viewfunctions") %> +<% --[[ DEBUG INFORMATION io.write("

Debugging

Debug Info:

") io.write(html.cfe_unpack(form)) io.write("
") --]] -?> +%> - +end %>

Configuration

-

") ?>

-

") ?>

+<% if form.descr then %>

<%= string.gsub(form.descr, "\n", "
") %>

<% end %> +<% if form.errtxt then %>

<%= string.gsub(form.errtxt, "\n", "
") %>

<% end %>

Advanced Configuration

General

- +%>

Log Rotate

- +%>

Remote Logging

- +%>

Save and Apply Above Settings

-
Save/Apply above settings
+
Save/Apply above settings
- +%> diff --git a/syslog-loginfo-html.lsp b/syslog-loginfo-html.lsp index a0b8c38..ad3b08d 100644 --- a/syslog-loginfo-html.lsp +++ b/syslog-loginfo-html.lsp @@ -1,23 +1,23 @@ - - - +<% require("viewfunctions") %> +<% --[[ DEBUG INFORMATION io.write("

DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(form)) io.write("
") --]] -?> +%> - - +<% if viewlibrary and viewlibrary.dispatch_component then viewlibrary.dispatch_component("status") -end ?> - +end %> +<% --]] %>

Program Specific Options/Information

- +%>
-- cgit v1.2.3