Commit 77bf1f60 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.

fixes #870
parent 0d9be919
......@@ -506,9 +506,9 @@ sub list_vms($self, $type=undef) {
$row->{bases}= $self->_list_bases_vm($row->{id});
$row->{machines}= $self->_list_machines_vm($row->{id});
$row->{type} = $row->{vm_type};
$row->{action_remove} = 'disabled' if length defined $row->{machines}[0] > 0;
$row->{action_remove} = 'disabled' if $row->{hostname} eq 'localhost';
$row->{action_remove} = 'disabled' if length defined $row->{bases}[0] > 0;
$row->{action_remove} = 'disabled' if length defined $row->{machines}[0];
#$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)/;
delete $row->{vm_type};
......
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