Navigation Menu

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

Commit

Permalink
Actions added and modified
Browse files Browse the repository at this point in the history
- indexAction modified
- confirmAction added
- queuedAction added
  • Loading branch information
fbergkemper committed May 8, 2015
1 parent 1f02701 commit ea86acc
Showing 1 changed file with 60 additions and 1 deletion.
61 changes: 60 additions & 1 deletion module/Restore/src/Restore/Controller/RestoreController.php
Expand Up @@ -28,6 +28,7 @@
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Zend\ViewModel\JsonModel;
use Zend\Restore\Form\RestoreForm;

class RestoreController extends AbstractActionController
{
Expand All @@ -39,7 +40,65 @@ class RestoreController extends AbstractActionController
*/
public function indexAction()
{
return new ViewModel();
if($_SESSION['bareos']['authenticated'] == true) {

$form = new RestoreForm(
$this->restore_params,
$this->getJobs("long"),
$this->getClients("long"),
$this->getFilesets("long")
);

return new ViewModel(
'restore_params' => $this->restore_params,
'form' => $form
);

}
else {
return $this->redirect()->toRoute('auth', array('action' => 'login'));
}
}

/**
*
*/
public function confirmAction()
{
if($_SESSION['bareos']['authenticated'] == true) {

// TODO

// 1. display restore job summary
// 2. submit restore job
// 3. modify restore job
// 4. cancel restore job

return new ViewModel();

}
else {
return $this->redirect()->toRoute('auth', array('action' => 'login'));
}
}

/**
*
*/
public function queuedAction()
{
if($_SESSION['bareos']['authenticated'] == true) {

// TODO

// 1. display restore job queued

return new ViewModel();

}
else {
return $this->redirect()->toRoute('auth', array('action' => 'login'));
}
}

/**
Expand Down

0 comments on commit ea86acc

Please sign in to comment.