debuggers.hg
changeset 629:11399488a825
bitkeeper revision 1.330 (3f0d3d2bKhsLvy6rQeImnM5nqYXVnw)
Implement physical disk management in web interface
Implement physical disk management in web interface
author | rac61@labyrinth.cl.cam.ac.uk |
---|---|
date | Thu Jul 10 10:17:15 2003 +0000 (2003-07-10) |
parents | 3e071d151e22 |
children | 681598b3259f |
files | .rootkeys BitKeeper/etc/ignore tools/control/README-web tools/control/README-xenctl tools/control/web/tmpl/index.tmpl tools/control/web/tmpl/makefile tools/control/web/tmpl/pd-g.tmpl tools/control/web/tmpl/pd-gr.tmpl tools/control/web/tmpl/pd-l.tmpl tools/control/web/tmpl/pd-r.tmpl tools/control/web/tmpl/pd-rr.tmpl tools/control/web/tmpl/pd.tmpl tools/control/web/tmpl/pdmenu.tmpl tools/control/web/tmpl/xenohead.def |
line diff
1.1 --- a/.rootkeys Thu Jul 10 09:24:39 2003 +0000 1.2 +++ b/.rootkeys Thu Jul 10 10:17:15 2003 +0000 1.3 @@ -7,7 +7,7 @@ 3e6377b24eQqYMsDi9XrFkIgTzZ47A tools/bal 1.4 3e6377d6eiFjF1hHIS6JEIOFk62xSA tools/balloon/README 1.5 3e6377dbGcgnisKw16DPCaND7oGO3Q tools/balloon/balloon.c 1.6 3eb781edFwm_pW9FwnQACIe68viLOw tools/control/Makefile 1.7 -3eca6a96a31IwaKtkEa4jmzwTWlm8Q tools/control/README-xenctl 1.8 +3eca6a96a31IwaKtkEa4jmzwTWlm8Q tools/control/README-web 1.9 3eb781fceEYkUi1XHKf2V0KX7si2JA tools/control/build-cmdline.xml 1.10 3ec41f7cWCxQ8pdH8ZWqhhv-38qQ1w tools/control/build-web.xml 1.11 3ec41f7ca6IBXDSe0HVcMPp3PPloOQ tools/control/build.properties 1.12 @@ -95,6 +95,13 @@ 3ec41f7dZRDqKe8wk__95ztDQmaAOA tools/con 1.13 3ec41f7eTqbaFqMGU7lJG09vlEt0TQ tools/control/web/tmpl/index.tmpl 1.14 3ec41f7ed6_QZ1mg0vuA9Xu1wu1plw tools/control/web/tmpl/install.pl 1.15 3ec41f7emmAnjM4gsW6JWkqsjfi4Rg tools/control/web/tmpl/makefile 1.16 +3f0d3c5bP8omJUhjEmXpsRvOZH3igw tools/control/web/tmpl/pd-g.tmpl 1.17 +3f0d3c5bpmNu22iZ8mb-9hzOZUWEZw tools/control/web/tmpl/pd-gr.tmpl 1.18 +3f0d3c5b1oQA8A-Y4AK0akN9k2T1KQ tools/control/web/tmpl/pd-l.tmpl 1.19 +3f0d3c5bkJgUEumHh-qAL3ZB1xApSw tools/control/web/tmpl/pd-r.tmpl 1.20 +3f0d3c5bOEOuHzB1HdWY9GvlYj7H-w tools/control/web/tmpl/pd-rr.tmpl 1.21 +3f0d3c5cb9-AClRfExuRwJi45LcYuA tools/control/web/tmpl/pd.tmpl 1.22 +3f0d3c5cQqQ23OpQJx-sNE0-EclRlA tools/control/web/tmpl/pdmenu.tmpl 1.23 3ec41f7eoDHD2raa4x6dBINr4QLO3A tools/control/web/tmpl/vd-fv.tmpl 1.24 3ec41f7eawycxV05Ow3LfZtOlHZJPA tools/control/web/tmpl/vd-pa.tmpl 1.25 3ec41f7ef4mVT4vwOEL40MKIzS4EeA tools/control/web/tmpl/vd-par.tmpl
2.1 --- a/BitKeeper/etc/ignore Thu Jul 10 09:24:39 2003 +0000 2.2 +++ b/BitKeeper/etc/ignore Thu Jul 10 10:17:15 2003 +0000 2.3 @@ -457,3 +457,9 @@ xenolinux-2.4.21-sparse/arch/xeno/driver 2.4 xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_physdisk_proc.c.bak 2.5 xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_physdisk_proc.c~ 2.6 xenolinux-2.4.21-sparse/include/linux/blk.h~ 2.7 +tools/control/web/pd-g.jsp 2.8 +tools/control/web/pd-gr.jsp 2.9 +tools/control/web/pd-l.jsp 2.10 +tools/control/web/pd-r.jsp 2.11 +tools/control/web/pd-rr.jsp 2.12 +tools/control/web/pd.jsp
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/tools/control/README-web Thu Jul 10 10:17:15 2003 +0000 3.3 @@ -0,0 +1,45 @@ 3.4 + 3.5 +some notes on configuring xenctl... 3.6 + 3.7 +to build: 3.8 + 3.9 + export PATH=/usr/groups/xeno/build_tools/bin:${PATH} 3.10 + # this next step has already been done. 3.11 + # cp $CATALINA_HOME/server/lib/catalina-ant.jar $ANT_HOME/lib 3.12 + cd xeno.bk/tools/control 3.13 + make 3.14 + cd xeno.bk/tools/internal 3.15 + make 3.16 + 3.17 +to setup: 3.18 + 3.19 + ## expand the jakarta (aka catalina) tree somewhere accessible by dom0 3.20 + export ROOTDIR=/anfs/scratch/labyrinth/ach61 3.21 + cd $ROOTDIR 3.22 + tar zxf /usr/groups/xeno/archive/tomcat-4.1.24.tar.gz 3.23 + export CATALINA_HOME=$ROOTDIR/jakarta-tomcat-4.1.24 3.24 + export JAVA_HOME=/usr/groups/xeno/build_tools/java-1.4.1 3.25 + 3.26 + ## edit $CATALINA_HOME/conf/server.xml, change port 8080 to port 80 3.27 + cp $CATALINA_HOME/conf/server.xml $CATALINA_HOME/conf/server.orig 3.28 + sed 's/8080/80/g' $CATALINA_HOME/conf/server.orig > $CATALINA_HOME/conf/server.xml 3.29 + 3.30 + ## install the xenctl web archive 3.31 + cp xeno.bk/tools/control/dist/xenctl-0.1-dev.war $CATALINA_HOME/webapps/xenctl.war 3.32 + cp xeno.bk/tools/control/domctl.xml /var/lib/xen 3.33 + 3.34 + ## either edit xi_tools_dir in domctl.xml or copy the binaries 3.35 + # find xeno.bk/tools/internal -perm +111 -type f -exec cp {} /usr/local/bin \; 3.36 + 3.37 +to run: 3.38 + $CATALINA_HOME/bin/startup.sh 3.39 + # point your browser at hostname-0.xeno.cl.cam.ac.uk:80/xenctl 3.40 + 3.41 + 3.42 +for development: 3.43 + ## edit xeno.bk/tools/control/build.properties 3.44 + # change manger.url to your xenoserver: mousetrap-0.xeno.cl.cam.ac.uk 3.45 + # change build.home to your xeno.bk full path 3.46 + ## to "make install-web" in xeno.bk/tools/control instead of copying the war file 3.47 + cp $CATALINA_HOME/conf/tomcat-users.xml $CATALINA_HOME/conf/tomcat-users.orig 3.48 + sed -e 's/<tomcat-users>/<tomcat-users>\ <role rolename="standard"\/>\ <role rolename="manager"\/>\ <user username="hobbes" password="tiger" roles="standard,manager"\/>/' $CATALINA_HOME/conf/tomcat-users.orig > $CATALINA_HOME/conf/tomcat-users.xml
4.1 --- a/tools/control/README-xenctl Thu Jul 10 09:24:39 2003 +0000 4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 4.3 @@ -1,45 +0,0 @@ 4.4 - 4.5 -some notes on configuring xenctl... 4.6 - 4.7 -to build: 4.8 - 4.9 - export PATH=/usr/groups/xeno/build_tools/bin:${PATH} 4.10 - # this next step has already been done. 4.11 - # cp $CATALINA_HOME/server/lib/catalina-ant.jar $ANT_HOME/lib 4.12 - cd xeno.bk/tools/control 4.13 - make 4.14 - cd xeno.bk/tools/internal 4.15 - make 4.16 - 4.17 -to setup: 4.18 - 4.19 - ## expand the jakarta (aka catalina) tree somewhere accessible by dom0 4.20 - export ROOTDIR=/anfs/scratch/labyrinth/ach61 4.21 - cd $ROOTDIR 4.22 - tar zxf /usr/groups/xeno/archive/tomcat-4.1.24.tar.gz 4.23 - export CATALINA_HOME=$ROOTDIR/jakarta-tomcat-4.1.24 4.24 - export JAVA_HOME=/usr/groups/xeno/build_tools/java-1.4.1 4.25 - 4.26 - ## edit $CATALINA_HOME/conf/server.xml, change port 8080 to port 80 4.27 - cp $CATALINA_HOME/conf/server.xml $CATALINA_HOME/conf/server.orig 4.28 - sed 's/8080/80/g' $CATALINA_HOME/conf/server.orig > $CATALINA_HOME/conf/server.xml 4.29 - 4.30 - ## install the xenctl web archive 4.31 - cp xeno.bk/tools/control/dist/xenctl-0.1-dev.war $CATALINA_HOME/webapps/xenctl.war 4.32 - cp xeno.bk/tools/control/domctl.xml /var/lib/xen 4.33 - 4.34 - ## either edit xi_tools_dir in domctl.xml or copy the binaries 4.35 - # find xeno.bk/tools/internal -perm +111 -type f -exec cp {} /usr/local/bin \; 4.36 - 4.37 -to run: 4.38 - $CATALINA_HOME/bin/startup.sh 4.39 - # point your browser at hostname-0.xeno.cl.cam.ac.uk:80/xenctl 4.40 - 4.41 - 4.42 -for development: 4.43 - ## edit xeno.bk/tools/control/build.properties 4.44 - # change manger.url to your xenoserver: mousetrap-0.xeno.cl.cam.ac.uk 4.45 - # change build.home to your xeno.bk full path 4.46 - ## to "make install" in xeno.bk/tools/control instead of copying the war file 4.47 - cp $CATALINA_HOME/conf/tomcat-users.xml $CATALINA_HOME/conf/tomcat-users.orig 4.48 - sed -e 's/<tomcat-users>/<tomcat-users>\ <role rolename="standard"\/>\ <role rolename="manager"\/>\ <user username="hobbes" password="tiger" roles="standard,manager"\/>/' $CATALINA_HOME/conf/tomcat-users.orig > $CATALINA_HOME/conf/tomcat-users.xml
5.1 --- a/tools/control/web/tmpl/index.tmpl Thu Jul 10 09:24:39 2003 +0000 5.2 +++ b/tools/control/web/tmpl/index.tmpl Thu Jul 10 10:17:15 2003 +0000 5.3 @@ -45,6 +45,7 @@ COPYRIGHT&Computer Laboratory, Universit 5.4 <td nowrap="nowrap"> 5.5 <a href="dom.jsp" class="homemenu">Domain Manager</a><br> 5.6 <a href="vd.jsp" class="homemenu">Virtual Disk Manager</a><br> 5.7 + <a href="pd.jsp" class="homemenu">Physical Disk Manager</a><br> 5.8 </td> 5.9 </tr> 5.10
6.1 --- a/tools/control/web/tmpl/makefile Thu Jul 10 09:24:39 2003 +0000 6.2 +++ b/tools/control/web/tmpl/makefile Thu Jul 10 10:17:15 2003 +0000 6.3 @@ -5,7 +5,8 @@ src1 = index.jsp about.jsp help.jsp vd.j 6.4 vd-par.jsp vd-vdcr.jsp vd-vddr.jsp vd-vdrr.jsp \ 6.5 vd-vbdcr.jsp vd-vbdfr.jsp \ 6.6 dom.jsp dom-lis.jsp dom-new.jsp dom-newr.jsp dom-sta.jsp dom-star.jsp \ 6.7 - dom-stp.jsp dom-stpr.jsp dom-del.jsp dom-delr.jsp 6.8 + dom-stp.jsp dom-stpr.jsp dom-del.jsp dom-delr.jsp \ 6.9 + pd.jsp pd-g.jsp pd-gr.jsp pd-l.jsp pd-r.jsp pd-rr.jsp 6.10 target = .. 6.11 target0 = $(target)/xenostyle.css 6.12 target1 = $(target)/index.jsp $(target)/vd.jsp \ 6.13 @@ -19,7 +20,9 @@ target1 = $(target)/index.jsp $(target)/ 6.14 $(target)/dom.jsp $(target)/dom-lis.jsp $(target)/dom-new.jsp \ 6.15 $(target)/dom-newr.jsp $(target)/dom-sta.jsp $(target)/dom-star.jsp \ 6.16 $(target)/dom-stp.jsp $(target)/dom-stpr.jsp \ 6.17 - $(target)/dom-del.jsp $(target)/dom-delr.jsp 6.18 + $(target)/dom-del.jsp $(target)/dom-delr.jsp \ 6.19 + $(target)/pd.jsp $(target)/pd-g.jsp $(target)/pd-gr.jsp \ 6.20 + $(target)/pd-l.jsp $(target)/pd-r.jsp $(target)/pd-rr.jsp 6.21 6.22 .SUFFIXES: .tmpl .jsp 6.23 6.24 @@ -29,7 +32,7 @@ all: $(target1) $(target0) 6.25 ./install.pl -s -home index 6.26 mv index.jsp $(target) 6.27 6.28 -$(target)/%.jsp: %.tmpl 6.29 +$(target)/%.jsp: %.tmpl xenofoot.def xenohead.def 6.30 ./install.pl $* 6.31 mv $*.jsp $(target) 6.32
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/tools/control/web/tmpl/pd-g.tmpl Thu Jul 10 10:17:15 2003 +0000 7.3 @@ -0,0 +1,99 @@ 7.4 +Grant Access 7.5 +SECTION&XenoServers 7.6 +BREADCRUMB&Physical Disk Manager&pd.jsp 7.7 + 7.8 +<!-- content --> 7.9 +<img src="pixel.gif" class="block" width="1" height="12"> 7.10 + 7.11 +<table cellpadding="0" cellspacing="0" border="0"> 7.12 +<tbody> 7.13 +INCLUDE&pdmenu.tmpl 7.14 +<td valign="top"> 7.15 + 7.16 +<form method="post" action="pd-gr.jsp"> 7.17 +<table cellpadding="0" cellspacing="0" border="0"> 7.18 +<tbody> 7.19 + 7.20 +<tr><td> 7.21 + 7.22 +<table cellpadding="2" cellspacing="0" border="0"> 7.23 +<tbody> 7.24 + <tr class="vdh"><td></td><td>maj:min</td><td>blocks</td><td>start sect</td><td>num sects</td><td>name</td></tr> 7.25 + <% 7.26 + int count = root.pm().getPartitionCount(); 7.27 + for (int loop = 0; loop < count; loop++) 7.28 + { 7.29 + Partition p = root.pm().getPartition(loop); 7.30 + if (p.isXeno() == true) 7.31 + { 7.32 + %> 7.33 + <tr class="vds"><td></td> 7.34 + <% 7.35 + } 7.36 + else 7.37 + { 7.38 + %> 7.39 + <tr class="vdt"> 7.40 + <td><input type="checkbox" name="p" value="<%= p.getName() %>"></td> 7.41 + <% 7.42 + } 7.43 + %> 7.44 + <td><%= p.getMajor() %>:<%= p.getMinor() %></td> 7.45 + <td align="right"><%= p.getBlocks() %></td> 7.46 + <td align="right"><%= p.getStartSect() %> </td> 7.47 + <td align="right"><%= p.getNumSects() %> </td> 7.48 + <td><%= p.getName() %> </td> 7.49 + </tr> 7.50 + <% 7.51 + } 7.52 + %> 7.53 +</tbody> 7.54 +</table> 7.55 + 7.56 +</td></tr> 7.57 + 7.58 +##WHITESPACE## ##GREYLINE1## ##WHITESPACE## 7.59 + 7.60 +<tr><td> 7.61 +<table cellpadding="0" cellspacing="0" border="0"> 7.62 +<tbody> 7.63 + 7.64 +<tr> 7.65 + <td width="100"></td> 7.66 + <td width="7"></td> 7.67 + <td></td> 7.68 +</tr> 7.69 + 7.70 +<tr> 7.71 + <td align="right">domain</td> 7.72 + <td></td> 7.73 + <td> <input type="text" size="3" name="domain"> </td> 7.74 +</tr> 7.75 +<tr> 7.76 + <td align="right"></td> 7.77 + <td></td> 7.78 + <td> <input type="radio" name="mode" value="ro" checked>RO 7.79 + <input type="radio" name="mode" value="rw">RW</td> 7.80 +</tr> 7.81 +</tbody> 7.82 +</table> 7.83 +</td></tr> 7.84 + 7.85 +##WHITESPACE## ##GREYLINE1## ##WHITESPACE## 7.86 + 7.87 +<tr> 7.88 + <td><input type="submit" name="action" value="grant access"></td> 7.89 +</tr> 7.90 + 7.91 +</tbody> 7.92 +</table> 7.93 +</form> 7.94 + 7.95 +</td> 7.96 +</tbody> 7.97 +</table> 7.98 + 7.99 + 7.100 + 7.101 + 7.102 +<!-- end content -->
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/tools/control/web/tmpl/pd-gr.tmpl Thu Jul 10 10:17:15 2003 +0000 8.3 @@ -0,0 +1,77 @@ 8.4 +Grant Access Results 8.5 +SECTION&XenoServers 8.6 +BREADCRUMB&Physical Disk Manager&pd.jsp 8.7 + 8.8 +<!-- content --> 8.9 +<img src="pixel.gif" class="block" width="1" height="12"> 8.10 + 8.11 +<table cellpadding="0" cellspacing="0" border="0"> 8.12 +<tbody> 8.13 +INCLUDE&pdmenu.tmpl 8.14 +<td valign="top"> 8.15 + 8.16 +<b>Grant Access Results</b> 8.17 +<br> 8.18 + 8.19 +<% 8.20 + HttpServletRequestWrapper hsrw = new HttpServletRequestWrapper(request); 8.21 + Defaults d = sc.getDefaults(); 8.22 + 8.23 + String partitions[] = hsrw.getParameterValues("p"); 8.24 + String size = null; 8.25 + 8.26 + if (partitions == null || partitions.length == 0) 8.27 + { 8.28 +%> 8.29 +Error: No partitions chosen.<br> 8.30 +<% 8.31 + } 8.32 + else if (hsrw.getParameter("domain") == null || 8.33 + hsrw.getParameter("domain").trim().equals("")) 8.34 + { 8.35 +%> 8.36 +Error: No domain specified.<br> 8.37 +<% 8.38 + } 8.39 + else 8.40 + { 8.41 + int domain = -1; 8.42 + 8.43 + try 8.44 + { 8.45 + domain = Integer.decode(hsrw.getParameter("domain")).intValue(); 8.46 + Mode mode; 8.47 + if (hsrw.getParameter("mode").equals("rw")) { 8.48 + mode = Mode.READ_WRITE; 8.49 + } else { 8.50 + mode = Mode.READ_ONLY; 8.51 + } 8.52 + 8.53 + for (int i = 0; i < partitions.length; i++) 8.54 + { 8.55 +%> 8.56 +output[<%= i %>] =<br> 8.57 +<%= new CommandPhysicalGrant(d, domain, partitions[i], mode, false).execute() %> <br> 8.58 +<% 8.59 + } 8.60 + } catch (NumberFormatException e) { 8.61 +%> 8.62 +Error: invalid domain specification.<br> 8.63 +<% 8.64 + } 8.65 + } 8.66 +%> 8.67 + 8.68 + 8.69 +<% 8.70 + root.doFlushState(); 8.71 +%> 8.72 + 8.73 + 8.74 +</td> 8.75 +</tbody> 8.76 +</table> 8.77 + 8.78 + 8.79 + 8.80 +<!-- end content -->
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/tools/control/web/tmpl/pd-l.tmpl Thu Jul 10 10:17:15 2003 +0000 9.3 @@ -0,0 +1,90 @@ 9.4 +Physical Access List 9.5 +SECTION&XenoServers 9.6 +BREADCRUMB&Physical Disk Manager&pd.jsp 9.7 + 9.8 +<!-- content --> 9.9 +<img src="pixel.gif" class="block" width="1" height="12"> 9.10 + 9.11 +<table cellpadding="0" cellspacing="0" border="0"> 9.12 +<tbody> 9.13 +INCLUDE&pdmenu.tmpl 9.14 +<td valign="top"> 9.15 + 9.16 +<% 9.17 + CommandDomainList list = new CommandDomainList(sc.getDefaults()); 9.18 + String output = list.executeWeb(); 9.19 + if (output != null) 9.20 + { 9.21 +%> 9.22 +<%= output %> 9.23 +<% 9.24 + } else { 9.25 + Domain domains[] = list.domains(); 9.26 +%> 9.27 + 9.28 +<table cellpadding="2" cellspacing="0" border="0"> 9.29 +<tbody> 9.30 + <tr class="vdh"><td>domain<br>id</td><td>mode</td><td>maj:min</td><td>blocks</td><td>start sect</td><td>num sects</td><td>name</td></tr> 9.31 + <% 9.32 + /* assert: domains != null, otherwise, where is the servlet engine? */ 9.33 + for (int loop = 0; loop < domains.length; loop++) 9.34 + { 9.35 + if ( domains[loop].id == 0 ) 9.36 + continue; 9.37 + CommandPhysicalList plist = new CommandPhysicalList(sc.getDefaults(),domains[loop].id); 9.38 + output = plist.executeWeb(); 9.39 + if (output != null) 9.40 + { 9.41 +%> 9.42 +<%= output %> 9.43 +<% 9.44 + } else { 9.45 + Iterator i = plist.extents().entrySet().iterator(); 9.46 + while (i.hasNext()) { 9.47 + Entry entry = (Entry) i.next(); 9.48 + Extent e = (Extent) entry.getKey(); 9.49 + String mode = entry.getValue().toString(); 9.50 + Partition p = root.pm().getPartition(e); 9.51 + if (p != null) { 9.52 + %> 9.53 + <tr> 9.54 + <td><%= domains[loop].id %></td> 9.55 + <td><%= mode %></td> 9.56 + <td><%= p.getMajor() %>:<%= p.getMinor() %></td> 9.57 + <td align="right"><%= p.getBlocks() %></td> 9.58 + <td align="right"><%= p.getStartSect() %> </td> 9.59 + <td align="right"><%= p.getNumSects() %> </td> 9.60 + <td><%= p.getName() %> </td> 9.61 + </tr> 9.62 + <% 9.63 + } else { 9.64 + %> 9.65 + <tr> 9.66 + <td><%= domains[loop].id %></td> 9.67 + <td><%= mode %></td> 9.68 + <td><%= e.getMajor() %>:<%= e.getMinor()|e.getPartitionNo() %></td> 9.69 + <td align="right"></td> 9.70 + <td align="right"><%= e.getOffset() %> </td> 9.71 + <td align="right"><%= e.getSize() %> </td> 9.72 + <td></td> 9.73 + </tr> 9.74 + <% 9.75 + } 9.76 + } 9.77 + } 9.78 + } 9.79 + %> 9.80 +</tbody> 9.81 +</table> 9.82 +<% 9.83 + } 9.84 +%> 9.85 + 9.86 +</td> 9.87 +</tbody> 9.88 +</table> 9.89 + 9.90 + 9.91 + 9.92 + 9.93 +<!-- end content -->
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/tools/control/web/tmpl/pd-r.tmpl Thu Jul 10 10:17:15 2003 +0000 10.3 @@ -0,0 +1,104 @@ 10.4 +Revoke Access 10.5 +SECTION&XenoServers 10.6 +BREADCRUMB&Physical Disk Manager&pd.jsp 10.7 + 10.8 +<!-- content --> 10.9 +<img src="pixel.gif" class="block" width="1" height="12"> 10.10 + 10.11 +<table cellpadding="0" cellspacing="0" border="0"> 10.12 +<tbody> 10.13 +INCLUDE&pdmenu.tmpl 10.14 +<td valign="top"> 10.15 + 10.16 +<% 10.17 + CommandDomainList list = new CommandDomainList(sc.getDefaults()); 10.18 + String output = list.executeWeb(); 10.19 + if (output != null) 10.20 + { 10.21 +%> 10.22 +<%= output %> 10.23 +<% 10.24 + } else { 10.25 + Domain domains[] = list.domains(); 10.26 +%> 10.27 + 10.28 +<form method="post" action="pd-rr.jsp"> 10.29 +<table cellpadding="0" cellspacing="0" border="0"> 10.30 +<tbody> 10.31 +<tr><td> 10.32 +<table cellpadding="2" cellspacing="0" border="0"> 10.33 +<tbody> 10.34 + <tr class="vdh"><td></td><td>domain<br>id</td><td>mode</td><td>maj:min</td><td>blocks</td><td>start sect</td><td>num sects</td><td>name</td></tr> 10.35 + <% 10.36 + /* assert: domains != null, otherwise, where is the servlet engine? */ 10.37 + for (int loop = 0; loop < domains.length; loop++) 10.38 + { 10.39 + if ( domains[loop].id == 0 ) 10.40 + continue; 10.41 + CommandPhysicalList plist = new CommandPhysicalList(sc.getDefaults(),domains[loop].id); 10.42 + output = plist.executeWeb(); 10.43 + if (output != null) 10.44 + { 10.45 +%> 10.46 +<%= output %> 10.47 +<% 10.48 + } else { 10.49 + Iterator i = plist.extents().entrySet().iterator(); 10.50 + while (i.hasNext()) { 10.51 + Entry entry = (Entry) i.next(); 10.52 + Extent e = (Extent) entry.getKey(); 10.53 + String mode = entry.getValue().toString(); 10.54 + Partition p = root.pm().getPartition(e); 10.55 + if (p != null) { 10.56 + %> 10.57 + <tr> 10.58 + <td><input type="checkbox" name="dompart" value="<%= domains[loop].id + " " + p.getName() %>"></td> 10.59 + <td><%= domains[loop].id %></td> 10.60 + <td><%= mode %></td> 10.61 + <td><%= p.getMajor() %>:<%= p.getMinor() %></td> 10.62 + <td align="right"><%= p.getBlocks() %></td> 10.63 + <td align="right"><%= p.getStartSect() %> </td> 10.64 + <td align="right"><%= p.getNumSects() %> </td> 10.65 + <td><%= p.getName() %> </td> 10.66 + </tr> 10.67 + <% 10.68 + } else { 10.69 + %> 10.70 + <tr> 10.71 + <td><%= domains[loop].id %></td> 10.72 + <td><%= mode %></td> 10.73 + <td><%= e.getMajor() %>:<%= e.getMinor()|e.getPartitionNo() %></td> 10.74 + <td align="right"></td> 10.75 + <td align="right"><%= e.getOffset() %> </td> 10.76 + <td align="right"><%= e.getSize() %> </td> 10.77 + <td></td> 10.78 + </tr> 10.79 + <% 10.80 + } 10.81 + } 10.82 + } 10.83 + } 10.84 + %> 10.85 +</tbody> 10.86 +</table> 10.87 +</td></tr> 10.88 + 10.89 +##WHITESPACE## ##GREYLINE1## ##WHITESPACE## 10.90 + 10.91 +<tr> 10.92 + <td><input type="submit" name="action" value="revoke access"></td> 10.93 +</tr> 10.94 +</table> 10.95 +</form> 10.96 +<% 10.97 + } 10.98 +%> 10.99 + 10.100 +</td> 10.101 +</tbody> 10.102 +</table> 10.103 + 10.104 + 10.105 + 10.106 + 10.107 +<!-- end content -->
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 11.2 +++ b/tools/control/web/tmpl/pd-rr.tmpl Thu Jul 10 10:17:15 2003 +0000 11.3 @@ -0,0 +1,50 @@ 11.4 +Revoke Access 11.5 +SECTION&XenoServers 11.6 +BREADCRUMB&Physical Disk Manager&pd.jsp 11.7 + 11.8 +<!-- content --> 11.9 +<img src="pixel.gif" class="block" width="1" height="12"> 11.10 + 11.11 +<table cellpadding="0" cellspacing="0" border="0"> 11.12 +<tbody> 11.13 +INCLUDE&pdmenu.tmpl 11.14 +<td valign="top"> 11.15 + 11.16 +<b>Revoke Access Results</b> 11.17 +<br> 11.18 +<% 11.19 + HttpServletRequestWrapper hsrw = new HttpServletRequestWrapper(request); 11.20 + 11.21 + String partitions[] = hsrw.getParameterValues("dompart"); 11.22 + if (partitions == null || partitions.length == 0) 11.23 + { 11.24 +%> 11.25 +Error: No partitions chosen.<br> 11.26 +<% 11.27 + } 11.28 + else 11.29 + { 11.30 + for (int i = 0; i < partitions.length; i++) 11.31 + { 11.32 + int domain = Integer.parseInt(partitions[i].substring(0,partitions[i].indexOf(" "))); 11.33 + String partition = partitions[i].substring(partitions[i].indexOf(" ")+1); 11.34 +%> 11.35 +output[<%= i %>] =<br> 11.36 +<%= new CommandPhysicalRevoke(sc.getDefaults(),domain,partition).execute() %> <br> 11.37 +<% 11.38 + } 11.39 + } 11.40 +%> 11.41 + 11.42 +<% 11.43 + root.doFlushState(); 11.44 +%> 11.45 + 11.46 +</td> 11.47 +</tbody> 11.48 +</table> 11.49 + 11.50 + 11.51 + 11.52 + 11.53 +<!-- end content -->
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 12.2 +++ b/tools/control/web/tmpl/pd.tmpl Thu Jul 10 10:17:15 2003 +0000 12.3 @@ -0,0 +1,24 @@ 12.4 +Physical Disk Manager 12.5 +SECTION&XenoServers 12.6 + 12.7 +<!-- content --> 12.8 +<img src="pixel.gif" class="block" width="1" height="12"> 12.9 + 12.10 +<table cellpadding="0" cellspacing="0" border="0"> 12.11 +<tbody> 12.12 +INCLUDE&pdmenu.tmpl 12.13 +<td valign="top"> 12.14 +<table cellpadding="0" cellspacing="0" border="0"> 12.15 +<tbody> 12.16 + <tr><td nowrap="nowrap">Physical Disk Manager</td></tr> 12.17 + 12.18 +</tbody> 12.19 +</table> 12.20 +</td> 12.21 +</tbody> 12.22 +</table> 12.23 + 12.24 + 12.25 + 12.26 + 12.27 +<!-- end content -->
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/tools/control/web/tmpl/pdmenu.tmpl Thu Jul 10 10:17:15 2003 +0000 13.3 @@ -0,0 +1,26 @@ 13.4 +<td width="10" valign="top" align="right"></td> 13.5 + 13.6 +<td valign="top"> 13.7 +<table cellpadding="0" cellspacing="0" border="0"> 13.8 +<tbody> 13.9 +<tr> 13.10 + <td class="menuheader" width="100">Physical Disk Access</td> 13.11 +</tr> 13.12 +<tr> 13.13 + <td class="sidemenu" width="100"><a href="pd-g.jsp">Grant</a></td> 13.14 +</tr> 13.15 +<tr> 13.16 + <td class="sidemenu" width="100"><a href="pd-r.jsp">Revoke</a></td> 13.17 +</tr> 13.18 +<tr> 13.19 + <td class="sidemenu" width="100"><a href="pd-l.jsp">List</a></td> 13.20 +</tr> 13.21 +</tbody> 13.22 +</table> 13.23 +</td> 13.24 + 13.25 +<td width="5" valign="top" align="right"></td> 13.26 + 13.27 +<td bgcolor="#666666" width="2"><img src="img/pixel.gif" class="block" width="2" height="50"></td> 13.28 + 13.29 +<td width="15" valign="top" align="right"></td>
14.1 --- a/tools/control/web/tmpl/xenohead.def Thu Jul 10 09:24:39 2003 +0000 14.2 +++ b/tools/control/web/tmpl/xenohead.def Thu Jul 10 10:17:15 2003 +0000 14.3 @@ -9,6 +9,7 @@ 14.4 <%@ page import="org.xenoserver.control.*" %> 14.5 <%@ page import="java.util.Iterator" %> 14.6 <%@ page import="java.util.Date" %> 14.7 +<%@ page import="java.util.Map.Entry" %> 14.8 <%@ page import="javax.servlet.http.HttpServletRequestWrapper" %> 14.9 14.10 <html lang="en">