Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
6dfdc781
Unverified
Commit
6dfdc781
authored
Oct 26, 2020
by
robertperez-upc
Committed by
GitHub
Oct 26, 2020
Browse files
Add debug option (#1402)
DEBUG can be managed from admin/settings and changed on-the-fly
parent
ea78982f
Changes
4
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
6dfdc781
...
...
@@ -1340,6 +1340,7 @@ sub _sql_insert_defaults($self){
fallback
=>
0
,
session_timeout
=>
10
*
60
,
admin_session_timeout
=>
30
*
60
,
debug
=>
0
,
auto_view
=>
1
};
if
(
-
e
"
/etc/rvd_front.conf
"
){
...
...
@@ -1400,6 +1401,11 @@ sub _sql_insert_defaults($self){
,
name
=>
'
start_limit
'
,
value
=>
1
}
,{
id_parent
=>
$id_backend
,
name
=>
'
debug
'
,
value
=>
0
}
]
);
my
%field
=
(
settings
=>
'
name
'
);
...
...
@@ -4338,6 +4344,11 @@ sub _cmd_open_exposed_ports($self, $request) {
$domain
->
open_exposed_ports
();
}
sub
set_debug_value
($self) {
$DEBUG
=
$self
->
setting
('
backend/debug
');
}
=head2 setting
Returns the value of a configuration setting
...
...
script/rvd_back
View file @
6dfdc781
...
...
@@ -187,7 +187,7 @@ sub do_start {
$ravada
->
process_priority_requests
();
$ravada
->
process_long_requests
();
$ravada
->
process_requests
();
$ravada
->
set_debug_value
();
exit
if
done_request
();
if
(
time
-
$t_refresh
>
60
)
{
...
...
@@ -242,6 +242,7 @@ sub start {
my
$ravada
=
Ravada
->
new
(
%CONFIG
);
$
Ravada::
CONNECTOR
->
dbh
;
$ravada
->
_install
();
$ravada
->
set_debug_value
();
for
my
$vm
(
@
{
$ravada
->
vm
})
{
$vm
->
id
;
}
...
...
script/rvd_front
View file @
6dfdc781
...
...
@@ -107,6 +107,7 @@ plugin I18N => {namespace => 'Ravada::I18N', default => 'en'};
my %config;
%config = (config => $CONFIG_FRONT->{config}) if $CONFIG_FRONT->{config};
our $RAVADA = Ravada::Front->new(%config);
our $USER;
...
...
templates/main/admin_settings.html.ep
View file @
6dfdc781
...
...
@@ -102,6 +102,18 @@
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-1"
></div>
<div
class=
"col-md-2"
>
<label
for=
"debug"
>
Debug
</label>
</div>
<div
class=
"col-md-6"
>
<input
name=
"debug"
ng-model=
"settings.backend.debug.value"
ng-true-value=
"1"
ng-false-value=
"0"
type=
"checkbox"
>
<
%=
l
'
Debug
'
%
>
</div>
</div>
<hr>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment