]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Add week number in sql_func
authorEric Bollengier <eric@eb.homelinux.org>
Tue, 23 Oct 2007 15:42:46 +0000 (15:42 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 23 Oct 2007 15:42:46 +0000 (15:42 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5789 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/lib/Bweb.pm

index 4b365cd012b938a73d3ab7f97070651b1a4db6e3..bb701b570fcbcb627171382455c9051f4c12ca47 100644 (file)
@@ -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