val admin = Group.inGroupName "server";
val nodeNum = case $"node" of
- "" => 2
+ "" => 4
| node => Web.stoi node;
if $"new" <> "" then
<br><hr><br>
<table class="blanks">
<tr> <td>By:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td>Time:</td> <td colspan="2"><% #stamp req %></td> </tr>
+<tr> <td>Time:</td> <td colspan="2"><% #stamp req %> (<% Util.diffFromNow (#stamp req) %> ago)</td> </tr>
<tr> <td>Node:</td> <td colspan="2"><% Web.html (Init.nodeName (#node req)) %></td> </tr>
<tr> <td>Packages:</td><%
ref first = true;
<br>
<a href="apt?mod=<% #id req %>">[Modify]</a>
<a href="apt?del=<% #id req %>">[Delete]</a><br>
- To install, run: <tt>apt-get install<% foreach pkg in pkgs do %> <% pkg %><% end %></tt>
+ To install on a node controlled by Puppet, declare <tt>package { [ <% foreach pkg in pkgs do %>'<% Web.html pkg %>', <% end %> ]: }</tt> in manifest <tt>hcoop::server::<% Web.html (Init.nodeName (#node req)) %></tt>. If the node is not managed by Puppet, run: <tt>apt-get install<% foreach pkg in pkgs do %> <% Web.html pkg %><% end %></tt>.
<% end %>
<% end
<br><hr><br>
<table class="blanks">
<tr> <td>By:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td>Time:</td> <td colspan="2"><% #stamp req %></td> </tr>
+<tr> <td>Time:</td> <td colspan="2"><% #stamp req %> (<% Util.diffFromNow (#stamp req) %> ago)</td> </tr>
<tr> <td>Node:</td> <td colspan="2"><% Web.html (Init.nodeName (#node req)) %></td> </tr>
<tr> <td>Packages:</td><%
ref first = true;
<input type="hidden" name="save" value="<% id %>">
<table class="blanks">
<tr> <td>Requestor:</td> <td><a href="user?id=<% #usr req %>"><% #name user %></a></td> </tr>
-<tr> <td>Time:</td> <td><% #stamp req %></td> </tr>
+<tr> <td>Time:</td> <td><% #stamp req %> (<% Util.diffFromNow (#stamp req) %> ago)</td> </tr>
<tr> <td>Node:</td> <td><select name="node">
<% foreach node in Init.listNodes () do %>
<option value="<% #id node %>"<% if #id node = #node req then %> selected<% end %>><% Web.html (#name node) %> (<% Web.html (#descr node) %>; Debian <% Web.html (#debian node) %>)</option>
val oldStatus = #status req;
val newStatus = Apt.statusFromInt (Web.stoi ($"status"));
Apt.modify {req with node = node, data = $"pkgs", msg = $"msg", status = newStatus};
- if oldStatus <> newStatus then
- if not (Apt.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then
- %><h3>Error sending e-mail notification</h3><%
- end
+ if not (Apt.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then
+ %><h3>Error sending e-mail notification</h3><%
end
%><h3>Request modified</h3>
Back to: <a href="apt?cmd=open">open requests</a>, <a href="apt?cmd=list">all requests</a>
<h3>Request new installations</h3>
-List the package names you'd like, separated by any whitespace characters.
+List the package names you'd like, separated by any whitespace
+characters. If you want the version of a package from <a
+href="http://backports-master.debian.org/">backports</a>, specify that
+in the "Reason" field.
<form action="apt" method="post">
<table class="blanks">
<option value="<% #id node %>"<% if #id node = nodeNum then %> selected<% end %>><% Web.html (#name node) %> (<% Web.html (#descr node) %>; Debian <% Web.html (#debian node) %>)</option>
<% end %>
</select></td></tr>
-<tr> <td>Packages:</td> <td><textarea name="new" rows="10" cols="40" wrap="soft"></textarea></td> </tr>
+<tr> <td>Packages:</td> <td><textarea name="new" rows="10" cols="40" wrap="soft" required="required"></textarea></td> </tr>
<tr> <td>Reason:</td> <td><textarea name="msg" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
<tr> <td><input type="submit" value="Request"></td> </tr>
</table>