bitkeeper revision 1.319.1.1 (3f0c3b96o9tI7VUO855zQI34KKV7Ew)

Update web interface and its build scripts to work with the new control interface; all domain control stuff has been ported. No VD stuff works yet.
This commit is contained in:
rac61@labyrinth.cl.cam.ac.uk committed 2003-07-09 15:58:14 +00:00
1 parent 29dfabc6f7
commit 3b29584f2d
22 files changed
+332 -511

No files matched your search

+3 -4
View File
@@ -9,7 +9,7 @@
3eb781edFwm_pW9FwnQACIe68viLOw tools/control/Makefile
3eca6a96a31IwaKtkEa4jmzwTWlm8Q tools/control/README-xenctl
3eb781fceEYkUi1XHKf2V0KX7si2JA tools/control/build-cmdline.xml
3ec41f7cWCxQ8pdH8ZWqhhv-38qQ1w tools/control/build-xen.xml
3ec41f7cWCxQ8pdH8ZWqhhv-38qQ1w tools/control/build-web.xml
3ec41f7ca6IBXDSe0HVcMPp3PPloOQ tools/control/build.properties
3ec4ebe0g_MI1VqkbbyNB8gt6m0Adg tools/control/docs/empty_dir
3eb781fcabCKRogwxJA3-jJKstw9Vg tools/control/domctl.xml
@@ -70,8 +70,8 @@
3ec41f7dKX9YpwrfH7BZ7BogyWqqLA tools/control/src/org/xenoserver/control/VirtualDiskManager.java
3ec41f7dUPpYTwYL5QVpRBv6PLKPrg tools/control/src/org/xenoserver/control/XML.java
3ec41f7d7Try-2zmfnpaALwJjY0GCA tools/control/src/org/xenoserver/control/XMLHelper.java
3ec41f7dOVZgjP4sQS6vjuBnExdlMQ tools/control/src/uk/ac/cam/cl/xeno/xenctl/RootBean.java
3ec41f7dvPdszb0frNEkMnEdJUBVjA tools/control/src/uk/ac/cam/cl/xeno/xenctl/SystemConfigurationBean.java
3ec41f7dOVZgjP4sQS6vjuBnExdlMQ tools/control/src/org/xenoserver/web/RootBean.java
3ec41f7dvPdszb0frNEkMnEdJUBVjA tools/control/src/org/xenoserver/web/SystemConfigurationBean.java
3ec41f7dO6IuKGGLG4VRUhMDmkTn5g tools/control/web/WEB-INF/web.xml
3ec41f7dRAPXBA0jQUd1k6MB3xVidg tools/control/web/img/cambridge.gif
3ec41f7dvxVe1Vb3kVOLZcN5Jra2tQ tools/control/web/img/help.gif
@@ -95,7 +95,6 @@
3ec41f7eTqbaFqMGU7lJG09vlEt0TQ tools/control/web/tmpl/index.tmpl
3ec41f7ed6_QZ1mg0vuA9Xu1wu1plw tools/control/web/tmpl/install.pl
3ec41f7emmAnjM4gsW6JWkqsjfi4Rg tools/control/web/tmpl/makefile
3ec41f7eGeQD-tCpxZNxNVcnKt6HfA tools/control/web/tmpl/newdom.tmpl
3ec41f7eoDHD2raa4x6dBINr4QLO3A tools/control/web/tmpl/vd-fv.tmpl
3ec41f7eawycxV05Ow3LfZtOlHZJPA tools/control/web/tmpl/vd-pa.tmpl
3ec41f7ef4mVT4vwOEL40MKIzS4EeA tools/control/web/tmpl/vd-par.tmpl
+2
View File
@@ -436,3 +436,5 @@ xen/drivers/block/xen_physdisk.c~
tools/internal/xi_phys_grant.c~
tools/internal/xi_phys_probe.c~
tools/internal/xi_phys_revoke.c~
tools/control/dist-web/**
tools/control/build-web/**
+11 -13
View File
@@ -1,8 +1,8 @@
default: cmdline
default: cmdline web
install: install-cmdline
install: install-cmdline install-web
clean: clean-cmdline
clean: clean-cmdline clean-web
@@ -19,17 +19,15 @@ clean-cmdline:
xenctl: FORCE
(cd web/tmpl; make)
ant -buildfile build-xen.xml dist
web: FORCE
ant -buildfile build-web.xml dist
install-xenctl: xenctl
-ant -buildfile build-xen.xml remove
ant -buildfile build-xen.xml install
install-web: xenctl
ant -buildfile build-web.xml remove || true
ant -buildfile build-web.xml install
clean-xenctl:
(cd web/tmpl; make clean)
ant -buildfile build-xen.xml clean
rm -f xenctl.jar
clean-web:
ant -buildfile build-web.xml clean
rm -f xenctl-web.jar
FORCE:
@@ -30,7 +30,7 @@
set to the current working directory.
-->
<project name="My Project" default="compile" basedir=".">
<project name="xenctl web interface" default="compile" basedir=".">
@@ -112,9 +112,9 @@
<property name="app.name" value="myapp"/>
<property name="app.path" value="/${app.name}"/>
<property name="app.version" value="0.1-dev"/>
<property name="build.home" value="${basedir}/build"/>
<property name="build.home" value="${basedir}/build-web"/>
<property name="catalina.home" value="../../../.."/> <!-- UPDATE THIS! -->
<property name="dist.home" value="${basedir}/dist"/>
<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"/>
@@ -261,6 +261,7 @@
description="Delete old build and dist directories">
<delete dir="${build.home}"/>
<delete dir="${dist.home}"/>
<exec executable="make" dir="${web.home}/tmpl"><arg value="clean"/></exec>
</target>
@@ -287,6 +288,8 @@
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<classpath refid="compile.classpath"/>
<include name="org/xenoserver/control/**"/>
<include name="org/xenoserver/web/**"/>
</javac>
<!-- Copy application resources -->
@@ -314,7 +317,7 @@
-->
<target name="dist" depends="compile,javadoc"
<target name="dist" depends="compile"
description="Create binary distribution">
<!-- Copy documentation subdirectories -->
@@ -432,6 +435,8 @@
<mkdir dir="${build.home}/WEB-INF"/>
<mkdir dir="${build.home}/WEB-INF/classes"/>
<!-- create templates -->
<exec executable="make" dir="${web.home}/tmpl"/>
<!-- Copy static content of this web application -->
<copy todir="${build.home}">
@@ -14,6 +14,19 @@ public abstract class Command {
* @throws CommandFailedException if the command could not be completed.
*/
public abstract String execute() throws CommandFailedException;
/**
* Wraps execute() suitable for the web interface: all exceptions are
* converted into output strings.
* @return Output string, whether command succeeded or not.
*/
public String executeWeb() {
try {
return execute();
} catch (CommandFailedException e) {
return e.getMessage();
}
}
/**
* Construct a string to report the execution of a command.
@@ -0,0 +1,174 @@
/*
* RootBean.java
* 03.05.05 aho creation
*/
package org.xenoserver.web;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;
import org.xenoserver.control.PartitionManager;
import org.xenoserver.control.Settings;
import org.xenoserver.control.VirtualDiskManager;
import org.xenoserver.control.XML;
public class RootBean implements HttpSessionBindingListener {
static String state_filename_out = "/var/lib/xen/vdstate.xml";
static String partition_filename = "/proc/partitions";
static int default_sector_size = 512;
PartitionManager pm;
VirtualDiskManager vdm;
public RootBean() {
valueBound(null);
}
public void valueBound(HttpSessionBindingEvent event) {
pm = PartitionManager.IT;
vdm = VirtualDiskManager.IT;
XML.loadState(pm, vdm, Settings.STATE_INPUT_FILE);
}
public void valueUnbound(HttpSessionBindingEvent event) {
doFlushState();
}
/*
public int getPartitionCount() {
return pm.getPartitionCount();
}
public Partition getPartition(int index) {
return pm.getPartition(index);
}
public String doAddPartition(String partition, String chunksize) {
Partition p = pm.get_partition(partition);
String result = "done";
int loop;
long size;
if (p == null) {
return (" eh? what partition: " + partition);
}
size = Library.parse_size(chunksize) / default_sector_size;
if (size == 0) {
return ("error: invalid chunk size");
}
vdm.add_xeno_partition(p, size);
pm.add_xeno_partition(p);
return "done";
}
public int getVirtualDiskCount() {
return vdm.getVirtualDiskCount();
}
public VirtualDisk getVirtualDisk(int index) {
return vdm.getVirtualDisk(index);
}
public VirtualDisk getVirtualDiskKey(String key) {
return vdm.get_virtual_disk_key(key);
}
public String doCreateVirtualDisk(String name, String size, long expiry) {
VirtualDisk vd;
Date date = new Date();
long parse_size;
parse_size = Library.parse_size(size) / default_sector_size;
if (parse_size == 0) {
return ("error: invalid size");
}
vd =
vdm.create_virtual_disk(
name,
parse_size,
new Date(date.getTime() + expiry));
return ("Virtual Disk created with key: " + vd.get_key());
}
public String doDeleteVirtualDisk(String key) {
if (key == null || key.trim().equals("")) {
return ("error: no virtual disk specified");
}
vdm.delete_virtual_disk(key);
return ("okay");
}
public String doRefreshVirtualDisk(String key, long expiry) {
VirtualDisk vd = vdm.get_virtual_disk_key(key);
Date date;
String s = "";
if (vd == null) {
return ("disk not found: " + key);
}
s = vd.get_expiry().toString();
date = new Date(vd.get_expiry().getTime() + expiry);
vd.set_expiry(date);
return ("okay " + expiry + " " + s + " " + date.toString());
}
public int getFreeExtentCount() {
VirtualDisk free = vdm.getFreeVirtualDisk();
return free.getExtentCount();
}
public Extent getFreeExtent(int index) {
VirtualDisk free = vdm.getFreeVirtualDisk();
return free.getExtent(index);
}
public Enumeration getVirtualBlockDevices() {
return vdm.getVirtualBlockDevices();
}
public String doCreateVirtualBlockDevice(
String vd_key,
int domain,
int vbd_num,
String mode) {
VirtualBlockDevice vbd;
VirtualDisk vd;
vbd = vdm.create_virtual_block_device(vd_key, domain, vbd_num, mode);
if (vbd != null) {
String command;
FileWriter fw;
vd = vdm.get_virtual_disk_key(vd_key);
command = vd.dump_xen(vbd);
try {
fw = new FileWriter("/proc/xeno/dom0/vhd");
fw.write(command);
fw.flush();
fw.close();
} catch (Exception e) {
return (e.toString());
}
return command;
} else {
return "Error encountered";
}
}
public String doFlushVirtualBlockDevices() {
vdm.flush_virtual_block_devices();
return "done";
}
*/
public void doFlushState() {
XML.saveState(pm, vdm, Settings.STATE_OUTPUT_FILE);
}
}
@@ -0,0 +1,20 @@
/*
* SystemConfigurationBean.java
* 03.05.06 aho creation
*/
package org.xenoserver.web;
import org.xenoserver.control.Defaults;
public class SystemConfigurationBean {
private Defaults defaults;
public SystemConfigurationBean() {
defaults = new Defaults();
}
public Defaults getDefaults() {
return defaults;
}
}
@@ -1,239 +0,0 @@
/*
* RootBean.java
* 03.05.05 aho creation
*/
package uk.ac.cam.cl.xeno.xenctl;
import java.io.FileWriter;
import java.util.Date;
import java.util.Enumeration;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;
public class
RootBean
implements HttpSessionBindingListener
{
static String state_filename_in = "/var/lib/xen/vdstate.xml";
static String state_filename_out = "/var/lib/xen/vdstate.xml";
static String partition_filename = "/proc/partitions";
static int default_sector_size = 512;
PartitionManager pm;
VirtualDiskManager vdm;
int counter = 0;
public
RootBean ()
{
valueBound(null);
}
public void
valueBound (HttpSessionBindingEvent event)
{
pm = new PartitionManager(partition_filename);
vdm = new VirtualDiskManager();
XML.load_state(pm, vdm, state_filename_in);
}
public void
valueUnbound (HttpSessionBindingEvent event)
{
doFlushState();
}
public int
getDebugCounter()
{
return counter++;
}
/*************************************************************************/
public int
getPartitionCount()
{
return pm.getPartitionCount();
}
public Partition
getPartition(int index)
{
return pm.getPartition(index);
}
public String
doAddPartition(String partition, String chunksize )
{
Partition p = pm.get_partition(partition);
String result="done";
int loop;
long size;
if (p == null)
{
return (" eh? what partition: " + partition);
}
size = Library.parse_size(chunksize) / default_sector_size;
if (size == 0)
{
return ("error: invalid chunk size");
}
vdm.add_xeno_partition(p, size);
pm.add_xeno_partition(p);
/* return pm.dump(true); */
return "done";
}
/*************************************************************************/
public int
getVirtualDiskCount ()
{
return vdm.getVirtualDiskCount();
}
public VirtualDisk
getVirtualDisk (int index)
{
return vdm.getVirtualDisk(index);
}
public VirtualDisk
getVirtualDiskKey (String key)
{
return vdm.get_virtual_disk_key(key);
}
public String
doCreateVirtualDisk (String name, String size, long expiry)
{
VirtualDisk vd;
Date date = new Date();
long parse_size;
parse_size = Library.parse_size(size)/default_sector_size;
if (parse_size == 0)
{
return ("error: invalid size");
}
vd = vdm.create_virtual_disk(name, parse_size,
new Date(date.getTime() + expiry));
return ("Virtual Disk created with key: " + vd.get_key());
}
public String
doDeleteVirtualDisk (String key)
{
if (key == null ||
key.trim().equals(""))
{
return ("error: no virtual disk specified");
}
vdm.delete_virtual_disk(key);
return ("okay");
}
public String
doRefreshVirtualDisk (String key, long expiry)
{
VirtualDisk vd = vdm.get_virtual_disk_key(key);
Date date;
String s = "";
if (vd == null)
{
return ("disk not found: " + key);
}
s = vd.get_expiry().toString();
date = new Date(vd.get_expiry().getTime() + expiry);
vd.set_expiry(date);
return ("okay " + expiry + " " + s + " " + date.toString());
}
/*************************************************************************/
public int
getFreeExtentCount ()
{
VirtualDisk free = vdm.getFreeVirtualDisk();
return free.getExtentCount();
}
public Extent
getFreeExtent (int index)
{
VirtualDisk free = vdm.getFreeVirtualDisk();
return free.getExtent(index);
}
/*************************************************************************/
public Enumeration
getVirtualBlockDevices ()
{
return vdm.getVirtualBlockDevices();
}
public String
doCreateVirtualBlockDevice (String vd_key, int domain,
int vbd_num, String mode)
{
VirtualBlockDevice vbd;
VirtualDisk vd;
vbd = vdm.create_virtual_block_device(vd_key, domain, vbd_num, mode);
if (vbd != null)
{
String command;
FileWriter fw;
vd = vdm.get_virtual_disk_key(vd_key);
command = vd.dump_xen(vbd);
try
{
fw = new FileWriter("/proc/xeno/dom0/vhd");
fw.write(command);
fw.flush();
fw.close();
}
catch (Exception e)
{
return (e.toString());
}
return command;
}
else
{
return "Error encountered";
}
}
public String
doFlushVirtualBlockDevices()
{
vdm.flush_virtual_block_devices();
return "done";
}
/*************************************************************************/
public void
doFlushState ()
{
XML.dump_state(pm, vdm, state_filename_out);
}
}
@@ -1,30 +0,0 @@
/*
* SystemConfigurationBean.java
* 03.05.06 aho creation
*/
package uk.ac.cam.cl.xeno.xenctl;
import java.io.*;
import java.lang.Process;
import java.lang.Runtime;
import uk.ac.cam.cl.xeno.domctl.Defaults;
public class
SystemConfigurationBean
{
Defaults defaults;
public
SystemConfigurationBean ()
{
defaults = new Defaults();
}
public Defaults
getDefaults ()
{
return defaults;
}
}
+13 -3
View File
@@ -15,9 +15,15 @@ INCLUDE&dommenu.tmpl
<tbody>
<tr><td>
<%
CommandList command_list = new CommandList();
Defaults d = sc.getDefaults();
Domain domains[] = command_list.executeCommand(d);
CommandDomainList list = new CommandDomainList(sc.getDefaults());
String output = list.executeWeb();
Domain domains[] = list.domains();
if (output != null)
{
%>
<%= output %>
<%
} else {
%>
<table cellpadding="2" cellspacing="0" border="0">
@@ -45,6 +51,10 @@ INCLUDE&dommenu.tmpl
</table>
</td></tr>
<%
}
%>
##WHITESPACE## ##GREYLINE1## ##WHITESPACE##
<tr><td>
+2 -3
View File
@@ -17,7 +17,6 @@ INCLUDE&dommenu.tmpl
<%
HttpServletRequestWrapper hsrw = new HttpServletRequestWrapper(request);
Defaults d = sc.getDefaults();
CommandDestroy command_destroy = new CommandDestroy();
String domains[] = hsrw.getParameterValues("dom");
boolean force = hsrw.getParameter("force").equals("true");
@@ -34,8 +33,8 @@ Error: no domain specified.<br>
{
%>
result <%= domains[i] %> =
<%= command_destroy.executeCommand(d, Integer.parseInt(domains[i]),
force) %> <br>
<%= new CommandDomainDestroy(d, Integer.parseInt(domains[i]),
force).executeWeb() %> <br>
<%
}
}
+12 -4
View File
@@ -11,9 +11,15 @@ INCLUDE&dommenu.tmpl
<td valign="top">
<%
CommandList command_list = new CommandList();
Defaults d = sc.getDefaults();
Domain domains[] = command_list.executeCommand(d);
CommandDomainList list = new CommandDomainList(sc.getDefaults());
String output = list.executeWeb();
Domain domains[] = list.domains();
if (output != null)
{
%>
<%= output %>
<%
} else {
%>
<table cellpadding="2" cellspacing="0" border="0">
@@ -38,7 +44,9 @@ INCLUDE&dommenu.tmpl
%>
</tbody>
</table>
<%
}
%>
</td>
</tbody>
+9 -9
View File
@@ -95,19 +95,19 @@ INCLUDE&dommenu.tmpl
<td></td> <td></td>
<td class="block" align="right">IP address</td>
<td></td>
<td> <input type="text" size="15" name="ip" value="<%= d.NWIP %>"> </td>
<td> <input type="text" size="15" name="ip" value="<%= d.nwIP %>"> </td>
</tr>
<tr>
<td></td> <td></td>
<td class="block" align="right">Gateway</td>
<td></td>
<td> <input type="text" size="15" name="gw" value="<%= d.NWGW %>"> </td>
<td> <input type="text" size="15" name="gw" value="<%= d.nwGateway %>"> </td>
</tr>
<tr>
<td></td> <td></td>
<td class="block" align="right">Netmask</td>
<td></td>
<td> <input type="text" size="15" name="mask" value="<%= d.NWMask %>"> </td>
<td> <input type="text" size="15" name="mask" value="<%= d.nwMask %>"> </td>
</tr>
##WHITESPACE## ##GREYLINE14## ##WHITESPACE##
@@ -121,11 +121,11 @@ INCLUDE&dommenu.tmpl
<tr>
<td></td>
<td align="right">NFS<input type="radio" name="root" value="nfs"></td>
<td align="right">NFS<input type="radio" checked name="root" value="nfs"></td>
<td align="right">path</td>
<td></td>
<td>
<input type="text" size="40" name="nfsroot" value="<%= d.NWNFSRoot %>">
<input type="text" size="40" name="nfsroot" value="<%= d.nwNFSRoot %>">
</td>
</tr>
<tr>
@@ -133,7 +133,7 @@ INCLUDE&dommenu.tmpl
<td align="right">server</td>
<td></td>
<td>
<input type="text" size="15" name="nfsserver" value="<%= d.NWNFSServer%>">
<input type="text" size="15" name="nfsserver" value="<%= d.nwNFSServer%>">
</td>
</tr>
##WHITESPACE##
@@ -143,13 +143,13 @@ INCLUDE&dommenu.tmpl
<td align="right">path</td>
<td></td>
<td>
<input type="text" size="40" name="rd" value="/usr/isolinux/initrd.gz">
<input type="text" size="40" name="rd" value="<%= d.domainInitRD %>">
</td>
</tr>
##WHITESPACE##
<tr>
<td></td>
<td align="right">physical disk<input type="radio" checked name="root" value="pdisk"></td>
<td align="right">physical disk<input type="radio" name="root" value="pdisk"></td>
<td align="right">path</td>
<td></td>
<td><input type="text" size="40" name="pdisk" value="/dev/sda8"></td>
@@ -172,7 +172,7 @@ INCLUDE&dommenu.tmpl
<td></td>
<td colspan=2 align="right"></td>
<td></td>
<td> <input type="text" size="40" name="args" value="ro"> </td>
<td> <input type="text" size="40" name="args" value="<%= d.args %>"> </td>
</tr>
+17 -4
View File
@@ -16,7 +16,6 @@ INCLUDE&dommenu.tmpl
<%
HttpServletRequestWrapper hsrw = new HttpServletRequestWrapper(request);
Defaults d = sc.getDefaults();
CommandNew command_new = new CommandNew();
String root_device = hsrw.getParameter("root");
String nfsroot = null;
@@ -73,8 +72,9 @@ nw_host = <%= hsrw.getParameter("hostname") %>
<br>
root = <%= disk %>
<br>
output = <br><%=
command_new.executeCommand(d,
output = <br>
<%
CommandDomainNew command_new = new CommandDomainNew(d,
hsrw.getParameter("name"),
Integer.parseInt(hsrw.getParameter("size")),
hsrw.getParameter("image"),
@@ -87,7 +87,20 @@ output = <br><%=
hsrw.getParameter("gw"),
hsrw.getParameter("mask"),
nfsserver,
hsrw.getParameter("hostname"))
hsrw.getParameter("hostname"));
String oneline = command_new.executeWeb();
if ( oneline != null ) {
%>
<%= oneline %><br>
<%
} else {
String[] output = command_new.output();
for (int i = 0; i < output.length; i++) {
%>
<%= output[i] %><br>
<%
}
}
%>
</td>
+12 -3
View File
@@ -15,9 +15,15 @@ INCLUDE&dommenu.tmpl
<tbody>
<tr><td>
<%
CommandList command_list = new CommandList();
Defaults d = sc.getDefaults();
Domain domains[] = command_list.executeCommand(d);
CommandDomainList list = new CommandDomainList(sc.getDefaults());
String output = list.executeWeb();
Domain domains[] = list.domains();
if (output != null)
{
%>
<%= output %>
<%
} else {
%>
<table cellpadding="2" cellspacing="0" border="0">
@@ -44,6 +50,9 @@ INCLUDE&dommenu.tmpl
</tbody>
</table>
</td></tr>
<%
}
%>
##WHITESPACE## ##GREYLINE1## ##WHITESPACE##
+2 -3
View File
@@ -17,7 +17,6 @@ INCLUDE&dommenu.tmpl
<%
HttpServletRequestWrapper hsrw = new HttpServletRequestWrapper(request);
Defaults d = sc.getDefaults();
CommandStart command_start = new CommandStart();
String domains[] = hsrw.getParameterValues("dom");
@@ -32,8 +31,8 @@ Error: no domain specified.<br>
for (int i = 0; i < domains.length; i++)
{
%>
result <%= domains[i] %> =<br>
<%= command_start.executeCommand(d, Integer.parseInt(domains[i])) %> <br>
result <%= domains[i] %> =
<%= new CommandDomainStart(d, Integer.parseInt(domains[i])).executeWeb() %><br>
<%
}
}
+12 -3
View File
@@ -15,9 +15,15 @@ INCLUDE&dommenu.tmpl
<tbody>
<tr><td>
<%
CommandList command_list = new CommandList();
Defaults d = sc.getDefaults();
Domain domains[] = command_list.executeCommand(d);
CommandDomainList list = new CommandDomainList(sc.getDefaults());
String output = list.executeWeb();
Domain domains[] = list.domains();
if (output != null)
{
%>
<%= output %>
<%
} else {
%>
<table cellpadding="2" cellspacing="0" border="0">
@@ -44,6 +50,9 @@ INCLUDE&dommenu.tmpl
</tbody>
</table>
</td></tr>
<%
}
%>
##WHITESPACE## ##GREYLINE1## ##WHITESPACE##
+1 -2
View File
@@ -17,7 +17,6 @@ INCLUDE&dommenu.tmpl
<%
HttpServletRequestWrapper hsrw = new HttpServletRequestWrapper(request);
Defaults d = sc.getDefaults();
CommandStop command_stop = new CommandStop();
String domains[] = hsrw.getParameterValues("dom");
@@ -33,7 +32,7 @@ Error: no domain specified.<br>
{
%>
result <%= domains[i] %> =
<%= command_stop.executeCommand(d, Integer.parseInt(domains[i])) %> <br>
<%= new CommandDomainStop(d, Integer.parseInt(domains[i])).executeWeb() %><br>
<%
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ INCLUDE&dommenu.tmpl
<tr><td nowrap="nowrap">Domain Manager</td></tr>
<tr><td></td></tr>
<!--
<tr><td><%= d.XIToolsDir %></td></tr>
<tr><td><%= d.xiToolsDir %></td></tr>
-->
</tbody>
</table>
+13 -8
View File
@@ -1,5 +1,5 @@
src0 = xenostyle.css
src1 = index.jsp newdom.jsp about.jsp help.jsp vd.jsp \
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 \
@@ -7,7 +7,8 @@ src1 = index.jsp newdom.jsp about.jsp help.jsp vd.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
target = ..
target1 = $(target)/index.jsp $(target)/newdom.jsp $(target)/vd.jsp \
target0 = $(target)/xenostyle.css
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 \
@@ -22,14 +23,18 @@ target1 = $(target)/index.jsp $(target)/newdom.jsp $(target)/vd.jsp \
.SUFFIXES: .tmpl .jsp
.tmpl.jsp:
./install.pl $*
all: $(target1) $(target0)
all: $(src0) $(src1)
$(target)/index.jsp: index.tmpl
./install.pl -s -home index
mv *.jsp $(target)
mv index.jsp $(target)
$(target)/%.jsp: %.tmpl
./install.pl $*
mv $*.jsp $(target)
$(target0): $(src0)
cp -f $(src0) $(target)
clean:
rm -f $(target1)
rm -f $(target)/$(src0)
rm -f $(target1) $(target0)
-172
View File
@@ -1,172 +0,0 @@
New Domain
SECTION&XenoServers
<!-- content -->
<img src="pixel.gif" class="block" width="1" height="12">
<form>
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td width="50"></td>
<td></td>
<td></td>
<td width="7"></td>
<td></td>
</tr>
<tr>
<td></td>
<td class="block" colspan=4><b>Create A New Domain</b></td>
</tr>
##WHITESPACE## ##GREYLINE14## ##WHITESPACE##
<tr>
<td></td>
<td class="block" colspan=4>Memory Size</td>
</tr>
<tr>
<td></td> <td></td> <td></td> <td></td>
<td> <input type="text" size="5" value="64"> MB </td>
</tr>
##WHITESPACE## ##GREYLINE14## ##WHITESPACE##
<tr>
<td></td>
<td class="block" colspan=4>Kernel Image</td>
</tr>
<tr>
<td></td>
<td colspan=2 align="right">path</td>
<td></td>
<td> <input type="text" size="40" value="/usr/src/xeno/install/xenolinux.gz"> </td>
</tr>
##WHITESPACE## ##GREYLINE14## ##WHITESPACE##
<tr>
<td></td>
<td class="block" colspan=4>IP Config</td>
</tr>
<tr>
<td></td> <td></td>
<td class="block" align="right">IP address</td>
<td></td>
<td> <input type="text" size="15" value="128.232.35.202"> </td>
</tr>
<tr>
<td></td> <td></td>
<td class="block" align="right">Gateway</td>
<td></td>
<td> <input type="text" size="15" value="128.232.32.1"> </td>
</tr>
<tr>
<td></td> <td></td>
<td class="block" align="right">Netmask</td>
<td></td>
<td> <input type="text" size="15" value="255.255.240.0"> </td>
</tr>
<tr>
<td></td> <td></td>
<td class="block" align="right">New Name</td>
<td></td>
<td> <input type="text" size="15"> </td>
</tr>
##WHITESPACE## ##GREYLINE14## ##WHITESPACE##
<tr>
<td></td>
<td class="block" colspan=2>Root File System</td>
</tr>
##WHITESPACE##
<tr>
<td></td>
<td align="right">NFS<input type="radio" name="root" value="nfs"></td>
<td align="right">path</td>
<td></td>
<td><input type="text" size="40" value="/usr/groups/xeno/srgboot/mousetrap/root0"></td>
</tr>
<tr>
<td></td> <td></td>
<td align="right">server</td>
<td></td>
<td><input type="text" size="15" value="128.232.32.20"></td>
</tr>
##WHITESPACE##
<tr>
<td></td>
<td align="right">ramdisk<input type="radio" name="root" value="ram"></td>
<td align="right">path</td>
<td></td>
<td><input type="text" size="40" value="/usr/isolinux/initrd.gz"></td>
</tr>
##WHITESPACE##
<tr>
<td></td>
<td align="right">raw partition<input type="radio" name="root" value="raw"></td>
<td align="right">path</td>
<td></td>
<td><input type="text" size="40" value="/dev/xsda8"></td>
</tr>
##WHITESPACE##
<tr>
<td></td>
<td align="right">virtual disk<input type="radio" checked name="root" value="virtual"></td>
<td align="right">path</td>
<td></td>
<td><input type="text" size="40" value="/dev/xvda0"></td>
</tr>
##WHITESPACE## ##GREYLINE14## ##WHITESPACE##
<tr>
<td></td>
<td class="block" colspan=4>Extra Arguments</td>
</tr>
<tr>
<td></td>
<td colspan=2 align="right"></td>
<td></td>
<td> <input type="text" size="40"> </td>
</tr>
##WHITESPACE## ##GREYLINE14## ##WHITESPACE##
<tr>
<td></td>
<td><input type="submit" value="refresh"></td>
</tr>
##WHITESPACE##
<tr>
<td></td>
<td colspan=4>
<textarea cols="60" rows="5" name="commandline">
When you press refresh, the sample command line shows
up here. The user has the option of editing it before
pressing execute below. e.g.
./newdom 16000 image 128.232.35.202 ip=128.232.35.202:128.232.32.20:128.232.32.1:255.255.240.0::eth0:off root=/dev/xsda9 ro
</textarea>
</td></tr>
##WHITESPACE##
<tr>
<td></td>
<td><input type="submit" value="execute"></td>
</tr>
</tbody>
</table>
</form>
<!-- end content -->
+6 -6
View File
@@ -1,13 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<jsp:useBean id="root" scope="application"
class="uk.ac.cam.cl.xeno.xenctl.RootBean" />
class="org.xenoserver.web.RootBean" />
<jsp:useBean id="sc" scope="application"
class="uk.ac.cam.cl.xeno.xenctl.SystemConfigurationBean" />
class="org.xenoserver.web.SystemConfigurationBean" />
<%@ page session="false" %>
<%@ page import="uk.ac.cam.cl.xeno.xenctl.*" %>
<%@ page import="uk.ac.cam.cl.xeno.domctl.*" %>
<%@ page import="java.util.Enumeration" %>
<%@ page import="org.xenoserver.web.*" %>
<%@ page import="org.xenoserver.control.*" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="javax.servlet.http.HttpServletRequestWrapper" %>
<html lang="en">
@@ -20,7 +20,7 @@
<head>
<title>##SECTION## ##SECTIONBREAK## ##TITLE## <%= root.getDebugCounter() %></title>
<title>##SECTION## ##SECTIONBREAK## ##TITLE##</title>
<link rel="stylesheet" type="text/css" href="xenostyle.css">
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.