From: Eric Bollengier Date: Thu, 3 Jan 2008 10:44:13 +0000 (+0000) Subject: ebl Put default value to btime X-Git-Tag: Release-3.0.0~2062 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=66c781e7cd91451e89af70e93a4fe4fb004c8c56;p=bacula%2Fbacula ebl Put default value to btime ebl Add 24h period git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6182 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/cgi/btime.pl b/gui/bweb/cgi/btime.pl index 352db935d1..1bace5b03a 100755 --- a/gui/bweb/cgi/btime.pl +++ b/gui/bweb/cgi/btime.pl @@ -38,6 +38,7 @@ use GTime; use Getopt::Long ; use Bweb; use Time::ParseDate qw/parsedate/; +use POSIX qw/strftime/; use CGI; my $conf = new Bweb::Config(config_file => $Bweb::config_file); @@ -47,6 +48,10 @@ my $bweb = new Bweb(info => $conf); my $arg = $bweb->get_form(qw/qiso_begin qiso_end qusage qpool qnojob jclient_groups db_client_groups qclient_groups/); +if (!$arg->{qiso_begin}) { + $arg->{qiso_begin} = strftime('\'%F %H:%M:00\'', localtime(time - 60*60*12)); + $arg->{qiso_end} = strftime('\'%F %H:%M:00\'', localtime(time)); +} use Digest::MD5 qw(md5_hex); my $md5_rep = md5_hex("$arg->{qiso_begin}:$arg->{qiso_end}:$arg->{qusage}:" . "$arg->{jclient_groups}:$arg->{qpool};$arg->{qnojob}") ; diff --git a/gui/bweb/tpl/display_form_job.tpl b/gui/bweb/tpl/display_form_job.tpl index cf28b484f3..ad0e0eea3e 100644 --- a/gui/bweb/tpl/display_form_job.tpl +++ b/gui/bweb/tpl/display_form_job.tpl @@ -55,6 +55,7 @@

__Age__

+