% @header [("title", ["IP address requests"])];
val admin = Group.inGroupName "server";
val nodeNum = case $"node" of
"" => 2
| node => Web.stoi node;
if $"new" <> "" then
val port = Web.stoi ($"port");
val msg = $"msg";
%>Are you sure you want to ask for an IP address with port <% port %> free on machine <% Init.nodeName nodeNum %>?
Yes, I want to request that.
<% elseif $"req" <> "" then
val id = Ip.add {usr = Init.getUserId (), node = nodeNum, data = $"req", msg = $"msg"};
if not (Ip.notifyNew id) then
%>
<% if admin then %>
[Modify][Delete]
<% end %>
<% end
elseif $"mod" <> "" then
Group.requireGroupName "server";
val id = Web.stoi ($"mod");
val req = Ip.lookup id;
val user = Init.lookupUser (#usr req) %>
Handle request
<% elseif $"save" <> "" then
Group.requireGroupName "server";
val id = Web.stoi ($"save");
val node = Web.stoi ($"node");
val req = Ip.lookup id;
val oldStatus = #status req;
val newStatus = Ip.statusFromInt (Web.stoi ($"status"));
Ip.modify {req with node = node, data = $"port", msg = $"msg", status = newStatus};
if oldStatus <> newStatus then
if not (Ip.notifyMod {old = oldStatus, new = newStatus, changer = Init.getUserName(), req = id}) then
%>
Error sending e-mail notification
<%
end
end
%>
Request modified
Back to: open requests, all requests
<% elseif $"del" <> "" then
Group.requireGroupName "server";
val id = Web.stoi ($"del");
val req = Ip.lookup id;
val user = Init.lookupUser (#usr req)
%>
Are you sure you want to delete request by <% #name user %> for <% #data req %>?
Yes, I'm sure!
<% elseif $"del2" <> "" then
Group.requireGroupName "server";
val id = Web.stoi ($"del2");
Ip.delete id
%>
Use this form to request use of a particular port. If your request is granted, you will be assigned rights to your port on a particular IP address. The most common use of this form is to ask for an IP address to use with an SSL virtual web host. We will grant requests in very few other cases. Try to use free ports on the base IP address of one of the machines on which we grant member log-in.