From 1e08f056860151fb025632b2b7574549385bd58c Mon Sep 17 00:00:00 2001 From: Frank Bergkemper Date: Fri, 14 Feb 2014 11:59:12 +0100 Subject: [PATCH] update --- module/Application/view/layout/layout.phtml | 2 +- module/Job/src/Job/Model/JobTable.php | 12 ----- .../Storage/Controller/StorageController.php | 18 +++++-- .../view/storage/storage/autochanger.phtml | 51 +++++++++++++++++++ .../view/storage/storage/details.phtml | 3 +- .../Storage/view/storage/storage/index.phtml | 12 ++++- 6 files changed, 80 insertions(+), 18 deletions(-) create mode 100644 module/Storage/view/storage/storage/autochanger.phtml diff --git a/module/Application/view/layout/layout.phtml b/module/Application/view/layout/layout.phtml index 6377bb3a..b2d80f99 100644 --- a/module/Application/view/layout/layout.phtml +++ b/module/Application/view/layout/layout.phtml @@ -32,7 +32,7 @@ echo $this->doctype(); - headTitle('Bareos Web-Frontend | '. $this->translate('Version 0.0.1-alpha'))->setSeparator(' - ')->setAutoEscape(false) ?> + headTitle('Bareos')->setSeparator(' - ')->setAutoEscape(false) ?> headMeta() ->appendName('viewport', 'width=device-width, initial-scale=1.0') diff --git a/module/Job/src/Job/Model/JobTable.php b/module/Job/src/Job/Model/JobTable.php index 0ebf890c..c2b909fb 100644 --- a/module/Job/src/Job/Model/JobTable.php +++ b/module/Job/src/Job/Model/JobTable.php @@ -333,18 +333,6 @@ public function getLastSuccessfulClientJob($id) return $row; } - - /* - public function getJobNameById($jobid) - { - $select = new Select(); - $select->columns(array('name')); - $select->from('job'); - $select->where("jobid=".$jobid); - $resultSet = $this->tableGateway->selectWith($select); - return $resultSet; - } - */ public function getStoredBytes7Days() { diff --git a/module/Storage/src/Storage/Controller/StorageController.php b/module/Storage/src/Storage/Controller/StorageController.php index 42dfb8f7..313442f9 100644 --- a/module/Storage/src/Storage/Controller/StorageController.php +++ b/module/Storage/src/Storage/Controller/StorageController.php @@ -49,16 +49,28 @@ public function detailsAction() if(!$id) { return $this->redirect()->toRoute('storage'); } - $result = $this->getStorageTable()->getStorage($id); - - $cmd = "status storage=" . $result->name . " slots"; + $cmd = "status storage=" . $result->name; return new ViewModel(array( 'bconsoleOutput' => $this->getBConsoleOutput($cmd), ) ); } + public function autochangerAction() + { + $id = (int) $this->params()->fromRoute('id', 0); + if(!$id) { + return $this->redirect()->toRoute('storage'); + } + $result = $this->getStorageTable()->getStorage($id); + $cmd = "status storage=" . $result->name . " slots"; + return new ViewModel(array( + 'bconsoleOutput' => $this->getBConsoleOutput($cmd), + ) + ); + } + public function getStorageTable() { if(!$this->storageTable) { diff --git a/module/Storage/view/storage/storage/autochanger.phtml b/module/Storage/view/storage/storage/autochanger.phtml new file mode 100644 index 00000000..4796c303 --- /dev/null +++ b/module/Storage/view/storage/storage/autochanger.phtml @@ -0,0 +1,51 @@ +. + * + */ + +$title = 'Storage slot details'; +$this->headTitle($title); + +?> + +

+
+ +
+ +
+ +
+    
+    bconsoleOutput as $row) {
+	echo $row ."
"; + } + ?> +
+
+ +
+ +
diff --git a/module/Storage/view/storage/storage/details.phtml b/module/Storage/view/storage/storage/details.phtml index 824c8b75..84b56c13 100644 --- a/module/Storage/view/storage/storage/details.phtml +++ b/module/Storage/view/storage/storage/details.phtml @@ -7,6 +7,7 @@ * @link http://github.com/fbergkemper/barbossa 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 @@ -47,4 +48,4 @@ $this->headTitle($title); - \ No newline at end of file + diff --git a/module/Storage/view/storage/storage/index.phtml b/module/Storage/view/storage/storage/index.phtml index f2122144..67d6268f 100644 --- a/module/Storage/view/storage/storage/index.phtml +++ b/module/Storage/view/storage/storage/index.phtml @@ -7,6 +7,7 @@ * @link http://github.com/fbergkemper/barbossa 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 @@ -52,7 +53,16 @@ $this->headTitle($title); escapeHtml($storage->storageid); ?> escapeHtml($storage->name); ?> - escapeHtml($storage->autochanger); ?> + + autochanger > 0) : ?> + + "> + escapeHtml("View slots"); ?> + + + escapeHtml("-"); ?> + +