Commit be187300 authored by Carlos Juan's avatar Carlos Juan Committed by Francesc Guasch
Browse files

fix new button remove node

modified conditional expression for a better clean code.
The '> 0' is not longer necessary.
uncomment when node is localhost

fixes UPC#870
parent 77bf1f60
......@@ -507,7 +507,7 @@ sub list_vms($self, $type=undef) {
$row->{machines}= $self->_list_machines_vm($row->{id});
$row->{type} = $row->{vm_type};
$row->{action_remove} = 'disabled' if length defined $row->{machines}[0];
#$row->{action_remove} = 'disabled' if $row->{hostname} eq 'localhost';
$row->{action_remove} = 'disabled' if $row->{hostname} eq 'localhost';
$row->{action_remove} = 'disabled' if length defined $row->{bases}[0];
$row->{is_local} = 0;
$row->{is_local} = 1 if $row->{hostname} =~ /^(localhost|127)/;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment