Commit 39c8e1b03f5e5ccdcfce763393ae5b2e36649ddd
1 parent
6c32f21c
Exists in
master
and in
1 other branch
data e hora
Showing
3 changed files
with
148 additions
and
48 deletions
Show diff stats
src/Cacic/CommonBundle/DoctrineMigrations/Version20140527164952.php
| ... | ... | @@ -1,48 +0,0 @@ |
| 1 | -<?php | |
| 2 | - | |
| 3 | -namespace Cacic\CommonBundle\Migrations; | |
| 4 | - | |
| 5 | -use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |
| 6 | -use Symfony\Component\DependencyInjection\ContainerInterface; | |
| 7 | -use Doctrine\DBAL\Migrations\AbstractMigration; | |
| 8 | -use Doctrine\DBAL\Schema\Schema; | |
| 9 | - | |
| 10 | - | |
| 11 | -/** | |
| 12 | - * Auto-generated Migration: Please modify to your needs! | |
| 13 | - */ | |
| 14 | -class Version20140527164952 extends AbstractMigration implements ContainerAwareInterface | |
| 15 | -{ | |
| 16 | - private $container; | |
| 17 | - | |
| 18 | - public function setContainer(ContainerInterface $container = null) | |
| 19 | - { | |
| 20 | - $this->container = $container; | |
| 21 | - } | |
| 22 | - | |
| 23 | - public function up(Schema $schema) | |
| 24 | - { | |
| 25 | - // this up() migration is auto-generated, please modify it to your needs | |
| 26 | - $em = $this->container->get('doctrine.orm.entity_manager'); | |
| 27 | - $logger = $this->container->get('logger'); | |
| 28 | - $modulos = $em->getRepository('CacicCommonBundle:Acao')->findBy( array('csOpcional' => 'N') ); | |
| 29 | - | |
| 30 | - foreach ($modulos as $elm) { | |
| 31 | - // PEga todos os módulos que são opcionais e remove da tabela acao_rede | |
| 32 | - $acoes = $em->getRepository('CacicCommonBundle:AcaoRede')->findBy( array('acao' => $elm->getIdAcao() ) ); | |
| 33 | - | |
| 34 | - foreach ($acoes as $acao) { | |
| 35 | - $em->remove($acao); | |
| 36 | - } | |
| 37 | - } | |
| 38 | - | |
| 39 | - $em->flush(); | |
| 40 | - | |
| 41 | - } | |
| 42 | - | |
| 43 | - public function down(Schema $schema) | |
| 44 | - { | |
| 45 | - // this down() migration is auto-generated, please modify it to your needs | |
| 46 | - | |
| 47 | - } | |
| 48 | -} |
src/Cacic/CommonBundle/Resources/views/Rede/coletar.html.twig
0 → 100644
| ... | ... | @@ -0,0 +1,136 @@ |
| 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} | |
| 2 | + | |
| 3 | +{% block breadcrumb %} | |
| 4 | +<li class="active">{{ 'Forçar Coleta'|trans }}</li> | |
| 5 | +{% endblock %} | |
| 6 | + | |
| 7 | +{% block body %} | |
| 8 | + | |
| 9 | +<div class="row-fluid"> | |
| 10 | + <div class="span8"> | |
| 11 | + | |
| 12 | + <div class="box grad_colour_black"> | |
| 13 | + | |
| 14 | + <h2 class="box_head round_top"><i class="icon-search"></i> {{'Forçar coleta por máquina' |trans }}</h2> | |
| 15 | + | |
| 16 | + <div class="block box_content round_bottom padding_10"> | |
| 17 | + | |
| 18 | + <form id={{ 'formComputadorConsulta'|trans }} class="form-horizontal" action="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" method="post" > | |
| 19 | + | |
| 20 | + <div class="control-group" > | |
| 21 | + <label for="log_acesso_periodo"style="width:300px; margin-right: 15px" class="control-label">{{ 'Selecione o filtro da busca'|trans }}</label> | |
| 22 | + <div class="controls"> | |
| 23 | + {{ form_widget(form.selConsulta, {'form_type': 'horizontal'}) }} | |
| 24 | + </div> | |
| 25 | + </div> | |
| 26 | + | |
| 27 | + <div id="teIpComputador" class="mostrarDiv" style=" display: none; margin-left: 155px" > | |
| 28 | + <div class="control-group" > | |
| 29 | + <div class="controls"> | |
| 30 | + {{ form_widget(form.teIpComputador) }} | |
| 31 | + </div> | |
| 32 | + </div> | |
| 33 | + </div> | |
| 34 | + <div id="nmComputador" class="mostrarDiv" style="display:none; margin-left: 155px" > | |
| 35 | + <div class="control-group" > | |
| 36 | + <div class="controls"> | |
| 37 | + {{ form_widget(form.nmComputador) }} | |
| 38 | + </div> | |
| 39 | + </div> | |
| 40 | + </div> | |
| 41 | + <div id="teNodeAddress" class="mostrarDiv" style="display: none; margin-left: 155px" > | |
| 42 | + <div class="control-group" > | |
| 43 | + <div class="controls"> | |
| 44 | + {{ form_widget(form.teNodeAddress) }} | |
| 45 | + </div> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + | |
| 49 | + <div class="control-group" align="right"> | |
| 50 | + <div class="controls"> | |
| 51 | + <button type="submit" class="btn btn-primary"> | |
| 52 | + <i class="icon-search"></i> | |
| 53 | + {{ "Buscar"|trans }} | |
| 54 | + </button> | |
| 55 | + </div> | |
| 56 | + </div> | |
| 57 | + </form> | |
| 58 | + </div> <!-- /block --> | |
| 59 | + </div> <!-- /box --> | |
| 60 | + {% if computadores is not null %} | |
| 61 | + {% include 'CacicCommonBundle:Computador:resultadoColetar.html.twig' %} | |
| 62 | + {% endif %} | |
| 63 | + </div><!-- /span --> | |
| 64 | + | |
| 65 | + <div class="span4"> | |
| 66 | + <div class="box grad_colour_black"> | |
| 67 | + | |
| 68 | + <h2 class="box_head round_top"><i class="icon-info-sign"></i> {{ "Informações Adicionais"|trans }}</h2> | |
| 69 | + | |
| 70 | + <div class="block box_content round_bottom padding_10"> | |
| 71 | + <p> | |
| 72 | + {{ "Este módulo permite forçar a coleta nos computadores monitorados pelos agentes do cacic"|trans }}. | |
| 73 | + </p> | |
| 74 | + <p> | |
| 75 | + {{ "É possível pesquisar por IP's, nome ou Mac da máquina, bastando selecionar uma de suas opções"|trans }}. | |
| 76 | + </p> | |
| 77 | + <p> | |
| 78 | + {{ "A coleta será realizada em aproximadamente 1 minuto"|trans }}. | |
| 79 | + </p> | |
| 80 | + </div> <!-- /block --> | |
| 81 | + </div> <!-- /box --> | |
| 82 | + </div> <!-- span4 --> | |
| 83 | +</div><!-- /row --> | |
| 84 | +{% endblock %} | |
| 85 | + | |
| 86 | +{% block javascripts %} | |
| 87 | + | |
| 88 | +{{ parent() }} | |
| 89 | + | |
| 90 | +<script type="text/javascript"> | |
| 91 | + System.Form.toggleCheck(); // Ativa o monitoramento de Clique no checkbox para marcar/desmarcar todos | |
| 92 | +</script> | |
| 93 | + | |
| 94 | + <!-- javascript | |
| 95 | + ================================================== --> | |
| 96 | + <!-- Placed at the end of the document so the pages load faster --> | |
| 97 | + <!-- jQuery (UI) --> | |
| 98 | + <script type="text/javascript" src="{{ asset('bundles/caciccommon/libs/jquery.1.7.1.min.js') }}"></script> | |
| 99 | + <script type="text/javascript" src="{{ asset('bundles/caciccommon/libs/jquery-ui-1.8.17.min.js') }}"></script> | |
| 100 | + | |
| 101 | + | |
| 102 | + {{ parent() }} | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + <script type="text/javascript"> | |
| 107 | + /** | |
| 108 | + * Mensagens do sistema | |
| 109 | + */ | |
| 110 | + | |
| 111 | + if($('#ComputadorConsulta_selConsulta').val() == 'teIpComputador'){ | |
| 112 | + $('#teIpComputador').show(); | |
| 113 | + } | |
| 114 | + if($('#ComputadorConsulta_selConsulta').val() == 'nmComputador'){ | |
| 115 | + $('#nmComputador').show(); | |
| 116 | + } | |
| 117 | + if($('#ComputadorConsulta_selConsulta').val() == 'teNodeAddress'){ | |
| 118 | + $('#teNodeAddress').show(); | |
| 119 | + } | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + $('#ComputadorConsulta_selConsulta').change(function () { | |
| 124 | + $('.mostrarDiv').hide(); | |
| 125 | +// $('#ComputadorConsulta_teIpComputador').val( '' ); | |
| 126 | + $('#ComputadorConsulta_nmComputador').val( '' ); | |
| 127 | + $('#ComputadorConsulta_teNodeAddress').val( '' ); | |
| 128 | + | |
| 129 | + $('#' + $(this).val()).show(); | |
| 130 | + }); | |
| 131 | + | |
| 132 | + </script> | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | +{% endblock %} | |
| 0 | 137 | \ No newline at end of file | ... | ... |
src/Cacic/RelatorioBundle/Resources/views/Default/patrimonio.html.twig
| ... | ... | @@ -14,11 +14,19 @@ |
| 14 | 14 | <script src="{{ asset('bundles/cacicrelatorio/libs/bootstrap-transfer-master/js/bootstrap-transfer.js') }}" type="text/javascript"></script> |
| 15 | 15 | <script type="text/javascript"> |
| 16 | 16 | $(document).ready(function(){ |
| 17 | + var tSW = $('#transferSW').bootstrapTransfer({'target_id':'tSw'}); | |
| 17 | 18 | var tLoc = $('#transferLocais').bootstrapTransfer({'target_id':'tLoc'}); |
| 18 | 19 | var tSO = $('#transferSO').bootstrapTransfer({'target_id':'tSo'}); |
| 19 | 20 | var tConf = $('#transferConf').bootstrapTransfer({'target_id':'tConf'}); |
| 20 | 21 | var tUorg = $('#transferUorg').bootstrapTransfer({'target_id':'tUorg'}); |
| 21 | 22 | |
| 23 | + tSW.populate([ // Popula o TRANSFER com Softwares | |
| 24 | + {% for sw in sw %} | |
| 25 | + {value: "{{ sw['idClassProperty'] }}", content:"{{ sw['nmSoftware'] }}"}{% if loop.last != true %},{% endif %} | |
| 26 | + | |
| 27 | + {% endfor %} | |
| 28 | + ]); | |
| 29 | + | |
| 22 | 30 | tLoc.populate([ // Popula o TRANSFER com Locais |
| 23 | 31 | {% for l in locais %} |
| 24 | 32 | {value: "{{ l[0]['idLocal'] }}", content:"{{ l[0]['nmLocal'] ~ '/' ~ l[0]['sgLocal'] }}"}{% if loop.last != true %},{% endif %} |
| ... | ... | @@ -52,6 +60,7 @@ |
| 52 | 60 | 'form' : $('#frmFiltroRelatorioPatrimonio'), |
| 53 | 61 | 'fieldsPrefix' : 'rel_filtro_patrimonio', |
| 54 | 62 | 'elms' : [ |
| 63 | + { 'transferElement' : tSW , 'inputHiddenName' : 'softwares' }, | |
| 55 | 64 | { 'transferElement' : tLoc , 'inputHiddenName' : 'locais' }, |
| 56 | 65 | { 'transferElement' : tSO , 'inputHiddenName' : 'so' }, |
| 57 | 66 | { 'transferElement' : tUorg , 'inputHiddenName' : 'uorg' }, |
| ... | ... | @@ -92,6 +101,9 @@ |
| 92 | 101 | <h4>{{ 'Selecione as informações que deseja exibir'|trans }}</h4> |
| 93 | 102 | <div id="transferConf"></div> |
| 94 | 103 | |
| 104 | + <h4>{{ 'Selecione os Softwares que deseja exibir'|trans }}</h4> | |
| 105 | + <div id="transferSW"></div> | |
| 106 | + | |
| 95 | 107 | <h4>{{ 'Selecione os Locais'|trans }}</h4> |
| 96 | 108 | <div id="transferLocais"></div> |
| 97 | 109 | ... | ... |