Commit c739c9dc authored by frankiejol's avatar frankiejol
Browse files

wip(frontend): fixed pool form

parent 6537f9a1
......@@ -1251,6 +1251,7 @@ sub info($self, $user) {
id => $self->id
,name => $self->name
,is_base => $self->is_base
,id_base => $self->id_base
,is_active => $is_active
,spice_password => $self->spice_password
,description => $self->description
......
......@@ -542,7 +542,7 @@ sub _new_request {
if ($args{command} =~ /^(clone|manage_pools)$/) {
if ( _duplicated_request($args{command}, $args{args})
|| ( $args{command} ne 'clone' && done_recently(undef, 60, $args{command}))) {
warn "Warning: duplicated request for $args{command} $args{args}";
# warn "Warning: duplicated request for $args{command} $args{args}";
return;
}
}
......
......@@ -600,6 +600,7 @@ sub _interface_ip($self, $remote_ip=undef) {
my $netaddr = NetAddr::IP->new($network);
return $ip if $remote_ip_addr->within($netaddr);
$default_ip = $ip if !defined $default_ip && $ip !~ /^127\./;
$default_ip = $ip if defined $default_gw && $default_gw->within($netaddr);
}
}
......
......@@ -1781,7 +1781,7 @@ sub manage_machine {
}
}
if ($c->param("start-clones") ne "") {
if (defined $c->param("start-clones") && $c->param("start-clones") ne "") {
my $req = Ravada::Request->start_clones(
id_domain => $domain->id,
,uid => $USER->id
......
......@@ -39,7 +39,9 @@
<a class="nav-link" id="v-pills-remove-tab" ng-click="refresh_machine()" href="#v-pills-clones" data-toggle="pill" role="tab" aria-controls="v-pills-clones" aria-selected="false"><%=l 'Clones' %></a>
% }
% if ($USER->is_admin){
<a class="nav-link" id="v-pills-pool-tab" ng-click="refresh_machine()" href="#v-pills-pool" data-toggle="pill" role="tab" aria-controls="v-pills-pool" aria-selected="false"><%=l 'Pool' %></a>
<a class="nav-link" id="v-pills-pool-tab" ng-click="refresh_machine()" href="#v-pills-pool" data-toggle="pill" role="tab" aria-controls="v-pills-pool" aria-selected="false"
ng-show="showmachine.is_base || showmachine.id_base"
><%=l 'Pool' %></a>
% }
% if ( $monitoring && $USER->is_admin && $domain->is_active ) {
<a class="nav-link" id="v-pills-monitoring-tab" ng-click="refresh_machine()" href="#v-pills-monitoring" data-toggle="pill" role="tab" aria-controls="v-pills-monitoring" aria-selected="false"><%=l 'System overview' %></a>
......
......@@ -69,7 +69,7 @@
</div>
</form>
</div>
<div class="panel-body" ng-hide="showmachine.is_base">
<div class="panel-body" ng-show="!showmachine.is_base && showmachine.id_base">
<div class="row">
<div class="col-md-2">
Pool
......@@ -85,8 +85,6 @@
</small>
</div>
</div>
</div>
</div>
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