diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f29057d --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +# Bootstrap +app/bootstrap* + +# Symfony directories +vendor/* +*/logs/* +*/cache/* +web/uploads/* +web/bundles/* + +# Configuration files +app/config/parameters.ini +app/config/parameters.yml + +# Composer +composer.phar +composer.lock + +# Ignore SVN +*.svn + +# Ignora toda a pasta Web +web/assets/ +web/css/ +web/downloads/ +web/images/ +web/js/ +web/assetic/ + +# Ignora htaccess +.htaccess + +# Ignora arquivo do importador +src/Cacic/CommonBundle/Resources/data/importacao.zip diff --git a/app/AppKernel.php b/app/AppKernel.php index b6133d3..2ae5d7f 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -29,6 +29,8 @@ class AppKernel extends Kernel new Ijanki\Bundle\FtpBundle\IjankiFtpBundle(), new FM\ElfinderBundle\FMElfinderBundle(), new Knp\Bundle\MenuBundle\KnpMenuBundle(), + new Swpb\Bundle\CocarBundle\CocarBundle(), + new Ddeboer\DataImportBundle\DdeboerDataImportBundle() ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig index 1f11232..c9902b2 100644 --- a/app/Resources/views/base.html.twig +++ b/app/Resources/views/base.html.twig @@ -2,9 +2,9 @@ - {{ "CACIC - Configurador Automático e Coletor de Informações Computacionais"|trans }} - - + {% block meta %} + {% endblock %} + - - - - - + + + + + + + @@ -105,191 +108,38 @@
-
-
- DashboardCACIC0 -
+ +
+ {% if bundleExists('CocarBundle') %} + DashboardCOCAR0 + + {% endif %} + DashboardCACIC0 +
+
-
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/Cacic/CommonBundle/Resources/views/GrupoUsuario/cadastrar.html.twig b/src/Cacic/CommonBundle/Resources/views/GrupoUsuario/cadastrar.html.twig index e6296d0..2e87350 100644 --- a/src/Cacic/CommonBundle/Resources/views/GrupoUsuario/cadastrar.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/GrupoUsuario/cadastrar.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Grupo de Usuários"|trans }}
  • / diff --git a/src/Cacic/CommonBundle/Resources/views/GrupoUsuario/index.html.twig b/src/Cacic/CommonBundle/Resources/views/GrupoUsuario/index.html.twig index a77e838..e50b969 100644 --- a/src/Cacic/CommonBundle/Resources/views/GrupoUsuario/index.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/GrupoUsuario/index.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Grupos de Usuários"|trans }}
  • diff --git a/src/Cacic/CommonBundle/Resources/views/Local/cadastrar.html.twig b/src/Cacic/CommonBundle/Resources/views/Local/cadastrar.html.twig index 396bd1b..92e2024 100644 --- a/src/Cacic/CommonBundle/Resources/views/Local/cadastrar.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Local/cadastrar.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Locais"|trans }}
  • / diff --git a/src/Cacic/CommonBundle/Resources/views/Local/importarcsv.html.twig b/src/Cacic/CommonBundle/Resources/views/Local/importarcsv.html.twig index 5577728..311b2c2 100644 --- a/src/Cacic/CommonBundle/Resources/views/Local/importarcsv.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Local/importarcsv.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Locais"|trans }}
  • / diff --git a/src/Cacic/CommonBundle/Resources/views/Local/index.html.twig b/src/Cacic/CommonBundle/Resources/views/Local/index.html.twig index 5d08f0d..2706486 100644 --- a/src/Cacic/CommonBundle/Resources/views/Local/index.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Local/index.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Locais"|trans }}
  • diff --git a/src/Cacic/CommonBundle/Resources/views/Log/acesso.html.twig b/src/Cacic/CommonBundle/Resources/views/Log/acesso.html.twig index d5a4b74..6b05ad9 100644 --- a/src/Cacic/CommonBundle/Resources/views/Log/acesso.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Log/acesso.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ 'Log de Acesso'|trans }}
  • @@ -104,4 +104,4 @@ {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/Cacic/CommonBundle/Resources/views/Log/atividade.html.twig b/src/Cacic/CommonBundle/Resources/views/Log/atividade.html.twig index bf02a9b..e943092 100644 --- a/src/Cacic/CommonBundle/Resources/views/Log/atividade.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Log/atividade.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ 'Log de Atividades'|trans }}
  • diff --git a/src/Cacic/CommonBundle/Resources/views/Log/insucesso.html.twig b/src/Cacic/CommonBundle/Resources/views/Log/insucesso.html.twig index a35d9f9..ddc03c4 100644 --- a/src/Cacic/CommonBundle/Resources/views/Log/insucesso.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Log/insucesso.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ 'Logs de Insucessos de Instalação'|trans }}
  • diff --git a/src/Cacic/CommonBundle/Resources/views/Log/suporte.html.twig b/src/Cacic/CommonBundle/Resources/views/Log/suporte.html.twig index 031e303..b3231fe 100644 --- a/src/Cacic/CommonBundle/Resources/views/Log/suporte.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Log/suporte.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ 'Log de Suporte Remoto'|trans }}
  • diff --git a/src/Cacic/CommonBundle/Resources/views/Modulo/editar.html.twig b/src/Cacic/CommonBundle/Resources/views/Modulo/editar.html.twig index 5926647..6bd695d 100644 --- a/src/Cacic/CommonBundle/Resources/views/Modulo/editar.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Modulo/editar.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Módulos"|trans }} /
  • diff --git a/src/Cacic/CommonBundle/Resources/views/Modulo/index.html.twig b/src/Cacic/CommonBundle/Resources/views/Modulo/index.html.twig index 745b4ed..5a82638 100644 --- a/src/Cacic/CommonBundle/Resources/views/Modulo/index.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Modulo/index.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Módulos"|trans }}
  • diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1.html.twig index cc30832..0f116c5 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1.html.twig @@ -18,7 +18,7 @@
    {{ ' Exemplo "Selecione a Gerência de localização este equipamento" '|trans }}
    -
    {{ 'Elemento origatório?'|trans }}
    +
    {{ 'Elemento obrigatório?'|trans }}
    {{ form_widget(form.inObrigatorio) }}
    {{ ' O preenchimento do campo é obrigatório? '|trans }}
    diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1a.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1a.html.twig index ff28272..f89e403 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1a.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1a.html.twig @@ -18,7 +18,7 @@
    {{ ' Exemplo "Selecione a Linha de negócio de localização deste equipamento" '|trans }}
    -
    {{ 'Elemento origatório?'|trans }}
    +
    {{ 'Elemento obrigatório?'|trans }}
    {{ form_widget(form.inObrigatorio) }}
    {{ ' O preenchimento do campo é obrigatório? '|trans }}
    diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta2.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta2.html.twig index eb419f5..00d9caf 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta2.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta2.html.twig @@ -17,7 +17,7 @@
    {{ ' Exemplo "Selecione a divisão onde encontra-se este equipamento" '|trans }}
    -
    {{ 'Elemento origatório?'|trans }}
    +
    {{ 'Elemento obrigatório?'|trans }}
    {{ form_widget(form.inObrigatorio) }}
    {{ ' O preenchimento do campo é obrigatório? '|trans }}
    diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta3.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta3.html.twig index 0668a5b..b6bc718 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta3.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta3.html.twig @@ -12,7 +12,7 @@
    {{ ' Exemplo "Informe o setor onde esta localizado o equipamento." '|trans }}
    -
    {{ 'Elemento origatório?'|trans }}
    +
    {{ 'Elemento obrigatório?'|trans }}
    {{ form_widget(form.inObrigatorio) }}
    {{ ' O preenchimento do campo é obrigatório? '|trans }}
    diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta4.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta4.html.twig index f606d46..59df82d 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta4.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta4.html.twig @@ -18,7 +18,7 @@ {{ form_widget(form.inDestacarDuplicidade)}} -
    {{ 'Elemento origatório?'|trans }}
    +
    {{ 'Elemento obrigatório?'|trans }}
    {{ form_widget(form.inObrigatorio) }}
    {{ ' O preenchimento do campo é obrigatório? '|trans }}
    diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta5.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta5.html.twig index c7fb03b..4276d50 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta5.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta5.html.twig @@ -18,7 +18,7 @@ {{ form_widget(form.inDestacarDuplicidade)}} -
    {{ 'Elemento origatório?'|trans }}
    +
    {{ 'Elemento obrigatório?'|trans }}
    {{ form_widget(form.inObrigatorio) }}
    {{ ' O preenchimento do campo é obrigatório? '|trans }}
    diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta6.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta6.html.twig index 77c8152..c11544c 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta6.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta6.html.twig @@ -18,7 +18,7 @@ {{ form_widget(form.inDestacarDuplicidade)}} -
    {{ 'Elemento origatório?'|trans }}
    +
    {{ 'Elemento obrigatório?'|trans }}
    {{ form_widget(form.inObrigatorio) }}
    {{ ' O preenchimento do campo é obrigatório? '|trans }}
    diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta7.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta7.html.twig index 485a0a3..4bfb319 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta7.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta7.html.twig @@ -18,7 +18,7 @@ {{ form_widget(form.inDestacarDuplicidade)}} -
    {{ 'Elemento origatório?'|trans }}
    +
    {{ 'Elemento obrigatório?'|trans }}
    {{ form_widget(form.inObrigatorio) }}
    {{ ' O preenchimento do campo é obrigatório? '|trans }}
    diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta8.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta8.html.twig index ac5bb67..9fc9c44 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta8.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta8.html.twig @@ -18,7 +18,7 @@ {{ form_widget(form.inDestacarDuplicidade)}} -
    {{ 'Elemento origatório?'|trans }}
    +
    {{ 'Elemento obrigatório?'|trans }}
    {{ form_widget(form.inObrigatorio) }}
    {{ ' O preenchimento do campo é obrigatório? '|trans }}
    diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta9.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta9.html.twig index e7f71d7..681ee27 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta9.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta9.html.twig @@ -19,7 +19,7 @@ {{ form_widget(form.inDestacarDuplicidade)}} -
    {{ 'Elemento origatório?'|trans }}
    +
    {{ 'Elemento obrigatório?'|trans }}
    {{ form_widget(form.inObrigatorio) }}
    {{ ' O preenchimento do campo é obrigatório? '|trans }}
    diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/index.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/index.html.twig index 4587b42..f0180eb 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/index.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/index.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block body %} diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/interface.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/interface.html.twig index b720ca6..df8f9b9 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/interface.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/interface.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block body %} diff --git a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/opcoes.html.twig b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/opcoes.html.twig index 155b4f4..c54067a 100644 --- a/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/opcoes.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/opcoes.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Opções"|trans }}
  • diff --git a/src/Cacic/CommonBundle/Resources/views/Rede/cadastrar.html.twig b/src/Cacic/CommonBundle/Resources/views/Rede/cadastrar.html.twig index 231f05e..705c45b 100644 --- a/src/Cacic/CommonBundle/Resources/views/Rede/cadastrar.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Rede/cadastrar.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "SubRedes"|trans }}
  • / diff --git a/src/Cacic/CommonBundle/Resources/views/Rede/importarcsv.html.twig b/src/Cacic/CommonBundle/Resources/views/Rede/importarcsv.html.twig index 4a24b67..94e642d 100644 --- a/src/Cacic/CommonBundle/Resources/views/Rede/importarcsv.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Rede/importarcsv.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Subredes"|trans }}
  • / diff --git a/src/Cacic/CommonBundle/Resources/views/Rede/index.html.twig b/src/Cacic/CommonBundle/Resources/views/Rede/index.html.twig index 6b1ff2f..58048d4 100644 --- a/src/Cacic/CommonBundle/Resources/views/Rede/index.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Rede/index.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Subredes"|trans }}
  • @@ -86,22 +86,95 @@
    -
    -
    -
    -

    Em manunteção!!!

    -
    -
    -
    +
    {% endblock %} + + +{% block stylesheets %} + + {{ parent() }} + + + + + +{% endblock %} + + {% block javascripts %} {{ parent() }} - + + -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/Cacic/CommonBundle/Resources/views/Rede/manutencao.html.twig b/src/Cacic/CommonBundle/Resources/views/Rede/manutencao.html.twig index 789fa85..f8eebae 100644 --- a/src/Cacic/CommonBundle/Resources/views/Rede/manutencao.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Rede/manutencao.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ 'Atualizacoes de subredes'|trans }}
  • diff --git a/src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/cadastrar.html.twig b/src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/cadastrar.html.twig index ceabd12..62887b9 100644 --- a/src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/cadastrar.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/cadastrar.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ 'Servidor de Autenticação'|trans }}
  • / diff --git a/src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/index.html.twig b/src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/index.html.twig index 7bdae5b..53b49f8 100644 --- a/src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/index.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/index.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Servidores de Autenticação"|trans }}
  • diff --git a/src/Cacic/CommonBundle/Resources/views/So/cadastrar.html.twig b/src/Cacic/CommonBundle/Resources/views/So/cadastrar.html.twig index fe7bfe0..f6e9a2d 100644 --- a/src/Cacic/CommonBundle/Resources/views/So/cadastrar.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/So/cadastrar.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Sistemas Operacionais"|trans }}
  • / diff --git a/src/Cacic/CommonBundle/Resources/views/So/importarcsv.html.twig b/src/Cacic/CommonBundle/Resources/views/So/importarcsv.html.twig index cd08ac2..ae88e44 100644 --- a/src/Cacic/CommonBundle/Resources/views/So/importarcsv.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/So/importarcsv.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Sistemas Operacionais"|trans }}
  • / diff --git a/src/Cacic/CommonBundle/Resources/views/So/index.html.twig b/src/Cacic/CommonBundle/Resources/views/So/index.html.twig index 95dd874..c152bad 100644 --- a/src/Cacic/CommonBundle/Resources/views/So/index.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/So/index.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Sistemas Operacionais"|trans }}
  • diff --git a/src/Cacic/CommonBundle/Resources/views/Software/cadastrar.html.twig b/src/Cacic/CommonBundle/Resources/views/Software/cadastrar.html.twig index 308e744..93f35b1 100644 --- a/src/Cacic/CommonBundle/Resources/views/Software/cadastrar.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Software/cadastrar.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ 'Softwares'|trans }}
  • / diff --git a/src/Cacic/CommonBundle/Resources/views/Software/index.html.twig b/src/Cacic/CommonBundle/Resources/views/Software/index.html.twig index 4598702..5bb57a1 100644 --- a/src/Cacic/CommonBundle/Resources/views/Software/index.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Software/index.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ 'Software'|trans }}
  • diff --git a/src/Cacic/CommonBundle/Resources/views/Software/naoclassificados.html.twig b/src/Cacic/CommonBundle/Resources/views/Software/naoclassificados.html.twig index ff00d4d..b0f9f00 100644 --- a/src/Cacic/CommonBundle/Resources/views/Software/naoclassificados.html.twig +++ b/src/Cacic/CommonBundle/Resources/views/Software/naoclassificados.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ 'Softwares Não Classificados'|trans }}
  • @@ -49,9 +49,12 @@ - + {# display navigation #} +
    -
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    + +

    {{ "Informações Adicionais"|trans }}

    + +
    +

    + {{ "Faturamento"|trans }}. +

    +

    + {{ "O período é obrigatório"|trans }}. +

    +

    + {{ "Não selecionar nenhum valor em determinado critério é o mesmo que selecionar todos"|trans }}. +

    +
    +
    +
    + + + + {% if logs is not null %} + {% include 'CacicRelatorioBundle:Faturamento:inativosResultado.html.twig' %} + + {% endif %} + +{% endblock %} + +{% block javascripts %} + + + + {{ parent() }} + {% if locale == 'pt_BR' %} + + + + {% else %} + + + + {% endif %} +{% endblock %} diff --git a/src/Cacic/RelatorioBundle/Resources/views/Faturamento/inativosResultado.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Faturamento/inativosResultado.html.twig new file mode 100755 index 0000000..7b616aa --- /dev/null +++ b/src/Cacic/RelatorioBundle/Resources/views/Faturamento/inativosResultado.html.twig @@ -0,0 +1,58 @@ +
    +
    +
    +

    {{'Total de estações inativas' |trans }}

    +
    + + +
    + + + + + + + + + + + + + + + {% for log in logs %} + + + + + + + + + + + {% else %} + + + + {% endfor %} + + +
    {{ "Local"|trans }}{{ "Rede"|trans }}{{ "Endereço IP"|trans }}{{ "Estações"|trans }} + +
    {{ loop.index }} + + {{ log['nmLocal'] }} + {{ log['nmRede'] }}{{ log['teIpRede'] }}{{ log['numComp'] }} + + + +
    {{ "NENHUM REGISTRO ENCONTRADO!"|trans }}
    + + +
    + +
    +
    +
    +
    diff --git a/src/Cacic/RelatorioBundle/Resources/views/Faturamento/index.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Faturamento/index.html.twig new file mode 100755 index 0000000..15adb76 --- /dev/null +++ b/src/Cacic/RelatorioBundle/Resources/views/Faturamento/index.html.twig @@ -0,0 +1,122 @@ +{% extends 'CacicCommonBundle::base.html.twig' %} + +{% block breadcrumb %} +
  • {{ 'Faturamento'|trans }}
  • +{% endblock %} + +{% block body %} + +
    + +
    +
    + +

    {{'Faturamento mensal' |trans }}

    + +
    + +

    {{ "Filtros para faturamento mensal"|trans }}


    + +
    + +
    + +
    + {{ form_widget(form.dtAcaoInicio, { 'attr': {'class': 'datepicker_on'} }) }} a {{ form_widget(form.dtAcaoFim, { 'attr': {'class': 'datepicker_on'} }) }} +

    {{ "Informe o período no qual deseja realizar a faturar."|trans }}

    +
    +
    + +
    + +
    + + +
    + +
    + {{ form_widget(form.idLocal, {'form_type': 'horizontal'}) }} +
    +
    +
    + +
    + +
    +
    + + +
    +
    + +
    +
    +
    +
    + +
    +
    + +

    {{ "Informações Adicionais"|trans }}

    + +
    +

    + {{ "Faturamento"|trans }}. +

    +

    + {{ "O período é obrigatório"|trans }}. +

    +

    + {{ "Não selecionar nenhum valor em determinado critério é o mesmo que selecionar todos"|trans }}. +

    +
    +
    +
    + +
    + + {% if logs is not null %} + {% include 'CacicRelatorioBundle:Faturamento:acessoResultado.html.twig' %} + + {% endif %} + +{% endblock %} + +{% block javascripts %} + + + + {{ parent() }} + {% if locale == 'pt_BR' %} + + + + {% else %} + + + + {% endif %} +{% endblock %} \ No newline at end of file diff --git a/src/Cacic/RelatorioBundle/Resources/views/Faturamento/listar.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Faturamento/listar.html.twig new file mode 100755 index 0000000..f89ff95 --- /dev/null +++ b/src/Cacic/RelatorioBundle/Resources/views/Faturamento/listar.html.twig @@ -0,0 +1,46 @@ +{% extends 'CacicRelatorioBundle::base.html.twig' %} + +{% block body %} + +

    {{ 'Relatório de máquinas da subrede '|trans }} {{ rede }}

    +
    {{ 'Relatório gerado em'|trans }} {% if idioma == 'pt_BR' %}{{ "now"|date("d/m/Y H\\hi") }}{% else %}{{ "now"|date("m/d/Y H\\hi") }}{% endif %}
    + +
    + + + + + + + + + + + + + + + + + {% for reg in dados %} + + + + + + + + + + + {% else %} + + + + {% endfor %} + +
    {{ "Computador"|trans }}{{ "MAC Address"|trans }}{{ "Endereço IP"|trans }}{{ "Sistema Operacional"|trans }}{{ "Local"|trans }}{{ "Subrede"|trans }}{{ "Data/Hora da Última coleta"|trans }}
    {{ loop.index }} + {{ reg.nmComputador }} + {{ reg.teNodeAddress }}{{ reg.teIpComputador }}{{ reg.sgSo }}{{ reg.nmLocal }}{{ reg.nmRede }} / {{ reg.teIpRede }}{{ reg.data|date(' d, M, Y H:m:s') }}
    {{ "NENHUM REGISTRO ENCONTRADO!"|trans }}
    + +{% endblock %} diff --git a/src/Cacic/RelatorioBundle/Resources/views/Faturamento/listarInativos.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Faturamento/listarInativos.html.twig new file mode 100755 index 0000000..53b47ea --- /dev/null +++ b/src/Cacic/RelatorioBundle/Resources/views/Faturamento/listarInativos.html.twig @@ -0,0 +1,44 @@ +{% extends 'CacicRelatorioBundle::base.html.twig' %} + +{% block body %} + +

    {{ 'Relatório de máquinas da subrede '|trans }} {{ rede }}

    +
    {{ 'Relatório gerado em'|trans }} {% if idioma == 'pt_BR' %}{{ "now"|date("d/m/Y H\\hi") }}{% else %}{{ "now"|date("m/d/Y H\\hi") }}{% endif %}
    + +
    + + + + + + + + + + + + + + + + {% for reg in dados %} + + + + + + + + + + {% else %} + + + + {% endfor %} + +
    {{ "Computador"|trans }}{{ "MAC Address"|trans }}{{ "Endereço IP"|trans }}{{ "Sistema Operacional"|trans }}{{ "Local"|trans }}{{ "Subrede"|trans }}
    {{ loop.index }} + {{ reg.nmComputador }} + {{ reg.teNodeAddress }}{{ reg.teIpComputador }}{{ reg.sgSo }}{{ reg.nmLocal }}{{ reg.nmRede }} / {{ reg.teIpRede }}
    {{ "NENHUM REGISTRO ENCONTRADO!"|trans }}
    + +{% endblock %} diff --git a/src/Cacic/RelatorioBundle/Resources/views/Hardware/configuracoes_filtro.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Hardware/configuracoes_filtro.html.twig index ea6638b..9cde5fc 100644 --- a/src/Cacic/RelatorioBundle/Resources/views/Hardware/configuracoes_filtro.html.twig +++ b/src/Cacic/RelatorioBundle/Resources/views/Hardware/configuracoes_filtro.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Relatório de Configurações de Hardware"|trans }}
  • diff --git a/src/Cacic/RelatorioBundle/Resources/views/Hardware/wmi_filtro.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Hardware/wmi_filtro.html.twig index fcbe8ab..d3b8610 100755 --- a/src/Cacic/RelatorioBundle/Resources/views/Hardware/wmi_filtro.html.twig +++ b/src/Cacic/RelatorioBundle/Resources/views/Hardware/wmi_filtro.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Relatório da Classe "|trans }} {{ classe }}
  • diff --git a/src/Cacic/RelatorioBundle/Resources/views/Software/inventariados_filtro.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Software/inventariados_filtro.html.twig index 3d371aa..bce09aa 100644 --- a/src/Cacic/RelatorioBundle/Resources/views/Software/inventariados_filtro.html.twig +++ b/src/Cacic/RelatorioBundle/Resources/views/Software/inventariados_filtro.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Relatório de Softwares Inventariados"|trans }}
  • @@ -21,7 +21,7 @@ tSW.populate([ // Popula o TRANSFER com Softwares {% for sw in softwares %} - {value: "{{ sw[0]['idSoftware'] }}", content:"{{ sw[0]['nmSoftware'] }}"}{% if loop.last != true %},{% endif %} + {value: "{{ sw['idClassProperty'] }}", content:"{{ sw['nmSoftware'] }}"}{% if loop.last != true %},{% endif %} {% endfor %} ]); diff --git a/src/Cacic/RelatorioBundle/Resources/views/Software/licenciados_filtro.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Software/licenciados_filtro.html.twig index c093636..159442f 100644 --- a/src/Cacic/RelatorioBundle/Resources/views/Software/licenciados_filtro.html.twig +++ b/src/Cacic/RelatorioBundle/Resources/views/Software/licenciados_filtro.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Relatório de Softwares Licenciados"|trans }}
  • @@ -18,7 +18,7 @@ tSW.populate([ // Popula o TRANSFER com Softwares {% for sw in softwares %} - {value: "{{ sw[0]['idSoftware'] }}", content:"{{ sw[0]['nmSoftware'] }}"}{% if loop.last != true %},{% endif %} + {value: "{{ sw['idClassProperty'] }}", content:"{{ sw['nmSoftware'] }}"}{% if loop.last != true %},{% endif %} {% endfor %} ]); diff --git a/src/Cacic/RelatorioBundle/Resources/views/Software/orgao_filtro.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Software/orgao_filtro.html.twig index 03dca01..a96fba7 100644 --- a/src/Cacic/RelatorioBundle/Resources/views/Software/orgao_filtro.html.twig +++ b/src/Cacic/RelatorioBundle/Resources/views/Software/orgao_filtro.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Relatório de Softwares por Órgão/Máquina"|trans }}
  • diff --git a/src/Cacic/RelatorioBundle/Resources/views/Software/rel_aquisicoes.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Software/rel_aquisicoes.html.twig index a7aafee..eb9866a 100644 --- a/src/Cacic/RelatorioBundle/Resources/views/Software/rel_aquisicoes.html.twig +++ b/src/Cacic/RelatorioBundle/Resources/views/Software/rel_aquisicoes.html.twig @@ -11,10 +11,10 @@ {{ "Processo"|trans }} - {{ "Data"|trans }} + {{ "Data de Aquisição"|trans }} {{ "Empresa"|trans }} {{ "Proprietário"|trans }} - {{ "Nº da NF"|trans }} + {{ "Pregão/Contrato"|trans }} diff --git a/src/Cacic/RelatorioBundle/Resources/views/Software/rel_inventariados.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Software/rel_inventariados.html.twig index bfaaf37..18d3a70 100644 --- a/src/Cacic/RelatorioBundle/Resources/views/Software/rel_inventariados.html.twig +++ b/src/Cacic/RelatorioBundle/Resources/views/Software/rel_inventariados.html.twig @@ -12,7 +12,6 @@ {{ "Software"|trans }} {{ "Local"|trans }} - {{ "Subrede"|trans }} {{ "Máquinas"|trans }} @@ -22,10 +21,9 @@ {% for reg in dados %} - {{ reg['nmSoftware'] }} + {{ reg['nmSoftware'] }} {{ reg['nmLocal'] }} - {{ reg['nmRede'] }} / {{ reg['teIpRede'] }} - {{ reg['numComp'] }} + {{ reg['numComp'] }} {% else %} diff --git a/src/Cacic/RelatorioBundle/Resources/views/Software/rel_software_lista.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Software/rel_software_lista.html.twig index e41f9e4..d68cf0c 100755 --- a/src/Cacic/RelatorioBundle/Resources/views/Software/rel_software_lista.html.twig +++ b/src/Cacic/RelatorioBundle/Resources/views/Software/rel_software_lista.html.twig @@ -35,7 +35,7 @@ {% else %} - {{ "NENHUM REGISTRO ENCONTRADO!"|trans }} + {{ "NENHUM REGISTRO ENCONTRADO!"|trans }} {% endfor %} diff --git a/src/Cacic/RelatorioBundle/Resources/views/Software/rel_tipo.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Software/rel_tipo.html.twig index fee038b..2b1525b 100644 --- a/src/Cacic/RelatorioBundle/Resources/views/Software/rel_tipo.html.twig +++ b/src/Cacic/RelatorioBundle/Resources/views/Software/rel_tipo.html.twig @@ -21,7 +21,8 @@ {{ reg.teDescricaoTipoSoftware }} {{ reg.nmSoftware }} - {{ reg.numComp }} + + {{ reg.numComp }} {% else %} diff --git a/src/Cacic/RelatorioBundle/Resources/views/Software/tipo_filtro.html.twig b/src/Cacic/RelatorioBundle/Resources/views/Software/tipo_filtro.html.twig index 3d67988..47b17ee 100644 --- a/src/Cacic/RelatorioBundle/Resources/views/Software/tipo_filtro.html.twig +++ b/src/Cacic/RelatorioBundle/Resources/views/Software/tipo_filtro.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'CacicCommonBundle::base.html.twig' %} {% block breadcrumb %}
  • {{ "Relatório de Softwares por Tipo"|trans }}
  • diff --git a/src/Cacic/WSBundle/Controller/ColetaController.php b/src/Cacic/WSBundle/Controller/ColetaController.php index ee31f13..9462141 100644 --- a/src/Cacic/WSBundle/Controller/ColetaController.php +++ b/src/Cacic/WSBundle/Controller/ColetaController.php @@ -124,7 +124,7 @@ class ColetaController extends Controller // A propriedade da coleta de software é multi valorada. Preciso tratar diferente if ($strClassName == "SoftwareList") { - // Primeiro preciso pegar todas as tags qure forem software + // Primeiro preciso pegar todas as tags que forem software $arrSoftware = TagValueHelper::getSoftwareTags($strNewClassValues); // Agora insere cada registro de software individualmente @@ -150,6 +150,7 @@ class ColetaController extends Controller // Se o IDSoftware não existir, cria if (empty($idClassProperty)) { + $logger->debug("Software $softwareName não encontrado. Adicionando um novo software"); // Pega o Id da classe $idClass = $this->getDoctrine()->getRepository('CacicCommonBundle:Classe')->findOneBy( array('nmClassName'=>$strClassName) ); @@ -171,40 +172,55 @@ class ColetaController extends Controller // Chama função que grava a propriedade $this->gerColsSetProperty('IDSoftware', $software, $idClassProperty, $computador); - // Adiciona referência à tabela de softwares - $softwareObject = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->findOneBy( array('nmSoftware' => $softwareName) ); + // Agora gravo todas as propriedades para o software na tabela propriedade_software + $propriedadeSoftware = $this->getDoctrine()->getRepository('CacicCommonBundle:PropriedadeSoftware')->findOneBy( array('classProperty'=> $idClassProperty, 'computador' => $computador) ); + $classPropertyObject = $this->getDoctrine()->getRepository('CacicCommonBundle:ClassProperty')->findOneBy( array( 'idClassProperty'=> $idClassProperty ) ); - // Se for fazio, crio o objeto software - if (empty($softwareObject)) { + if (empty($propriedadeSoftware)) { + // Primeiro crio o software $softwareObject = new Software(); - } - // Se não tiver nome coloco o ID Software no nome - if (empty($arrTagsNames['DisplayName'])) { - $softwareObject->setNmSoftware($softwareName); - } else { - $softwareObject->setNmSoftware($arrTagsNames['DisplayName']); - } - - // Grava software recém inserido - $this->getDoctrine()->getManager()->persist($softwareObject); - $this->getDoctrine()->getManager()->flush(); + // Se não tiver nome coloco o ID Software no nome + if (empty($arrTagsNames['DisplayName'])) { + $softwareObject->setNmSoftware($softwareName); + } else { + $softwareObject->setNmSoftware($arrTagsNames['DisplayName']); + } - // Agora gravo todas as propriedades para o software na tabela propriedade_software - $classPropertyObject = $this->getDoctrine()->getRepository('CacicCommonBundle:ClassProperty')->findOneBy( array( 'idClassProperty'=> $idClassProperty ) ); - $propriedadeSoftware = $this->getDoctrine()->getRepository('CacicCommonBundle:PropriedadeSoftware')->findOneBy( array('classProperty'=> $idClassProperty, 'computador' => $computador, 'software' => $softwareObject->getIdSoftware()) ); + // Grava software recém inserido + $this->getDoctrine()->getManager()->persist($softwareObject); + $this->getDoctrine()->getManager()->flush(); - if (empty($propriedadeSoftware)) { + // Depois adiciono as propriedades $propriedadeSoftware = new PropriedadeSoftware(); $propriedadeSoftware->setClassProperty($classPropertyObject); $propriedadeSoftware->setComputador($computador); + + // Ajusta valores coletados + $propriedadeSoftware->setDisplayName($arrTagsNames['DisplayName']); + $propriedadeSoftware->setDisplayVersion($arrTagsNames['DisplayVersion']); + $propriedadeSoftware->setURLInfoAbout($arrTagsNames['URLInfoAbout']); $propriedadeSoftware->setSoftware($softwareObject); // Grava no banco de dados $this->getDoctrine()->getManager()->persist($propriedadeSoftware); $this->getDoctrine()->getManager()->flush(); } else { + // Adiciona referência à tabela de softwares + $softwareObject = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->find( $propriedadeSoftware->getSoftware()->getIdSoftware() ); + + // Se não tiver nome coloco o ID Software no nome + if (empty($arrTagsNames['DisplayName'])) { + $softwareObject->setNmSoftware($softwareName); + } else { + $softwareObject->setNmSoftware($arrTagsNames['DisplayName']); + } + + // Grava software recém inserido + $this->getDoctrine()->getManager()->persist($softwareObject); + $this->getDoctrine()->getManager()->flush(); + // Ajusta valores coletados $propriedadeSoftware->setDisplayName($arrTagsNames['DisplayName']); $propriedadeSoftware->setDisplayVersion($arrTagsNames['DisplayVersion']); diff --git a/src/Cacic/WSBundle/Controller/DefaultController.php b/src/Cacic/WSBundle/Controller/DefaultController.php index 44e2b20..9e854e8 100644 --- a/src/Cacic/WSBundle/Controller/DefaultController.php +++ b/src/Cacic/WSBundle/Controller/DefaultController.php @@ -17,6 +17,8 @@ use Cacic\CommonBundle\Entity\InsucessoInstalacao; use Cacic\CommonBundle\Entity\RedeVersaoModulo; use Cacic\WSBundle\Helper\OldCacicHelper; use Cacic\WSBundle\Helper\TagValueHelper; +use Cacic\CommonBundle\Entity\LogAcesso; + /** * * Classe responsável por Rerceber as coletas Agente @@ -60,6 +62,7 @@ class DefaultController extends Controller */ public function testAction( Request $request ) { + $logger = $this->get('logger'); OldCacicHelper::autenticaAgente( $request ) ; $strNetworkAdapterConfiguration = OldCacicHelper::deCrypt( $request, $request->get('NetworkAdapterConfiguration') ); $strComputerSystem = OldCacicHelper::deCrypt( $request, $request->get('ComputerSystem') ); @@ -81,6 +84,41 @@ class DefaultController extends Controller ( TagValueHelper::getValueFromTags('DateToDebugging',$rede->getTeDebugging() ) == date("Ymd") ? $rede->getTeDebugging() : '') ) ); $debugging = ( $debugging ? TagValueHelper::getValueFromTags('DetailsToDebugging', $debugging ) : '' ); + // Adiciona no log de acesso. REGRA: só adiciona se o último registro foi em data diferente da de hoje + // TODO: Colocar um parâmetro que diz quantas vezes deve ser registrado o acesso por dia + $data_acesso = new \DateTime(); + $hoje = $data_acesso->format('Y-m-d'); + + $ultimo_acesso = $this->getDoctrine()->getRepository('CacicCommonBundle:LogAcesso')->ultimoAcesso( $computador->getIdComputador() ); + if (empty($ultimo_acesso)) { + // Se for o primeiro registro grava o acesso do computador + $logger->debug("Último acesso não encontrado. Registrando acesso para o computador $computador em $hoje"); + + $log_acesso = new LogAcesso(); + $log_acesso->setIdComputador($computador); + $log_acesso->setData($data_acesso); + + // Grava o log + $this->getDoctrine()->getManager()->persist($log_acesso); + $this->getDoctrine()->getManager()->flush(); + } else { + $dt_ultimo_acesso = $ultimo_acesso->getData()->format('Y-m-d'); + + // Só adiciono se a data de útimo acesso for diferente do dia de hoje + if ($hoje != $dt_ultimo_acesso) { + $logger->debug("Inserindo novo registro de acesso para o computador $computador em $hoje"); + + $log_acesso = new LogAcesso(); + $log_acesso->setIdComputador($computador); + $log_acesso->setData($data_acesso); + + // Grava o log + $this->getDoctrine()->getManager()->persist($log_acesso); + $this->getDoctrine()->getManager()->flush(); + } + } + + $response = new Response(); $response->headers->set('Content-Type', 'xml'); $cacic_helper = new OldCacicHelper($this->get('kernel')); diff --git a/web/app.php b/web/app.php index 2b4d5e7..cc3401d 100755 --- a/web/app.php +++ b/web/app.php @@ -15,7 +15,7 @@ $loader->register(true); require_once __DIR__.'/../app/AppKernel.php'; //require_once __DIR__.'/../app/AppCache.php'; -$kernel = new AppKernel('prod', false); +$kernel = new AppKernel('prod', true); $kernel->loadClassCache(); //$kernel = new AppCache($kernel); $request = Request::createFromGlobals(); diff --git a/web/app_dev.php b/web/app_dev.php index 3da1dd2..6eb57fc 100755 --- a/web/app_dev.php +++ b/web/app_dev.php @@ -27,3 +27,4 @@ $request = Request::createFromGlobals(); $response = $kernel->handle($request); $response->send(); $kernel->terminate($request, $response); + -- libgit2 0.21.2