瀏覽代碼

Merge branch 'master' of bitbucket.org:ikflowdat/dhcp into FD3-498

Luciano Andrade 7 年之前
父節點
當前提交
a19b4c8fc2

+ 24 - 0
app/DoctrineMigrations/Version20180126150719.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace Application\Migrations;
+
+use Doctrine\DBAL\Schema\Schema;
+use MigrationsBundle\Migrations\MigrationsBase;
+
+class Version20180126150719 extends MigrationsBase
+{
+    /**
+     * @param Schema $schema
+     */
+    public function up(Schema $schema)
+    {
+        $this->executeYaml(__DIR__, 'Version20180126150719.yml');
+    }
+
+    /**
+     * @param Schema $schema
+     */
+    public function down(Schema $schema)
+    {
+    }
+}

+ 5 - 0
app/DoctrineMigrations/Version20180126150719.yml

@@ -0,0 +1,5 @@
+INSERTORUPDATE:
+    host_type:
+        - id: 1
+          name: "Cablemodem"
+          shortname: "cablemodem"

+ 2 - 0
app/config/config.yml

@@ -40,6 +40,7 @@ framework:
         resource: '%kernel.project_dir%/app/config/routing.yml'
         strict_requirements: ~
     form: ~
+    csrf_protection: ~
     validation: { enable_annotations: true }
     #serializer: { enable_annotations: true }
     templating:
@@ -115,6 +116,7 @@ sonata_admin:
     templates:
         layout: BaseAdminBundle::standard_layout.html.twig
         user_block: BaseOAuthClientBundle:Core:oauth_user_block.html.twig
+        list: BaseAdminBundle::standard_list.html.twig
     persist_filters: true
 
 doctrine_migrations:

+ 17 - 4
app/config/config_dev.yml

@@ -13,14 +13,27 @@ web_profiler:
     intercept_redirects: false
 
 monolog:
+    channels: ['devicelog', 'webservice']
     handlers:
         main:
-            type: stream
-            path: '%kernel.logs_dir%/%kernel.environment%.log'
-            level: debug
+            type:         fingers_crossed
+            action_level: error
+            handler:      grouped
             channels: ['!event']
+        grouped:
+            type:         group
+            members:      [nested, amqp]
+        nested:
+            type:  stream
+            path:  "%kernel.logs_dir%/%kernel.environment%.log"
+            level: debug
+        amqp:
+            type:               service
+            id:                 monolog.amqp
+            level:              debug
+            channels: ['devicelog', 'webservice']
         console:
-            type:   console
+            type: console
             process_psr_3_messages: false
             channels: ['!event', '!doctrine', '!console']
         # To follow logs in real time, execute the following command:

+ 13 - 10
app/config/config_prod.yml

@@ -12,18 +12,21 @@ monolog:
     channels: ['devicelog', 'webservice']
     handlers:
         main:
-            type: fingers_crossed
+            type:         fingers_crossed
             action_level: error
-            handler: nested
+            handler:      grouped
+        grouped:
+            type:         group
+            members:      [nested, amqp]
         nested:
-            type: stream
-            path: '%kernel.logs_dir%/%kernel.environment%.log'
+            type:  stream
+            path:  "%kernel.logs_dir%/%kernel.environment%.log"
             level: debug
-        console:
-            type: console
-            process_psr_3_messages: false
         amqp:
-            type: service
-            id: monolog.amqp
-            level: debug
+            type:               service
+            id:                 monolog.amqp
+            level:              debug
             channels: ['devicelog', 'webservice']
+        console:
+            type: console
+            process_psr_3_messages: false

+ 3 - 3
app/config/parameters.yml.dist

@@ -21,17 +21,17 @@ parameters:
     jms_serializer.camel_case_naming_strategy.class: JMS\Serializer\Naming\IdenticalPropertyNamingStrategy
 
     # amqp queue config
-    rabbit_mq.host:     'amqp'
+    rabbit_mq.host:     127.0.0.1
     rabbit_mq.port:     5672
     rabbit_mq.user:     'guest'
     rabbit_mq.password: 'guest'
     rabbit_mq.vhost:    '/'
 
     db_session_host: mysql
-    db_session_port: ~
+    db_session_port: null
     db_session_name: fd_session
     db_session_user: root
-    db_session_password: 235r2342gtfsw
+    db_session_password: null
     env(AMQP_KEY) : ""
 
     cookie_domain_client: '%env(CLIENT)%'

