From: Davide Franco Date: Mon, 20 Jun 2011 17:26:34 +0000 (+0200) Subject: bacula-web: Removed report page from git branch X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5efa64e5014ca264c7008fd4b339cfa0d73f678a;p=bacula%2Fbacula bacula-web: Removed report page from git branch - The client report page will replace this one --- diff --git a/gui/bacula-web/report.php b/gui/bacula-web/report.php deleted file mode 100644 index dcf1c0bb8f..0000000000 --- a/gui/bacula-web/report.php +++ /dev/null @@ -1,67 +0,0 @@ -StartDate = strftime("%Y-%m-%d %H:%M:%S",time()-2678400); - $dbSql->EndDate = strftime("%Y-%m-%d %H:%M:%S",time()); -} -else // With params - $dbSql->PrepareDate($_GET['StartDateMonth'],$_GET['StartDateDay'],$_GET['StartDateYear'],$_GET['EndDateMonth'],$_GET['EndDateDay'],$_GET['EndDateYear']); - -$bytes = $dbSql->CalculateBytesPeriod($_GET['server'],$dbSql->StartDate,$dbSql->EndDate); -$files = $dbSql->CalculateFilesPeriod($_GET['server'],$dbSql->StartDate,$dbSql->EndDate); -$smarty->assign('startperiod',$dbSql->StartDate); -$smarty->assign('endperiod',$dbSql->EndDate); -$smarty->assign( 'bytesperiod', Utils::Get_Human_Size( $bytes ) ); -$smarty->assign('filesperiod',$files); - -// Array with jobs data -$a_jobs = array(); -if ($dbSql->driver == "mysql") - $res_jobs = $dbSql->db_link->query("select *,SEC_TO_TIME( UNIX_TIMESTAMP(Job.EndTime)-UNIX_TIMESTAMP(Job.StartTime) ) as elapsed from Job where EndTime < '$dbSql->EndDate' and EndTime > '$dbSql->StartDate' and Name='$_GET[server]' order by EndTime") - or die("Error query row 50"); -else if ($dbSql->driver == "pgsql") - $res_jobs = $dbSql->db_link->query("select jobid as \"JobId\",job as \"Job\",name as \"Name\",type as \"Type\",level as \"Level\",clientid as \"ClientId\",jobstatus as \"JobStatus\",schedtime as \"SchedTime\",starttime as \"StartTime\",endtime as \"EndTime\",jobtdate as \"JobtDate\",volsessionid as \"VolSessionId\",volsessiontime as \"VolSessionTime\",jobfiles as \"JobFiles\",jobbytes as \"JobBytes\",joberrors as \"JobErrors\",jobmissingfiles as \"JobMissingFiles\",poolid as \"PoolId\",filesetid as \"FilesetId\",purgedfiles as \"PurgedFiles\",hasbase,Job.EndTime::timestamp-Job.StartTime::timestamp as elapsed from Job where EndTime < '$dbSql->EndDate' and EndTime > '$dbSql->StartDate' and Name='$_GET[server]' order by EndTime") - or die("Error query row 56"); - -while ( $tmp = $res_jobs->fetchRow(DB_FETCHMODE_ASSOC) ) { - $tdate = explode (":",$tmp['elapsed']); // Temporal "workaround" ;) Fix later - if ( $tdate[0] > 300000 ) - $tmp['elapsed'] = "00:00:00"; - $tmp['JobBytes'] = Utils::Get_Human_Size( $tmp['JobBytes'] ); - array_push($a_jobs,$tmp); -} -$smarty->assign('jobs',$a_jobs); - -// report_select.tpl -$res = $dbSql->db_link->query("select Name from Job group by Name"); -$a_jobs = array(); -while ( $tmp = $res->fetchRow() ) - array_push($a_jobs, $tmp[0]); -$smarty->assign('total_name_jobs',$a_jobs); -$res->free(); -$smarty->assign('time2',( (time())-2678400) ); // Current time - 1 month.