Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss
Conflicts: core/src/com/cloud/server/ManagementServer.java server/src/com/cloud/server/ManagementServerImpl.java server/src/com/cloud/vm/UserVmManagerImpl.java
|
|
@ -16,3 +16,4 @@ cloud-*.tar.bz2
|
|||
*.log
|
||||
*.pyc
|
||||
build.number
|
||||
cloud.log.*.*
|
||||
|
|
|
|||
|
|
@ -48,4 +48,8 @@ public interface VlanDao extends GenericDao<VlanVO, Long> {
|
|||
|
||||
boolean zoneHasDirectAttachUntaggedVlans(long zoneId);
|
||||
|
||||
List<VlanVO> listZoneWideVlans(long zoneId, VlanType vlanType, String vlanId);
|
||||
|
||||
List<VlanVO> searchForZoneWideVlans(long dcId, String vlanType,String vlanId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
package com.cloud.dc.dao;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -33,19 +36,24 @@ import com.cloud.dc.Vlan.VlanType;
|
|||
import com.cloud.network.dao.IPAddressDao;
|
||||
import com.cloud.utils.Pair;
|
||||
import com.cloud.utils.component.ComponentLocator;
|
||||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
import com.cloud.utils.db.Transaction;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
|
||||
@Local(value={VlanDao.class})
|
||||
public class VlanDaoImpl extends GenericDaoBase<VlanVO, Long> implements VlanDao {
|
||||
|
||||
private final String FindZoneWideVlans = "SELECT * FROM vlan WHERE data_center_id=? and vlan_type=? and vlan_id!=? and id not in (select vlan_db_id from account_vlan_map)";
|
||||
|
||||
protected SearchBuilder<VlanVO> ZoneVlanIdSearch;
|
||||
protected SearchBuilder<VlanVO> ZoneSearch;
|
||||
protected SearchBuilder<VlanVO> ZoneTypeSearch;
|
||||
protected SearchBuilder<VlanVO> ZoneTypeAllPodsSearch;
|
||||
protected SearchBuilder<VlanVO> ZoneTypePodSearch;
|
||||
|
||||
protected SearchBuilder<VlanVO> ZoneVlanSearch;
|
||||
|
||||
protected PodVlanMapDaoImpl _podVlanMapDao = new PodVlanMapDaoImpl();
|
||||
protected AccountVlanMapDao _accountVlanMapDao = new AccountVlanMapDaoImpl();
|
||||
|
|
@ -80,8 +88,18 @@ public class VlanDaoImpl extends GenericDaoBase<VlanVO, Long> implements VlanDao
|
|||
ZoneTypeSearch.and("zoneId", ZoneTypeSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
|
||||
ZoneTypeSearch.and("vlanType", ZoneTypeSearch.entity().getVlanType(), SearchCriteria.Op.EQ);
|
||||
ZoneTypeSearch.done();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VlanVO> listZoneWideVlans(long zoneId, VlanType vlanType, String vlanId){
|
||||
SearchCriteria<VlanVO> sc = ZoneVlanSearch.create();
|
||||
sc.setParameters("zoneId", zoneId);
|
||||
sc.setParameters("vlanId", vlanId);
|
||||
sc.setParameters("vlanType", vlanType);
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VlanVO> listByZoneAndType(long zoneId, VlanType vlanType) {
|
||||
SearchCriteria<VlanVO> sc = ZoneTypeSearch.create();
|
||||
|
|
@ -254,5 +272,33 @@ public class VlanDaoImpl extends GenericDaoBase<VlanVO, Long> implements VlanDao
|
|||
return new Pair<String, VlanVO>(ipAddress, vlan);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@DB
|
||||
public List<VlanVO> searchForZoneWideVlans(long dcId, String vlanType, String vlanId){
|
||||
|
||||
StringBuilder sql = new StringBuilder(FindZoneWideVlans);
|
||||
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
PreparedStatement pstmt = null;
|
||||
try {
|
||||
pstmt = txn.prepareAutoCloseStatement(sql.toString());
|
||||
pstmt.setLong(1, dcId);
|
||||
pstmt.setString(2, vlanType);
|
||||
pstmt.setString(3, vlanId);
|
||||
|
||||
ResultSet rs = pstmt.executeQuery();
|
||||
List<VlanVO> zoneWideVlans = new ArrayList<VlanVO>();
|
||||
|
||||
while (rs.next()) {
|
||||
zoneWideVlans.add(toEntityBean(rs, false));
|
||||
}
|
||||
|
||||
return zoneWideVlans;
|
||||
} catch (SQLException e) {
|
||||
throw new CloudRuntimeException("Unable to execute " + pstmt.toString(), e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,6 @@ import com.cloud.host.Host.Type;
|
|||
import com.cloud.hypervisor.Hypervisor;
|
||||
import com.cloud.network.Network.BroadcastDomainType;
|
||||
import com.cloud.network.Network.TrafficType;
|
||||
import com.cloud.hypervisor.xen.resource.XenServerConnectionPool.XenServerConnection;
|
||||
import com.cloud.resource.ServerResource;
|
||||
import com.cloud.storage.Storage;
|
||||
import com.cloud.storage.Storage.ImageFormat;
|
||||
|
|
@ -282,7 +281,6 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
s_logger.debug("Logging out of " + _host.uuid);
|
||||
if (_host.pool != null) {
|
||||
_connPool.disconnect(_host.uuid, _host.pool);
|
||||
_host.pool = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -446,15 +444,26 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
}
|
||||
|
||||
protected boolean pingxenserver() {
|
||||
String status;
|
||||
status = callHostPlugin("vmops", "pingxenserver");
|
||||
|
||||
if (status == null || status.isEmpty()) {
|
||||
Session slaveSession = null;
|
||||
Connection slaveConn = null;
|
||||
try {
|
||||
URL slaveUrl = null;
|
||||
slaveUrl = new URL("http://" + _host.ip);
|
||||
slaveConn = new Connection(slaveUrl, 100);
|
||||
slaveSession = Session.slaveLocalLoginWithPassword(slaveConn, _username, _password);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
} finally {
|
||||
if( slaveSession != null ){
|
||||
try{
|
||||
Session.localLogout(slaveConn);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
slaveConn.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
protected String logX(XenAPIObject obj, String msg) {
|
||||
|
|
@ -2536,42 +2545,45 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
|
||||
|
||||
|
||||
public boolean joinPool(String address, String username, String password) {
|
||||
Connection conn = getConnection();
|
||||
public boolean joinPool(String masterIp, String username, String password) {
|
||||
Connection slaveConn = null;
|
||||
Connection poolConn = null;
|
||||
Session slaveSession = null;
|
||||
URL slaveUrl = null;
|
||||
|
||||
try {
|
||||
// set the _host.poolUuid to the old pool uuid in case it's not set.
|
||||
_host.pool = getPoolUuid();
|
||||
|
||||
// Connect and find out about the new connection to the new pool.
|
||||
poolConn = _connPool.connect(address, username, password, _wait);
|
||||
Map<Pool, Pool.Record> pools = Pool.getAllRecords(poolConn);
|
||||
Pool.Record pr = pools.values().iterator().next();
|
||||
|
||||
// Now join it.
|
||||
String masterAddr = pr.master.getAddress(poolConn);
|
||||
Pool.join(conn, masterAddr, username, password);
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Joined the pool at " + masterAddr);
|
||||
poolConn = _connPool.masterConnect(masterIp, username, password);
|
||||
//check if this host is already in pool
|
||||
Set<Host> hosts = Host.getAll(poolConn);
|
||||
for( Host host : hosts ) {
|
||||
if(host.getAddress(poolConn).equals(_host.ip)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
disconnected(); // Logout of our own session.
|
||||
|
||||
slaveUrl = new URL("http://" + _host.ip);
|
||||
slaveConn = new Connection(slaveUrl, 100);
|
||||
slaveSession = Session.slaveLocalLoginWithPassword(slaveConn, _username, _password);
|
||||
|
||||
// Now join it.
|
||||
|
||||
Pool.join(slaveConn, masterIp, username, password);
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Joined the pool at " + masterIp);
|
||||
}
|
||||
|
||||
try {
|
||||
// slave will restart xapi in 10 sec
|
||||
Thread.sleep(10000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
|
||||
// Set the pool uuid now to the newest pool.
|
||||
_host.pool = pr.uuid;
|
||||
URL url;
|
||||
try {
|
||||
url = new URL("http://" + _host.ip);
|
||||
} catch (MalformedURLException e1) {
|
||||
throw new CloudRuntimeException("Problem with url " + _host.ip);
|
||||
}
|
||||
Connection c = null;
|
||||
// check if the master of this host is set correctly.
|
||||
Connection c = new Connection(slaveUrl, 100);
|
||||
for (int i = 0; i < 15; i++) {
|
||||
c = new Connection(url, _wait);
|
||||
|
||||
try {
|
||||
Session.loginWithPassword(c, _username, _password, APIVersion.latest().toString());
|
||||
s_logger.debug("Still waiting for the conversion to the master");
|
||||
|
|
@ -2597,18 +2609,33 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (MalformedURLException e) {
|
||||
throw new CloudRuntimeException("Problem with url " + _host.ip);
|
||||
} catch (XenAPIException e) {
|
||||
String msg = "Unable to allow host " + _host.uuid + " to join pool " + address + " due to " + e.toString();
|
||||
String msg = "Unable to allow host " + _host.uuid
|
||||
+ " to join pool " + masterIp + " due to " + e.toString();
|
||||
s_logger.warn(msg, e);
|
||||
throw new RuntimeException(msg);
|
||||
} catch (XmlRpcException e) {
|
||||
String msg = "Unable to allow host " + _host.uuid + " to join pool " + address + " due to " + e.getMessage();
|
||||
String msg = "Unable to allow host " + _host.uuid
|
||||
+ " to join pool " + masterIp + " due to " + e.getMessage();
|
||||
s_logger.warn(msg, e);
|
||||
throw new RuntimeException(msg);
|
||||
} finally {
|
||||
if (poolConn != null) {
|
||||
XenServerConnectionPool.logout(poolConn);
|
||||
try {
|
||||
Session.logout(poolConn);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
poolConn.dispose();
|
||||
}
|
||||
if(slaveSession != null) {
|
||||
try {
|
||||
Session.localLogout(slaveConn);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3414,6 +3441,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String callHostPlugin(String plugin, String cmd, String... params) {
|
||||
//default time out is 300 s
|
||||
return callHostPluginWithTimeOut(plugin, cmd, 300, params);
|
||||
|
|
@ -3421,23 +3449,10 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
|
||||
protected String callHostPluginWithTimeOut(String plugin, String cmd, int timeout, String... params) {
|
||||
Map<String, String> args = new HashMap<String, String>();
|
||||
Session slaveSession = null;
|
||||
Connection slaveConn = null;
|
||||
try {
|
||||
URL slaveUrl = null;
|
||||
try {
|
||||
slaveUrl = new URL("http://" + _host.ip);
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
slaveConn = new Connection(slaveUrl, timeout);
|
||||
slaveSession = Session.slaveLocalLoginWithPassword(slaveConn, _username, _password);
|
||||
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Slave logon successful. session= " + slaveSession);
|
||||
}
|
||||
Host host = Host.getByUuid(slaveConn, _host.uuid);
|
||||
try {
|
||||
Connection conn = getConnection();
|
||||
|
||||
for (int i = 0; i < params.length; i += 2) {
|
||||
args.put(params[i], params[i + 1]);
|
||||
}
|
||||
|
|
@ -3445,8 +3460,10 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
if (s_logger.isTraceEnabled()) {
|
||||
s_logger.trace("callHostPlugin executing for command " + cmd + " with " + getArgsString(args));
|
||||
}
|
||||
|
||||
String result = host.callPlugin(slaveConn, plugin, cmd, args);
|
||||
if( _host.host == null ) {
|
||||
_host.host = Host.getByUuid(conn, _host.uuid);
|
||||
}
|
||||
String result = _host.host.callPlugin(conn, plugin, cmd, args);
|
||||
if (s_logger.isTraceEnabled()) {
|
||||
s_logger.trace("callHostPlugin Result: " + result);
|
||||
}
|
||||
|
|
@ -3455,13 +3472,6 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
s_logger.warn("callHostPlugin failed for cmd: " + cmd + " with args " + getArgsString(args) + " due to " + e.toString());
|
||||
} catch (XmlRpcException e) {
|
||||
s_logger.debug("callHostPlugin failed for cmd: " + cmd + " with args " + getArgsString(args) + " due to " + e.getMessage());
|
||||
} finally {
|
||||
if( slaveSession != null) {
|
||||
try {
|
||||
Session.localLogout(slaveConn);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -3941,7 +3951,6 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
|
||||
try {
|
||||
Host myself = Host.getByUuid(conn, _host.uuid);
|
||||
_host.pool = getPoolUuid();
|
||||
|
||||
boolean findsystemvmiso = false;
|
||||
Set<SR> srs = SR.getByNameLabel(conn, "XenServer Tools");
|
||||
|
|
@ -4198,9 +4207,6 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
cmd.setCluster(_cluster);
|
||||
|
||||
StartupStorageCommand sscmd = initializeLocalSR();
|
||||
|
||||
_host.pool = getPoolUuid();
|
||||
|
||||
if (sscmd != null) {
|
||||
/* report pv driver iso */
|
||||
getPVISO(sscmd);
|
||||
|
|
@ -4503,7 +4509,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
}
|
||||
|
||||
public Connection getConnection() {
|
||||
return _connPool.connect(_host.uuid, _host.ip, _username, _password, _wait);
|
||||
return _connPool.connect(_host.uuid, _host.pool, _host.ip, _username, _password, _wait);
|
||||
}
|
||||
|
||||
protected void fillHostInfo(StartupRoutingCommand cmd) {
|
||||
|
|
@ -4635,8 +4641,10 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
} catch (NumberFormatException e) {
|
||||
throw new ConfigurationException("Unable to get the zone " + params.get("zone"));
|
||||
}
|
||||
_host.host = null;
|
||||
_name = _host.uuid;
|
||||
_host.ip = (String) params.get("url");
|
||||
_host.pool = (String) params.get("pool");
|
||||
_username = (String) params.get("username");
|
||||
_password = (String) params.get("password");
|
||||
_pod = (String) params.get("pod");
|
||||
|
|
@ -4681,8 +4689,6 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
throw new ConfigurationException("Unable to get the uuid");
|
||||
}
|
||||
|
||||
params.put("domr.scripts.dir", "scripts/network/domr");
|
||||
|
||||
String patchPath = getPatchPath();
|
||||
|
||||
_patchPath = Script.findScript(patchPath, "patch");
|
||||
|
|
@ -6405,6 +6411,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||
public String systemvmisouuid;
|
||||
public String uuid;
|
||||
public String ip;
|
||||
public Host host;
|
||||
public String publicNetwork;
|
||||
public String privateNetwork;
|
||||
public String linkLocalNetwork;
|
||||
|
|
|
|||
|
|
@ -2234,4 +2234,7 @@ public interface ManagementServer {
|
|||
List<InstanceGroupVO> searchForVmGroups(Criteria c);
|
||||
|
||||
InstanceGroupVO getGroupForVm(long vmId);
|
||||
|
||||
List<VlanVO> searchForZoneWideVlans(long dcId, String vlanType,String vlanId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,6 +181,7 @@ public class StoragePoolVO implements StoragePool {
|
|||
this.path = hostPath;
|
||||
this.port = port;
|
||||
this.podId = podId;
|
||||
this.setStatus(Status.Up);
|
||||
}
|
||||
|
||||
public StoragePoolVO(StoragePoolType type, String hostAddress, int port, String path) {
|
||||
|
|
@ -188,6 +189,7 @@ public class StoragePoolVO implements StoragePool {
|
|||
this.hostAddress = hostAddress;
|
||||
this.port = port;
|
||||
this.path = path;
|
||||
this.setStatus(Status.Up);
|
||||
}
|
||||
|
||||
public void setStatus(Status status)
|
||||
|
|
|
|||
|
|
@ -690,11 +690,12 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory {
|
|||
long seq = _hostDao.getNextSequence(hostId);
|
||||
Request req = new Request(seq, hostId, _nodeId, new Command[] { new CheckHealthCommand() }, true, true);
|
||||
Answer[] answers = agent.send(req, 50 * 1000);
|
||||
if (answers[0].getResult()) {
|
||||
if (answers != null && answers[0] != null ) {
|
||||
Status status = answers[0].getResult() ? Status.Up : Status.Down;
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("agent (" + hostId + ") responded to checkHeathCommand, reporting that agent is up");
|
||||
s_logger.debug("agent (" + hostId + ") responded to checkHeathCommand, reporting that agent is " + status);
|
||||
}
|
||||
return answers[0].getResult() ? Status.Up : Status.Down;
|
||||
return status;
|
||||
}
|
||||
} catch (AgentUnavailableException e) {
|
||||
s_logger.debug("Agent is unavailable so we move on.");
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public class FirstFitAllocator implements HostAllocator {
|
|||
while (it.hasNext()) {
|
||||
HostVO host = it.next();
|
||||
if (avoid.contains(host)) {
|
||||
clusterHosts.remove(host);
|
||||
it.remove();
|
||||
} else {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Adding host " + host + " as possible pod host");
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public enum Config {
|
|||
|
||||
StorageOverprovisioningFactor("Storage", StoragePoolAllocator.class, String.class, "storage.overprovisioning.factor", "2", "Used for storage overprovisioning calculation; available storage will be (actualStorageSize * storage.overprovisioning.factor)", null),
|
||||
StorageStatsInterval("Storage", ManagementServer.class, String.class, "storage.stats.interval", "60000", "The interval in milliseconds when storage stats (per host) are retrieved from agents.", null),
|
||||
MaxVolumeSize("Storage", ManagementServer.class, Integer.class, "max.volume.size.gb", "2000", "The maximum size for a volume in Gb.", null),
|
||||
MaxVolumeSize("Storage", ManagementServer.class, Integer.class, "max.volume.size.gb", "2097152000", "The maximum size for a volume in Gb.", null),
|
||||
TotalRetries("Storage", AgentManager.class, Integer.class, "total.retries", "4", "The number of times each command sent to a host should be retried in case of failure.", null),
|
||||
|
||||
// Network
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
|
|||
public Map<? extends ServerResource, Map<String, String>> find(long dcId, Long podId, Long clusterId, URI url, String username, String password) throws DiscoveryException {
|
||||
Map<CitrixResourceBase, Map<String, String>> resources = new HashMap<CitrixResourceBase, Map<String, String>>();
|
||||
Connection conn = null;
|
||||
Connection slaveConn = null;
|
||||
if (!url.getScheme().equals("http")) {
|
||||
String msg = "urlString is not http so we're not taking care of the discovery for this: " + url;
|
||||
s_logger.debug(msg);
|
||||
|
|
@ -113,7 +114,8 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
|
|||
InetAddress ia = InetAddress.getByName(hostname);
|
||||
String addr = ia.getHostAddress();
|
||||
|
||||
conn = _connPool.connect(addr, username, password, _wait);
|
||||
conn = _connPool.masterConnect(addr, username, password);
|
||||
|
||||
if (conn == null) {
|
||||
String msg = "Unable to get a connection to " + url;
|
||||
s_logger.debug(msg);
|
||||
|
|
@ -133,33 +135,33 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
|
|||
if (clusterId != null) {
|
||||
cluster = Long.toString(clusterId);
|
||||
}
|
||||
|
||||
Set<Pool> pools = Pool.getAll(conn);
|
||||
Pool pool = pools.iterator().next();
|
||||
String poolUuid = pool.getUuid(conn);
|
||||
Map<Host, Host.Record> hosts = Host.getAllRecords(conn);
|
||||
|
||||
if (_checkHvm) {
|
||||
for (Map.Entry<Host, Host.Record> entry : hosts.entrySet()) {
|
||||
Host.Record record = entry.getValue();
|
||||
|
||||
boolean support_hvm = false;
|
||||
for ( String capability : record.capabilities ) {
|
||||
if(capability.contains("hvm")) {
|
||||
support_hvm = true;
|
||||
break;
|
||||
for (Map.Entry<Host, Host.Record> entry : hosts.entrySet()) {
|
||||
Host.Record record = entry.getValue();
|
||||
|
||||
boolean support_hvm = false;
|
||||
for ( String capability : record.capabilities ) {
|
||||
if(capability.contains("hvm")) {
|
||||
support_hvm = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( !support_hvm ) {
|
||||
String msg = "Unable to add host " + record.address + " because it doesn't support hvm";
|
||||
_alertMgr.sendAlert(AlertManager.ALERT_TYPE_HOST, dcId, podId, msg, msg);
|
||||
s_logger.debug(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
}
|
||||
if( !support_hvm ) {
|
||||
String msg = "Unable to add host " + record.address + " because it doesn't support hvm";
|
||||
_alertMgr.sendAlert(AlertManager.ALERT_TYPE_HOST, dcId, podId, msg, msg);
|
||||
s_logger.debug(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
for (Map.Entry<Host, Host.Record> entry : hosts.entrySet()) {
|
||||
Host.Record record = entry.getValue();
|
||||
Host host = entry.getKey();
|
||||
|
||||
Host.Record record = entry.getValue();
|
||||
String hostAddr = record.address;
|
||||
|
||||
String prodVersion = record.softwareVersion.get("product_version");
|
||||
|
|
@ -180,6 +182,8 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
|
|||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
details.put("url", hostAddr);
|
||||
params.put("url", hostAddr);
|
||||
details.put("pool", poolUuid);
|
||||
params.put("pool", poolUuid);
|
||||
details.put("username", username);
|
||||
params.put("username", username);
|
||||
details.put("password", password);
|
||||
|
|
@ -253,10 +257,13 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
|
|||
return null;
|
||||
} finally {
|
||||
if (conn != null) {
|
||||
XenServerConnectionPool.logout(conn);
|
||||
try{
|
||||
Session.logout(conn);
|
||||
} catch (Exception e ) {
|
||||
}
|
||||
conn.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
return resources;
|
||||
}
|
||||
|
||||
|
|
@ -333,20 +340,30 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
|
|||
username = host.getDetail("username");
|
||||
password = host.getDetail("password");
|
||||
address = host.getDetail("url");
|
||||
Connection hostConn = _connPool.connect(address, username, password, _wait);
|
||||
Connection hostConn = _connPool.slaveConnect(address, username, password);
|
||||
if (hostConn == null) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
if (hostConn == null) {
|
||||
continue;
|
||||
}
|
||||
Set<Pool> pools = Pool.getAll(hostConn);
|
||||
Pool pool = pools.iterator().next();
|
||||
poolUuid1 = pool.getUuid(hostConn);
|
||||
poolMaster = pool.getMaster(hostConn).getAddress(hostConn);
|
||||
Session.logout(hostConn);
|
||||
} finally {
|
||||
hostConn.dispose();
|
||||
break;
|
||||
|
||||
} catch (Exception e ) {
|
||||
s_logger.warn("Can not get master ip address from host " + address);
|
||||
}
|
||||
finally {
|
||||
try{
|
||||
Session.localLogout(hostConn);
|
||||
} catch (Exception e ) {
|
||||
}
|
||||
hostConn.dispose();
|
||||
hostConn = null;
|
||||
poolMaster = null;
|
||||
poolUuid1 = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (poolMaster == null) {
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
// and set them in the right places
|
||||
|
||||
String maxVolumeSizeInGbString = _configs.get("max.volume.size.gb");
|
||||
int maxVolumeSizeGb = NumbersUtil.parseInt(maxVolumeSizeInGbString, 2000);
|
||||
int maxVolumeSizeGb = NumbersUtil.parseInt(maxVolumeSizeInGbString, 2097152000);
|
||||
|
||||
_maxVolumeSizeInGb = maxVolumeSizeGb;
|
||||
|
||||
|
|
@ -3431,29 +3431,77 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
|
||||
// check for ip address/port conflicts by checking existing forwarding and load balancing rules
|
||||
List<FirewallRuleVO> existingRulesOnPubIp = _firewallRulesDao.listIPForwarding(ipAddress);
|
||||
Map<String, Pair<String, String>> mappedPublicPorts = new HashMap<String, Pair<String, String>>();
|
||||
|
||||
Map<String,StringBuilder> mappedPublicPorts = new HashMap<String, StringBuilder>();
|
||||
Map<String, StringBuilder> publicPortToProtocolMapping=new HashMap<String, StringBuilder>();
|
||||
if (existingRulesOnPubIp != null) {
|
||||
for (FirewallRuleVO fwRule : existingRulesOnPubIp) {
|
||||
mappedPublicPorts.put(fwRule.getPublicPort(), new Pair<String, String>(fwRule.getPrivateIpAddress(), fwRule.getPrivatePort()));
|
||||
|
||||
//mappedPublicPorts.put(fwRule.getPublicPort(), new Pair<String, String>(fwRule.getPrivateIpAddress(), fwRule.getPrivatePort()));
|
||||
if(mappedPublicPorts.containsKey(fwRule.getPublicPort())){
|
||||
mappedPublicPorts.put(fwRule.getPublicPort(), mappedPublicPorts.get(fwRule.getPublicPort()).append(";").append(fwRule.getPrivateIpAddress().concat(",").concat(fwRule.getPrivatePort())));
|
||||
}
|
||||
else{
|
||||
mappedPublicPorts.put(fwRule.getPublicPort(), new StringBuilder(fwRule.getPrivateIpAddress()+","+fwRule.getPrivatePort()));
|
||||
}
|
||||
|
||||
if(publicPortToProtocolMapping.containsKey(fwRule.getPublicPort())){
|
||||
publicPortToProtocolMapping.put(fwRule.getPublicPort(), publicPortToProtocolMapping.get(fwRule.getPublicPort()).append(";").append(fwRule.getProtocol()));
|
||||
}
|
||||
else{
|
||||
publicPortToProtocolMapping.put(fwRule.getPublicPort(),new StringBuilder(fwRule.getProtocol()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (userVm != null) {
|
||||
Pair<String, String> privateIpPort = mappedPublicPorts.get(publicPort);
|
||||
if (privateIpPort != null) {
|
||||
if (privateIpPort.first().equals(userVm.getGuestIpAddress()) && privateIpPort.second().equals(privatePort)) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("skipping the creating of firewall rule " + ipAddress + ":" + publicPort + " to " + userVm.getGuestIpAddress() + ":" + privatePort + "; rule already exists.");
|
||||
}
|
||||
return null; // already mapped
|
||||
} else {
|
||||
throw new NetworkRuleConflictException("An existing port forwarding service rule for " + ipAddress + ":" + publicPort
|
||||
+ " already exists, found while trying to create mapping to " + userVm.getGuestIpAddress() + ":" + privatePort + ((securityGroupId == null) ? "." : " from port forwarding service "
|
||||
+ securityGroupId.toString() + "."));
|
||||
}
|
||||
}
|
||||
|
||||
if (userVm != null)
|
||||
{
|
||||
if(mappedPublicPorts.size()>0)
|
||||
{
|
||||
StringBuilder privateIpPortIntermediate = mappedPublicPorts.get(publicPort);
|
||||
String privateIpPort = null;
|
||||
if(privateIpPortIntermediate != null && privateIpPortIntermediate.length()>0)
|
||||
privateIpPort = privateIpPortIntermediate.toString();//eg: 10.1.1.2,30 ; 10.1.1.2,34
|
||||
|
||||
if (privateIpPort != null && privateIpPort.length()>0)
|
||||
{
|
||||
String publicPortProtocol = publicPortToProtocolMapping.get(publicPort).toString();
|
||||
String[] privateIpPortPairs = privateIpPort.toString().split(";"); //eg. 10.1.1.2,30
|
||||
String[] privateIpAndPortStr;
|
||||
boolean errFlag = false;
|
||||
|
||||
for(String pair: privateIpPortPairs)
|
||||
{
|
||||
privateIpAndPortStr = pair.split(",");//split into 10.1.1.2 & 30
|
||||
|
||||
if (privateIpAndPortStr[0].equals(userVm.getGuestIpAddress()) && privateIpAndPortStr[1].equals(privatePort)) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("skipping the creating of firewall rule " + ipAddress + ":" + publicPort + " to " + userVm.getGuestIpAddress() + ":" + privatePort + "; rule already exists.");
|
||||
}
|
||||
return null; // already mapped
|
||||
}
|
||||
//at this point protocol string looks like: eg. tcp;udp || tcp || udp || udp;tcp
|
||||
else if(!publicPortProtocol.contains(protocol))//check if this public port is mapped to the protocol or not
|
||||
{
|
||||
//this is the case eg:
|
||||
//pub:1 pri:2 pro: tcp
|
||||
//pub 1 pri:3 pro: udp
|
||||
break; //we break here out of the loop, for the record to be created
|
||||
}
|
||||
else
|
||||
{
|
||||
errFlag = true;
|
||||
// throw new NetworkRuleConflictException("An existing port forwarding service rule for " + ipAddress + ":" + publicPort
|
||||
// + " already exists, found while trying to create mapping to " + userVm.getGuestIpAddress() + ":" + privatePort + ((securityGroupId == null) ? "." : " from port forwarding service "
|
||||
// + securityGroupId.toString() + "."));
|
||||
}
|
||||
}
|
||||
|
||||
if(errFlag)
|
||||
throw new NetworkRuleConflictException("An existing port forwarding service rule for " + ipAddress + ":" + publicPort
|
||||
+ " already exists, found while trying to create mapping to " + userVm.getGuestIpAddress() + ":" + privatePort + ((securityGroupId == null) ? "." : " from port forwarding service "
|
||||
+ securityGroupId.toString() + "."));
|
||||
}
|
||||
}
|
||||
FirewallRuleVO newFwRule = new FirewallRuleVO();
|
||||
newFwRule.setEnabled(true);
|
||||
newFwRule.setForwarding(true);
|
||||
|
|
@ -8792,7 +8840,7 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
return false;
|
||||
}
|
||||
|
||||
//Move this section to UserVmManager when merge with api refactor branch is done
|
||||
//Move vmGroup section to UserVmManager when merge with api refactor branch is done
|
||||
@Override
|
||||
public InstanceGroupVO createVmGroup(String name, Long accountId){
|
||||
return _vmMgr.createVmGroup(name, accountId);
|
||||
|
|
@ -8885,5 +8933,10 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
|
||||
|
||||
//Move section above to UserVmManager when merge with api refactor branch is done
|
||||
@Override
|
||||
public List<VlanVO> searchForZoneWideVlans(long dcId, String vlanType, String vlanId){
|
||||
return _vlanDao.searchForZoneWideVlans(dcId, vlanType, vlanId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,9 +91,7 @@ public class LocalStoragePoolListener implements Listener {
|
|||
pool = new StoragePoolVO(poolId, name, pInfo.getUuid(), pInfo.getPoolType(), host.getDataCenterId(),
|
||||
host.getPodId(), pInfo.getAvailableBytes(), pInfo.getCapacityBytes(), pInfo.getHost(), 0,
|
||||
pInfo.getHostPath());
|
||||
pool.setStatus(Status.Up);
|
||||
pool.setClusterId(host.getClusterId());
|
||||
pool.setStatus(Status.Up);
|
||||
_storagePoolDao.persist(pool, pInfo.getDetails());
|
||||
StoragePoolHostVO poolHost = new StoragePoolHostVO(pool.getId(), host.getId(), pInfo.getLocalPath());
|
||||
_storagePoolHostDao.persist(poolHost);
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ public class StorageManagerImpl implements StorageManager {
|
|||
{
|
||||
StoragePoolVO sp = _storagePoolDao.findById(vol.getPoolId());
|
||||
|
||||
if(sp.getStatus().equals(Status.PrepareForMaintenance))
|
||||
if(sp!=null && sp.getStatus().equals(Status.PrepareForMaintenance))
|
||||
{
|
||||
recreateVols.add(vol);
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ import org.xml.sax.Attributes;
|
|||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
import com.cloud.host.Status;
|
||||
import com.cloud.offering.NetworkOffering;
|
||||
import com.cloud.offering.NetworkOffering.GuestIpType;
|
||||
import com.cloud.service.ServiceOfferingVO;
|
||||
|
|
@ -529,7 +530,7 @@ public class DatabaseConfig {
|
|||
String storageType = _currentObjectParams.get("storageType");
|
||||
String uuid = UUID.nameUUIDFromBytes(new String(hostAddress+hostPath).getBytes()).toString();
|
||||
|
||||
String insertSql1 = "INSERT INTO `storage_pool` (`id`, `name`, `uuid` , `pool_type` , `port`, `data_center_id` ,`available_bytes` , `capacity_bytes` ,`host_address`, `path`, `created`, `pod_id` ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
String insertSql1 = "INSERT INTO `storage_pool` (`id`, `name`, `uuid` , `pool_type` , `port`, `data_center_id` ,`available_bytes` , `capacity_bytes` ,`host_address`, `path`, `created`, `pod_id`,`status` ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
// String insertSql2 = "INSERT INTO `netfs_storage_pool` VALUES (?,?,?)";
|
||||
|
||||
Transaction txn = Transaction.currentTxn();
|
||||
|
|
@ -550,6 +551,7 @@ public class DatabaseConfig {
|
|||
stmt.setString(10, hostPath);
|
||||
stmt.setDate(11, new Date(new java.util.Date().getTime()));
|
||||
stmt.setLong(12, podId);
|
||||
stmt.setString(13, Status.Up.toString());
|
||||
stmt.executeUpdate();
|
||||
// stmt = txn.prepareAutoCloseStatement(insertSql2);
|
||||
// stmt.setLong(1, 2);
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ import com.cloud.dc.DataCenterVO;
|
|||
import com.cloud.dc.HostPodVO;
|
||||
import com.cloud.dc.Vlan.VlanType;
|
||||
import com.cloud.dc.VlanVO;
|
||||
import com.cloud.dc.dao.AccountVlanMapDao;
|
||||
import com.cloud.dc.dao.DataCenterDao;
|
||||
import com.cloud.dc.dao.HostPodDao;
|
||||
import com.cloud.dc.dao.VlanDao;
|
||||
|
|
@ -224,6 +225,7 @@ public class UserVmManagerImpl implements UserVmManager {
|
|||
@Inject AsyncJobManager _asyncMgr;
|
||||
@Inject protected StoragePoolHostDao _storagePoolHostDao;
|
||||
@Inject VlanDao _vlanDao;
|
||||
@Inject AccountVlanMapDao _accountVlanMapDao;
|
||||
@Inject StoragePoolDao _storagePoolDao;
|
||||
@Inject VMTemplateHostDao _vmTemplateHostDao;
|
||||
@Inject NetworkGroupManager _networkGroupManager;
|
||||
|
|
@ -1873,6 +1875,7 @@ public class UserVmManagerImpl implements UserVmManager {
|
|||
Enumeration<IpAddrAllocator> it = ipAllocators.enumeration();
|
||||
_IpAllocator = it.nextElement();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -2653,15 +2656,30 @@ public class UserVmManagerImpl implements UserVmManager {
|
|||
List<VlanVO> vlansForAccount = _vlanDao.listVlansForAccountByType(dc.getId(), account.getId(), VlanType.DirectAttached);
|
||||
|
||||
boolean forAccount = false;
|
||||
boolean forZone = false;
|
||||
if (vlansForAccount.size() > 0) {
|
||||
forAccount = true;
|
||||
guestVlan = vlansForAccount.get(0);//FIXME: iterate over all vlans
|
||||
}
|
||||
// else //TODO PLEASE DO NOT REMOVE THIS COMMENTED PART
|
||||
// {
|
||||
// //list zone wide vlans that are direct attached and tagged
|
||||
// //if exists pick random one
|
||||
// //set forZone = true
|
||||
//
|
||||
// //note the dao method below does a NEQ on vlan id, hence passing untagged
|
||||
// List<VlanVO> zoneWideVlans = _vlanDao.searchForZoneWideVlans(dc.getId(),VlanType.DirectAttached.toString(),"untagged");
|
||||
//
|
||||
// if(zoneWideVlans!=null && zoneWideVlans.size()>0){
|
||||
// forZone = true;
|
||||
// guestVlan = zoneWideVlans.get(0);//FIXME: iterate over all vlans
|
||||
// }
|
||||
// }
|
||||
while ((pod = _agentMgr.findPod(template, offering, dc, account.getId(), avoids)) != null) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Attempting to create direct attached vm in pod " + pod.first().getName());
|
||||
}
|
||||
if (!forAccount) {
|
||||
if (!forAccount && !forZone) {
|
||||
List<VlanVO> vlansForPod = _vlanDao.listVlansForPodByType(pod.first().getId(), VlanType.DirectAttached);
|
||||
if (vlansForPod.size() < 1) {
|
||||
avoids.add(pod.first().getId());
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ a {
|
|||
}
|
||||
|
||||
a:link, a:visited {
|
||||
text-decoration:none;
|
||||
text-decoration:none;
|
||||
|
||||
}
|
||||
|
||||
a:visited {
|
||||
|
|
@ -232,7 +233,7 @@ a:visited {
|
|||
width:420px;
|
||||
height:auto;
|
||||
float:left;
|
||||
background:#ffe5e5 repeat top left;
|
||||
background:#ffe5e5 url(../images/errormsg_bg.gif) repeat-x top left;
|
||||
border:1px solid #CCC;
|
||||
margin:7px 0 0 0;
|
||||
padding:0 0 5px 0;
|
||||
|
|
@ -833,7 +834,7 @@ a:visited {
|
|||
padding:0;
|
||||
}
|
||||
|
||||
.rev_wiztemplist_actionsbox a:link {
|
||||
.rev_wiztemplist_actionsbox a {
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:left;
|
||||
|
|
@ -846,30 +847,13 @@ a:visited {
|
|||
padding:0;
|
||||
}
|
||||
|
||||
.rev_wiztemplist_actionsbox a:visted {
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:left;
|
||||
color:#2c8bbc;
|
||||
font-size:12px;
|
||||
text-align:left;
|
||||
font-weight:normal;
|
||||
.rev_wiztemplist_actionsbox a:link, rev_wiztemplist_actionsbox a:visted {
|
||||
text-decoration:none;
|
||||
margin:0 15px 0 0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.rev_wiztemplist_actionsbox a:hover {
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:left;
|
||||
color:#2c8bbc;
|
||||
font-size:12px;
|
||||
text-align:left;
|
||||
font-weight:normal;
|
||||
text-decoration:underline;
|
||||
margin:0 15px 0 0;
|
||||
padding:0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1837,11 +1821,14 @@ a:visited {
|
|||
width:100%;
|
||||
height:auto;
|
||||
float:left;
|
||||
position:relative;
|
||||
margin:0;
|
||||
padding:5px 0 5px 0;
|
||||
border-bottom:1px solid #e2e2e2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.grid_rows.even {
|
||||
background:#FFF repeat top left;
|
||||
}
|
||||
|
|
@ -1855,6 +1842,70 @@ a:visited {
|
|||
float:left;
|
||||
margin:0;
|
||||
padding:0;
|
||||
border-right:1px solid #fff;
|
||||
}
|
||||
|
||||
|
||||
.grid_row_cell .text {
|
||||
width:92%;
|
||||
height:13px;
|
||||
float:left;
|
||||
margin:0 0 0 10px;
|
||||
display:inline;
|
||||
padding:0;
|
||||
border:1px solid #999;
|
||||
background:#FFF;
|
||||
color:#333;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
.grid_row_cell .select {
|
||||
width:92%;
|
||||
height:15px;
|
||||
float:left;
|
||||
margin:0 0 0 10px;
|
||||
display:inline;
|
||||
padding:0;
|
||||
border:1px solid #999;
|
||||
background:#FFF;
|
||||
color:#333;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
.gridrow_loaderbox {
|
||||
width:100%;
|
||||
height:23px;
|
||||
float:right;
|
||||
position:absolute;
|
||||
background:#99b2c3 url(../images/gridheader_loadingbg.gif) repeat-x top left;
|
||||
border-left:1px solid #999;
|
||||
margin:0 0 0 0;
|
||||
padding:0;
|
||||
z-index:1001;
|
||||
top:0;
|
||||
right:0;
|
||||
}
|
||||
|
||||
.gridrow_loaderbox p{
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:left;
|
||||
color:#FFF;
|
||||
font-size:11px;
|
||||
font-weight:bold;
|
||||
margin:5px 5px 0 5px;
|
||||
display:inline;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.gridrow_loader {
|
||||
width:16px;
|
||||
height:16px;
|
||||
float:left;
|
||||
background:url(../images/grid_actionloader.gif) no-repeat top left;
|
||||
margin:3px 0 0 5px;
|
||||
display:inline;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.row_celltitles {
|
||||
|
|
@ -1870,6 +1921,8 @@ a:visited {
|
|||
padding:0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.row_celltitles a{
|
||||
width:auto;
|
||||
height:auto;
|
||||
|
|
@ -2064,7 +2117,7 @@ a:visited {
|
|||
width:100%;
|
||||
height:auto;
|
||||
float:left;
|
||||
background:#fffbe6 repeat top left;
|
||||
background:#fffbe6 url(../images/infomsg_bg.gif) repeat-x top left;
|
||||
border:1px dashed #CCC;
|
||||
color:#333;
|
||||
margin:0 0 0 0;
|
||||
|
|
@ -2082,7 +2135,7 @@ a:visited {
|
|||
}
|
||||
|
||||
.info_detailbox.errorbox {
|
||||
background:#ffe5e5 repeat top left;
|
||||
background:#ffe5e5 url(../images/errormsg_bg.gif) repeat-x top left;
|
||||
color:#a90000;
|
||||
}
|
||||
|
||||
|
|
@ -2148,8 +2201,7 @@ a:visited {
|
|||
position:absolute;
|
||||
background:#99b2c3 url(../images/gridheader_loadingbg.gif) repeat-x top left;
|
||||
border-left:1px solid #999;
|
||||
margin:0px 0 0 0;
|
||||
padding:0;
|
||||
padding:0 5px 0 0;
|
||||
z-index:1001;
|
||||
right:0;
|
||||
}
|
||||
|
|
@ -2161,7 +2213,7 @@ a:visited {
|
|||
color:#FFF;
|
||||
font-size:11px;
|
||||
font-weight:bold;
|
||||
margin:2px 5px 0 5px;
|
||||
margin:3px 5px 0 5px;
|
||||
display:inline;
|
||||
padding:0;
|
||||
}
|
||||
|
|
@ -2176,6 +2228,68 @@ a:visited {
|
|||
padding:0;
|
||||
}
|
||||
|
||||
.gridheader_message {
|
||||
width:auto;
|
||||
height:20px;
|
||||
float:right;
|
||||
position:absolute;
|
||||
border-left:1px solid #999;
|
||||
background:#fffbe6 url(../images/infomsg_bg.gif) repeat-x top left;
|
||||
margin:0px 0 0 0;
|
||||
padding:0 5px 0 0;
|
||||
z-index:1005;
|
||||
right:0;
|
||||
}
|
||||
|
||||
.gridheader_message p {
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:left;
|
||||
color:#333;
|
||||
font-size:11px;
|
||||
font-size:11px;
|
||||
font-weight:bold;
|
||||
margin:2px 0 0 5px;
|
||||
display:inline;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
|
||||
.gridheader_message.error {
|
||||
background:#ffe5e5 url(../images/errormsg_bg.gif) repeat-x top left;
|
||||
}
|
||||
|
||||
.gridheader_message.error p{
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:left;
|
||||
color:#ae0000;
|
||||
font-size:11px;
|
||||
font-size:11px;
|
||||
font-weight:bold;
|
||||
margin:2px 0 0 5px;
|
||||
display:inline;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.close_button {
|
||||
width:38px;
|
||||
height:17px;
|
||||
float:left;
|
||||
background:url(../images/close_button.png) no-repeat top left;
|
||||
display:inline;
|
||||
padding:0;
|
||||
cursor:pointer;
|
||||
cursor:hand;
|
||||
margin:1px 0 0 5px;
|
||||
padding:0;
|
||||
|
||||
}
|
||||
|
||||
.close_button:hover{
|
||||
background:url(../images/close_button_hover.png) no-repeat top left;
|
||||
}
|
||||
|
||||
.grid_editbox {
|
||||
width:27px;
|
||||
height:17px;
|
||||
|
|
@ -2244,5 +2358,6 @@ a:visited {
|
|||
top:17px;
|
||||
right:6px;
|
||||
margin:0;
|
||||
padding:0
|
||||
padding:0;
|
||||
z-index:1002;
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 136 B |
|
After Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 599 B |
|
Before Width: | Height: | Size: 562 B After Width: | Height: | Size: 562 B |
|
Before Width: | Height: | Size: 780 B After Width: | Height: | Size: 780 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 777 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
|
@ -50,6 +50,10 @@ long milliseconds = new Date().getTime();
|
|||
|
||||
<script type="text/javascript" src="scripts/cloud.core2.ipaddress.js?t=<%=milliseconds%>"></script>
|
||||
|
||||
<script type="text/javascript" src="scripts/cloud.core2.template.js?t=<%=milliseconds%>"></script>
|
||||
|
||||
<script type="text/javascript" src="scripts/cloud.core2.iso.js?t=<%=milliseconds%>"></script>
|
||||
|
||||
<title>Cloud.com CloudStack</title>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -105,7 +109,7 @@ long milliseconds = new Date().getTime();
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actionpanel_button_wrapper" id="add_link" style="display: none">
|
||||
<div class="actionpanel_button_wrapper" id="midmenu_add_link" style="display: none">
|
||||
<div class="actionpanel_button">
|
||||
<div class="actionpanel_button_icons">
|
||||
<img src="images/addvm_actionicon.png" alt="Add" /></div>
|
||||
|
|
@ -460,18 +464,74 @@ long milliseconds = new Date().getTime();
|
|||
</div>
|
||||
</div>
|
||||
<div class="leftmenu_list">
|
||||
<div class="leftmenu_content" id="leftmenu_template">
|
||||
<div class="leftmenu_secondindent">
|
||||
<div class="leftmenu_list_icons">
|
||||
<img src="images/templates_leftmenuicon.png" alt="Templates" /></div>
|
||||
Template
|
||||
<div id="leftmenu_itemplate_filter">
|
||||
<div class="leftmenu_content" id="leftmenu_template_filter_header">
|
||||
<div class="leftmenu_secondindent">
|
||||
<div class="leftmenu_list_icons">
|
||||
<img src="images/templates_leftmenuicon.png" alt="Templates" /></div>
|
||||
Template
|
||||
</div>
|
||||
</div>
|
||||
<div id="leftmenu_template_filter_container">
|
||||
<div class="leftmenu_content" id="leftmenu_submenu_my_template">
|
||||
<div class="leftmenu_thirdindent">
|
||||
<div class="leftmenu_list_icons">
|
||||
<img src="images/templates_leftmenuicon.png" /></div>
|
||||
<div>
|
||||
My Templates</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="leftmenu_content" id="leftmenu_submenu_featured_template">
|
||||
<div class="leftmenu_thirdindent">
|
||||
<div class="leftmenu_list_icons">
|
||||
<img src="images/templates_leftmenuicon.png" /></div>
|
||||
<div>
|
||||
Featured</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="leftmenu_content" id="leftmenu_submenu_community_template">
|
||||
<div class="leftmenu_thirdindent">
|
||||
<div class="leftmenu_list_icons">
|
||||
<img src="images/templates_leftmenuicon.png" /></div>
|
||||
<div>
|
||||
Community</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="leftmenu_content" id="leftmenu_iso">
|
||||
<div class="leftmenu_secondindent">
|
||||
<div class="leftmenu_list_icons">
|
||||
<img src="images/templates_leftmenuicon.png" alt="Templates" /></div>
|
||||
ISO
|
||||
<div id="leftmenu_iso_filter">
|
||||
<div class="leftmenu_content" id="leftmenu_iso_filter_header">
|
||||
<div class="leftmenu_secondindent">
|
||||
<div class="leftmenu_list_icons">
|
||||
<img src="images/templates_leftmenuicon.png" alt="Templates" /></div>
|
||||
ISO
|
||||
</div>
|
||||
</div>
|
||||
<div id="leftmenu_iso_filter_container">
|
||||
<div class="leftmenu_content" id="leftmenu_submenu_my_iso">
|
||||
<div class="leftmenu_thirdindent">
|
||||
<div class="leftmenu_list_icons">
|
||||
<img src="images/templates_leftmenuicon.png" /></div>
|
||||
<div>
|
||||
My ISOs</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="leftmenu_content" id="leftmenu_submenu_featured_iso">
|
||||
<div class="leftmenu_thirdindent">
|
||||
<div class="leftmenu_list_icons">
|
||||
<img src="images/templates_leftmenuicon.png" /></div>
|
||||
<div>
|
||||
Featured</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="leftmenu_content" id="leftmenu_submenu_community_iso">
|
||||
<div class="leftmenu_thirdindent">
|
||||
<div class="leftmenu_list_icons">
|
||||
<img src="images/templates_leftmenuicon.png" /></div>
|
||||
<div>
|
||||
Community</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -605,12 +665,12 @@ long milliseconds = new Date().getTime();
|
|||
</div>
|
||||
|
||||
<!-- templates starts here-->
|
||||
<div class="leftmenu_content" id="leftmenu_instance_group_template" style="display: none">
|
||||
<div class="leftmenu_content" id="leftmenu_submenu_template" style="display: none">
|
||||
<div class="leftmenu_thirdindent">
|
||||
<div class="leftmenu_list_icons">
|
||||
<img src="images/instance_leftmenuicon.png" alt="Instances" /></div>
|
||||
<div id="group_name">
|
||||
Group 1</div>
|
||||
<img id="icon" style="display:none"/></div>
|
||||
<div id="submenu_name">
|
||||
(submenu)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<!-- account detail panel (begin) -->
|
||||
<div class="main_title" id="right_panel_header">
|
||||
<div class="main_titleicon">
|
||||
<img src="images/accountstitle_icons.gif" alt="Accounts" /></div>
|
||||
<img src="images/title_accountsicon.gif" alt="Accounts" /></div>
|
||||
<h1>Accounts</h1>
|
||||
</div>
|
||||
|
||||
|
|
@ -29,16 +29,40 @@
|
|||
</div>
|
||||
<div class="grid_actionpanel">
|
||||
<div class="grid_actionbox">
|
||||
<div class="grid_actionsdropdown_box">
|
||||
<div class="grid_actionsdropdown_box" style="display:none;">
|
||||
<ul class="actionsdropdown_boxlist" id="action_list">
|
||||
<li> <a href="#"> Delete </a> </li>
|
||||
<li> <a href="#"> Attach Disk </a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_editbox"></div>
|
||||
<div class="grid_editbox"></div>
|
||||
<div class="gridheader_loaderbox" style="border:1px solid #999; display:none;">
|
||||
<div class="gridheader_loader"></div>
|
||||
<p>Detaching Disk …</p>
|
||||
</div>
|
||||
|
||||
<div class="gridheader_message" style="border:1px solid #999; display:block;">
|
||||
<p>Disk has been succesfully dettached …</p>
|
||||
<div class="close_button"></div>
|
||||
</div>
|
||||
|
||||
<div class="gridheader_message error" style="border:1px solid #999; display:none;">
|
||||
<p>Some problem occured while dettaching disk …</p>
|
||||
<div class="close_button"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_container">
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("id")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
|
|
|
|||
|
|
@ -1,104 +1,114 @@
|
|||
<!--
|
||||
<script type="text/javascript" src="scripts/cloud.core.event.js"></script>
|
||||
-->
|
||||
|
||||
<%@ page import="java.util.*" %>
|
||||
<%@ page import="com.cloud.utils.*" %>
|
||||
|
||||
<%
|
||||
|
||||
Locale browserLocale = request.getLocale();
|
||||
CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale);
|
||||
%>
|
||||
|
||||
<!-- event detail panel (begin) -->
|
||||
<div class="main_title" id="right_panel_header">
|
||||
<!--
|
||||
<div class="main_titleicon">
|
||||
<img src="images/instancetitle_icons.gif" alt="Instance" /></div>
|
||||
-->
|
||||
<h1>Event
|
||||
</h1>
|
||||
</div>
|
||||
<div class="contentbox" id="right_panel_content">
|
||||
<div class="info_detailbox errorbox" id="after_action_info_container" style="display:none">
|
||||
<p id="after_action_info"></p>
|
||||
</div>
|
||||
<div class="tabbox" style="margin-top:15px;">
|
||||
<div class="content_tabs on">
|
||||
<%=t.t("Details")%></div>
|
||||
</div>
|
||||
<div class="grid_container">
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Initiated.By")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="username">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Owner.Account")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="account">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Type")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="type">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Level")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="level">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Description")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="description">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("State")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="state">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Date")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="created">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<script type="text/javascript" src="scripts/cloud.core.event.js"></script>
|
||||
-->
|
||||
|
||||
<%@ page import="java.util.*" %>
|
||||
<%@ page import="com.cloud.utils.*" %>
|
||||
|
||||
<%
|
||||
|
||||
Locale browserLocale = request.getLocale();
|
||||
CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale);
|
||||
%>
|
||||
|
||||
<!-- event detail panel (begin) -->
|
||||
<div class="main_title" id="right_panel_header">
|
||||
|
||||
<div class="main_titleicon">
|
||||
<img src="images/title_eventsicon.gif" alt="Event" /></div>
|
||||
|
||||
<h1>Event
|
||||
</h1>
|
||||
</div>
|
||||
<div class="contentbox" id="right_panel_content">
|
||||
<div class="info_detailbox errorbox" id="after_action_info_container" style="display:none">
|
||||
<p id="after_action_info"></p>
|
||||
</div>
|
||||
<div class="tabbox" style="margin-top:15px;">
|
||||
<div class="content_tabs on">
|
||||
<%=t.t("Details")%></div>
|
||||
</div>
|
||||
<div class="grid_container">
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("id")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Initiated.By")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="username">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Owner.Account")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="account">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Type")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="type">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Level")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="level">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Description")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="description">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("State")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="state">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Date")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="created">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- event detail panel (end) -->
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<div class="main_title" id="right_panel_header">
|
||||
|
||||
<div class="main_titleicon">
|
||||
<img src="images/iptitle_icons.gif" alt="IP Address" /></div>
|
||||
<img src="images/title_ipicon.gif" alt="IP Address" /></div>
|
||||
|
||||
<h1>IP Address
|
||||
</h1>
|
||||
|
|
@ -143,18 +143,24 @@
|
|||
<div class="grid_header_title">Instance</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">8080</div>
|
||||
<input class="text" style="width:90%;" type="text" />
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">80</div>
|
||||
<input class="text" style="width:90%;" type="text" />
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 29%;">
|
||||
<div class="row_celltitles">8 GB</div>
|
||||
<input class="text" style="width:90%;" type="text" />
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">Instance Name</div>
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<select class="select" style="width:90%;"><option value="Instance1">Instance Name 1 </option> <option value="Instance2">Instance Name 2 </option> </select>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 10%;">
|
||||
<div class="row_celltitles"><a href="#">Add</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -172,7 +178,30 @@
|
|||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">Instance Name</div>
|
||||
</div>
|
||||
<div class="gridrow_loaderbox" style="display:none;">
|
||||
<div class="gridrow_loader"></div>
|
||||
<p> Creating …</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">8080</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">80</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 29%;">
|
||||
<div class="row_celltitles">8 GB</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">Instance Name</div>
|
||||
</div>
|
||||
<div class="gridrow_loaderbox" style="display:none;">
|
||||
<div class="gridrow_loader"></div>
|
||||
<p> Creating …</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Port Forwarding ends here-->
|
||||
|
|
@ -194,53 +223,24 @@
|
|||
<div class="grid_header_title">Algorithm</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 29%;">
|
||||
<div class="row_celltitles">LB#1</div>
|
||||
<input class="text" style="width:90%;" type="text" />
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">8080</div>
|
||||
<input class="text" style="width:90%;" type="text" />
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">80</div>
|
||||
<input class="text" style="width:90%;" type="text" />
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">Source</div>
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<select class="select" style="width:90%;"><option value="Source1">Source Name 1 </option> <option value="Source2">Source Name 2 </option> </select>
|
||||
</div>
|
||||
<div class="grid_detailspanel" style="display:block;">
|
||||
<div class="grid_details_pointer"></div>
|
||||
<div class="grid_detailsbox">
|
||||
<div class="grid_details_row">
|
||||
<div class="grid_row_cell" style="width: 9%;">
|
||||
<div class="row_celltitles"><img src="images/network_managevmicon.gif" /></div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">1-2-2-TEST</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">10.23.231.230</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles"><a href="#">Remove</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_details_row odd">
|
||||
<div class="grid_row_cell" style="width: 9%;">
|
||||
<div class="row_celltitles"><img src="images/network_managevmicon.gif" /></div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">1-2-2-TEST</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">10.23.231.230</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles"><a href="#">Remove</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 10%;">
|
||||
<div class="row_celltitles"><a href="#">Add</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="grid_rows odd">
|
||||
|
|
@ -256,20 +256,29 @@
|
|||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">Source</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_detailspanel" style="display:none;">
|
||||
<div class="grid_detailspanel" style="display:block;">
|
||||
<div class="grid_details_pointer"></div>
|
||||
<div class="grid_detailsbox">
|
||||
<div class="grid_details_row odd">
|
||||
<div class="grid_row_cell" style="width: 9%;">
|
||||
<div class="row_celltitles"><img src="images/network_managevmicon.gif" /></div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 60%;">
|
||||
<select class="select" style="width:90%;"><option value="Source1">Source Name 1 </option> <option value="Source2">Source Name 2 </option> </select>
|
||||
</div>
|
||||
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles"><a href="#">Add</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_details_row">
|
||||
<div class="grid_row_cell" style="width: 9%;">
|
||||
<div class="row_celltitles"><img src="images/network_managevmicon.gif" /></div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="grid_row_cell" style="width: 60%;">
|
||||
<div class="row_celltitles">1-2-2-TEST</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">10.23.231.230</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles"><a href="#">Remove</a></div>
|
||||
</div>
|
||||
|
|
@ -279,18 +288,35 @@
|
|||
<div class="grid_row_cell" style="width: 9%;">
|
||||
<div class="row_celltitles"><img src="images/network_managevmicon.gif" /></div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="grid_row_cell" style="width: 60%;">
|
||||
<div class="row_celltitles">1-2-2-TEST</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">10.23.231.230</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles"><a href="#">Remove</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 29%;">
|
||||
<div class="row_celltitles">LB#1</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">8080</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">80</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 30%;">
|
||||
<div class="row_celltitles">Source</div>
|
||||
</div>
|
||||
<div class="gridrow_loaderbox" style="display:none;">
|
||||
<div class="gridrow_loader"></div>
|
||||
<p> Creating …</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,127 @@
|
|||
<!--
|
||||
<script type="text/javascript" src="scripts/cloud.core.event.js"></script>
|
||||
-->
|
||||
|
||||
<%@ page import="java.util.*" %>
|
||||
<%@ page import="com.cloud.utils.*" %>
|
||||
|
||||
<%
|
||||
|
||||
Locale browserLocale = request.getLocale();
|
||||
CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale);
|
||||
%>
|
||||
|
||||
<!-- ISO detail panel (begin) -->
|
||||
<div class="main_title" id="right_panel_header">
|
||||
|
||||
<div class="main_titleicon">
|
||||
<img src="images/title_isoicon.gif" alt="ISO" /></div>
|
||||
|
||||
<h1>ISO
|
||||
</h1>
|
||||
</div>
|
||||
<div class="contentbox" id="right_panel_content">
|
||||
<div class="info_detailbox errorbox" id="after_action_info_container" style="display:none">
|
||||
<p id="after_action_info"></p>
|
||||
</div>
|
||||
<div class="tabbox" style="margin-top:15px;">
|
||||
<div class="content_tabs on">
|
||||
<%=t.t("Details")%></div>
|
||||
</div>
|
||||
<div class="grid_container">
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("ID")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Zone")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="zonename">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Name")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Display.Text")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="displaytext">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Status")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="status">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Bootable")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="bootable">
|
||||
<div id="icon">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Account")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="account">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Created")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="created">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Size")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="size">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ISO detail panel (end) -->
|
||||
|
|
@ -1,104 +1,104 @@
|
|||
<!--
|
||||
<script type="text/javascript" src="scripts/cloud.core.snapshot.js"></script>
|
||||
-->
|
||||
|
||||
<%@ page import="java.util.*" %>
|
||||
<%@ page import="com.cloud.utils.*" %>
|
||||
|
||||
<%
|
||||
|
||||
Locale browserLocale = request.getLocale();
|
||||
CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale);
|
||||
%>
|
||||
|
||||
<!-- snapshot detail panel (begin) -->
|
||||
<div class="main_title" id="right_panel_header">
|
||||
<!--
|
||||
<div class="main_titleicon">
|
||||
<img src="images/instancetitle_icons.gif" alt="Instance" /></div>
|
||||
-->
|
||||
<h1>Snapshot
|
||||
</h1>
|
||||
</div>
|
||||
<div class="contentbox" id="right_panel_content">
|
||||
<div class="info_detailbox errorbox" id="after_action_info_container" style="display:none">
|
||||
<p id="after_action_info"></p>
|
||||
</div>
|
||||
<div class="tabbox" style="margin-top:15px;">
|
||||
<div class="content_tabs on">
|
||||
<%=t.t("Details")%></div>
|
||||
</div>
|
||||
<div class="grid_container">
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("ID")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Name")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Volume")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="volume_name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Interval.Type")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="interval_type">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Created")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="created">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Account")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="account">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Domain")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="domain">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<script type="text/javascript" src="scripts/cloud.core.snapshot.js"></script>
|
||||
-->
|
||||
|
||||
<%@ page import="java.util.*" %>
|
||||
<%@ page import="com.cloud.utils.*" %>
|
||||
|
||||
<%
|
||||
|
||||
Locale browserLocale = request.getLocale();
|
||||
CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale);
|
||||
%>
|
||||
|
||||
<!-- snapshot detail panel (begin) -->
|
||||
<div class="main_title" id="right_panel_header">
|
||||
|
||||
<div class="main_titleicon">
|
||||
<img src="images/title_snapshoticon.gif" alt="Instance" /></div>
|
||||
|
||||
<h1>Snapshot
|
||||
</h1>
|
||||
</div>
|
||||
<div class="contentbox" id="right_panel_content">
|
||||
<div class="info_detailbox errorbox" id="after_action_info_container" style="display:none">
|
||||
<p id="after_action_info"></p>
|
||||
</div>
|
||||
<div class="tabbox" style="margin-top:15px;">
|
||||
<div class="content_tabs on">
|
||||
<%=t.t("Details")%></div>
|
||||
</div>
|
||||
<div class="grid_container">
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("ID")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Name")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Volume")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="volume_name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Interval.Type")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="interval_type">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Created")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="created">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Account")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="account">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Domain")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="domain">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- snapshot detail panel (end) -->
|
||||
|
|
@ -0,0 +1,172 @@
|
|||
<!--
|
||||
<script type="text/javascript" src="scripts/cloud.core.event.js"></script>
|
||||
-->
|
||||
|
||||
<%@ page import="java.util.*" %>
|
||||
<%@ page import="com.cloud.utils.*" %>
|
||||
|
||||
<%
|
||||
|
||||
Locale browserLocale = request.getLocale();
|
||||
CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale);
|
||||
%>
|
||||
|
||||
<!-- template detail panel (begin) -->
|
||||
<div class="main_title" id="right_panel_header">
|
||||
|
||||
<div class="main_titleicon">
|
||||
<img src="images/title_templatesicon.gif" alt="Instance" /></div>
|
||||
|
||||
<h1>Template
|
||||
</h1>
|
||||
</div>
|
||||
<div class="contentbox" id="right_panel_content">
|
||||
<div class="info_detailbox errorbox" id="after_action_info_container" style="display:none">
|
||||
<p id="after_action_info"></p>
|
||||
</div>
|
||||
<div class="tabbox" style="margin-top:15px;">
|
||||
<div class="content_tabs on">
|
||||
<%=t.t("Details")%></div>
|
||||
</div>
|
||||
<div class="grid_container">
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("ID")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Zone")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="zonename">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Name")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Display.Text")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="displaytext"></div>
|
||||
<input class="text" style="width:200px; display:none;" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Status")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="status">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Password.Enabled")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="passwordenabled">
|
||||
<div id="icon">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Public")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="ispublic">
|
||||
<div id="icon">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Featured")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="isfeatured">
|
||||
<div id="icon">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Cross.Zones")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="crossZones">
|
||||
<div id="icon">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("OS.Type")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="ostypename">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Account")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="account"></div>
|
||||
<select class="select" style="width:202px; display:none;"><option value="opt1">Option 1</option> <option value="opt2">Option 2</option></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Created")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="created">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Size")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="size">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- template detail panel (end) -->
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
-->
|
||||
|
||||
<%@ page import="java.util.*" %>
|
||||
|
||||
<%@ page import="com.cloud.utils.*" %>
|
||||
|
||||
<%
|
||||
|
|
@ -11,164 +12,170 @@
|
|||
Locale browserLocale = request.getLocale();
|
||||
CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale);
|
||||
%>
|
||||
|
||||
<!-- volume detail panel (begin) -->
|
||||
<div class="main_title" id="right_panel_header">
|
||||
<!--
|
||||
|
||||
<div class="main_titleicon">
|
||||
<img src="images/instancetitle_icons.gif" alt="Instance" /></div>
|
||||
-->
|
||||
<h1>Volume
|
||||
<img src="images/title_volumeicons.gif" alt="Volume" /></div>
|
||||
|
||||
<h1>
|
||||
Volume
|
||||
</h1>
|
||||
</div>
|
||||
<div class="contentbox" id="right_panel_content">
|
||||
<div class="info_detailbox errorbox" id="after_action_info_container" style="display:none">
|
||||
<p id="after_action_info"></p>
|
||||
</div>
|
||||
|
||||
<div class="grid_actionpanel">
|
||||
<div class="grid_actionbox" id="volume_action_link">
|
||||
<div class="grid_actionsdropdown_box" id="volume_action_menu" style="display:none">
|
||||
<ul class="actionsdropdown_boxlist" id="action_list">
|
||||
<!--
|
||||
<li> <a href="#"> Delete </a> </li>
|
||||
<li> <a href="#"> Attach Disk </a> </li>
|
||||
-->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="grid_editbox"></div>
|
||||
-->
|
||||
</div>
|
||||
<div class="gridheader_loaderbox" id="spinning_wheel" style="display:none">
|
||||
<div class="gridheader_loader" id="icon"></div>
|
||||
<p id="description"> Waiting … </p>
|
||||
</div>
|
||||
|
||||
<div class="tabbox" style="margin-top:15px;">
|
||||
<div class="info_detailbox errorbox" id="after_action_info_container" style="display: none">
|
||||
<p id="after_action_info">
|
||||
</p>
|
||||
</div>
|
||||
<div class="tabbox" style="margin-top: 15px;">
|
||||
<div class="content_tabs on">
|
||||
<%=t.t("Details")%></div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="grid_container">
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("ID")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="id">
|
||||
<%=t.t("Details")%></div>
|
||||
</div>
|
||||
<!--Details tab (start)-->
|
||||
<div id="tab_content_details">
|
||||
<div class="grid_actionpanel">
|
||||
<div class="grid_actionbox" id="volume_action_link">
|
||||
<div class="grid_actionsdropdown_box" id="volume_action_menu" style="display: none;">
|
||||
<ul class="actionsdropdown_boxlist" id="action_list">
|
||||
<!--
|
||||
<li> <a href="#"> Delete </a> </li>
|
||||
<li> <a href="#"> Attach Disk </a> </li>
|
||||
-->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Name")%>:</div>
|
||||
<div class="grid_editbox">
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="name">
|
||||
<div class="gridheader_loaderbox" id="spinning_wheel" style="border: 1px solid #999;
|
||||
display: none;">
|
||||
<div class="gridheader_loader" id="icon">
|
||||
</div>
|
||||
<p id="description">
|
||||
Detaching Disk …</p>
|
||||
</div>
|
||||
<div class="gridheader_message" id="action_message_box" style="border: 1px solid #999; display: none;">
|
||||
<p id="description"></p>
|
||||
<div class="close_button" id="close_button">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_container">
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("ID")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Type")%>:</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Name")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="type">
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Type")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="type">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Zone")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="zonename">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Instance.Name")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="vm_name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Device.ID")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="device_id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Size")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="size">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("State")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="state">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Created")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="created">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Storage")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="storage">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Account")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="account">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Zone")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="zonename">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Instance.Name")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="vm_name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Device.ID")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="device_id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Size")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="size">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("State")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="state">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Created")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="created">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Storage")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="storage">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("Account")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="account">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- volume detail panel (end) -->
|
||||
|
||||
<!-- Create Template Dialog -->
|
||||
<div id="dialog_create_template" title="Create Template" style="display:none">
|
||||
<div id="dialog_create_template" title="Create Template" style="display: none">
|
||||
<p>
|
||||
Please specify the following information before creating a template of your disk
|
||||
volume: <b><span id="volume_name"></span></b>. Creating a template could take up
|
||||
|
|
@ -199,7 +206,7 @@
|
|||
<li>
|
||||
<label for="create_template_public">
|
||||
Public:</label>
|
||||
<select class="select" name="create_template_public" id="create_template_public">
|
||||
<select class="select" name="create_template_public" id="create_template_public">
|
||||
<option value="false">No</option>
|
||||
<option value="true">Yes</option>
|
||||
</select>
|
||||
|
|
@ -207,7 +214,7 @@
|
|||
<li>
|
||||
<label for="user_name">
|
||||
Password Enabled?:</label>
|
||||
<select class="select" name="create_template_password" id="create_template_password">
|
||||
<select class="select" name="create_template_password" id="create_template_password">
|
||||
<option value="false">No</option>
|
||||
<option value="true">Yes</option>
|
||||
</select>
|
||||
|
|
@ -215,4 +222,5 @@
|
|||
</ol>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,28 +2,27 @@ function afterLoadAccountJSP() {
|
|||
|
||||
}
|
||||
|
||||
function accountToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("id", jsonObj.id);
|
||||
function accountToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
var iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
if (jsonObj.accounttype == roleTypeUser)
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_account_user.png");
|
||||
$iconContainer.find("#icon").attr("src", "images/midmenuicon_account_user.png");
|
||||
else if (jsonObj.accounttype == roleTypeAdmin)
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_account_admin.png");
|
||||
$iconContainer.find("#icon").attr("src", "images/midmenuicon_account_admin.png");
|
||||
else if (jsonObj.accounttype == roleTypeDomainAdmin)
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_account_domain.png");
|
||||
$iconContainer.find("#icon").attr("src", "images/midmenuicon_account_domain.png");
|
||||
|
||||
$midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(jsonObj.domain.substring(0,25));
|
||||
$midmenuItem1.data("toRightPanelFn", toRightPanelFn);
|
||||
$midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(fromdb(jsonObj.domain).substring(0,25));
|
||||
}
|
||||
|
||||
function accountToRigntPanel($midmenuItem) {
|
||||
var jsonObj = $midmenuItem.data("jsonObj");
|
||||
|
||||
var $rightPanelContent = $("#right_panel_content");
|
||||
$rightPanelContent.find("#id").text(jsonObj.id);
|
||||
$rightPanelContent.find("#role").text(toRole(jsonObj.accounttype));
|
||||
$rightPanelContent.find("#account").text(fromdb(jsonObj.name));
|
||||
$rightPanelContent.find("#domain").text(fromdb(jsonObj.domain));
|
||||
|
|
|
|||
|
|
@ -2,13 +2,11 @@ function afterLoadAlertJSP() {
|
|||
|
||||
}
|
||||
|
||||
function alertToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("id", jsonObj.id);
|
||||
function alertToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
$midmenuItem1.find("#first_row").text(jsonObj.description.substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25));
|
||||
$midmenuItem1.data("toRightPanelFn", toRightPanelFn);
|
||||
$midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25));
|
||||
}
|
||||
|
||||
function alertToRigntPanel($midmenuItem) {
|
||||
|
|
|
|||
|
|
@ -2,28 +2,27 @@ function afterLoadEventJSP() {
|
|||
|
||||
}
|
||||
|
||||
function eventToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("id", jsonObj.id);
|
||||
function eventToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
var iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
if(jsonObj.level == "INFO")
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_events_info.png");
|
||||
$iconContainer.find("#icon").attr("src", "images/midmenuicon_events_info.png");
|
||||
else if(jsonObj.level == "ERROR")
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_events_error.png");
|
||||
$iconContainer.find("#icon").attr("src", "images/midmenuicon_events_error.png");
|
||||
else if(jsonObj.level == "WARN")
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png");
|
||||
$iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png");
|
||||
|
||||
$midmenuItem1.find("#first_row").text(jsonObj.description.substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25));
|
||||
$midmenuItem1.data("toRightPanelFn", toRightPanelFn);
|
||||
$midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25));
|
||||
}
|
||||
|
||||
function eventToRigntPanel($midmenuItem) {
|
||||
var jsonObj = $midmenuItem.data("jsonObj");
|
||||
|
||||
var $rightPanelContent = $("#right_panel_content");
|
||||
$rightPanelContent.find("#id").text(fromdb(jsonObj.id));
|
||||
$rightPanelContent.find("#username").text(fromdb(jsonObj.username));
|
||||
$rightPanelContent.find("#account").text(fromdb(jsonObj.account));
|
||||
$rightPanelContent.find("#type").text(jsonObj.type);
|
||||
|
|
|
|||
|
|
@ -21,10 +21,11 @@ $(document).ready(function() {
|
|||
if(ui.selecting.id.indexOf("midmenuItem") != -1) {
|
||||
var $midmenuItem1 = $("#"+ui.selecting.id);
|
||||
if($midmenuItem1.find("#content").hasClass("inaction") == false) { //only items not in action are allowed to be selected
|
||||
var id =$midmenuItem1.data("id");
|
||||
var id =$midmenuItem1.data("jsonObj").id;
|
||||
selectedItemsInMidMenu[id] = $midmenuItem1;
|
||||
$midmenuItem1.find("#content").addClass("selected");
|
||||
}
|
||||
clearRightPanel();
|
||||
var toRightPanelFn = $midmenuItem1.data("toRightPanelFn");
|
||||
toRightPanelFn($midmenuItem1);
|
||||
}
|
||||
|
|
@ -32,7 +33,7 @@ $(document).ready(function() {
|
|||
unselecting: function(event, ui) {
|
||||
if(ui.unselecting.id.indexOf("midmenuItem") != -1) {
|
||||
var $midmenuItem1 = $("#"+ui.unselecting.id);
|
||||
var id = $midmenuItem1.data("id");
|
||||
var id = $midmenuItem1.data("jsonObj").id;
|
||||
if(id in selectedItemsInMidMenu) {
|
||||
delete selectedItemsInMidMenu[id];
|
||||
$midmenuItem1.find("#content").removeClass("selected");
|
||||
|
|
@ -41,33 +42,24 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
|
||||
function jsonToMidmenu(jsonObj, $midmenuItem1, propertyForFirstRow, propertyForSecondRow, toRightPanelFn) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("id", jsonObj.id);
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
$midmenuItem1.find("#first_row").text(jsonObj[propertyForFirstRow].substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(jsonObj[propertyForSecondRow].substring(0,25));
|
||||
$midmenuItem1.data("toRightPanelFn", toRightPanelFn);
|
||||
}
|
||||
|
||||
var $midmenuItem = $("#midmenu_item");
|
||||
function listMidMenuItems(leftmenuId, apiName, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSP, toMidmenu, toRightPanel) {
|
||||
function listMidMenuItems(leftmenuId, commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSP, toMidmenu, toRightPanel) {
|
||||
$("#"+leftmenuId).bind("click", function(event) {
|
||||
clearMidMenu();
|
||||
$("#right_panel").load(rightPanelJSP, function(){
|
||||
afterLoadRightPanelJSP();
|
||||
afterLoadRightPanelJSP();
|
||||
$.ajax({
|
||||
cache: false,
|
||||
data: createURL("command="+apiName+"&pagesize="+midmenuItemCount),
|
||||
data: createURL("command="+commandString+"&pagesize="+midmenuItemCount),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
$("#midmenu_container").empty();
|
||||
selectedItemsInMidMenu = {};
|
||||
|
||||
success: function(json) {
|
||||
selectedItemsInMidMenu = {};
|
||||
var items = json[jsonResponse1][jsonResponse2];
|
||||
if(items != null && items.length > 0) {
|
||||
for(var i=0; i<items.length;i++) {
|
||||
var $midmenuItem1 = $midmenuItem.clone();
|
||||
toMidmenu(items[i], $midmenuItem1, toRightPanel);
|
||||
var $midmenuItem1 = $midmenuItem.clone();
|
||||
$midmenuItem1.data("toRightPanelFn", toRightPanel);
|
||||
toMidmenu(items[i], $midmenuItem1);
|
||||
$("#midmenu_container").append($midmenuItem1.show());
|
||||
}
|
||||
}
|
||||
|
|
@ -83,13 +75,23 @@ $(document).ready(function() {
|
|||
listMidMenuItems("leftmenu_volume", "listVolumes", "listvolumesresponse", "volume", "jsp/volume.jsp", afterLoadVolumeJSP, volumeToMidmenu, volumeToRigntPanel);
|
||||
listMidMenuItems("leftmenu_snapshot", "listSnapshots", "listsnapshotsresponse", "snapshot", "jsp/snapshot.jsp", afterLoadSnapshotJSP, snapshotToMidmenu, snapshotToRigntPanel);
|
||||
listMidMenuItems("leftmenu_ip", "listPublicIpAddresses", "listpublicipaddressesresponse", "publicipaddress", "jsp/ip_address.jsp", afterLoadIpJSP, ipToMidmenu, ipToRigntPanel);
|
||||
|
||||
listMidMenuItems("leftmenu_submenu_my_template", "listTemplates&templatefilter=self", "listtemplatesresponse", "template", "jsp/template.jsp", afterLoadTemplateJSP, templateToMidmenu, templateToRigntPanel);
|
||||
listMidMenuItems("leftmenu_submenu_featured_template", "listTemplates&templatefilter=featured", "listtemplatesresponse", "template", "jsp/template.jsp", afterLoadTemplateJSP, templateToMidmenu, templateToRigntPanel);
|
||||
listMidMenuItems("leftmenu_submenu_community_template", "listTemplates&templatefilter=community", "listtemplatesresponse", "template", "jsp/template.jsp", afterLoadTemplateJSP, templateToMidmenu, templateToRigntPanel);
|
||||
|
||||
$("#leftmenu_instance_group_header").bind("click", function(event) {
|
||||
listMidMenuItems("leftmenu_submenu_my_iso", "listIsos&isofilter=self", "listisosresponse", "iso", "jsp/iso.jsp", afterLoadIsoJSP, isoToMidmenu, isoToRigntPanel);
|
||||
listMidMenuItems("leftmenu_submenu_featured_iso", "listIsos&isofilter=featured", "listisosresponse", "iso", "jsp/iso.jsp", afterLoadIsoJSP, isoToMidmenu, isoToRigntPanel);
|
||||
listMidMenuItems("leftmenu_submenu_community_iso", "listIsos&isofilter=community", "listisosresponse", "iso", "jsp/iso.jsp", afterLoadIsoJSP, isoToMidmenu, isoToRigntPanel);
|
||||
|
||||
$("#leftmenu_instance_group_header").bind("click", function(event) {
|
||||
clearMidMenu();
|
||||
var $arrowIcon = $(this).find("#arrow_icon");
|
||||
clickInstanceGroupHeader($arrowIcon);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,42 +19,42 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
api: "stopVirtualMachine",
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "stopvirtualmachineresponse",
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
},
|
||||
"Start Instance": {
|
||||
api: "startVirtualMachine",
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "startvirtualmachineresponse",
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
},
|
||||
"Reboot Instance": {
|
||||
api: "rebootVirtualMachine",
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "rebootvirtualmachineresponse",
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
},
|
||||
"Destroy Instance": {
|
||||
api: "destroyVirtualMachine",
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "destroyvirtualmachineresponse",
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
},
|
||||
"Restore Instance": {
|
||||
api: "recoverVirtualMachine",
|
||||
isAsyncJob: false,
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
},
|
||||
"Attach ISO": {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "attachisoresponse",
|
||||
dialogBeforeActionFn : doAttachISO,
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
},
|
||||
"Detach ISO": {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "detachisoresponse",
|
||||
dialogBeforeActionFn : doDetachISO,
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
},
|
||||
"Reset Password": {
|
||||
isAsyncJob: true,
|
||||
|
|
@ -65,28 +65,28 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
"Change Name": {
|
||||
isAsyncJob: false,
|
||||
dialogBeforeActionFn : doChangeName,
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
},
|
||||
"Change Service": {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "changeserviceforvirtualmachineresponse",
|
||||
dialogBeforeActionFn : doChangeService,
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
},
|
||||
"Change Group": {
|
||||
isAsyncJob: false,
|
||||
dialogBeforeActionFn : doChangeGroup,
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
},
|
||||
"Enable HA": {
|
||||
isAsyncJob: false,
|
||||
dialogBeforeActionFn : doEnableHA,
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
},
|
||||
"Disable HA": {
|
||||
isAsyncJob: false,
|
||||
dialogBeforeActionFn : doDisableHA,
|
||||
afterActionSeccessFn: vmJsonToMidmenu
|
||||
afterActionSeccessFn: vmToMidmenu
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -329,43 +329,25 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
midmenuItem.find("#icon").attr("src", "images/status_gray.png");
|
||||
}
|
||||
|
||||
function vmJsonToMidmenu(json, $midmenuItem) {
|
||||
$midmenuItem.data("jsonObj", json);
|
||||
$midmenuItem.data("toRightPanelFn", vmMidmenuToRightPanel);
|
||||
$midmenuItem.attr("id", ("midmenuItem_"+json.id));
|
||||
$midmenuItem.data("id", json.id);
|
||||
function vmToMidmenu(json, $midmenuItem1) {
|
||||
$midmenuItem1.data("jsonObj", json);
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+json.id));
|
||||
|
||||
$midmenuItem.find("#icon").attr("src", "images/status_gray.png");
|
||||
$midmenuItem.find("#icon_container").show();
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
$iconContainer.find("#icon").attr("src", "images/status_gray.png");
|
||||
|
||||
var vmName = getVmName(json.name, json.displayname);
|
||||
$midmenuItem.find("#first_row").text(vmName);
|
||||
//$midmenuItem.find("#second_row_label").text("IP Address:");
|
||||
$midmenuItem.find("#second_row").text(json.ipaddress);
|
||||
updateVirtualMachineStateInMidMenu(json, $midmenuItem);
|
||||
$midmenuItem.bind("click", function(event) {
|
||||
$midmenuItem1.find("#first_row").text(vmName);
|
||||
$midmenuItem1.find("#second_row").text(json.ipaddress);
|
||||
updateVirtualMachineStateInMidMenu(json, $midmenuItem1);
|
||||
$midmenuItem1.bind("click", function(event) {
|
||||
var $t = $(this);
|
||||
vmMidmenuToRightPanel($t);
|
||||
vmToRightPanel($t);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function vmClearRightPanel(jsonObj) {
|
||||
$rightPanelHeader.find("#vm_name").text("");
|
||||
updateVirtualMachineStateInRightPanel("");
|
||||
$rightPanelContent.find("#ipAddress").text("");
|
||||
$rightPanelContent.find("#zoneName").text("");
|
||||
$rightPanelContent.find("#templateName").text("");
|
||||
$rightPanelContent.find("#serviceOfferingName").text("");
|
||||
$rightPanelContent.find("#ha").hide();
|
||||
$rightPanelContent.find("#created").text("");
|
||||
$rightPanelContent.find("#account").text("");
|
||||
$rightPanelContent.find("#domain").text("");
|
||||
$rightPanelContent.find("#hostName").text("");
|
||||
$rightPanelContent.find("#group").text("");
|
||||
$rightPanelContent.find("#iso").hide();
|
||||
}
|
||||
|
||||
function vmMidmenuToRightPanel($midmenuItem) {
|
||||
function vmToRightPanel($midmenuItem) {
|
||||
//details tab
|
||||
if($midmenuItem.find("#info_icon").css("display") != "none") {
|
||||
$rightPanelContent.find("#after_action_info").text($midmenuItem.data("afterActionInfo"));
|
||||
|
|
@ -387,20 +369,15 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
$rightPanelContent.find("#ipAddress").text(jsonObj.ipaddress);
|
||||
$rightPanelContent.find("#zoneName").text(fromdb(jsonObj.zonename));
|
||||
$rightPanelContent.find("#templateName").text(fromdb(jsonObj.templatename));
|
||||
$rightPanelContent.find("#serviceOfferingName").text(fromdb(jsonObj.serviceofferingname));
|
||||
if(jsonObj.haenable == "true")
|
||||
$rightPanelContent.find("#ha").removeClass("cross_icon").addClass("tick_icon").show();
|
||||
else
|
||||
$rightPanelContent.find("#ha").removeClass("tick_icon").addClass("cross_icon").show();
|
||||
$rightPanelContent.find("#serviceOfferingName").text(fromdb(jsonObj.serviceofferingname));
|
||||
$rightPanelContent.find("#created").text(jsonObj.created);
|
||||
$rightPanelContent.find("#account").text(fromdb(jsonObj.account));
|
||||
$rightPanelContent.find("#domain").text(fromdb(jsonObj.domain));
|
||||
$rightPanelContent.find("#hostName").text(fromdb(jsonObj.hostname));
|
||||
$rightPanelContent.find("#group").text(fromdb(jsonObj.group));
|
||||
if(jsonObj.isoid != null && jsonObj.isoid.length > 0)
|
||||
$rightPanelContent.find("#iso").removeClass("cross_icon").addClass("tick_icon").show();
|
||||
else
|
||||
$rightPanelContent.find("#iso").removeClass("tick_icon").addClass("cross_icon").show();
|
||||
|
||||
setBooleanField(jsonObj.haenable, $rightPanelContent.find("#ha"));
|
||||
setBooleanField((jsonObj.isoid != null && jsonObj.isoid.length > 0), $rightPanelContent.find("#iso"));
|
||||
|
||||
//volume tab
|
||||
//if (getHypervisorType() == "kvm")
|
||||
|
|
@ -423,6 +400,22 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function vmClearRightPanel(jsonObj) {
|
||||
$rightPanelHeader.find("#vm_name").text("");
|
||||
updateVirtualMachineStateInRightPanel("");
|
||||
$rightPanelContent.find("#ipAddress").text("");
|
||||
$rightPanelContent.find("#zoneName").text("");
|
||||
$rightPanelContent.find("#templateName").text("");
|
||||
$rightPanelContent.find("#serviceOfferingName").text("");
|
||||
$rightPanelContent.find("#ha").hide();
|
||||
$rightPanelContent.find("#created").text("");
|
||||
$rightPanelContent.find("#account").text("");
|
||||
$rightPanelContent.find("#domain").text("");
|
||||
$rightPanelContent.find("#hostName").text("");
|
||||
$rightPanelContent.find("#group").text("");
|
||||
$rightPanelContent.find("#iso").hide();
|
||||
}
|
||||
|
||||
//***** declaration for volume tab (begin) *********************************************************
|
||||
var vmVolumeActionMap = {
|
||||
|
|
@ -440,7 +433,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
"Create Template": {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "createtemplateresponse",
|
||||
dialogBeforeActionFn : doCreateTemplate,
|
||||
dialogBeforeActionFn : doCreateTemplateFromVmVolume,
|
||||
inProcessText: "Creating template....",
|
||||
afterActionSeccessFn: function(){}
|
||||
}
|
||||
|
|
@ -474,17 +467,21 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
$actionMenu.find("#action_list").empty();
|
||||
if(json.type=="ROOT") { //"create template" is allowed(when stopped), "detach disk" is disallowed.
|
||||
if (json.vmstate == "Stopped")
|
||||
buildActionLinkForSingleObject("Create Template", vmVolumeActionMap, $actionMenu, volumeListAPIMap, template);
|
||||
buildActionLinkForSubgridItem("Create Template", vmVolumeActionMap, $actionMenu, volumeListAPIMap, template);
|
||||
}
|
||||
else { //json.type=="DATADISK": "detach disk" is allowed, "create template" is disallowed.
|
||||
buildActionLinkForSingleObject("Detach Disk", vmVolumeActionMap, $actionMenu, volumeListAPIMap, template);
|
||||
buildActionLinkForSubgridItem("Detach Disk", vmVolumeActionMap, $actionMenu, volumeListAPIMap, template);
|
||||
}
|
||||
|
||||
template.find("#action_message_box #close_button").bind("click", function(event){
|
||||
$(this).parent().hide();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
//***** declaration for volume tab (end) *********************************************************
|
||||
|
||||
|
||||
$("#add_link").show();
|
||||
$("#midmenu_add_link").show();
|
||||
if($arrowIcon.hasClass("close") == true) {
|
||||
$arrowIcon.removeClass("close").addClass("open");
|
||||
$.ajax({
|
||||
|
|
@ -511,15 +508,16 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
}
|
||||
for(var i=0; i < instanceGroupArray.length; i++) {
|
||||
if(instanceGroupArray[i]!=null && instanceGroupArray[i].length>0) {
|
||||
var $groupTemplate = $("#leftmenu_instance_group_template").clone().show();
|
||||
$groupTemplate.find("#group_name").text(instanceGroupArray[i]);
|
||||
|
||||
$groupTemplate.bind("click", function(event) {
|
||||
var $leftmenuSubmenuTemplate = $("#leftmenu_submenu_template").clone().show();
|
||||
$leftmenuSubmenuTemplate.find("#submenu_name").text(instanceGroupArray[i]);
|
||||
$leftmenuSubmenuTemplate.find("#icon").attr("src", "images/instance_leftmenuicon.png").show();
|
||||
|
||||
$leftmenuSubmenuTemplate.bind("click", function(event) {
|
||||
//$(this).removeClass("leftmenu_content").addClass("leftmenu_content_selected");
|
||||
$("#midmenu_container").empty();
|
||||
selectedItemsInMidMenu = {};
|
||||
|
||||
var groupName = $(this).find("#group_name").text();
|
||||
var groupName = $(this).find("#submenu_name").text();
|
||||
var group1 = groupName;
|
||||
if(groupName == noGroupName)
|
||||
group1 = "";
|
||||
|
|
@ -531,15 +529,16 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
success: function(json) {
|
||||
var instances = json.listvirtualmachinesresponse.virtualmachine;
|
||||
for(var i=0; i<instances.length;i++) {
|
||||
var $template = $midmenuItem.clone();
|
||||
vmJsonToMidmenu(instances[i], $template);
|
||||
$("#midmenu_container").append($template.show());
|
||||
var $midmenuItem1 = $midmenuItem.clone();
|
||||
$midmenuItem1.data("toRightPanelFn", vmToRightPanel);
|
||||
vmToMidmenu(instances[i], $midmenuItem1);
|
||||
$("#midmenu_container").append($midmenuItem1.show());
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$("#leftmenu_instance_group_container").append($groupTemplate);
|
||||
$("#leftmenu_instance_group_container").append($leftmenuSubmenuTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -629,7 +628,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
var currentPageInTemplateGridInVmPopup =1;
|
||||
var selectedTemplateTypeInVmPopup; //selectedTemplateTypeInVmPopup will be set to "featured" when new VM dialog box opens
|
||||
|
||||
$("#add_link").unbind("click").bind("click", function(event) {
|
||||
$("#midmenu_add_link").unbind("click").bind("click", function(event) {
|
||||
vmWizardOpen();
|
||||
$.ajax({
|
||||
data: createURL("command=listZones&available=true"),
|
||||
|
|
@ -1177,7 +1176,7 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
$t.find("#info_icon").removeClass("error").show();
|
||||
$t.data("afterActionInfo", ("Adding succeeded."));
|
||||
if("virtualmachine" in result)
|
||||
vmJsonToMidmenu(result.virtualmachine[0], $t);
|
||||
vmToMidmenu(result.virtualmachine[0], $t);
|
||||
|
||||
} else if (result.jobstatus == 2) {
|
||||
// Failed
|
||||
|
|
@ -1261,5 +1260,37 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
});
|
||||
}
|
||||
|
||||
function doCreateTemplateFromVmVolume($actionLink, listAPIMap, $subgridItem) {
|
||||
var jsonObj = $subgridItem.data("jsonObj");
|
||||
$("#dialog_create_template").find("#volume_name").text(jsonObj.name);
|
||||
|
||||
$("#dialog_create_template")
|
||||
.dialog('option', 'buttons', {
|
||||
"Create": function() {
|
||||
//debugger;
|
||||
var thisDialog = $(this);
|
||||
thisDialog.dialog("close");
|
||||
|
||||
// validate values
|
||||
var isValid = true;
|
||||
isValid &= validateString("Name", thisDialog.find("#create_template_name"), thisDialog.find("#create_template_name_errormsg"));
|
||||
isValid &= validateString("Display Text", thisDialog.find("#create_template_desc"), thisDialog.find("#create_template_desc_errormsg"));
|
||||
if (!isValid) return;
|
||||
|
||||
var name = trim(thisDialog.find("#create_template_name").val());
|
||||
var desc = trim(thisDialog.find("#create_template_desc").val());
|
||||
var osType = thisDialog.find("#create_template_os_type").val();
|
||||
var isPublic = thisDialog.find("#create_template_public").val();
|
||||
var password = thisDialog.find("#create_template_password").val();
|
||||
|
||||
var id = $subgridItem.data("jsonObj").id;
|
||||
var apiCommand = "command=createTemplate&volumeId="+id+"&name="+encodeURIComponent(name)+"&displayText="+encodeURIComponent(desc)+"&osTypeId="+osType+"&isPublic="+isPublic+"&passwordEnabled="+password;
|
||||
doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgridItem);
|
||||
},
|
||||
"Cancel": function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}).dialog("open");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2,24 +2,19 @@ function afterLoadIpJSP() {
|
|||
|
||||
}
|
||||
|
||||
function ipToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("id", jsonObj.id);
|
||||
function ipToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
var iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_network_networkgroup.png");
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
$iconContainer.find("#icon").attr("src", "images/midmenuicon_network_networkgroup.png");
|
||||
|
||||
$midmenuItem1.find("#first_row").text(jsonObj.ipaddress.substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(jsonObj.account.substring(0,25));
|
||||
$midmenuItem1.data("toRightPanelFn", toRightPanelFn);
|
||||
$midmenuItem1.find("#second_row").text(fromdb(jsonObj.account).substring(0,25));
|
||||
}
|
||||
|
||||
function ipToRigntPanel($midmenuItem) {
|
||||
var jsonObj = $midmenuItem.data("jsonObj");
|
||||
|
||||
var $rightPanelContent = $("#right_panel_content");
|
||||
//$rightPanelContent.find("#type").text(jsonObj.type);
|
||||
//$rightPanelContent.find("#description").text(jsonObj.description);
|
||||
//setDateField(jsonObj.sent, $rightPanelContent.find("#sent"));
|
||||
var $rightPanelContent = $("#right_panel_content");
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
function afterLoadIsoJSP() {
|
||||
|
||||
}
|
||||
|
||||
function isoToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
setIconByOsType(jsonObj.ostypename, $iconContainer.find("#icon"));
|
||||
|
||||
$midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(fromdb(jsonObj.zonename).substring(0,25));
|
||||
}
|
||||
|
||||
function isoToRigntPanel($midmenuItem) {
|
||||
var jsonObj = $midmenuItem.data("jsonObj");
|
||||
|
||||
var $rightPanelContent = $("#right_panel_content");
|
||||
$rightPanelContent.find("#id").text(fromdb(jsonObj.id));
|
||||
$rightPanelContent.find("#zonename").text(fromdb(jsonObj.zonename));
|
||||
$rightPanelContent.find("#name").text(fromdb(jsonObj.name));
|
||||
$rightPanelContent.find("#displaytext").text(fromdb(jsonObj.displaytext));
|
||||
$rightPanelContent.find("#account").text(fromdb(jsonObj.account));
|
||||
|
||||
if(jsonObj.size != null)
|
||||
$rightPanelContent.find("#size").text(convertBytes(parseInt(jsonObj.size)));
|
||||
|
||||
var status = "Ready";
|
||||
if (jsonObj.isready == "false")
|
||||
status = jsonObj.isostatus;
|
||||
$rightPanelContent.find("#status").text(status);
|
||||
|
||||
setBooleanField(jsonObj.bootable, $rightPanelContent.find("#bootable"));
|
||||
setDateField(jsonObj.created, $rightPanelContent.find("#created"));
|
||||
}
|
||||
|
|
@ -100,11 +100,11 @@ function doActionForMidMenu(id, $actionLink, apiCommand, listAPIMap) {
|
|||
data: createURL("command="+listAPI+"&id="+id),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem);
|
||||
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem, $midmenuItem.data("toRightPanelFn"));
|
||||
}
|
||||
});
|
||||
//After Bug 6037 is fixed, remove temporary solution above and uncomment the line below
|
||||
//afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem);
|
||||
//afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem, $midmenuItem.data("toRightPanelFn"));
|
||||
|
||||
} else if (result.jobstatus == 2) { // Failed
|
||||
$midmenuItem.find("#info_icon").addClass("error").show();
|
||||
|
|
@ -148,11 +148,11 @@ function doActionForMidMenu(id, $actionLink, apiCommand, listAPIMap) {
|
|||
success: function(json) {
|
||||
$midmenuItem.find("#info_icon").removeClass("error").show();
|
||||
$midmenuItem.data("afterActionInfo", (label + " action succeeded."));
|
||||
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem);
|
||||
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem, $midmenuItem.data("toRightPanelFn"));
|
||||
}
|
||||
});
|
||||
//After Bug 6037 is fixed, remove temporary solution above and uncomment the line below
|
||||
//afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem);
|
||||
//afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem, $midmenuItem.data("toRightPanelFn"));
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
handleErrorInMidMenu(XMLHttpResponse, $midmenuItem);
|
||||
|
|
@ -180,9 +180,8 @@ function handleErrorInMidMenu(XMLHttpResponse, $midmenuItem) {
|
|||
}
|
||||
//***** actions for middle menu (end) **************************************************************************
|
||||
|
||||
//***** actions for right panel (begin) ************************************************************************
|
||||
function buildActionLinkForSingleObject(label, actionMap, $actionMenu, listAPIMap, $singleObject) {
|
||||
//debugger;
|
||||
//***** actions for details tab in right panel (begin) ************************************************************************
|
||||
function buildActionLinkForDetailsTab(label, actionMap, $actionMenu, listAPIMap) {
|
||||
var apiInfo = actionMap[label];
|
||||
var $listItem = $("#action_list_item").clone();
|
||||
$actionMenu.find("#action_list").append($listItem.show());
|
||||
|
|
@ -195,25 +194,25 @@ function buildActionLinkForSingleObject(label, actionMap, $actionMenu, listAPIMa
|
|||
$link.data("afterActionSeccessFn", apiInfo.afterActionSeccessFn);
|
||||
$link.data("dialogBeforeActionFn", apiInfo.dialogBeforeActionFn);
|
||||
|
||||
var id = $singleObject.data("jsonObj").id;
|
||||
var $detailsTab = $("#right_panel_content #tab_content_details");
|
||||
var id = $detailsTab.data("jsonObj").id;
|
||||
|
||||
$link.bind("click", function(event) {
|
||||
//debugger;
|
||||
$link.bind("click", function(event) {
|
||||
$actionMenu.hide();
|
||||
var $actionLink = $(this);
|
||||
var dialogBeforeActionFn = $actionLink.data("dialogBeforeActionFn");
|
||||
if(dialogBeforeActionFn == null) {
|
||||
var apiCommand = "command="+$actionLink.data("api")+"&id="+id;
|
||||
doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $singleObject);
|
||||
doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap);
|
||||
}
|
||||
else {
|
||||
dialogBeforeActionFn($actionLink, listAPIMap, $singleObject);
|
||||
dialogBeforeActionFn($actionLink, listAPIMap, $detailsTab);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $singleObject) {
|
||||
function doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap) {
|
||||
var label = $actionLink.data("label");
|
||||
var inProcessText = $actionLink.data("inProcessText");
|
||||
var isAsyncJob = $actionLink.data("isAsyncJob");
|
||||
|
|
@ -222,9 +221,9 @@ function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $single
|
|||
var listAPI = listAPIMap["listAPI"];
|
||||
var listAPIResponse = listAPIMap["listAPIResponse"];
|
||||
var listAPIResponseObj = listAPIMap["listAPIResponseObj"];
|
||||
|
||||
//debugger;
|
||||
var $spinningWheel = $singleObject.find("#spinning_wheel");
|
||||
|
||||
var $detailsTab = $("#right_panel_content #tab_content_details");
|
||||
var $spinningWheel = $detailsTab.find("#spinning_wheel");
|
||||
$spinningWheel.find("#description").text(inProcessText);
|
||||
$spinningWheel.show();
|
||||
|
||||
|
|
@ -233,8 +232,7 @@ function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $single
|
|||
$.ajax({
|
||||
data: createURL(apiCommand),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
//debugger;
|
||||
success: function(json) {
|
||||
var jobId = json[asyncJobResponse].jobid;
|
||||
var timerKey = "asyncJob_" + jobId;
|
||||
$("body").everyTime(
|
||||
|
|
@ -244,16 +242,16 @@ function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $single
|
|||
$.ajax({
|
||||
data: createURL("command=queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
//debugger;
|
||||
success: function(json) {
|
||||
var result = json.queryasyncjobresultresponse;
|
||||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
} else {
|
||||
$("body").stopTime(timerKey);
|
||||
$spinningWheel.hide();
|
||||
if (result.jobstatus == 1) { // Succeeded
|
||||
$singleObject.data("afterActionInfo", (label + " action succeeded."));
|
||||
if (result.jobstatus == 1) { // Succeeded
|
||||
$detailsTab.find("#action_message_box #description").text(label + " action succeeded.");
|
||||
$detailsTab.find("#action_message_box").removeClass("error").show();
|
||||
|
||||
//DestroyVirtualMachine API doesn't return an embedded object on success (Bug 6041)
|
||||
//Before Bug 6041 get fixed, use the temporary solution below.
|
||||
|
|
@ -262,44 +260,41 @@ function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $single
|
|||
data: createURL("command="+listAPI+"&id="+id),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $singleObject);
|
||||
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]);
|
||||
}
|
||||
});
|
||||
//After Bug 6037 is fixed, remove temporary solution above and uncomment the line below
|
||||
//afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $singleObject);
|
||||
//afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]);
|
||||
|
||||
} else if (result.jobstatus == 2) { // Failed
|
||||
$singleObject.data("afterActionInfo", (label + " action failed. Reason: " + sanitizeXSS(result.jobresult)));
|
||||
} else if (result.jobstatus == 2) { // Failed
|
||||
$detailsTab.find("#action_message_box #description").text(label + " action failed. Reason: " + sanitizeXSS(result.jobresult));
|
||||
$detailsTab.find("#action_message_box").addClass("error").show();
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
//debugger;
|
||||
error: function(XMLHttpResponse) {
|
||||
$("body").stopTime(timerKey);
|
||||
handleErrorInSingleObject(XMLHttpResponse, $singleObject, label);
|
||||
handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label);
|
||||
}
|
||||
});
|
||||
},
|
||||
0
|
||||
);
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
//debugger;
|
||||
handleErrorInSingleObject(XMLHttpResponse, $singleObject, label);
|
||||
error: function(XMLHttpResponse) {
|
||||
handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label);
|
||||
}
|
||||
});
|
||||
}
|
||||
//Async job (end) *****
|
||||
|
||||
//Sync job (begin) *****
|
||||
else {
|
||||
//debugger;
|
||||
else {
|
||||
$.ajax({
|
||||
data: createURL(apiCommand),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
//debugger;
|
||||
success: function(json) {
|
||||
$spinningWheel.hide();
|
||||
|
||||
//RecoverVirtualMachine API doesn't return an embedded object on success (Bug 6037)
|
||||
|
|
@ -310,25 +305,25 @@ function doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $single
|
|||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
$singleObject.data("afterActionInfo", (label + " action succeeded."));
|
||||
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $singleObject);
|
||||
$detailsTab.find("#action_message_box #description").text(label + " action succeeded.");
|
||||
$detailsTab.find("#action_message_box").removeClass("error").show();
|
||||
|
||||
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]);
|
||||
}
|
||||
});
|
||||
//After Bug 6037 is fixed, remove temporary solution above and uncomment the line below
|
||||
//afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $singleObject);
|
||||
//afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0]);
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
//debugger;
|
||||
handleErrorInSingleObject(XMLHttpResponse, $singleObject, label);
|
||||
error: function(XMLHttpResponse) {
|
||||
handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label);
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sync job (end) *****
|
||||
}
|
||||
|
||||
function handleErrorInSingleObject(XMLHttpResponse, $singleObject, label) {
|
||||
//debugger;
|
||||
$singleObject.find("#spinning_wheel").hide();
|
||||
function handleErrorInDetailsTab(XMLHttpResponse, $detailsTab, label) {
|
||||
$detailsTab.find("#spinning_wheel").hide();
|
||||
|
||||
var errorMsg = "";
|
||||
if(XMLHttpResponse.responseText != null & XMLHttpResponse.responseText.length > 0) {
|
||||
|
|
@ -337,11 +332,168 @@ function handleErrorInSingleObject(XMLHttpResponse, $singleObject, label) {
|
|||
errorMsg = XMLHttpResponse.responseText.substring(start, end);
|
||||
}
|
||||
if(errorMsg.length > 0)
|
||||
$singleObject.data("afterActionInfo", ((label + " action failed. Reason: " + sanitizeXSS(unescape(errorMsg)))));
|
||||
$detailsTab.find("#action_message_box #description").text(label + " action failed. Reason: " + sanitizeXSS(unescape(errorMsg)));
|
||||
else
|
||||
$singleObject.data("afterActionInfo", (label + " action failed."));
|
||||
$detailsTab.find("#action_message_box #description").text(label + " action failed.");
|
||||
$detailsTab.find("#action_message_box").addClass("error").show();
|
||||
}
|
||||
//***** actions for right panel (end) **************************************************************************
|
||||
//***** actions for details tab in right panel (end) **************************************************************************
|
||||
|
||||
//***** actions for a subgrid item in right panel (begin) ************************************************************************
|
||||
function buildActionLinkForSubgridItem(label, actionMap, $actionMenu, listAPIMap, $subgridItem) {
|
||||
var apiInfo = actionMap[label];
|
||||
var $listItem = $("#action_list_item").clone();
|
||||
$actionMenu.find("#action_list").append($listItem.show());
|
||||
var $link = $listItem.find("#link").text(label);
|
||||
$link.data("label", label);
|
||||
$link.data("inProcessText", apiInfo.inProcessText);
|
||||
$link.data("api", apiInfo.api);
|
||||
$link.data("isAsyncJob", apiInfo.isAsyncJob);
|
||||
$link.data("asyncJobResponse", apiInfo.asyncJobResponse);
|
||||
$link.data("afterActionSeccessFn", apiInfo.afterActionSeccessFn);
|
||||
$link.data("dialogBeforeActionFn", apiInfo.dialogBeforeActionFn);
|
||||
|
||||
var id = $subgridItem.data("jsonObj").id;
|
||||
|
||||
$link.bind("click", function(event) {
|
||||
$actionMenu.hide();
|
||||
var $actionLink = $(this);
|
||||
var dialogBeforeActionFn = $actionLink.data("dialogBeforeActionFn");
|
||||
if(dialogBeforeActionFn == null) {
|
||||
var apiCommand = "command="+$actionLink.data("api")+"&id="+id;
|
||||
doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgridItem);
|
||||
}
|
||||
else {
|
||||
dialogBeforeActionFn($actionLink, listAPIMap, $subgridItem);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function doActionToSubgridItem(id, $actionLink, apiCommand, listAPIMap, $subgridItem) {
|
||||
var label = $actionLink.data("label");
|
||||
var inProcessText = $actionLink.data("inProcessText");
|
||||
var isAsyncJob = $actionLink.data("isAsyncJob");
|
||||
var asyncJobResponse = $actionLink.data("asyncJobResponse");
|
||||
var afterActionSeccessFn = $actionLink.data("afterActionSeccessFn");
|
||||
var listAPI = listAPIMap["listAPI"];
|
||||
var listAPIResponse = listAPIMap["listAPIResponse"];
|
||||
var listAPIResponseObj = listAPIMap["listAPIResponseObj"];
|
||||
|
||||
var $spinningWheel = $subgridItem.find("#spinning_wheel");
|
||||
$spinningWheel.find("#description").text(inProcessText);
|
||||
$spinningWheel.show();
|
||||
|
||||
//Async job (begin) *****
|
||||
if(isAsyncJob == true) {
|
||||
$.ajax({
|
||||
data: createURL(apiCommand),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json[asyncJobResponse].jobid;
|
||||
var timerKey = "asyncJob_" + jobId;
|
||||
$("body").everyTime(
|
||||
10000,
|
||||
timerKey,
|
||||
function() {
|
||||
$.ajax({
|
||||
data: createURL("command=queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var result = json.queryasyncjobresultresponse;
|
||||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
} else {
|
||||
$("body").stopTime(timerKey);
|
||||
$spinningWheel.hide();
|
||||
if (result.jobstatus == 1) { // Succeeded
|
||||
$subgridItem.find("#action_message_box #description").text(label + " action succeeded.");
|
||||
$subgridItem.find("#action_message_box").removeClass("error").show();
|
||||
|
||||
//DestroyVirtualMachine API doesn't return an embedded object on success (Bug 6041)
|
||||
//Before Bug 6041 get fixed, use the temporary solution below.
|
||||
$.ajax({
|
||||
cache: false,
|
||||
data: createURL("command="+listAPI+"&id="+id),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $subgridItem);
|
||||
}
|
||||
});
|
||||
//After Bug 6037 is fixed, remove temporary solution above and uncomment the line below
|
||||
//afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $subgridItem);
|
||||
|
||||
} else if (result.jobstatus == 2) { // Failed
|
||||
$subgridItem.find("#action_message_box #description").text(label + " action failed. Reason: " + sanitizeXSS(result.jobresult));
|
||||
$subgridItem.find("#action_message_box").addClass("error").show();
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
$("body").stopTime(timerKey);
|
||||
handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label);
|
||||
}
|
||||
});
|
||||
},
|
||||
0
|
||||
);
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label);
|
||||
}
|
||||
});
|
||||
}
|
||||
//Async job (end) *****
|
||||
|
||||
//Sync job (begin) *****
|
||||
else {
|
||||
$.ajax({
|
||||
data: createURL(apiCommand),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
$spinningWheel.hide();
|
||||
|
||||
//RecoverVirtualMachine API doesn't return an embedded object on success (Bug 6037)
|
||||
//Before Bug 6037 get fixed, use the temporary solution below.
|
||||
$.ajax({
|
||||
cache: false,
|
||||
data: createURL("command="+listAPI+"&id="+id),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
$subgridItem.find("#action_message_box #description").text(label + " action succeeded.");
|
||||
$subgridItem.find("#action_message_box").removeClass("error").show();
|
||||
afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $subgridItem);
|
||||
}
|
||||
});
|
||||
//After Bug 6037 is fixed, remove temporary solution above and uncomment the line below
|
||||
//afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $subgridItem);
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label);
|
||||
}
|
||||
});
|
||||
}
|
||||
//Sync job (end) *****
|
||||
}
|
||||
|
||||
function handleErrorInSubgridItem(XMLHttpResponse, $subgridItem, label) {
|
||||
$subgridItem.find("#spinning_wheel").hide();
|
||||
|
||||
var errorMsg = "";
|
||||
if(XMLHttpResponse.responseText != null & XMLHttpResponse.responseText.length > 0) {
|
||||
var start = XMLHttpResponse.responseText.indexOf("h1") + 3;
|
||||
var end = XMLHttpResponse.responseText.indexOf("</h1");
|
||||
errorMsg = XMLHttpResponse.responseText.substring(start, end);
|
||||
}
|
||||
if(errorMsg.length > 0)
|
||||
$subgridItem.find("#action_message_box #description").text(label + " action failed. Reason: " + sanitizeXSS(unescape(errorMsg)));
|
||||
else
|
||||
$subgridItem.find("#action_message_box #description").text(label + " action failed.");
|
||||
$subgridItem.find("#action_message_box").addClass("error").show();
|
||||
}
|
||||
//***** actions for a subgrid item in right panel (end) **************************************************************************
|
||||
|
||||
|
||||
|
||||
|
|
@ -360,6 +512,25 @@ function todb(val) {
|
|||
|
||||
var midmenuItemCount = 20;
|
||||
|
||||
function setBooleanField(value, $field) {
|
||||
if(value == "true")
|
||||
$field.find("#icon").removeClass("cross_icon").addClass("tick_icon").show();
|
||||
else
|
||||
$field.find("#icon").removeClass("tick_icon").addClass("cross_icon").show();
|
||||
}
|
||||
|
||||
function clearMidMenu() {
|
||||
$("#midmenu_container").empty();
|
||||
$("#midmenu_action_link").hide();
|
||||
$("#midmenu_add_link").hide();
|
||||
}
|
||||
|
||||
function clearRightPanel() {
|
||||
$("#right_panel_content #action_message_box").hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,17 +2,15 @@ function afterLoadSnapshotJSP() {
|
|||
|
||||
}
|
||||
|
||||
function snapshotToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("id", jsonObj.id);
|
||||
function snapshotToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
var iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_storage_snapshots.png");
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
$iconContainer.find("#icon").attr("src", "images/midmenuicon_storage_snapshots.png");
|
||||
|
||||
$midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(jsonObj.volumename.substring(0,25));
|
||||
$midmenuItem1.data("toRightPanelFn", toRightPanelFn);
|
||||
$midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(fromdb(jsonObj.volumename).substring(0,25));
|
||||
}
|
||||
|
||||
function snapshotToRigntPanel($midmenuItem) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
function afterLoadTemplateJSP() {
|
||||
|
||||
}
|
||||
|
||||
function templateToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
setIconByOsType(jsonObj.ostypename, $iconContainer.find("#icon"));
|
||||
|
||||
if(jsonObj.level == "INFO")
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_events_info.png");
|
||||
else if(jsonObj.level == "ERROR")
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_events_error.png");
|
||||
else if(jsonObj.level == "WARN")
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_events_warning.png");
|
||||
|
||||
$midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(fromdb(jsonObj.zonename).substring(0,25));
|
||||
}
|
||||
|
||||
function templateToRigntPanel($midmenuItem) {
|
||||
var jsonObj = $midmenuItem.data("jsonObj");
|
||||
|
||||
var $rightPanelContent = $("#right_panel_content");
|
||||
$rightPanelContent.find("#id").text(fromdb(jsonObj.id));
|
||||
$rightPanelContent.find("#zonename").text(fromdb(jsonObj.zonename));
|
||||
$rightPanelContent.find("#name").text(fromdb(jsonObj.name));
|
||||
$rightPanelContent.find("#displaytext").text(fromdb(jsonObj.displaytext));
|
||||
|
||||
var status = "Ready";
|
||||
if (jsonObj.isready == "false")
|
||||
status = jsonObj.templatestatus;
|
||||
$rightPanelContent.find("#status").text(status);
|
||||
|
||||
setBooleanField(jsonObj.passwordenabled, $rightPanelContent.find("#passwordenabled"));
|
||||
setBooleanField(jsonObj.ispublic, $rightPanelContent.find("#ispublic"));
|
||||
setBooleanField(jsonObj.isfeatured, $rightPanelContent.find("#isfeatured"));
|
||||
setBooleanField(jsonObj.crossZones, $rightPanelContent.find("#crossZones"));
|
||||
|
||||
$rightPanelContent.find("#ostypename").text(fromdb(jsonObj.ostypename));
|
||||
$rightPanelContent.find("#account").text(fromdb(jsonObj.account));
|
||||
|
||||
if(jsonObj.size != null)
|
||||
$rightPanelContent.find("#size").text(convertBytes(parseInt(jsonObj.size)));
|
||||
|
||||
setDateField(jsonObj.created, $rightPanelContent.find("#created"));
|
||||
}
|
||||
|
||||
//setIconByOsType() is shared by template page and ISO page
|
||||
function setIconByOsType(osType, $field) {
|
||||
if (osType == null || osType.length == 0)
|
||||
return;
|
||||
if (osType.match("^CentOS") != null)
|
||||
$field.attr("src", "images/midmenuicon_template_centos.png");
|
||||
else if (osType.match("^Windows") != null)
|
||||
$field.attr("src", "images/midmenuicon_template_windows.png");
|
||||
else
|
||||
$field.attr("src", "images/midmenuicon_template_linux.png");
|
||||
}
|
||||
|
|
@ -19,46 +19,57 @@ function afterLoadVolumeJSP() {
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#right_panel_content #tab_content_details #action_message_box #close_button").bind("click", function(event){
|
||||
$(this).parent().hide();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function volumeToMidmenu(jsonObj, $midmenuItem1, toRightPanelFn) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("id", jsonObj.id);
|
||||
function volumeAfterDetailsTabAction(jsonObj) {
|
||||
$("#midmenuItem_"+jsonObj.id).data("jsonObj", jsonObj);
|
||||
volumeJsonToDetailsTab(jsonObj);
|
||||
}
|
||||
|
||||
function volumeToMidmenu(jsonObj, $midmenuItem1) {
|
||||
$midmenuItem1.attr("id", ("midmenuItem_"+jsonObj.id));
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
var iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
iconContainer.find("#icon").attr("src", "images/midmenuicon_storage_volume.png");
|
||||
var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
$iconContainer.find("#icon").attr("src", "images/midmenuicon_storage_volume.png");
|
||||
|
||||
$midmenuItem1.find("#first_row").text(jsonObj.name.substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25));
|
||||
$midmenuItem1.data("toRightPanelFn", toRightPanelFn);
|
||||
$midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25));
|
||||
}
|
||||
|
||||
function volumeToRigntPanel($midmenuItem) {
|
||||
var json = $midmenuItem.data("jsonObj");
|
||||
|
||||
var $rightPanelContent = $("#right_panel_content");
|
||||
$rightPanelContent.data("jsonObj", json);
|
||||
$rightPanelContent.find("#id").text(json.id);
|
||||
$rightPanelContent.find("#name").text(fromdb(json.name));
|
||||
$rightPanelContent.find("#zonename").text(fromdb(json.zonename));
|
||||
$rightPanelContent.find("#device_id").text(json.deviceid);
|
||||
$rightPanelContent.find("#state").text(json.state);
|
||||
$rightPanelContent.find("#storage").text(fromdb(json.storage));
|
||||
$rightPanelContent.find("#account").text(fromdb(json.account));
|
||||
var json = $midmenuItem.data("jsonObj");
|
||||
volumeJsonToDetailsTab(json);
|
||||
}
|
||||
|
||||
function volumeJsonToDetailsTab(jsonObj){
|
||||
var $detailsTab = $("#right_panel_content #tab_content_details");
|
||||
$detailsTab.data("jsonObj", jsonObj);
|
||||
$detailsTab.find("#id").text(jsonObj.id);
|
||||
$detailsTab.find("#name").text(fromdb(jsonObj.name));
|
||||
$detailsTab.find("#zonename").text(fromdb(jsonObj.zonename));
|
||||
$detailsTab.find("#device_id").text(jsonObj.deviceid);
|
||||
$detailsTab.find("#state").text(jsonObj.state);
|
||||
$detailsTab.find("#storage").text(fromdb(jsonObj.storage));
|
||||
$detailsTab.find("#account").text(fromdb(jsonObj.account));
|
||||
|
||||
$rightPanelContent.find("#type").text(json.type + " (" + json.storagetype + " storage)");
|
||||
$rightPanelContent.find("#size").text((json.size == "0") ? "" : convertBytes(json.size));
|
||||
$detailsTab.find("#type").text(jsonObj.type + " (" + jsonObj.storagetype + " storage)");
|
||||
$detailsTab.find("#size").text((jsonObj.size == "0") ? "" : convertBytes(jsonObj.size));
|
||||
|
||||
if (json.virtualmachineid == null)
|
||||
$rightPanelContent.find("#vm_name").text("detached");
|
||||
if (jsonObj.virtualmachineid == null)
|
||||
$detailsTab.find("#vm_name").text("detached");
|
||||
else
|
||||
$rightPanelContent.find("#vm_name").text(getVmName(json.vmname, json.vmdisplayname) + " (" + json.vmstate + ")");
|
||||
$detailsTab.find("#vm_name").text(getVmName(jsonObj.vmname, jsonObj.vmdisplayname) + " (" + jsonObj.vmstate + ")");
|
||||
|
||||
setDateField(json.created, $rightPanelContent.find("#created"));
|
||||
setDateField(jsonObj.created, $detailsTab.find("#created"));
|
||||
|
||||
var $actionLink = $rightPanelContent.find("#volume_action_link");
|
||||
var $actionLink = $detailsTab.find("#volume_action_link");
|
||||
$actionLink.bind("mouseover", function(event) {
|
||||
$(this).find("#volume_action_menu").show();
|
||||
return false;
|
||||
|
|
@ -70,14 +81,14 @@ function volumeToRigntPanel($midmenuItem) {
|
|||
|
||||
var $actionMenu = $actionLink.find("#volume_action_menu");
|
||||
$actionMenu.find("#action_list").empty();
|
||||
if(json.type=="ROOT") { //"create template" is allowed(when stopped), "detach disk" is disallowed.
|
||||
if (json.vmstate == "Stopped")
|
||||
buildActionLinkForSingleObject("Create Template", volumeActionMap, $actionMenu, volumeListAPIMap, $rightPanelContent);
|
||||
if(jsonObj.type=="ROOT") { //"create template" is allowed(when stopped), "detach disk" is disallowed.
|
||||
if (jsonObj.vmstate == "Stopped")
|
||||
buildActionLinkForDetailsTab("Create Template", volumeActionMap, $actionMenu, volumeListAPIMap);
|
||||
}
|
||||
else { //json.type=="DATADISK": "detach disk" is allowed, "create template" is disallowed.
|
||||
buildActionLinkForSingleObject("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap, $rightPanelContent);
|
||||
else { //jsonObj.type=="DATADISK": "detach disk" is allowed, "create template" is disallowed.
|
||||
buildActionLinkForDetailsTab("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var volumeListAPIMap = {
|
||||
listAPI: "listVolumes",
|
||||
|
|
@ -91,19 +102,19 @@ var volumeActionMap = {
|
|||
isAsyncJob: true,
|
||||
asyncJobResponse: "detachvolumeresponse",
|
||||
inProcessText: "Detaching disk....",
|
||||
afterActionSeccessFn: function(){}
|
||||
afterActionSeccessFn: volumeAfterDetailsTabAction
|
||||
},
|
||||
"Create Template": {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "createtemplateresponse",
|
||||
dialogBeforeActionFn : doCreateTemplate,
|
||||
dialogBeforeActionFn : doCreateTemplateFromVolume,
|
||||
inProcessText: "Creating template....",
|
||||
afterActionSeccessFn: function(){}
|
||||
}
|
||||
}
|
||||
|
||||
function doCreateTemplate($actionLink, listAPIMap, $singleObject) {
|
||||
var jsonObj = $singleObject.data("jsonObj");
|
||||
function doCreateTemplateFromVolume($actionLink, listAPIMap, $detailsTab) {
|
||||
var jsonObj = $detailsTab.data("jsonObj");
|
||||
$("#dialog_create_template").find("#volume_name").text(jsonObj.name);
|
||||
|
||||
$("#dialog_create_template")
|
||||
|
|
@ -125,9 +136,9 @@ function doCreateTemplate($actionLink, listAPIMap, $singleObject) {
|
|||
var isPublic = thisDialog.find("#create_template_public").val();
|
||||
var password = thisDialog.find("#create_template_password").val();
|
||||
|
||||
var id = $singleObject.data("jsonObj").id;
|
||||
var id = $detailsTab.data("jsonObj").id;
|
||||
var apiCommand = "command=createTemplate&volumeId="+id+"&name="+encodeURIComponent(name)+"&displayText="+encodeURIComponent(desc)+"&osTypeId="+osType+"&isPublic="+isPublic+"&passwordEnabled="+password;
|
||||
doActionToSingleObject(id, $actionLink, apiCommand, listAPIMap, $singleObject);
|
||||
doActionToDetailsTab(id, $actionLink, apiCommand, listAPIMap);
|
||||
},
|
||||
"Cancel": function() {
|
||||
$(this).dialog("close");
|
||||
|
|
|
|||