|
@@ -7,6 +7,7 @@ use Sonata\AdminBundle\Datagrid\DatagridMapper;
|
|
|
use Sonata\AdminBundle\Datagrid\ListMapper;
|
|
|
use Sonata\AdminBundle\Form\FormMapper;
|
|
|
use Sonata\AdminBundle\Show\ShowMapper;
|
|
|
+use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
|
|
|
|
|
class SubNetAdmin extends BaseAdmin
|
|
|
{
|
|
@@ -17,6 +18,8 @@ class SubNetAdmin extends BaseAdmin
|
|
|
{
|
|
|
$datagridMapper
|
|
|
->add('address')
|
|
|
+ ->add('allowedHostType')
|
|
|
+ ->add('status')
|
|
|
;
|
|
|
}
|
|
|
|
|
@@ -29,6 +32,7 @@ class SubNetAdmin extends BaseAdmin
|
|
|
->add('address')
|
|
|
->add('options')
|
|
|
->add('allowedHostType')
|
|
|
+ ->add('status')
|
|
|
->add('netGroup')
|
|
|
->add('ipPool')
|
|
|
->add('_action', null, array(
|
|
@@ -51,6 +55,14 @@ class SubNetAdmin extends BaseAdmin
|
|
|
->with('')
|
|
|
->add('address')
|
|
|
->add('allowedHostType')
|
|
|
+ ->add('status', ChoiceType::class, [
|
|
|
+ 'required' => false,
|
|
|
+ 'choices' => [
|
|
|
+ 'none' => '',
|
|
|
+ 'active' => 'active',
|
|
|
+ 'suspended' => 'suspended',
|
|
|
+ ],
|
|
|
+ ])
|
|
|
->add('netGroup')
|
|
|
->end()
|
|
|
->end()
|
|
@@ -65,6 +77,7 @@ class SubNetAdmin extends BaseAdmin
|
|
|
$showMapper
|
|
|
->add('address')
|
|
|
->add('allowedHostType')
|
|
|
+ ->add('status')
|
|
|
->add('netGroup')
|
|
|
->add('ipPool')
|
|
|
;
|