Skip to content

Commit

Permalink
wip: move volume needs shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Nov 2, 2023
1 parent 26c44a1 commit 7a2c6ab
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
9 changes: 9 additions & 0 deletions public/js/ravada.js
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,15 @@
});
};

$scope.shutdown= function() {
$scope.set_edit();
$scope.lock_info=false;
$http.get("/machine/shutdown/"+$scope.showmachine.id+".json")
.then(function(response) {
});
};


$scope.shutdown_start = function() {
$scope.set_edit();
$scope.lock_info=false;
Expand Down
9 changes: 9 additions & 0 deletions templates/main/needs_shutdown.html.ep
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="alert alert-primary" ng-show="showmachine.is_active">
<div class="panel-heading">
<%=l 'This virtual machine is active and can not be changed' %>
<button data-dismiss="modal"
ng-click="shutdown()"
><%=l 'shutdown now' %></button>
</div>
</div>

5 changes: 5 additions & 0 deletions templates/main/vm_hardware_modal_change_pool.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@
<span aria-hidden="true">&times;</span>
</button>
</div>

<div class="modal-body">

%= include "/main/needs_shutdown"
<div>
<%=l 'Move volume to another Storage Pool?' %>
</div>

<select
name="storage" ng-model="sp_move.storage_pool"
ng-options="storage for storage in storage_pools"
ng-disabled="showmachine.is_active"
>
</select>

Expand All @@ -27,6 +31,7 @@
data-dismiss="modal"><%=l 'Cancel' %></button>
<button type="button" class="btn btn-primary"
data-dismiss="modal"
ng-disabled="$parent.$parent.showmachine.is_active"
ng-click="move_file_storage(sp_move.file,sp_move.storage_pool)"
>
<%=l 'yes' %>
Expand Down

0 comments on commit 7a2c6ab

Please sign in to comment.