debuggers.hg

view tools/control/web/tmpl/dom-newr.tmpl @ 623:e5cb8bd7ebfe

bitkeeper revision 1.325 (3f0d278fx62UemAA1unbHTgIGvOJ4Q)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/rac61/xeno.bk
into labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/sos22/xeno.bk
author sos22@labyrinth.cl.cam.ac.uk
date Thu Jul 10 08:45:03 2003 +0000 (2003-07-10)
parents 316a46d203dd bd90bd0c8b23
children
line source
1 Create New Domain
2 SECTION&XenoServers
3 BREADCRUMB&Domain Manager&dom.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&dommenu.tmpl
11 <td valign="top">
13 <b>Create Domain Results</b>
14 <br>
16 <%
17 HttpServletRequestWrapper hsrw = new HttpServletRequestWrapper(request);
18 Defaults d = sc.getDefaults();
19 String root_device = hsrw.getParameter("root");
21 String nfsroot = null;
22 String nfsserver = null;
23 String rd = null;
24 String disk = null;
26 if (root_device.equals("nfs"))
27 {
28 nfsroot = hsrw.getParameter("nfsroot");
29 nfsserver = hsrw.getParameter("nfsserver");
30 disk = "/dev/nfs";
31 }
32 else if (root_device.equals("ram"))
33 {
34 nfsserver = hsrw.getParameter("nfsserver");
35 rd = hsrw.getParameter("rd");
36 }
37 else if (root_device.equals("pdisk"))
38 {
39 nfsserver = hsrw.getParameter("nfsserver");
40 disk = hsrw.getParameter("pdisk");
41 }
42 else if (root_device.equals("vdisk"))
43 {
44 nfsserver = hsrw.getParameter("nfsserver");
45 disk = hsrw.getParameter("vdisk");
46 }
48 %>
49 name = <%= hsrw.getParameter("name") %>
50 <br>
51 size = <%= hsrw.getParameter("size") %>
52 <br>
53 image = <%= hsrw.getParameter("image") %>
54 <br>
55 initrd = <%= rd %>
56 <br>
57 vifs = <%= hsrw.getParameter("vifs") %>
58 <br>
59 bargs = <%= hsrw.getParameter("args") %>
60 <br>
61 nfs_root_path = <%= nfsroot %>
62 <br>
63 nw_ip = <%= hsrw.getParameter("ip") %>
64 <br>
65 nw_gw = <%= hsrw.getParameter("gw") %>
66 <br>
67 nw_mask = <%= hsrw.getParameter("mask") %>
68 <br>
69 nw_nfs_server = <%= nfsserver %>
70 <br>
71 nw_host = <%= hsrw.getParameter("hostname") %>
72 <br>
73 root = <%= disk %>
74 <br>
75 output = <br>
76 <%
77 CommandDomainNew command_new = new CommandDomainNew(d,
78 hsrw.getParameter("name"),
79 Integer.parseInt(hsrw.getParameter("size")),
80 hsrw.getParameter("image"),
81 rd,
82 Integer.parseInt(hsrw.getParameter("vifs")),
83 hsrw.getParameter("args"),
84 disk,
85 nfsroot,
86 hsrw.getParameter("ip"),
87 hsrw.getParameter("gw"),
88 hsrw.getParameter("mask"),
89 nfsserver,
90 hsrw.getParameter("hostname"));
91 String oneline = command_new.executeWeb();
92 if ( oneline != null ) {
93 %>
94 <%= oneline %><br>
95 <%
96 } else {
97 String[] output = command_new.output();
98 for (int i = 0; i < output.length; i++) {
99 %>
100 <%= output[i] %><br>
101 <%
102 }
103 }
104 %>
106 </td>
107 </tbody>
108 </table>
113 <!-- end content -->