mirror of https://github.com/apache/cloudstack.git
new UI - instance page - pop up console proxy window when clicking on monitor icon.
This commit is contained in:
parent
b467faf826
commit
7a176ab184
|
|
@ -31,7 +31,7 @@
|
|||
<div class="grid_container" style="display: block;" id="tab_content_details">
|
||||
<div class="grid_rows odd">
|
||||
<div class="vm_statusbox">
|
||||
<div class="vm_consolebox">
|
||||
<div class="vm_consolebox" id="vm_action_view_console">
|
||||
</div>
|
||||
<div class="vm_status_textbox">
|
||||
<div class="vm_status_textline green" id="state">
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_editbox">
|
||||
<div class="grid_editbox" style="display:none">
|
||||
</div>
|
||||
<div class="gridheader_loaderbox" id="spinning_wheel" style="border: 1px solid #999;
|
||||
display: none;">
|
||||
|
|
|
|||
|
|
@ -414,6 +414,30 @@ function clickInstanceGroupHeader($arrowIcon) {
|
|||
|
||||
setBooleanField(jsonObj.haenable, $detailsTab.find("#haenable"));
|
||||
setBooleanField((jsonObj.isoid != null && jsonObj.isoid.length > 0), $detailsTab.find("#iso"));
|
||||
|
||||
if (jsonObj.state == 'Destroyed') {
|
||||
//$detailsTab.find("#vm_action_view_console").unbind("mouseover");
|
||||
$detailsTab.find("#vm_action_view_console").unbind("click");
|
||||
}
|
||||
else if (jsonObj.state == 'Running') {
|
||||
// $detailsTab.find("#vm_action_view_console").data("imgUrl", "console?cmd=thumbnail&vm=" + jsonObj.id + "&w=144&h=110");
|
||||
// var imgUrl = "console?cmd=thumbnail&vm=" + jsonObj.id + "&w=144&h=110";
|
||||
// var time = new Date();
|
||||
// $("#vm_action_view_console").css("background", "url("+imgUrl+"&t="+time.getTime()+")");
|
||||
|
||||
// Console Proxy UI
|
||||
$detailsTab.find("#vm_action_view_console").data("proxyUrl", "console?cmd=access&vm=" + jsonObj.id).data("vmId",jsonObj.id).click(function(event) {
|
||||
var proxyUrl = $(this).data("proxyUrl");
|
||||
proxyUrl = "http://localhost:8080/client/" + proxyUrl; //temporary hack. This line will be removed after new UI code (/ui/new/*) moves to /ui/*
|
||||
var viewer = window.open(proxyUrl, $(this).data("vmId"),"width=820,height=640,resizable=yes,menubar=no,status=no,scrollbars=no,toolbar=no,location=no");
|
||||
viewer.focus();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
else {
|
||||
//$detailsTab.find("#vm_action_view_console").unbind("mouseover");
|
||||
$detailsTab.find("#vm_action_view_console").unbind("click");
|
||||
}
|
||||
}
|
||||
|
||||
function vmJsonToVolumeTab(jsonObj) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue