Commit f4a86e73 authored by joelalju's avatar joelalju Committed by Francesc Guasch
Browse files

[#404]Screenshot tab added; you can take from settings a screenshot and display it.

parent aaf4fc48
......@@ -1620,4 +1620,8 @@ sub _pre_clone($self,%args) {
confess "ERROR: Unknown arguments ".join(",",sort keys %args) if keys %args;
}
sub file_screenshot($self){
return $self->_data('file_screenshot');
}
1;
......@@ -152,9 +152,15 @@
$http.get('/machine/remove_clones/'+machineId+'.json');
};
$scope.reload_page_msg = false;
$scope.action = function(target,action,machineId){
$http.get('/'+target+'/'+action+'/'+machineId+'.json');
$scope.reload_page_msg = true;
setTimeout(function () {
window.location.reload(false);
}, 5000);
};
$scope.rename = function(machineId, old_name) {
if ($scope.new_name_duplicated || $scope.new_name_invalid) return;
$scope.rename_requested=1;
......
......@@ -28,7 +28,12 @@
% }
</div>
% }
% if (1) { # TODO check VM is KVM
% if ($USER->can_change_settings) {
<div class="tab-pane fade" id="screenshot">
%= include 'main/vm_screenshot'
</div>
% }
% if ($domain->type eq 'KVM') {
<div class="tab-pane fade" id="graphics">
% if ($domain->is_base) {
%= include 'main/vm_locked_is_base'
......@@ -46,4 +51,3 @@
%= include 'main/vm_remove'
</div>
% }
......@@ -7,6 +7,9 @@
% if ($USER->can_change_settings && $domain->drivers) {
<li class="nav"><a href="#drivers" data-toggle="tab">Drivers</a></li>
% }
% if ($USER->can_change_settings) {
<li class="nav"><a href="#screenshot" data-toggle="tab">Screenshot</a></li>
% }
% if ($domain->drivers) {
<li class="nav"><a href="#graphics" data-toggle="tab">Graphics</a></li>
% }
......@@ -17,4 +20,3 @@
<li class="nav"><a href="#remove" data-toggle="tab">Remove Machine</a></li>
% }
</ul>
Markdown is supported
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