]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Added client information on client report page
authorDavide Franco <bacula-dev@dflc.ch>
Sat, 23 Jul 2011 08:54:00 +0000 (10:54 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:26 +0000 (14:49 +0200)
gui/bacula-web/client-report.php
gui/bacula-web/style/default.css
gui/bacula-web/templates/client-report.tpl

index fea5d291fadd8bc73d557989aee1cbb4a6521999..fd4291eb0850150c1f3cf440891cc53350bb3a3a 100644 (file)
 | GNU General Public License for more details.                            |
 +-------------------------------------------------------------------------+
 */
-  session_start();
-  include_once( 'config/global.inc.php' );
+       session_start();
+       include_once( 'config/global.inc.php' );
 
-  $dbSql = new Bweb();
-
-  // Enter your code here ...
-
-  // Process and display the template
-  $dbSql->tpl->display('client-report.tpl');
+       $dbSql = new Bweb();
+       $clientid               = '';
+    $client                    = '';
+       $client_jobs    = array();
+       
+       $http_post = CHttpRequest::getRequestVars( $_POST ); 
+       $http_get  = CHttpRequest::getRequestVars( $_GET );
+       
+       if( isset( $http_post['client_id'] ) )
+               $clientid = $http_post['client_id'];
+       elseif( isset( $http_get['client_id'] ) )
+               $clientid = $http_get['client_id'];
+       else
+               die( "Application error: Client not specified " );
+               
+       // Client informations
+       $client = $dbSql->getClientInfos($clientid);
+       
+       $dbSql->tpl->assign( 'client_name', $client['name']);
+       $dbSql->tpl->assign( 'client_os', $client['os']);
+       $dbSql->tpl->assign( 'client_arch', $client['arch']);
+       $dbSql->tpl->assign( 'client_version', $client['version']);
+       
+       // Process and display the template
+       $dbSql->tpl->display('client-report.tpl');
 ?>
index 92a134c04c2f88e27c264390d0275c330d3b69fe..57d712420600f1cf2da65f62324c69ea73042c95 100644 (file)
@@ -139,6 +139,11 @@ a:link, a:visited, a:hover, a:visited {
  text-align: center;
 }
 
+.box h3, .box h4 {
+ text-align:left;
+ margin-left: 10px;
+}
+
 .box p.title {
  /*height: 25px;*/
  text-align: center;
@@ -162,6 +167,10 @@ a:link, a:visited, a:hover, a:visited {
  vertical-align: middle;
 }
 
+.box table {
+
+}
+
 .box table tr td {
  padding: 3px;
  font-size: 8pt;
index e2af4e5de141362894aac8c7dba2b13d30c91da8..b1c09b0dfd951b6fd31307fc3f23f6dd1bc577d4 100644 (file)
   
   <div class="box">
        <p class="title">Client(s) Report</p>
+
+  <h4>Client informations</h4> 
+  <table width="300px">
+       <tr>
+               <td width="100px" class="label"><b>Client name:</b></td> <td>{$client_name}</td>
+       </tr>
+       <tr>
+               <td class="label"><b>Client version:</b></td> <td>{$client_version}</td>
+       </tr>
+       <tr>
+               <td class="label"><b>Client os:</b></td> <td>{$client_os}</td>
+       </tr>
+       <tr>
+               <td class="label"><b>Client arch:</b></td> <td>{$client_arch}</td>
+       </tr>
+  </table>
        
   </div> <!-- end div class=box -->
   
-  <div id="main_center"> 
   </div> <!-- end div id=main_center -->
 
 {include file="footer.tpl"}