debuggers.hg

view tools/control/web/tmpl/vd-vdrr.tmpl @ 636:73fab8c399fd

bitkeeper revision 1.333 (3f0d5c67WCK8celxi8KUCjs_eFc8QA)

Update web interface to work with new VBD interface.
Finish tidying up web build files
author rac61@labyrinth.cl.cam.ac.uk
date Thu Jul 10 12:30:31 2003 +0000 (2003-07-10)
parents e5cb8bd7ebfe
children
line source
1 Refresh Virtual Disk
2 SECTION&XenoServers
3 BREADCRUMB&Virtual Disk Manager&vd.jsp
5 <!-- content -->
6 <img src="pixel.gif" class="block" width="1" height="12">
8 <table cellpadding="0" cellspacing="0" border="0">
9 <tbody>
10 INCLUDE&vdmenu.tmpl
11 <td valign="top">
13 <%
14 HttpServletRequestWrapper hsrw = new HttpServletRequestWrapper(request);
16 String vds[] = hsrw.getParameterValues("vd");
17 long expiry;
19 if (vds == null || vds.length == 0)
20 {
21 %>
22 Error: No virtual disk chosen.<br>
23 <%
24 }
25 else if (hsrw.getParameter("expiry") == null ||
26 hsrw.getParameter("expiry").trim().equals(""))
27 {
28 %>
29 Error: expiry time not specified.<br>
30 <%
31 }
32 else
33 {
34 expiry = Long.decode(hsrw.getParameter("expiry")).longValue();
36 /* not perfect, but good enough for now... */
37 if ( hsrw.getParameter("expiryunits").equals("d"))
38 {
39 expiry *= 24 * 60 * 60 * 1000;
40 }
41 else if ( hsrw.getParameter("expiryunits").equals("w"))
42 {
43 expiry *= 24 * 60 * 60 * 1000 * 7;
44 }
45 else if ( hsrw.getParameter("expiryunits").equals("m"))
46 {
47 expiry *= 24 * 60 * 60 * 1000 * 30;
48 }
49 else if ( hsrw.getParameter("expiryunits").equals("y"))
50 {
51 expiry *= 24 * 60 * 60 * 1000 * 365;
52 }
54 expiry += System.currentTimeMillis();
56 for (int i = 0; i < vds.length; i++)
57 {
58 %>
59 vd = <%= new CommandVdRefresh(vds[i], new Date(expiry)).executeWeb() %> <br>
60 <%
61 }
62 }
63 %>
65 <%
66 root.doFlushState();
67 %>
70 </td>
71 </tbody>
72 </table>
77 <!-- end content -->