]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/bweb/cgi/bweb.pl
ebl fix display_job_group, it works now !
[bacula/bacula] / gui / bweb / cgi / bweb.pl
index d4a8cf573afa7bd24a97a1d8f9f9d312294e2c12..b6d1e97dfa99c86cc2c279f736b6ce7d35e4ecf8 100755 (executable)
@@ -4,7 +4,7 @@ use strict ;
 =head1 LICENSE
 
    Bweb - A Bacula web interface
-   Bacula® - The Network Backup Solution
+   Bacula® - The Network Backup Solution
 
    Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
 
@@ -27,7 +27,7 @@ use strict ;
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   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.
@@ -118,7 +118,8 @@ if ($action eq 'begin') {           # main display
     $bweb->display($fields, "display_form_media.tpl");
 
     print "</td><td valign='top'>";
-    $bweb->display_media();
+    $bweb->display_media(offset => $arg->{offset},
+                        limit => $arg->{limit});
     print "</td></tr></table></div>";
 
 } elsif ($action eq 'medias') {
@@ -220,17 +221,24 @@ if ($action eq 'begin') {         # main display
     $bweb->help_extern_compute();
 
 } elsif ($action eq 'extern') {
-    $bweb->eject_media();
+    print "<div style='float: left;'>";
+    my @achs = $bweb->eject_media();
+    for my $ach (@achs) {
+        CGI::param('ach', $ach);
+       $bweb->update_slots();
+    }
+    print "</div><div style='float: left;margin-left: 20px;'>";
     $bweb->move_media();
+    print "</div>";
 
 } elsif ($action eq 'move_email') {
     $bweb->move_email();
 
 } elsif ($action eq 'change_location') {
-    $bweb->change_location();
+    $bweb->location_change();
 
 } elsif ($action eq 'location') {
-    $bweb->display_location();
+    $bweb->location_display();
 
 } elsif ($action eq 'about') {
     $bweb->display($bweb, 'about.tpl');
@@ -268,12 +276,29 @@ if ($action eq 'begin') {         # main display
 } elsif ($action eq 'disable_job') {
     $bweb->enable_disable_job(0);
 
+} elsif ($action eq 'groups') {
+    $bweb->display_groups();
+
+} elsif ($action eq 'groups_edit') {
+    $bweb->groups_edit();
+
+} elsif ($action eq 'groups_save') {
+    $bweb->groups_save();
+
+} elsif ($action eq 'groups_add') {
+    $bweb->groups_add();
+
+} elsif ($action eq 'groups_del') {
+    $bweb->groups_del();
+
 } elsif ($action eq 'job') {
 
     print "<div><table border='0'><tr><td valign='top'>\n";
     my $fields = $bweb->get_form(qw/status level db_clients db_filesets
                                    limit age offset qclients qfilesets
-                                   jobtype qpools db_pools/);
+                                   jobtype qpools db_pools
+                                   db_client_groups qclient_groups/); # drop this to hide 
+
     $bweb->display($fields, "display_form_job.tpl");
 
     print "</td><td valign='top'>";
@@ -281,6 +306,22 @@ if ($action eq 'begin') {          # main display
                       offset => $arg->{offset},
                       limit => $arg->{limit});
     print "</td></tr></table></div>";
+} elsif ($action eq 'job_group') {
+
+    print "<div><table border='0'><tr><td valign='top'>\n";
+    my $fields = $bweb->get_form(qw/limit level age 
+                                    db_client_groups qclient_groups/); # drop this to hide 
+
+    $fields->{hide_status} = 1;
+    $fields->{hide_type} = 1;
+    $fields->{action} = 'job_group';
+
+    $bweb->display($fields, "display_form_job.tpl");
+
+    print "</td><td valign='top'>";
+    $bweb->display_job_group(age => $arg->{age},  # last 7 days
+                            limit => $arg->{limit});
+    print "</td></tr></table></div>";
 } elsif ($action eq 'client_stats') {
 
     foreach my $client (CGI::param('client')) {
@@ -290,6 +331,10 @@ if ($action eq 'begin') {          # main display
        }
     }
 
+} elsif ($action eq 'group_stats') {
+
+    $bweb->display_group_stats(age => $arg->{age});
+
 } elsif ($action eq 'running') {
     $bweb->display_running_jobs(1);
 
@@ -375,6 +420,7 @@ if ($action eq 'begin') {           # main display
 
 $bweb->display_end();
 
+$bweb->dbh_disconnect();
 
 __END__