Commit 9fa541c3 authored by Roberto P. Rubio's avatar Roberto P. Rubio
Browse files

Espacios en blanco

parent 3b1cff56
......@@ -1208,7 +1208,7 @@ sub _data($self, $field, $value=undef, $table='domains') {
$self->{$data} = $self->_select_domain_db( _table => $table, @field_select );
confess "No DB info for domain @field_select in $table ".$self->name
confess "No DB info for domain @field_select in $table ".$self->name
if ! exists $self->{$data};
confess "No field $field in $data ".Dumper(\@field_select)."\n".Dumper($self->{$data})
if !exists $self->{$data}->{$field};
......
......@@ -778,8 +778,8 @@ sub _pre_shutdown_domain {
my ($state, $reason) = $self->domain->get_state();
if ($state == Sys::Virt::Domain::STATE_PMSUSPENDED_UNKNOWN
|| $state == Sys::Virt::Domain::STATE_PMSUSPENDED_DISK_UNKNOWN
if ($state == Sys::Virt::Domain::STATE_PMSUSPENDED_UNKNOWN
|| $state == Sys::Virt::Domain::STATE_PMSUSPENDED_DISK_UNKNOWN
|| $state == Sys::Virt::Domain::STATE_PMSUSPENDED) {
$self->domain->pm_wakeup();
for ( 1 .. 10 ) {
......
......@@ -221,13 +221,13 @@ sub list_machines($self, $user, @filter) {
sub init_available_actions($user, $m) {
eval { $m->{can_shutdown} = $user->can_shutdown($m->{id}) };
$m->{can_start} = 0;
$m->{can_start} = 1 if $m->{id_owner} == $user->id || $user->is_admin;
$m->{can_start} = 0;
$m->{can_start} = 1 if $m->{id_owner} == $user->id || $user->is_admin;
$m->{can_reboot} = $m->{can_shutdown} && $m->{can_start};
$m->{can_view} = 0;
$m->{can_view} = 1 if $m->{id_owner} == $user->id || $user->is_admin;
$m->{can_view} = 0;
$m->{can_view} = 1 if $m->{id_owner} == $user->id || $user->is_admin;
$m->{can_manage} = ( $user->can_manage_machine($m->{id}) or 0);
eval {
......@@ -235,8 +235,8 @@ sub init_available_actions($user, $m) {
};
die $@ if $@ && $@ !~ /Unknown domain/;
$m->{can_hibernate} = 0;
$m->{can_hibernate} = 1 if $user->can_shutdown($m->{id})
$m->{can_hibernate} = 0;
$m->{can_hibernate} = 1 if $user->can_shutdown($m->{id})
&& !$m->{is_volatile};
}
......@@ -297,7 +297,7 @@ sub list_domains($self, %args) {
my $sth = $CONNECTOR->dbh->prepare("$query $where ORDER BY d.id");
$sth->execute(map { $args{$_} } sort keys %args);
my @domains = ();
while ( my $row = $sth->fetchrow_hashref) {
for (qw(is_locked is_hibernated is_paused
......@@ -351,7 +351,7 @@ sub list_domains($self, %args) {
=head2 filter_base_without_clones
filters the list of domains and drops all machines that are unacessible and
filters the list of domains and drops all machines that are unacessible and
bases with 0 machines accessible
=cut
......
......@@ -155,7 +155,7 @@ sub migrate { confess "TODO" }
sub name($self) {
return $self->{_data}->{name} if exists $self->{_data} && $self->{_data}->{name};
return $self->_data('name')
return $self->_data('name')
}
sub pause { confess "TODO" }
......
......@@ -63,7 +63,7 @@
};
function swSupForm() {
return {
restrict: "E",
templateUrl: '/ng-templates/support_form.html',
......@@ -73,8 +73,8 @@
function addUserFormCrtl($scope, $http, request){
};
function swNewMach() {
......@@ -354,7 +354,7 @@
}, 2000);
$http.get('/machine/screenshot/'+machineId+'.json');
};
$scope.reload_page_copy_msg = false;
$scope.fail_page_copy_msg = false;
$scope.copy_done = false;
......@@ -603,7 +603,7 @@
$scope.init_domain_access();
});
};
$scope.set_access = function(id_access, allowed, last) {
$http.get('/machine/set_access/'+$scope.showmachine.id+'/'+id_access+'/'+allowed
+'/'+last)
......@@ -889,7 +889,7 @@
if (!$scope.redirect_done) {
$timeout(function() {
if(typeof $_anonymous != "undefined" && $_anonymous){
window.location.href="/anonymous";
window.location.href="/anonymous";
}
else {
window.location.href="/logout";
......@@ -947,13 +947,13 @@
$scope.add_user = function() {
$http.get('/users/register')
};
$scope.checkbox = [];
//if it is checked make the user admin, otherwise remove admin
$scope.stateChanged = function(id,userid) {
$scope.stateChanged = function(id,userid) {
if($scope.checkbox[id]) { //if it is checked
$http.get('/users/make_admin/' + userid + '.json')
location.reload();
......@@ -967,7 +967,7 @@
};
function swListUsers() {
return {
restrict: "E",
templateUrl: '/ng-templates/list_users.html',
......@@ -1037,7 +1037,7 @@
//here you should access the backend, to check if username exists
//and return a promise
//here we're using $q and $timeout to mimic a backend call
//here we're using $q and $timeout to mimic a backend call
//that will resolve after 1 sec
var defer = $q.defer();
......
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