From: Eric Bollengier Date: Tue, 23 Oct 2007 15:42:46 +0000 (+0000) Subject: ebl Add week number in sql_func X-Git-Tag: Release-3.0.0~2350 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d3c46cc298451bd72d346e8d6a24001f84fb329d;p=bacula%2Fbacula ebl Add week number in sql_func git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5789 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index 4b365cd012..bb701b570f 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -1049,6 +1049,7 @@ our %sql_func = ( STARTTIME_PHOUR=> " date_part('hour', Job.StartTime) ", STARTTIME_PDAY => " date_part('day', Job.StartTime) ", STARTTIME_PMONTH => " date_part('month', Job.StartTime) ", + STARTTIME_PWEEK => " date_part('week', Job.StartTime) ", DB_SIZE => " SELECT pg_database_size(current_database()) ", CAT_POOL_TYPE => " MediaType || '_' || Pool.Name ", }, @@ -1065,6 +1066,7 @@ our %sql_func = ( STARTTIME_PHOUR=> " DATE_FORMAT(StartTime, '%H') ", STARTTIME_PDAY => " DATE_FORMAT(StartTime, '%d') ", STARTTIME_PMONTH => " DATE_FORMAT(StartTime, '%m') ", + STARTTIME_PWEEK => " DATE_FORMAT(StartTime, '%v') ", # with mysql < 5, you have to play with the ugly SHOW command DB_SIZE => " SELECT 0 ", # works only with mysql 5