Commit 5e6afef6 authored by Roberto P. Rubio's avatar Roberto P. Rubio
Browse files

Do not confirms stops if machine already running

parent c106222c
......@@ -126,7 +126,7 @@
$scope.action = function(machine, action, confirmed) {
machine.action = false;
if (action == 'start') {
if (! confirmed) {
if ((! confirmed) && (! machine.is_active)) {
$scope.checkMaxMachines(action, machine);
} else {
window.location.assign('/machine/clone/' + machine.id + '.html');
......
......@@ -2716,7 +2716,7 @@ sub get_execution_machines_limit_per_current_user {
my %grants = $USER->grants();
my $start_limit = ((exists($grants{'start_limit'})) && ($grants{'start_limit'} > 0)) ? $grants{'start_limit'} : $RAVADA->settings_global()->{'backend'}->{'start_limit'}->{'value'};
my $can_start_many = $USER->can_start_many;
my $can_start_many = $USER->can_start_many ? 1 : 0;
my @running_domains;
foreach my $domain (@{$RAVADA->list_domains( id_owner => $USER->id )})
......
......@@ -19,15 +19,16 @@
<div class="card-header" id="step1" >
<h3 class="card-title">
<a class="btn btn-link"
href="/machine/clone/{{machine.id}}.html"
href=""
ng-click="action(machine, 'start'); false"
role="button">{{machine.name}}</a>
<i ng-show="!machine.is_public"><i class="far fa-eye-slash fa-xs" title="<%=l 'not public' %>"></i></i>
</h3>
<div class="container">
<a ng-show="machine.screenshot" href="/machine/clone/{{machine.id}}.html"><img
<a ng-show="machine.screenshot" ng-click="action(machine, 'start')"><img
ng-src="data:image/png;base64,{{machine.screenshot}}" alt="{{machine.name}}" class="img-thumbnail" width="260"
></a>
<a ng-show="!machine.screenshot" href="/machine/clone/{{machine.id}}.html"><img
<a ng-show="!machine.screenshot" ng-click="action(machine, 'start')"><img
src="/img/default_screenshot.png" class="screenshot-default img-thumbnail"
alt="{{machine.name}}" width="260"
></a>
......
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