]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Removed pools and volumes list from main layout
authorDavide Franco <bacula-dev@dflc.ch>
Tue, 7 Dec 2010 10:46:05 +0000 (11:46 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:43:31 +0000 (14:43 +0200)
 - New pools.php script
 - Renammed volumes.tpl to pools.tpl
 - Modified css attributes for main layout

gui/bacula-web/index.php
gui/bacula-web/pools.php
gui/bacula-web/style/default.css
gui/bacula-web/templates/index.tpl
gui/bacula-web/templates/pools.tpl [new file with mode: 0644]
gui/bacula-web/templates/volumes.tpl [deleted file]

index 93a130edff0c8b44da2857a5eada454b3afc02e8..8265f91350efab0517c94d6b688eabd70051ef06 100644 (file)
@@ -125,7 +125,7 @@ $smarty->assign('clientes_totales',$nb_clients["nb_client"] );
 $smarty->assign( 'total_name_jobs', $dbSql->Get_BackupJob_Names() );
 
 // Get volumes list (volumes.tpl)
-$smarty->assign('pools',$dbSql->GetVolumeList() );
+$smarty->assign('pools', $dbSql->GetVolumeList() );
 
 // Last 24 hours completed jobs number (last_run_report.tpl)
 $completed_jobs = $dbSql->GetLastJobs();
index 62a2de0c86e67cd85333eb6effb08b9f6eea76f6..25839026620a5c154428411d563fe11a13bda9f0 100644 (file)
@@ -1,3 +1,26 @@
 <?php
+  session_start();
+  require_once ("paths.php");
+  require_once ($smarty_path."Smarty.class.php");
+  require_once ("bweb.inc.php");
+  require_once ("config.inc.php");
 
+  $smarty = new Smarty();
+  $dbSql = new Bweb();
+
+  require("lang.php");
+
+  // Smarty configuration
+  $smarty->compile_check = true;
+  $smarty->debugging = false;
+  $smarty->force_compile = true;
+
+  $smarty->template_dir = "./templates";
+  $smarty->compile_dir = "./templates_c";
+  $smarty->config_dir     = "./configs";
+
+  // Get volumes list (pools.tpl)
+  $smarty->assign('pools',$dbSql->GetVolumeList() );
+
+  $smarty->display('pools.tpl');
 ?>
index 85762b5b388882f6edffe2e2a0331228cc6d5536..c25bbe0c46d34aba85db1d28e422c629289d44af 100644 (file)
@@ -74,7 +74,7 @@ a:hover { color: #736F6E }
  left:10px; 
  width: 500px; 
  border:none; 
- margin-top: 1em
+ margin-top: 0px
  background-color: #FFFFFF;
 }
 
@@ -83,7 +83,7 @@ a:hover { color: #736F6E }
  left:520px; 
  width: 500px; 
  border: none; 
- margin-top: 1em;
+ margin-top: 0px;
 }
 
 #main_center {
@@ -91,7 +91,7 @@ a:hover { color: #736F6E }
  left:10px; 
  width: 900px; 
  /*border: 1px solid red; */
- margin-top: 1em;
+ margin-top: 0px;
 }
 
 .box {
index 40e2681d9256f423d24713cecac40109d5b12adc..d144e4006927522a99a80fdb3f832bc6896ef4a8 100644 (file)
@@ -43,7 +43,8 @@
          <img src="{$graph_pools}" alt="" />
   </div> <!-- end div box -->
 
-  {include file=volumes.tpl}
+{* {include file=volumes.tpl}*}
+
 </div>
 
 <!-- To be removed -->
diff --git a/gui/bacula-web/templates/pools.tpl b/gui/bacula-web/templates/pools.tpl
new file mode 100644 (file)
index 0000000..75d6552
--- /dev/null
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+  "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>bacula-web</title>
+<link rel="stylesheet" type="text/css" href="style/default.css">
+{literal}
+<script type="text/javascript">
+        function OpenWin(URL,wid,hei) {
+                window.open(URL,"window1","width="+wid+",height="+hei+",scrollbars=yes,menubar=no,location=no,resizable=no")
+        }
+</script>
+{/literal}
+
+</head>
+<body>
+{popup_init src='./external_packages/js/overlib.js'}
+{include file=header.tpl}
+
+<div id="nav">
+  <a href="index.php" title="Back to the dashboard">Dashboard</a> > Pools and Volumes list
+</div>
+
+<div id="main_center">
+<div class="box">
+  <p class="title">Pools</p>
+       
+  <table class="list">
+       {foreach from=$pools item=pool key=pool_name}
+       <tr>
+               <th colspan="6" style="font-size: 10pt; text-align: center; background-color: #E0C8E5; color: black; padding: 3px;">
+                       {$pool_name}
+               </th>
+       </tr>
+       <tr style="text-align: center;">
+               <td class="info">Name</td>
+               <td class="info">{t}Bytes{/t}</td>
+               <td class="info">{t}Media Type{/t}</td>
+               <td class="info">{t}Expire{/t}</td>
+               <td class="info">{t}Last written{/t}</td>
+               <td class="info">{t}Status{/t}</td>
+       </tr>
+       {foreach from=$pool item=volume}
+               <tr style="text-align: center;">
+                       <td style="text-align: left;">{$volume.volumename}</td>
+                       <td>{$volume.volbytes}</td>
+                       <td>{$volume.mediatype}</td>
+                       <td>{$volume.expire}</td>
+                       <td>{$volume.lastwritten}</td>
+                       <td>{$volume.volstatus}</td>
+               {foreachelse}
+               <tr>
+                       <td colspan="6" style="text-align: center; font-weight: bold; font-size: 8pt; padding: 1em;">
+                               No volume in this pool
+                       </td>
+               {/foreach}
+               </tr>
+       {/foreach}
+  </table>
+
+</div> <!-- end div box -->
+</div> <!-- end div main_center -->
+
+<!-- End volumes.tpl -->
+
+{include file="footer.tpl"}
diff --git a/gui/bacula-web/templates/volumes.tpl b/gui/bacula-web/templates/volumes.tpl
deleted file mode 100644 (file)
index 3ed7555..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<!-- volumes.tpl -->
-
-<div class="box">
-  <p class="title">Pools</p>
-       
-  <table class="list">
-       {foreach from=$pools item=pool key=pool_name}
-       <tr>
-               <th colspan="6" style="font-size: 10pt; text-align: center; background-color: #E0C8E5; color: black; padding: 3px;">
-                       {$pool_name}
-               </th>
-       </tr>
-       <tr style="text-align: center;">
-               <td class="info">Name</td>
-               <td class="info">{t}Bytes{/t}</td>
-               <td class="info">{t}Media Type{/t}</td>
-               <td class="info">{t}Expire{/t}</td>
-               <td class="info">{t}Last written{/t}</td>
-               <td class="info">{t}Status{/t}</td>
-       </tr>
-       {foreach from=$pool item=volume}
-               <tr style="text-align: center;">
-                       <td style="text-align: left;">{$volume.volumename}</td>
-                       <td>{$volume.volbytes}</td>
-                       <td>{$volume.mediatype}</td>
-                       <td>{$volume.expire}</td>
-                       <td>{$volume.lastwritten}</td>
-                       <td>{$volume.volstatus}</td>
-               {foreachelse}
-               <tr>
-                       <td colspan="6" style="text-align: center; font-weight: bold; font-size: 8pt; padding: 1em;">
-                               No volume in this pool
-                       </td>
-               {/foreach}
-               </tr>
-       {/foreach}
-  </table>
-
-</div> <!-- end div box -->
-
-<!-- End volumes.tpl -->