Commit cc9ce163 authored by joelalju's avatar joelalju
Browse files

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

parent 48456740
......@@ -1616,4 +1616,8 @@ sub type {
return $type;
}
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;
......@@ -191,7 +197,7 @@
$scope.set_public = function(machineId, value) {
$http.get("/machine/public/"+machineId+"/"+value);
};
//On load code
$scope.showmachineId = window.location.pathname.split("/")[3].split(".")[0] || -1 ;
$http.get('/machine/info/'+$scope.showmachineId+'.json').then(function(response) {
......
......@@ -24,6 +24,11 @@
% }
</div>
% }
% 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) {
......@@ -42,4 +47,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>
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