1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

M #~: Fix lgtm alerts (#66)

This commit is contained in:
Sergio Betanzos 2020-07-01 18:38:32 +02:00 committed by GitHub
parent 76b017f93c
commit d928bf5812
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -295,16 +295,6 @@ define(function(require) {
"SL_PRIMARYIPADDRESS"
];
var NIC_IP_ATTRS = [
"IP",
"IP6",
"IP6_GLOBAL",
"IP6_ULA",
"VROUTER_IP",
"VROUTER_IP6_GLOBAL",
"VROUTER_IP6_ULA"
];
var NIC_ALIAS_IP_ATTRS = [
"IP",
"IP6",
@ -418,9 +408,6 @@ define(function(require) {
"suspend": function(params) {
OpenNebulaAction.simple_action(params, RESOURCE, "suspend");
},
"save_as_template": function(params) {
OpenNebulaAction.simple_action(params, RESOURCE, "save_as_template");
},
"resume": function(params) {
OpenNebulaAction.simple_action(params, RESOURCE, "resume");
},
@ -810,7 +797,7 @@ define(function(require) {
// infoextended: alias will be group by nic
return Config.isExtendedVmInfo
? groupStrFuntion(element, nics)
: (ips.length == 0 && nics && nics.length > 0)
: (ips.length == 0 && nics.length > 0)
? $.map(nics, function(nic) {
if (nic["IP"]) {
return nic["IP"];
@ -839,7 +826,7 @@ define(function(require) {
if ((ips.length < numIPs)) return ipsStr;
// Take the first x
insideHtml = "";
var insideHtml = "";
for (let i = 0; i < numIPs-1; i++) {
insideHtml += ips.shift();
if (i != numIPs-2){insideHtml+="<br>";}