Browse Source

Merge branch 'master' of https://bitbucket.org/ikflowdat/cablemodem

Daniel Libonati 7 years ago
parent
commit
5b9fb002d0

+ 6 - 6
composer.lock

@@ -1442,7 +1442,7 @@
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/AuthBundle.git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/AuthBundle.git",
-                "reference": "a3ed7031725c4dcae3f67ac3d12fcb97523dd4f0"
+                "reference": "67612309a0afd5d2935dfb8a4bfb9da479a61361"
             },
             },
             "type": "library",
             "type": "library",
             "autoload": {
             "autoload": {
@@ -1457,7 +1457,7 @@
                 "auth",
                 "auth",
                 "bundle"
                 "bundle"
             ],
             ],
-            "time": "2018-05-15T13:12:19+00:00"
+            "time": "2018-05-15T18:25:14+00:00"
         },
         },
         {
         {
             "name": "ik/base-admin-bundle",
             "name": "ik/base-admin-bundle",
@@ -1677,7 +1677,7 @@
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/Webservice.git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/Webservice.git",
-                "reference": "f4c224b26d011c99f789cb4bddf68e1d2cc32645"
+                "reference": "7425e39fc61b46db91ddcfb405adc1b9f38c0d59"
             },
             },
             "require": {
             "require": {
                 "ext-curl": "*",
                 "ext-curl": "*",
@@ -1690,7 +1690,7 @@
                 }
                 }
             },
             },
             "description": "The Flowdat3 Webservice Rest",
             "description": "The Flowdat3 Webservice Rest",
-            "time": "2018-02-27T11:03:58+00:00"
+            "time": "2018-05-22T17:32:16+00:00"
         },
         },
         {
         {
             "name": "ik/workflow-bundle",
             "name": "ik/workflow-bundle",
@@ -1698,7 +1698,7 @@
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/WorkflowBundle.git",
                 "url": "ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/WorkflowBundle.git",
-                "reference": "bd577e702f687cceafb370131d60916ecc2b6976"
+                "reference": "4eff7cff8e2e23771f02e03646d4378c9d8a5e33"
             },
             },
             "require": {
             "require": {
                 "php-amqplib/rabbitmq-bundle": "^1.12"
                 "php-amqplib/rabbitmq-bundle": "^1.12"
@@ -1728,7 +1728,7 @@
                 "bundle",
                 "bundle",
                 "workflow"
                 "workflow"
             ],
             ],
-            "time": "2018-04-25T14:53:54+00:00"
+            "time": "2018-05-22T13:38:30+00:00"
         },
         },
         {
         {
             "name": "incenteev/composer-parameter-handler",
             "name": "incenteev/composer-parameter-handler",

+ 23 - 0
src/CablemodemBundle/Admin/CablemodemAdmin.php

@@ -85,5 +85,28 @@ class CablemodemAdmin extends WorkflowBaseAdmin
             ->add('profile')
             ->add('profile')
             ->add('mtaEnabled')
             ->add('mtaEnabled')
         ;
         ;
+        
+        $this->addDHCPTab($showMapper);
     }
     }
+
+    /**
+     * @param ShowMapper $showMapper
+     */
+    protected function addDHCPTab(ShowMapper $showMapper)
+    {
+        if ($showMapper->hasOpenTab()) {
+            $showMapper
+            ->end()
+            ->end();
+        }
+        $showMapper
+        ->tab('DHCP')
+        ->with('Host')
+        ->add('host', null, array(
+            'template' => 'CablemodemBundle:CRUD:host_show_field.html.twig',
+        ))
+        ->end()
+        ->end();
+    }
+
 }
 }

+ 8 - 0
src/CablemodemBundle/Resources/translations/CablemodemBundle.es.yml

@@ -129,3 +129,11 @@ show:
     label_library: Librería
     label_library: Librería
     label_docs_version: Versión DOCSIS
     label_docs_version: Versión DOCSIS
     label_mta_enabled: MTA Enabled
     label_mta_enabled: MTA Enabled
+
+Mac: Mac
+Options: Opciones
+HostType: Tipo Host
+State: Estado
+active: Activo
+suspended: Suspendido
+disabled: Inactivo

+ 24 - 0
src/CablemodemBundle/Resources/views/CRUD/host_show_field.html.twig

@@ -0,0 +1,24 @@
+{% set host = get_json('dhcp_host_post_url', { mac: object.mac }) %}
+
+{% block field %}
+{% if host %}
+<td>
+<table class="table">
+    <tbody>
+        <tr class="sonata-ba-view-container">
+            <th>{{ 'Mac'|trans({}, 'CablemodemBundle') }}</th><td>{{ host.mac }}</td>
+        </tr>
+        <tr class="sonata-ba-view-container">
+            <th>{{ 'Options'|trans({}, 'CablemodemBundle') }}</th><td>{{ host.options }}</td>
+        </tr>
+        <tr class="sonata-ba-view-container">
+            <th>{{ 'HostType'|trans({}, 'CablemodemBundle') }}</th><td>{{ host.hostType.name }}</td>
+        </tr>
+        <tr class="sonata-ba-view-container">
+            <th>{{ 'State'|trans({}, 'CablemodemBundle') }}</th><td>{{ host.state|trans({}, 'CablemodemBundle') }}</td>
+        </tr>
+    </tbody>
+</table>
+</td>
+{% endif %}
+{% endblock %}