summaryrefslogtreecommitdiffstats
path: root/lbu-config-html.lsp
blob: 6cd1bb6f653cd27291fa849954cce3323c3106f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<? local view = ... ?>

<h1>SYSTEM INFO</h1>

<dl>
<dt>Program status</dt>
<dd><?= view.status.status or "" ?></dd>
</dl>

<dl>
<dt>Program version</dt>
<dd><?= view.status.version ?></dd>
</dl>

<H1>CONFIG</H1>
<form name="config" action="" method="POST">
<H2>Advanced config</H2>
<H3>Storage media</H3>
<dl>
<dt>Default media for commit</dt>
<dd><select name="LBU_MEDIA" size="1">
<? for i=1, table.maxn(view.config.LBU_MEDIA_LIST) do ?>
<option value="<?= view.config.LBU_MEDIA_LIST[i]["value"] ?>"
<? if (string.lower(view.config.LBU_MEDIA_LIST[i]["value"]) == string.lower(view.config.LBU_MEDIA)) then io.write("selected='selected'") end?>>
<?= view.config.LBU_MEDIA_LIST[i]["name"] ?></option>
<? end ?>
</select></dd>
</dl>

<H3>Include/exclude list</H3>
<dl>
<dt>Included item(s)</dt>
<dd><select name="lbu_included" size="3">
<? for i=1, table.maxn(view.config.lbu_included or {}) do ?>
<option value="<?= view.config.lbu_included[i] ?>"><?= view.config.lbu_included[i] ?></option>
<? end ?>
</select></dd>
</dl>

<dl>
<dt>Delete selected include-item</dt>
<dd><input name="cmd_delete_included" class="submit" type="submit" value="Delete" > (see above)</dd>
</dl>

<dl>
<dt>Excluded item(s)</dt>
<dd><select name="lbu_excluded" size="3">
<? for i=1, table.maxn(view.config.lbu_excluded or {}) do ?>
<option value="<?= view.config.lbu_excluded[i] ?>"><?= view.config.lbu_excluded[i] ?></option>
<? end ?>
</select></dd>
</dl>

<dl>
<dt>Delete selected exclude-item</dt>
<dd><input name="cmd_delete_excluded" class="submit" type="submit" value="Delete" > (see above)</dd>
</dl>

<H3>Security/Encryption</H3>

<dl>
<dt>Password protected commits</dt>
<dd><input type="checkbox" name="ENCRYPTION" <? if (view.config.ENCRYPTION) then io.write("checked=yes") end ?>></dd>
</dl>

<dl>
<dt>Cipher to use at encryption</dt>
<dd><select name="DEFAULT_CIPHER" size="1">
<? for i=1, table.maxn(view.config.DEFAULT_CIPHER_LIST) do ?>
<option value="<?= view.config.DEFAULT_CIPHER_LIST[i] ?>" <? if (string.lower(view.config.DEFAULT_CIPHER_LIST[i]) == string.lower(view.config.DEFAULT_CIPHER)) then io.write("selected='selected'") end?>><?= view.config.DEFAULT_CIPHER_LIST[i] ?></option>
<? end ?>
</select></dd>
</dl>

<dl>
<dt>Password when encrypting</dt>
<dd><input type="text" class="text" value="<?= view.config.PASSWORD or "" ?>" name="PASSWORD"></dd>
</dl>

<H2>Save and apply above settings</H2>
<DL>
<DT>Apply settings</DT>
<DD><input class="submit" name="config_submit" type="submit" value="Apply" disabled /></DD>
</DL>
</form>

<H1>MANAGEMENT</H1>

<dl>
<dt>Commit and save changes</dt>
<dd><form name="cmd" action="" method="POST">
<input type=submit class="submit" name="cmd" value="commit" disabled>
</form></dd>
</dl>

<? if (view.startstop) and (view.startstop.cmdresult) then ?>
<dl>
<dt>Previous action result</dt>
<dd><pre><?= view.startstop.cmdresult?></pre></dd>
</dl>
<? end ?>


<?
--[[ DEBUG INFORMATION
require("debugs")
io.write(debugs.variables(view))
--]]
?>

<? -- vim: set filetype=lua : ?>