]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Make an english distribution
authorEric Bollengier <eric@eb.homelinux.org>
Fri, 21 Dec 2007 21:05:28 +0000 (21:05 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Fri, 21 Dec 2007 21:05:28 +0000 (21:05 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6084 91ce42f0-d328-0410-95d8-f526ca767f89

50 files changed:
gui/bweb/lang/en/en.pl [new file with mode: 0644]
gui/bweb/lang/en/tpl/about.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/ach_add.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/ach_content.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/add_media.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/begin.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/btime.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/change_location.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/client_job_status.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/client_list.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/command.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/config_edit.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/config_view.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_client_stats.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_form_job.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_form_media.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_groups.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_job.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_job_group.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_job_zoom.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_location.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_log.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_media.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_media_zoom.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_pool.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_user.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/display_users.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/end.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/error.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/extern.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/fileset_view.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/fv_file_attribs.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/general.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/graph.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/groups_edit.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/help_extern.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/help_extern_compute.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/help_intern.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/help_intern_compute.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/location_add.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/location_edit.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/move_media.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/overview.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/run_job.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/run_job_mod.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/running_job.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/scheduled_job.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/stats.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/update_location.tpl [new file with mode: 0644]
gui/bweb/lang/en/tpl/update_media.tpl [new file with mode: 0644]

diff --git a/gui/bweb/lang/en/en.pl b/gui/bweb/lang/en/en.pl
new file mode 100644 (file)
index 0000000..b9d3408
--- /dev/null
@@ -0,0 +1,2 @@
+s!__!!g;
+print;
diff --git a/gui/bweb/lang/en/tpl/about.tpl b/gui/bweb/lang/en/tpl/about.tpl
new file mode 100644 (file)
index 0000000..e45868a
--- /dev/null
@@ -0,0 +1,39 @@
+<br/>
+<div class='titlediv'>
+  <h1 class='newstitle'> About </h1>
+</div>
+<div class='bodydiv'>
+<pre>
+   Bweb - A Bacula web interface
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+
+   The main author of Bweb is Eric Bollengier.
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation plus additions
+   that are listed in the file LICENSE.
+
+   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.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zurich,
+   Switzerland, email:ftf@fsfeurope.org.
+
+   nrsTable Copyright 2005 New Roads School (GPL)
+   kaiska css Copyright Willy Morin (BWL)
+</pre>
+</div>
diff --git a/gui/bweb/lang/en/tpl/ach_add.tpl b/gui/bweb/lang/en/tpl/ach_add.tpl
new file mode 100644 (file)
index 0000000..8c11136
--- /dev/null
@@ -0,0 +1,73 @@
+<br/>
+<div class='titlediv'>
+  <h1 class='newstitle'><TMPL_UNLESS name>New</TMPL_UNLESS> Autochanger </h1>
+</div>
+<div class='bodydiv'>
+   You have to create a Location which will have the same name.<br/><br/>
+
+   <form name='form1' action="?" method='get'>
+    <table>
+     <tr><td>Name:</td>     
+         <td>
+          <select name='ach' class='formulaire' id='ach'>
+<TMPL_LOOP devices><option value='<TMPL_VAR name>'><TMPL_VAR name></option></TMPL_LOOP>
+          </select>
+         </td>
+     </tr>
+     <tr><td>Pre-command:</td> 
+         <td> <input class="formulaire" type='text' id='precmd' value='sudo'
+           title='can be "sudo" or "ssh storage@storagehost"...' name='precmd'>
+         </td>
+     </tr>
+     <tr><td>mtx command:</td> 
+         <td> <input class="formulaire" type='text' name='mtxcmd' size='32'
+               value='/usr/sbin/mtx' id='mtxcmd'>
+         </td>
+     </tr>
+     <tr><td>Device:</td> 
+         <td> <input class="formulaire" type='text' name='device' 
+               value='/dev/changer' id='device'>
+         </td>
+     </tr>
+    <tr><td><b>Drives</b></td><td/></tr>
+    <TMPL_LOOP devices>
+    <tr>
+     <td><input class='formulaire' type='checkbox' id='drive_<TMPL_VAR name>'
+                name='drives' value='<TMPL_VAR name>'><TMPL_VAR name>
+     </td>
+     <td>index <input type='text' title='drive index' 
+                class='formulaire'
+               id='index_<TMPL_VAR name>' value='' 
+                name='index_<TMPL_VAR name>' size='3'>
+     </td>
+    </tr>
+    </TMPL_LOOP>
+    </table>
+    <button type="submit" class="bp" name='action' value='ach_add'> <img src='/bweb/save.png' alt=''>Save</button>
+   </form>
+</div>
+
+<script type="text/javascript" language="JavaScript">
+  <TMPL_IF name>
+  for (var i=0; i < document.form1.ach.length; ++i) {
+     if (document.form1.ach[i].value == '<TMPL_VAR name>') {
+        document.form1.ach[i].selected = true;
+     }
+  }
+  </TMPL_IF>
+  <TMPL_IF mtxcmd>
+     document.getElementById('mtxcmd').value='<TMPL_VAR mtxcmd>';
+  </TMPL_IF>
+  <TMPL_IF precmd>
+     document.getElementById('precmd').value='<TMPL_VAR precmd>';
+  </TMPL_IF>
+  <TMPL_IF device>
+     document.getElementById('device').value='<TMPL_VAR device>';
+  </TMPL_IF>
+  <TMPL_IF drives>
+   <TMPL_LOOP drives>
+     document.getElementById('drive_<TMPL_VAR name>').checked=true;
+     document.getElementById('index_<TMPL_VAR name>').value=<TMPL_VAR index>;
+   </TMPL_LOOP>
+  </TMPL_IF>
+</script>
diff --git a/gui/bweb/lang/en/tpl/ach_content.tpl b/gui/bweb/lang/en/tpl/ach_content.tpl
new file mode 100644 (file)
index 0000000..afe7bfa
--- /dev/null
@@ -0,0 +1,146 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'> 
+Autochanger: <TMPL_VAR Name> (<TMPL_VAR nb_drive> Drives
+<TMPL_IF nb_io><TMPL_VAR nb_io> IMPORT/EXPORT</TMPL_IF>)</h1>
+ </div>
+ <div class='bodydiv'>
+   <form action='?' method='get'>
+    <input type='hidden' name='ach' value='<TMPL_VAR name>'>
+    <TMPL_IF "Update">
+    <font color='red'> You must run update slot, Autochanger status is different from bacula slots </font>
+    <br/>
+    </TMPL_IF>
+    <table border='0'>
+    <tr>
+    <td valign='top'>
+    <div class='otherboxtitle'>
+     Tools
+    </div>
+    <div class='otherbox'>
+<button type="submit" class="bp" name='action' value='label_barcodes'
+ title='run label barcodes'><img src='/bweb/label.png' alt=''>Label</button>
+<TMPL_IF nb_io>
+<button type="submit" class="bp" name='action' value='eject'
+ title='put selected media on i/o'><img src='/bweb/extern.png' alt=''>Eject</button>
+<button type="submit" class="bp" name='action' value='clear_io'
+ title='Clear I/O'> <img src='/bweb/intern.png' alt=''>Clear I/O</button>
+</TMPL_IF>
+<button type="submit" class="bp" name='action' value='update_slots'
+ title='run update slots'> <img src='/bweb/update.png' alt=''>Update</button>
+<br/><br/>
+<button type="submit" class="bp" name='action' value='ach_load'
+ title='mount drive'> <img src='/bweb/load.png' alt=''>Mount</button>
+<button type="submit" class="bp" name='action' value='ach_unload'
+ title='umount drive'> <img src='/bweb/unload.png' alt=''>Umount</button>
+
+   </div>
+    <td width='200'/>
+    <td>
+    <b> Drives: </b><br/>
+    <table id='id_drive'></table> <br/>
+    </td>
+    </tr>
+    </table>
+    <b> Content: </b><br/>
+    <table id='id_ach'></table>
+   </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Real Slot", "Slot", "Volume Name",
+                      "Vol Bytes","Vol Status",
+                      "Media Type","Pool Name","Last Written", 
+                       "When expire ?", "Select");
+
+var data = new Array();
+var chkbox;
+
+<TMPL_LOOP Slots>
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'checkbox';
+chkbox.name = 'slot';
+chkbox.value = '<TMPL_VAR realslot>';
+
+data.push( new Array(
+"<TMPL_VAR realslot>",
+"<TMPL_VAR slot>",
+"<TMPL_VAR volumename>",
+human_size(<TMPL_VAR volbytes>),
+"<TMPL_VAR volstatus>",
+"<TMPL_VAR mediatype>",
+"<TMPL_VAR name>",
+"<TMPL_VAR lastwritten>",
+"<TMPL_VAR expire>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id_ach",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+// page_nav: true,
+// rows_per_page: rows_per_page,
+// disable_sorting: new Array(5,6)
+ padding: 3
+}
+);
+
+var header = new Array("Index", "Drive Name", 
+                      "Volume Name", "Select");
+
+var data = new Array();
+var chkbox;
+
+<TMPL_LOOP Drives>
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'checkbox';
+chkbox.name = 'drive';
+chkbox.value = '<TMPL_VAR index>';
+
+data.push( new Array(
+"<TMPL_VAR index>",
+"<TMPL_VAR name>",
+"<TMPL_VAR load>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id_drive",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+// page_nav: true,
+// rows_per_page: rows_per_page,
+// disable_sorting: new Array(5,6),
+ padding: 3
+}
+);
+
+</script>
diff --git a/gui/bweb/lang/en/tpl/add_media.tpl b/gui/bweb/lang/en/tpl/add_media.tpl
new file mode 100644 (file)
index 0000000..873b08e
--- /dev/null
@@ -0,0 +1,40 @@
+
+<div class='titlediv'>
+  <h1 class='newstitle'> Add media</h1>
+</div>
+<div class='bodydiv'>
+   <form action="?" method='get'>
+    <table>
+     <tr><td>Pool:</td>
+         <td> 
+            <select name='pool' size='5' class='formulaire'>
+            <TMPL_LOOP db_pools>
+            <option><TMPL_VAR name></option>
+            </TMPL_LOOP>
+            </select>
+         </td>
+     </tr>
+     <tr><td>Storage:</td> 
+         <td>
+            <select name='storage' size='5' class='formulaire'>
+            <TMPL_LOOP storage>
+            <option><TMPL_VAR name></option>
+            </TMPL_LOOP>
+            </select>
+         </td>
+     </tr>
+     <tr><td>Number of media to create:</td> 
+         <td><input size='3' type='text' name='nb' value='1' class='formulaire'></td>
+     </tr>
+     <tr><td>Starting number:</td> 
+         <td><input size='3' type='text' name='offset' class='formulaire' value='1'></td>
+     </tr>
+     <tr><td>Name:</td> 
+         <td><input size='8' type='text' name='media' class='formulaire' value='Vol'></td>
+     </tr>
+    </table>
+    <button type="submit" class="bp" name='action' value='add_media'>
+     <img src='/bweb/add.png' alt=''>Add<button>
+   </form>
+</div>
+
diff --git a/gui/bweb/lang/en/tpl/begin.tpl b/gui/bweb/lang/en/tpl/begin.tpl
new file mode 100644 (file)
index 0000000..c097390
--- /dev/null
@@ -0,0 +1,80 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+<head>
+<title>Bweb - Bacula Web Interface</title>
+<link rel="SHORTCUT ICON" href="/bweb/favicon.ico">
+<script type="text/javascript" language="JavaScript" src="/bweb/natcompare.js"></script>
+<script type="text/javascript" language="JavaScript" src="/bweb/nrs_table.js"></script>
+<script type="text/javascript" language="JavaScript" src="/bweb/bweb.js"></script>
+<link type="text/css" rel="stylesheet" href="/bweb/style.css"/>
+<link type="text/css" rel="stylesheet" href="/bweb/kaiska.css"/>
+<link type="text/css" rel="stylesheet" href="/bweb/bweb.css"/>
+</head>
+<body>
+
+<script type="text/javascript" language="JavaScript">
+if (navigator.appName == 'Konqueror') {
+        alert("Sorry at this moment, bweb works only with mozilla.");
+}
+</script>
+
+<ul id="menu">
+ <li><a href="bweb.pl?">Main</a> </li>
+ <li><a href="bweb.pl?action=client">Clients</a>
+     <ul>
+       <li><a href="bweb.pl?action=client">Clients</a> </li>
+       <li><a href="bweb.pl?action=groups">Groups</a> </li>
+     </ul>
+ </li>
+ <li style="padding: 0.25em 2em;">Jobs
+   <ul> 
+     <li><a href="bweb.pl?action=run_job">Defined Jobs</a>
+     <li><a href="bweb.pl?action=job_group">Jobs by group</a>
+     <li><a href="bweb.pl?action=overview">Jobs overview</a>
+     <li><a href="bweb.pl?action=job">Last Jobs</a> </li>
+     <li><a href="bweb.pl?action=running">Running Jobs</a>
+     <li><a href="bweb.pl?action=next_job">Next Jobs</a> </li>
+     <li><a href="bweb.pl?action=restore" title="Launch brestore">Restore</a> </li>
+   </ul>
+ </li>
+ <li style="padding: 0.25em 2em;">Media
+  <ul>
+     <li><a href="bweb.pl?action=pool">Pools</a> </li>
+     <li><a href="bweb.pl?action=location">Locations</a> </li>
+     <li><a href="bweb.pl?action=media">All Media</a><hr></li>
+     <li><a href="bweb.pl?action=add_media">Add Media</a><hr></li>
+     <li><a href="bweb.pl?action=extern_media">Eject Media</a> </li>
+     <li><a href="bweb.pl?action=intern_media">Load Media</a> </li>
+  </ul>
+ </li>
+<TMPL_IF achs>
+ <li style="padding: 0.25em 2em;">Autochanger
+  <ul>
+<TMPL_LOOP achs>
+   <li><a href="bweb.pl?action=ach_view;ach=<TMPL_VAR name>"><TMPL_VAR name></a></li>
+</TMPL_LOOP>
+  </ul>
+ </li>
+</TMPL_IF> 
+ <li><a href="bweb.pl?action=graph"> Statistics </a></li>
+ <li> <a href="bweb.pl?action=view_conf"> Configuration </a> 
+<TMPL_IF enable_security>
+  <ul> <li> <a href="bweb.pl?action=view_conf"> Configuration </a> 
+       <li> <a href="bweb.pl?action=users"> Manage users </a>
+  </ul>
+</TMPL_IF>
+</li>
+ <li> <a href="bweb.pl?action=about"> About </a> </li>
+ <li style="padding: 0.25em 2em;float: right;">&nbsp;Logged as <TMPL_VAR NAME=loginname> </li>
+ <li style="float: right;white-space: nowrap;">
+<button type="submit" class="bp" class="button" title="Search media" onclick="search_media();"><img src="/bweb/tape.png" alt=''></button><button type="submit" title="Search client" onclick="search_client();" class='bp'><img src="/bweb/client.png" alt=''></button><input class='formulaire' style="margin: 0 2px 0 2px; padding: 0 0 0 0;" id='searchbox' type='text' size='8' value='search...' onclick="this.value='';" title="Search media or client"></li> </button>
+</ul>
+
+<form name="search" action="bweb.pl?" method='GET'>
+ <input type="hidden" name="action" value=''>
+ <input type="hidden" name="re_media" value=''>
+ <input type="hidden" name="re_client" value=''>
+</form>
+
+<div style="clear: left;">
+<div style="float: left;">
diff --git a/gui/bweb/lang/en/tpl/btime.tpl b/gui/bweb/lang/en/tpl/btime.tpl
new file mode 100644 (file)
index 0000000..7859093
--- /dev/null
@@ -0,0 +1,176 @@
+ <div class='titlediv'>
+  <h1 class='newstitle'>Timing Statistics</h1>
+ </div>
+ <div class='bodydiv'>
+<table border='0' valign='top'>
+<td>
+<form name='form1' action='?' method='GET'>
+       <div class="otherboxtitle" valign='top'>
+          Options &nbsp;
+        </div>
+        <div class="otherbox">
+<table border='0'>
+<tr>
+  <td>
+    <h2>Time limits</h2>
+     <table>
+      <tr><td> Begin: </td> <td><input class='formulaire' type='text' 
+           id='iso_begin' name='iso_begin' title='YYYY-MM-DD HH:MM' 
+           <TMPL_IF qiso_begin> value=<TMPL_VAR qiso_begin> </TMPL_IF> 
+           size='16'>
+      </td></tr>
+      <tr><td> End: </td><td> <input type='text' class='formulaire' 
+       id='iso_end' name='iso_end' title='YYYY-MM-DD HH:MM'
+       <TMPL_IF qiso_end> value=<TMPL_VAR qiso_end> </TMPL_IF>
+        size='16'>
+      </td></tr>
+     </table>
+  </td>
+</tr>
+<tr>
+  <td>
+    <h2>Graph</h2>
+      <input type='checkbox' 
+             <TMPL_IF qusage>checked</TMPL_IF> 
+             name="usage"> Drive usage<br/>
+      <input type='checkbox' 
+             <TMPL_IF qpool>checked</TMPL_IF> 
+             name="pool"> Pool usage<br/>
+      <input type='checkbox' 
+             <TMPL_IF qnojob>checked</TMPL_IF> 
+             name="nojob"> Hide Job<br/>
+<TMPL_IF db_client_groups>
+<tr>
+  <td valign='top'>
+    <h2>Groups</h2>
+    <select name='client_group' size='10' class='formulaire' multiple>
+<TMPL_LOOP db_client_groups>
+       <option id= 'group_<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
+</TMPL_IF>
+  </td>
+</tr>
+<!--
+  <td valign='top'>
+    <h2>Level</h2>
+    <select name='level' class='formulaire'>
+      <option id='level_Any' value='Any'>Any</option>
+      <option id='level_F' value='F'>Full</option>
+      <option id='level_D' value='D'>Differential</option>
+      <option id='level_I' value='I'>Incremental</option>
+    </select>     
+  </td><td valign='top'>
+    <h2>Status</h2>
+    <select name='status' class='formulaire'>
+      <option id='status_Any' value='Any'>Any</option>
+      <option id='status_T'   value='T'>Ok</option>
+      <option id='status_f'   value='f'>Error</option>
+      <option id='status_A'   value='A'>Canceled</option>
+    </select>   
+  </td>
+</tr>
+<tr>
+  <td valign='top'>
+    <h2>Age</h2>
+    <select name='age' class='formulaire'>
+      <option id='age_604800'   value='604800'>This week</option>
+      <option id='age_2678400'  value='2678400'>Last 30 days</option>
+      <option id='age_15552000' value='15552000'>Last 6 month</option>
+    </select>     
+  </td>
+  <td  valign='top'>
+    <h2>Size</h2>
+     Width: &nbsp;<input class='formulaire' type='text' 
+                        name='width' value='<TMPL_VAR width>' size='4'><br/>
+     Height:  <input type='text' class='formulaire' 
+               name='height' value='<TMPL_VAR height>' size='4'><br/>
+  </td>
+</tr>
+<tr>
+  <td valign='top'> 
+    <h2>Clients</h2>
+    <select name='client' size='15' class='formulaire' multiple>
+<TMPL_LOOP NAME=db_clients>
+      <option id='client_<TMPL_VAR clientname>'><TMPL_VAR clientname></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+  <td valign='top'> 
+    <h2>Job Name</h2>
+    <select name='jobname' size='15' class='formulaire' multiple>
+<TMPL_LOOP NAME=db_jobnames>
+      <option><TMPL_VAR NAME=jobname></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
+-->
+<tr>
+<td>
+  <input type='submit' name='action' value='graph' class='formulaire'> 
+</td>
+</tr>
+</table>
+        </div>
+
+</form>
+</td>
+<td>
+
+ <div class="otherboxtitle">
+ Current &nbsp;
+ </div>
+ <div class="otherbox">
+ <img src='<TMPL_VAR result>' alt='Nothing to display, Try a bigger date range'>
+ </div>
+
+</td>
+</table>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+  <TMPL_LOOP qclient_groups>
+     document.getElementById('group_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+  <TMPL_LOOP qclients>
+     document.getElementById('client_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+  <TMPL_IF status>
+     document.getElementById('status_<TMPL_VAR status>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF level>
+     document.getElementById('level_<TMPL_VAR level>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF age>
+     document.getElementById('age_<TMPL_VAR age>').selected=true;
+  </TMPL_IF>
+
+<TMPL_IF qfilesets>
+  for (var i=0; i < document.form1.fileset.length; ++i) {
+  <TMPL_LOOP qfilesets>
+     if (document.form1.fileset[i].value == <TMPL_VAR name>) {
+        document.form1.fileset[i].selected = true;
+     }
+  </TMPL_LOOP>
+  }
+</TMPL_IF>
+
+<TMPL_IF qjobnames>
+  for (var i=0; i < document.form1.jobname.length; ++i) {
+  <TMPL_LOOP qjobnames>
+     if (document.form1.jobname[i].value == <TMPL_VAR name>) {
+        document.form1.jobname[i].selected = true;
+     }
+  </TMPL_LOOP>
+  }
+</TMPL_IF>
+</script>
+
diff --git a/gui/bweb/lang/en/tpl/change_location.tpl b/gui/bweb/lang/en/tpl/change_location.tpl
new file mode 100644 (file)
index 0000000..f7a4468
--- /dev/null
@@ -0,0 +1,37 @@
+<br/>
+<div class='titlediv'>
+  <h1 class='newstitle'> 
+   Move media
+  </h1>
+ </div>
+ <div class='bodydiv'>
+
+<form action="?" method='GET'>
+<table>
+<tr>
+<td><b>To: </b></td><td><input class='formulaire' name='email' value='<TMPL_VAR email>'></td>
+</tr><tr>
+<td><b>Subject: </b></td><td><input class='formulaire' name='subject' value='[BACULA] Move media to <TMPL_VAR newlocation>' size='80'></td>
+</tr><tr>
+<td></td>
+<td>
+<textarea name='content' class='formulaire' cols='80' rows='32'>
+Hi,
+
+Could you move these media to <TMPL_VAR newlocation>
+Media :
+<TMPL_LOOP media>
+ - <TMPL_VAR VolumeName>  (<TMPL_VAR location>)
+</TMPL_LOOP>
+
+When it's finish, could you update media location ? 
+(you can use this link : <TMPL_VAR url>).
+
+Thanks
+</textarea>
+</td></tr></table>
+<input class='formulaire' type='submit' name='action' value='move_email'>
+</form>
+<br>
+<a href="<TMPL_VAR url>"><img alt='Update now' src='/bweb/update.png'>Update now</a>
+</div>
diff --git a/gui/bweb/lang/en/tpl/client_job_status.tpl b/gui/bweb/lang/en/tpl/client_job_status.tpl
new file mode 100644 (file)
index 0000000..ffc0614
--- /dev/null
@@ -0,0 +1,40 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'> 
+       Running job <TMPL_VAR JobName> on <TMPL_VAR Client>
+  </h1>
+ </div>
+ <div class='bodydiv'>
+
+<table>
+ <tr>
+  <td> <b> Job Name: </b> <td> <td> <TMPL_VAR jobname> (<TMPL_VAR jobid>) <td> 
+ </tr>
+ <tr>
+  <td> <b> Processing file: </b> <td> <td> <TMPL_VAR "processing file"> </td>
+ </tr>
+ <tr>
+  <td> <b> Speed: </b> <td> <td> <TMPL_VAR "bytes/sec"> B/s</td>
+ </tr>
+ <tr>
+  <td> <b> Files Examined: </b> <td> <td> <TMPL_VAR "files examined"></td>
+ </tr>
+ <tr>
+  <td> <b> Bytes: </b> <td> <td> <TMPL_VAR bytes></td>
+ </tr>
+</table>
+<form name='form1' action='?' method='GET'>
+<button type="submit" class="bp" name='action' value='dsp_cur_job' 
+> <img src='/bweb/update.png' title='Refresh' alt=''>Refresh</button>
+<input type='hidden' name='client' value='<TMPL_VAR Client>'>
+<input type='hidden' name='jobid' value='<TMPL_VAR JobId>'>
+<button type="submit" class="bp" name='action' value='cancel_job'
+       onclick="return confirm('Do you want to cancel this job?')"
+        title='Cancel job'> <img src='/bweb/cancel.png' alt=''>Cancel</button>
+</form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+  bweb_add_refresh();
+</script>
+
diff --git a/gui/bweb/lang/en/tpl/client_list.tpl b/gui/bweb/lang/en/tpl/client_list.tpl
new file mode 100644 (file)
index 0000000..ae9f3b6
--- /dev/null
@@ -0,0 +1,65 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Clients</h1>
+ </div>
+ <div class='bodydiv'>
+<form name="client" action='?' method='GET'>
+     <table id='id<TMPL_VAR ID>'></table>
+       <div class="otherboxtitle">
+          Actions &nbsp;
+        </div>
+        <div class="otherbox">
+<!--        <h1>Actions</h1> -->       
+       <button type="submit" class="bp" name='action' value='job' title='Show last job'> <img src='/bweb/zoom.png' alt=''>Last jobsView jobs</button>
+       <button type="submit" class="bp" name='action' value='dsp_cur_job' title='Show current job'> <img src='/bweb/zoom.png' alt=''>Current jobs</button>
+       <button type="submit" class="bp" name='action' value='client_status' title='Show client status'> <img src='/bweb/zoom.png' alt=''>Status </button>
+       <button type="submit" class="bp" name='action' value='client_stats' title='Client stats'> <img src='/bweb/chart.png' alt=''>Stats </button>
+        </div>
+
+</form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+var header = new Array("Name", "Select", "Desc", "Auto Prune", "File Retention", "Job Retention");
+
+var data = new Array();
+var chkbox ;
+
+<TMPL_LOOP Clients>
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'checkbox';
+chkbox.name = 'client';
+chkbox.value = '<TMPL_VAR Name>';
+
+data.push( 
+  new Array( "<TMPL_VAR Name>", 
+             chkbox,
+            "<TMPL_VAR Uname>",
+            "<TMPL_VAR AutoPrune>",
+            human_sec(<TMPL_VAR FileRetention>),
+            human_sec(<TMPL_VAR JobRetention>)
+              )
+) ; 
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ rows_per_page: rows_per_page,
+ disable_sorting: new Array(1)
+}
+);
+</script>
diff --git a/gui/bweb/lang/en/tpl/command.tpl b/gui/bweb/lang/en/tpl/command.tpl
new file mode 100644 (file)
index 0000000..ce9a906
--- /dev/null
@@ -0,0 +1,9 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'> <TMPL_VAR title> : <TMPL_VAR name></h1>
+ </div>
+ <div class='bodydiv'>
+  <pre id='log' style='font-size: 10px'>
+<TMPL_VAR content>
+  </pre>
+ </div>
diff --git a/gui/bweb/lang/en/tpl/config_edit.tpl b/gui/bweb/lang/en/tpl/config_edit.tpl
new file mode 100644 (file)
index 0000000..43c994d
--- /dev/null
@@ -0,0 +1,62 @@
+<br/>
+<div class='titlediv'>
+  <h1 class='newstitle'> Configuration </h1>
+</div>
+<div class='bodydiv'>
+   <form action="?" method='post'>
+    <table>
+     <tr>  <td><b>SQL Connection</b></td>  <td/></tr>
+     <tr><td>DBI:</td>     
+         <td> 
+          <input class="formulaire" type='text' value='<TMPL_VAR dbi>' size='64' name='dbi'> 
+         </td>
+     </tr>
+     <tr><td>user:</td> 
+         <td> <input class="formulaire" type='text' value='<TMPL_VAR user>' name='user'>
+         </td>
+     </tr>
+     <tr><td>password:</td> 
+         <td> <input class="formulaire" type='password' value='<TMPL_VAR password>' name='password'> 
+         </td></tr>
+
+     <tr>  <td><b>General Options</b></td>  <td/></tr>
+
+     <tr><td>email_media:</td> 
+         <td> <input class="formulaire" type='text' value='<TMPL_VAR email_media>' name='email_media'> 
+         </td></tr>
+         </td></tr>
+
+     <tr>  <td><b>Bweb Configuration</b></td>  <td/></tr>
+
+     <tr><td>graph_font:</td> 
+         <td> <input class="formulaire" type='text' value='<TMPL_VAR graph_font>' size='64' name='graph_font'> 
+         </td></tr>
+     <tr><td>template_dir:</td> 
+         <td> <input class="formulaire" type='text' value='<TMPL_VAR template_dir>' size='64' name='template_dir'> 
+         </td></tr>
+     <tr><td>fv_write_path:</td> 
+         <td> <input class="formulaire" title="This folder must be writable by apache user and must be accessible on /bweb/fv" type='text' value='<TMPL_VAR fv_write_path>' size='64' name='fv_write_path'> 
+     <tr><td>stat_job_table:</td> 
+         <td> <input class="formulaire" title="You can choose the Job table that you want to use to get statistics" type='text' value='<TMPL_IF stat_job_table><TMPL_VAR stat_job_table><TMPL_ELSE>Job</TMPL_IF>' size='64' name='stat_job_table'> 
+         </td></tr>
+     <tr><td>bconsole:</td> 
+         <td> <input class="formulaire" type='text' value='<TMPL_VAR bconsole>' size='64' name='bconsole'> 
+         </td></tr>
+     <tr><td>wiki_url:</td> 
+         <td> <input class="formulaire" title="Use a wiki for jobs documentation?" size='64' type='text' name='wiki_url' value='<TMPL_VAR wiki_url>'> 
+         </td></tr>
+     <tr><td>display_log_time:</td> 
+         <td> <input class="formulaire" title="Display log timestamp" type='checkbox' name='display_log_time' <TMPL_IF display_log_time> checked='checked' value='on' </TMPL_IF> > 
+         </td></tr>
+     <tr><td>security:</td> 
+         <td> <input class="formulaire" type='checkbox' name='enable_security' title='Use user managment in bweb. Read INSTALL first' <TMPL_IF enable_security> checked='checked' value='on' </TMPL_IF> > 
+     <tr><td>security acl:</td> 
+         <td> <input class="formulaire" type='checkbox' name='enable_security_acl' title='Use user acl in bweb. Read INSTALL first' <TMPL_IF enable_security_acl> checked='checked' value='on' </TMPL_IF> > 
+     <tr><td>debug:</td> 
+         <td> <input class="formulaire" type='checkbox' name='debug' <TMPL_IF debug> checked='checked' value='on' </TMPL_IF> > 
+         </td></tr>
+    </table>
+    <button type="submit" class="bp" name='action' value='apply_conf'> <img src='/bweb/save.png' alt=''>Save</button>
+   </form>
+</div>
diff --git a/gui/bweb/lang/en/tpl/config_view.tpl b/gui/bweb/lang/en/tpl/config_view.tpl
new file mode 100644 (file)
index 0000000..643e96c
--- /dev/null
@@ -0,0 +1,63 @@
+<br/>
+<div class='titlediv'>
+  <h1 class='newstitle'> Configuration </h1>
+</div>
+<div class='bodydiv'>
+   <table>
+    <tr>  <td><b>SQL Connection</b></td>  <td/></tr>
+    <tr><td>DBI:</td>      <td> <TMPL_VAR dbi>      </td></tr>
+    <tr><td>user:</td>     <td> <TMPL_VAR user>     </td></tr>
+    <tr><td>password:</td> <td> xxxxx </td></tr>
+    <tr>  <td><b>General Options</b></td>  <td/></tr>
+    <tr><td>email_media:</td> <td> <TMPL_VAR email_media> </td></tr>
+    <tr>  <td><b>Bweb Configuration</b></td>  <td/></tr>
+    <tr><td>config_file:</td> <td> <TMPL_VAR config_file> </td></tr>
+    <tr><td title="/path/to/your/template_dir">template_dir:</td> <td> <TMPL_VAR template_dir> </td></tr>
+    <tr><td title="/path/to/a/font.ttf">graph_font:</td> <td> <TMPL_VAR graph_font> </td></tr>
+    <tr><td title="This folder must be writable by apache user and must be accessible on /bweb/fv">fv_write_path:</td> <td> <TMPL_VAR fv_write_path> </td></tr>
+    <tr><td title="You can choose the Job table that you want to use to get statistics">stat_job_table:</td> <td> <TMPL_IF stat_job_table><TMPL_VAR stat_job_table><TMPL_ELSE>Job</TMPL_IF> </td></tr>
+    <tr><td title="/path/to/bconsole -n -c /path/to/bconsole.conf">bconsole:</td> <td> <TMPL_VAR bconsole> </td></tr>
+    <tr><td title="use a wiki for jobs documentation ?">wiki_url:</td> <td> <TMPL_VAR wiki_url> </td></tr>
+    <tr><td title="display timestamp in job log">display_log_time:</td> <td> <TMPL_VAR display_log_time> </td></tr>
+    <tr><td title="user managment">security:</td> <td> <TMPL_VAR enable_security> </td></tr>
+    <tr><td title="user filter">security acl:</td> <td> <TMPL_VAR enable_security_acl> </td></tr>
+    <tr><td>debug:</td> <td> <TMPL_VAR debug> </td></tr>
+    <TMPL_IF achs>
+    <tr>  <td><b>Autochanger</b></td>  <td/></tr>
+    <tr>
+     <td>
+     <form action='?' method='GET'>
+     <table border='0'>
+    <TMPL_LOOP achs>
+      <tr> 
+       <td>
+<label>
+ <input type='radio' name='ach' value='<TMPL_VAR name>'><TMPL_VAR name>
+</label>
+       </td>
+      </tr>
+    </TMPL_LOOP>
+    </table>
+   <td>
+  
+   <button type="submit" class="bp" name="action" value='ach_edit' title="Edit"> <img src='/bweb/edit.png' alt=''>Edit</button>
+   <button type="submit" class="bp" name='action' value='ach_del' title='Delete'> <img src='/bweb/remove.png' alt=''>Delete</button>
+   <button type="submit" class="bp" name='action' value='ach_view' title='View'> <img src='/bweb/zoom.png' alt=''>View</button>
+    </form>
+    </td>
+   </tr>
+   </TMPL_IF achs>
+   <tr>
+   <td><hr></td><td></td>
+   </tr>
+  </table>
+
+  <form action='?' method='GET'>
+   <button name='action' value='edit_conf' type="submit" class="bp" title='Edit'> <img src='/bweb/edit.png' alt=''>Edit</button>
+   <button name='action' value='ach_add' type="submit" class="bp" title='Add autochanger'> <img src='/bweb/add.png' alt=''>Add autochanger</button>
+  </form>
+
+  <TMPL_IF error>
+  info:  <TMPL_VAR error> </br>
+  </TMPL_IF>
+</div>
diff --git a/gui/bweb/lang/en/tpl/display_client_stats.tpl b/gui/bweb/lang/en/tpl/display_client_stats.tpl
new file mode 100644 (file)
index 0000000..d0f2ed2
--- /dev/null
@@ -0,0 +1,58 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'> Client: <TMPL_VAR clientname> (<TMPL_VAR label>)</h1>
+ </div>
+ <div class='bodydiv'>
+<form action='?'>
+     <table id='id<TMPL_VAR ID>'></table>
+     <img src="bgraph.pl?<TMPL_VAR grapharg>=<TMPL_VAR clientname>;graph=job_duration;age=2592000;width=420;height=200" alt='Not enough data' > &nbsp;
+     <img src="bgraph.pl?<TMPL_VAR grapharg>=<TMPL_VAR clientname>;graph=job_rate;age=2592000;width=420;height=200" alt='Not enough data'> &nbsp;
+     <img src="bgraph.pl?<TMPL_VAR grapharg>=<TMPL_VAR clientname>;graph=job_size;age=2592000;width=420;height=200" alt='Not enough data'> &nbsp;
+<!--   <div class="otherboxtitle">
+          Actions &nbsp;
+        </div>
+        <div class="otherbox">
+       <h1>Actions</h1> 
+       <button type="submit" class="bp" name='action' value='job' title='Show last job'> <img src='/bweb/zoom.png' alt=''>View last jobs</button>
+       <button type="submit" class="bp" name='action' value='dsp_cur_job' title='Show current job'> <img src='/bweb/zoom.png' alt=''>View current jobs</button>
+       <button type="submit" class="bp" name='action' value='client_stat' title='Client stats'> <img src='/bweb/zoom.png' alt=''>View stats</button>
+        </div>
+-->
+</form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+var header = new Array("Name", "Nb Jobs", "Nb Bytes", "Nb Files", "Nb Errors");
+
+var data = new Array();
+
+data.push( 
+  new Array( "<TMPL_VAR clientname>", 
+            "<TMPL_VAR nb_jobs>",
+            human_size(<TMPL_VAR nb_bytes>),
+            "<TMPL_VAR nb_files>",
+            "<TMPL_VAR nb_err>"
+             )
+) ; 
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+// disable_sorting: new Array(1),
+ rows_per_page: rows_per_page
+}
+);
+</script>
diff --git a/gui/bweb/lang/en/tpl/display_form_job.tpl b/gui/bweb/lang/en/tpl/display_form_job.tpl
new file mode 100644 (file)
index 0000000..21dcf24
--- /dev/null
@@ -0,0 +1,189 @@
+<br/>
+<div class="otherboxtitle">
+  Filter &nbsp;
+</div>
+<div class="otherbox">
+<form name='form1' action='?' method='GET'>
+<table border='0'>
+<tr>
+  <td valign='top'>
+    <h2>Level</h2>
+    <select name='level' class='formulaire'>
+      <option id='level_Any' value='Any'>Any</option>
+      <option id='level_F' value='F'>Full</option>
+      <option id='level_D' value='D'>Differential</option>
+      <option id='level_I' value='I'>Incremental</option>
+    </select>     
+  </td>
+</tr>
+<TMPL_UNLESS hide_status>
+<tr>
+ <td valign='top'>
+    <h2>Status</h2>
+    <select name='status' class='formulaire'>
+      <option id='status_Any' value='Any'>Any</option>
+      <option id='status_T'   value='T'>Ok</option>
+      <option id='status_W'   value='W'>Warning</option>
+      <option id='status_f'   value='f'>Error</option>
+      <option id='status_A'   value='A'>Canceled</option>
+    </select>     
+  </td>
+</tr>
+</TMPL_UNLESS>
+<TMPL_IF db_pools>
+<tr>
+ <td valign='top'>
+    <h2>Pool</h2>
+    <select name='pool' class='formulaire'>
+      <option id='pool_all' value=''>All</option>
+<TMPL_LOOP db_pools>
+      <option id='pool_<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
+</TMPL_IF>
+<TMPL_UNLESS hide_since>
+<tr>
+  <td valign='top'>
+    <h2>Since</h2>
+    <input type='text' id='since' name='since' size='17' title='YYYY-MM-DD'
+     value='<TMPL_VAR since>' class='formulaire'>
+  </td>
+ </tr>
+<tr>
+  <td valign='top'>
+    <h2>Age</h2>
+    <select name='age' class='formulaire' onclick='document.getElementById("since").value="";'>
+      <option id='age_604800'   value='604800'>1 week</option>
+      <option id='age_2678400'  value='2678400'>30 days</option>
+      <option id='age_15552000' value='15552000'>6 months</option>
+    </select>     
+  </td>
+ </tr>
+<TMPL_ELSE>
+<tr>
+  <td valign='top'>
+    <h2>Age</h2>
+    <select name='age' class='formulaire'>
+      <option id='age_604800'   value='604800'>This week</option>
+      <option id='age_2678400'  value='2678400'>Last 30 days</option>
+      <option id='age_15552000' value='15552000'>Last 6 months</option>
+    </select>     
+  </td>
+ </tr>
+</TMPL_UNLESS>
+<TMPL_IF view_time_slice>
+<tr>
+  <td valign='top'>
+    <h2>Time slice</h2>
+    <select name='type' class='formulaire'>
+      <option id='slice_day'   value='day'>Per days</option>
+      <option id='slice_week'  value='week'>Per weeks</option>
+      <option id='slice_month' value='month'>Per months</option>
+    </select>     
+  </td>
+ </tr>
+</TMPL_IF>
+ <tr>
+  <td valign='bottom'> 
+    <h2>Number of items</h2>
+    <input type='text' name='limit' value='<TMPL_VAR limit>' 
+       class='formulaire' size='4'>
+  </td>
+</tr>
+<TMPL_UNLESS hide_type>
+<tr>
+  <td valign='top'> 
+    <h2>Job Type</h2>
+    <select name='jobtype' class='formulaire'>
+      <option id='jobtype_any' value='all type'>Any</option>
+      <option id='jobtype_B' value='B'>Backup</option>
+      <option id='jobtype_R' value='R'>Restore</option>
+    </select>
+  </td>
+</tr>
+</TMPL_UNLESS>
+<TMPL_IF db_clients>
+<tr>
+  <td valign='top'> 
+    <h2>Clients</h2>
+    <select name='client' size='15' class='formulaire' multiple>
+<TMPL_LOOP db_clients>
+      <option id='client_<TMPL_VAR clientname>'><TMPL_VAR clientname></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
+</TMPL_IF>
+<TMPL_IF db_client_groups>
+<tr>
+  <td valign='top'>
+    <h2>Groups</h2>
+    <select name='client_group' size='10' class='formulaire' multiple>
+<TMPL_LOOP db_client_groups>
+        <option id= 'group_<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
+</TMPL_IF>
+<!--
+<tr>
+  <td valign='top'> 
+    <h2>File Set</h2>
+    <select name='fileset' size='15' class='formulaire' multiple>
+<TMPL_LOOP db_filesets>
+      <option id='client_<TMPL_VAR fileset>'><TMPL_VAR fileset></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
+-->
+</table>
+  <button type="submit" class="bp" name='action' 
+    value='<TMPL_IF action><TMPL_VAR action><TMPL_ELSE>job</TMPL_IF>'>
+     <img src='/bweb/update.png' alt=''> </button>
+
+</form>
+</div>
+<script type="text/javascript" language="JavaScript">
+
+  <TMPL_LOOP qclients>
+     document.getElementById('client_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+  <TMPL_LOOP qclient_groups>
+     document.getElementById('group_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+  <TMPL_IF status>
+     document.getElementById('status_<TMPL_VAR status>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF level>
+     document.getElementById('level_<TMPL_VAR level>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF age>
+     document.getElementById('age_<TMPL_VAR age>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF type>
+     document.getElementById('slice_<TMPL_VAR type>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF jobtype>
+     document.getElementById('jobtype_<TMPL_VAR jobtype>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_LOOP qfilesets>
+     document.getElementById('fileset_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+  <TMPL_LOOP qpools>
+     document.getElementById('pool_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+</script>
+
diff --git a/gui/bweb/lang/en/tpl/display_form_media.tpl b/gui/bweb/lang/en/tpl/display_form_media.tpl
new file mode 100644 (file)
index 0000000..be205ac
--- /dev/null
@@ -0,0 +1,100 @@
+<div class="otherboxtitle">
+  Filter &nbsp;
+</div>
+<div class="otherbox">
+<form name='form1' action='?' method='GET'>
+<table border='0'>
+<tr>
+  <td valign='top'>
+    <h2>Media Type</h2>
+    <select name='mediatype' class='formulaire'>
+      <option id='mediatype_all' value=''></option>
+<TMPL_LOOP db_mediatypes>
+      <option id='mediatype_<TMPL_VAR mediatype>'><TMPL_VAR mediatype></option>
+</TMPL_LOOP>
+    </select>     
+  </td>
+</tr>
+<tr>
+  <td valign='top'>
+    <h2>Location</h2>
+    <select name='location' class='formulaire'>
+      <option id='location_all>' value=''></option>
+<TMPL_LOOP db_locations>
+      <option id='location_<TMPL_VAR location>'><TMPL_VAR location></option>
+</TMPL_LOOP>
+    </select>     
+  </td>
+</tr>
+<tr>
+ <td valign='top'>
+    <h2>Status</h2>
+    <select name='volstatus' class='formulaire'>
+      <option id='volstatus_All' value=''></option>
+      <option id='volstatus_Append' value='Append'>Append</option>
+      <option id='volstatus_Full'   value='Full'>Full</option>
+      <option id='volstatus_Error'  value='Error'>Error</option>
+      <option id='volstatus_Used'   value='Used'>Used</option>
+      <option id='volstatus_Purged' value='Purged'>Purged</option>
+      <option id='volstatus_Recycle' value='Recycle'>Recycle</option>
+    </select>     
+  </td>
+</tr>
+<tr>
+ <td valign='top'>
+    <h2>Pool</h2>
+    <select name='pool' class='formulaire'>
+      <option id='pool_all>' value=''></option>
+<TMPL_LOOP db_pools>
+      <option id='pool_<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+    </select>     
+  </td>
+</tr>
+ <tr>
+  <td valign='bottom'> 
+    <h2>Name</h2>
+    <input type='text' name='re_media' 
+      <TMPL_IF qre_media>value=<TMPL_VAR qre_media></TMPL_IF>
+       class='formulaire' size='8'>
+  </td>
+</tr>
+ <tr>
+  <td valign='bottom'> 
+    <h2>Expired media</h2>
+    <input type='checkbox' name='expired' <TMPL_IF expired> checked </TMPL_IF> 
+       class='formulaire'>
+  </td>
+</tr>
+</tr>
+ <tr>
+  <td valign='bottom'> 
+    <h2>Number of items</h2>
+    <input type='text' name='limit' value='<TMPL_VAR limit>' 
+       class='formulaire' size='4'>
+  </td>
+</tr>
+
+</table>
+  <button type="submit" class="bp" name='action' value='media'> <img src='/bweb/update.png' alt=''>Update</button>
+
+</form>
+</div>
+<script type="text/javascript" language="JavaScript">
+  <TMPL_IF volstatus>
+     document.getElementById('volstatus_<TMPL_VAR volstatus>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_LOOP qmediatypes>
+     document.getElementById('mediatype_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+  <TMPL_LOOP qpools>
+     document.getElementById('pool_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+  <TMPL_LOOP qlocations>
+     document.getElementById('location_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+</script>
+
diff --git a/gui/bweb/lang/en/tpl/display_groups.tpl b/gui/bweb/lang/en/tpl/display_groups.tpl
new file mode 100644 (file)
index 0000000..cba3973
--- /dev/null
@@ -0,0 +1,68 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Groups</h1>
+ </div>
+ <div class="bodydiv">
+   <form name='form1' action='?' method='get'>
+    <table id='id<TMPL_VAR ID>'></table>
+    <button type="submit" class="bp" name='action' onclick='document.form1.reset()' value='groups_edit' title='Add'> <img src='/bweb/add.png' alt=''>Add</button>
+    <button type="submit" class="bp" name='action' value='groups_del' 
+     onclick="return confirm('Do you want to delete this group?');" 
+     title='Remove'> <img src='/bweb/remove.png' alt=''>Remove</button>
+    <button type="submit" class="bp" name='action' value='groups_edit' title='Modify'> <img src='/bweb/edit.png' alt=''>Edit</button>
+
+    <button type="submit" class="bp" name='action' value='client' title='View members'> <img src='/bweb/zoom.png' alt=''>View members</button>
+    <button type="submit" class="bp" name='action' value='job' title='View jobs'> <img src='/bweb/zoom.png' alt=''>View jobs</button>
+    <button type="submit" class="bp" name='action' value='group_stats' title='Statistics'> <img src='/bweb/chart.png' alt=''>View stats</button>
+   </form>
+   <form action='?' method='get'>
+    <input type='hidden' name='action' value='client'>
+    <button type="submit" class="bp" name='notingroup' value='yes' title='View non-members'> <img src='/bweb/zoom.png' alt=''>View others</button>
+   </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Name","Selection");
+
+var data = new Array();
+var chkbox;
+
+<TMPL_LOOP db_client_groups>
+
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'radio';
+chkbox.name  = 'client_group';
+chkbox.value = '<TMPL_VAR name>';
+
+data.push( new Array(
+"<TMPL_VAR name>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+// disable_sorting: new Array(5,6),
+ rows_per_page: rows_per_page
+}
+);
+</script>
+
+
diff --git a/gui/bweb/lang/en/tpl/display_job.tpl b/gui/bweb/lang/en/tpl/display_job.tpl
new file mode 100644 (file)
index 0000000..d89b77a
--- /dev/null
@@ -0,0 +1,81 @@
+ <div class='titlediv'>
+  <h1 class='newstitle'> Last Jobs (<TMPL_VAR Filter>)</h1>
+ </div>
+ <div class='bodydiv'>
+    <table id='id<TMPL_VAR ID>'></table>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+<TMPL_IF status>
+document.getElementById('status_<TMPL_VAR status>').checked = true;
+</TMPL_IF>
+
+
+
+var header = new Array("JobId",
+                      "Client",
+                      "Job Name", 
+                      "FileSet",
+//                     "Pool",
+                       "Level",
+                       "StartTime",
+                      "Duration",
+                       "JobFiles",
+                       "JobBytes", 
+                       "Errors",
+                      "Status");
+
+var data = new Array();
+
+<TMPL_LOOP Jobs>
+a = document.createElement('A');
+a.href='?action=job_zoom;jobid=<TMPL_VAR JobId>';
+
+img = document.createElement("IMG");
+img.src=bweb_get_job_img("<TMPL_VAR JobStatus>", <TMPL_VAR joberrors>);
+img.title=jobstatus['<TMPL_VAR JobStatus>']; 
+
+a.appendChild(img);
+
+data.push( new Array(
+"<TMPL_VAR JobId>",
+"<TMPL_VAR Client>",     
+"<TMPL_VAR JobName>",    
+"<TMPL_VAR FileSet>",    
+//"<TMPL_VAR Pool>",
+"<TMPL_VAR Level>",      
+"<TMPL_VAR StartTime>",
+"<TMPL_VAR Duration>",
+"<TMPL_VAR JobFiles>",   
+human_size(<TMPL_VAR JobBytes>),
+"<TMPL_VAR joberrors>",   
+a
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: true,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ rows_per_page: rows_per_page,
+ disable_sorting: new Array(10),
+ padding: 3
+}
+);
+
+// get newest backup first
+nrsTables['id<TMPL_VAR ID>'].fieldSort(0);
+</script>
diff --git a/gui/bweb/lang/en/tpl/display_job_group.tpl b/gui/bweb/lang/en/tpl/display_job_group.tpl
new file mode 100644 (file)
index 0000000..cb39e97
--- /dev/null
@@ -0,0 +1,84 @@
+ <div class='titlediv'>
+  <h1 class='newstitle'> Group summary (<TMPL_VAR Filter>)</h1>
+ </div>
+ <div class='bodydiv'>
+    <table id='id<TMPL_VAR ID>'></table>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+<TMPL_IF status>
+document.getElementById('status_<TMPL_VAR status>').checked = true;
+</TMPL_IF>
+
+
+
+var header = new Array("Group",
+                      "Nb Jobs",
+                      "Nb Ok",
+                       "Nb Err",
+                      "Nb Files", 
+                      "Size",
+                      "Duration",
+                       "Errors",
+                      "Status");
+
+var data = new Array();
+var age = <TMPL_VAR age>;
+
+<TMPL_LOOP Groups>
+a = document.createElement('A');
+a.href='?action=job;client_group=<TMPL_VAR client_group_name>;age=' + age;
+
+img = document.createElement("IMG");
+
+if (<TMPL_VAR nbjoberr>) {
+  jobstatus='f';
+
+} else {
+  jobstatus='T';
+}
+
+img.src=bweb_get_job_img(jobstatus, <TMPL_VAR joberrors>);
+img.title=jobstatus[jobstatus]; 
+
+a.appendChild(img);
+
+data.push( new Array(
+"<TMPL_VAR client_group_name>",
+<TMPL_VAR nbjobok> + <TMPL_VAR nbjoberr>, 
+<TMPL_VAR nbjobok>,
+<TMPL_VAR nbjoberr>,         
+"<TMPL_VAR JobFiles>",    
+human_size(<TMPL_VAR JobBytes>),
+"<TMPL_VAR Duration>",
+"<TMPL_VAR Joberrors>",
+a
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: true,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ rows_per_page: rows_per_page,
+ disable_sorting: new Array(10),
+ padding: 3
+}
+);
+
+// get newest backup first
+nrsTables['id<TMPL_VAR ID>'].fieldSort(0);
+</script>
diff --git a/gui/bweb/lang/en/tpl/display_job_zoom.tpl b/gui/bweb/lang/en/tpl/display_job_zoom.tpl
new file mode 100644 (file)
index 0000000..a92a79b
--- /dev/null
@@ -0,0 +1,143 @@
+ <div class='titlediv'>
+  <h1 class='newstitle'>Information about job</h1>
+ </div>
+ <div class="bodydiv">
+ <table id='id0'></table>
+ <table><td>
+ <form name="delete" action='bweb.pl?'>
+  <input type='hidden' name='jobid' value='<TMPL_VAR jobid>'>
+  <button type="submit" name='action' class="bp" value='delete' title='delete this job'
+ onclick="return confirm('Do you want to delete this job from the catalog?');">
+   <img src='/bweb/purge.png' alt=''>Delete</button>
+ </form>
+ </td><td>
+ <form name="media" action='bweb.pl?'>
+  <TMPL_LOOP volumes>
+   <input type='hidden' name='media' value='<TMPL_VAR VolumeName>'>
+  </TMPL_LOOP>   
+  <button type="submit" name='action' value='media' title='View media' class="bp">
+   <img src='/bweb/zoom.png'alt=''>View media</button>
+ </form>
+ </td>
+ <td>
+ <form name="job" action='bweb.pl?'>
+  <input type='hidden' name='client' value='<TMPL_VAR Client>'>
+  <button type="submit" class="bp" name='action' value='job' title='view <TMPL_VAR Client> jobs'><img src='/bweb/zoom.png'>View jobs</button>
+ </form>
+ </td>
+ <td>
+ <form name="graph" action='bweb.pl?'>
+  <input type='hidden' name='age' value='2678400'>
+  <input type='hidden' name='client' value='<TMPL_VAR Client>'>
+  <input type='hidden' name='jobname' value='<TMPL_VAR jobname>'>
+  <button type="submit" class="bp" name='action' value='graph' title='View trends'>
+   <img src='/bweb/chart.png' alt=''> View stats </button>
+ </form>
+ </td>
+ <td>
+ <form name="fileset_view" action='bweb.pl?'>
+  <input type='hidden' name='fileset' value='<TMPL_VAR FileSet>'>
+  <button type="submit" class="bp" name='action' value='fileset_view' title='View Fileset'> 
+ <img src='/bweb/zoom.png' alt=''>View FileSet</button>
+ </form>
+ </td>
+<!-- Remove this to activate bfileview 
+ <td>
+ <form name="bfileview" action='bfileview.pl?'>
+  <input type='hidden' name='jobid' value='<TMPL_VAR jobid>'>
+  <input type='hidden' name='where' value='/'>
+  <button type="submit" class="bp" name='action' value='bfileview' 
+   title='view file usage' 
+   onclick='if (<TMPL_VAR JobFiles> > 50000) { return confirm("It could take long time, do you want to continue?")} else { return 1; }'>
+   <img src='/bweb/colorscm.png' alt=''> View file usage </button>
+ </form>
+ </td>
+-->
+<TMPL_IF wiki_url>
+  <td>
+   <a href="<TMPL_VAR wiki_url><TMPL_VAR Client>" title='View doc'><img src='/bweb/doc.png' alt='View doc'></a>View doc
+ </td>
+</TMPL_IF>
+ <td>
+ <form name="rerun" action='bweb.pl?' onsubmit="document.getElementById('rerun_level').value=joblevelname['<TMPL_VAR NAME=Level>']">
+  <input type='hidden' name='storage' value='<TMPL_VAR storage>'>
+  <input type='hidden' name='fileset' value='<TMPL_VAR fileset>'>
+  <input type='hidden' name='pool' value='<TMPL_VAR poolname>'>
+  <input type='hidden' name='client' value='<TMPL_VAR client>'>
+  <input type='hidden' id="rerun_level" name='level'>
+  <input type='hidden' name='job' value='<TMPL_VAR jobname>'>
+  <button type="submit" class="bp" name='action' value='run_job_mod' title='run this job again'>
+   <img src='/bweb/R.png'> Run this job </button>
+ </form>
+ </td>
+<TMPL_IF joberrors>
+ <td>
+    <a href="<TMPL_VAR thisurl>;error=1"
+         title="View only errors">
+    <img src='/bweb/doc.png' alt="View errors"></a> View only errors
+  </td>
+</TMPL_IF>
+ </table>
+</div>
+
+<script type="text/javascript" language='JavaScript'>
+var header = new Array("JobId",
+                      "Client",
+                      "Job Name", 
+                      "FileSet",
+                       "Level",
+                       "StartTime", 
+                      "Duration",
+                       "JobFiles",
+                       "JobBytes",
+                       "Errors",
+                      "Pool",
+                       "Volume Name",
+                      "Status");
+
+var data = new Array();
+
+img = document.createElement("IMG");
+img.src=bweb_get_job_img("<TMPL_VAR JobStatus>", <TMPL_VAR joberrors>);
+img.title=jobstatus['<TMPL_VAR JobStatus>']; 
+
+data.push( new Array(
+"<TMPL_VAR JobId>",
+"<TMPL_VAR Client>",     
+"<TMPL_VAR JobName>",    
+"<TMPL_VAR FileSet>",    
+"<TMPL_VAR Level>",      
+"<TMPL_VAR StartTime>",
+"<TMPL_VAR duration>",
+"<TMPL_VAR JobFiles>",   
+human_size(<TMPL_VAR JobBytes>),
+"<TMPL_VAR joberrors>",
+"<TMPL_VAR poolname>",
+"<TMPL_LOOP volumes><TMPL_VAR VolumeName>\n</TMPL_LOOP>",   
+img
+ )
+);
+
+nrsTable.setup(
+{
+ table_name:     "id0",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: true,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ rows_per_page: rows_per_page,
+// disable_sorting: new Array(6)
+ padding: 3
+}
+);
+
+</script>
diff --git a/gui/bweb/lang/en/tpl/display_location.tpl b/gui/bweb/lang/en/tpl/display_location.tpl
new file mode 100644 (file)
index 0000000..3b6d9d8
--- /dev/null
@@ -0,0 +1,65 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Locations</h1>
+ </div>
+ <div class="bodydiv">
+   <form action='?' method='get'>
+    <table id='id<TMPL_VAR ID>'></table>
+    <button type="submit" class="bp" name='action' value='location_add' title='Add a location'> <img src='/bweb/add.png' alt=''>Add</button>
+    <button type="submit" class="bp" name='action' value='location_del' onclick='confirm("Do you want to remove this location?")' title='Remove a location'> <img src='/bweb/remove.png' alt=''>Remove</button>
+    <button type="submit" class="bp" name='action' value='location_edit' title='Edit a location'> <img src='/bweb/edit.png' alt=''>Edit</button>
+
+    <button type="submit" class="bp" name='action' value='media' title='View content'> <img src='/bweb/zoom.png' alt=''>View content</button>
+   </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Name","Enabled", "Cost", "Nb volumes", "Select");
+
+var data = new Array();
+var chkbox;
+
+var img;
+
+<TMPL_LOOP Locations>
+img = document.createElement('IMG');
+img.src = '/bweb/inflag<TMPL_VAR enabled>.png';
+
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'radio';
+chkbox.name  = 'location';
+chkbox.value = '<TMPL_VAR Location>';
+
+data.push( new Array(
+"<TMPL_VAR Location>",
+img,
+"<TMPL_VAR Cost>",
+"<TMPL_VAR name=volnum>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+// disable_sorting: new Array(5,6),
+ rows_per_page: rows_per_page
+}
+);
+</script>
diff --git a/gui/bweb/lang/en/tpl/display_log.tpl b/gui/bweb/lang/en/tpl/display_log.tpl
new file mode 100644 (file)
index 0000000..f351c1a
--- /dev/null
@@ -0,0 +1,80 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'> Log: <TMPL_VAR name> on <TMPL_VAR client> (<TMPL_VAR jobid>)</h1>
+ </div>
+ <div class='bodydiv'>
+  <pre id='log'>
+<TMPL_VAR lines>
+  </pre>
+
+<a id='prev'><img border='0' src='/bweb/prev.png'></a>
+<a id='next'><img border='0' src='/bweb/next.png'></a>
+ </div>
+<script type="text/javascript" language='JavaScript'>
+
+var url='<TMPL_VAR thisurl>';
+var urlprev=url;
+var urlnext=url;
+
+var reoff = new RegExp('offset=[0-9]+', "");
+var relim = new RegExp('limit=[0-9]+', "");
+
+var offset=0;
+var limit=1000;
+var nbline=0;
+<TMPL_IF offset>
+offset = <TMPL_VAR offset>;
+</TMPL_IF>
+<TMPL_IF limit>
+limit = <TMPL_VAR limit>;
+</TMPL_IF>
+<TMPL_IF nbline>
+nbline=<TMPL_VAR nbline>;
+</TMPL_IF>
+
+if (nbline == limit) {
+   var offset_next = offset + limit;
+   
+   if (url.match(reoff)) {
+       urlnext = urlnext.replace(reoff, 'offset=' + offset_next);
+   } else {
+       urlnext = urlnext + ';offset=' + offset_next;
+   }
+   
+   if (url.match(relim)) {
+       urlnext = urlnext.replace(relim, 'limit=' + limit);
+   } else {
+       urlnext = urlnext + ';limit=' + limit;
+   }
+   
+   document.getElementById('next').href = urlnext;
+
+} else {
+   document.getElementById('next').style.visibility="hidden";
+}
+
+if (offset > 0) {
+   var offset_prev = offset - limit;
+   if (offset_prev < 0) {
+        offset_prev=0;
+   }
+   if (url.match(reoff)) {
+       urlprev = urlprev.replace(reoff, 'offset=' + offset_prev);
+   } else {
+       urlprev = urlprev + ';offset=' + offset_prev ;
+   }
+   if (url.match(relim)) {
+       urlprev = urlprev.replace(relim, 'limit=' + limit);
+   } else {
+       urlprev = urlprev + ';limit=' + limit;
+   }
+
+   if (offset_prev >= 0) {
+       document.getElementById('prev').href = urlprev;
+   } else {
+       document.getElementById('prev').style.visibility="hidden";
+   }
+} else {
+   document.getElementById('prev').style.visibility="hidden";
+}   
+</script>
diff --git a/gui/bweb/lang/en/tpl/display_media.tpl b/gui/bweb/lang/en/tpl/display_media.tpl
new file mode 100644 (file)
index 0000000..b44fdc8
--- /dev/null
@@ -0,0 +1,91 @@
+ <div class='titlediv'>
+  <h1 class='newstitle'> 
+   Media
+  </h1>
+ </div>
+ <div class='bodydiv'>
+
+<TMPL_IF Pool>
+<h2>
+Pool: <a href="?action=pool;pool=<TMPL_VAR Pool>">
+         <TMPL_VAR Pool>
+       </a>
+</h2>
+</TMPL_IF>
+<TMPL_IF Location>
+<h2>
+Location: <TMPL_VAR location>
+</h2>
+</TMPL_IF>
+
+   <form action='?action=test' method='get'>
+    <table id='id_pool_<TMPL_VAR ID>'></table>
+      <button type="submit" class="bp" name='action' value='extern' title='Move out'> <img src='/bweb/extern.png' onclick='return confirm("Do you want to eject selected media ?");' alt=''>Eject</button>
+      <button type="submit" class="bp" name='action' value='intern' title='Move in'> <img src='/bweb/intern.png' alt=''>Load</button>
+      <button type="submit" class="bp" name='action' value='update_media' title='Update media'> <img src='/bweb/edit.png' alt=''>Edit</button>
+      <button type="submit" class="bp" name='action' value='media_zoom' title='Information'> <img src='/bweb/zoom.png' alt=''>View</button>
+<!--
+      <button type="submit" class="bp" name='action' value='purge' title='Purge'> <img src='/bweb/purge.png' alt=''>Purge</button>
+-->
+      <button type="submit" class="bp" name='action' value='prune' title='Prune'> <img src='/bweb/prune.png' alt=''>Prune</button>
+   </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Volume Name","Online","Vol Bytes", "Vol Usage", "Vol Status",
+                       "Pool", "Media Type",
+                       "Last Written", "When expire ?", "Select");
+
+var data = new Array();
+var img;
+var chkbox;
+var d;
+
+<TMPL_LOOP media>
+d = percent_usage(<TMPL_VAR volusage>);
+
+img = document.createElement('IMG');
+img.src = '/bweb/inflag<TMPL_VAR online>.png';
+
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'checkbox';
+chkbox.name = 'media';
+chkbox.value = '<TMPL_VAR volumename>';
+
+data.push( new Array(
+"<TMPL_VAR volumename>",
+img,
+human_size(<TMPL_VAR volbytes>),
+d,
+"<TMPL_VAR volstatus>",
+"<TMPL_VAR poolname>",
+"<TMPL_VAR mediatype>",
+"<TMPL_VAR lastwritten>",
+"<TMPL_VAR expire>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id_pool_<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+ rows_per_page: rows_per_page,
+ disable_sorting: new Array(1,3,9)
+}
+);
+</script>
diff --git a/gui/bweb/lang/en/tpl/display_media_zoom.tpl b/gui/bweb/lang/en/tpl/display_media_zoom.tpl
new file mode 100644 (file)
index 0000000..fc4d011
--- /dev/null
@@ -0,0 +1,164 @@
+<table>
+<td valign='top'>
+ <div class='titlediv'>
+  <h1 class='newstitle'> Volume: <TMPL_VAR volumename> <TMPL_VAR comment></h1>
+ </div>
+ <div class='bodydiv'>
+    <b> Volume Infos</b><br/>
+    <table id='id_info_<TMPL_VAR volumename>'></table>
+    <b> Volume Stats</b><br/>
+    <table id='id_media_<TMPL_VAR volumename>'></table>
+    <b> Job List </b></br>
+    <table id='id_jobs_<TMPL_VAR volumename>'></table>
+    <b> Actions </b></br>
+   <form action='?' method='get'>
+      <input type='hidden' name='media' value='<TMPL_VAR volumename>'>
+<TMPL_IF online>&nbsp;
+      <button type="submit" class="bp" name='action' value='extern' onclick='return confirm("Do you want to eject this volume ?");' title='move out'> <img src='/bweb/extern.png' alt=''>Eject</button>
+<TMPL_ELSE>
+      <button type="submit" class="bp" name='action' value='intern' title='move in'> <img src='/bweb/intern.png' alt=''>Load</button>
+</TMPL_IF>
+      <button type="submit" class="bp" name='action' value='update_media' title='Update'><img src='/bweb/edit.png' alt=''>Edit</button>
+      <button type="submit" class="bp" name='action' value='purge' title='Purge'> <img src='/bweb/purge.png' onclick="return confirm('Do you want to purge this volume?')" alt=''>Purge</button>
+      <button type="submit" class="bp" name='action' value='prune' title='Prune'> <img src='/bweb/prune.png' alt=''>Prune</button>
+<TMPL_IF Locationlog>
+      <a href='#' onclick='document.getElementById("locationlog").style.visibility="visible";'><img title='View location log' src='/bweb/zoom.png'></a>
+</TMPL_IF>
+   </form>
+ </div>
+</td>
+<td valign='top'style="visibility:hidden;" id='locationlog'>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Location log </h1>
+ </div>
+ <div class='bodydiv'>
+<pre>
+ <TMPL_VAR LocationLog>
+</pre>
+ </div>
+</td>
+</table>
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Pool","Online","Enabled", "Location","Vol Status", "Vol Bytes", "Expire",
+                      "Retention","Max use duration", "Max jobs" );
+
+var data = new Array();
+var img;
+
+img = document.createElement('IMG');
+img.src = '/bweb/inflag<TMPL_VAR online>.png';
+
+data.push( new Array(
+"<TMPL_VAR poolname>",
+img,
+human_enabled("<TMPL_VAR enabled>"),
+"<TMPL_VAR location>",
+"<TMPL_VAR volstatus>",
+human_size(<TMPL_VAR nb_bytes>),
+"<TMPL_VAR expire>",
+human_sec(<TMPL_VAR volretention>),
+human_sec(<TMPL_VAR voluseduration>),
+"<TMPL_VAR maxvoljobs>"
+ )
+);
+
+nrsTable.setup(
+{
+ table_name:     "id_info_<TMPL_VAR volumename>",
+ table_header: header,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+ table_data: data,
+ header_color: header_color,
+ padding: 3,
+ disable_sorting: new Array(1)
+}
+);
+
+var header = new Array( "Vol Mounts", "Recycle count", "Read time", "Write time", "Errors");
+
+var data = new Array();
+data.push( new Array(
+"<TMPL_VAR nb_mounts>",
+"<TMPL_VAR recyclecount>",
+human_sec(<TMPL_VAR volreadtime>),
+human_sec(<TMPL_VAR volwritetime>),
+"<TMPL_VAR nb_errors>"
+ )
+);
+
+nrsTable.setup(
+{
+ table_name:     "id_media_<TMPL_VAR volumename>",
+ table_header: header,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+ table_data: data,
+ header_color: header_color,
+// disable_sorting: new Array()
+ padding: 3
+}
+);
+
+
+var header = new Array("JobId","Name","Start Time","Type",
+                      "Level","Files","Bytes","Status");
+
+var data = new Array();
+var a;
+var img;
+
+<TMPL_LOOP jobs>
+a = document.createElement('A');
+a.href='?action=job_zoom;jobid=<TMPL_VAR JobId>';
+
+img = document.createElement("IMG");
+img.src="/bweb/<TMPL_VAR status>.png";
+img.title=jobstatus['<TMPL_VAR status>']; 
+
+a.appendChild(img);
+
+data.push( new Array(
+"<TMPL_VAR jobid>",
+"<TMPL_VAR name>",
+"<TMPL_VAR starttime>",
+"<TMPL_VAR type>",
+"<TMPL_VAR level>",
+"<TMPL_VAR files>",
+human_size(<TMPL_VAR bytes>),
+a
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id_jobs_<TMPL_VAR volumename>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+// disable_sorting: new Array(5,6),
+ rows_per_page: rows_per_page
+}
+);
+</script>
diff --git a/gui/bweb/lang/en/tpl/display_pool.tpl b/gui/bweb/lang/en/tpl/display_pool.tpl
new file mode 100644 (file)
index 0000000..a02e0e5
--- /dev/null
@@ -0,0 +1,87 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Pools</h1>
+ </div>
+ <div class="bodydiv">
+   <form action='?' method='get'>
+    <table id='id<TMPL_VAR ID>'></table>
+    <button type="submit" class="bp" type='submit' name='action' value='media' title='Show content'> <img src='/bweb/zoom.png' alt=''>View</button>
+    <input id="mediatype" type='hidden' name='mediatype' value=''>
+   </form>
+   <br/>
+   Tips: To modify pool properties, you have to edit your Bacula configuration and reload it. After, you have to run "update pool=mypool" with bconsole.
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Name","Media Type", "Recycle","Retention","Use Duration",
+                       "Max jobs per volume","Max files per volume", 
+                       "Max volume size","Nb volumes", "Vol Status", "Usage", "Select");
+
+var data = new Array();
+var chkbox;
+var img;
+var img2;
+
+<TMPL_LOOP Pools>
+
+img = percent_display([
+<TMPL_IF nb_recycle>{ name: "Recycle", nb: <TMPL_VAR nb_recycle> },</TMPL_IF>
+<TMPL_IF nb_purged> { name: "Purged", nb: <TMPL_VAR nb_purged> },</TMPL_IF>
+<TMPL_IF nb_append> { name: "Append", nb: <TMPL_VAR nb_append> },</TMPL_IF>
+<TMPL_IF nb_full>   { name: "Full", nb: <TMPL_VAR nb_full> },    </TMPL_IF>
+<TMPL_IF nb_disabled>   { name: "Disabled", nb: <TMPL_VAR nb_disabled> },    </TMPL_IF>
+<TMPL_IF nb_error>  { name: "Error", nb: <TMPL_VAR nb_error> },  </TMPL_IF>
+<TMPL_IF nb_archive>{ name: "Archive", nb: <TMPL_VAR nb_archive> },</TMPL_IF>
+<TMPL_IF nb_used>   { name: "Used", nb: <TMPL_VAR nb_used> },    </TMPL_IF>
+<TMPL_IF NAME='nb_read-only'> { name: "Read-Only", nb: <TMPL_VAR NAME='nb_read-only'> }, </TMPL_IF>
+{}
+]);
+
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'radio';
+chkbox.value = '<TMPL_VAR Name>';
+chkbox.name  = 'pool';
+chkbox.setAttribute('onclick','document.getElementById("mediatype").value="<TMPL_VAR mediatype>";');
+
+img2 = percent_usage(<TMPL_VAR poolusage>);
+
+data.push( new Array(
+"<TMPL_VAR Name>",
+"<TMPL_VAR mediatype>",
+"<TMPL_VAR Recycle>",
+human_sec(<TMPL_VAR VolRetention>),
+human_sec(<TMPL_VAR VolUseDuration>),
+"<TMPL_VAR MaxVolJobs>",
+"<TMPL_VAR MaxVolFiles>",
+human_size(<TMPL_VAR MaxVolBytes>),
+"<TMPL_VAR VolNum>",
+img,
+img2,
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+// disable_sorting: new Array(5,6),
+ rows_per_page: rows_per_page
+}
+);
+</script>
diff --git a/gui/bweb/lang/en/tpl/display_user.tpl b/gui/bweb/lang/en/tpl/display_user.tpl
new file mode 100644 (file)
index 0000000..0bb3d33
--- /dev/null
@@ -0,0 +1,108 @@
+<div class='titlediv'>
+  <h1 class='newstitle'>User: <TMPL_VAR username></h1>
+</div>
+<div class='bodydiv'>
+
+<form name="form1" action="?">
+<input type="hidden" value='1' name="create">
+ <table>
+ <tr>
+  <td>Username:</td> <td> <input class="formulaire" type="text" name="username" value='<TMPL_VAR username>'> </td>
+<!-- </tr><tr>
+  <td>Password:</td> <td> <input class="formulaire" type="password" name="passwd" value='<TMPL_VAR passwd>'> </td>
+-->
+ </tr><tr>
+  <td>Comment:</td> <td> <input class="formulaire" type="text" name="comment" value='<TMPL_VAR comment>'> </td>
+ </tr><tr>
+<td> Profile:</td><td>
+ <select name="profile" id='profile' class="formulaire">
+  <option onclick='set_role("")'></option>
+  <option onclick='set_role("administrator")'>Administrator</option>
+  <option onclick='set_role("customer")'>Customer</option>
+ </select>
+</td><td>Or like an existing user: </td><td>
+ <select name="copy_username" class="formulaire">
+  <option onclick="disable_sel(false)"></option>
+ <TMPL_LOOP db_usernames>
+  <option title="<TMPL_VAR comment>" onclick="disable_sel(true)" value='<TMPL_VAR username>'><TMPL_VAR username></option>
+ </TMPL_LOOP>
+ </select>
+</td>
+ </tr><tr>
+ </tr><tr>
+<td> Roles:</td><td>
+ <select name="rolename" id='rolename' multiple class="formulaire" size=15>
+ <TMPL_LOOP db_roles>
+  <option title="<TMPL_VAR comment>" value='<TMPL_VAR rolename>' <TMPL_IF userid>selected</TMPL_IF> ><TMPL_VAR rolename></option>
+ </TMPL_LOOP>
+ </select>
+ </td>
+</tr><tr>
+<td> Use groups filter:</td><td>
+<input class="formulaire" onclick="disable_group(this.checked == false)" type="checkbox" name="use_acl" <TMPL_IF use_acl> checked </TMPL_IF> > </td>
+</tr><tr>
+<td> Groups:</td><td>
+ <select name="client_group" id='client_group' multiple class="formulaire" size=15>
+<TMPL_LOOP db_client_groups>
+        <option id='group_<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+ </select>
+ </td>
+</tr>
+</table>
+    <button type="submit" class="bp" name='action' value='user_save'>
+     <img src='/bweb/save.png' alt=''> </button>
+</form>
+</div>
+
+<script type="text/javascript" language='JavaScript'>
+
+<TMPL_LOOP client_group>
+    document.getElementById('group_<TMPL_VAR name>').selected = true;
+</TMPL_LOOP>
+
+<TMPL_UNLESS use_acl>
+disable_group(true); 
+</TMPL_UNLESS>
+
+function disable_sel(val) 
+{
+       document.form1.profile.disabled = val;
+       document.form1.rolename.disabled = val;
+}
+function disable_group(val) 
+{
+       document.form1.client_group.disabled = val;
+}
+function set_role(val)
+{
+   if (val == "administrator") {
+       for (var i=0; i < document.form1.rolename.length; ++i) {
+             document.form1.rolename[i].selected = true;
+       }
+   } else if (val == "production") {
+       for (var i=0; i < document.form1.rolename.length; ++i) {
+          if (document.form1.rolename[i].value != 'r_configure' &&
+               document.form1.rolename[i].value != 'r_user_mgnt' &&
+               document.form1.rolename[i].value != 'r_group_mgnt'
+               )
+           {
+             document.form1.rolename[i].selected = true;
+           }
+        }
+   } else if (val == "customer") {
+       for (var i=0; i < document.form1.rolename.length; ++i) {
+          if (document.form1.rolename[i].value == 'r_view_stats'   ||
+               document.form1.rolename[i].value == 'r_view_history' ||
+               document.form1.rolename[i].value == 'r_view_log'
+               )
+           {
+             document.form1.rolename[i].selected = true;
+          } else {
+             document.form1.rolename[i].selected = false;
+          }
+       }
+   }
+
+}
+</script>
diff --git a/gui/bweb/lang/en/tpl/display_users.tpl b/gui/bweb/lang/en/tpl/display_users.tpl
new file mode 100644 (file)
index 0000000..9ee7b95
--- /dev/null
@@ -0,0 +1,63 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Users</h1>
+ </div>
+ <div class="bodydiv">
+   <form action='?' method='get'>
+    <table id='id<TMPL_VAR ID>'></table>
+    <button type="submit" class="bp" name='action' value='user_add' title='Add'> <img src='/bweb/add.png' alt=''>Add</button>
+    <button type="submit" class="bp" name='action' value='user_del' 
+     onclick="return confirm('Do you want to delete this user ?');" 
+     title='Remove'> <img src='/bweb/remove.png' alt=''>Remove </button>
+    <button type="submit" class="bp" name='action' value='user_edit' title='Edit'> <img src='/bweb/edit.png' alt=''>Edit </button>
+
+    <button type="submit" class="bp" name='action' value='client' title='View clients'> <img src='/bweb/zoom.png' alt=''>View clients</button>
+    <button type="submit" class="bp" name='action' value='job' title='View jobs'> <img src='/bweb/zoom.png' alt=''>View jobs</button>
+   </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Username","Selection");
+
+var data = new Array();
+var chkbox;
+
+<TMPL_LOOP db_usernames>
+
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'radio';
+chkbox.name  = 'username';
+chkbox.value = '<TMPL_VAR username>';
+
+data.push( new Array(
+"<TMPL_VAR username>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+// disable_sorting: new Array(5,6),
+ rows_per_page: rows_per_page
+}
+);
+</script>
+
+
diff --git a/gui/bweb/lang/en/tpl/end.tpl b/gui/bweb/lang/en/tpl/end.tpl
new file mode 100644 (file)
index 0000000..072a52b
--- /dev/null
@@ -0,0 +1,5 @@
+</div>
+<div style="float: right;"></div>
+</div>
+</body>
+</html>
diff --git a/gui/bweb/lang/en/tpl/error.tpl b/gui/bweb/lang/en/tpl/error.tpl
new file mode 100644 (file)
index 0000000..a036364
--- /dev/null
@@ -0,0 +1,4 @@
+<h1>An error has occurred:</h1>
+<pre>
+<TMPL_VAR error>
+</pre>
diff --git a/gui/bweb/lang/en/tpl/extern.tpl b/gui/bweb/lang/en/tpl/extern.tpl
new file mode 100644 (file)
index 0000000..8896ced
--- /dev/null
@@ -0,0 +1,13 @@
+<br/>
+<div class='titlediv' style='width: 300'>
+ <h1 class='newstitle'> Help ejecting media</h1>
+</div>
+<div class='bodydiv' style='width: 300'>
+
+You want to:
+<form name='form1' action='?'>
+<label><input type='radio' name='action' value='safe_set'> Made a safe backup set </label><br>
+<label><input type='radio' name='action' value='help_extern'> Eject media <br>
+<button name='bp' class="bp" value='next'><img src='/bweb/next.png'>Next</button></label>
+</form>
+</div>
diff --git a/gui/bweb/lang/en/tpl/fileset_view.tpl b/gui/bweb/lang/en/tpl/fileset_view.tpl
new file mode 100644 (file)
index 0000000..19b453a
--- /dev/null
@@ -0,0 +1,20 @@
+ <div class='titlediv'>
+  <h1 class='newstitle'> 
+   FileSet <TMPL_VAR fileset>
+  </h1>
+ </div>
+ <div class='bodydiv'>
+
+ <img src="/bweb/add.png" alt="included"> What is included:
+ <pre>
+<TMPL_LOOP I><TMPL_VAR file>
+</TMPL_LOOP></pre>
+
+ <img src="/bweb/remove.png" alt="excluded"> What is excluded:
+ <pre>
+<TMPL_LOOP E><TMPL_VAR file>
+</TMPL_LOOP></pre>
+
+Tips: Warning, this is the current fileset, it could have changed ...
+
+ </div>
diff --git a/gui/bweb/lang/en/tpl/fv_file_attribs.tpl b/gui/bweb/lang/en/tpl/fv_file_attribs.tpl
new file mode 100644 (file)
index 0000000..858e7bd
--- /dev/null
@@ -0,0 +1,12 @@
+<div class='titlediv'>
+  <h1 class='newstitle'> Information about <TMPL_VAR filename> </h1>
+</div>
+<div class='bodydiv'>
+   <table>
+    <tr><td>size : </td> <td> <TMPL_VAR size>  </td></tr>
+    <tr><td>ctime :</td> <td> <TMPL_VAR atime> </td></tr>
+    <tr><td>mtime :</td> <td> <TMPL_VAR mtime> </td></tr>
+    <tr><td>atime :</td> <td> <TMPL_VAR atime> </td></tr>
+    <tr><td>md5 :  </td> <td> <TMPL_VAR md5>   </td></tr>
+   </table>
+</div>
diff --git a/gui/bweb/lang/en/tpl/general.tpl b/gui/bweb/lang/en/tpl/general.tpl
new file mode 100644 (file)
index 0000000..3f3f467
--- /dev/null
@@ -0,0 +1,30 @@
+
+<script type="text/javascript" language="JavaScript">
+bweb_add_refresh();
+</script>
+<div class='titlediv'>
+  <h1 class="newstitle">
+   Informations
+  </h1>
+</div>
+<div class="bodydiv">
+  <table>
+   <tr><td>Total clients:</td>      <td> <TMPL_VAR nb_client> </td>
+       <td>Total bytes stored:</td> <td> <TMPL_VAR nb_bytes> </td>
+       <td>Total media:</td>        <td> <TMPL_VAR nb_media> </td>
+   </tr>
+   <tr><td>Database size:</td>      <td> <TMPL_VAR db_size> </td>
+       <td>Total Pool:</td>         <td> <TMPL_VAR nb_pool> </td>
+       <td>Total Job:</td>         <td> <TMPL_VAR nb_job> </td>
+   </tr>
+   <tr><td>Job failed (<TMPL_VAR label>):</td> 
+       
+<td <TMPL_IF nb_err> class='joberr' </TMPL_IF>>
+   <TMPL_VAR nb_err> 
+</td>
+       <td></td>         <td></td>
+       <td></td>         <td></td>
+   </tr>
+  
+  </table>
+</div>
diff --git a/gui/bweb/lang/en/tpl/graph.tpl b/gui/bweb/lang/en/tpl/graph.tpl
new file mode 100644 (file)
index 0000000..01f0dde
--- /dev/null
@@ -0,0 +1,180 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Statistics</h1>
+ </div>
+ <div class='bodydiv'>
+<table border='0'>
+<td>
+<form name='form1' action='?' method='GET'>
+        <div class="otherboxtitle">
+          Options &nbsp;
+        </div>
+        <div class="otherbox">
+<table border='0'>
+<tr>
+  <td valign='top'>
+    <h2>Level</h2>
+    <select name='level' class='formulaire'>
+      <option id='level_Any' value='Any'>Any</option>
+      <option id='level_F' value='F'>Full</option>
+      <option id='level_D' value='D'>Differential</option>
+      <option id='level_I' value='I'>Incremental</option>
+    </select>     
+  </td><td valign='top'>
+    <h2>Status</h2>
+    <select name='status' class='formulaire'>
+      <option id='status_Any' value='Any'>Any</option>
+      <option id='status_T'   value='T'>Ok</option>
+      <option id='status_f'   value='f'>Error</option>
+      <option id='status_A'   value='A'>Canceled</option>
+    </select>   
+  </td>
+</tr>
+<tr>
+  <td valign='top'>
+    <h2>Age</h2>
+    <select name='age' class='formulaire'>
+      <option id='age_604800'   value='604800'>This week</option>
+      <option id='age_2678400'  value='2678400'>Last 30 days</option>
+      <option id='age_15552000' value='15552000'>Last 6 month</option>
+    </select>     
+  </td>
+  <td  valign='top'>
+    <h2>Size</h2>
+     Width: &nbsp;<input class='formulaire' type='text' 
+                         name='width' value='<TMPL_VAR width>' size='4'><br/>
+     Height:  <input type='text' class='formulaire' 
+                name='height' value='<TMPL_VAR height>' size='4'><br/>
+  </td>
+</tr>
+<tr>
+  <td valign='top'> 
+    <h2>Clients</h2>
+    <select name='client' size='15' class='formulaire' multiple>
+<TMPL_LOOP db_clients>
+      <option id='client_<TMPL_VAR clientname>'><TMPL_VAR clientname></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+  <td valign='top'> 
+    <h2>Job Name</h2>
+    <select name='jobname' size='15' class='formulaire' multiple>
+<TMPL_LOOP db_jobnames>
+      <option><TMPL_VAR jobname></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
+<tr>
+  <td> <h2> Type </h2> 
+ <select name='graph' class='formulaire'>
+   <option id='job_size'     value='job_size' title="Job size per job for the period">Job Size</option>
+   <option id='job_duration' value='job_duration' title="Job duration per job for the period">Job Duration</option>
+   <option id='job_rate' value='job_rate' title="Job rate per job for the period">Job Rate</option>
+   <option id='job_file' value='job_file' title="Number of backed files per job for the period">Job Files</option>
+   <option id='job_count_phour' value='job_count_phour' title="Number of jobs per hour for the period">Job per hour</option>
+   <option id='job_count_pday' value='job_count_pday' title="Number of jobs per day for the period">Job per day</option>
+   <option id='job_avg_phour' value='job_avg_pday' title="Average backup size per day for the period">Job avg B/hour</option>
+   <option id='job_avg_pday' value='job_avg_pday' title="Average backup size per hour for the period">Job avg B/day</option>
+   <option id='job_sum_phour' value='job_sum_phour' title="Job size per hour">Job total B/hour</option>
+   <option id='job_sum_pday' value='job_sum_pday' title="Job size per day">Job total B/day</option>
+   <option id='job_count_hour' value='job_count_hour' title="Number of jobs per hour for the period">Jobs Count (h)</option>
+   <option id='job_count_day' value='job_count_day' title="Number of jobs per day for the period">Jobs Count (d)</option>
+   <option id='job_avg_hour' value='job_avg_hour' title="Average backup size per hour for the period">Job avg size (h)</option>
+   <option id='job_avg_day' value='job_avg_day' title="Average backup size per day for the period">Job avg size (d)</option>
+   <option id='job_sum_hour' value='job_sum_hour' title="Job size per hour for the period">Job Bytes (h)</option>
+   <option id='job_sum_day' value='job_sum_day' title="Job size per day for the period">Job Bytes (d)</option>
+   <option onclick='document.getElementById("gtype_balloon").selected=true;' id='job_time_size' value='job_time_size' title="Display Job size, duration and number of files with a balloon">Size,time,files</option>
+
+ </select>
+  </td>
+  <td valign='bottom'> 
+    <h2>Number of items</h2>
+    <input type='text' name='limit' value='<TMPL_VAR limit>' 
+        class='formulaire' size='4'>
+  </td>
+</tr>
+<tr>
+<td><h2> Graph type </h2> 
+  <select name='gtype' class='formulaire'>
+    <option id='gtype_bars' value='bars'>Bars</option>
+<!--  <option id='gtype_bars3d' value='bars3d'>Bars3d</option> -->
+    <option id='gtype_lines' value='lines'>Lines</option>
+    <option onclick='document.getElementById("job_time_size").selected=true;' id='gtype_balloon' value='balloon'>Balloon</option>
+    <option id='gtype_linespoints' value='linespoints'>Lines points</option>
+</td>
+<td>
+  <input type='submit' name='action' value='graph' class='formulaire'> 
+</td>
+</tr>
+</table>
+        </div>
+
+</form>
+</td>
+<td>
+
+ <div class="otherboxtitle">
+ Current &nbsp;
+ </div>
+ <div class="otherbox">
+
+ <img usemap='imggraph' id='imggraph' 
+      alt='Nothing to display, Try a bigger date range'>
+ </div>
+
+</td>
+</table>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+  <TMPL_LOOP qclients>
+     document.getElementById('client_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+  <TMPL_IF status>
+     document.getElementById('status_<TMPL_VAR status>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF level>
+     document.getElementById('level_<TMPL_VAR level>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF age>
+     document.getElementById('age_<TMPL_VAR age>').selected=true;
+  </TMPL_IF>
+
+<TMPL_IF qfilesets>
+  for (var i=0; i < document.form1.fileset.length; ++i) {
+  <TMPL_LOOP qfilesets>
+     if (document.form1.fileset[i].value == <TMPL_VAR name>) {
+        document.form1.fileset[i].selected = true;
+     }
+  </TMPL_LOOP>
+  }
+</TMPL_IF>
+
+<TMPL_IF qjobnames>
+  for (var i=0; i < document.form1.jobname.length; ++i) {
+  <TMPL_LOOP qjobnames>
+     if (document.form1.jobname[i].value == <TMPL_VAR name>) {
+        document.form1.jobname[i].selected = true;
+     }
+  </TMPL_LOOP>
+  }
+</TMPL_IF>
+
+  <TMPL_IF graph>
+     document.getElementById('<TMPL_VAR graph>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF gtype>
+     document.getElementById('gtype_<TMPL_VAR gtype>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF url>
+   document.getElementById('imggraph').src='bgraph.pl?<TMPL_VAR url>'
+  </TMPL_IF>
+
+</script>
diff --git a/gui/bweb/lang/en/tpl/groups_edit.tpl b/gui/bweb/lang/en/tpl/groups_edit.tpl
new file mode 100644 (file)
index 0000000..51fe8d5
--- /dev/null
@@ -0,0 +1,33 @@
+
+<div class='titlediv'>
+  <h1 class='newstitle'> Group: <TMPL_VAR client_group></h1>
+</div>
+<div class='bodydiv'>
+   <form action="?" method='get'>
+    <input type='hidden' name='client_group' value=<TMPL_VAR client_group>>
+    <table>
+     <tr><td>Group:</td>
+         <td> 
+          <input class="formulaire" type='text' value=<TMPL_VAR client_group> size='15' name='newgroup'> 
+         </td>
+     </tr>
+     <tr><td>Clients:</td> 
+         <td>
+            <select name='client' size='15' class='formulaire' multiple>
+            <TMPL_LOOP db_clients>
+            <option id='client_<TMPL_VAR clientname>'><TMPL_VAR clientname></option>
+            </TMPL_LOOP>
+            </select>
+         </td>
+     </tr>
+    </table>
+    <button type="submit" class="bp" name='action' value='groups_save'>
+     <img src='/bweb/save.png' alt=''>Save</button>
+   </form>
+</div>
+
+<script type="text/javascript" language="JavaScript">
+  <TMPL_LOOP client_group_member>
+     document.getElementById('client_<TMPL_VAR name>').selected = true;
+  </TMPL_LOOP>
+</script>
diff --git a/gui/bweb/lang/en/tpl/help_extern.tpl b/gui/bweb/lang/en/tpl/help_extern.tpl
new file mode 100644 (file)
index 0000000..67d498d
--- /dev/null
@@ -0,0 +1,44 @@
+<br/>
+<div class='titlediv'>
+ <h1 class='newstitle'>Help ejecting media (part 1/2)</h1>
+</div>
+<div class='bodydiv'>
+This tool will select the best candidates to eject. You will be asked to make your selection on the next screen.
+  <form action="?" method='GET'>
+   <table>
+    <tr><td>Pool:</td>      
+        <td><select name='pool' class='formulaire' multiple>
+<TMPL_LOOP db_pools>
+             <option selected><TMPL_VAR NAME=name></option>
+</TMPL_LOOP>
+           </select>
+        </td>
+    </tr>
+    <tr><td>Media Type:</td>      
+        <td><select name='mediatype' class='formulaire' multiple>
+<TMPL_LOOP db_mediatypes>
+             <option><TMPL_VAR mediatype></option>
+</TMPL_LOOP>
+           </select>
+        </td>
+    </tr>
+    <tr><td> Location: </td>
+        <td><select name='location' class='formulaire'>
+  <TMPL_LOOP db_locations>
+      <option id='loc_<TMPL_VAR location>' value='<TMPL_VAR location>'><TMPL_VAR location></option>
+  </TMPL_LOOP>
+    </select>
+        </td>
+    </tr>
+    <tr>
+        <td>Number of media <br/> to eject:</td> 
+        <td> <input type='text' name='limit' size='3' class='formulaire' 
+              value='10'> </td>
+    </tr>
+    <tr>
+        <td><button type="submit" class="bp" name='action' value='compute_extern_media' title='Next'> <img src='/bweb/next.png' alt=''>Next</button>
+        </td><td/>
+    </tr>
+   </table>
+   </form>
+</div>
diff --git a/gui/bweb/lang/en/tpl/help_extern_compute.tpl b/gui/bweb/lang/en/tpl/help_extern_compute.tpl
new file mode 100644 (file)
index 0000000..08a9545
--- /dev/null
@@ -0,0 +1,67 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Help to eject media (part 2/2)</h1>
+ </div>
+ <div class='bodydiv'>
+  Now, you can verify the selection and eject the media.
+   <form action='?' method='get'>
+    <table id='compute'></table>
+    <table><tr>
+    <td style='align: left;'>
+    <button type="submit" class="bp" onclick='javascript:window.history.go(-2);' title='Back'> <img src='/bweb/prev.png' alt=''>Back</button>
+    </td><td style='align: right;'>
+    <button type="submit" class="bp" name='action' value='extern' title='Eject selection'> <img src='/bweb/extern.png' alt=''>Eject</button>
+   </td></tr>
+   </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Volume Name","Vol Status",
+                       "Media Type","Pool Name","Last Written", 
+                       "When expire ?", "Select");
+
+var data = new Array();
+var chkbox;
+
+<TMPL_LOOP media>
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'checkbox';
+chkbox.value = '<TMPL_VAR volumename>';
+chkbox.name  = 'media';
+chkbox.checked = 'on';
+
+data.push( new Array(
+"<TMPL_VAR volumename>",
+"<TMPL_VAR volstatus>",
+"<TMPL_VAR mediatype>",
+"<TMPL_VAR name>",
+"<TMPL_VAR lastwritten>",
+"<TMPL_VAR expire>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "compute",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+// disable_sorting: new Array(5,6)
+ rows_per_page: rows_per_page
+}
+);
+</script>
diff --git a/gui/bweb/lang/en/tpl/help_intern.tpl b/gui/bweb/lang/en/tpl/help_intern.tpl
new file mode 100644 (file)
index 0000000..d3fd94b
--- /dev/null
@@ -0,0 +1,50 @@
+<br/>
+<div class='titlediv'>
+  <h1 class='newstitle'> Help loading media (part 1/2)</h1>
+</div>
+<div class="bodydiv">
+This tool will select the best candidates to load. You will be asked to make your selection on the next screen.
+  <form action="?" method='GET'>
+   <table>
+    <tr><td>Pool:</td>      
+        <td><select name='pool' class='formulaire' multiple>
+<TMPL_LOOP db_pools>
+             <option selected><TMPL_VAR name></option>
+</TMPL_LOOP>
+           </select>
+        </td>
+    </tr>
+    <tr><td>Media Type:</td>      
+        <td><select name='mediatype' class='formulaire' multiple>
+<TMPL_LOOP db_mediatypes>
+             <option><TMPL_VAR mediatype></option>
+</TMPL_LOOP>
+           </select>
+        </td>
+    </tr>
+    <tr><td>
+    Location: 
+    </td><td><select name='location' class='formulaire'>
+  <TMPL_LOOP db_locations>
+      <option value='<TMPL_VAR location>'><TMPL_VAR location></option>
+  </TMPL_LOOP>
+    </select>
+    </td>
+    </tr>
+    <tr>
+        <td>Expired:</td> 
+        <td> <input type='checkbox' name='expired' class='formulaire' 
+                checked> </td>
+    </tr>
+    <tr>
+        <td>Number of media <br/> to load:</td> 
+        <td> <input type='text' name='limit' class='formulaire' 
+                size='3' value='10'> </td>
+    </tr>
+    <tr>
+        <td><button type="submit" class="bp" name='action' value='compute_intern_media' title='Next'> <img src='/bweb/next.png' alt=''>Next</button>
+        </td><td/>
+    </tr>
+   </table>
+   </form>
+</div>
diff --git a/gui/bweb/lang/en/tpl/help_intern_compute.tpl b/gui/bweb/lang/en/tpl/help_intern_compute.tpl
new file mode 100644 (file)
index 0000000..625ddc9
--- /dev/null
@@ -0,0 +1,69 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Help to load media (part 2/2)</h1>
+ </div>
+ <div class='bodydiv'>
+  Now, you can verify the selection and load the media.
+   <form action='?' method='get'>
+    <table id='compute'></table>
+    <table><tr>
+    <td style='align: left;'>
+    <button type="submit" class="bp" onclick='javascript:window.history.go(-2);' title='Back'> <img src='/bweb/prev.png' alt=''>Back</button>
+    </td><td style='align: right;'>
+    <input type="hidden" name='enabled' value='yes'>
+    <button type="submit" class="bp" name='action' value='move_media'> 
+     <img src='/bweb/intern.png' alt=''></button>
+   </td></tr>
+   </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Volume Name","Vol Status",
+                       "Media Type","Pool Name","Last Written", 
+                       "When expire ?", "Select");
+
+var data = new Array();
+var chkbox;
+
+<TMPL_LOOP NAME=media>
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'checkbox';
+chkbox.name = 'media';
+chkbox.value= '<TMPL_VAR volumename>';
+chkbox.checked = 'on';
+
+data.push( new Array(
+"<TMPL_VAR volumename>",
+"<TMPL_VAR volstatus>",
+"<TMPL_VAR mediatype>",
+"<TMPL_VAR name>",
+"<TMPL_VAR lastwritten>",
+"<TMPL_VAR expire>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "compute",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+// disable_sorting: new Array(5,6)
+ rows_per_page: rows_per_page
+}
+);
+</script>
diff --git a/gui/bweb/lang/en/tpl/location_add.tpl b/gui/bweb/lang/en/tpl/location_add.tpl
new file mode 100644 (file)
index 0000000..5a2835b
--- /dev/null
@@ -0,0 +1,31 @@
+<br/>
+<div class='titlediv'>
+  <h1 class='newstitle'> New location </h1>
+</div>
+<div class='bodydiv'>
+   <form action="?" method='get'>
+    <table>
+     <tr><td>Location:</td>     
+         <td> 
+          <input class="formulaire" type='text' value='' size='32' name='location'> 
+         </td>
+     </tr>
+     <tr><td>Cost:</td> 
+         <td> <input class="formulaire" type='text' value='10' name='cost' size='3'>
+         </td>
+     </tr>
+    <tr><td>Enabled:</td>
+        <td> <select name='enabled' class='formulaire'>
+           <option value='yes'>yes</option>
+           <option value='no'>no</option>
+           <option value='archived'>archived</option>
+           </select>
+        </td>
+    </tr>
+    </table>
+    <button type="submit" class="bp" name='action' value='location_add' title="Save" ><img src='/bweb/save.png' alt=''>Save</button>
+   </form>
+
+Tips: It's a good idea to have a location per autochanger.
+
+</div>
diff --git a/gui/bweb/lang/en/tpl/location_edit.tpl b/gui/bweb/lang/en/tpl/location_edit.tpl
new file mode 100644 (file)
index 0000000..39c4779
--- /dev/null
@@ -0,0 +1,40 @@
+<br/>
+<div class='titlediv'>
+  <h1 class='newstitle'> Location: <TMPL_VAR Location></h1>
+</div>
+<div class='bodydiv'>
+   <form name='form1' action="?" method='get'>
+    <input type='hidden' name='location' value='<TMPL_VAR location>'>
+    <table>
+     <tr><td>Location:</td>     
+         <td> 
+          <input class="formulaire" type='text' value='<TMPL_VAR location>' size='32' name='newlocation'> 
+         </td>
+     </tr>
+     <tr><td>Cost:</td> 
+         <td> <input class="formulaire" type='text' value='<TMPL_VAR cost>' name='cost' size='3'>
+         </td>
+     </tr>
+    <tr><td>Enabled:</td>
+        <td> <select name='enabled' class='formulaire'>
+           <option value='yes'>yes</option>
+           <option value='no'>no</option>
+           <option value='archived'>archived</option>
+           </select>
+        </td>
+    </tr>
+    </table>
+    <button type="submit" class="bp" name='action' value='location_save'>
+      <img src='/bweb/save.png' alt=''>Save</button>
+   </form>
+</div>
+
+<script type="text/javascript" language='JavaScript'>
+ok=1;
+for (var i=0; ok && i < document.form1.enabled.length; ++i) {
+   if (document.form1.enabled[i].value == '<TMPL_VAR enabled>') {
+      document.form1.enabled[i].selected = true;
+      ok=0;
+   }
+}
+</script>
diff --git a/gui/bweb/lang/en/tpl/move_media.tpl b/gui/bweb/lang/en/tpl/move_media.tpl
new file mode 100644 (file)
index 0000000..9330feb
--- /dev/null
@@ -0,0 +1,84 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Move media</h1>
+ </div>
+ <div class="bodydiv">
+   <form name='form1' action='?' method='get'>
+    <table id='id<TMPL_VAR ID>'></table>
+    <table border='0'>
+    <tr><td> New location: </td><td>
+<select name='newlocation' class='formulaire'>
+    <TMPL_LOOP db_locations>
+    <option value='<TMPL_VAR location>'><TMPL_VAR location></option>
+    </TMPL_LOOP>
+</select>
+    </td></tr><tr><td> Enabled: </td><td>
+<select name='enabled' class='formulaire'>
+    <option value='no'>no</option>
+    <option value='yes'>yes</option>
+    <option value='archived'>archived</option>
+</select>
+    </td><tr><td> User: </td><td>
+<input type='text' name='user' value='<TMPL_VAR loginname>' class='formulaire'>
+    </td></tr>
+    </td></tr><tr><td> Comment: </td><td>
+<textarea name="comment" class='formulaire'></textarea>
+    </td></tr>
+    </table>
+    <button type="submit" class="bp" type='submit' name='action' value='change_location'> <img src='/bweb/apply.png' alt=''> Move </button>
+   </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Volume Name", "Location", "Select");
+
+var data = new Array();
+var chkbox;
+
+<TMPL_LOOP media>
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'checkbox';
+chkbox.value = '<TMPL_VAR volumename>';
+chkbox.name  = 'media';
+chkbox.checked = 1;
+
+data.push( new Array(
+"<TMPL_VAR volumename>",
+"<TMPL_VAR location>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+// disable_sorting: new Array(5,6),
+ rows_per_page: rows_per_page
+}
+);
+<TMPL_IF enabled>
+ok=1;
+for (var i=0; ok && i < document.form1.enabled.length; ++i) {
+   if (document.form1.enabled[i].value == '<TMPL_VAR enabled>') {
+      document.form1.enabled[i].selected = true;
+      ok=0;
+   }
+}
+</TMPL_IF>
+</script>
diff --git a/gui/bweb/lang/en/tpl/overview.tpl b/gui/bweb/lang/en/tpl/overview.tpl
new file mode 100644 (file)
index 0000000..9f44534
--- /dev/null
@@ -0,0 +1,117 @@
+<style type="text/css">
+table.sample {
+       border-width: 1px 1px 1px 1px;
+       border-spacing: 3px;
+       border-style: solid solid solid solid;
+       border-color: black black black black;
+       border-collapse: collapse;
+       background-color: white;
+}
+table.sample th {
+       border-width: 1px 1px 1px 1px;
+       padding: 4px 4px 4px 4px;
+       border-style: solid solid solid solid;
+       border-color: gray gray gray gray;
+       background-color: white;
+}
+table.sample td {
+       border-width: 1px 1px 1px 1px;
+       padding: 4px 4px 4px 4px;
+       border-style: solid solid solid solid;
+       border-color: gray gray gray gray;
+       background-color: white;
+}
+</style>
+ <div class='titlediv'>
+  <h1 class='newstitle'> Jobs overview (<TMPL_VAR label>)</h1>
+ </div>
+ <div class='bodydiv'>
+  <table class='sample' id='report'>
+   <tr id='days'><td/>
+  </table>
+ </div>
+
+
+
+<script type="text/javascript" language="JavaScript">
+
+var table = document.getElementById('report');
+var nodate = new Array();
+var nb_col=1;
+var tr; var td; var img; var infos;
+var all = new Array();
+var max_cel=0;
+var min_cel=200;
+
+<TMPL_LOOP items>
+infos = new Array();
+ <TMPL_LOOP events>
+ min_cel=(min_cel< <TMPL_VAR num>)?min_cel:<TMPL_VAR num>;
+ infos[<TMPL_VAR num>] = new Array('<TMPL_VAR num>', '<TMPL_VAR status>', 
+                                   <TMPL_VAR joberrors>, '<TMPL_VAR title>');
+ </TMPL_LOOP>
+max_cel=(max_cel>infos.length)?max_cel:infos.length;
+all.push({ name: "<TMPL_VAR name>", values: infos});
+</TMPL_LOOP>
+
+//infos = new Array();
+//infos[1] = new Array('2007-10-01', 'T', 8);
+//infos[2] = new Array('2007-10-02', 'T', 8);
+//infos[5] = new Array('2007-10-05', 'R', 8);
+//
+//max_cel=(max_cel>infos.length)?max_cel:infos.length;
+//all.push({ name: "zog", values: infos});
+
+function init_tab() // initialize the table
+{
+    for(var j=min_cel; j < max_cel ; j++) {
+       var t=document.createElement("TD");
+       t.setAttribute("id", "day" + j);
+       nodate[j]=1;
+       document.getElementById("days").appendChild(t);
+    }
+}
+
+function add_client(name, infos)
+{
+    tr=document.createElement("TR"); // client row
+    table.appendChild(tr);
+
+    td=document.createElement("TD"); // client name
+    tr.appendChild(td);
+    a=document.createElement("A");
+    a.setAttribute("href", "?action=<TMPL_VAR action>" + name);
+    a.appendChild(document.createTextNode(name));
+    td.appendChild(a);
+    var len = infos.length;
+
+    for(var j=min_cel; j < max_cel ; j++) { // one img for each days
+        td=document.createElement("TD"); 
+        tr.appendChild(td);
+        if (len > j && infos[j]) {
+           if (nodate[j] == 1) { // put the date in the first row if empty
+              var t = document.getElementById("day" + j);
+              t.appendChild(document.createTextNode(infos[j][0]));
+              nodate[j]=0;
+           }
+//         a=document.createElement("A"); // create a link to action=job
+//         a.setAttribute('href', "?action=job;client_group=" + name);
+            img=document.createElement("IMG");
+            img.setAttribute("src", bweb_get_job_img(infos[j][1],infos[j][2]));
+            img.setAttribute("title", infos[j][3]);
+//         a.appendChild(img);
+            td.appendChild(img);
+        } else {
+//            td.appendChild(document.createTextNode('N/A'));
+        }
+    }
+}
+
+init_tab();
+
+for(var i=0; i<all.length; i++) {
+   var elt = all[i];
+   add_client(elt['name'], elt['values']);
+}
+
+</script>
diff --git a/gui/bweb/lang/en/tpl/run_job.tpl b/gui/bweb/lang/en/tpl/run_job.tpl
new file mode 100644 (file)
index 0000000..11edd6d
--- /dev/null
@@ -0,0 +1,25 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'> Defined jobs: </h1>
+ </div>
+ <div class='bodydiv'>
+  <form name='form1' action='?' method='GET'>  
+  <table border='0'>
+
+   <tr><td>Job Name: </td><td>
+   <select name='job'>
+    <TMPL_LOOP jobs>
+     <option value='<TMPL_VAR name>'>
+       <TMPL_VAR name>
+     </option>
+    </TMPL_LOOP>
+   </select>
+   </td></tr>
+   </table>
+   <br/>
+   <button type="submit" class="bp" name='action' value='enable_job' title='Enable'> <img src='/bweb/inflag1.png' alt=''> Enable </button>
+   <button type="submit" class="bp" name='action' value='disable_job' title='Disable' > <img src='/bweb/inflag0.png' alt=''> Disable </button>
+   <button type="submit" class="bp" name='action' value='next_job2' title='Show schedule' > <img src='/bweb/zoom.png' alt=''> Show schedule  </button>
+   <button type="submit" class="bp" name='action' value='run_job_mod' title='Run now' > <img src='/bweb/R.png' alt=''> Run now  </button>
+  </form>
+ </div>
diff --git a/gui/bweb/lang/en/tpl/run_job_mod.tpl b/gui/bweb/lang/en/tpl/run_job_mod.tpl
new file mode 100644 (file)
index 0000000..4119351
--- /dev/null
@@ -0,0 +1,133 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'> Run job: <TMPL_VAR job> on <TMPL_VAR client></h1>
+ </div>
+ <div class='bodydiv'>
+  <form name='form1' action='?' method='GET'>  
+  <table border='0'>
+
+   <tr><td>Job Name: </td><td>
+   <select name='job'>
+    <TMPL_LOOP jobs>
+     <option value='<TMPL_VAR name>'>
+       <TMPL_VAR name>
+     </option>
+    </TMPL_LOOP>
+   </select>
+   </td></tr><tr><td>Pool: </td><td>
+
+   <select name='pool'>        
+     <option value=''></option>
+    <TMPL_LOOP pools>
+     <option value='<TMPL_VAR name>'>
+       <TMPL_VAR name>
+     </option>
+    </TMPL_LOOP>
+   </select>
+   </td></tr><tr><td>Client: </td><td>
+
+   <select name='client'>
+    <TMPL_LOOP clients>
+     <option value='<TMPL_VAR name>'>
+       <TMPL_VAR name>
+     </option>
+    </TMPL_LOOP>
+   </select>
+
+   </td></tr><tr><td>FileSet: </td><td>
+   <select name='fileset'>
+    <TMPL_LOOP filesets>
+     <option value='<TMPL_VAR name>'>
+       <TMPL_VAR name>
+     </option>
+    </TMPL_LOOP>
+   </select>
+
+   </td></tr><tr><td>Storage: </td><td>
+   <select name='storage'>
+    <TMPL_LOOP storages>
+     <option value='<TMPL_VAR name>'>
+       <TMPL_VAR name>
+     </option>
+    </TMPL_LOOP>
+   </select>
+
+   </td></tr><tr><td>Level: </td><td>
+   <select name='level'>
+     <option id='level_Incremental' value='Incremental'>Incremental</option>
+     <option id='level_Full' value='Full'>Full</option>
+     <option id='level_Differential' value='Differential'>Differential</option>
+   </select>
+
+   </td></tr><tr id='more1' style="visibility:hidden"><td>Start Time: </td><td>
+   <input type='text' title='YYYY-MM-DD HH:MM:SS'
+          size='17' name='when' value='<TMPL_VAR when>'>
+
+   </td></tr><tr id='more2' style="visibility:hidden"><td>Priority: </td><td>
+   <input type='text' 
+          size='3' name='priority' value='<TMPL_VAR priority>'>
+
+   </td></tr>
+   </table>
+   <br/>
+
+  <label onclick='
+           document.getElementById("more1").style.visibility="visible";
+           document.getElementById("more2").style.visibility="visible";'>
+  <img title='Display more options' src='/bweb/add.png'>More options</label>
+
+  <button type="submit" class="bp" name='action' value='run_job_now' title='Run job'><img src='/bweb/R.png' alt=''>Run now</button>
+  <button type="submit" class="bp" name='action' value='fileset_view' title='View FileSet'><img src='/bweb/zoom.png' alt=''>View FileSet</button>
+  </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+  <TMPL_IF job>
+     ok=1;
+     for(var i=0; ok && i < document.form1.job.length; i++) {
+       if (document.form1.job[i].value == '<TMPL_VAR job>') {
+           document.form1.job[i].selected=true;
+           ok=0;
+       }
+     }
+  </TMPL_IF>
+  <TMPL_IF client>
+     ok=1;
+     for(var i=0; ok && i < document.form1.client.length; i++) {
+       if (document.form1.client[i].value == '<TMPL_VAR client>') {
+           document.form1.client[i].selected=true;
+           ok=0;
+       }
+     }
+  </TMPL_IF>
+  <TMPL_IF pool>
+     ok=1;
+     for(var i=0; ok && i < document.form1.pool.length; i++) {
+       if (document.form1.pool[i].value == '<TMPL_VAR pool>') {
+           document.form1.pool[i].selected=true;
+           ok=0;
+       }
+     }
+  </TMPL_IF>
+  <TMPL_IF storage>
+     ok=1;
+     for(var i=0; ok && i < document.form1.storage.length; i++) {
+       if (document.form1.storage[i].value == '<TMPL_VAR storage>') {
+           document.form1.storage[i].selected=true;
+           ok=0;
+       }
+     }
+  </TMPL_IF>
+  <TMPL_IF level>
+     document.getElementById('level_<TMPL_VAR level>').selected=true; 
+  </TMPL_IF>
+  <TMPL_IF fileset>
+     ok=1;
+     for(var i=0; ok && i < document.form1.fileset.length; i++) {
+       if (document.form1.fileset[i].value == '<TMPL_VAR fileset>') {
+           document.form1.fileset[i].selected=true;
+           ok=0;
+       }
+     }
+  </TMPL_IF>
+</script>
diff --git a/gui/bweb/lang/en/tpl/running_job.tpl b/gui/bweb/lang/en/tpl/running_job.tpl
new file mode 100644 (file)
index 0000000..c153d99
--- /dev/null
@@ -0,0 +1,93 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'> Running Jobs </h1>
+ </div>
+ <div class='bodydiv'>
+   <form action='?' method='GET'>
+   <table id='id<TMPL_VAR ID>'></table>
+   <br/>
+<label>
+<button type="submit" class="bp" name='action' value='dsp_cur_job' 
+ title='View job'> <img src='/bweb/zoom.png' alt=''>View</button>
+<button type="submit" class="bp" type='submit' name='action' value='cancel_job'
+ onclick="return confirm('Do you want to cancel the selected job?')"
+ title='Cancel job'> <img src='/bweb/cancel.png' alt=''>Cancel</button>
+   </form>
+
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+var header = new Array("JobId",
+                       "Client",
+                       "Job Name", 
+                       "Level",
+                       "Start Time", 
+                       "Duration", 
+//                       "Job Files",
+//                       "Job Bytes", 
+                       "Status",
+                       "Select"
+        );
+
+var data = new Array();
+var chkbox;
+var img;
+
+<TMPL_LOOP Jobs>
+a = document.createElement('A');
+a.href='?action=dsp_cur_job;jobid=<TMPL_VAR JobId>';
+
+img = document.createElement("IMG");
+img.src = '/bweb/<TMPL_VAR JobStatus>.png';
+img.title = jobstatus['<TMPL_VAR JobStatus>'];
+
+a.appendChild(img);
+
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'radio';
+chkbox.name = 'jobid';
+chkbox.value = '<TMPL_VAR jobid>';
+
+data.push( new Array(
+"<TMPL_VAR JobId>",
+"<TMPL_VAR ClientName>",     
+"<TMPL_VAR JobName>",    
+joblevel['<TMPL_VAR Level>'],      
+"<TMPL_VAR StartTime>",
+"<TMPL_VAR duration>",
+//"<TMPL_VAR JobFiles>",   
+//"<TMPL_VAR JobBytes>",
+a,
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: true,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ rows_per_page: rows_per_page,
+// disable_sorting: new Array(6)
+ padding: 3
+}
+);
+
+// get newest backup first
+nrsTables['id<TMPL_VAR ID>'].fieldSort(0);
+
+bweb_add_refresh();
+
+</script>
diff --git a/gui/bweb/lang/en/tpl/scheduled_job.tpl b/gui/bweb/lang/en/tpl/scheduled_job.tpl
new file mode 100644 (file)
index 0000000..c944fec
--- /dev/null
@@ -0,0 +1,75 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'> <TMPL_IF title><TMPL_VAR title><TMPL_ELSE>Next Jobs </TMPL_IF></h1>
+ </div>
+ <div class='bodydiv'>
+    <form name='form1' action='<TMPL_VAR cginame>?' method='GET'>
+     <table id='id<TMPL_VAR ID>'></table>
+     <button type="submit" class="bp" name='action' title='Run now' value='run_job_mod'>
+       <img src='/bweb/R.png' alt=''>  Run now </button>
+      <button type="submit" class="bp" name='action' title='Disable' value='disable_job'>
+       <img src='/bweb/inflag0.png' alt=''> Disable </button>
+     <input type='hidden' name='pool' value=''>
+     <input type='hidden' name='level' value=''>
+     <input type='hidden' name='media' value=''>
+    </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Scheduled",
+                       "Level",
+                      "Type",
+                      "Priority", 
+                       "Name",
+                       "Volume",
+                      "Select");
+
+var data = new Array();
+var chkbox;
+
+<TMPL_LOOP list>
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'radio';
+chkbox.name = 'job';
+chkbox.value = '<TMPL_VAR name>';
+chkbox.onclick = function() { 
+ document.form1.level.value = '<TMPL_VAR level>';
+ document.form1.pool.value = '<TMPL_VAR pool>';
+ document.form1.media.value = '<TMPL_VAR volume>';
+} ;
+
+data.push( new Array(
+"<TMPL_VAR date>",    
+"<TMPL_VAR level>",
+"<TMPL_VAR type>",     
+"<TMPL_VAR priority>",    
+"<TMPL_VAR name>",      
+"<TMPL_VAR volume>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: true,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ rows_per_page: rows_per_page,
+// disable_sorting: new Array(6),
+ padding: 3
+}
+);
+</script>
diff --git a/gui/bweb/lang/en/tpl/stats.tpl b/gui/bweb/lang/en/tpl/stats.tpl
new file mode 100644 (file)
index 0000000..15fd57d
--- /dev/null
@@ -0,0 +1,9 @@
+<div class='titlediv'>
+  <h1 class='newstitle'> Statistics </h1>
+</div>
+<div class='bodydiv'>
+<a href='?action=job;age=172800;jobtype=B'>
+<img width='450' height='200' src='bgraph.pl?age=2678400;width=450;height=200;graph=job_sum_day;limit=500;action=graph;legend=off' alt='Nothing to display'>
+</a>
+</div>
+
diff --git a/gui/bweb/lang/en/tpl/update_location.tpl b/gui/bweb/lang/en/tpl/update_location.tpl
new file mode 100644 (file)
index 0000000..1c40d19
--- /dev/null
@@ -0,0 +1,65 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Update media location</h1>
+ </div> 
+ <div class="bodydiv">
+   <form action='?' method='get'>
+    <table id='id<TMPL_VAR ID>'></table>
+    New location: <select class='formulaire' name='newlocation'>
+   <TMPL_LOOP db_locations>
+      <option id='loc_<TMPL_VAR location>' value='<TMPL_VAR location>'><TMPL_VAR location></option>
+   </TMPL_LOOP>
+  </select>
+  <button type="submit" class="bp" name='action' value='save_location'> <img src='/bweb/apply.png' alt=''>Apply</button>
+   </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Volume Name", "Location", "Select");
+
+var data = new Array();
+var chkbox;
+
+<TMPL_LOOP media>
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'checkbox';
+chkbox.value = '<TMPL_VAR name=volumename>';
+chkbox.name  = 'media';
+chkbox.checked = 1;
+
+data.push( new Array(
+"<TMPL_VAR volumename>",
+"<TMPL_VAR location>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+// disable_sorting: new Array(5,6)
+ rows_per_page: rows_per_page
+}
+);
+
+<TMPL_IF qnewlocation>
+ document.getElementById('loc_' + <TMPL_VAR qnewlocation>).selected=true;
+</TMPL_IF>
+
+</script>
diff --git a/gui/bweb/lang/en/tpl/update_media.tpl b/gui/bweb/lang/en/tpl/update_media.tpl
new file mode 100644 (file)
index 0000000..e83552d
--- /dev/null
@@ -0,0 +1,170 @@
+<br/>
+<div class='titlediv'>
+ <h1 class='newstitle'>Update media <TMPL_VAR volumename></h1>
+</div>
+<div class='bodydiv'>
+  <form name='form1' action="?" method='GET'>
+   <table>
+    <tr><td>Volume Name:</td>
+        <td><input type='text' name='media' class='formulaire' value='<TMPL_VAR volumename>' title='Change this to update an other volume'>
+        </td>
+    </tr>
+    <tr><td>Pool:</td>
+        <td><select name='pool' class='formulaire'>
+<TMPL_LOOP db_pools>
+             <option value='<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+           </select>
+        </td>
+    </tr>
+    <tr><td>Status:</td>
+        <td><select name='volstatus' class='formulaire'>
+           <option value='Append'>Append</option>
+           <option value='Archive'>Archive</option>
+           <option value='Disabled'>Disabled</option>
+           <option value='Cleaning'>Cleaning</option>
+           <option value='Error'>Error</option>
+          <option value='Full'>Full</option>
+           <option value='Read-Only'>Read-Only</option>
+           <option value='Used'>Used</option>
+          <option value='Recycle'>Recycle</option>
+           </select>
+        </td>
+    </tr>
+
+    <tr><td>Slot:</td>
+        <td> 
+          <input class='formulaire' type='text' 
+                 name='slot' value='<TMPL_VAR slot>'>
+        </td>
+    </tr>
+
+    <tr><td>InChanger Flag:</td>
+        <td> 
+          <input class='formulaire' type='checkbox' 
+               name='inchanger' <TMPL_IF inchanger>checked</TMPL_IF>>
+        </td>
+    </tr>
+
+    <tr><td>Enabled:</td>
+        <td> <select name='enabled' class='formulaire'>
+           <option value='yes'>yes</option>
+           <option value='no'>no</option>
+           <option value='archived'>archived</option>
+           </select>
+        </td>
+    </tr>
+
+    <tr><td> Location: </td>
+        <td><select name='location' class='formulaire'>
+        <option value=''></option>
+  <TMPL_LOOP db_locations>
+      <option value='<TMPL_VAR location>'><TMPL_VAR location></option>
+  </TMPL_LOOP>
+    </select>
+        </td>
+    </tr>
+    <tr><td> Retention period: </td>
+        <td>
+          <input class='formulaire' type='text' title='ex: 3 days, 1 month'
+               name='volretention' value='<TMPL_VAR volretention>'>
+        </td>
+    </tr>
+    <tr><td> Use duration: </td>
+        <td>
+          <input class='formulaire' type='text' title='ex: 3 days, 1 month'
+               name='voluseduration' value='<TMPL_VAR voluseduration>'>
+        </td>
+    </tr>
+    <tr><td> Max Jobs: </td>
+        <td>
+          <input class='formulaire' type='text' title='ex: 10'
+               name='maxvoljobs' value='<TMPL_VAR maxvoljobs>'>
+        </td>
+    </tr>
+    <tr><td> Max Files: </td>
+        <td>
+          <input class='formulaire' type='text' title='ex: 10000'
+               name='maxvolfiles' value='<TMPL_VAR maxvolfiles>'>
+        </td>
+    </tr>
+    <tr><td> Max Bytes: </td>
+        <td>
+          <input class='formulaire' type='text' title='ex: 10M, 11G'
+               name='maxvolbytes' value='<TMPL_VAR maxvolbytes>'>
+        </td>
+    </tr>
+    <tr><td>Recycle Pool:</td>
+        <td><select name='poolrecycle' class='formulaire'>
+<TMPL_LOOP db_pools>
+             <option value='<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+           </select>
+        </td>
+    </tr>
+    <tr><td> Comment: </td>
+        <td>
+          <input class='formulaire' type='text' title='a comment'
+               name='comment' value='<TMPL_VAR comment>'>
+        </td>
+    </tr>
+
+    </table>
+<table>
+ <td>
+  <button type="submit" class="bp" name='action' value='do_update_media'> <img src='/bweb/apply.png' alt=''> Apply </button>
+  <button type="submit" class="bp" name='action' title='Update from pool'
+    value='update_from_pool'> <img src='/bweb/update.png' alt=''> Update from pool </button>
+ </form>
+ </td>
+ <td>
+  <form action='?' method='GET'>
+   <input type='hidden' name='pool' value='<TMPL_VAR poolname>'>
+    <button type="submit" class="bp" name='action' value='media'>
+     <img src='/bweb/zoom.png' alt=''>View Pool </button>
+  </form>
+ </td>
+</table>
+</div>
+
+<script type="text/javascript" language='JavaScript'>
+var ok=1;
+for (var i=0; ok && i < document.form1.pool.length; ++i) {
+   if (document.form1.pool[i].value == '<TMPL_VAR poolname>') {
+      document.form1.pool[i].selected = true;
+      ok=0;
+   }
+}
+
+ok=1;
+for (var i=0; ok && i < document.form1.pool.length; ++i) {
+   if (document.form1.poolrecycle[i].value == '<TMPL_VAR poolrecycle>') {
+      document.form1.poolrecycle[i].selected = true;
+      ok=0;
+   }
+}
+
+ok=1;
+for (var i=0; ok && i < document.form1.location.length; ++i) {
+   if (document.form1.location[i].value == '<TMPL_VAR location>') {
+      document.form1.location[i].selected = true;
+      ok=0;
+   }
+}
+
+ok=1;
+for (var i=0; ok && i < document.form1.volstatus.length; ++i) {
+   if (document.form1.volstatus[i].value == '<TMPL_VAR volstatus>') {
+      document.form1.volstatus[i].selected = true;
+      ok=0;
+   }
+}
+ok=1;
+for (var i=0; ok && i < document.form1.enabled.length; ++i) {
+   if (document.form1.enabled[i].value == '<TMPL_VAR enabled>') {
+      document.form1.enabled[i].selected = true;
+      ok=0;
+   }
+}
+
+</script>