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.
+ modify it under the terms of version three of the GNU Affero General Public
+ License as published by the Free Software Foundation and included
+ 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.
+ Affero General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Affero 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.
+ Bacula® is a registered trademark of Kern Sibbald.
The licensor of Bacula is the Free Software Foundation Europe
- (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zurich,
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
=head1 VERSION
$bweb->display_job(limit => 10);
} elsif ($action eq 'view_conf') {
+ $bweb->can_do('r_configure');
$conf->view()
} elsif ($action eq 'edit_conf') {
+ $bweb->can_do('r_configure');
$conf->edit();
} elsif ($action eq 'apply_conf') {
+ $bweb->can_do('r_configure');
$conf->modify();
+} elsif ($action eq 'user_del') {
+ $bweb->users_del();
+
+} elsif ($action eq 'user_add') {
+ $bweb->users_add();
+
+} elsif ($action eq 'user_edit') {
+ $bweb->display_user();
+
+} elsif ($action eq 'user_save') {
+ $bweb->users_add();
+
+} elsif ($action eq 'users') {
+ $bweb->display_users();
+
} elsif ($action eq 'client') {
$bweb->display_clients();
+} elsif ($action eq 'client_edit') {
+ $bweb->client_edit();
+
+} elsif ($action eq 'client_save') {
+ $bweb->client_save();
+
} elsif ($action eq 'pool') {
$bweb->display_pool();
} elsif ($action eq 'location_del') {
$bweb->location_del();
+} elsif ($action eq 'cmd_storage') {
+ $bweb->cmd_storage();
+
} elsif ($action eq 'media') {
+ $bweb->can_do('r_view_media');
+
print "<div><table border='0'><tr><td valign='top'>\n";
my $fields = $bweb->get_form(qw/db_locations db_pools expired
qlocations qpools volstatus qre_media
$bweb->display_allmedia();
} elsif ($action eq 'eject') {
+ $bweb->can_do('r_autochanger_mgnt');
+
my $arg = $bweb->get_form("ach");
my $a = $bweb->ach_get($arg->{ach});
$a->display_content();
}
+} elsif ($action eq 'add_media') {
+ $bweb->add_media();
} elsif ($action eq 'eject_media') {
$bweb->eject_media();
} elsif ($action eq 'clear_io') {
+ $bweb->can_do('r_autochanger_mgnt');
+
my $arg = $bweb->get_form('ach');
my $a = $bweb->ach_get($arg->{ach});
$bweb->ach_del();
} elsif ($action eq 'ach_view') {
+ $bweb->can_do('r_autochanger_mgnt');
+
# TODO : get autochanger name and create it
$bweb->connect_db();
my $arg = $bweb->get_form('ach');
$bweb->ach_add();
} elsif ($action eq 'ach_load') {
+ $bweb->can_do('r_autochanger_mgnt');
+
my $arg = $bweb->get_form('ach', 'drive', 'slot');
my $a = $bweb->ach_get($arg->{ach});
}
} elsif ($action eq 'ach_unload') {
+ $bweb->can_do('r_autochanger_mgnt');
+
my $arg = $bweb->get_form('drive', 'slot', 'ach');
my $a = $bweb->ach_get($arg->{ach});
$bweb->help_extern_compute();
} elsif ($action eq 'extern') {
+ $bweb->can_do('r_media_mgnt');
+ $bweb->can_do('r_autochanger_mgnt');
+
print "<div style='float: left;'>";
my @achs = $bweb->eject_media();
for my $ach (@achs) {
$bweb->update_slots();
}
print "</div><div style='float: left;margin-left: 20px;'>";
- $bweb->move_media('no'); # enabled = no
+ $bweb->move_media('yes'); # pb with enabled = no for restore
print "</div>";
} elsif ($action eq 'move_email') {
} 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') {
-
+ $bweb->can_do('r_view_job');
print "<div><table border='0'><tr><td valign='top'>\n";
- my $fields = $bweb->get_form(qw/status level db_clients db_filesets
+ my $fields = $bweb->get_form(qw/status level filter db_clients
+ db_filesets since
limit age offset qclients qfilesets
jobtype qpools db_pools
db_client_groups qclient_groups/); # drop this to hide
-
+ if (!CGI::param('since')) {
+ $fields->{hide_since}=1 ;
+ delete $fields->{since};
+ }
$bweb->display($fields, "display_form_job.tpl");
print "</td><td valign='top'>";
- $bweb->display_job(age => $arg->{age}, # last 7 days
- offset => $arg->{offset},
- limit => $arg->{limit});
+ $bweb->display_job(age => $fields->{age}, # last 7 days
+ since => $fields->{since},
+ offset => $fields->{offset},
+ limit => $fields->{limit});
print "</td></tr></table></div>";
} elsif ($action eq 'job_group') {
-
+ $bweb->can_do('r_view_job');
print "<div><table border='0'><tr><td valign='top'>\n";
- my $fields = $bweb->get_form(qw/limit level age
+ my $fields = $bweb->get_form(qw/limit level age filter
db_client_groups qclient_groups/); # drop this to hide
$fields->{hide_status} = 1;
$fields->{hide_type} = 1;
+ $fields->{hide_since}=1;
$fields->{action} = 'job_group';
$bweb->display($fields, "display_form_job.tpl");
} elsif ($action eq 'client_stats') {
foreach my $client (CGI::param('client')) {
- if ($client =~ m/$client_re/) {
+ if ($client =~ $client_re) {
$bweb->display_client_stats(clientname => $1,
age => $arg->{age});
}
}
-
} elsif ($action eq 'group_stats') {
+ $bweb->can_do('r_view_stat');
+ print "<div><table border='0'><tr><td valign='top'>\n";
+ my $fields = $bweb->get_form(qw/since age
+ db_client_groups qclient_groups/);
+ $fields->{action}='group_stats';
+ $fields->{hide_level}=1;
+ $fields->{hide_type}=1;
+ $fields->{hide_status}=1;
- $bweb->display_group_stats(age => $arg->{age});
+ $bweb->display($fields, "display_form_job.tpl");
+
+ print "</td><td valign='top'>";
+ $bweb->display_group_stats();
+
+ print "</td></tr></table></div>"
} elsif ($action eq 'running') {
$bweb->display_running_jobs(1);
$bweb->display_running_job();
} elsif ($action eq 'update_from_pool') {
+ $bweb->can_do('r_media_mgnt');
my $elt = $bweb->get_form(qw/media pool/);
unless ($elt->{media} || $elt->{pool}) {
$bweb->error("Can't get media or pool param");
$bweb->update_media();
} elsif ($action eq 'client_status') {
+ $bweb->can_do('r_client_status');
my $b;
foreach my $client (CGI::param('client')) {
- if ($client =~ m/$client_re/) {
+ if ($client =~ $client_re) {
$client = $1;
$b = new Bconsole(pref => $conf)
unless ($b) ;
} elsif ($action eq 'cancel_job') {
$bweb->cancel_job();
+} elsif ($action eq 'cancel_future_job') {
+ $bweb->cancel_future_job();
+
} elsif ($action eq 'media_zoom') {
$bweb->display_media_zoom();
} elsif ($action eq 'fileset_view') {
$bweb->fileset_view();
+} elsif ($action eq 'next_job2') {
+ $bweb->display_next_job();
+
+} elsif ($action eq 'missing') {
+ $bweb->display_missing_job();
+
+} elsif ($action eq 'overview') {
+ $bweb->can_do('r_view_job');
+ print "<div><table border='0'><tr><td valign='top'>\n";
+ my $fields = $bweb->get_form(qw/level filter age jobtype since type
+ db_client_groups qclient_groups/); # drop this to hide
+ $fields->{hide_status}=1;
+ $fields->{view_time_slice}=1;
+ $fields->{action}='overview';
+ $bweb->display($fields, "display_form_job.tpl");
+
+ print "</td><td valign='top'>";
+ $bweb->display_overview();
+ print "</td></tr></table></div>";
+
+} elsif ($action eq 'overview_zoom') {
+ $bweb->can_do('r_view_job');
+ print "<div><table border='0'><tr><td valign='top'>\n";
+ my $fields = $bweb->get_form(qw/level filter age jobtype since type
+ db_client_groups qclient_groups/); # drop this to hide
+ $fields->{hide_status}=1;
+ $fields->{view_time_slice}=1;
+ $fields->{action}='overview_zoom';
+ $bweb->display($fields, "display_form_job.tpl");
+ print "</td><td valign='top'>";
+ $bweb->display_overview_zoom();
+ print "</td></tr></table></div>";
+
} else {
- $bweb->error("Sorry, this action don't exist");
+ $bweb->error("Sorry, this action doesn't exist");
}
$bweb->display_end();
TODO :
- o Affichage des job en cours, termines
- o Affichage du detail d'un job (status client)
- o Acces aux log d'une sauvegarde
- o Cancel d'un job
- o Lancement d'un job
-
- o Affichage des medias (pool, cf bacweb)
- o Affichage de la liste des cartouches
- o Affichage d'un autochangeur
- o Mise a jour des slots
- o Label barcodes
o Affichage des medias qui ont besoin d'etre change
-
- o Affichage des stats sur les dernieres sauvegardes (cf bacula-web)
- o Affichage des stats sur un type de job
o Affichage des infos de query.sql
- Affichage des du TapeAlert sur le site
- Recuperation des erreurs SCSI de /var/log/kern.log
-
- o update d'un volume
- o update d'un pool
-
- o Configuration des autochanger a la main dans un hash dumper