|
@@ -2,9 +2,13 @@
|
|
|
|
|
|
namespace FTTHBundle\Admin;
|
|
namespace FTTHBundle\Admin;
|
|
|
|
|
|
|
|
+use FTTHBundle\Form\AnchorType;
|
|
use Sonata\AdminBundle\Datagrid\DatagridMapper;
|
|
use Sonata\AdminBundle\Datagrid\DatagridMapper;
|
|
use Sonata\AdminBundle\Datagrid\ListMapper;
|
|
use Sonata\AdminBundle\Datagrid\ListMapper;
|
|
use Sonata\AdminBundle\Form\FormMapper;
|
|
use Sonata\AdminBundle\Form\FormMapper;
|
|
|
|
+use Sonata\AdminBundle\Form\Type\CollectionType;
|
|
|
|
+use Sonata\AdminBundle\Form\Type\Filter\ChoiceType;
|
|
|
|
+use Sonata\AdminBundle\Form\Type\ModelType;
|
|
use Sonata\AdminBundle\Show\ShowMapper;
|
|
use Sonata\AdminBundle\Show\ShowMapper;
|
|
use WorkflowBundle\Admin\WorkflowBaseAdmin;
|
|
use WorkflowBundle\Admin\WorkflowBaseAdmin;
|
|
|
|
|
|
@@ -22,6 +26,7 @@ class OLTAdmin extends WorkflowBaseAdmin
|
|
->add('snmpCommunity')
|
|
->add('snmpCommunity')
|
|
->add('sshUser')
|
|
->add('sshUser')
|
|
->add('sshPass')
|
|
->add('sshPass')
|
|
|
|
+ ->add('backups')
|
|
;
|
|
;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -38,6 +43,7 @@ class OLTAdmin extends WorkflowBaseAdmin
|
|
->add('sshUser')
|
|
->add('sshUser')
|
|
->add('sshPass')
|
|
->add('sshPass')
|
|
->add('enable')
|
|
->add('enable')
|
|
|
|
+ ->add('backups')
|
|
// ->add('workflow')
|
|
// ->add('workflow')
|
|
->add('currentState','string', array('template' => 'WorkflowBundle:Workflow:base_list_field_current_state.html.twig'))
|
|
->add('currentState','string', array('template' => 'WorkflowBundle:Workflow:base_list_field_current_state.html.twig'))
|
|
->add('_action', 'with-workflow-action', array(
|
|
->add('_action', 'with-workflow-action', array(
|
|
@@ -81,6 +87,15 @@ class OLTAdmin extends WorkflowBaseAdmin
|
|
->add('timeOltOctets', 'integer', array('attr' => array('min' => 0)))
|
|
->add('timeOltOctets', 'integer', array('attr' => array('min' => 0)))
|
|
->end()
|
|
->end()
|
|
->end()
|
|
->end()
|
|
|
|
+ ->tab('Backups')
|
|
|
|
+ ->with('Backup OLT')
|
|
|
|
+ ->add('backups')
|
|
|
|
+ ->add('files', AnchorType::class, array(
|
|
|
|
+ 'required' => false,
|
|
|
|
+ 'data' => $this->getSubject()->obtainFiles($this->getParameter('backups'))
|
|
|
|
+ ))
|
|
|
|
+ ->end()
|
|
|
|
+ ->end()
|
|
;
|
|
;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -100,7 +115,7 @@ class OLTAdmin extends WorkflowBaseAdmin
|
|
->add('sshPass')
|
|
->add('sshPass')
|
|
->add('enable')
|
|
->add('enable')
|
|
->end()
|
|
->end()
|
|
- ->end()
|
|
|
|
|
|
+ ->end()
|
|
->tab('Log')
|
|
->tab('Log')
|
|
->with('Log')
|
|
->with('Log')
|
|
->add('deviceLog','string', array(
|
|
->add('deviceLog','string', array(
|
|
@@ -108,8 +123,17 @@ class OLTAdmin extends WorkflowBaseAdmin
|
|
'translation_domain' => 'DeviceBundle',
|
|
'translation_domain' => 'DeviceBundle',
|
|
))
|
|
))
|
|
->end()
|
|
->end()
|
|
- ->end()
|
|
|
|
|
|
+ ->end()
|
|
|
|
+ ->tab('Backups')
|
|
|
|
+ ->with('Backup OLT')
|
|
|
|
+ ->add('backups')
|
|
|
|
+ ->add('files', 'string', array(
|
|
|
|
+ 'template' => 'FTTHBundle::show_backup_log.html.twig',
|
|
|
|
+ 'translation_domain' => 'FTTHBundle'
|
|
|
|
+ ))
|
|
|
|
+ ->end()
|
|
|
|
+ ->end()
|
|
;
|
|
;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|