This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from fbergkemper/master
Feature Update and Changes - Installation and Configuration Test - Application entry point changed to dashboard
- Loading branch information
Showing
13 changed files
with
884 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
module/Application/src/Application/View/Helper/StatusGlyphicons.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
/** | ||
* | ||
* bareos-webui - Bareos Web-Frontend | ||
* | ||
* @link https://github.com/bareos/bareos-webui for the canonical source repository | ||
* @copyright Copyright (c) 2013-2014 dass-IT GmbH (http://www.dass-it.de/) | ||
* @license GNU Affero General Public License (http://www.gnu.org/licenses/) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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 Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
namespace Application\View\Helper; | ||
|
||
use Zend\View\Helper\AbstractHelper; | ||
|
||
class StatusGlyphicons extends AbstractHelper | ||
{ | ||
public function __invoke($status) | ||
{ | ||
|
||
switch($status) | ||
{ | ||
case '0': | ||
$output = '<div class="text-success"><span class="glyphicon glyphicon-ok"></span></div>'; | ||
break; | ||
case '-1': | ||
$output = '<div class="text-danger"><span class="glyphicon glyphicon-remove"></span></div>'; | ||
break; | ||
default: | ||
$output = $status; | ||
break; | ||
} | ||
|
||
return $output; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?php | ||
|
||
/** | ||
* | ||
* bareos-webui - Bareos Web-Frontend | ||
* | ||
* @link https://github.com/bareos/bareos-webui for the canonical source repository | ||
* @copyright Copyright (c) 2013-2014 dass-IT GmbH (http://www.dass-it.de/) | ||
* @license GNU Affero General Public License (http://www.gnu.org/licenses/) | ||
* @author Frank Bergkemper | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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 Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
echo $this->doctype(); | ||
|
||
?> | ||
|
||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<?php echo $this->headTitle('Bareos')->setSeparator(' - ')->setAutoEscape(false) ?> | ||
|
||
<?php echo $this->headMeta() | ||
->appendName('viewport', 'width=device-width, initial-scale=1.0') | ||
->appendHttpEquiv('X-UA-Compatible', 'IE=edge') | ||
?> | ||
|
||
<!-- Styles --> | ||
<?php echo $this->headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/img/favicon.ico')) | ||
->prependStylesheet($this->basePath() . '/css/style.css') | ||
->prependStylesheet($this->basePath() . '/css/bootstrap-theme.min.css') | ||
->prependStylesheet($this->basePath() . '/css/bootstrap.min.css') | ||
->prependStylesheet($this->basePath() . '/css/jquery.jqplot.min.css') | ||
?> | ||
|
||
<!-- Scripts --> | ||
<?php echo $this->headScript() | ||
->prependFile($this->basePath() . '/js/bootstrap.min.js') | ||
->prependFile($this->basePath() . '/js/excanvas.min.js') | ||
->prependFile($this->basePath() . '/js/jqplot.pieRenderer.min.js') | ||
->prependFile($this->basePath() . '/js/jqplot.barRenderer.min.js') | ||
->prependFile($this->basePath() . '/js/jqplot.categoryAxisRenderer.min.js') | ||
->prependFile($this->basePath() . '/js/jqplot.pointLabels.min.js') | ||
->prependFile($this->basePath() . '/js/jquery.jqplot.min.js') | ||
->prependFile($this->basePath() . '/js/jquery.min.js') | ||
->prependFile($this->basePath() . '/js/respond.min.js', 'text/javascript', array('conditional' => 'lt IE 9',)) | ||
->prependFile($this->basePath() . '/js/html5shiv.js', 'text/javascript', array('conditional' => 'lt IE 9',)); | ||
?> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<div class="container"> | ||
|
||
<?php echo $this->content; ?> | ||
|
||
<hr /> | ||
|
||
<footer> | ||
<p class="text-muted">© 2013 - <?php echo date('Y') ?> <a href="http://www.bareos.com/" target="_blank">Bareos GmbH & Co. KG</a>, GNU Affero General Public License Version 3</p> | ||
</footer> | ||
|
||
</div> | ||
|
||
<?php echo $this->inlineScript() ?> | ||
|
||
</body> | ||
|
||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
namespace Install; | ||
|
||
use Install\Model\Install; | ||
use Install\Model\InstallTable; | ||
use Zend\Db\ResultSet\ResultSet; | ||
use Zend\Db\TableGateway\TableGateway; | ||
|
||
class Module | ||
{ | ||
|
||
public function getAutoloaderConfig() | ||
{ | ||
return array( | ||
'Zend\Loader\ClassMapAutoloader' => array( | ||
__DIR__ . '/autoload_classmap.php', | ||
), | ||
'Zend\Loader\StandardAutoloader' => array( | ||
'namespaces' => array( | ||
__NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, | ||
), | ||
), | ||
); | ||
} | ||
|
||
public function getConfig() | ||
{ | ||
return include __DIR__ . '/config/module.config.php'; | ||
} | ||
|
||
public function getServiceConfig() | ||
{ | ||
return array( | ||
'factories' => array( | ||
'Install\Model\InstallTable' => function($sm) | ||
{ | ||
$tableGateway = $sm->get('InstallTableGateway'); | ||
$table = new InstallTable($tableGateway); | ||
return $table; | ||
}, | ||
'InstallTableGateway' => function($sm) | ||
{ | ||
$dbAdapter = $sm->get('Zend\Db\Adapter\Adapter'); | ||
$resultSetPrototype = new ResultSet(); | ||
$resultSetPrototype->setArrayObjectPrototype(new Install()); | ||
return new TableGateway('install', $dbAdapter, null, $resultSetPrototype); | ||
}, | ||
), | ||
); | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
|
||
return array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
/** | ||
* | ||
* bareos-webui - Bareos Web-Frontend | ||
* | ||
* @link https://github.com/bareos/bareos-webui for the canonical source repository | ||
* @copyright Copyright (c) 2013-2014 dass-IT GmbH (http://www.dass-it.de/) | ||
* @license GNU Affero General Public License (http://www.gnu.org/licenses/) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* 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 Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
return array( | ||
|
||
'controllers' => array( | ||
'invokables' => array( | ||
'Install\Controller\Install' => 'Install\Controller\InstallController', | ||
), | ||
), | ||
|
||
'router' => array( | ||
'routes' => array( | ||
'install' => array( | ||
'type' => 'segment', | ||
'options' => array( | ||
'route' => '/install[/][:action][/:id]', | ||
'constraints' => array( | ||
'action' => '[a-zA-Z][a-zA-Z0-9_-]*', | ||
'id' => '[0-9]+', | ||
), | ||
'defaults' => array( | ||
'controller' => 'Install\Controller\Install', | ||
'action' => 'index', | ||
), | ||
), | ||
), | ||
), | ||
), | ||
|
||
'view_manager' => array( | ||
'template_path_stack' => array( | ||
'install' => __DIR__ . '/../view', | ||
), | ||
), | ||
|
||
); |
Oops, something went wrong.