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

Commit

Permalink
Client restore with file browsing
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Jul 17, 2015
1 parent fa91388 commit 6cc0dee
Show file tree
Hide file tree
Showing 22 changed files with 2,370 additions and 222 deletions.
56 changes: 56 additions & 0 deletions LICENSE
Expand Up @@ -257,6 +257,62 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


g) Bootstrap 3 Datepicker

File: /bareos-webui/public/js/bootstrap-datetimepicker.min.js
File: /bareos-webui/public/css/bootstrap-datetimepicker.css
File: /bareos-webui/public/css/bootstrap-datetimepicker.min.css

Copyright (c) 2015 Jonathan Peterson (@Eonasdan)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


h) Moment.js

File: /bareos-webui/public/js/moment-with-locales.min.js
File: /bareos-webui/public/js/moment.min.js

Copyright (c) 2011-2015 Tim Wood, Iskren Chernev, Moment.js contributors

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.


2. GNU AFFERO GENERAL PUBLIC LICENSE


Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -21,6 +21,8 @@ and frameworks.
* [jQuery - MIT License](http://jquery.com/)
* [jqplot - dual licensed under MIT License and GPL Version 2 License](http://www.jqplot.com/)
* [jstree - MIT License](http://www.jstree.com/)
* [Moments.js - MIT License](http://momentjs.com/)
* [Bootstrap 3 Datepicker - MIT License](http://eonasdan.github.io/bootstrap-datetimepicker/)
* [composer - MIT License](https://getcomposer.org/)

You can find a complete file listing in [LICENSE](LICENSE).
Expand Down
3 changes: 3 additions & 0 deletions module/Application/view/layout/json.phtml
@@ -0,0 +1,3 @@
<?php
echo $this->content;
?>
17 changes: 12 additions & 5 deletions module/Client/view/client/client/details.phtml
Expand Up @@ -47,21 +47,28 @@ $this->headTitle($title);
</div>
</div>

</div>

<!--
<div class="col-md-5">

<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">todo placeholder (client stats)</h3>
<h3 class="panel-title">Actions</h3>
</div>

<div class="panel-body">
<a class="btn btn-primary btn-block" href="<?php echo $this->url(
'restore',
array('action' => 'index'),
array('query' => array(
'type' => 'client',
'client' => $client->name,
'restoreclient' => $client->name
)
)); ?>" role="button">Restore</a>
</div>
</div>
-->

</div>

<!-- bconsoleOutput start -->
<div class="row">
Expand Down
6 changes: 3 additions & 3 deletions module/Client/view/client/client/index.phtml
Expand Up @@ -54,7 +54,7 @@ Clients per page:
<td><?php echo $this->printRetention($client->jobretention) . " days"; ?></td>
<td>
<div class="btn-group">
<button type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-cog"></span></button>
<div type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-cog"></span></div>
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
Expand All @@ -66,13 +66,13 @@ Clients per page:
'restore',
array('action' => 'index'),
array('query' => array(
'type' => 1,
'type' => 'client',
'client' => $client->name,
'restoreclient' => $client->name
)
));
?>
"><span class="glyphicon glyphicon-import"></span> Restore most recent backup</a></li>
"><span class="glyphicon glyphicon-import"></span> Restore</a></li>
</ul>
</div>
</td>
Expand Down
14 changes: 7 additions & 7 deletions module/Job/view/job/job/index.phtml
Expand Up @@ -118,16 +118,16 @@ Jobs per page:
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="<?php echo $this->url('log', array('action' => 'job', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("View logs"); ?>"><span class="glyphicon glyphicon-file"></span> View messages</a></li>
<li><a href="<?php echo $this->url('log', array('action' => 'job', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("View messages"); ?>"><span class="glyphicon glyphicon-file"></span> View messages</a></li>
<li class="divider"></li>
<?php if($job->jobstatus == "T") : ?>
<li><a href="<?php echo $this->url('job', array('action' => 'rerun', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("Rerun"); ?>"><span class="glyphicon glyphicon-repeat"></span> Re-run job</a></li>
<li><a href="<?php echo $this->url('restore', array('action' => 'index'), array('query' => array('type' => 2, 'job' => $job->jobid, 'client' => $job->clientname, 'restoreclient' => $job->clientname))); ?>"><span class="glyphicon glyphicon-import"></span> Restore job</a></li>
<li><a href="<?php echo $this->url('job', array('action' => 'rerun', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("Rerun"); ?>"><span class="glyphicon glyphicon-repeat"></span> Re-run</a></li>
<!--<li><a href="<?php echo $this->url('restore', array('action' => 'index'), array('query' => array('type' => 'job', 'jobid' => $job->jobid, 'client' => $job->clientname, 'restoreclient' => $job->clientname))); ?>"><span class="glyphicon glyphicon-import"></span> Restore</a></li>-->
<?php elseif($job->jobstatus == "E" || $job->jobstatus == "e" || $job->jobstatus == "f" || $job->jobstatus == "A") : ?>
<li><a href="<?php echo $this->url('job', array('action' => 'rerun', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("Rerun"); ?>"><span class="glyphicon glyphicon-repeat"></span> Re-run job</a></li>
<li><a href="<?php echo $this->url('restore', array('action' => 'index'), array('query' => array('type' => 2, 'job' => $job->jobid, 'client' => $job->clientname, 'restoreclient' => $job->clientname))); ?>"><span class="glyphicon glyphicon-import"></span> Restore job</a></li>
<li><a href="<?php echo $this->url('job', array('action' => 'rerun', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("Rerun"); ?>"><span class="glyphicon glyphicon-repeat"></span> Re-run</a></li>
<!--<li><a href="<?php echo $this->url('restore', array('action' => 'index'), array('query' => array('type' => 'job', 'jobid' => $job->jobid, 'client' => $job->clientname, 'restoreclient' => $job->clientname))); ?>"><span class="glyphicon glyphicon-import"></span> Restore</a></li>-->
<?php else : ?>
<li><a href="<?php echo $this->url('job', array('action' => 'cancel', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("Cancel"); ?>"><span class="glyphicon glyphicon-trash"></span> Cancel job</a></li>
<li><a href="<?php echo $this->url('job', array('action' => 'cancel', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("Cancel"); ?>"><span class="glyphicon glyphicon-trash"></span> Cancel</a></li>
<?php endif; ?>
</ul>
</div>
Expand All @@ -140,7 +140,7 @@ Jobs per page:
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="<?php echo $this->url('log', array('action' => 'job', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("View logs"); ?>"><span class="glyphicon glyphicon-file"></span> View messages</a></li>
<li><a href="<?php echo $this->url('log', array('action' => 'job', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("View messages"); ?>"><span class="glyphicon glyphicon-file"></span> View messages</a></li>
</ul>
</div>
<?php endif; ?>
Expand Down
4 changes: 2 additions & 2 deletions module/Job/view/job/job/successful.phtml
Expand Up @@ -141,8 +141,8 @@ Jobs per page:
<li><a href="<?php echo $this->url('log', array('action' => 'job', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("View messages"); ?>"><span class="glyphicon glyphicon-file"></span> View messages</a></li>
<?php if($job->type != "R") : ?>
<li class="divider"></li>
<li><a href="<?php echo $this->url('job', array('action' => 'rerun', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("Rerun"); ?>"><span class="glyphicon glyphicon-repeat"></span> Re-run job</a></li>
<li><a href="<?php echo $this->url('restore', array('action' => 'index'), array('query' => array('type' => 2, 'job' => $job->jobid, 'client' => $job->clientname, 'restoreclient' => $job->clientname))); ?>"><span class="glyphicon glyphicon-import"></span> Restore job</a></li>
<li><a href="<?php echo $this->url('job', array('action' => 'rerun', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("Rerun"); ?>"><span class="glyphicon glyphicon-repeat"></span> Re-run</a></li>
<!--<li><a href="<?php echo $this->url('restore', array('action' => 'index'), array('query' => array('type' => 2, 'job' => $job->jobid, 'client' => $job->clientname, 'restoreclient' => $job->clientname))); ?>"><span class="glyphicon glyphicon-import"></span> Restore job</a></li>-->
<?php endif; ?>
</ul>
</div>
Expand Down
4 changes: 2 additions & 2 deletions module/Job/view/job/job/unsuccessful.phtml
Expand Up @@ -136,8 +136,8 @@ Jobs per page:
<li><a href="<?php echo $this->url('log', array('action' => 'job', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("View messages"); ?>"><span class="glyphicon glyphicon-file"></span> View messages</a></li>
<?php if($job->type != "R") : ?>
<li class="divider"></li>
<li><a href="<?php echo $this->url('job', array('action' => 'rerun', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("Rerun"); ?>"><span class="glyphicon glyphicon-repeat"></span> Re-run job</a></li>
<li><a href="<?php echo $this->url('restore', array('action' => 'index'), array('query' => array('type' => 2, 'job' => $job->jobid, 'client' => $job->clientname, 'restoreclient' => $job->clientname))); ?>"><span class="glyphicon glyphicon-import"></span> Restore job</a></li>
<li><a href="<?php echo $this->url('job', array('action' => 'rerun', 'id' => $job->jobid)); ?>" title="<?php echo $this->translate("Rerun"); ?>"><span class="glyphicon glyphicon-repeat"></span> Re-run</a></li>
<!--<li><a href="<?php echo $this->url('restore', array('action' => 'index'), array('query' => array('type' => 2, 'job' => $job->jobid, 'client' => $job->clientname, 'restoreclient' => $job->clientname))); ?>"><span class="glyphicon glyphicon-import"></span> Restore job</a></li>-->
<?php endif; ?>
</ul>
</div>
Expand Down

0 comments on commit 6cc0dee

Please sign in to comment.