diff options
author | rac61@labyrinth.cl.cam.ac.uk <rac61@labyrinth.cl.cam.ac.uk> | 2003-07-10 12:30:31 +0000 |
---|---|---|
committer | rac61@labyrinth.cl.cam.ac.uk <rac61@labyrinth.cl.cam.ac.uk> | 2003-07-10 12:30:31 +0000 |
commit | 2d64dbf5eef2a62c56bb2e2681d61887abbe5590 (patch) | |
tree | a4cff6517eb05c61aa29e6d3d8f3f6695f1002fc /tools | |
parent | 005477225b0845d60d14178287168b0e4e49ee5f (diff) | |
download | xen-2d64dbf5eef2a62c56bb2e2681d61887abbe5590.tar.gz xen-2d64dbf5eef2a62c56bb2e2681d61887abbe5590.tar.bz2 xen-2d64dbf5eef2a62c56bb2e2681d61887abbe5590.zip |
bitkeeper revision 1.333 (3f0d5c67WCK8celxi8KUCjs_eFc8QA)
Update web interface to work with new VBD interface.
Finish tidying up web build files
Diffstat (limited to 'tools')
-rw-r--r-- | tools/control/README-web | 1 | ||||
-rw-r--r-- | tools/control/build-web.xml | 39 | ||||
-rw-r--r-- | tools/control/build.properties | 3 | ||||
-rw-r--r-- | tools/control/docs/empty_dir | 0 | ||||
-rw-r--r-- | tools/control/web/tmpl/makefile | 8 | ||||
-rw-r--r-- | tools/control/web/tmpl/pd-gr.tmpl | 2 | ||||
-rw-r--r-- | tools/control/web/tmpl/pd-rr.tmpl | 2 | ||||
-rw-r--r-- | tools/control/web/tmpl/vd-par.tmpl | 2 | ||||
-rw-r--r-- | tools/control/web/tmpl/vd-vbdcr.tmpl | 2 | ||||
-rw-r--r-- | tools/control/web/tmpl/vd-vbdd.tmpl | 33 | ||||
-rw-r--r-- | tools/control/web/tmpl/vd-vbdf.tmpl | 66 | ||||
-rw-r--r-- | tools/control/web/tmpl/vd-vbdfr.tmpl | 32 | ||||
-rw-r--r-- | tools/control/web/tmpl/vd-vbdv.tmpl | 19 | ||||
-rw-r--r-- | tools/control/web/tmpl/vd-vdcr.tmpl | 2 | ||||
-rw-r--r-- | tools/control/web/tmpl/vd-vddr.tmpl | 2 | ||||
-rw-r--r-- | tools/control/web/tmpl/vd-vdrr.tmpl | 2 | ||||
-rw-r--r-- | tools/control/web/tmpl/vdmenu.tmpl | 6 |
17 files changed, 28 insertions, 193 deletions
diff --git a/tools/control/README-web b/tools/control/README-web index f9cbe98bb9..a3c84ead65 100644 --- a/tools/control/README-web +++ b/tools/control/README-web @@ -39,7 +39,6 @@ to run: for development: ## edit xeno.bk/tools/control/build.properties # change manger.url to your xenoserver: mousetrap-0.xeno.cl.cam.ac.uk - # change build.home to your xeno.bk full path ## to "make install-web" in xeno.bk/tools/control instead of copying the war file cp $CATALINA_HOME/conf/tomcat-users.xml $CATALINA_HOME/conf/tomcat-users.orig 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 diff --git a/tools/control/build-web.xml b/tools/control/build-web.xml index 1973eef888..2b9c91332d 100644 --- a/tools/control/build-web.xml +++ b/tools/control/build-web.xml @@ -109,14 +109,12 @@ --> - <property name="app.name" value="myapp"/> + <property name="app.name" value="xenctl"/> <property name="app.path" value="/${app.name}"/> <property name="app.version" value="0.1-dev"/> <property name="build.home" value="${basedir}/build-web"/> <property name="catalina.home" value="../../../.."/> <!-- UPDATE THIS! --> <property name="dist.home" value="${basedir}/dist-web"/> - <property name="docs.home" value="${basedir}/docs"/> -<!-- <property name="manager.url" value="http://localhost:8080/manager"/> --> <property name="src.home" value="${basedir}/src"/> <property name="web.home" value="${basedir}/web"/> @@ -308,24 +306,16 @@ The "dist" target creates a binary distribution of your application in a directory structure ready to be archived in a tar.gz or zip file. - Note that this target depends on two others: + Note that this target depends on: * "compile" so that the entire web application (including external dependencies) will have been assembled - * "javadoc" so that the application Javadocs will have been created - --> <target name="dist" depends="compile" description="Create binary distribution"> - <!-- Copy documentation subdirectories --> - <mkdir dir="${dist.home}/docs"/> - <copy todir="${dist.home}/docs"> - <fileset dir="${docs.home}"/> - </copy> - <!-- Create application JAR file --> <jar jarfile="${dist.home}/${app.name}-${app.version}.war" basedir="${build.home}"/> @@ -369,31 +359,6 @@ </target> -<!-- ==================== Javadoc Target ================================== --> - -<!-- - - The "javadoc" target creates Javadoc API documentation for the Java - classes included in your application. Normally, this is only required - when preparing a distribution release, but is available as a separate - target in case the developer wants to create Javadocs independently. - ---> - - <target name="javadoc" depends="compile" - description="Create Javadoc API documentation"> - - <mkdir dir="${dist.home}/docs/api"/> - <javadoc sourcepath="${src.home}" - destdir="${dist.home}/docs/api" - packagenames="*"> - <classpath refid="compile.classpath"/> - </javadoc> - - </target> - - - <!-- ====================== List Target =================================== --> <!-- diff --git a/tools/control/build.properties b/tools/control/build.properties index c8e669664f..22dc78763b 100644 --- a/tools/control/build.properties +++ b/tools/control/build.properties @@ -4,7 +4,4 @@ manager.url=http://<hostname>/manager manager.username=hobbes manager.password=tiger compile.optimize=false -# change <path> to the full path -build.home=<path>/xeno.bk/tools/control/build-xen/build-xen -app.name=xenctl diff --git a/tools/control/docs/empty_dir b/tools/control/docs/empty_dir deleted file mode 100644 index e69de29bb2..0000000000 --- a/tools/control/docs/empty_dir +++ /dev/null diff --git a/tools/control/web/tmpl/makefile b/tools/control/web/tmpl/makefile index 8e5e019832..3e72f3867a 100644 --- a/tools/control/web/tmpl/makefile +++ b/tools/control/web/tmpl/makefile @@ -1,9 +1,8 @@ src0 = xenostyle.css src1 = index.jsp about.jsp help.jsp vd.jsp \ vd-pv.jsp vd-pa.jsp vd-vdv.jsp vd-vdc.jsp vd-vdd.jsp vd-vdr.jsp \ - vd-fv.jsp vd-vbdv.jsp vd-vbdc.jsp vd-vbdd.jsp vd-vbdf.jsp \ - vd-par.jsp vd-vdcr.jsp vd-vddr.jsp vd-vdrr.jsp \ - vd-vbdcr.jsp vd-vbdfr.jsp \ + vd-fv.jsp vd-vbdv.jsp vd-vbdc.jsp \ + vd-par.jsp vd-vdcr.jsp vd-vddr.jsp vd-vdrr.jsp vd-vbdcr.jsp \ dom.jsp dom-lis.jsp dom-new.jsp dom-newr.jsp dom-sta.jsp dom-star.jsp \ dom-stp.jsp dom-stpr.jsp dom-del.jsp dom-delr.jsp \ pd.jsp pd-g.jsp pd-gr.jsp pd-l.jsp pd-r.jsp pd-rr.jsp @@ -13,10 +12,9 @@ target1 = $(target)/index.jsp $(target)/vd.jsp \ $(target)/vd-pv.jsp $(target)/vd-pa.jsp $(target)/vd-vdv.jsp \ $(target)/vd-vdc.jsp $(target)/vd-vdd.jsp $(target)/vd-vdr.jsp \ $(target)/vd-fv.jsp $(target)/vd-vbdv.jsp $(target)/vd-vbdc.jsp \ - $(target)/vd-vbdd.jsp $(target)/vd-vbdf.jsp \ $(target)/about.jsp $(target)/help.jsp \ $(target)/vd-par.jsp $(target)/vd-vdcr.jsp $(target)/vd-vddr.jsp \ - $(target)/vd-vdrr.jsp $(target)/vd-vbdcr.jsp $(target)/vd-vbdfr.jsp \ + $(target)/vd-vdrr.jsp $(target)/vd-vbdcr.jsp \ $(target)/dom.jsp $(target)/dom-lis.jsp $(target)/dom-new.jsp \ $(target)/dom-newr.jsp $(target)/dom-sta.jsp $(target)/dom-star.jsp \ $(target)/dom-stp.jsp $(target)/dom-stpr.jsp \ diff --git a/tools/control/web/tmpl/pd-gr.tmpl b/tools/control/web/tmpl/pd-gr.tmpl index 800d9ebc4e..96020aa7e5 100644 --- a/tools/control/web/tmpl/pd-gr.tmpl +++ b/tools/control/web/tmpl/pd-gr.tmpl @@ -51,7 +51,7 @@ Error: No domain specified.<br> { %> output[<%= i %>] =<br> -<%= new CommandPhysicalGrant(d, domain, partitions[i], mode, false).execute() %> <br> +<%= new CommandPhysicalGrant(d, domain, partitions[i], mode, false).executeWeb() %> <br> <% } } catch (NumberFormatException e) { diff --git a/tools/control/web/tmpl/pd-rr.tmpl b/tools/control/web/tmpl/pd-rr.tmpl index 51d184359a..e34120aa4c 100644 --- a/tools/control/web/tmpl/pd-rr.tmpl +++ b/tools/control/web/tmpl/pd-rr.tmpl @@ -30,7 +30,7 @@ Error: No partitions chosen.<br> String partition = partitions[i].substring(partitions[i].indexOf(" ")+1); %> output[<%= i %>] =<br> -<%= new CommandPhysicalRevoke(sc.getDefaults(),domain,partition).execute() %> <br> +<%= new CommandPhysicalRevoke(sc.getDefaults(),domain,partition).executeWeb() %> <br> <% } } diff --git a/tools/control/web/tmpl/vd-par.tmpl b/tools/control/web/tmpl/vd-par.tmpl index a88602441a..14df3eb6e7 100644 --- a/tools/control/web/tmpl/vd-par.tmpl +++ b/tools/control/web/tmpl/vd-par.tmpl @@ -40,7 +40,7 @@ Error: chunk size not specified.<br> { %> output[<%= i %>] =<br> -<%= new CommandPartitionAdd(partitions[i], Library.parseSize(size), false).execute() %> <br> +<%= new CommandPartitionAdd(partitions[i], Library.parseSize(size), false).executeWeb() %> <br> <% } } diff --git a/tools/control/web/tmpl/vd-vbdcr.tmpl b/tools/control/web/tmpl/vd-vbdcr.tmpl index 05bd41992b..b21d5b9a1d 100644 --- a/tools/control/web/tmpl/vd-vbdcr.tmpl +++ b/tools/control/web/tmpl/vd-vbdcr.tmpl @@ -57,7 +57,7 @@ Error: No virtual block device number specified.<br> output =<br> <%= new CommandVbdCreate(hsrw.getParameter("vd"), domain, vbd, - mode).execute() %> + mode).executeWeb() %> <% } catch (NumberFormatException e) diff --git a/tools/control/web/tmpl/vd-vbdd.tmpl b/tools/control/web/tmpl/vd-vbdd.tmpl deleted file mode 100644 index c15a173116..0000000000 --- a/tools/control/web/tmpl/vd-vbdd.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -Delete Virtual Block Devices -SECTION&XenoServers -BREADCRUMB&Virtual Disk Manager&vd.jsp - -<!-- content --> -<img src="pixel.gif" class="block" width="1" height="12"> - -<table cellpadding="0" cellspacing="0" border="0"> -<tbody> -INCLUDE&vdmenu.tmpl -<td valign="top"> - -<table cellpadding="0" cellspacing="0" border="0"> -<tbody> - -<tr><td> -Not currently implemented. -</td></tr> - -##WHITESPACE## ##GREYLINE1## ##WHITESPACE## - -</td> -</tbody> -</table> - -</td> -</tbody> -</table> - - - - -<!-- end content --> diff --git a/tools/control/web/tmpl/vd-vbdf.tmpl b/tools/control/web/tmpl/vd-vbdf.tmpl deleted file mode 100644 index eb46b158d6..0000000000 --- a/tools/control/web/tmpl/vd-vbdf.tmpl +++ /dev/null @@ -1,66 +0,0 @@ -Flush Virtual Block Devices -SECTION&XenoServers -BREADCRUMB&Virtual Disk Manager&vd.jsp - -<!-- content --> -<img src="pixel.gif" class="block" width="1" height="12"> - -<table cellpadding="0" cellspacing="0" border="0"> -<tbody> -INCLUDE&vdmenu.tmpl -<td valign="top"> - -<form method="post" action="vd-vbdfr.jsp"> -<table cellpadding="0" cellspacing="0" border="0"> -<tbody> - -<tr><td> -<table cellpadding="2" cellspacing="0" border="0"> -<tbody> - <tr class="vdh"><td>vd key</td><td>dom</td><td>vbd</td><td>mode</td></tr> - - <% - for (Iterator i = root.vdm().getVirtualBlockDevices(); i.hasNext();) - { - VirtualBlockDevice vbd = (VirtualBlockDevice) i.next(); - VirtualDisk vd = vbd.getVirtualDisk(); - %> - <tr class="vdt"> - <td><%= vd.getKey() %></td> - <td><%= vbd.getDomain() %></td> - <td><%= vbd.getVbdNum() %></td> - <td><%= vbd.getMode().toString() %></td> - </tr> - <% - } - %> - -</tbody> -</table> -</td></tr> - -##WHITESPACE## ##GREYLINE1## ##WHITESPACE## - -<tr> - <td><font color="red">Warning, this will remove all virtual block devices</font></td> -</tr> - -<tr> - <td><input type="submit" value="flush all vbds"></td> -</tr> - -</td> -</tbody> -</table> - -</form> - - -</td> -</tbody> -</table> - - - - -<!-- end content --> diff --git a/tools/control/web/tmpl/vd-vbdfr.tmpl b/tools/control/web/tmpl/vd-vbdfr.tmpl deleted file mode 100644 index 0d172923bd..0000000000 --- a/tools/control/web/tmpl/vd-vbdfr.tmpl +++ /dev/null @@ -1,32 +0,0 @@ -Flush Virtual Block Devices -SECTION&XenoServers -BREADCRUMB&Virtual Disk Manager&vd.jsp - -<!-- content --> -<img src="pixel.gif" class="block" width="1" height="12"> - -<table cellpadding="0" cellspacing="0" border="0"> -<tbody> -INCLUDE&vdmenu.tmpl -<td valign="top"> - -<b>Flush Virtual Block Device Results</b> -<br> - - -<% - HttpServletRequestWrapper hsrw = new HttpServletRequestWrapper(request); -%> -output = <%= new CommandVbdFlush().execute() %> -<% - root.doFlushState(); -%> - -</td> -</tbody> -</table> - - - - -<!-- end content --> diff --git a/tools/control/web/tmpl/vd-vbdv.tmpl b/tools/control/web/tmpl/vd-vbdv.tmpl index 6a0a03947c..d9e0a0d9ea 100644 --- a/tools/control/web/tmpl/vd-vbdv.tmpl +++ b/tools/control/web/tmpl/vd-vbdv.tmpl @@ -9,16 +9,26 @@ BREADCRUMB&Virtual Disk Manager&vd.jsp <tbody> INCLUDE&vdmenu.tmpl <td valign="top"> - +<% + CommandVbdList list = new CommandVbdList(); + String output = list.executeWeb(); + VirtualBlockDevice[] vbds = list.vbds(); + if (output != null) + { +%> +<%= output %> +<% + } else { +%> <table cellpadding="2" cellspacing="0" border="0"> <tbody> <tr class="vdh"><td>dom</td><td>vbd</td><td>mode</td><td>vd key</td><td>vd name</td></tr> <% - for (Iterator i = root.vdm().getVirtualBlockDevices(); i.hasNext();) + for (int i=0;i<vbds.length;i++) { - VirtualBlockDevice vbd = (VirtualBlockDevice) i.next(); + VirtualBlockDevice vbd = vbds[i]; VirtualDisk vd = vbd.getVirtualDisk(); %> <tr class="vdt"> @@ -33,6 +43,9 @@ INCLUDE&vdmenu.tmpl %> </tbody> </table> +<% + } +%> </td> </tbody> diff --git a/tools/control/web/tmpl/vd-vdcr.tmpl b/tools/control/web/tmpl/vd-vdcr.tmpl index 9550407a1b..bb68cb7bed 100644 --- a/tools/control/web/tmpl/vd-vdcr.tmpl +++ b/tools/control/web/tmpl/vd-vdcr.tmpl @@ -64,7 +64,7 @@ Error: expiry time not specified.<br> expiry += System.currentTimeMillis(); %> output =<br> -<%= new CommandVdCreate( hsrw.getParameter("name"), Library.parseSize(size), new Date(expiry)).execute() %> +<%= new CommandVdCreate( hsrw.getParameter("name"), Library.parseSize(size), new Date(expiry)).executeWeb() %> <br> <% } diff --git a/tools/control/web/tmpl/vd-vddr.tmpl b/tools/control/web/tmpl/vd-vddr.tmpl index 355c111e81..c7926bad12 100644 --- a/tools/control/web/tmpl/vd-vddr.tmpl +++ b/tools/control/web/tmpl/vd-vddr.tmpl @@ -18,7 +18,7 @@ INCLUDE&vdmenu.tmpl vd= <%= hsrw.getParameter("vd") %> -vd= <%= new CommandVdDelete(hsrw.getParameter("vd")).execute() %> +vd= <%= new CommandVdDelete(hsrw.getParameter("vd"),false).executeWeb() %> <% root.doFlushState(); diff --git a/tools/control/web/tmpl/vd-vdrr.tmpl b/tools/control/web/tmpl/vd-vdrr.tmpl index bca0dccf87..c7f56896e7 100644 --- a/tools/control/web/tmpl/vd-vdrr.tmpl +++ b/tools/control/web/tmpl/vd-vdrr.tmpl @@ -56,7 +56,7 @@ Error: expiry time not specified.<br> for (int i = 0; i < vds.length; i++) { %> -vd = <%= new CommandVdRefresh(vds[i], new Date(expiry)).execute() %> <br> +vd = <%= new CommandVdRefresh(vds[i], new Date(expiry)).executeWeb() %> <br> <% } } diff --git a/tools/control/web/tmpl/vdmenu.tmpl b/tools/control/web/tmpl/vdmenu.tmpl index 20cb5ecf6f..0d0f82219d 100644 --- a/tools/control/web/tmpl/vdmenu.tmpl +++ b/tools/control/web/tmpl/vdmenu.tmpl @@ -45,12 +45,6 @@ <tr> <td class="sidemenu" width="100"><a href="vd-vbdc.jsp">Create</a></td> </tr> -<tr> - <td class="sidemenu" width="100"><a href="vd-vbdd.jsp">Delete</a></td> -</tr> -<tr> - <td class="sidemenu" width="100"><a href="vd-vbdf.jsp">Flush</a></td> -</tr> </tbody> </table> |