1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

M #~: Fix dropdown with ips in guacamole client (#1186)

(cherry picked from commit cb225be4899862e2abd616864c9a0eba214f9105)
This commit is contained in:
Sergio Betanzos 2021-05-07 13:03:50 +02:00 committed by Ruben S. Montero
parent 1bcfd773b1
commit 50a43772b7
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
4 changed files with 25 additions and 15 deletions

View File

@ -234,7 +234,7 @@ define(function(require) {
: "<span class=\"has-tip\" title=\""+
Locale.tr("Waiting for the VM to be ready")+"\"><i class=\"fas fa-clock\"/></span>";
}
ips = OpenNebulaVM.ipsStr(data, { forceGroup: true });
ips = OpenNebulaVM.ipsDropdown(data);
actions = VMRemoteActions.renderActionsHtml(data);
}
@ -348,17 +348,23 @@ define(function(require) {
event.stopPropagation();
});
$("#" + that.serviceroleVMsDataTable.dataTableId).on("change", "tbody input.check_item", function() {
StateRolesVmButtons.disableAllStateActions();
// Enable actions available to any of the selected VMs
var nodes = $("tr", that.serviceroleVMsDataTable.dataTable); //visible nodes only
$.each($("input.check_item:checked", nodes), function() {
StateRolesVmButtons.enableStateActions($(this).attr("state"), $(this).attr("lcm_state"));
$("#" + that.serviceroleVMsDataTable.dataTableId)
.on("click", "ul.dropdown-menu-css > .menu-hide", function(event) {
event.stopPropagation();
});
return true;
});
$("#" + that.serviceroleVMsDataTable.dataTableId)
.on("change", "tbody input.check_item", function() {
StateRolesVmButtons.disableAllStateActions();
// Enable actions available to any of the selected VMs
var nodes = $("tr", that.serviceroleVMsDataTable.dataTable); //visible nodes only
$.each($("input.check_item:checked", nodes), function() {
StateRolesVmButtons.enableStateActions($(this).attr("state"), $(this).attr("lcm_state"));
});
return true;
});
}
}
});

View File

@ -183,6 +183,10 @@ define(function(require) {
VMRemoteActions.bindActionsToContext("#" + this.dataTableId);
$("#" + this.dataTableId).on("click", "ul.dropdown-menu-css > .menu-hide", function(event) {
event.stopPropagation();
});
$("#" + this.dataTableId).on("change", "tbody input.check_item", function() {
if ($(this).is(":checked")){
StateActions.enableStateActions($(this).attr("state"), $(this).attr("lcm_state"));

View File

@ -65,8 +65,8 @@
{{#each networks}} {{#if @first}} {{ this }} {{/if}} {{/each}}
</a>
</li>
<li class="menu-hide">
<ul class="menu" style="padding: 0.5em;z-index: 2;">
<li class="menu-hide upper" style="right: 0;">
<ul>
{{#each networks}}
<li>
<p title="{{this}}" style="

View File

@ -289,7 +289,7 @@ ul.dropdown-menu-css{
display: none;
position: absolute;
background-color: $white;
padding: 5px;
padding: 1em;
-webkit-box-shadow: 5px 5px 10px 0px $black;
-moz-box-shadow: 5px 5px 10px 0px $black;
box-shadow: 5px 5px 10px 0px $black;
@ -300,7 +300,7 @@ ul.dropdown-menu-css{
list-style: none;
& > li{
display: inline-block;
white-space: nowrap;
}
& > li.display-list{
@ -316,7 +316,7 @@ ul.dropdown-menu-css{
}
& > li.menu-hide.upper{
top: 0px;
top: 0;
}
&:hover > li{