Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dfranco committed Jan 6, 2019
2 parents c37506f + 0168d88 commit e7ca83d
Show file tree
Hide file tree
Showing 59 changed files with 453 additions and 261 deletions.
2 changes: 2 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Options +FollowSymLinks

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^bwc|console.php(.*) - [R=404,L]
Expand Down
60 changes: 28 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,50 @@
## Bacula-Web

[![Documentation Status](https://readthedocs.org/projects/bacula-web/badge/?version=latest)](http://docs.bacula-web.org/en/master/?badge=latest)
[![Maintainability](https://api.codeclimate.com/v1/badges/db37b493624cee584d85/maintainability)](https://codeclimate.com/github/bacula-web/bacula-web/maintainability)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/bacula-web/bacula-web/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/bacula-web/bacula-web/?branch=develop)

## About

Bacula-Web is a web based tool written in PHP that provide you a summarized view of your Bacula backup infrastructure.
Bacula-Web is a web based tool written in PHP that provide you a summarized view of your [Bacula](https://www.bacula.org) backup infrastructure.
It obtain his information from the Bacula catalog database.

This is my little contribution to Bacula Open Source Backup Software project (http://www.bacula.org).
This is my little contribution to [Bacula Community](http://www.bacula.org) project.

### Features

## Website
Official website
http://www.bacula-web.org
Bacula-Web main features

Bacula wiki
http://wiki.bacula.org/doku.php?id=3rd_party_addons
* **easy to setup**
* **Install once** and monitor as much Bacula directors you need
* **Dasboard**: keep an eye on all Bacula resources like backup jobs result, pools, volumes, etc. in one shot
* **Translations**: use Bacula-Web in your language (more than 15 languages available)
* **Jobs report**: monitor backup jobs from a single page (filter and options available)
* **Directors report**: high-level report pages for all configured directors
* **Pools and volumes**: keep an eye on all your Bacula pools and volumes

Bacula website
http://www.bacula.org
### Documentation

## Documentation
Visit [Bacula-Web documentation](http://docs.bacula-web.org) for more informations about installation, configuration, upgrade, etc.

If you are looking for informations on installing, configuring, upgrading, troubleshooting, etc. Bacula-Web, the link below would be helpful
http://docs.bacula-web.org
### Installation

## Support
Bacula-Web can be installed using tarball or Composer, check [Installation page](http://docs.bacula-web.org/en/latest/02_install/index.html) for more details

Submit your bug / feature request to the official bug tracker
http://bugs.bacula-web.org
### Support

## Contribute
Submit a bug report or feature request to the [bug tracker](https://bugs.bacula-web.org)

### Contribute

#### Translations
You will find useful informations on how to help translating Bacula-Web in your own language
http://docs.bacula-web.org/en/master/03_contribute/translations.html

#### Developpment
If you want to contribute in adding new features or fixing bugs, please read the developper guidance
http://docs.bacula-web.org/en/master/03_contribute/development.html
If you want to help translating Bacula-Web in your language, please check the **[Contribute to translation](http://docs.bacula-web.org/en/latest/04_contribute/translations.html)** page

## License
#### Developpment

Bacula-Web is proudly powered by open source softwares and is free (like a bird) to download and use (and will always be) ...
Both source code and documentations are released under the <b>GNU GPLv2</b> license.
For more details, please read the file <b>LICENSE</b> included in the archive or directly on the GNU project website ([www.gnu.org: GNU GPL v2](http://www.gnu.org/licenses/gpl-2.0.html))
You can contribute by submitting a GitHub pull request, please have a look the [contribution guide](http://docs.bacula-web.org/en/latest/04_contribute/development.html) first.

## Authors
### License

Original author
> Juan Luis Frances (bacula_list AT veloxia dot com)
Bacula-Web source code, web site and documentation are licensed under **BNU GPLv2**

Official current maintainer
> Davide Franco (bacula-dev AT dflc dot ch)
For more details, see [LICENSE](https://github.com/bacula-web/bacula-web/blob/master/LICENSE)
7 changes: 6 additions & 1 deletion application/config/application.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?php

$app = [ 'name' => 'Bacula-Web', 'version' => '8.1.0',
/*
* This config file contains Bacula-Web application settings
* Do not modify it unless you know what you're doing.
*/

$app = [ 'name' => 'Bacula-Web', 'version' => '8.2.0',
'routes' => [ 'home' => 'Dashboard',
'test' => 'Test',
'jobs' => 'Jobs',
Expand Down
17 changes: 11 additions & 6 deletions application/config/config.php.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@ $config['show_inactive_clients'] = true;
// Hide empty pools (displayed by default)
$config['hide_empty_pools'] = false;

// Translations
$config['language'] = 'en_US';

// Custom datetime format (by default: Y-m-d H:i:s)
// Examples
// $config['datetime_format'] = 'd/m/Y H:i:s';
// $config['datetime_format'] = 'm-d-Y H:i:s';

// Security
$config['enable_users_auth'] = true;

// Debug mode
$config['debug'] = false;

// Translations
$config['language'] = 'en_US';

// en_US -> English
// be_BY -> Belarusian
// ca_ES -> Catalan
Expand All @@ -35,7 +41,7 @@ $config['language'] = 'en_US';

// For Unix socket connection, use parameters decribed below
// MySQL: use localhost for $config[0]['host']
// postGresql: do not define $config[0]['host']
// postgreSQL: do not define $config[0]['host']

// MySQL bacula catalog
// $config[0]['label'] = 'Backup Server';
Expand All @@ -46,7 +52,7 @@ $config['language'] = 'en_US';
// $config[0]['db_type'] = 'mysql';
// $config[0]['db_port'] = '3306';

// PostgreSQL bacula catalog
// postgreSQL bacula catalog
// $config[0]['label'] = 'Prod Server';
// $config[0]['host'] = 'db-server.domain.com';
// $config[0]['login'] = 'bacula';
Expand All @@ -70,4 +76,3 @@ $config['language'] = 'en_US';
// $config[1]['db_name'] = 'bacula';
// $config[1]['db_type'] = 'mysql';
// $config[1]['db_port'] = '3306';
?>
2 changes: 1 addition & 1 deletion application/libs/fileconfig.class.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down
2 changes: 1 addition & 1 deletion application/models/clients.model.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down
3 changes: 1 addition & 2 deletions application/models/database.model.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down Expand Up @@ -51,7 +51,6 @@ public function get_Size($catalog_id)
$result = $this->run_query( $statment);
$db_size = $result->fetch();
return CUtils::Get_Human_Size($db_size['dbsize']);
break;
case 'sqlite':
$db_size = filesize(FileConfig::get_Value('db_name', $catalog_id));
return CUtils::Get_Human_Size($db_size);
Expand Down
2 changes: 1 addition & 1 deletion application/models/filesets.model.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down
2 changes: 1 addition & 1 deletion application/models/jobs.model.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down
2 changes: 1 addition & 1 deletion application/models/pools.model.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down
4 changes: 2 additions & 2 deletions application/models/volumes.model.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down Expand Up @@ -68,7 +68,7 @@ public function getVolumes( $pool_id = null, $orderby = 'Name', $orderasc = 'DES
$where = 'WHERE Media.PoolId = :pool_id';
}

if( $inchanger == true ) {
if( $inchanger === TRUE ) {
$this->addParameter( 'inchanger', 1);
if( !empty($where)) {
$where .= ' AND ';
Expand Down
6 changes: 1 addition & 5 deletions application/views/backupjob.view.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down Expand Up @@ -30,13 +30,9 @@ public function prepare() {

require_once('core/const.inc.php');

$backupjob_name = "";
$backupjob_bytes = 0;
$backupjob_files = 0;
$interval = array();
$interval[1] = NOW;

$days = array();
$days_stored_bytes = array();
$days_stored_files = array();

Expand Down
5 changes: 1 addition & 4 deletions application/views/client.view.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down Expand Up @@ -30,10 +30,7 @@ public function prepare() {

require_once('core/const.inc.php');

$clientid = '';
$period = 7;
$client = '';
$client_jobs = array();
$backup_jobs = array();
$days_stored_bytes = array();
$days_stored_files = array();
Expand Down
4 changes: 1 addition & 3 deletions application/views/dashboard.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004 Juan Luis Frances Jimenez |
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down Expand Up @@ -30,8 +30,6 @@ public function __construct() {
public function prepare() {

$jobs = new Jobs_Model();
$catalog = new Database_Model();
$clients = new Clients_Model();
$filesets = new FileSets_Model();
$pools = new Pools_Model();
$volumes = new Volumes_Model();
Expand Down
2 changes: 1 addition & 1 deletion application/views/directors.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004 Juan Luis Frances Jimenez |
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down
2 changes: 1 addition & 1 deletion application/views/joblogs.view.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down
3 changes: 1 addition & 2 deletions application/views/jobs.view.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down Expand Up @@ -102,7 +102,6 @@ public function prepare() {
);

// Jobs type filter
$job_type_filter = '0';
$job_types_list = $jobs->getUsedJobTypes($job_types);
$job_types_list['0'] = 'Any';
$this->assign('job_types_list', $job_types_list);
Expand Down
2 changes: 1 addition & 1 deletion application/views/login.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down
2 changes: 1 addition & 1 deletion application/views/pools.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down
14 changes: 13 additions & 1 deletion application/views/settings.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
+-------------------------------------------------------------------------+
| Copyright 2010-2018, Davide Franco |
| Copyright 2010-2019, Davide Franco |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
Expand Down Expand Up @@ -78,6 +78,18 @@ public function prepare() {
$this->assign( 'config_hide_empty_pools', 'checked');
}
}

// Parameter <enable_users_auth> is enabled by default (in case is not specified in config file)
$config_enable_users_auth = true;

// If enable_users_auth is defined in config file, take the value
if( FileConfig::get_Value('enable_users_auth') !== NULL && is_bool(FileConfig::get_Value('enable_users_auth')) ) {
$config_enable_users_auth = FileConfig::get_Value('enable_users_auth');
}

if($config_enable_users_auth == true){
$this->assign( 'config_enable_users_auth', 'checked');
}
}
}
} // end of class
Expand Down

0 comments on commit e7ca83d

Please sign in to comment.