Commit 8c8f964b authored by Francesc Guasch's avatar Francesc Guasch
Browse files

Merge branch 'cjuan-develop' into develop

parents 8cc50fff ac3aac38
......@@ -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 length defined $row->{machines}[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->{bases}[0];
$row->{is_local} = 0;
$row->{is_local} = 1 if $row->{hostname} =~ /^(localhost|127)/;
delete $row->{vm_type};
......
......@@ -65,6 +65,7 @@
<i class="fa fa-window-close"></i>
</button>
<button type="button" class="btn btn-danger btn-sm {{node.action_remove}}"
ng-disabled="node.action_remove == 'disabled'"
ng-click="node_remove(node.id)"
title="<%=l 'Remove' %>">
<i class="fa fa-trash"></i>
......
......@@ -12,7 +12,7 @@
%= include 'main/list_bases_ng_head'
<!--MACHINES SELECTION-->
<div class="card-body">
<div ng-repeat="machine in machines"
<div ng-repeat="machine in machines | orderBy: 'id_clone'"
class="col-sm-4 d-inline-block mb-2"
ng-show="machine.is_public || (!machine.is_public && !only_public)">
<div class="card card-success">
......
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