File tree Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -5781,7 +5781,7 @@ sub _cmd_refresh_machine($self, $request) {
5781
5781
$domain -> remove(Ravada::Utils::user_daemon);
5782
5782
return ;
5783
5783
}
5784
- $domain -> _fetch_networking_mode();
5784
+ $domain -> _fetch_networking_mode() if $domain -> is_known() ;
5785
5785
}
5786
5786
$domain -> info($user );
5787
5787
$domain -> client_status(1) if $is_active ;
Original file line number Diff line number Diff line change @@ -155,6 +155,8 @@ sub _list_machines($rvd, $args) {
155
155
unless $user -> can_view_admin_machines;
156
156
157
157
$args -> {_list_machines_time } = 0 if !$args -> {_list_machines_time };
158
+ $args -> {_list_machines_last } = 0 if !$args -> {_list_machines_last };
159
+
158
160
$args -> {_list_machines_time }++;
159
161
160
162
if ($args -> {_list_machines_time } == 1 ) {
Original file line number Diff line number Diff line change @@ -375,6 +375,9 @@ ravadaApp.directive("solShowMachine", swMach)
375
375
$scope . n_active_hidden = 0 ;
376
376
var action = data0 . action ;
377
377
var data = data0 . data ;
378
+ if ( typeof ( data ) == 'undefined' ) {
379
+ return ;
380
+ }
378
381
if ( action == 'new' || Object . keys ( $scope . list_machines ) . length == 0 ) {
379
382
$scope . list_machines . length = data . length ;
380
383
for ( var i = 0 , iLength = data . length ; i < iLength ; i ++ ) {
@@ -424,6 +427,8 @@ ravadaApp.directive("solShowMachine", swMach)
424
427
if ( mach2 . id_base > 0 ) { $scope . n_clones ++ }
425
428
}
426
429
}
430
+
431
+ $http . get ( "/logout.json" ) ;
427
432
}
428
433
var n_active_current = 0 ;
429
434
Original file line number Diff line number Diff line change @@ -359,6 +359,11 @@ any '/test' => sub {
359
359
);
360
360
};
361
361
362
+ any ' /logout.json' => sub ($c ) {
363
+ logout($c );
364
+ return $c -> render(json => {logout => ' 1' });
365
+ };
366
+
362
367
any ' /logout' => sub {
363
368
my $c = shift ;
364
369
my $redirect_to = logout($c );
@@ -604,7 +609,7 @@ get '/list_nodes_by_id.json' => sub {
604
609
};
605
610
606
611
get ' /list_host_devices/(:id_vm)' => sub ($c ) {
607
- $c -> render(json => Ravada::WebSocket::_list_host_devices(undef , $RAVADA
612
+ $c -> render(json => Ravada::WebSocket::_list_host_devices($RAVADA
608
613
, {
609
614
channel => ' /' .$c -> stash(' id_vm' )
610
615
,login => $USER -> name
You can’t perform that action at this time.
0 commit comments