Navigation Menu

Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Feb 14, 2014
1 parent 9b55155 commit 1e08f05
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 18 deletions.
2 changes: 1 addition & 1 deletion module/Application/view/layout/layout.phtml
Expand Up @@ -32,7 +32,7 @@ echo $this->doctype();

<head>
<meta charset="utf-8">
<?php echo $this->headTitle('Bareos Web-Frontend | '. $this->translate('Version 0.0.1-alpha'))->setSeparator(' - ')->setAutoEscape(false) ?>
<?php echo $this->headTitle('Bareos')->setSeparator(' - ')->setAutoEscape(false) ?>

<?php echo $this->headMeta()
->appendName('viewport', 'width=device-width, initial-scale=1.0')
Expand Down
12 changes: 0 additions & 12 deletions module/Job/src/Job/Model/JobTable.php
Expand Up @@ -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()
{
Expand Down
18 changes: 15 additions & 3 deletions module/Storage/src/Storage/Controller/StorageController.php
Expand Up @@ -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) {
Expand Down
51 changes: 51 additions & 0 deletions module/Storage/view/storage/storage/autochanger.phtml
@@ -0,0 +1,51 @@
<?php

/**
*
* Barbossa - A Web-Frontend to manage Bareos
*
* @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
* 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/>.
*
*/

$title = 'Storage slot details';
$this->headTitle($title);

?>

<h3 class="text-muted"><?php echo $title; ?></h3>
<hr />

<div class="row">

<div class="col-md-12">

<pre style="font-size: 8pt;">
<code>
<?php
foreach($this->bconsoleOutput as $row) {
echo $row ."<br />";
}
?>
</code>
</pre>

</div>

</div>
3 changes: 2 additions & 1 deletion module/Storage/view/storage/storage/details.phtml
Expand Up @@ -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
Expand Down Expand Up @@ -47,4 +48,4 @@ $this->headTitle($title);

</div>

</div>
</div>
12 changes: 11 additions & 1 deletion module/Storage/view/storage/storage/index.phtml
Expand Up @@ -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
Expand Down Expand Up @@ -52,7 +53,16 @@ $this->headTitle($title);

<td><a href="<?php echo $this->url('storage', array('action'=>'details', 'id'=>$storage->storageid)); ?>"><?php echo $this->escapeHtml($storage->storageid); ?></a></td>
<td><a href="<?php echo $this->url('storage', array('action'=>'details', 'id'=>$storage->storageid)); ?>"><?php echo $this->escapeHtml($storage->name); ?></a></td>
<td><?php echo $this->escapeHtml($storage->autochanger); ?></td>
<td>
<?php if($storage->autochanger > 0) : ?>
<span class="glyphicon glyphicon-list-alt"></span>
<a href="<?php echo $this->url('storage', array('action'=>'autochanger', 'id'=>$storage->storageid)); ?>" title="<?php echo $this->escapeHtml("View slots"); ?>">
<?php echo $this->escapeHtml("View slots"); ?>
</a>
<?php else : ?>
<?php echo $this->escapeHtml("-"); ?>
<?php endif; ?>
</td>

</tr>

Expand Down

0 comments on commit 1e08f05

Please sign in to comment.