+ 7 - 0
composer.json

@@ -117,6 +117,13 @@
         {
             "type": "vcs",
             "url": "https://github.com/dwoo-project/dwoo.git"
+        },
+        {
+            "type": "vcs",
+            "url": "ssh://git@infra.flowdat.com:222/VendorSoftwareFlowdat3/WorkflowBundle.git",
+            "options": {
+                    "local_pk": "./keys/bitbucket.id_rsa"
+            }
         }
     ],
     "config": {

+ 1 - 1
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "content-hash": "0e58a04b797c1a40658efb5d40c69568",
+    "content-hash": "46e2a53e3d3827b941c506850fa3eaca",
     "packages": [
         {
             "name": "behat/transliterator",

+ 0 - 4
src/IPv4Bundle/Admin/HostTypeAdmin.php

@@ -18,7 +18,6 @@ class HostTypeAdmin extends BaseAdmin
         $datagridMapper
             ->add('name')
             ->add('shortname')
-            ->add('opcode')
         ;
     }
 
@@ -30,7 +29,6 @@ class HostTypeAdmin extends BaseAdmin
         $listMapper
             ->add('name')
             ->add('shortname')
-            ->add('opcode')
             ->add('_action', null, array(
                 'actions' => array(
                     'show' => array(),
@@ -49,7 +47,6 @@ class HostTypeAdmin extends BaseAdmin
         $formMapper
             ->add('name')
             ->add('shortname')
-            ->add('opcode')
         ;
     }
 
@@ -61,7 +58,6 @@ class HostTypeAdmin extends BaseAdmin
         $showMapper
             ->add('name')
             ->add('shortname')
-            ->add('opcode')
         ;
     }
 }

+ 0 - 7
src/IPv4Bundle/Entity/HostType.php

@@ -43,13 +43,6 @@ class HostType implements PreRemoveInterface
      */
     protected $shortname;
 
-    /**
-     * @var string $opcode
-     *
-     * @ORM\Column(type="string", length=100, unique=true)
-     */
-    protected $opcode;
-
 
     /**
      * @ORM\OneToMany(targetEntity="Host", mappedBy="hostType")

+ 2 - 1
src/IPv4Bundle/Form/HostType.php

@@ -29,7 +29,8 @@ class HostType extends AbstractType
     public function configureOptions(OptionsResolver $resolver)
     {
         $resolver->setDefaults(array(
-            'data_class' => 'IPv4Bundle\Entity\Host'
+            'data_class' => 'IPv4Bundle\Entity\Host',
+            'csrf_protection' => false
         ));
     }
 

+ 4 - 3
src/IPv4Bundle/Form/HostTypeType.php

@@ -13,16 +13,17 @@ class HostTypeType extends AbstractType
      */
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
-        $builder->add('name')->add('shortname')->add('opcode');
+        $builder->add('name')->add('shortname');
     }
-    
+
     /**
      * {@inheritdoc}
      */
     public function configureOptions(OptionsResolver $resolver)
     {
         $resolver->setDefaults(array(
-            'data_class' => 'IPv4Bundle\Entity\HostType'
+            'data_class' => 'IPv4Bundle\Entity\HostType',
+            'csrf_protection' => false
         ));
     }
 

+ 0 - 4
src/IPv4Bundle/Resources/translations/IPv4Bundle.es.yml

@@ -12,7 +12,6 @@ form:
     label_host_type: Tipo de Host
     label_name: Nombre
     label_shortname: Nombre corto
-    label_opcode: Opcode
     label_first_ip: Primer IP
     label_last_ip: Última IP
     label_sub_net: Subred
@@ -31,7 +30,6 @@ list:
     label__action: Acciones
     label_name: Nombre
     label_shortname: Nombre corto
-    label_opcode: Opcode
     label_first_ip: Primer IP
     label_last_ip: Última IP
     label_sub_net: Subred
@@ -49,7 +47,6 @@ show:
     label_host_type: Tipo de Host
     label_name: Nombre
     label_shortname: Nombre corto
-    label_opcode: Opcode
     label_first_ip: Primer IP
     label_last_ip: Última IP
     label_sub_net: Subred
@@ -65,7 +62,6 @@ filter:
     label_mac: Mac
     label_name: Nombre
     label_shortname: Nombre corto
-    label_opcode: Opcode
     label_first_ip: Primer IP
     label_last_ip: Última IP
     label_priority: Prioridad