From 8f2e4596e18f459f67c262215396c644d36da742 Mon Sep 17 00:00:00 2001 From: Frank Bergkemper Date: Mon, 7 Sep 2015 16:35:32 +0200 Subject: [PATCH] Cleanup and some changes --- config/application.config.php | 2 - config/autoload/global.php | 90 ---- module/Application/config/module.config.php | 28 -- .../Client/view/client/client/details.phtml | 74 +-- module/Client/view/client/client/index.phtml | 23 +- .../view/fileset/fileset/details.phtml | 15 + .../Fileset/view/fileset/fileset/index.phtml | 21 +- .../Install/view/install/install/index.phtml | 4 +- .../Job/src/Job/Controller/JobController.php | 24 +- module/Job/src/Job/Model/Job.php | 61 +-- module/Job/src/Job/Model/JobTable.php | 470 +----------------- module/Job/view/job/job/cancel.phtml | 7 +- module/Job/view/job/job/details.phtml | 4 +- module/Job/view/job/job/queue.phtml | 5 +- module/Job/view/job/job/rerun.phtml | 7 +- module/Job/view/job/job/run.phtml | 2 +- module/Job/view/job/job/waiting.phtml | 14 +- module/Media/view/media/media/details.phtml | 104 ++-- module/Media/view/media/media/index.phtml | 2 +- module/Pool/view/pool/pool/details.phtml | 12 +- module/Pool/view/pool/pool/index.phtml | 2 +- .../Restore/view/restore/restore/index.phtml | 3 - module/Statistics/Module.php | 55 -- module/Statistics/autoload_classmap.php | 4 - module/Statistics/config/module.config.php | 59 --- .../Controller/StatisticsController.php | 67 --- .../src/Statistics/Model/Statistics.php | 33 -- .../src/Statistics/Model/StatisticsTable.php | 51 -- .../view/statistics/statistics/index.phtml | 133 ----- .../Storage/view/storage/storage/index.phtml | 2 +- phpunit.xml | 5 - .../Controller/IndexControllerTest.php | 52 -- .../Controller/IndexControllerTest.php | 52 -- .../Controller/IndexControllerTest.php | 52 -- 34 files changed, 165 insertions(+), 1374 deletions(-) delete mode 100644 module/Statistics/Module.php delete mode 100644 module/Statistics/autoload_classmap.php delete mode 100644 module/Statistics/config/module.config.php delete mode 100644 module/Statistics/src/Statistics/Controller/StatisticsController.php delete mode 100644 module/Statistics/src/Statistics/Model/Statistics.php delete mode 100644 module/Statistics/src/Statistics/Model/StatisticsTable.php delete mode 100644 module/Statistics/view/statistics/statistics/index.phtml delete mode 100644 tests/AdminTest/Controller/IndexControllerTest.php delete mode 100644 tests/Statistics/Controller/IndexControllerTest.php delete mode 100644 tests/UserTest/Controller/IndexControllerTest.php diff --git a/config/application.config.php b/config/application.config.php index e9771566..acb98ecc 100644 --- a/config/application.config.php +++ b/config/application.config.php @@ -36,9 +36,7 @@ 'Storage', 'Client', 'Job', - 'Log', 'Restore', - 'Statistics', 'Install', 'Auth', ); diff --git a/config/autoload/global.php b/config/autoload/global.php index 11a1cf22..e7ec48d3 100644 --- a/config/autoload/global.php +++ b/config/autoload/global.php @@ -47,95 +47,6 @@ $config = parse_ini_file($file, true, INI_SCANNER_NORMAL); } -function read_db_config($config, $file) -{ - - $arr = array(); - - foreach($config as $instance) { - - if(array_key_exists('enabled', $instance) && isset($instance['enabled']) && strtolower($instance['enabled']) == "yes") { - - if(array_key_exists('dbaddress', $instance) && isset($instance['dbaddress'])) { - $arr['adapters'][key($config)] = array(); - } - else { - if(array_key_exists('diraddress', $instance) && isset($instance['diraddress'])) { - $arr['adapters'][key($config)] = array(); - $instance['dbaddress'] = $instance['diraddress']; - } - else { - echo "Error: Missing parameters 'dbaddress' and 'diraddress' in ".$file.", section ".key($config)."."; - exit(); - } - } - - if(array_key_exists('dbdriver', $instance) && isset($instance['dbdriver'])) { - if(strtolower($instance['dbdriver']) == "postgresql") { - $arr['adapters'][key($config)]['driver'] = "Pdo_Pgsql"; - } - elseif(strtolower($instance['dbdriver']) == "mysql") { - $arr['adapters'][key($config)]['driver'] = "Pdo_Mysql"; - } - else { - echo "Error: Mispelled value for parameter 'dbdriver' in ".$file.", section ".key($config)."."; - exit(); - } - } - else { - $arr['adapters'][key($config)]['driver'] = "Pdo_Pgsql"; - } - - if(array_key_exists('dbname', $instance) && isset($instance['dbname'])) { - $arr['adapters'][key($config)]['dbname'] = $instance['dbname']; - } - else { - $arr['adapters'][key($config)]['dbname'] = "bareos"; - } - - if(array_key_exists('dbaddress', $instance) && isset($instance['dbaddress'])) { - $arr['adapters'][key($config)]['host'] = $instance['dbaddress']; - } - else { - $arr['adapters'][key($config)]['host'] = "127.0.0.1"; - } - - if(array_key_exists('dbport', $instance) && isset($instance['dbport'])) { - $arr['adapters'][key($config)]['port'] = $instance['dbport']; - } - else { - if($arr['adapters'][$instance['dbaddress']]['driver'] == "Pdo_Pgsql") { - $arr['adapters'][key($config)]['port'] = 5432; - } - else { - $arr['adapters'][key($config)]['port'] = 3306; - } - } - - if(array_key_exists('dbuser', $instance) && isset($instance['dbuser'])) { - $arr['adapters'][key($config)]['username'] = $instance['dbuser']; - } - else { - $arr['adapters'][key($config)]['username'] = "bareos"; - } - - if(array_key_exists('dbpassword', $instance) && isset($instance['dbpassword'])) { - $arr['adapters'][key($config)]['password'] = $instance['dbpassword']; - } - else { - $arr['adapters'][key($config)]['password'] = ""; - } - - } - - next($config); - - } - - return $arr; - -} - function read_dir_config($config, $file) { @@ -234,7 +145,6 @@ function read_dir_config($config, $file) } return array( - 'db' => read_db_config($config, $file), 'directors' => read_dir_config($config, $file), 'service_manager' => array( 'factories' => array( diff --git a/module/Application/config/module.config.php b/module/Application/config/module.config.php index 6f73a7c1..b4700ce6 100644 --- a/module/Application/config/module.config.php +++ b/module/Application/config/module.config.php @@ -129,12 +129,6 @@ ), 'navigation' => array( 'default' => array( - /* - array( - 'label' => 'Home', - 'route' => 'home', - ), - */ array( 'label' => 'Dashboard', 'route' => 'dashboard', @@ -168,32 +162,10 @@ 'route' => 'job', ), /* - array( - 'label' => 'Files', - 'route' => 'file', - ), - array( - 'label' => 'Logs', - 'route' => 'log', - ), array( 'label' => 'Restore', 'route' => 'restore', ), - array( - 'label' => 'Statistics', - 'route' => 'statistics', - ), - /* - array( - 'label' => 'Administration', - 'route' => 'admin', - ), - array( - 'label' => 'Logout', - 'route' => 'auth', - 'action' => 'logout', - ), */ ), ), diff --git a/module/Client/view/client/client/details.phtml b/module/Client/view/client/client/details.phtml index 017c62c2..7ae5fbea 100644 --- a/module/Client/view/client/client/details.phtml +++ b/module/Client/view/client/client/details.phtml @@ -8,7 +8,7 @@ $this->headTitle($title);
-
+
@@ -17,56 +17,56 @@ $this->headTitle($title);
- +
- - - - - - - -
ClientescapeHtml($this->client['clientid']); ?>
NameescapeHtml($this->client['name']); ?>
VersionescapeHtml($this->client['uname']); ?>
AutopruneescapeHtml($this->client['autoprune']); ?>
FileretentionprintRetention($this->client['fileretention']) . " days"; ?>
JobretentionprintRetention($this->client['jobretention']) . " days"; ?>
- -
- -
-
+ +Client +Name +Version +Autoprune +Fileretention +Jobretention + + -
+ +escapeHtml($this->client['clientid']); ?> +escapeHtml($this->client['name']); ?> +escapeHtml($this->client['uname']); ?> +escapeHtml($this->client['autoprune']); ?> +printRetention($this->client['fileretention']) . " days"; ?> +printRetention($this->client['jobretention']) . " days"; ?> + + + + -
-
-

Actions

-
+ -
-
-
+
-

Last backups

+

Last 10 successful backups

- +
@@ -102,3 +102,9 @@ $this->headTitle($title); + + diff --git a/module/Client/view/client/client/index.phtml b/module/Client/view/client/client/index.phtml index 2ae4331f..f9539483 100644 --- a/module/Client/view/client/client/index.phtml +++ b/module/Client/view/client/client/index.phtml @@ -31,6 +31,13 @@ $this->headTitle($title);
+
+ +
+

Clients

+
+ +

Clients per page: @@ -43,13 +50,13 @@ Clients per page:

translate("Job"); ?>
- - - - - - - + + + + + + + paginator as $client) : ?> @@ -89,6 +96,8 @@ echo $this->paginationControl( ?> + + diff --git a/module/Fileset/view/fileset/fileset/details.phtml b/module/Fileset/view/fileset/fileset/details.phtml index afd1c984..f28743ed 100644 --- a/module/Fileset/view/fileset/fileset/details.phtml +++ b/module/Fileset/view/fileset/fileset/details.phtml @@ -28,6 +28,17 @@ $this->headTitle($title); ?> +
+ +
+
+ +
+

Fileset

+
+ +
+
 
@@ -36,3 +47,7 @@ $this->headTitle($title);
 
+
+
+
+
diff --git a/module/Fileset/view/fileset/fileset/index.phtml b/module/Fileset/view/fileset/fileset/index.phtml index 89c085c7..d5eef5ab 100644 --- a/module/Fileset/view/fileset/fileset/index.phtml +++ b/module/Fileset/view/fileset/fileset/index.phtml @@ -28,6 +28,17 @@ $this->headTitle($title); ?> +
+ +
+
+ +
+

Filesets

+
+ +
+

Filesets per page: 10 | @@ -36,11 +47,11 @@ Filesets per page: 100

-
ClientNameVersionAutopruneFileretentionJobretentionClientNameVersionAutopruneFileretentionJobretention
+
- - + + paginator as $fileset) : ?> @@ -67,3 +78,7 @@ echo $this->paginationControl( ?> + + + + diff --git a/module/Install/view/install/install/index.phtml b/module/Install/view/install/install/index.phtml index c4123141..79e198d6 100644 --- a/module/Install/view/install/install/index.phtml +++ b/module/Install/view/install/install/index.phtml @@ -3,9 +3,9 @@ /** * * bareos-webui - Bareos Web-Frontend - * + * * @link https://github.com/bareos/bareos-webui for the canonical source repository - * @copyright Copyright (c) 2013-2014 Bareos GmbH & Co. KG (http://www.bareos.org/) + * @copyright Copyright (c) 2013-2015 Bareos GmbH & Co. KG (http://www.bareos.org/) * @license GNU Affero General Public License (http://www.gnu.org/licenses/) * @author Frank Bergkemper * diff --git a/module/Job/src/Job/Controller/JobController.php b/module/Job/src/Job/Controller/JobController.php index e677ac8b..25388f04 100644 --- a/module/Job/src/Job/Controller/JobController.php +++ b/module/Job/src/Job/Controller/JobController.php @@ -295,8 +295,9 @@ public function queueAction() private function getJobs() { $director = $this->getServiceLocator()->get('director'); - $result = $director->send_command('llist jobs', 2, null); + $result = $director->send_command('llist jobs', 2, null); $jobs = \Zend\Json\Json::decode($result, \Zend\Json\Json::TYPE_ARRAY); + array_multisort($jobs['result']['jobs'], SORT_DESC); return $jobs['result']['jobs']; } @@ -304,16 +305,17 @@ private function getJobsByStatus($status=null, $days=null, $hours=null) { if($status != null) { $director = $this->getServiceLocator()->get('director'); - if($days != null) { - $result = $director->send_command('llist jobs jobstatus="'.$status.'" days="'.$days.'"', 2, null); + if($days != null && $hours == null) { + $result = $director->send_command('llist jobs jobstatus='.$status.' days='.$days, 2, null); } - elseif($hours != null) { - $result = $director->send_command('llist jobs jobstatus="'.$status.'" hours="'.$hours.'"', 2, null); + elseif($hours != null && $days == null) { + $result = $director->send_command('llist jobs jobstatus='.$status.' hours='.$hours, 2, null); } else { - $result = $director->send_command('llist jobs jobstatus="'.$status.'"', 2, null); + $result = $director->send_command('llist jobs jobstatus='.$status, 2, null); } $jobs = \Zend\Json\Json::decode($result, \Zend\Json\Json::TYPE_ARRAY); + array_multisort($jobs['result']['jobs'], SORT_DESC); return $jobs['result']['jobs']; } else { @@ -355,15 +357,5 @@ private function queueJob($jobname=null) return $result; } - public function getJobTable() - { - if(!$this->jobTable) - { - $sm = $this->getServiceLocator(); - $this->jobTable = $sm->get('Job\Model\JobTable'); - } - return $this->jobTable; - } - } diff --git a/module/Job/src/Job/Model/Job.php b/module/Job/src/Job/Model/Job.php index 11704546..cb505118 100644 --- a/module/Job/src/Job/Model/Job.php +++ b/module/Job/src/Job/Model/Job.php @@ -5,7 +5,7 @@ * bareos-webui - Bareos Web-Frontend * * @link https://github.com/bareos/bareos-webui for the canonical source repository - * @copyright Copyright (c) 2013-2014 Bareos GmbH & Co. KG (http://www.bareos.org/) + * @copyright Copyright (c) 2013-2015 Bareos GmbH & Co. KG (http://www.bareos.org/) * @license GNU Affero General Public License (http://www.gnu.org/licenses/) * * This program is free software: you can redistribute it and/or modify @@ -27,64 +27,5 @@ class Job { - - public $jobid; - public $job; - public $jobname; - public $type; - public $level; - public $clientid; - public $jobstatus; - public $schedtime; - public $starttime; - public $endtime; - public $realendtime; - public $jobtdate; - public $volsessionid; - public $volsessiontime; - public $jobfiles; - public $jobbytes; - public $readbytes; - public $joberrors; - public $jobmissingfiles; - public $poolid; - public $filesetid; - public $priorjobid; - public $purgedfiles; - public $hasbase; - public $hascache; - public $reviewed; - public $comment; - public $clientname; - public $duration; - - public function exchangeArray($data) - { - $data = array_change_key_case($data, CASE_LOWER); - - $this->jobid = (!empty($data['jobid'])) ? $data['jobid'] : null; - $this->job = (!empty($data['job'])) ? $data['job'] : null; - $this->jobname = (!empty($data['name'])) ? $data['name'] : null; - $this->type = (!empty($data['type'])) ? $data['type'] : null; - $this->level = (!empty($data['level'])) ? $data['level'] : null; - $this->clientid = (!empty($data['clientid'])) ? $data['clientid'] : null; - $this->jobstatus = (!empty($data['jobstatus'])) ? $data['jobstatus'] : null; - $this->schedtime = (!empty($data['schedtime'])) ? $data['schedtime'] : null; - $this->starttime = (!empty($data['starttime'])) ? $data['starttime'] : null; - $this->endtime = (!empty($data['endtime'])) ? $data['endtime'] : null; - $this->realendtime = (!empty($data['realendtime'])) ? $data['realendtime'] : null; - $this->jobdate = (!empty($data['jobdate'])) ? $data['jobdate'] : null; - $this->volsessionid = (!empty($data['volsessionid'])) ? $data['volsessionid'] : null; - $this->volsessiontime = (!empty($data['volsessiontime'])) ? $data['volsessiontime'] : null; - $this->jobfiles = (!empty($data['jobfiles'])) ? $data['jobfiles'] : null; - $this->jobbytes = (!empty($data['jobbytes'])) ? $data['jobbytes'] : null; - $this->readbytes = (!empty($data['readbytes'])) ? $data['readbytes'] : null; - $this->joberrors = (!empty($data['joberrors'])) ? $data['joberrors'] : null; - $this->poolid = (!empty($data['poolid'])) ? $data['poolid'] : null; - $this->filesetid = (!empty($data['filesetid'])) ? $data['filesetid'] : null; - $this->clientname = (!empty($data['clientname'])) ? $data['clientname'] : null; - $this->duration = (!empty($data['duration'])) ? $data['duration'] : null; - } - } diff --git a/module/Job/src/Job/Model/JobTable.php b/module/Job/src/Job/Model/JobTable.php index dddb656f..1ebacec0 100644 --- a/module/Job/src/Job/Model/JobTable.php +++ b/module/Job/src/Job/Model/JobTable.php @@ -25,474 +25,6 @@ namespace Job\Model; -use Zend\Db\ResultSet\ResultSet; -use Zend\Db\TableGateway\TableGateway; -use Zend\Db\Sql\Select; -use Zend\Db\Sql\Expression; -use Zend\Paginator\Adapter\DbSelect; -use Zend\Paginator\Paginator; -use Zend\ServiceManager\ServiceLocatorAwareInterface; -use Zend\ServiceManager\ServiceLocatorInterface; -use Bareos\Db\Sql\BareosSqlCompatHelper; - -class JobTable implements ServiceLocatorAwareInterface +class JobTable { - protected $tableGateway; - protected $serviceLocator; - - public function __construct(TableGateway $tableGateway) - { - $this->tableGateway = $tableGateway; - } - - public function setServiceLocator(ServiceLocatorInterface $serviceLocator) { - $this->serviceLocator = $serviceLocator; - } - - public function getServiceLocator() { - return $this->serviceLocator; - } - - public function getDbDriverConfig() { - $config = $this->getServiceLocator()->get('Config'); - return $config['db']['adapters'][$_SESSION['bareos']['director']]['driver']; - } - - public function fetchAll($paginated=false, $order_by=null, $order=null) - { - if($this->getDbDriverConfig() == "Pdo_Mysql" || $this->getDbDriverConfig() == "Mysqli") { - $duration = new Expression("TIMEDIFF(EndTime, StartTime)"); - } - elseif($this->getDbDriverConfig() == "Pdo_Pgsql" || $this->getDbDriverConfig() == "Pgsql") { - //$duration = new Expression("DATE_PART('hour', endtime::timestamp - starttime::timestamp)"); - $duration = new Expression("endtime::timestamp - starttime::timestamp"); - } - - $bsqlch = new BareosSqlCompatHelper($this->getDbDriverConfig()); - $select = new Select(); - $select->from($bsqlch->strdbcompat("Job")); - $select->columns(array( - $bsqlch->strdbcompat("JobId"), - $bsqlch->strdbcompat("Name"), - $bsqlch->strdbcompat("Type"), - $bsqlch->strdbcompat("Level"), - $bsqlch->strdbcompat("StartTime"), - $bsqlch->strdbcompat("EndTime"), - $bsqlch->strdbcompat("JobStatus"), - $bsqlch->strdbcompat("ClientId"), - 'duration' => $duration, - ) - ); - $select->join( - $bsqlch->strdbcompat("Client"), - $bsqlch->strdbcompat("Job.ClientId = Client.ClientId"), - array($bsqlch->strdbcompat("ClientName") => $bsqlch->strdbcompat("Name")) - ); - - if($order_by != null && $order != null) { - $select->order($bsqlch->strdbcompat($order_by) . " " . $order); - } - else { - $select->order($bsqlch->strdbcompat("JobId") . " DESC"); - } - - if($paginated) { - $resultSetPrototype = new ResultSet(); - $resultSetPrototype->setArrayObjectPrototype(new Job()); - $paginatorAdapter = new DbSelect( - $select, - $this->tableGateway->getAdapter(), - $resultSetPrototype - ); - $paginator = new Paginator($paginatorAdapter); - return $paginator; - } - else { - $resultSet = $this->tableGateway->selectWith($select); - return $resultSet; - } - } - - public function getJob($jobid) - { - $jobid = (int) $jobid; - - $bsqlch = new BareosSqlCompatHelper($this->getDbDriverConfig()); - $select = new Select(); - $select->from($bsqlch->strdbcompat("Job")); - $select->join( - $bsqlch->strdbcompat("Client"), - $bsqlch->strdbcompat("Job.ClientId = Client.ClientId"), - array($bsqlch->strdbcompat("ClientName") => $bsqlch->strdbcompat("Name")) - ); - $select->where( - $bsqlch->strdbcompat("JobId") . "=" . $jobid - ); - - $rowset = $this->tableGateway->selectWith($select); - $row = $rowset->current(); - if(!$row) { - throw new \Exception("Could not find row $jobid"); - } - return $row; - } - - public function getRunningJobs($paginated=false, $order_by=null, $order=null) - { - $bsqlch = new BareosSqlCompatHelper($this->getDbDriverConfig()); - $select = new Select(); - $select->from($bsqlch->strdbcompat("Job")); - $select->columns(array( - $bsqlch->strdbcompat("JobId"), - $bsqlch->strdbcompat("Name"), - $bsqlch->strdbcompat("Type"), - $bsqlch->strdbcompat("Level"), - $bsqlch->strdbcompat("StartTime"), - $bsqlch->strdbcompat("EndTime"), - $bsqlch->strdbcompat("JobBytes"), - $bsqlch->strdbcompat("JobStatus"), - $bsqlch->strdbcompat("ClientId") - ) - ); - $select->join( - $bsqlch->strdbcompat("Client"), - $bsqlch->strdbcompat("Job.ClientId = Client.ClientId"), - array($bsqlch->strdbcompat("ClientName") => $bsqlch->strdbcompat("Name")) - ); - $select->where( - $bsqlch->strdbcompat("JobStatus") . " = 'R' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'l'" - ); - - if($order_by != null && $order != null) { - $select->order($bsqlch->strdbcompat($order_by) . " " . $order); - } - else { - $select->order($bsqlch->strdbcompat("JobId") . " DESC"); - } - - if($paginated) { - $resultSetPrototype = new ResultSet(); - $resultSetPrototype->setArrayObjectPrototype(new Job()); - $paginatorAdapter = new DbSelect( - $select, - $this->tableGateway->getAdapter(), - $resultSetPrototype - ); - $paginator = new Paginator($paginatorAdapter); - return $paginator; - } - else { - $resultSet = $this->tableGateway->selectWith($select); - return $resultSet; - } - } - - public function getWaitingJobs($paginated=false, $order_by=null, $order=null) - { - $bsqlch = new BareosSqlCompatHelper($this->getDbDriverConfig()); - $select = new Select(); - $select->from($bsqlch->strdbcompat("Job")); - $select->columns(array( - $bsqlch->strdbcompat("JobId"), - $bsqlch->strdbcompat("Name"), - $bsqlch->strdbcompat("Type"), - $bsqlch->strdbcompat("Level"), - $bsqlch->strdbcompat("StartTime"), - $bsqlch->strdbcompat("EndTime"), - $bsqlch->strdbcompat("JobBytes"), - $bsqlch->strdbcompat("JobStatus"), - $bsqlch->strdbcompat("ClientId") - ) - ); - $select->join( - $bsqlch->strdbcompat("Client"), - $bsqlch->strdbcompat("Job.ClientId = Client.ClientId"), - array($bsqlch->strdbcompat("ClientName") => $bsqlch->strdbcompat("Name")) - ); - $select->where( - $bsqlch->strdbcompat("JobStatus") . " = 'F' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'S' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'm' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'M' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 's' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'j' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'c' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'd' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 't' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'p' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'q' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'C'" - ); - - if($order_by != null && $order != null) { - $select->order($bsqlch->strdbcompat($order_by) . " " . $order); - } - else { - $select->order($bsqlch->strdbcompat("Job.JobId") . " DESC"); - } - - if($paginated) { - $resultSetPrototype = new ResultSet(); - $resultSetPrototype->setArrayObjectPrototype(new Job()); - $paginatorAdapter = new DbSelect( - $select, - $this->tableGateway->getAdapter(), - $resultSetPrototype - ); - $paginator = new Paginator($paginatorAdapter); - return $paginator; - } - else { - $resultSet = $this->tableGateway->selectWith($select); - return $resultSet; - } - } - - public function getLast24HoursSuccessfulJobs($paginated=false, $order_by=null, $order=null) - { - if($this->getDbDriverConfig() == "Pdo_Mysql" || $this->getDbDriverConfig() == "Mysqli") { - $duration = new Expression("TIMEDIFF(EndTime, StartTime)"); - $interval = "now() - interval 1 day"; - } - elseif($this->getDbDriverConfig() == "Pdo_Pgsql" || $this->getDbDriverConfig() == "Pgsql") { - $duration = new Expression("endtime::timestamp - starttime::timestamp"); - $interval = "now() - interval '1 day'"; - } - - $bsqlch = new BareosSqlCompatHelper($this->getDbDriverConfig()); - $select = new Select(); - $select->from($bsqlch->strdbcompat("Job")); - $select->columns(array( - $bsqlch->strdbcompat("JobId"), - $bsqlch->strdbcompat("Name"), - $bsqlch->strdbcompat("Type"), - $bsqlch->strdbcompat("Level"), - $bsqlch->strdbcompat("StartTime"), - $bsqlch->strdbcompat("EndTime"), - $bsqlch->strdbcompat("JobBytes"), - $bsqlch->strdbcompat("JobStatus"), - $bsqlch->strdbcompat("ClientId"), - 'duration' => $duration, - ) - ); - $select->join( - $bsqlch->strdbcompat("Client"), - $bsqlch->strdbcompat("Job.ClientId = Client.ClientId"), - array($bsqlch->strdbcompat("ClientName") => $bsqlch->strdbcompat("Name")) - ); - - $select->where( - "(" . - $bsqlch->strdbcompat("JobStatus") . " = 'T' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'W' ) AND (" . - $bsqlch->strdbcompat("StartTime") . " >= " . $interval . " OR " . - $bsqlch->strdbcompat("EndTime") . " >= " . $interval . ")" - ); - - if($order_by != null && $order != null) { - $select->order($bsqlch->strdbcompat($order_by) . " " . $order); - } - else { - $select->order($bsqlch->strdbcompat("Job.JobId") . " DESC"); - } - - if($paginated) { - $resultSetPrototype = new ResultSet(); - $resultSetPrototype->setArrayObjectPrototype(new Job()); - $paginatorAdapter = new DbSelect( - $select, - $this->tableGateway->getAdapter(), - $resultSetPrototype - ); - $paginator = new Paginator($paginatorAdapter); - return $paginator; - } - else { - $resultSet = $this->tableGateway->selectWith($select); - return $resultSet; - } - } - - public function getLast24HoursUnsuccessfulJobs($paginated=false, $order_by=null, $order=null) - { - if($this->getDbDriverConfig() == "Pdo_Mysql" || $this->getDbDriverConfig() == "Mysqli") { - $duration = new Expression("TIMEDIFF(EndTime, StartTime)"); - $interval = "now() - interval 1 day"; - } - elseif($this->getDbDriverConfig() == "Pdo_Pgsql" || $this->getDbDriverConfig() == "Pgsql") { - $duration = new Expression("endtime::timestamp - starttime::timestamp"); - $interval = "now() - interval '1 day'"; - } - - $bsqlch = new BareosSqlCompatHelper($this->getDbDriverConfig()); - $select = new Select(); - $select->from($bsqlch->strdbcompat("Job")); - $select->columns(array( - $bsqlch->strdbcompat("JobId"), - $bsqlch->strdbcompat("Name"), - $bsqlch->strdbcompat("Type"), - $bsqlch->strdbcompat("Level"), - $bsqlch->strdbcompat("StartTime"), - $bsqlch->strdbcompat("EndTime"), - $bsqlch->strdbcompat("JobStatus"), - $bsqlch->strdbcompat("ClientId"), - 'duration' => $duration, - ) - ); - $select->join( - $bsqlch->strdbcompat("Client"), - $bsqlch->strdbcompat("Job.ClientId = Client.ClientId"), - array($bsqlch->strdbcompat("ClientName") => $bsqlch->strdbcompat("Name")) - ); - $select->where( - "(" . - $bsqlch->strdbcompat("JobStatus") . " = 'A' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'E' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'e' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'f' ) AND (" . - $bsqlch->strdbcompat("StartTime") . " >= " . $interval . " OR " . - $bsqlch->strdbcompat("EndTime") . " >= " . $interval . ")" - ); - - if($order_by != null && $order != null) { - $select->order($bsqlch->strdbcompat($order_by) . " " . $order); - } - else { - $select->order($bsqlch->strdbcompat("Job.JobId") . " DESC"); - } - - if($paginated) { - $resultSetPrototype = new ResultSet(); - $resultSetPrototype->setArrayObjectPrototype(new Job()); - $paginatorAdapter = new DbSelect( - $select, - $this->tableGateway->getAdapter(), - $resultSetPrototype - ); - $paginator = new Paginator($paginatorAdapter); - return $paginator; - } - else { - $resultSet = $this->tableGateway->selectWith($select); - return $resultSet; - } - } - - public function getJobCountLast24HoursByStatus($status) - { - if($this->getDbDriverConfig() == "Pdo_Mysql" || $this->getDbDriverConfig() == "Mysqli") { - $interval = "now() - interval 1 day"; - } - elseif($this->getDbDriverConfig() == "Pdo_Pgsql" || $this->getDbDriverConfig() == "Pgsql") { - $interval = "now() - interval '1 day'"; - } - - $bsqlch = new BareosSqlCompatHelper($this->getDbDriverConfig()); - $select = new Select(); - $select->from($bsqlch->strdbcompat("Job")); - - if($status == "waiting") - { - $select->where( - $bsqlch->strdbcompat("JobStatus") . " = 'F' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'S' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'm' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'M' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 's' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'j' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'c' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'd' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 't' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'p' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'q' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'C'" - ); - } - - if($status == "running") - { - $select->where( - $bsqlch->strdbcompat("JobStatus") . " = 'R' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'l'" - ); - } - - if($status == "successful") - { - $select->where( - "(" . - $bsqlch->strdbcompat("JobStatus") . " = 'T' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'W' ) AND (" . - $bsqlch->strdbcompat("StartTime") . " >= " . $interval . " OR " . - $bsqlch->strdbcompat("EndTime") . " >= " . $interval . ")" - ); - } - - if($status == "unsuccessful") - { - $select->where( - "(" . - $bsqlch->strdbcompat("JobStatus") . " = 'A' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'E' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'e' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'f' ) AND (" . - $bsqlch->strdbcompat("StartTime") . " >= " . $interval . " OR " . - $bsqlch->strdbcompat("EndTime") . " >= " . $interval . ")" - ); - } - - $resultSetPrototype = new ResultSet(); - $resultSetPrototype->setArrayObjectPrototype(new Job()); - $rowset = new DbSelect( - $select, - $this->tableGateway->getAdapter(), - $resultSetPrototype - ); - $num = $rowset->count(); - - return $num; - } - - public function getJobNum() - { - $bsqlch = new BareosSqlCompatHelper($this->getDbDriverConfig()); - $select = new Select(); - $select->from($bsqlch->strdbcompat("Job")); - $resultSetPrototype = new ResultSet(); - $resultSetPrototype->setArrayObjectPrototype(new Job()); - $rowset = new DbSelect( - $select, - $this->tableGateway->getAdapter(), - $resultSetPrototype - ); - $num = $rowset->count(); - return $num; - } - - public function getLastSuccessfulClientJob($id) - { - $bsqlch = new BareosSqlCompatHelper($this->getDbDriverConfig()); - $select = new Select(); - $select->from($bsqlch->strdbcompat("Job")); - $select->where( - $bsqlch->strdbcompat("ClientId") . " = " . $id . " AND (" . - $bsqlch->strdbcompat("JobStatus") . " = 'T' OR " . - $bsqlch->strdbcompat("JobStatus") . " = 'W')" - ); - $select->order($bsqlch->strdbcompat("JobId") . " DESC"); - $select->limit(1); - - $rowset = $this->tableGateway->selectWith($select); - $row = $rowset->current(); - - if(!$row) { - // Note: If there is no record, a job for this client was never executed. - // Exception: throw new \Exception("Could not find row $jobid"); - $row = null; - } - - return $row; - } - } diff --git a/module/Job/view/job/job/cancel.phtml b/module/Job/view/job/job/cancel.phtml index 60b9a4b8..3098746a 100644 --- a/module/Job/view/job/job/cancel.phtml +++ b/module/Job/view/job/job/cancel.phtml @@ -29,12 +29,7 @@ $this->headTitle($title); ?> -

-
- -

Cancel job jobid; ?>

- -
+
 
 bconsoleOutput; ?>
 
diff --git a/module/Job/view/job/job/details.phtml b/module/Job/view/job/job/details.phtml
index 64854a18..4148523f 100644
--- a/module/Job/view/job/job/details.phtml
+++ b/module/Job/view/job/job/details.phtml
@@ -57,14 +57,14 @@ $this->headTitle($title);
 
 
 
- + - + diff --git a/module/Job/view/job/job/queue.phtml b/module/Job/view/job/job/queue.phtml index 8f77c1c0..5f4d309d 100644 --- a/module/Job/view/job/job/queue.phtml +++ b/module/Job/view/job/job/queue.phtml @@ -5,10 +5,7 @@ $this->headTitle($title); ?> -

-
- -
+
 
 result; ?>
 
diff --git a/module/Job/view/job/job/rerun.phtml b/module/Job/view/job/job/rerun.phtml
index f8c12952..1c7b78cc 100644
--- a/module/Job/view/job/job/rerun.phtml
+++ b/module/Job/view/job/job/rerun.phtml
@@ -29,12 +29,7 @@ $this->headTitle($title);
 
 ?>
 
-

-
- -

Re-running job jobid; ?>

- -
+
 
 bconsoleOutput; ?>
 
diff --git a/module/Job/view/job/job/run.phtml b/module/Job/view/job/job/run.phtml
index 5c8c0372..0fba1f9f 100644
--- a/module/Job/view/job/job/run.phtml
+++ b/module/Job/view/job/job/run.phtml
@@ -61,7 +61,7 @@ Jobs per page:
 100
 

-
translate("Fileset"); ?>translate("Modified"); ?>translate("Fileset"); ?>translate("Modified"); ?>
ClientescapeHtml($job['name']); ?>ClientescapeHtml($job['clientname']); ?> EndprintDate($job['endtime'], 'iso'); ?> FilesescapeHtml($job['jobfiles']); ?>
TypeprintJobType($job['type']); ?>FilesetescapeHtml($job['filesetid']); ?>FilesetescapeHtml($job['filesetid']); ?> BytesprintBytes($job['jobbytes']); ?>
+
diff --git a/module/Job/view/job/job/waiting.phtml b/module/Job/view/job/job/waiting.phtml index 91def74a..ffa09688 100644 --- a/module/Job/view/job/job/waiting.phtml +++ b/module/Job/view/job/job/waiting.phtml @@ -85,13 +85,13 @@ Jobs per page:
translate("Name"); ?>
- - - - - - - + + + + + + + paginator as $job) : ?> diff --git a/module/Media/view/media/media/details.phtml b/module/Media/view/media/media/details.phtml index 88aa4666..7b7459aa 100644 --- a/module/Media/view/media/media/details.phtml +++ b/module/Media/view/media/media/details.phtml @@ -31,7 +31,7 @@ $this->headTitle($title);
-
+
@@ -40,67 +40,47 @@ $this->headTitle($title);
-
translate("Job"); ?>translate("Name"); ?>translate("Client"); ?>translate("Type"); ?>translate("Level"); ?>translate("Status"); ?>translate("Job"); ?>translate("Name"); ?>translate("Client"); ?>translate("Type"); ?>translate("Level"); ?>translate("Status"); ?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
Volume IDescapeHtml($media['mediaid']); ?>VolumenameescapeHtml($media['volumename']); ?>MediatypeescapeHtml($media['mediatype']); ?>Mediatype ID
LabeltypeescapeHtml($media['labeltype']); ?>First writtenprintDate($media['firstwritten']); ?>Last writtenprintDate($media['lastwritten']); ?>Label dateprintDate($media['labeldate']); ?>
Volume jobsescapeHtml($media['voljobs']); ?>Volume filesescapeHtml($media['volfiles']); ?>Volume blocksescapeHtml($media['volblocks']); ?>Volume mountsescapeHtml($media['volmounts']); ?>
Volume used bytesprintBytes($media['volbytes']); ?>Volume errorsescapeHtml($media['volerrors']); ?>Volume writesescapeHtml($media['volwrites']); ?>Volume capacity bytesescapeHtml($media['volcapacitybytes']); ?>
Volume StatusescapeHtml($media['volstatus']); ?>EnabledescapeHtml($media['enabled']); ?>RecycleescapeHtml($media['recycle']); ?>Action on purge
Volume retention/expirationprintExpiration($media['volretention'], $media['lastwritten'], $media['volstatus']); ?>Volume use durationescapeHtml($media['voluseduration']); ?>Volume maximum jobsescapeHtml($media['maxvoljobs']); ?>Volume maximum filesescapeHtml($media['maxvolfiles']); ?>
Volume maximum bytesprintBytes($media['maxvolbytes']); ?>In changerescapeHtml($media['inchanger']); ?>Storage IDescapeHtml($media['storageid']); ?>Device IDescapeHtml($media['deviceid']); ?>
Media addressingVolume readtimeVolume writetimeEndfileescapeHtml($media['endfile']); ?>
EndblockescapeHtml($media['endblock']); ?>Location IDescapeHtml($media['locationid']); ?>Recycle countescapeHtml($media['recyclecount']); ?>Initial writeescapeHtml($media['initialwrite']); ?>
Scratchpool IDescapeHtml($media['scratchpoolid']); ?>Recyclepool IDescapeHtml($media['recyclepoolid']); ?>EncryptionkeyCommentescapeHtml($media['comment']); ?>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Volume IDescapeHtml($media['mediaid']); ?>
VolumenameescapeHtml($media['volumename']); ?>
MediatypeescapeHtml($media['mediatype']); ?>
Mediatype ID
LabeltypeescapeHtml($media['labeltype']); ?>
First writtenprintDate($media['firstwritten']); ?>
Last writtenprintDate($media['lastwritten']); ?>
Label dateprintDate($media['labeldate']); ?>
Volume jobsescapeHtml($media['voljobs']); ?>
Volume filesescapeHtml($media['volfiles']); ?>
Volume blocksescapeHtml($media['volblocks']); ?>
Volume mountsescapeHtml($media['volmounts']); ?>
Volume used bytesprintBytes($media['volbytes']); ?>
Volume errorsescapeHtml($media['volerrors']); ?>
Volume writesescapeHtml($media['volwrites']); ?>
Volume capacity bytesescapeHtml($media['volcapacitybytes']); ?>
Volume StatusescapeHtml($media['volstatus']); ?>
EnabledescapeHtml($media['enabled']); ?>
RecycleescapeHtml($media['recycle']); ?>
Action on purge
Volume retention/expirationprintExpiration($media['volretention'], $media['lastwritten'], $media['volstatus']); ?>
Volume use durationescapeHtml($media['voluseduration']); ?>
Volume maximum jobsescapeHtml($media['maxvoljobs']); ?>
Volume maximum filesescapeHtml($media['maxvolfiles']); ?>
Volume maximum bytesprintBytes($media['maxvolbytes']); ?>
In changerescapeHtml($media['inchanger']); ?>
Storage IDescapeHtml($media['storageid']); ?>
Device IDescapeHtml($media['deviceid']); ?>
Media addressing
Volume readtime
Volume writetime
EndfileescapeHtml($media['endfile']); ?>
EndblockescapeHtml($media['endblock']); ?>
Location IDescapeHtml($media['locationid']); ?>
Recycle countescapeHtml($media['recyclecount']); ?>
Initial writeescapeHtml($media['initialwrite']); ?>
Scratchpool IDescapeHtml($media['scratchpoolid']); ?>
Recyclepool IDescapeHtml($media['recyclepoolid']); ?>
Encryptionkey
CommentescapeHtml($media['comment']); ?>
diff --git a/module/Media/view/media/media/index.phtml b/module/Media/view/media/media/index.phtml index e0a016af..606c5953 100644 --- a/module/Media/view/media/media/index.phtml +++ b/module/Media/view/media/media/index.phtml @@ -48,7 +48,7 @@ Volumes per page: 100

- +
diff --git a/module/Pool/view/pool/pool/details.phtml b/module/Pool/view/pool/pool/details.phtml index ffeb2ffd..162e4140 100644 --- a/module/Pool/view/pool/pool/details.phtml +++ b/module/Pool/view/pool/pool/details.phtml @@ -33,14 +33,14 @@ $this->headTitle($title);
- +
-
translate("Volume"); ?>
+
@@ -77,10 +77,10 @@ $this->headTitle($title);
- +
@@ -92,7 +92,7 @@ Volumes per page: 100

-
+
diff --git a/module/Pool/view/pool/pool/index.phtml b/module/Pool/view/pool/pool/index.phtml index af149dbc..fafc05c3 100644 --- a/module/Pool/view/pool/pool/index.phtml +++ b/module/Pool/view/pool/pool/index.phtml @@ -48,7 +48,7 @@ Pools per page: 100

-
+
diff --git a/module/Restore/view/restore/restore/index.phtml b/module/Restore/view/restore/restore/index.phtml index e24719ad..7abb56ff 100644 --- a/module/Restore/view/restore/restore/index.phtml +++ b/module/Restore/view/restore/restore/index.phtml @@ -28,9 +28,6 @@ $this->headTitle($title); ?> -

-
- result)) : ?>
diff --git a/module/Statistics/Module.php b/module/Statistics/Module.php deleted file mode 100644 index b9aa3e9a..00000000 --- a/module/Statistics/Module.php +++ /dev/null @@ -1,55 +0,0 @@ - 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( - 'Statistics\Model\StatisticsTable' => function($sm) - { - $tableGateway = $sm->get('StatisticsTableGateway'); - $table = new StatisticsTable($tableGateway); - return $table; - }, - 'StatisticsTableGateway' => function($sm) - { - //$dbAdapter = $sm->get('Zend\Db\Adapter\Adapter'); - $dbAdapter = $sm->get($_SESSION['bareos']['director']); - $resultSetPrototype = new ResultSet(); - $resultSetPrototype->setArrayObjectPrototype(new Statistics()); - return new TableGateway('statistics', $dbAdapter, null, $resultSetPrototype); - }, - ), - ); - } - -} - diff --git a/module/Statistics/autoload_classmap.php b/module/Statistics/autoload_classmap.php deleted file mode 100644 index d864ec91..00000000 --- a/module/Statistics/autoload_classmap.php +++ /dev/null @@ -1,4 +0,0 @@ -. - * - */ - -return array( - - 'controllers' => array( - 'invokables' => array( - 'Statistics\Controller\Statistics' => 'Statistics\Controller\StatisticsController', - ), - ), - - 'router' => array( - 'routes' => array( - 'statistics' => array( - 'type' => 'segment', - 'options' => array( - 'route' => '/statistics[/][:action][/:id]', - 'constraints' => array( - 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', - 'id' => '[0-9]+', - ), - 'defaults' => array( - 'controller' => 'Statistics\Controller\Statistics', - 'action' => 'index', - ), - ), - ), - ), - ), - - 'view_manager' => array( - 'template_path_stack' => array( - 'statistics' => __DIR__ . '/../view', - ), - ), - -); diff --git a/module/Statistics/src/Statistics/Controller/StatisticsController.php b/module/Statistics/src/Statistics/Controller/StatisticsController.php deleted file mode 100644 index 51b83682..00000000 --- a/module/Statistics/src/Statistics/Controller/StatisticsController.php +++ /dev/null @@ -1,67 +0,0 @@ -. - * - */ - -namespace Statistics\Controller; - -use Zend\Mvc\Controller\AbstractActionController; -use Zend\View\Model\ViewModel; - -class StatisticsController extends AbstractActionController -{ - - protected $jobTable; - - public function indexAction() - { - if($_SESSION['bareos']['authenticated'] == true) { - return new ViewModel( - array( - - 'runningJobs' => $this->getJobTable()->getJobCountLast24HoursByStatus("running"), - 'waitingJobs' => $this->getJobTable()->getJobCountLast24HoursByStatus("waiting"), - 'successfulJobs' => $this->getJobTable()->getJobCountLast24HoursByStatus("successful"), - 'unsuccessfulJobs' => $this->getJobTable()->getJobCountLast24HoursByStatus("unsuccessful"), - - ) - ); - } - else { - return $this->redirect()->toRoute('auth', array('action' => 'login')); - } - - } - - public function getJobTable() - { - if(!$this->jobTable) - { - $sm = $this->getServiceLocator(); - $this->jobTable = $sm->get('Job\Model\JobTable'); - } - return $this->jobTable; - } - -} - diff --git a/module/Statistics/src/Statistics/Model/Statistics.php b/module/Statistics/src/Statistics/Model/Statistics.php deleted file mode 100644 index e1b5aa5c..00000000 --- a/module/Statistics/src/Statistics/Model/Statistics.php +++ /dev/null @@ -1,33 +0,0 @@ -. - * - */ - -namespace Statistics\Model; - -class Statistics -{ - - - -} diff --git a/module/Statistics/src/Statistics/Model/StatisticsTable.php b/module/Statistics/src/Statistics/Model/StatisticsTable.php deleted file mode 100644 index 835d26f9..00000000 --- a/module/Statistics/src/Statistics/Model/StatisticsTable.php +++ /dev/null @@ -1,51 +0,0 @@ -. - * - */ - -namespace Statistics\Model; - -//use Zend\Db\TableGateway\TableGateway; - -class StatisticsTable -{ -// protected $tableGateway; -/* - public function __construct(TableGateway $tableGateway) - { - $this->tableGateway = $tableGateway; - } - - public function fetchAll() - { - $resultSet = $this->tableGateway->select(); - return $resultSet; - } -*/ - - public function __construct() - { - } - -} - diff --git a/module/Statistics/view/statistics/statistics/index.phtml b/module/Statistics/view/statistics/statistics/index.phtml deleted file mode 100644 index fda7e68d..00000000 --- a/module/Statistics/view/statistics/statistics/index.phtml +++ /dev/null @@ -1,133 +0,0 @@ -. - * - */ - -$title = 'Statistics'; -$this->headTitle($title); - -?> - -

-
- - - -
- -
- -
- -
-

- - translate('Jobs during the past 24 hours') ?> -

-
- -
- -
- -
Pool
- - - - - - - - - - - - - - - - -
translate("Running"); ?>runningJobs; ?>
translate("Waiting"); ?>waitingJobs; ?>
translate("Successful"); ?>successfulJobs; ?>
translate("Unsuccessful"); ?>unsuccessfulJobs; ?>
- -
- -
-
-
- -
- -
- -
- -
diff --git a/module/Storage/view/storage/storage/index.phtml b/module/Storage/view/storage/storage/index.phtml index 68cb44a5..d316dcd8 100644 --- a/module/Storage/view/storage/storage/index.phtml +++ b/module/Storage/view/storage/storage/index.phtml @@ -48,7 +48,7 @@ Storages per page: 100

- +
diff --git a/phpunit.xml b/phpunit.xml index 4d827e55..ec85ab94 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -10,12 +10,7 @@ ./tests/PoolTest./tests/MediaTest./tests/StorageTest - ./tests/FileTest - ./tests/LogTest./tests/RestoreTest - ./tests/StatisticsTest - ./tests/AdminTest - ./tests/UserTest diff --git a/tests/AdminTest/Controller/IndexControllerTest.php b/tests/AdminTest/Controller/IndexControllerTest.php deleted file mode 100644 index 093c8689..00000000 --- a/tests/AdminTest/Controller/IndexControllerTest.php +++ /dev/null @@ -1,52 +0,0 @@ -. - * - */ - -namespace AdminTest\Controller; - -use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase; - -class AdminControllerTest extends AbstractHttpControllerTestCase -{ - - protected $traceError = true; - - public function setUp() - { - $this->setApplicationConfig( - include './config/application.config.php' - ); - } - - public function testIndexActionCanBeAccessed() - { - $this->dispatch('/admin'); - $this->assertResponseStatusCode(200); - $this->assertModuleName('Admin'); - $this->assertControllerName('Admin\Controller\Admin'); - $this->assertControllerClass('AdminController'); - $this->assertMatchedRouteName('admin'); - } - -} diff --git a/tests/Statistics/Controller/IndexControllerTest.php b/tests/Statistics/Controller/IndexControllerTest.php deleted file mode 100644 index 6b94b6ef..00000000 --- a/tests/Statistics/Controller/IndexControllerTest.php +++ /dev/null @@ -1,52 +0,0 @@ -. - * - */ - -namespace StatisticsTest\Controller; - -use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase; - -class StatisticsControllerTest extends AbstractHttpControllerTestCase -{ - - protected $traceError = true; - - public function setUp() - { - $this->setApplicationConfig( - include './config/application.config.php' - ); - } - - public function testIndexActionCanBeAccessed() - { - $this->dispatch('/statistics'); - $this->assertResponseStatusCode(200); - $this->assertModuleName('Statistics'); - $this->assertControllerName('Statistics\Controller\Statistics'); - $this->assertControllerClass('StatisticsController'); - $this->assertMatchedRouteName('statistics'); - } - -} diff --git a/tests/UserTest/Controller/IndexControllerTest.php b/tests/UserTest/Controller/IndexControllerTest.php deleted file mode 100644 index 3fc63e6b..00000000 --- a/tests/UserTest/Controller/IndexControllerTest.php +++ /dev/null @@ -1,52 +0,0 @@ -. - * - */ - -namespace UserTest\Controller; - -use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase; - -class UserControllerTest extends AbstractHttpControllerTestCase -{ - - protected $traceError = true; - - public function setUp() - { - $this->setApplicationConfig( - include './config/application.config.php' - ); - } - - public function testIndexActionCanBeAccessed() - { - $this->dispatch('/user'); - $this->assertResponseStatusCode(200); - $this->assertModuleName('User'); - $this->assertControllerName('User\Controller\User'); - $this->assertControllerClass('UserController'); - $this->assertMatchedRouteName('user'); - } - -}
translate("Storage"); ?>