mirror of https://github.com/apache/cloudstack.git
Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss
This commit is contained in:
commit
04cfb46b54
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash
|
||||
# Usage
|
||||
# save_password -v <user VM IP> -p <password>
|
||||
#
|
||||
|
||||
while getopts 'v:p:' OPTION
|
||||
do
|
||||
case $OPTION in
|
||||
v) VM_IP="$OPTARG"
|
||||
;;
|
||||
p)
|
||||
ENCODEDPASSWORD="$OPTARG"
|
||||
PASSWORD=$(echo $ENCODEDPASSWORD | tr '[a-m][n-z][A-M][N-Z]' '[n-z][a-m][N-Z][A-M]')
|
||||
;;
|
||||
?) echo "Incorrect usage"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -f /root/passwords ];
|
||||
then
|
||||
touch /root/passwords;
|
||||
fi
|
||||
|
||||
sed -i /$VM_IP/d /root/passwords
|
||||
echo "$VM_IP=$PASSWORD" >> /root/passwords
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
import base64
|
||||
|
||||
def vm_data(args):
|
||||
|
||||
router_ip = args.pop('routerIP')
|
||||
vm_ip = args.pop('vmIP')
|
||||
|
||||
util.SMlog(" adding vmdata for VM with IP: " + vm_ip + " to router with IP: " + router_ip)
|
||||
|
||||
for pair in args:
|
||||
pairList = pair.split(',')
|
||||
vmDataFolder = pairList[0]
|
||||
vmDataFile = pairList[1]
|
||||
vmDataValue = args[pair]
|
||||
cmd = ["/bin/bash", "/root/userdata.sh", "-v", vm_ip, "-F", vmDataFolder, "-f", vmDataFile]
|
||||
|
||||
fd = None
|
||||
tmp_path = None
|
||||
if (vmDataValue != "none"):
|
||||
try:
|
||||
fd,tmp_path = tempfile.mkstemp()
|
||||
tmpfile = open(tmp_path, 'w')
|
||||
|
||||
if (vmDataFolder == "userdata"):
|
||||
vmDataValue = base64.urlsafe_b64decode(vmDataValue)
|
||||
|
||||
tmpfile.write(vmDataValue)
|
||||
tmpfile.close()
|
||||
cmd.append("-d")
|
||||
cmd.append(tmp_path)
|
||||
except:
|
||||
util.SMlog(" vmdata failed to write tempfile " )
|
||||
os.close(fd)
|
||||
os.remove(tmp_path)
|
||||
return ''
|
||||
|
||||
try:
|
||||
txt = util.pread2(cmd)
|
||||
txt = 'success'
|
||||
except:
|
||||
util.SMlog(" vmdata failed with folder: " + vmDataFolder + " and file: " + vmDataFile)
|
||||
txt = ''
|
||||
|
||||
if (fd != None):
|
||||
os.close(fd)
|
||||
os.remove(tmp_path)
|
||||
|
||||
return txt
|
||||
|
||||
def parseFileData(fileName):
|
||||
args = []
|
||||
fd = open(fileName)
|
||||
|
||||
line = fd.readline()
|
||||
while (line != ""):
|
||||
args.append(line)
|
||||
line = fd.readline()
|
||||
|
||||
return args
|
||||
|
||||
vmdata(parseFileData("/tmp/" + sys.argv[1]))
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
#!/bin/bash
|
||||
|
||||
usage() {
|
||||
printf "Usage: %s: -v <vm ip> -F <vm data folder> -f <vm data file> -d <data to put in file> \n" $(basename $0) >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
set -x
|
||||
|
||||
PORT=3922
|
||||
|
||||
create_htaccess() {
|
||||
local vmIp=$1
|
||||
local folder=$2
|
||||
local file=$3
|
||||
|
||||
local result=0
|
||||
|
||||
entry="RewriteRule ^$file$ ../$folder/%{REMOTE_ADDR}/$file [L,NC,QSA]"
|
||||
htaccessFolder="/var/www/html/latest"
|
||||
htaccessFile=$htaccessFolder/.htaccess
|
||||
mkdir -p $htaccessFolder
|
||||
touch $htaccessFile
|
||||
grep -F \"$entry\" $htaccessFile
|
||||
if [ \$? -gt 0 ]; then
|
||||
echo -e \"$entry\" >> $htaccessFile;
|
||||
fi
|
||||
result=$?
|
||||
|
||||
if [ $result -eq 0 ]; then
|
||||
entry="Options -Indexes\\nOrder Deny,Allow\\nDeny from all\\nAllow from $vmIp"
|
||||
htaccessFolder="/var/www/html/$folder/$vmIp"
|
||||
htaccessFile=$htaccessFolder/.htaccess
|
||||
|
||||
mkdir -p $htaccessFolder
|
||||
echo -e \"$entry\" > $htaccessFile
|
||||
result=$?
|
||||
fi
|
||||
|
||||
return $result
|
||||
}
|
||||
|
||||
copy_vm_data_file() {
|
||||
local vmIp=$1
|
||||
local folder=$2
|
||||
local file=$3
|
||||
local dataFile=$4
|
||||
|
||||
chmod +r $dataFile
|
||||
cp $dataFile /var/www/html/$folder/$vmIp/$file >/dev/null
|
||||
return $?
|
||||
}
|
||||
|
||||
delete_vm_data_file() {
|
||||
local domrIp=$1
|
||||
local vmIp=$2
|
||||
local folder=$3
|
||||
local file=$4
|
||||
|
||||
vmDataFilePath="/var/www/html/$folder/$vmIp/$file"
|
||||
if [ -f $vmDataFilePath ]; then
|
||||
rm -rf $vmDataFilePath
|
||||
fi
|
||||
return $?
|
||||
}
|
||||
|
||||
vmIp=
|
||||
folder=
|
||||
file=
|
||||
dataFile=
|
||||
|
||||
while getopts 'v:F:f:d:' OPTION
|
||||
do
|
||||
case $OPTION in
|
||||
v) vmIp="$OPTARG"
|
||||
;;
|
||||
F) folder="$OPTARG"
|
||||
;;
|
||||
f) file="$OPTARG"
|
||||
;;
|
||||
d) dataFile="$OPTARG"
|
||||
;;
|
||||
?) usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ "$vmIp" == "" ] || [ "$folder" == "" ] || [ "$file" == "" ] && usage
|
||||
[ "$folder" != "userdata" ] && [ "$folder" != "metadata" ] && usage
|
||||
|
||||
if [ "$dataFile" != "" ]
|
||||
then
|
||||
create_htaccess $vmIp $folder $file
|
||||
|
||||
if [ $? -gt 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
copy_vm_data_file $vmIp $folder $file $dataFile
|
||||
else
|
||||
delete_vm_data_file $vmIp $folder $file
|
||||
fi
|
||||
|
||||
exit $?
|
||||
|
|
@ -100,6 +100,7 @@ import com.cloud.ha.HighAvailabilityManager;
|
|||
import com.cloud.host.Host;
|
||||
import com.cloud.host.HostVO;
|
||||
import com.cloud.host.dao.HostDao;
|
||||
import com.cloud.hypervisor.Hypervisor;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.network.FirewallRuleVO;
|
||||
import com.cloud.network.IPAddressVO;
|
||||
|
|
@ -900,7 +901,7 @@ public class DomainRouterManagerImpl implements DomainRouterManager, VirtualMach
|
|||
String privateIpAddress = null;
|
||||
String privateNetMask = null;
|
||||
|
||||
if(_defaultHypervisorType == null || !_defaultHypervisorType.equalsIgnoreCase("VmWare")) {
|
||||
if(_defaultHypervisorType == null || !_defaultHypervisorType.equalsIgnoreCase(Hypervisor.HypervisorType.VmWare.toString())) {
|
||||
privateIpAddress = _dcDao.allocateLinkLocalPrivateIpAddress(router.getDataCenterId(), routingHost.getPodId(), router.getId());
|
||||
privateNetMask = NetUtils.getLinkLocalNetMask();
|
||||
} else {
|
||||
|
|
@ -994,7 +995,7 @@ public class DomainRouterManagerImpl implements DomainRouterManager, VirtualMach
|
|||
|
||||
router.setPrivateIpAddress(null);
|
||||
|
||||
if(_defaultHypervisorType == null || !_defaultHypervisorType.equalsIgnoreCase("VmWare"))
|
||||
if(_defaultHypervisorType == null || !_defaultHypervisorType.equalsIgnoreCase(Hypervisor.HypervisorType.VmWare.toString()))
|
||||
_dcDao.releaseLinkLocalPrivateIpAddress(privateIpAddress, router.getDataCenterId(), router.getId());
|
||||
else
|
||||
_dcDao.releasePrivateIpAddress(privateIpAddress, router.getDataCenterId(), router.getId());
|
||||
|
|
@ -1407,7 +1408,7 @@ public class DomainRouterManagerImpl implements DomainRouterManager, VirtualMach
|
|||
String value = configs.get("start.retry");
|
||||
_retry = NumbersUtil.parseInt(value, 2);
|
||||
|
||||
_defaultHypervisorType = (String)params.get(Config.HypervisorDefaultType.key());
|
||||
_defaultHypervisorType = _configDao.getValue(Config.HypervisorDefaultType.key());
|
||||
|
||||
value = configs.get("router.stats.interval");
|
||||
_routerStatsInterval = NumbersUtil.parseInt(value, 300);
|
||||
|
|
@ -1515,7 +1516,7 @@ public class DomainRouterManagerImpl implements DomainRouterManager, VirtualMach
|
|||
String privateIpAddress = router.getPrivateIpAddress();
|
||||
|
||||
if (privateIpAddress != null) {
|
||||
if(_defaultHypervisorType == null || !_defaultHypervisorType.equalsIgnoreCase("VmWare"))
|
||||
if(_defaultHypervisorType == null || !_defaultHypervisorType.equalsIgnoreCase(Hypervisor.HypervisorType.VmWare.toString()))
|
||||
_dcDao.releaseLinkLocalPrivateIpAddress(privateIpAddress, router.getDataCenterId(), router.getId());
|
||||
else
|
||||
_dcDao.releasePrivateIpAddress(privateIpAddress, router.getDataCenterId(), router.getId());
|
||||
|
|
|
|||
|
|
@ -1795,7 +1795,6 @@ a:hover.search_button {
|
|||
margin:0;
|
||||
padding:0;
|
||||
background:url(../images/actionpanel_border.gif) no-repeat top left;
|
||||
|
||||
}
|
||||
|
||||
.actionpanel_button{
|
||||
|
|
@ -1857,9 +1856,85 @@ a:hover.search_button {
|
|||
margin:0;
|
||||
padding:0;
|
||||
z-index:1005;
|
||||
}
|
||||
|
||||
.help_dropdown_box {
|
||||
width:209px;
|
||||
height:200px;
|
||||
float:left;
|
||||
position:absolute;
|
||||
background:#FFF repeat top left;
|
||||
border:1px solid #999;
|
||||
top:20px;
|
||||
right:7px;
|
||||
margin:0;
|
||||
padding:0;
|
||||
z-index:1005;
|
||||
}
|
||||
|
||||
.help_dropdown_box_titlebox {
|
||||
width:190px;
|
||||
height:auto;
|
||||
float:left;
|
||||
margin:8px 0 0 10px;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.help_dropdown_box_titlebox h2 {
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:left;
|
||||
color:#999;
|
||||
text-align:left;
|
||||
font-size:14px;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.help_dropdown_box_titlebox a {
|
||||
float:right;
|
||||
color:#2c8bbc;
|
||||
font-size:10px;
|
||||
font-weight:normal;
|
||||
text-align:left;
|
||||
margin:0;
|
||||
padding:0;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
.help_dropdown_box_titlebox a:link, .help_dropdown_box_titlebox a:visited {
|
||||
text-decoration:none;
|
||||
|
||||
}
|
||||
|
||||
.help_dropdown_box_titlebox a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
.help_dropdown_box_textbox {
|
||||
width:190px;
|
||||
height:140px;
|
||||
float:left;
|
||||
margin:0 0 0 10px;
|
||||
padding:0;
|
||||
overflow-y:auto;
|
||||
overflow-y:scroll;
|
||||
overflow-x:hidden;
|
||||
|
||||
}
|
||||
|
||||
.help_dropdown_box_textbox p{
|
||||
width:190px;
|
||||
height:auto;
|
||||
float:left;
|
||||
color:#333;
|
||||
font-size:11px;
|
||||
font-weight:normal;
|
||||
text-align:left;
|
||||
margin:12px 0 0 0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.actionsdropdown_boxlist {
|
||||
width:197px;
|
||||
height:auto;
|
||||
|
|
|
|||
|
|
@ -258,13 +258,24 @@ long milliseconds = new Date().getTime();
|
|||
</div>
|
||||
</div>
|
||||
<div class="actionpanel_button_wrapper" id="help_link" style="display: block; float: right;
|
||||
background: none;">
|
||||
background: none; position: relative;">
|
||||
<div class="actionpanel_button">
|
||||
<div class="actionpanel_button_icons">
|
||||
<img src="images/help_actionicon.png" alt="Help" /></div>
|
||||
<div class="actionpanel_button_links">
|
||||
<%=t.t("help")%></div>
|
||||
</div>
|
||||
|
||||
<div class="help_dropdown_box" style="display:none;">
|
||||
<div class="help_dropdown_box_titlebox">
|
||||
<h2> Instance Help</h2>
|
||||
<a href="#"> Close</a>
|
||||
</div>
|
||||
|
||||
<div class="help_dropdown_box_textbox">
|
||||
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. </p><p>It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Action Panel ends here-->
|
||||
|
|
|
|||
|
|
@ -574,121 +574,127 @@
|
|||
<%=t.t("details")%></div>
|
||||
</div>
|
||||
<!-- Details tab (start)-->
|
||||
<div id="tab_content_details">
|
||||
<div class="grid_container">
|
||||
<div class="grid_rows odd">
|
||||
<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 id="tab_content_details" class="grid_container">
|
||||
<div class="grid_rows odd">
|
||||
<div class="vm_statusbox">
|
||||
<div id="view_console_container">
|
||||
<div id="view_console_template" style="display: block">
|
||||
<div class="vm_consolebox" id="box0">
|
||||
</div>
|
||||
<div class="vm_consolebox" id="box1" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("system.vm.type")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="systemvmtype">
|
||||
<div class="vm_status_textbox">
|
||||
<div class="vm_status_textline green" id="state">
|
||||
</div>
|
||||
<br />
|
||||
<p id="ipAddress">
|
||||
</p>
|
||||
</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("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("name")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("active.sessions")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="activeviewersessions">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("public.ip")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="publicip">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("private.ip")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="privateip">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("host")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="hostname">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("gateway")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="gateway">
|
||||
</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>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("system.vm.type")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="systemvmtype">
|
||||
</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("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("name")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("active.sessions")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="activeviewersessions">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("public.ip")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="publicip">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("private.ip")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="privateip">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("host")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="hostname">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("gateway")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="gateway">
|
||||
</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>
|
||||
<!-- Details tab (end)-->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1227,9 +1227,10 @@ function vmJsonToDetailsTab(jsonObj, $midmenuItem){
|
|||
var $detailsTab = $("#right_panel_content #tab_content_details");
|
||||
$detailsTab.data("jsonObj", jsonObj);
|
||||
|
||||
//details tab
|
||||
resetViewConsoleAction(jsonObj, $detailsTab);
|
||||
setVmStateInRightPanel(jsonObj.state, $detailsTab.find("#state"));
|
||||
$detailsTab.find("#ipAddress").text(jsonObj.ipaddress);
|
||||
|
||||
$detailsTab.find("#zoneName").text(fromdb(jsonObj.zonename));
|
||||
|
||||
var vmName = getVmName(jsonObj.name, jsonObj.displayname);
|
||||
|
|
@ -1245,9 +1246,7 @@ function vmJsonToDetailsTab(jsonObj, $midmenuItem){
|
|||
$detailsTab.find("#group").text(fromdb(jsonObj.group));
|
||||
|
||||
setBooleanField(jsonObj.haenable, $detailsTab.find("#haenable"));
|
||||
setBooleanField((jsonObj.isoid != null && jsonObj.isoid.length > 0), $detailsTab.find("#iso"));
|
||||
|
||||
resetViewConsoleAction(jsonObj, $detailsTab);
|
||||
setBooleanField((jsonObj.isoid != null && jsonObj.isoid.length > 0), $detailsTab.find("#iso"));
|
||||
}
|
||||
|
||||
function vmJsonToVolumeTab(jsonObj) {
|
||||
|
|
@ -1383,9 +1382,12 @@ function vmVolumeJSONToTemplate(json, $template) {
|
|||
|
||||
function vmRouterJSONToTemplate(jsonObj, $template) {
|
||||
$template.data("jsonObj", jsonObj);
|
||||
$template.find("#title").text(fromdb(jsonObj.name));
|
||||
$template.find("#title").text(fromdb(jsonObj.name));
|
||||
|
||||
resetViewConsoleAction(jsonObj, $template);
|
||||
setVmStateInRightPanel(jsonObj.state, $template.find("#state"));
|
||||
$template.find("#ipAddress").text(jsonObj.publicip);
|
||||
|
||||
$template.find("#zonename").text(fromdb(jsonObj.zonename));
|
||||
$template.find("#name").text(fromdb(jsonObj.name));
|
||||
$template.find("#publicip").text(fromdb(jsonObj.publicip));
|
||||
|
|
@ -1394,8 +1396,7 @@ function vmRouterJSONToTemplate(jsonObj, $template) {
|
|||
$template.find("#hostname").text(fromdb(jsonObj.hostname));
|
||||
$template.find("#networkdomain").text(fromdb(jsonObj.networkdomain));
|
||||
$template.find("#account").text(fromdb(jsonObj.account));
|
||||
setDateField(jsonObj.created, $template.find("#created"));
|
||||
resetViewConsoleAction(jsonObj, $template);
|
||||
setDateField(jsonObj.created, $template.find("#created"));
|
||||
|
||||
//***** actions (begin) *****
|
||||
var $actionLink = $template.find("#router_action_link");
|
||||
|
|
|
|||
|
|
@ -669,8 +669,12 @@ function primarystorageJsonClearDetailsTab() {
|
|||
function systemvmJsonToDetailsTab(jsonObj) {
|
||||
var $detailsTab = $("#systemvm_page").find("#tab_content_details");
|
||||
$detailsTab.data("jsonObj", jsonObj);
|
||||
|
||||
$detailsTab.find("#state").text(fromdb(jsonObj.state));
|
||||
|
||||
//resetViewConsoleAction(jsonObj, $detailsTab);
|
||||
setVmStateInRightPanel(jsonObj.state, $detailsTab.find("#state"));
|
||||
$detailsTab.find("#ipAddress").text(jsonObj.publicip);
|
||||
|
||||
$detailsTab.find("#state").text(jsonObj.state);
|
||||
$detailsTab.find("#systemvmtype").text(toSystemVMTypeText(jsonObj.systemvmtype));
|
||||
$detailsTab.find("#zonename").text(fromdb(jsonObj.zonename));
|
||||
$detailsTab.find("#id").text(fromdb(jsonObj.id));
|
||||
|
|
|
|||
Loading…
Reference in New Issue