Skip to content

Commit

Permalink
M #~: Fix lgtm alerts (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Betanzos authored and rsmontero committed Jul 2, 2020
1 parent ee98ce9 commit a7857fe
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/sunstone/public/app/opennebula/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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");
},
Expand Down Expand Up @@ -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"];
Expand Down Expand Up @@ -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>";}
Expand Down

0 comments on commit a7857fe

Please sign in to comment.