]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Removed report page from git branch
authorDavide Franco <bacula-dev@dflc.ch>
Mon, 20 Jun 2011 17:26:34 +0000 (19:26 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 2 Aug 2011 09:56:17 +0000 (11:56 +0200)
 - The client report page will replace this one

gui/bacula-web/report.php [deleted file]
gui/bacula-web/templates/report.tpl [deleted file]

diff --git a/gui/bacula-web/report.php b/gui/bacula-web/report.php
deleted file mode 100644 (file)
index dcf1c0b..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/* 
-+-------------------------------------------------------------------------+
-| Copyright (C) 2004 Juan Luis Francés Jiménez                                                   |
-| Copyright 2010-2011, Davide Franco                                             |
-|                                                                         |
-| This program is free software; you can redistribute it and/or           |
-| modify it under the terms of the GNU General Public License             |
-| as published by the Free Software Foundation; either version 2          |
-| of the License, or (at your option) any later version.                  |
-|                                                                         |
-| This program is distributed in the hope that it will be useful,         |
-| but WITHOUT ANY WARRANTY; without even the implied warranty of          |
-| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
-| GNU General Public License for more details.                            |
-+-------------------------------------------------------------------------+ 
-*/
-session_start();
-include_once( 'config.inc.php' );
-
-$dbSql = new Bweb();
-
-if ( $_GET['default'] == 1) {                                                                                                   // Default params, 1 month
-        $dbSql->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. <select> date
-
-
-
-$dbSql->tpl->display('report.tpl');
-?>
diff --git a/gui/bacula-web/templates/report.tpl b/gui/bacula-web/templates/report.tpl
deleted file mode 100644 (file)
index 7863328..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-{* Página principal BACULA *}
-{config_load  file=bacula.conf}
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
-  "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-<head>
-<title>{t}Stats Bacula: Job{/t} {$smarty.get.server}</title>
-<link rel="stylesheet" type="text/css" href="style/default.css" />
-</head>
-<body>
-<table width="100%" border="1" class="back">
-<tr>
-       <td width=65% valign=top>
-               <table width=100% cellpadding=5>
-               <tr>
-                       <td align=center class=titulo>
-                               {t}Job:{/t} <font color=blue> {$smarty.get.server}</font>
-                               <br>
-                               {t}Period: From{/t} <font color=red>{$startperiod|date_format:"%d/%m/%Y"}</font> {t}to{/t} <font color=red>{$endperiod|date_format:"%d/%m/%Y"}</font>
-                       </td>
-               </tr>
-
-               <tr>
-                       <td align=left>
-                               <table width=100%>
-                               <tr>
-                                       <td class=table1>
-                                               {t}Bytes transferred in the period:{/t}
-                                       </td>
-                                       <td align=right width=15% class=table2>
-                                               {$bytesperiod}
-                                       </td>
-                               </tr>
-                               <tr>
-                                       <td class=table1 >
-                                               {t}Files transferred in the period:{/t}
-                                       </td>
-                                       <td align=right class=table2>
-                                               {$filesperiod}
-                                       </td>
-                               </tr>
-                               <tr>
-                                       <td colspan=2>
-                                               {if $smarty.get.server==""}
-                                                       <img src=stats.php?server={$smarty.get.server|escape:"url"}&amp;tipo_dato=69&amp;title=Análisis%20general&amp;modo_graph=lines>
-                                               {elseif $smarty.get.default == 1}
-                                                       <img src=stats.php?server={$smarty.get.server|escape:"url"}&amp;tipo_dato=3&amp;title={$smarty.get.server|escape:"url"}&amp;modo_graph=bars&amp;StartDateMonth={$startperiod|date_format:"%m"}&amp;StartDateDay={$startperiod|date_format:"%d"}&amp;StartDateYear={$startperiod|date_format:"%Y"}&amp;EndDateMonth={$endperiod|date_format:"%m"}&amp;EndDateDay={$endperiod|date_format:"%d"}&amp;EndDateYear={$endperiod|date_format:"%Y"}>                                            
-                                               {else}
-                                                       <img src=stats.php?server={$smarty.get.server|escape:"url"}&amp;tipo_dato={$smarty.get.tipo_dato}&amp;title={$smarty.get.server|escape:"url"}&amp;modo_graph={$smarty.get.modo_graph}&amp;StartDateMonth={$smarty.get.StartDateMonth}&StartDateDay={$smarty.get.StartDateDay}&StartDateYear={$smarty.get.StartDateYear}&EndDateMonth={$smarty.get.EndDateMonth}&EndDateDay={$smarty.get.EndDateDay}&EndDateYear={$smarty.get.EndDateYear}>
-                                               {/if}
-                                       </td>
-                               </tr>           
-                               </table>
-                       </td>
-               </tr>
-               </table>        
-       </td>
-       <td width=35%>
-               <table width=100% border=0>
-               <tr>
-                       <td>{include file=report_select.tpl}</td>
-               </tr>
-               <tr>
-                       <td>  
-                               <table width=100% border=0 class=genmed cellpadding=0 cellspacing=2>
-                               <tr class=titulo2>
-                                       <td style="background-image: url('style/images/bg7.gif'); height: 25px;">{t}JobID{/t}</td>
-                                       <td style="background-image: url('style/images/bg7.gif'); height: 25px;">{t}Date{/t}</td>
-                                       <td style="background-image: url('style/images/bg7.gif'); height: 25px;">{t}Elapsed{/t}</td>
-                                       <td style="background-image: url('style/images/bg7.gif'); height: 25px;">{t}Level{/t}</td>
-                                       <td style="background-image: url('style/images/bg7.gif'); height: 25px;">{t}Bytes{/t}</td>
-                                       <td style="background-image: url('style/images/bg7.gif'); height: 25px;">{t}Status{/t}</td>
-                               </tr>
-                               {section name=job loop=$jobs}
-                               <tr class={cycle values="table1,table2"}>
-                                       <td align=center>{$jobs[job].JobId}</td>
-                                       <td>{$jobs[job].StartTime}</td>
-                                       <td>{$jobs[job].elapsed}</td>
-                                       <td>{$jobs[job].Level}</td>
-                                       <td>{$jobs[job].JobBytes}</td>
-                                       <td align=center width=1%>
-                                               {if $jobs[job].JobStatus eq "T"}
-                                                       <img src=style/images/s_ok.gif>
-                                               {else}
-                                                       <img src=style/images/s_error.gif>
-                                               {/if}
-                                       </td>
-                               </tr>
-                               {/section}
-                               </table>
-                       </td>
-               </tr>
-               </table>
-       <td>
-</tr>
-</table>       
-
-
-
-{include file="footer.tpl"}