Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dfranco committed Mar 17, 2018
2 parents cd38775 + b4a7ba7 commit 8d84603
Show file tree
Hide file tree
Showing 15 changed files with 282 additions and 84 deletions.
2 changes: 1 addition & 1 deletion application/config/application.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

$app = [ 'name' => 'Bacula-Web', 'version' => '8.0.0-rc1',
$app = [ 'name' => 'Bacula-Web', 'version' => '8.0.0-rc3',
'routes' => [ 'home' => 'Dashboard',
'test' => 'Test',
'jobs' => 'Jobs',
Expand Down
11 changes: 5 additions & 6 deletions application/libs/fileconfig.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@
class FileConfig extends File
{

// ==================================================================================
// Function: __constructor()
// Parameters: none
// Return: none
// ==================================================================================

/**
* Constructor
*
*/
public function __construct()
{

}

// ==================================================================================
Expand Down
40 changes: 40 additions & 0 deletions application/views/settings.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,46 @@ public function prepare() {
// Get users list
$this->assign('users', $userauth->getUsers());

// Get parameters set in configuration file
if (!FileConfig::open(CONFIG_FILE)) {
throw new Exception("The configuration file is missing");
} else {

// Check if datetime_format is set
if( FileConfig::get_Value('datetime_format') != NULL) {
$this->assign( 'config_datetime_format', FileConfig::get_Value('datetime_format'));
}

// Check if language is set
if( FileConfig::get_Value('language') != NULL) {
$this->assign( 'config_language', FileConfig::get_Value('language'));
}

// Check if jobs_per_page is set
if( FileConfig::get_Value('jobs_per_page') != NULL) {
$this->assign( 'config_jobsperpage', FileConfig::get_Value('jobs_per_page'));
}

// Check if show_inactive_clients is set
if( FileConfig::get_Value('show_inactive_clients') != NULL) {

$config_show_inactive_clients = FileConfig::get_Value('show_inactive_clients');

if($config_show_inactive_clients == true) {
$this->assign( 'config_show_inactive_clients', 'checked');
}
}

// Check if hide_empty_pools is set
if( FileConfig::get_Value('hide_empty_pools') != NULL) {

$config_hide_empty_pools = FileConfig::get_Value('hide_empty_pools');

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

4 changes: 2 additions & 2 deletions application/views/templates/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">Bacula-Web</a>
<a class="navbar-brand" href="index.php">{$app_name}</a>
</div> <!-- div class="navbar-header" -->

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
Expand Down Expand Up @@ -109,7 +109,7 @@
</li>
<li role="presentation" class="divider"></li>
<li role="presentation" class="dropdown-header">{t}Version{/t}</li>
<li class="disabled"><a href="#"><i class="fa fa-info fa-fw"></i> Bacula-Web 8.0.0-rc2</a></li>
<li class="disabled"><a href="#"><i class="fa fa-info fa-fw"></i> {$app_name} {$app_version}</a></li>
</ul>
</li>
</ul>
Expand Down
49 changes: 48 additions & 1 deletion application/views/templates/settings.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,54 @@
<div class="col-xs-8">
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="general"> <h4>General settings</h4> </div>
<div class="tab-pane active" id="general"> <h4>General settings</h4>

<br />

<form class="form-horizontal">

<!-- Date / Time format -->
<div class="form-group">
<label class="col-xs-4 control-label" for="config_datetime_format">Date / Time format</label>
<div class="col-xs-8">
<input type="text" class="form-control" id="config_datetime_format" value="{$config_datetime_format}" readonly>
</div>
</div> <!-- end div class=form-group -->

<!-- Language -->
<div class="form-group">
<label class="col-xs-4 control-label" for="config_language">Language</label>
<div class="col-xs-8">
<input type="text" class="form-control" id="config_language" value="{$config_language}" readonly>
</div>
</div> <!-- end div class=form-group -->
<div class="form-group">

<!-- Jobs / page -->
<label class="col-xs-4 control-label" for="config_jobsperpage">Jobs / page</label>
<div class="col-xs-8">
<input type="text" class="form-control" id="config_jobsperpage" value="{$config_jobsperpage}" readonly>
</div>
</div> <!-- end div class=form-group -->

<!-- Show inactive clients -->
<div class="form-group">
<label class="col-xs-4 control-label" for="config_show_inactive_clients">Show inactive clients</label>
<div class="col-xs-8">
<input type="checkbox" id="config_show_inactive_clients" {$config_show_inactive_clients} disabled>
</div>
</div> <!-- end div class=form-group -->

<!-- Hide empty pools -->
<div class="form-group">
<label class="col-xs-4 control-label" for="config_hide_empty_pools_">Hide empty pools</label>
<div class="col-xs-8">
<input type="checkbox" id="config_hide_empty_pools" {$config_hide_empty_pools} disabled>
</div>
</div> <!-- end div class=form-group -->

</form>
</div>

<!-- Users tab -->
<div class="tab-pane" id="users">
Expand Down
2 changes: 1 addition & 1 deletion core/app/cerrorhandler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static function displayError($exception)

$output .= "<tfoot> \n <tr> \n";
$output .= "<td colspan='2'> \n";
$output .= "Have you tried to run the <a href='test.php'>test page</a> ?<br />";
$output .= "Have you tried to run the <a href='index.php?page=test'>test page</a> ?<br />";
$output .= "Check the online documentation on <a href='http://www.bacula-web.org' target='_blank'>Bacula-Web project site</a> <br />";
$output .= "Rebort a bug or suggest a new feature in the <a href='http://bugs.bacula-web.org' target='_blank'>Bacula-Web's bugtracking tool</a> <br />";
$output .= "</td> \n";
Expand Down
15 changes: 11 additions & 4 deletions core/bweb.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,19 @@ public function init()
$this->view->assign('catalog_current_id', $this->catalog_current_id);
$this->view->assign('catalog_label', FileConfig::get_Value('label', $this->catalog_current_id));

// Bacula catalog selection
if ($this->catalog_nb > 1) {
// Catalogs list

// Bacula catalog selection
if ($this->catalog_nb > 1) {

// Catalogs list
$this->view->assign('catalogs', FileConfig::get_Catalogs());
// Catalogs count
// Catalogs count
$this->view->assign('catalog_nb', $this->catalog_nb);
}

// Set app name and version in view
$this->view->assign('app_name', $this->name);
$this->view->assign('app_version', $this->version);

}
} // end class Bweb
24 changes: 24 additions & 0 deletions docs/Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
=== Release 8.0.0-rc3 (Mar 17 2018)

Changelog

- User and general settings
- Configuration settings are now visible in General settings

- Documentation
- Composer installation have been fixed and updated
- Nginx web server setup have been added

- Development
- Code cleanup and few improvments

Fixed bugs

- 0000242 [bug] Wrong link to test page in Exception page

Documentation

- 0000217 [documentation] Update documentation with Nginx and Apache server configuration
- 0000238 [documentation] Unable to install Bacula-Web using Composer
- 0000240 [documentation] Unable to install via Composer

=== Release 8.0.0-rc2 (Mar 2 2018)

Changelog
Expand Down
19 changes: 7 additions & 12 deletions docs/source/02_install/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,34 @@
Configure Bacula-Web
####################

From Bacula-Web root folder, copy the file config.php.sample as below
This section explain how to create the configuration file which contain your custom settings.

.. note:: Please note that since version 5.1.0, the config file is a PHP script.*
.. note:: Please note that since version 5.1.0, the config file is a PHP script (it was a .conf file before this version).

*************************
Create configuration file
*************************

This section explain how to create the configuration which contain your custom settings.

All Bacula-Web settings are stored in the file below
Bacula-Web settings are stored in the file below

::

application/config/config.php

From Bacula-Web root folder, copy the sample config file and give it the name *config.php*
From Bacula-Web root folder, copy the sample config file and give it the name **config.php**

::

# cd application/config
# cp -v config.php.sample config.php

Now you need to make sure config.php has the correct permissions.
The configuration file needs to be at least readable by the user owning the web server process.

**On Red Hat / Centos / Fedora**

Apache user is **apache**
The configuration file needs to be at least readable by the user owning the web server process.

**On Debian / Ubuntu**
On **Red Hat / Centos / Fedora**, the user running Apache is **apache**

Apache user is **www-data**
On **Debian / Ubuntu**, the user running Apache is **www-data**

So depending on which system you have installed Bacula-Web, run the command below

Expand Down
40 changes: 17 additions & 23 deletions docs/source/02_install/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ Installation overview

Bacula-Web installation consists only in few steps (see below)

+----------------------+---------------------------------------------------------------------------+
| Step | Instructions |
+======================+==================+========================================================+
| Requirements | Ensure your server met all :ref:`install/requirements` |
+----------------------+---------------------------------------------------------------------------+
| Web server setup | :ref:`install/install` and :ref:`install/configwebserver` your web server |
+----------------------+---------------------------------------------------------------------------+
+----------------------+-----------------------------------------------------------------------------------------------------------------+
| Step | Instructions |
+======================+=========================+==================+====================================================================+
| Requirements | Ensure your server met all :ref:`requirements <install/requirements>` |
+----------------------+-----------------------------------------------------------------------------------------------------------------+
| Web server setup | :ref:`Setup <install/install>` and :ref:`configure <install/configwebserver>` Apache web server |
+----------------------+-----------------------------------------------------------------------------------------------------------------+
| (optional) | :ref:`Setup and configure <install/installnginx>` Nginx web server |
+----------------------+-----------------------------------------------------------------------------------------------------------------+

You have two different options to install Bacula-Web

Expand All @@ -34,9 +36,17 @@ You have two different options to install Bacula-Web
+======================+==================+========================================================+
| From archive | Instruction to :ref:`install/installarchive` |
+----------------------+---------------------------------------------------------------------------+
| or |
+----------------------+---------------------------------------------------------------------------+
| Using Composer | Instruction to :ref:`install/installcomposer` |
+----------------------+---------------------------------------------------------------------------+

Ugrade

+----------------------+---------------------------------------------------------------------------+
| Upgrade | Instruction to :ref:`install/upgrade` Bacula-Web |
+----------------------+---------------------------------------------------------------------------+

Final steps

+----------------------+---------------------------------------------------------------------------+
Expand All @@ -46,19 +56,3 @@ Final steps
+----------------------+---------------------------------------------------------------------------+
| Finalize your setup | :ref:`install/finalize` |
+----------------------+---------------------------------------------------------------------------+

Installation / upgrade instructions
-----------------------------------

.. toctree::
:maxdepth: 2

requirements
install
configwebserver
installarchive
installcomposer
configure
test
upgrade
finalize

0 comments on commit 8d84603

Please sign in to comment.