mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
(cherry picked from commit 45955f332c1e50076613d0ba168427bd42f239bf)
This commit is contained in:
parent
2cd2d7d8cd
commit
b8372e3806
@ -200,6 +200,7 @@ define(function(require) {
|
||||
function _roleHTML(context, role_index) {
|
||||
var that = this;
|
||||
var role = this.element.TEMPLATE.BODY.roles[role_index];
|
||||
var ready_status_gate = that.element.TEMPLATE.BODY.ready_status_gate;
|
||||
var promises = [];
|
||||
var roleVms = [];
|
||||
|
||||
@ -215,6 +216,14 @@ define(function(require) {
|
||||
|
||||
function successCallback (data) {
|
||||
if (data.VM && data.VM.ID === id) {
|
||||
var ready = ""
|
||||
if (ready_status_gate) {
|
||||
ready = (data.VM.USER_TEMPLATE && data.VM.USER_TEMPLATE.READY == "YES")
|
||||
? '<span class="has-tip" title="'+
|
||||
Locale.tr("The VM is ready")+'"><i class="fas fa-check"/></span>'
|
||||
: '<span class="has-tip" title="'+
|
||||
Locale.tr("Waiting for the VM to be ready")+'"><i class="fas fa-clock"/></span>'
|
||||
}
|
||||
ips = OpenNebulaVM.ipsStr(data.VM);
|
||||
|
||||
if (OpenNebulaVM.isVNCSupported(data.VM)) {
|
||||
@ -231,7 +240,7 @@ define(function(require) {
|
||||
actions += rdp ? OpenNebulaVM.buttonRDP(rdp.IP, data.VM) : "";
|
||||
}
|
||||
|
||||
roleVms[index] = rowInfoRoleVm(id, name, uname, gname, ips, actions);
|
||||
roleVms[index] = rowInfoRoleVm(ready, id, name, uname, gname, ips, actions);
|
||||
}
|
||||
|
||||
promises.push(promiseVmInfo(id, successCallback))
|
||||
@ -262,8 +271,9 @@ define(function(require) {
|
||||
});
|
||||
}
|
||||
|
||||
function rowInfoRoleVm(id, name = "", uname = "", gname = "", ips = "", actions = "") {
|
||||
function rowInfoRoleVm(ready, id, name = "", uname = "", gname = "", ips = "", actions = "") {
|
||||
return [
|
||||
ready,
|
||||
'<input class="check_item" style="vertical-align: inherit;" type="checkbox" '+
|
||||
'id="vm_' + id + '" name="selected_items" value="' + id + '"/>',
|
||||
'<a href="/#vms-tab/' + id + '">'+ id +'</a>',
|
||||
|
@ -50,6 +50,7 @@
|
||||
<table id="datatable_vms_{{panelId}}_{{role.name}}" class="dataTable hover ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="check">
|
||||
<input type="checkbox" class="check_all" value=""></input>
|
||||
</th>
|
||||
|
Loading…
x
Reference in New Issue
Block a user