Commit 6b8c7722d4345be2cc4dcea9c2c7cce6f09fb241

Authored by Eduardo Santos
Committed by Eduardo Santos
1 parent d499eac1
Exists in master and in 1 other branch 3.1

Sincronia com a última versão da produção

Showing 141 changed files with 2716 additions and 459 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 141 files displayed.

.gitignore 0 → 100644
... ... @@ -0,0 +1,34 @@
  1 +# Bootstrap
  2 +app/bootstrap*
  3 +
  4 +# Symfony directories
  5 +vendor/*
  6 +*/logs/*
  7 +*/cache/*
  8 +web/uploads/*
  9 +web/bundles/*
  10 +
  11 +# Configuration files
  12 +app/config/parameters.ini
  13 +app/config/parameters.yml
  14 +
  15 +# Composer
  16 +composer.phar
  17 +composer.lock
  18 +
  19 +# Ignore SVN
  20 +*.svn
  21 +
  22 +# Ignora toda a pasta Web
  23 +web/assets/
  24 +web/css/
  25 +web/downloads/
  26 +web/images/
  27 +web/js/
  28 +web/assetic/
  29 +
  30 +# Ignora htaccess
  31 +.htaccess
  32 +
  33 +# Ignora arquivo do importador
  34 +src/Cacic/CommonBundle/Resources/data/importacao.zip
... ...
app/AppKernel.php
... ... @@ -29,6 +29,8 @@ class AppKernel extends Kernel
29 29 new Ijanki\Bundle\FtpBundle\IjankiFtpBundle(),
30 30 new FM\ElfinderBundle\FMElfinderBundle(),
31 31 new Knp\Bundle\MenuBundle\KnpMenuBundle(),
  32 + new Swpb\Bundle\CocarBundle\CocarBundle(),
  33 + new Ddeboer\DataImportBundle\DdeboerDataImportBundle()
32 34 );
33 35  
34 36 if (in_array($this->getEnvironment(), array('dev', 'test'))) {
... ...
app/Resources/views/base.html.twig
... ... @@ -2,9 +2,9 @@
2 2 <html lang="en">
3 3 <head>
4 4 <meta charset="utf-8">
5   - <title>{{ "CACIC - Configurador Automático e Coletor de Informações Computacionais"|trans }}</title>
6   - <meta name="description" content="{{ 'CACIC Coletor Automático e Configurador de Informações Computacionais'|trans }}">
7   - <meta name="ahoekie" content="CACIC BackEnd">
  5 + {% block meta %}
  6 + {% endblock %}
  7 +
8 8  
9 9 <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
10 10 <!--[if lt IE 9]>
... ... @@ -48,13 +48,14 @@
48 48 <span class="i-bar"></span>
49 49 <span class="i-bar"></span>
50 50 </a>
51   -
52   - <p class="navbar-text pull-left"><a href="{{ path('cacic_common_homepage') }}">CACIC v.{{ cacic_version }}</a></p>
53   -
54   - <div class="nav-collapse">
55   - <p class="navbar-text pull-right"> {{ "Logado como"|trans }} <a href="{{ path('cacic_usuario_meus_dados') }}">{{ app.user.nmUsuarioAcesso }}</a></p>
56   - <ul class="nav pull-right">
57   - <!-- <li class="dropdown">
  51 +
  52 +
  53 + <p class="navbar-text pull-left"><a href="{{ path('cacic_common_homepage') }}">CACIC v.{{ cacic_version }}</a></p>
  54 +
  55 + <div class="nav-collapse">
  56 + <p class="navbar-text pull-right"> {{ "Logado como"|trans }} <a href="{{ path('cacic_usuario_meus_dados') }}">{{ app.user.nmUsuarioAcesso }}</a></p>
  57 + <ul class="nav pull-right">
  58 + <!-- <li class="dropdown">
58 59 <a href="#"
59 60 class="dropdown-toggle"
60 61 data-toggle="dropdown">
... ... @@ -67,37 +68,39 @@
67 68 <li><a href="#">{{ "Alertas antigos..."|trans }}</a></li>
68 69 </ul>
69 70 </li> -->
70   - <li class="dropdown">
71   - <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
72   - <i class="icon-cog"></i>
73   - Configurações
74   - <b class="caret"></b>
75   - </a>
76   - <ul class="dropdown-menu">
77   - <li><a href="{{ path('cacic_configuracao_padrao') }}">{{ 'Configurar Padrões'|trans }}</a></li>
78   - <li><a href="{{ path('cacic_configuracao_gerente') }}">{{ 'Configurar Gerente'|trans }}</a></li>
79   - <li><a href="{{ path('cacic_configuracao_agente') }}">{{ 'Configurar Agentes'|trans }}</a></li>
80   - <li class="divider"></li>
81   - <li><a href="{{ path('cacic_modulo_index') }}">{{ "Configurar Módulos"|trans }}</a></li>
82   - </ul>
83   - </li>
84   -
85   - <li class="dropdown">
86   - <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
87   - <i class="icon-user"></i>
88   - {{ 'Meus Dados'|trans }}
89   - <b class="caret"></b>
90   - </a>
91   - <ul class="dropdown-menu">
92   - <li><a href="{{ path('cacic_usuario_meus_dados') }}"><i class="icon-file"></i> {{ 'Meus Dados'|trans }}</a></li>
93   - <li><a href="{{ path('cacic_usuario_trocar_propria_senha') }}" class="bt-trocar-propria-senha"><i class="icon-key"></i> {{ 'Alterar Senha'|trans }}</a></li>
94   - <!-- <li><a href="javascript:void(0);"><i class="icon-heart"></i> {{ 'Editar Favoritos (Atalhos)'|trans }}</a></li> -->
95   - <li class="divider"></li>
96   - <li><a href="{{ path('cacic_common_logout') }}"><i class="icon-off"></i> {{ 'Sair'|trans }}</a></li>
97   - </ul>
98   - </li>
99   - </ul>
100   - </div><!--/.nav-collapse -->
  71 + <li class="dropdown">
  72 + <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
  73 + <i class="icon-cog"></i>
  74 + Configurações
  75 + <b class="caret"></b>
  76 + </a>
  77 + <ul class="dropdown-menu">
  78 + <li><a href="{{ path('cacic_configuracao_padrao') }}">{{ 'Configurar Padrões'|trans }}</a></li>
  79 + <li><a href="{{ path('cacic_configuracao_gerente') }}">{{ 'Configurar Gerente'|trans }}</a></li>
  80 + <li><a href="{{ path('cacic_configuracao_agente') }}">{{ 'Configurar Agentes'|trans }}</a></li>
  81 + <li class="divider"></li>
  82 + <li><a href="{{ path('cacic_modulo_index') }}">{{ "Configurar Módulos"|trans }}</a></li>
  83 + </ul>
  84 + </li>
  85 +
  86 + <li class="dropdown">
  87 + <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
  88 + <i class="icon-user"></i>
  89 + {{ 'Meus Dados'|trans }}
  90 + <b class="caret"></b>
  91 + </a>
  92 + <ul class="dropdown-menu">
  93 + <li><a href="{{ path('cacic_usuario_meus_dados') }}"><i class="icon-file"></i> {{ 'Meus Dados'|trans }}</a></li>
  94 + <li><a href="{{ path('cacic_usuario_trocar_propria_senha') }}" class="bt-trocar-propria-senha"><i class="icon-key"></i> {{ 'Alterar Senha'|trans }}</a></li>
  95 + <!-- <li><a href="javascript:void(0);"><i class="icon-heart"></i> {{ 'Editar Favoritos (Atalhos)'|trans }}</a></li> -->
  96 + <li class="divider"></li>
  97 + <li><a href="{{ path('cacic_common_logout') }}"><i class="icon-off"></i> {{ 'Sair'|trans }}</a></li>
  98 + </ul>
  99 + </li>
  100 + </ul>
  101 + </div><!--/.nav-collapse -->
  102 +
  103 +
101 104 </div>
102 105 </div>
103 106 </div>
... ... @@ -105,191 +108,38 @@
105 108 <div class="container-fluid">
106 109 <div class="row-fluid">
107 110 <!-- side nav -->
108   - <div id="side_nav" class="span2 sidebar-nav side_nav">
109   - <a href="{{ path('cacic_common_homepage') }}">
110   - <span id="logo" class="logo">&nbsp;</span>
111   - </a>
112   - <ul class="clearfix">
113   - <li><a class="round_top" href="{{ path('cacic_common_homepage') }}">
114   - <i class="icon-home"></i>
115   - <span>Home</span></a>
116   - </li>
117   - <li class="dropdown">
118   - <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
119   - <i class="icon-cogs"></i>
120   - <span>{{ "Administração"|trans }}</span>
121   - <span class="icon">&nbsp;</span>
122   - </a>
123   - <ul>
124   - <li><a class="round_top" href="{{ path('cacic_software_naoclassificados') }}">{{ "Classificar Software"|trans }}</a></li>
125   - <li><a href="{{ path('cacic_software_naousados') }}">{{ "Softwares não usados"|trans }}</a></li>
126   - <li><a href="{{ path('cacic_modulo_index') }}">{{ "Configurar Módulos"|trans }}</a></li>
127   -
128   - <li class="dropdown-submenu">
129   - <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">
130   - Logs
131   - <span class="icon">&nbsp;</span>
132   - </a>
133   - <ul>
134   - <li><a href="{{ path('cacic_log_acesso') }}">{{ "Acessos"|trans }}</a></li>
135   - <li><a href="{{ path('cacic_log_atividade') }}">{{ "Atividades"|trans }}</a></li>
136   - <li><a href="{{ path('cacic_log_insucesso_instalacao') }}">{{ "Insucessos Instalação"|trans }}</a></li>
137   - <li><a href="{{ path('cacic_log_suporte_remoto') }}">{{ "Suporte Remoto Seguro"|trans }}</a></li>
138   - </ul>
139   - </li>
140   - <li class="dropdown-submenu" >
141   - <a href="javascript:void(0)">
142   - <span>{{ "Cadastros"|trans }}</span>
143   - <span class="icon">&nbsp;</span>
144   - </a>
145   - <ul>
146   - <li><a href="{{ path('cacic_local_index') }}">{{ "Locais"|trans }}</a></li>
147   - <li><a href="{{ path('cacic_servidorautenticacao_index') }}">{{ "Servidores Autenticação"|trans }}</a></li>
148   - <li><a href="{{ path('cacic_subrede_index') }}">{{ "Subredes"|trans }}</a></li>
149   - <li><a href="{{ path('cacic_aplicativo_index') }}">{{ "Aplicativo"|trans }}</a></li>
150   - <li><a href="{{ path('cacic_usuario_index') }}">{{ "Usuários"|trans }}</a></li>
151   - <li><a href="{{ path('cacic_grupo_usuario_index') }}">{{ "Grupo de Usuários"|trans }}</a></li>
152   - <li><a href="{{ path('cacic_tiposoftware_index') }}">{{ "Tipos Softwares"|trans }}</a></li>
153   - <li><a href="{{ path('cacic_sistemaoperacional_index') }}">{{ "Sistemas Operacionais"|trans }}</a></li>
154   - <li><a href="{{ path('cacic_software_index') }}">{{ "Softwares"|trans }}</a></li>
155   - <li><a href="{{ path('cacic_usbdevice_index') }}">{{ "Dispositivos USB"|trans }}</a></li>
156   - </ul>
157   - </li>
158   - <li class="dropdown-submenu" >
159   - <a href="javascript:void(0)">
160   - {{ "Patrimônio"|trans }}
161   - <span class="icon">&nbsp;</span>
162   - </a>
163   - <ul>
164   - <li ><a href="{{ path('cacic_patrimonio_index')}}">{{ "Interface"|trans }}</a></li>
165   - <li ><a href="{{ path('cacic_uorg_index')}}">{{ "Unidades Organizacionais"|trans }}</a></li>
166   - <li ><a href="{{ path('cacic_uorg_type_index')}}">{{ "Tipos de Unidade"|trans }} <br> {{ "Organizacional"|trans }}</a></li>
167   - <li ><a href="{{ path('cacic_patrimonio_opcoes')}}">{{ "Opções"|trans }}</a></li>
168   - </ul>
169   - </li>
170   - <li class="dropdown-submenu" >
171   - <a href="javascript:void(0)">
172   - {{ "Gerência Aquisições"|trans }}
173   - <span class="icon">&nbsp;</span>
174   - </a>
175   - <ul >
176   - <li><a href="{{ path('cacic_aquisicao_index') }}">{{ "Aquisições"|trans }}</a></li>
177   - <li><a href="{{ path('cacic_aquisicao_item_index') }}">{{ "Itens adquiridos"|trans }}</a></li>
178   - <li><a href="{{ path('cacic_software_estacao_index') }}">{{ "Software por estações"|trans }}</a></li>
179   - <li><a href="{{ path('cacic_tipo_licenca_index') }}">{{ "Tipos de Licença"|trans }}</a></li>
180   - </ul>
181   - </li>
182   - </ul>
183   - </li>
184 111  
185   - <li class="subnavbar-open-right" >
186   - <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
187   - <i class="icon-wrench"></i>
188   - <span>{{ "Manutenção"|trans }}</span>
189   - <span class="icon">&nbsp;</span>
190   - </a>
191   - <ul >
192   - <li><a href="{{ path('cacic_subrede_manutencao') }}">{{ "Atualização de Subrede"|trans }}</a></li>
193   - <li><a href="{{ path('cacic_migracao_cacic26') }}">{{ "Importar de 2.6"|trans }}</a></li>
194   - </ul>
195   - </li>
  112 +<div id="side_nav" class="span2 sidebar-nav side_nav">
  113 + <a href="{{ path('cacic_common_homepage') }}">
  114 + <span id="logo" class="logo">&nbsp;</span>
  115 + </a>
  116 + {% block sidenav %}
  117 + {% endblock %}
  118 +</div><!--/span-->
  119 +
196 120  
197   - <li>
198   - <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
199   - <i class="icon-desktop"></i>
200   - <span>{{ "Computadores"|trans }}</span>
201   - <span class="icon">&nbsp;</span>
202   - </a>
203   - <ul>
204   - <li><a href="{{ path('cacic_computador_navegar') }}">{{ "Navegar"|trans }}</a></li>
205   - <li><a href="{{ path('cacic_computador_consultar') }}">{{ "Consultar"|trans }}</a></li>
206   - <li><a href="{{ path('cacic_computador_buscar') }}">{{ "Busca avançada"|trans }}</a></li>
207   - </ul>
208   - </li>
209 121  
210   - <li>
211   - <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
212   - <i class="icon-book"></i>
213   - <span>{{ "Relatórios"|trans }}</span>
214   - <span class="icon">&nbsp;</span>
215   - </a>
216   - <ul>
217   - <li class="dropdown-submenu" >
218   - <a href="javascript:void(0)">
219   - <span>{{ "Softwares"|trans }}</span>
220   - <span class="icon">&nbsp;</span>
221   - </a>
222   - <ul>
223   - <li><a href="{{ path('cacic_relatorio_software_inventariados') }}">{{ "Softwares Inventariados"|trans }}</a></li>
224   - <li><a href="{{ path('cacic_relatorio_software_licenciados') }}">{{ "Softwares Licenciados"|trans }}</a></li>
225   - <li><a href="{{ path('cacic_relatorio_software_aquisicoes') }}" target="_blank">{{ "Aquisições de Softwares"|trans }}</a></li>
226   - <li><a href="{{ path('cacic_relatorio_software_orgao') }}">{{ "Por Órgão/Máquinas"|trans }}</a></li>
227   - <li><a href="{{ path('cacic_relatorio_software_tipo') }}">{{ "Tipos de Software"|trans }}</a></li>
228   - <li><a href="{{ path('cacic_relatorio_software_naoVinculados') }}" target="_blank">{{ "Softwares não Vinculados"|trans }}</a></li>
229   - </ul>
230   - </li>
231   - <li class="dropdown-submenu" >
232   - <a href="javascript:void(0)">
233   - <span>{{ "Classes WMI"|trans }}</span>
234   - <span class="icon">&nbsp;</span>
235   - </a>
236   - {{ knp_menu_render('CacicRelatorioBundle:Builder:relatorioMenu') }}
237   - </li>
238   - <li><a class="round_top" href="{{ path('cacic_relatorio_autorizacoes') }}">{{ "Autorizações"|trans }}</a></li>
239   - <li><a class="round_top" href="{{ path('cacic_relatorio_tcpIp') }}">{{ "TCP/IP"|trans }}</a></li>
240   - <li><a class="round_top" href="{{ path('cacic_relatorio_patrimonio') }}">{{ "Patrimônio"|trans }}</a></li>
241   - </ul>
242   - </li>
243   -
244   - <!-- <li class="dropdown subnavbar-open-right">
245   - <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown-">
246   - <i class="icon-bar-chart"></i>
247   - <span>{{ "Estatísticas"|trans }}</span>
248   - <span class="icon">&nbsp;</span>
249   - </a>
250   - <ul>
251   - <li><a href="javascript:void(0)">{{ "Sistemas Monitorados"|trans }}</a></li>
252   - </ul>
253   - </li> -->
254   -
255   - <li>
256   - <a href="{{ path('cacic_downloads') }}" title="{{ "Baixar Agentes"|trans }}">
257   - <i class="icon-download-alt"></i>
258   - <span>{{ "Downloads"|trans }}</span>
259   - </a>
260   - </li>
261   -
262   - <!-- <li>
263   - <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
264   - <i class="icon-info-sign"></i>
265   - <span>{{ "Projeto CACIC"|trans }}</span>
266   - </a>
267   - </li> -->
268   -
269   - <li>
270   - <a href="http://www.softwarepublico.gov.br/ver-comunidade?community_id=3585" target="_blank">
271   - <i class="icon-group"></i>
272   - <span>{{ "Comunidade CACIC"|trans }}</span>
273   - </a>
274   - </li>
275   - </ul>
276   - <!-- <a href="#" class="minimize round_bottom"><span>minimize</span></a> -->
277   - </div><!--/span-->
278 122  
279 123 <!-- main container -->
280 124 <div id="main_container" class="span10">
281 125  
282 126 <!-- Shortcut buttons -->
283 127 <div class="row-fluid">
284   - <div class="span12 shortcut">
285   - <a href="#" class="btn btn-shortcut"><img src="{{ asset('bundles/caciccommon/images/v3/cacic_logo_gray.png') }}" alt="Dashboard" />CACIC<span class="label label-info">0</span></a>
286   - </div><!--/span-->
  128 +
  129 + <div class="span12 shortcut">
  130 + {% if bundleExists('CocarBundle') %}
  131 + <a href="{{ path('cocar_map') }}" class="btn btn-shortcut"><img src="{{ asset('bundles/cocar/images/cocar-logo-24.png') }}" alt="Dashboard" />COCAR<span class="label label-info">0</span></a>
  132 +
  133 + {% endif %}
  134 + <a href="{{ path('cacic_common_homepage') }}" class="btn btn-shortcut"><img src="{{ asset('bundles/caciccommon/images/v3/cacic_logo_gray.png') }}" alt="Dashboard" />CACIC<span class="label label-info">0</span></a>
  135 + </div><!--/span-->
  136 +
287 137 </div>
288 138  
289 139 <!-- Breadcrumb -->
290 140 <div class="row-fluid">
291 141 <div class="span12">
292   - <ul class="breadcrumb">
  142 + <ul class="breadcrumb">
293 143 <li><a href="{{ path('cacic_common_homepage') }}">CACIC</a> <span class="divider">/</span></li>
294 144 {% block breadcrumb %}
295 145 <li class="active">Home</li>
... ...
app/bootstrap.php.cache
... ... @@ -2170,11 +2170,11 @@ protected $booted;
2170 2170 protected $name;
2171 2171 protected $startTime;
2172 2172 protected $loadClassCache;
2173   -const VERSION ='2.3.9';
2174   -const VERSION_ID ='20309';
  2173 +const VERSION ='2.3.11';
  2174 +const VERSION_ID ='20311';
2175 2175 const MAJOR_VERSION ='2';
2176 2176 const MINOR_VERSION ='3';
2177   -const RELEASE_VERSION ='9';
  2177 +const RELEASE_VERSION ='11';
2178 2178 const EXTRA_VERSION ='';
2179 2179 public function __construct($environment, $debug)
2180 2180 {
... ...
app/config/config.yml
... ... @@ -36,7 +36,7 @@ bc_bootstrap:
36 36 assetic:
37 37 debug: "%kernel.debug%"
38 38 use_controller: false
39   - bundles: [ CacicCommonBundle, CacicRelatorioBundle, FMElfinderBundle ]
  39 + bundles: [ CacicCommonBundle, CacicRelatorioBundle, FMElfinderBundle, CocarBundle ]
40 40 java: /usr/bin/java
41 41 filters:
42 42 #closure:
... ... @@ -144,4 +144,4 @@ services:
144 144 cacic_demo.command.demo_command:
145 145 class: Cacic\CommonBundle\Command\DemoCommand
146 146 tags:
147   - - { name: console.command }
148 147 \ No newline at end of file
  148 + - { name: console.command }
... ...
app/config/routing.yml
  1 +CocarBundle_cocar_annotation:
  2 + resource: "@CocarBundle/Resources/config/routing.yml"
  3 + prefix: /cocar/
1 4 cacic_ws:
2 5 resource: "@CacicWSBundle/Resources/config/routing.yml"
3 6 prefix: /ws/
... ... @@ -13,6 +16,10 @@ cacic_common:
13 16 elfinder:
14 17 resource: "@FMElfinderBundle/Resources/config/routing.yml"
15 18  
  19 +CocarBundle_cocar_annotation:
  20 + resource: "@CocarBundle/Resources/config/routing.yml"
  21 + prefix: /cocar
  22 +
16 23 # Internal routing configuration to handle ESI
17 24 # ****** WARNING ******
18 25 # This route should be enabled with caution as it can open a security vulnerability
... ...
composer.json
... ... @@ -14,7 +14,9 @@
14 14 "url": "http://code.jquery.com/jquery-1.9.1.js",
15 15 "type": "file"
16 16 }
17   - }
  17 + },
  18 + "type": "vcs",
  19 + "url": "https://github.com/lightbase/cocar.git"
18 20 }
19 21 ],
20 22 "require": {
... ... @@ -45,7 +47,14 @@
45 47 "jquery/jquery": "1.9.*",
46 48 "helios-ag/fm-elfinder-bundle": "1.x",
47 49 "knplabs/knp-menu": "2.0.*@dev",
48   - "knplabs/knp-menu-bundle":"dev-master"
  50 + "knplabs/knp-menu-bundle":"dev-master",
  51 + "jpgraph/jpgraph": "dev-master",
  52 + "symfony/class-loader": "2.2.*",
  53 + "friendsofsymfony/rest-bundle": "dev-master",
  54 + "jms/serializer": "0.14.*@dev",
  55 + "jms/serializer-bundle": "0.13.*@dev",
  56 + "lightbase/cocar": "dev-master",
  57 + "ddeboer/data-import-bundle": "dev-master"
49 58 },
50 59 "scripts": {
51 60 "post-install-cmd": [
... ...
src/Cacic/CommonBundle/Controller/AtesteController.php 0 → 100755
... ... @@ -0,0 +1,105 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: eduardo
  5 + * Date: 10/02/14
  6 + * Time: 15:46
  7 + */
  8 +
  9 +namespace Cacic\CommonBundle\Controller;
  10 +
  11 +use Cacic\CommonBundle\Entity\Ateste;
  12 +use Cacic\CommonBundle\Entity\AtesteRedes;
  13 +use Symfony\Component\HttpFoundation\Request;
  14 +use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  15 +use Cacic\CommonBundle\Form\Type\LogPesquisaType;
  16 +use Cacic\CommonBundle\Form\Type\AtesteType;
  17 +
  18 +
  19 +class AtesteController extends Controller {
  20 +
  21 + /**
  22 + * Realiza ateste por local
  23 + *
  24 + * @param Request $request
  25 + */
  26 +
  27 + public function indexAction(Request $request) {
  28 + $em = $this->getDoctrine()->getManager();
  29 + $logger = $this->get('logger');
  30 + $locale = $request->getLocale();
  31 +
  32 + $form = $this->createForm( new LogPesquisaType() );
  33 +
  34 + $ateste = $this->createForm (new AtesteType() );
  35 +
  36 + if ( $request->isMethod('POST') )
  37 + {
  38 + $data = $request->get('log_pesquisa');
  39 + $ateste_data = $request->get('Ateste');
  40 + $listaRedes = $request->get('redes');
  41 +
  42 + $filtroLocais = array(); // Inicializa array com locais a pesquisar
  43 + foreach ( $data['idLocal'] as $locais ) {
  44 + array_push( $filtroLocais, $locais );
  45 + }
  46 +
  47 +
  48 + // Só grava os dados se tiver lista de redes no formulário
  49 + if (!empty($listaRedes)) {
  50 +
  51 + // Pega usuário da requisição
  52 + $usuario = $request->getUser();
  53 +
  54 + // Cria objeto do ateste
  55 + $ateste_obj = new Ateste();
  56 +
  57 + // Pega valores do formulário
  58 + $ateste_obj->setData( new \DateTime());
  59 + $ateste_obj->setUsuario($usuario);
  60 + $ateste_obj->setDescricao($ateste_data['descricao']);
  61 + $ateste_obj->setAtestado($ateste_data['atestado']);
  62 + $ateste_obj->setDetalhes($ateste_data['detalhes']);
  63 + $ateste_obj->setQualidadeServico($ateste_data['qualidade_servico']);
  64 +
  65 + // Grava dados no banco
  66 + $em->persist($ateste_obj);
  67 + $em->flush();
  68 +
  69 +
  70 + // Agora relaciona redes
  71 + foreach ($listaRedes as $rede) {
  72 + // Pega número de computadores para a rede
  73 + $estacoes = $request->get("rede_$rede");
  74 +
  75 + // Armazena relação entre ateste e redes
  76 + $ateste_rede = new AtesteRedes();
  77 + $ateste_rede->setRede($em->getRepository('CacicCommonBundle:Rede')->find($rede));
  78 + $ateste_rede->setAteste($ateste_obj);
  79 + $ateste_rede->setEstacoes($estacoes);
  80 +
  81 + $em->persist($ateste_rede);
  82 + }
  83 +
  84 + // COMMIT
  85 + $em->flush();
  86 +
  87 + $this->get('session')->getFlashBag()->add('success', 'Ateste realizado com sucesso!');
  88 + }
  89 +
  90 + $logs = $this->getDoctrine()->getRepository( 'CacicCommonBundle:LogAcesso')
  91 + ->pesquisar( $data['dtAcaoInicio'], $data['dtAcaoFim'], $filtroLocais);
  92 +
  93 + }
  94 +
  95 + return $this->render( 'CacicCommonBundle:Ateste:index.html.twig',
  96 + array(
  97 + 'locale'=> $locale,
  98 + 'form' => $form->createView(),
  99 + 'ateste' => $ateste->createView(),
  100 + 'logs' => ( isset( $logs ) ? $logs : null )
  101 + )
  102 + );
  103 + }
  104 +
  105 +}
0 106 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Controller/DefaultController.php
... ... @@ -16,7 +16,8 @@ class DefaultController extends Controller
16 16 $estatisticas = array(
17 17 'totalCompMonitorados' => $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->countAll(),
18 18 'totalInsucessosInstalacao' => $this->getDoctrine()->getRepository('CacicCommonBundle:InsucessoInstalacao')->countAll(),
19   - 'totalCompPorSO' => $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->countPorSO()
  19 + 'totalCompPorSO' => $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->countPorSO(),
  20 + 'totalComp' => $this->getDoctrine()->getRepository('CacicCommonBundle:LogAcesso')->countPorComputador()
20 21 );
21 22  
22 23 return $this->render(
... ...
src/Cacic/CommonBundle/Controller/RedeController.php
... ... @@ -32,7 +32,8 @@ class RedeController extends Controller
32 32 {
33 33 return $this->render(
34 34 'CacicCommonBundle:Rede:index.html.twig',
35   - array( 'rede' => $this->getDoctrine()->getRepository( 'CacicCommonBundle:Rede' )->paginar( $this->get( 'knp_paginator' ), $page )
  35 + array( 'rede' => $this->getDoctrine()->getRepository( 'CacicCommonBundle:Rede' )->paginar( $this->get( 'knp_paginator' ), $page ),
  36 + 'uorgs' => $this->getDoctrine()->getRepository( 'CacicCommonBundle:Uorg' )->vincular()
36 37 ));
37 38  
38 39 }
... ... @@ -565,28 +566,33 @@ class RedeController extends Controller
565 566  
566 567 public function vincularAction(Request $request)
567 568 {
568   - $rede = new Rede();
569   - $form = $this->createForm( new RedeType(), $rede );
570 569  
571   - if ( $request->isMethod('POST') )
572   - {
573   - $form->bind( $request );
574   - if ( $form->isValid() )
575   - {
576   - $this->getDoctrine()->getManager()->persist( $rede );
577   - $this->getDoctrine()->getManager()->flush(); //Persiste os dados do Usuário
  570 + if ( ! $request->isXmlHttpRequest() ) // Verifica se se trata de uma requisição AJAX
  571 + throw $this->createNotFoundException( 'Página não encontrada' );
578 572  
579   - // Grava os dados da tabela rede versão módulo
580   - $this->updateSubredes($rede);
  573 + foreach($request->get('uorg') as $idUorg){
  574 +/* $uorgs = implode(',', $request->get('uorg'));
581 575  
582   - $this->get('session')->getFlashBag()->add('success', 'Dados salvos com sucesso!');
  576 + // 1- pega rede
  577 + $rede = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->find($request->get('id'));
  578 + // 2- Add uorg na rede
  579 + $rede ->addUorg( $this->getDoctrine()->getRepository('CacicCommonBundle:Uorg')->find($uorgs) );*/
583 580  
584   - return $this->redirect( $this->generateUrl( 'cacic_subrede_index') );
585   - }
  581 + //1- Pego Uorg
  582 + $uorg = $this->getDoctrine()->getRepository('CacicCommonBundle:Uorg')->find($idUorg);
  583 +
  584 + //2- Add a rede na uorg
  585 + $uorg ->setRede( $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->find($request->get('id')) );
  586 +
  587 + $em = $this->getDoctrine()->getManager();
  588 + $em->persist( $uorg );
  589 + $em->flush();
586 590 }
  591 + $response = new Response( json_encode( array('status' => 'ok') ) );
  592 + $response->headers->set('Content-Type', 'application/json');
587 593  
588   - return $this->render( 'CacicCommonBundle:Rede:cadastrar.html.twig', array( 'form' => $form->createView() ) );
589   - }
  594 + return $response;
590 595  
  596 + }
591 597  
592 598 -}
  599 +}
593 600 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Controller/SoftwareController.php
... ... @@ -114,7 +114,7 @@ class SoftwareController extends Controller
114 114 * Tela de classificação EM LOTE de Softwares
115 115 * @param Symfony\Component\HttpFoundation\Request $request
116 116 */
117   - public function naoClassificadosAction( Request $request )
  117 + public function naoClassificadosAction($page, Request $request )
118 118 {
119 119 if ( $request->isMethod('POST') )
120 120 {
... ... @@ -148,7 +148,7 @@ class SoftwareController extends Controller
148 148 return $this->render(
149 149 'CacicCommonBundle:Software:naoclassificados.html.twig',
150 150 array(
151   - 'softwares' => $this->getDoctrine()->getRepository( 'CacicCommonBundle:Software' )->listarNaoClassificados(),
  151 + 'softwares' => $this->getDoctrine()->getRepository( 'CacicCommonBundle:Software' )->listarNaoClassificados( $this->get( 'knp_paginator' ), $page ),
152 152 'tipos' => $this->getDoctrine()->getRepository( 'CacicCommonBundle:TipoSoftware' )->findAll()
153 153 )
154 154 );
... ...
src/Cacic/CommonBundle/Controller/UorgController.php
... ... @@ -39,14 +39,14 @@ class UorgController extends Controller
39 39 throw $this->createNotFoundException( 'Página não encontrada' );
40 40  
41 41 $uorgs = $this->getDoctrine()->getRepository( 'CacicCommonBundle:Uorg' )->getFolhasDoNo( $request->get( 'idUorgPai' ) );
42   -
43 42 # Monta um array no formato suportado pelo plugin-in jqTree (JQuery)
44 43 $_tree = array();
45 44 foreach ( $uorgs as $uorg )
46 45 {
47 46 $_tree[] = array(
48   - 'label' => $uorg[0]['nmUorg'],
49   - 'id' => $uorg[0]['idUorg'],
  47 + 'label' => $uorg['nmUorg'],
  48 + 'filho' => $uorg['numFilhas'],
  49 + 'id' => $uorg['idUorg'],
50 50 'load_on_demand' => (bool) $uorg['numFilhas']
51 51 );
52 52 }
... ... @@ -179,5 +179,5 @@ class UorgController extends Controller
179 179  
180 180 return $response;
181 181 }
182   -
  182 +
183 183 }
184 184 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Controller/UsuarioController.php
... ... @@ -182,7 +182,7 @@ class UsuarioController extends Controller
182 182 throw $this->createNotFoundException( 'Usuário não encontrado' );
183 183  
184 184 if($csNivel[0]["cont"] == 1 && $nivelUser[0]["teGrupoUsuarios"] == "Administração"){
185   - $this->get('session')->getFlashBag()->add('error', 'Exclusão não permitida, deve haver ao menos um usuario Administrador');
  185 + $this->get('session')->getFlashBag()->add('error', 'Exclusão não permitida, deve haver ao menos um usuário Administrador');
186 186 }else
187 187 {
188 188 $em = $this->getDoctrine()->getManager();
... ...
src/Cacic/CommonBundle/Entity/Ateste.php 0 → 100755
... ... @@ -0,0 +1,296 @@
  1 +<?php
  2 +
  3 +namespace Cacic\CommonBundle\Entity;
  4 +
  5 +use Doctrine\ORM\Mapping as ORM;
  6 +
  7 +/**
  8 + * Ateste
  9 + */
  10 +class Ateste
  11 +{
  12 + /**
  13 + * @var integer
  14 + */
  15 + private $idAteste;
  16 +
  17 + /**
  18 + * @var string
  19 + */
  20 + private $descricao;
  21 +
  22 + /**
  23 + * @var integer
  24 + */
  25 + private $quantidade;
  26 +
  27 + /**
  28 + * @var string
  29 + */
  30 + private $detalhes;
  31 +
  32 + /**
  33 + * @var boolean
  34 + */
  35 + private $atestado;
  36 +
  37 + /**
  38 + * @var \DateTime
  39 + */
  40 + private $data;
  41 +
  42 + /**
  43 + * @var string
  44 + */
  45 + private $qualidadeServico;
  46 +
  47 +
  48 + /**
  49 + * Get idAteste
  50 + *
  51 + * @return integer
  52 + */
  53 + public function getIdAteste()
  54 + {
  55 + return $this->idAteste;
  56 + }
  57 +
  58 + /**
  59 + * Set descricao
  60 + *
  61 + * @param string $descricao
  62 + * @return Ateste
  63 + */
  64 + public function setDescricao($descricao)
  65 + {
  66 + $this->descricao = $descricao;
  67 +
  68 + return $this;
  69 + }
  70 +
  71 + /**
  72 + * Get descricao
  73 + *
  74 + * @return string
  75 + */
  76 + public function getDescricao()
  77 + {
  78 + return $this->descricao;
  79 + }
  80 +
  81 + /**
  82 + * Set quantidade
  83 + *
  84 + * @param integer $quantidade
  85 + * @return Ateste
  86 + */
  87 + public function setQuantidade($quantidade)
  88 + {
  89 + $this->quantidade = $quantidade;
  90 +
  91 + return $this;
  92 + }
  93 +
  94 + /**
  95 + * Get quantidade
  96 + *
  97 + * @return integer
  98 + */
  99 + public function getQuantidade()
  100 + {
  101 + return $this->quantidade;
  102 + }
  103 +
  104 + /**
  105 + * Set detalhes
  106 + *
  107 + * @param string $detalhes
  108 + * @return Ateste
  109 + */
  110 + public function setDetalhes($detalhes)
  111 + {
  112 + $this->detalhes = $detalhes;
  113 +
  114 + return $this;
  115 + }
  116 +
  117 + /**
  118 + * Get detalhes
  119 + *
  120 + * @return string
  121 + */
  122 + public function getDetalhes()
  123 + {
  124 + return $this->detalhes;
  125 + }
  126 +
  127 + /**
  128 + * Set atestado
  129 + *
  130 + * @param boolean $atestado
  131 + * @return Ateste
  132 + */
  133 + public function setAtestado($atestado)
  134 + {
  135 + $this->atestado = $atestado;
  136 +
  137 + return $this;
  138 + }
  139 +
  140 + /**
  141 + * Get atestado
  142 + *
  143 + * @return boolean
  144 + */
  145 + public function getAtestado()
  146 + {
  147 + return $this->atestado;
  148 + }
  149 +
  150 + /**
  151 + * Set data
  152 + *
  153 + * @param \DateTime $data
  154 + * @return Ateste
  155 + */
  156 + public function setData($data)
  157 + {
  158 + $this->data = $data;
  159 +
  160 + return $this;
  161 + }
  162 +
  163 + /**
  164 + * Get data
  165 + *
  166 + * @return \DateTime
  167 + */
  168 + public function getData()
  169 + {
  170 + return $this->data;
  171 + }
  172 +
  173 + /**
  174 + * Set qualidadeServico
  175 + *
  176 + * @param string $qualidadeServico
  177 + * @return Ateste
  178 + */
  179 + public function setQualidadeServico($qualidadeServico)
  180 + {
  181 + $this->qualidadeServico = $qualidadeServico;
  182 +
  183 + return $this;
  184 + }
  185 +
  186 + /**
  187 + * Get qualidadeServico
  188 + *
  189 + * @return string
  190 + */
  191 + public function getQualidadeServico()
  192 + {
  193 + return $this->qualidadeServico;
  194 + }
  195 + /**
  196 + * @var \Cacic\CommonBundle\Entity\Usuario
  197 + */
  198 + private $usuario;
  199 +
  200 +
  201 + /**
  202 + * Set usuario
  203 + *
  204 + * @param \Cacic\CommonBundle\Entity\Usuario $usuario
  205 + * @return Ateste
  206 + */
  207 + public function setUsuario(\Cacic\CommonBundle\Entity\Usuario $usuario = null)
  208 + {
  209 + $this->usuario = $usuario;
  210 +
  211 + return $this;
  212 + }
  213 +
  214 + /**
  215 + * Get usuario
  216 + *
  217 + * @return \Cacic\CommonBundle\Entity\Usuario
  218 + */
  219 + public function getUsuario()
  220 + {
  221 + return $this->usuario;
  222 + }
  223 + /**
  224 + * @var \Cacic\CommonBundle\Entity\Rede
  225 + */
  226 + private $rede;
  227 +
  228 +
  229 + /**
  230 + * Set rede
  231 + *
  232 + * @param \Cacic\CommonBundle\Entity\Rede $rede
  233 + * @return Ateste
  234 + */
  235 + public function setRede(\Cacic\CommonBundle\Entity\Rede $rede = null)
  236 + {
  237 + $this->rede = $rede;
  238 +
  239 + return $this;
  240 + }
  241 +
  242 + /**
  243 + * Get rede
  244 + *
  245 + * @return \Cacic\CommonBundle\Entity\Rede
  246 + */
  247 + public function getRede()
  248 + {
  249 + return $this->rede;
  250 + }
  251 + /**
  252 + * @var \Doctrine\Common\Collections\Collection
  253 + */
  254 + private $redes;
  255 +
  256 + /**
  257 + * Constructor
  258 + */
  259 + public function __construct()
  260 + {
  261 + $this->redes = new \Doctrine\Common\Collections\ArrayCollection();
  262 + }
  263 +
  264 + /**
  265 + * Add redes
  266 + *
  267 + * @param \Cacic\CommonBundle\Entity\Rede $redes
  268 + * @return Ateste
  269 + */
  270 + public function addRede(\Cacic\CommonBundle\Entity\Rede $redes)
  271 + {
  272 + $this->redes[] = $redes;
  273 +
  274 + return $this;
  275 + }
  276 +
  277 + /**
  278 + * Remove redes
  279 + *
  280 + * @param \Cacic\CommonBundle\Entity\Rede $redes
  281 + */
  282 + public function removeRede(\Cacic\CommonBundle\Entity\Rede $redes)
  283 + {
  284 + $this->redes->removeElement($redes);
  285 + }
  286 +
  287 + /**
  288 + * Get redes
  289 + *
  290 + * @return \Doctrine\Common\Collections\Collection
  291 + */
  292 + public function getRedes()
  293 + {
  294 + return $this->redes;
  295 + }
  296 +}
0 297 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Entity/AtesteRedes.php 0 → 100755
... ... @@ -0,0 +1,96 @@
  1 +<?php
  2 +
  3 +namespace Cacic\CommonBundle\Entity;
  4 +
  5 +use Doctrine\ORM\Mapping as ORM;
  6 +
  7 +/**
  8 + * AtesteRedes
  9 + */
  10 +class AtesteRedes
  11 +{
  12 + /**
  13 + * @var integer
  14 + */
  15 + private $estacoes;
  16 +
  17 + /**
  18 + * @var \Cacic\CommonBundle\Entity\Rede
  19 + */
  20 + private $rede;
  21 +
  22 + /**
  23 + * @var \Cacic\CommonBundle\Entity\Ateste
  24 + */
  25 + private $ateste;
  26 +
  27 +
  28 + /**
  29 + * Set estacoes
  30 + *
  31 + * @param integer $estacoes
  32 + * @return AtesteRedes
  33 + */
  34 + public function setEstacoes($estacoes)
  35 + {
  36 + $this->estacoes = $estacoes;
  37 +
  38 + return $this;
  39 + }
  40 +
  41 + /**
  42 + * Get estacoes
  43 + *
  44 + * @return integer
  45 + */
  46 + public function getEstacoes()
  47 + {
  48 + return $this->estacoes;
  49 + }
  50 +
  51 + /**
  52 + * Set rede
  53 + *
  54 + * @param \Cacic\CommonBundle\Entity\Rede $rede
  55 + * @return AtesteRedes
  56 + */
  57 + public function setRede(\Cacic\CommonBundle\Entity\Rede $rede)
  58 + {
  59 + $this->rede = $rede;
  60 +
  61 + return $this;
  62 + }
  63 +
  64 + /**
  65 + * Get rede
  66 + *
  67 + * @return \Cacic\CommonBundle\Entity\Rede
  68 + */
  69 + public function getRede()
  70 + {
  71 + return $this->rede;
  72 + }
  73 +
  74 + /**
  75 + * Set ateste
  76 + *
  77 + * @param \Cacic\CommonBundle\Entity\Ateste $ateste
  78 + * @return AtesteRedes
  79 + */
  80 + public function setAteste(\Cacic\CommonBundle\Entity\Ateste $ateste)
  81 + {
  82 + $this->ateste = $ateste;
  83 +
  84 + return $this;
  85 + }
  86 +
  87 + /**
  88 + * Get ateste
  89 + *
  90 + * @return \Cacic\CommonBundle\Entity\Ateste
  91 + */
  92 + public function getAteste()
  93 + {
  94 + return $this->ateste;
  95 + }
  96 +}
0 97 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Entity/AtesteRedesRepository.php 0 → 100755
... ... @@ -0,0 +1,15 @@
  1 +<?php
  2 +
  3 +namespace Cacic\CommonBundle\Entity;
  4 +
  5 +use Doctrine\ORM\EntityRepository;
  6 +
  7 +/**
  8 + * AtesteRedesRepository
  9 + *
  10 + * This class was generated by the Doctrine ORM. Add your own custom
  11 + * repository methods below.
  12 + */
  13 +class AtesteRedesRepository extends EntityRepository
  14 +{
  15 +}
... ...
src/Cacic/CommonBundle/Entity/AtesteRepository.php 0 → 100755
... ... @@ -0,0 +1,15 @@
  1 +<?php
  2 +
  3 +namespace Cacic\CommonBundle\Entity;
  4 +
  5 +use Doctrine\ORM\EntityRepository;
  6 +
  7 +/**
  8 + * AtesteRepository
  9 + *
  10 + * This class was generated by the Doctrine ORM. Add your own custom
  11 + * repository methods below.
  12 + */
  13 +class AtesteRepository extends EntityRepository
  14 +{
  15 +}
... ...
src/Cacic/CommonBundle/Entity/ComputadorColetaRepository.php
... ... @@ -147,10 +147,11 @@ class ComputadorColetaRepository extends EntityRepository
147 147 return $qb->getQuery()->execute();
148 148 }
149 149  
150   - public function gerarRelatorioSoftware( $filtros, $software )
  150 + public function gerarRelatorioSoftware( $filtros, $software, $local )
151 151 {
152 152 $qb = $this->createQueryBuilder('coleta')
153   - ->select('DISTINCT IDENTITY(coleta.computador), property.nmPropertyName, coleta.teClassPropertyValue, comp.nmComputador, comp.teNodeAddress, comp.teIpComputador, so.idSo, so.inMswindows, so.sgSo, rede.idRede, rede.nmRede, rede.teIpRede, local.nmLocal, local.idLocal, hist.dtHrInclusao')
  153 + ->select('DISTINCT IDENTITY(coleta.computador), property.nmPropertyName, coleta.teClassPropertyValue, comp.nmComputador, comp.teNodeAddress,
  154 + comp.teIpComputador, so.idSo, so.inMswindows, so.sgSo, rede.idRede, rede.nmRede, rede.teIpRede, local.nmLocal, local.idLocal, comp.dtHrInclusao')
154 155 ->innerJoin('CacicCommonBundle:ComputadorColetaHistorico','hist', 'WITH', 'coleta.idComputadorColeta = hist.computadorColeta')
155 156 ->innerJoin('coleta.classProperty', 'property')
156 157 ->innerJoin('property.idClass', 'classe')
... ... @@ -166,7 +167,10 @@ class ComputadorColetaRepository extends EntityRepository
166 167 /**
167 168 * Verifica os filtros
168 169 */
169   - if ( array_key_exists('locais', $filtros) && !empty($filtros['locais']) )
  170 + if (!empty($local))
  171 + $qb->andWhere('local.nmLocal IN (:local)')->setParameter('local', $local);
  172 +
  173 + if ( array_key_exists('local', $filtros) && !empty($filtros['local']) )
170 174 $qb->andWhere('local.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] ));
171 175  
172 176 if ( array_key_exists('redes', $filtros) && !empty($filtros['redes']) )
... ...
src/Cacic/CommonBundle/Entity/ComputadorRepository.php
... ... @@ -282,4 +282,81 @@ class ComputadorRepository extends EntityRepository
282 282 return $computador;
283 283 }
284 284  
285   -}
286 285 \ No newline at end of file
  286 + /**
  287 + * Realiza pesquisa por LOGs de ACESSO para máquinas inativas
  288 + * @param date $dataInicio
  289 + * @param date $dataFim
  290 + * @param array $locais
  291 + */
  292 + public function pesquisarInativos( $dataInicio, $dataFim, $locais )
  293 + {
  294 +
  295 + // Monta a Consulta básica...
  296 + $query = $this->createQueryBuilder('comp')
  297 + ->select('rede.idRede', 'rede.nmRede', 'rede.teIpRede', 'loc.nmLocal', 'loc.sgLocal', 'COUNT(DISTINCT comp.idComputador) as numComp')
  298 + ->innerJoin('comp.idRede', 'rede')
  299 + ->innerJoin('rede.idLocal', 'loc');
  300 +
  301 + /**
  302 + * Verifica os filtros que foram parametrizados
  303 + */
  304 +
  305 + if (empty($dataInicio) && empty($dataFim)) {
  306 + // Aqui não preciso filtrar pela data
  307 + $query->leftJoin('CacicCommonBundle:LogAcesso', 'log', 'WITH', 'comp.idComputador = log.idComputador');
  308 + } else {
  309 +
  310 + $query->leftJoin('CacicCommonBundle:LogAcesso', 'log', 'WITH', 'comp.idComputador = log.idComputador AND log.data >= :dtInicio AND log.data <= :dtFim')
  311 + ->setParameter('dtInicio', ( $dataInicio.' 00:00:00' ))
  312 + ->setParameter('dtFim', ( $dataFim.' 00:00:00' ));
  313 +
  314 + }
  315 +
  316 + if ( count($locais) )
  317 + $query->andWhere( 'loc.idLocal IN (:locais)' )->setParameter('locais', $locais);
  318 +
  319 +
  320 + // Filtro que mostra somente máquinas sem coleta
  321 + $query->andWhere('log.idComputador IS NULL');
  322 +
  323 + // Agrupa todos os campos
  324 + $query->groupBy('rede', 'loc.nmLocal', 'loc.sgLocal');
  325 +
  326 + return $query->getQuery()->execute();
  327 + }
  328 +
  329 + public function gerarRelatorioRede( $filtros, $idRede,$dataInicio, $dataFim ) {
  330 +
  331 + // Monta a Consulta básica...
  332 + $query = $this->createQueryBuilder('comp')
  333 + ->select('rede.idRede', 'rede.nmRede', 'rede.teIpRede', 'loc.nmLocal', 'loc.sgLocal', 'comp.idComputador', 'comp.nmComputador', 'comp.teNodeAddress', 'comp.teIpComputador', 'so.idSo', 'so.inMswindows', 'so.sgSo')
  334 + ->innerJoin('comp.idSo', 'so')
  335 + ->innerJoin('comp.idRede', 'rede')
  336 + ->innerJoin('rede.idLocal', 'loc');
  337 +
  338 + /**
  339 + * Verifica os filtros que foram parametrizados
  340 + */
  341 + if (empty($dataInicio) && empty($dataFim)) {
  342 + // Aqui não preciso filtrar pela data
  343 + $query->leftJoin('CacicCommonBundle:LogAcesso', 'log', 'WITH', 'comp.idComputador = log.idComputador');
  344 + } else {
  345 +
  346 + $query->leftJoin('CacicCommonBundle:LogAcesso', 'log', 'WITH', 'comp.idComputador = log.idComputador AND log.data >= :dtInicio AND log.data <= :dtFim')
  347 + ->setParameter('dtInicio', ( $dataInicio.' 00:00:00' ))
  348 + ->setParameter('dtFim', ( $dataFim.' 00:00:00' ));
  349 + }
  350 +
  351 + if ( $idRede )
  352 + $query->andWhere( 'comp.idRede IN (:rede)' )->setParameter('rede', $idRede);
  353 +
  354 + // Filtro que mostra somente máquinas sem coleta
  355 + $query->andWhere('log.idComputador IS NULL');
  356 +
  357 + $query->groupBy('rede.idRede', 'rede.nmRede', 'rede.teIpRede', 'loc.nmLocal', 'loc.sgLocal', 'comp.idComputador', 'comp.nmComputador', 'comp.teNodeAddress', 'comp.teIpComputador', 'so.idSo', 'so.inMswindows', 'so.sgSo');
  358 +
  359 +
  360 + return $query->getQuery()->execute();
  361 + }
  362 +
  363 +}
... ...
src/Cacic/CommonBundle/Entity/LogAcesso.php 0 → 100755
... ... @@ -0,0 +1,91 @@
  1 +<?php
  2 +
  3 +namespace Cacic\CommonBundle\Entity;
  4 +
  5 +use Doctrine\ORM\Mapping as ORM;
  6 +use Symfony\Component\Validator\Constraints\DateTime;
  7 +
  8 +/**
  9 + * LogAcesso
  10 + */
  11 +class LogAcesso
  12 +{
  13 + /**
  14 + * @var integer
  15 + */
  16 + private $idLogAcesso;
  17 +
  18 + /**
  19 + * @var \DateTime
  20 + */
  21 + private $data;
  22 +
  23 + /**
  24 + * @var \Cacic\CommonBundle\Entity\Computador
  25 + */
  26 + private $idComputador;
  27 +
  28 + /**
  29 + * Get idLogAcesso
  30 + *
  31 + * @return integer
  32 + */
  33 + public function getIdLogAcesso()
  34 + {
  35 + return $this->idLogAcesso;
  36 + }
  37 +
  38 + /**
  39 + * Set data
  40 + *
  41 + * @param \DateTime $data
  42 + * @return LogAcesso
  43 + */
  44 + public function setData($data)
  45 + {
  46 + $this->data = $data;
  47 +
  48 + return $this;
  49 + }
  50 +
  51 + /**
  52 + * Get data
  53 + *
  54 + * @return \DateTime
  55 + */
  56 + public function getData()
  57 + {
  58 + return $this->data;
  59 + }
  60 +
  61 + /**
  62 + * Set idComputador
  63 + *
  64 + * @param \Cacic\CommonBundle\Entity\Computador $idComputador
  65 + * @return LogAcesso
  66 + */
  67 + public function setIdComputador(\Cacic\CommonBundle\Entity\Computador $idComputador = null)
  68 + {
  69 + $this->idComputador = $idComputador;
  70 +
  71 + return $this;
  72 + }
  73 +
  74 + /**
  75 + * Get idComputador
  76 + *
  77 + * @return \Cacic\CommonBundle\Entity\Computador
  78 + */
  79 + public function getIdComputador()
  80 + {
  81 + return $this->idComputador;
  82 + }
  83 +
  84 + /**
  85 + * @PrePersist
  86 + */
  87 + public function onPrePersistSetRegistrationDate()
  88 + {
  89 + $this->data = new \DateTime();
  90 + }
  91 +}
... ...
src/Cacic/CommonBundle/Entity/LogAcessoRepository.php 0 → 100755
... ... @@ -0,0 +1,109 @@
  1 +<?php
  2 +
  3 +namespace Cacic\CommonBundle\Entity;
  4 +
  5 +use Doctrine\ORM\EntityRepository;
  6 +
  7 +/**
  8 + * LogAcessoRepository
  9 + *
  10 + * This class was generated by the Doctrine ORM. Add your own custom
  11 + * repository methods below.
  12 + */
  13 +class LogAcessoRepository extends EntityRepository
  14 +{
  15 + /**
  16 + * Função que retorna o último acesso para o computador solicitado
  17 + *
  18 + * @param $computador
  19 + */
  20 + public function ultimoAcesso( $computador ) {
  21 + $qb = $this->createQueryBuilder('acesso')
  22 + ->select('acesso')
  23 + ->where('acesso.idComputador = :computador')
  24 + ->orderBy('acesso.data', 'desc')
  25 + ->setMaxResults(1)
  26 + ->setParameter('computador', $computador );
  27 +
  28 + return $qb->getQuery()->getOneOrNullResult();
  29 + }
  30 +
  31 +
  32 + /**
  33 + *
  34 + * Realiza pesquisa por LOGs de ACESSO ou ATIVIDADES segundo parâmetros informados
  35 + * @param string|array $tipoPesquisa
  36 + * @param date $dataInicio
  37 + * @param date $dataFim
  38 + * @param array $locais
  39 + */
  40 + public function pesquisar( $dataInicio, $dataFim, $locais )
  41 + {
  42 +
  43 + // Monta a Consulta básica...
  44 + $query = $this->createQueryBuilder('log')
  45 + ->select('rede.idRede', 'rede.nmRede', 'rede.teIpRede', 'loc.nmLocal', 'loc.sgLocal', 'COUNT(DISTINCT log.idComputador) as numComp')
  46 + ->innerJoin('log.idComputador', 'comp')
  47 + ->innerJoin('comp.idRede', 'rede')
  48 + ->innerJoin('rede.idLocal', 'loc')
  49 + ->groupBy('rede', 'loc.nmLocal', 'loc.sgLocal');
  50 +
  51 + /**
  52 + * Verifica os filtros que foram parametrizados
  53 + */
  54 + if ( $dataInicio )
  55 + $query->andWhere( 'log.data >= :dtInicio' )->setParameter('dtInicio', ( $dataInicio.' 00:00:00' ));
  56 +
  57 + if ( $dataFim )
  58 + $query->andWhere( 'log.data <= :dtFim' )->setParameter('dtFim', ( $dataFim.' 23:59:59' ));
  59 +
  60 + if ( count($locais) )
  61 + $query->andWhere( 'loc.idLocal IN (:locais)' )->setParameter('locais', $locais);
  62 +
  63 +
  64 + return $query->getQuery()->execute();
  65 + }
  66 + public function gerarRelatorioRede( $filtros, $idRede,$dataInicio, $dataFim )
  67 + {
  68 + $query = $this->createQueryBuilder('log')
  69 + ->select('comp.idComputador', 'comp.nmComputador', 'comp.teNodeAddress','comp.teIpComputador', 'max(log.data) AS data', 'so.idSo', 'so.inMswindows', 'so.sgSo', 'rede.idRede', 'rede.nmRede', 'rede.teIpRede', 'local.nmLocal', 'local.idLocal')
  70 + ->innerJoin('log.idComputador','comp')
  71 + ->innerJoin('comp.idSo', 'so')
  72 + ->innerJoin('comp.idRede','rede')
  73 + ->innerJoin('rede.idLocal', 'local')
  74 + ->groupBy('comp.idComputador', 'comp.nmComputador', 'comp.teNodeAddress','comp.teIpComputador', 'so.idSo', 'so.inMswindows', 'so.sgSo', 'rede.idRede', 'rede.nmRede', 'rede.teIpRede', 'local.nmLocal', 'local.idLocal');
  75 +
  76 + /**
  77 + * Verifica os filtros que foram parametrizados
  78 + */
  79 + if ( $dataInicio )
  80 + $query->andWhere( 'log.data >= :dtInicio' )->setParameter('dtInicio', ( $dataInicio.' 00:00:00' ));
  81 +
  82 + if ( $dataFim )
  83 + $query->andWhere( 'log.data <= :dtFim' )->setParameter('dtFim', ( $dataFim.' 23:59:59' ));
  84 +
  85 + if ( ($idRede) )
  86 + $query->andWhere( 'comp.idRede IN (:rede)' )->setParameter('rede', $idRede);
  87 +
  88 + return $query->getQuery()->execute();
  89 + }
  90 +
  91 + /**
  92 + *
  93 + * Total de computadores monitorados nos últimos 30 dias
  94 + *
  95 + */
  96 +
  97 + public function countPorComputador() {
  98 +
  99 + $query = $this->createQueryBuilder('log')
  100 + ->select('COUNT(DISTINCT comp.idComputador)')
  101 + ->innerJoin('CacicCommonBundle:Computador','comp', 'WITH', 'log.idComputador = comp.idComputador')
  102 + ->andWhere( 'log.data >= (current_date() - 30)' );
  103 +
  104 + return $query->getQuery()->execute();
  105 +
  106 + }
  107 +
  108 +
  109 +}
... ...
src/Cacic/CommonBundle/Entity/PatrimonioConfigInterfaceRepository.php
... ... @@ -12,6 +12,17 @@ use Doctrine\ORM\EntityRepository;
12 12 */
13 13 class PatrimonioConfigInterfaceRepository extends EntityRepository
14 14 {
  15 +/*
  16 +* Método de listagem dos Patrimonio de conf de interface cadastrados e respectivas informações
  17 +*/
  18 + public function listar()
  19 + {
  20 + $_dql = "SELECT pci.teEtiqueta, pci.idEtiqueta
  21 + FROM CacicCommonBundle:PatrimonioConfigInterface pci
  22 + ORDER BY pci.idEtiqueta ASC";
  23 +
  24 + return $this->getEntityManager()->createQuery( $_dql )->getArrayResult();
  25 + }
15 26  
16 27 /**
17 28 *
... ...
src/Cacic/CommonBundle/Entity/RedeRepository.php
... ... @@ -36,11 +36,13 @@ class RedeRepository extends EntityRepository
36 36 public function paginar( \Knp\Component\Pager\Paginator $paginator, $page = 1 )
37 37 {
38 38 $qb = $this->createQueryBuilder('r')
39   - ->select('r.idRede','r.nmRede','r.teIpRede','r.teServCacic', 'r.teServUpdates', 'r.teMascaraRede', 'l.nmLocal', 'COUNT(comp.idComputador) AS numComp', 's.nmServidorAutenticacao')
  39 + ->select('r.idRede','r.nmRede','r.teIpRede','r.teServCacic', 'r.teServUpdates',
  40 + 'r.teMascaraRede', 'l.nmLocal', 'COUNT(comp.idComputador) AS numComp', 's.nmServidorAutenticacao','uorg.nmUorg')
40 41 ->innerJoin('CacicCommonBundle:Local', 'l', 'WITH', 'l.idLocal = r.idLocal')
41 42 ->leftJoin('CacicCommonBundle:ServidorAutenticacao', 's', 'WITH', 's.idServidorAutenticacao = r.idServidorAutenticacao')
42 43 ->leftJoin('CacicCommonBundle:Computador', 'comp', 'WITH', 'comp.idRede = r.idRede')
43   - ->groupBy('r.idRede, r.nmRede, r.teIpRede, r.teServCacic, r.teServUpdates, r.teMascaraRede, l.nmLocal, s.nmServidorAutenticacao')
  44 + ->leftJoin('CacicCommonBundle:Uorg', 'uorg', 'WITH', 'uorg.rede = r.idRede')
  45 + ->groupBy('r.idRede, r.nmRede, r.teIpRede, r.teServCacic, r.teServUpdates, r.teMascaraRede, l.nmLocal, s.nmServidorAutenticacao, uorg.nmUorg')
44 46 ->orderBy('r.teIpRede, l.nmLocal');
45 47  
46 48 return $paginator->paginate(
... ... @@ -176,4 +178,33 @@ class RedeRepository extends EntityRepository
176 178  
177 179 return $qb->getQuery()->getArrayResult();
178 180 }
  181 +
  182 + public function gerarRelatorioRede( $filtros, $idRede )
  183 + {
  184 + $qb = $this->createQueryBuilder('rede')
  185 + ->select('DISTINCT (comp.idComputador)', 'comp.nmComputador', 'comp.teNodeAddress','comp.teIpComputador', 'comp.dtHrUltAcesso', 'so.idSo', 'so.inMswindows', 'so.sgSo', 'rede.idRede'
  186 + , 'rede.nmRede', 'rede.teIpRede', 'local.nmLocal', 'local.idLocal')
  187 + ->innerJoin('CacicCommonBundle:Computador', 'comp','WITH','rede.idRede = comp.idRede')
  188 + ->innerJoin('CacicCommonBundle:ComputadorColetaHistorico','hist', 'WITH', 'comp.idComputador = hist.computador')
  189 + ->innerJoin('comp.idSo', 'so')
  190 + ->innerJoin('rede.idLocal', 'local')
  191 + ->where('comp.idRede = :rede')
  192 + ->setParameter('rede', $idRede);
  193 + /**
  194 + * Verifica os filtros
  195 + */
  196 + if ( array_key_exists('locais', $filtros) && !empty($filtros['locais']) )
  197 + $qb->andWhere('local.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] ));
  198 +
  199 +
  200 +
  201 + if ( array_key_exists('so', $filtros) && !empty($filtros['so']) )
  202 + $qb->andWhere('comp.idSo IN (:so)')->setParameter('so', explode( ',', $filtros['so'] ));
  203 +
  204 + if ( array_key_exists('conf', $filtros) && !empty($filtros['conf']) )
  205 + $qb->andWhere('property.idClassProperty IN (:conf)')->setParameter('conf', explode( ',', $filtros['conf'] ));
  206 +
  207 +
  208 + return $qb->getQuery()->execute();
  209 + }
179 210 }
180 211 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Entity/SoftwareRepository.php
... ... @@ -39,18 +39,38 @@ class SoftwareRepository extends EntityRepository
39 39 return $this->getEntityManager()->createQuery( $_dql )->getArrayResult();
40 40 }
41 41  
  42 + public function listarSoftware()
  43 + {
  44 + $qb = $this->createQueryBuilder('sw')
  45 + ->select('sw.nmSoftware','class.idClassProperty')
  46 + ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'sw.idSoftware = prop.software')
  47 + ->innerJoin('CacicCommonBundle:ClassProperty', 'class','WITH', 'prop.classProperty = class.idClassProperty')
  48 + ->groupBy('sw.nmSoftware,class.idClassProperty, class.nmPropertyName')
  49 + ->orderBy(' sw.nmSoftware');
  50 +
  51 + return $qb->getQuery()->execute();
  52 + }
  53 +
42 54 /**
43 55 *
44 56 * Método de listagem dos Softwares cadastrados que não foram classificados (sem Tipo de Software)
45 57 */
46   - public function listarNaoClassificados()
  58 + public function listarNaoClassificados( \Knp\Component\Pager\Paginator $paginator, $page = 1)
47 59 {
48   - $_dql = "SELECT s
49   - FROM CacicCommonBundle:Software s
50   - WHERE s.idTipoSoftware IS NULL
51   - ORDER BY s.nmSoftware ASC";
  60 + $qb = $this->createQueryBuilder('sw')
  61 + ->select('sw.nmSoftware','sw.idSoftware')
  62 + ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'sw.idSoftware = prop.software')
  63 + ->innerJoin('CacicCommonBundle:ClassProperty', 'class','WITH', 'prop.classProperty = class.idClassProperty')
  64 + ->where('sw.idTipoSoftware is null')
  65 + ->groupBy('sw.nmSoftware,sw.idSoftware')
  66 + ->orderBy('sw.nmSoftware');
  67 +
  68 + return $paginator->paginate(
  69 + $qb->getQuery()->execute(),
  70 + $page,
  71 + 10
  72 + );
52 73  
53   - return $this->getEntityManager()->createQuery( $_dql )->getArrayResult();
54 74 }
55 75  
56 76 /**
... ... @@ -77,20 +97,21 @@ class SoftwareRepository extends EntityRepository
77 97 {
78 98 // Monta a Consulta básica...
79 99 $qb = $this->createQueryBuilder('sw')
80   - ->select('COALESCE(sw.nmSoftware, prop.displayName) as nmSoftware', 'l.nmLocal', 'r.nmRede', 'r.teIpRede', 'COUNT(DISTINCT col.computador) AS numComp')
  100 + ->select('COALESCE(sw.nmSoftware, prop.displayName) as nmSoftware', 'l.nmLocal','COUNT(DISTINCT col.computador) AS numComp')
81 101 ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'sw.idSoftware = prop.software')
  102 + ->innerJoin('CacicCommonBundle:ClassProperty', 'class','WITH', 'prop.classProperty = class.idClassProperty')
82 103 ->innerJoin('CacicCommonBundle:ComputadorColeta', 'col', 'WITH', 'col.computador = prop.computador')
83 104 ->innerJoin('CacicCommonBundle:Computador', 'comp', 'WITH', 'col.computador = comp.idComputador')
84   - ->innerJoin('CacicCommonBundle:Rede', 'r', 'WITH', 'comp.idRede = r.idRede')
  105 + ->innerJoin('comp.idRede','r')
85 106 ->leftJoin('r.idLocal', 'l')
86   - ->groupBy('sw.nmSoftware, prop.displayName, l.nmLocal, r.nmRede, r.teIpRede')
  107 + ->groupBy('sw.nmSoftware, prop.displayName, l.nmLocal')
87 108 ->orderBy('sw.nmSoftware, l.nmLocal');
88 109  
89 110 /**
90 111 * Verifica os filtros que foram parametrizados
91 112 */
92 113 if ( array_key_exists('softwares', $filtros) && !empty($filtros['softwares']) )
93   - $qb->andWhere('sw.idSoftware IN (:softwares)')->setParameter('softwares', explode( ',', $filtros['softwares'] ));
  114 + $qb->andWhere('class.idClassProperty IN (:softwares)')->setParameter('softwares', explode( ',', $filtros['softwares'] ));
94 115  
95 116 if ( array_key_exists('locais', $filtros) && !empty($filtros['locais']) )
96 117 $qb->andWhere('l.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] ));
... ... @@ -163,13 +184,12 @@ class SoftwareRepository extends EntityRepository
163 184 {
164 185 // Monta a Consulta básica...
165 186 $qb = $this->createQueryBuilder('sw')
166   - ->select('COALESCE(sw.nmSoftware, prop.displayName) as nmSoftware', 'tipo.teDescricaoTipoSoftware', 'tipo.idTipoSoftware', 'COUNT(DISTINCT col.computador) AS numComp')
  187 + ->select('COALESCE( sw.nmSoftware) as nmSoftware', 'tipo.teDescricaoTipoSoftware', 'COUNT(DISTINCT col.computador) AS numComp')
167 188 ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'sw.idSoftware = prop.software')
168 189 ->innerJoin('CacicCommonBundle:ComputadorColeta', 'col', 'WITH', 'col.computador = prop.computador')
169 190 ->innerJoin('CacicCommonBundle:Computador', 'comp', 'WITH', 'col.computador = comp.idComputador')
170 191 ->innerJoin('CacicCommonBundle:TipoSoftware', 'tipo', 'WITH', 'sw.idTipoSoftware = tipo.idTipoSoftware')
171   - ->groupBy('sw.nmSoftware, prop.displayName, tipo.teDescricaoTipoSoftware, tipo.idTipoSoftware')
172   - ->orderBy('sw.nmSoftware');
  192 + ->groupBy('tipo.teDescricaoTipoSoftware, sw.nmSoftware, tipo.idTipoSoftware');
173 193  
174 194 /**
175 195 * Verifica os filtros que foram parametrizados
... ... @@ -202,14 +222,15 @@ class SoftwareRepository extends EntityRepository
202 222 {
203 223 // Monta a Consulta básica...
204 224 $qb = $this->createQueryBuilder('sw')
205   - ->select( 'comp.nmComputador', 'sw.nmSoftware', 'so.teSo', 'r.teIpRede', 'l.nmLocal')
206   - ->innerJoin('sw.estacoes', 'se')
207   - ->innerJoin('se.idComputador', 'comp')
208   - ->leftJoin('comp.idSo', 'so')
209   - ->leftJoin('comp.idRede', 'r')
210   - ->leftJoin('r.idLocal', 'l')
211   - ->groupBy('so.teSo','comp.nmComputador','l, sw', 'r.teIpRede', 'l.nmLocal')
212   - ->orderBy('sw.nmSoftware, l.nmLocal');
  225 + ->select( 'comp.nmComputador', 'sw.nmSoftware', 'so.sgSo', 'r.teIpRede', 'l.nmLocal', 'pci.teEtiqueta', 'pci.idEtiqueta','comp.idComputador','so.inMswindows')
  226 + ->innerJoin('CacicCommonBundle:SoftwareEstacao', 'se','WITH','sw.idSoftware = se.idSoftware')
  227 + ->innerJoin('CacicCommonBundle:Computador', 'comp','WITH','se.idComputador = comp.idComputador')
  228 + ->leftJoin('CacicCommonBundle:So', 'so','WITH','comp.idSo = so.idSo')
  229 + ->leftJoin('CacicCommonBundle:Rede', 'r','WITH', 'comp.idRede = r.idRede')
  230 + ->innerJoin('CacicCommonBundle:Local','l','WITH', 'r.idLocal = l.idLocal')
  231 + ->innerJoin('CacicCommonBundle:PatrimonioConfigInterface','pci','WITH','l.idLocal = pci.local')
  232 + ->groupBy('comp.nmComputador, sw.nmSoftware, so.sgSo, r.teIpRede, l.nmLocal, pci.teEtiqueta, pci.idEtiqueta,comp.idComputador,so.inMswindows')
  233 + ->orderBy('sw.nmSoftware, l.nmLocal, pci.idEtiqueta');
213 234  
214 235 /*
215 236 * Verifica os filtros que foram parametrizados
... ... @@ -224,9 +245,10 @@ class SoftwareRepository extends EntityRepository
224 245 if ( array_key_exists('so', $filtros) && !empty($filtros['so']) )
225 246 $qb->andWhere('comp.idSo IN (:so)')->setParameter('so', explode( ',', $filtros['so'] ));
226 247  
  248 + if ( array_key_exists('pci', $filtros) && !empty($filtros['pci']) )
  249 + $qb->andWhere('pci.idEtiqueta IN (:pci)')->setParameter('pci', explode( ',', $filtros['pci'] ));
  250 +
227 251 return $qb->getQuery()->execute();
228 252 }
229 253  
230   -
231   -
232 254 }
233 255 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Entity/UorgRepository.php
... ... @@ -12,7 +12,13 @@ use Doctrine\ORM\EntityRepository;
12 12 */
13 13 class UorgRepository extends EntityRepository
14 14 {
15   -
  15 + public function listar()
  16 + {
  17 + $_dql = "SELECT uorg.idUorg, uorg.nmUorg
  18 + FROM CacicCommonBundle:Uorg uorg";
  19 +
  20 + return $this->getEntityManager()->createQuery( $_dql )->getArrayResult();
  21 + }
16 22 /**
17 23 *
18 24 * Recupera as Unidades Organizacionais do primeiro nível
... ... @@ -36,12 +42,12 @@ class UorgRepository extends EntityRepository
36 42 */
37 43 public function getFolhasDoNo( $idUorgPai )
38 44 {
39   - $_dql = "SELECT uorg, COUNT(filhas.idUorg) AS numFilhas
  45 + $_dql = "SELECT uorg.idUorg, uorg.nmUorg, COUNT(filhas.idUorg) AS numFilhas
40 46 FROM CacicCommonBundle:Uorg uorg
41 47 INNER JOIN uorg.uorgPai pai
42 48 LEFT JOIN uorg.uorgFilhas filhas
43 49 WHERE pai.idUorg = :idUorgPai
44   - GROUP BY uorg.idUorg";
  50 + GROUP BY uorg.idUorg, uorg.nmUorg";
45 51  
46 52 return $this->getEntityManager()->createQuery( $_dql )
47 53 ->setParameter('idUorgPai', $idUorgPai)
... ... @@ -67,5 +73,19 @@ class UorgRepository extends EntityRepository
67 73 {
68 74  
69 75 }
70   -
  76 +
  77 + public function vincular()
  78 + {
  79 + $_dql = "SELECT uorg.idUorg, r.idRede, uorg.nmUorg, COUNT(filhas.idUorg) AS numFilhas
  80 + FROM CacicCommonBundle:Uorg uorg
  81 + LEFT JOIN uorg.uorgFilhas filhas
  82 + LEFT JOIN uorg.rede r
  83 + WHERE uorg.uorgPai IS NULL
  84 + GROUP BY uorg.idUorg, uorg.nmUorg, r.idRede";
  85 +
  86 + return $this->getEntityManager()->createQuery( $_dql )->getArrayResult();
  87 + }
  88 +
  89 +
  90 +
71 91 }
... ...
src/Cacic/CommonBundle/Entity/UsuarioRepository.php
... ... @@ -15,12 +15,13 @@ class UsuarioRepository extends EntityRepository
15 15  
16 16 public function paginar( \Knp\Component\Pager\Paginator $paginator, $page = 1 )
17 17 {
18   - $_dql = "SELECT u, l.nmLocal, g.teGrupoUsuarios, COUNT(ls.idLocal) as numLocSec
  18 + $_dql = "SELECT u, u.nmUsuarioCompleto, l.nmLocal, g.teGrupoUsuarios, COUNT(ls.idLocal) as numLocSec
19 19 FROM CacicCommonBundle:Usuario u
20 20 JOIN u.idLocal l
21 21 JOIN u.idGrupoUsuario g
22 22 LEFT JOIN u.locaisSecundarios ls
23   - GROUP BY u, l.nmLocal, g.teGrupoUsuarios";
  23 + GROUP BY u, l.nmLocal, g.teGrupoUsuarios
  24 + ORDER BY u.nmUsuarioCompleto, l.nmLocal ASC";
24 25  
25 26 return $paginator->paginate(
26 27 $this->getEntityManager()->createQuery( $_dql ),
... ...
src/Cacic/CommonBundle/Form/Type/AquisicaoItemType.php
... ... @@ -2,6 +2,7 @@
2 2  
3 3 namespace Cacic\CommonBundle\Form\Type;
4 4  
  5 +use Cacic\CommonBundle\Entity\SoftwareRepository;
5 6 use Symfony\Component\Form\AbstractType;
6 7 use Symfony\Component\Form\FormBuilderInterface;
7 8  
... ... @@ -31,9 +32,19 @@ class AquisicaoItemType extends AbstractType
31 32 'entity',
32 33 array(
33 34 'class' => 'CacicCommonBundle:Software',
34   - 'property' => 'nmSoftware',
  35 + 'query_builder' => function(SoftwareRepository $er) {
  36 + return $er->createQueryBuilder('sw')
  37 + ->select('sw')
  38 + ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'sw.idSoftware = prop.software')
  39 + ->innerJoin('CacicCommonBundle:ClassProperty', 'class','WITH', 'prop.classProperty = class.idClassProperty')
  40 + ->groupBy('class.idClassProperty, class.nmPropertyName, sw')
  41 + ->orderBy('sw.nmSoftware');
  42 + },
  43 + 'property'=>'nmSoftware',
35 44 'empty_value' => 'Selecione',
36   - 'label'=>'Software:', 'max_length'=>100 )
  45 + 'label'=>'Software:',
  46 + 'max_length'=>100
  47 + )
37 48 );
38 49  
39 50 $builder->add(
... ...
src/Cacic/CommonBundle/Form/Type/AquisicaoType.php
... ... @@ -19,7 +19,7 @@ class AquisicaoType extends AbstractType
19 19 $builder->add(
20 20 'nrProcesso',
21 21 null,
22   - array( 'label'=>'Processo de aquisicao:', 'max_length'=>11 )
  22 + array( 'label'=>'Processo de aquisicao:', 'max_length'=>60 )
23 23 );
24 24  
25 25 $builder->add(
... ...
src/Cacic/CommonBundle/Form/Type/AtesteType.php 0 → 100755
... ... @@ -0,0 +1,72 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: eduardo
  5 + * Date: 11/02/14
  6 + * Time: 17:37
  7 + */
  8 +
  9 +namespace Cacic\CommonBundle\Form\Type;
  10 +
  11 +
  12 +use Symfony\Component\Form\AbstractType;
  13 +use Symfony\Component\Form\FormBuilderInterface;
  14 +
  15 +class AtesteType extends AbstractType {
  16 +
  17 + /**
  18 + * Formulário de Ateste
  19 + */
  20 +
  21 + public function buildForm( FormBuilderInterface $builder, array $options )
  22 + {
  23 +
  24 + $builder->add(
  25 + 'descricao',
  26 + 'text',
  27 + array(
  28 + 'label'=>'Descrição:',
  29 + 'disabled' => true,
  30 + 'attr' => array(
  31 + 'value' => 'Ateste'
  32 + )
  33 + )
  34 + );
  35 +
  36 + $builder->add(
  37 + 'atestado',
  38 + 'checkbox',
  39 + array(
  40 + 'label' => 'Ateste',
  41 + 'required' => false
  42 + )
  43 + );
  44 +
  45 + $builder->add(
  46 + 'detalhes',
  47 + 'textarea',
  48 + array(
  49 + 'label' => 'Insira sua justificativa para discordância',
  50 + 'required' => false
  51 + )
  52 + );
  53 +
  54 + $builder->add(
  55 + 'qualidade_servico',
  56 + 'textarea',
  57 + array(
  58 + 'label' => 'Insira seus comentários sobre a qualidade do serviço'
  59 + )
  60 + );
  61 +
  62 + }
  63 +
  64 + /**
  65 + * Get Name
  66 + */
  67 +
  68 + public function getName() {
  69 + return 'Ateste';
  70 + }
  71 +
  72 +}
0 73 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Form/Type/GrupoUsuarioType.php
... ... @@ -36,7 +36,7 @@ class GrupoUsuarioType extends AbstractType
36 36 'label' => 'Acessos:'
37 37 )
38 38 );
39   - $builder->add( 'csNivelAdministracao', 'text',
  39 + $builder->add( 'csNivelAdministracao', 'number',
40 40 array(
41 41 'max_length' => 50,
42 42 'required'=>false,
... ...
src/Cacic/CommonBundle/Form/Type/RedeType.php
... ... @@ -22,6 +22,7 @@ class RedeType extends AbstractType
22 22 'empty_value' => 'Selecione o Local',
23 23 'class' => 'CacicCommonBundle:Local',
24 24 'property' => 'nmLocal',
  25 + 'required' =>true,
25 26 'label' => 'Local'
26 27 )
27 28 );
... ...
src/Cacic/CommonBundle/Form/Type/ServidorAutenticacaoType.php
... ... @@ -55,8 +55,7 @@ class ServidorAutenticacaoType extends AbstractType
55 55 'label'=>'Servidor Ativo:',
56 56 'required' => true,
57 57 'multiple'=> false,
58   - 'expanded' => true,
59   - 'data'=> 'S'
  58 + 'expanded' => true
60 59 )
61 60 );
62 61  
... ...
src/Cacic/CommonBundle/Resources/config/doctrine/Ateste.orm.yml 0 → 100755
... ... @@ -0,0 +1,43 @@
  1 +Cacic\CommonBundle\Entity\Ateste:
  2 + type: entity
  3 + table: ateste
  4 + repositoryClass: Cacic\CommonBundle\Entity\AtesteRepository
  5 + fields:
  6 + idAteste:
  7 + id: true
  8 + type: integer
  9 + unsigned: false
  10 + nullable: false
  11 + column: id_ateste
  12 + generator:
  13 + strategy: IDENTITY
  14 + descricao:
  15 + type: text
  16 + nullable: true
  17 + column: descricao_ateste
  18 + detalhes:
  19 + type: text
  20 + nullable: true
  21 + column: detalhes
  22 + atestado:
  23 + type: boolean
  24 + nullable: false
  25 + column: atestado
  26 + data:
  27 + type: datetime
  28 + nullable: false
  29 + column: data
  30 + qualidadeServico:
  31 + type: text
  32 + nullable: true
  33 + column: qualidade_servico
  34 + manyToOne:
  35 + usuario:
  36 + targetEntity: Usuario
  37 + cascade: { }
  38 + mappedBy: null
  39 + inversedBy: null
  40 + joinColumns:
  41 + id_usuario:
  42 + referencedColumnName: id_usuario
  43 + orphanRemoval: false
0 44 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Resources/config/doctrine/AtesteRedes.orm.yml 0 → 100755
... ... @@ -0,0 +1,33 @@
  1 +Cacic\CommonBundle\Entity\AtesteRedes:
  2 + type: entity
  3 + table: ateste_redes
  4 + repositoryClass: Cacic\CommonBundle\Entity\AtesteRedesRepository
  5 + id:
  6 + rede:
  7 + associationKey: true
  8 + ateste:
  9 + associationKey: true
  10 + fields:
  11 + estacoes:
  12 + type: integer
  13 + nullable: false
  14 + column: estacoes
  15 + manyToOne:
  16 + rede:
  17 + targetEntity: Rede
  18 + cascade: { }
  19 + mappedBy: null
  20 + inversedBy: null
  21 + joinColumns:
  22 + id_rede:
  23 + referencedColumnName: id_rede
  24 + orphanRemoval: false
  25 + ateste:
  26 + targetEntity: Ateste
  27 + cascade: { }
  28 + mappedBy: null
  29 + inversedBy: null
  30 + joinColumns:
  31 + id_ateste:
  32 + referencedColumnName: id_ateste
  33 + orphanRemoval: false
0 34 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Resources/config/doctrine/LogAcesso.orm.yml 0 → 100755
... ... @@ -0,0 +1,27 @@
  1 +Cacic\CommonBundle\Entity\LogAcesso:
  2 + type: entity
  3 + table: log_acesso
  4 + repositoryClass: Cacic\CommonBundle\Entity\LogAcessoRepository
  5 + fields:
  6 + idLogAcesso:
  7 + id: true
  8 + type: integer
  9 + unsigned: false
  10 + nullable: false
  11 + column: id_log_acesso
  12 + generator:
  13 + strategy: IDENTITY
  14 + data:
  15 + type: datetime
  16 + nullable: false
  17 + column: data
  18 + manyToOne:
  19 + idComputador:
  20 + targetEntity: Computador
  21 + cascade: { }
  22 + mappedBy: null
  23 + inversedBy: null
  24 + joinColumns:
  25 + id_computador:
  26 + referencedColumnName: id_computador
  27 + orphanRemoval: false
0 28 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Resources/config/routing.yml
... ... @@ -227,8 +227,10 @@ cacic_software_excluir:
227 227 defaults: { _controller: CacicCommonBundle:Software:excluir}
228 228  
229 229 cacic_software_naoclassificados:
230   - pattern: /software/naoclassificados
231   - defaults: { _controller: CacicCommonBundle:Software:naoClassificados}
  230 + pattern: /software/naoclassificados/{page}
  231 + defaults: { _controller: CacicCommonBundle:Software:naoClassificados, page:1}
  232 + requirements:
  233 + page: \d+
232 234  
233 235 cacic_software_naousados:
234 236 pattern: /software/naousados
... ... @@ -507,4 +509,8 @@ cacic_grupo_usuario_editar:
507 509  
508 510 cacic_grupo_usuario_excluir:
509 511 pattern: /grupousuario/excluir
510   - defaults: { _controller: CacicCommonBundle:GrupoUsuario:excluir}
511 512 \ No newline at end of file
  513 + defaults: { _controller: CacicCommonBundle:GrupoUsuario:excluir}
  514 +
  515 +cacic_ateste:
  516 + pattern: /ateste/
  517 + defaults: { _controller: CacicCommonBundle:Ateste:index }
512 518 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Resources/config/services.yml
... ... @@ -6,4 +6,9 @@ services:
6 6 cacic.twig.siglas_extension:
7 7 class: Cacic\CommonBundle\Twig\SiglasExtension
8 8 tags:
9   - - { name: twig.extension }
10 9 \ No newline at end of file
  10 + - { name: twig.extension }
  11 + cacic.twig.bundles_extension:
  12 + class: Cacic\CommonBundle\Twig\BundlesExtension
  13 + arguments: [@service_container]
  14 + tags:
  15 + - { name: twig.extension }
... ...
src/Cacic/CommonBundle/Resources/config/validation.yml
... ... @@ -207,7 +207,7 @@ Cacic\CommonBundle\Entity\Aquisicao:
207 207 nrProcesso:
208 208 - NotBlank: ~
209 209 - Length:
210   - max: 11
  210 + max: 40
211 211 nmEmpresa:
212 212 - NotBlank: ~
213 213 - Length:
... ...
src/Cacic/CommonBundle/Resources/views/Aplicativo/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_aplicativo_index') }}">{{ "Aplicativo"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/Aplicativo/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4  
... ...
src/Cacic/CommonBundle/Resources/views/Aquisicao/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_aquisicao_index') }}">{{ "Aquisição"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/Aquisicao/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4  
... ...
src/Cacic/CommonBundle/Resources/views/AquisicaoItem/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_aquisicao_item_index') }}">{{ "Aquisição de Item"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/AquisicaoItem/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4  
... ...
src/Cacic/CommonBundle/Resources/views/Ateste/acessoResultado.html.twig 0 → 100755
... ... @@ -0,0 +1,102 @@
  1 +<div class="row-fluid">
  2 + <div class="span12">
  3 + <div class="box grad_colour_black">
  4 + <h2 class="box_head round_top"><i class="icon-list"></i> {{'Resultado da pesquisa' |trans }}</h2>
  5 + <div class="block box_content round_bottom padding_10">
  6 +
  7 + <form id="ateste" class="form-horizontal" action="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" method="post" >
  8 +
  9 + <table class="table table-striped table-bordered">
  10 + <thead>
  11 + <tr>
  12 + <th width="10%" style="text-align: center"></th>
  13 + <th width="20%">{{ "Local"|trans }}</th>
  14 + <th width="30%" style="text-align: center">{{ "Rede"|trans }}</th>
  15 + <th width="20%" style="text-align: center">{{ "Endereço IP"|trans }}</th>
  16 + <th width="20%" style="text-align: center">{{ "Estações"|trans }}</th>
  17 + <th style="text-align: center">
  18 + <label style="margin: auto; width:12px; height:10px;">
  19 + <input type="checkbox" class="toggleCheck" name="toggleCheck[]" value="redes" checked>
  20 + </label>
  21 + </th>
  22 + </tr>
  23 + </thead>
  24 +
  25 + <tbody>
  26 +
  27 + {% for log in logs %}
  28 +
  29 + <tr>
  30 + <td style="text-align: center">{{ loop.index }}</td>
  31 + <td>{{ log['nmLocal'] }}</td>
  32 + <td>{{ log['nmRede'] }}</td>
  33 + <td>{{ log['teIpRede'] }}</td>
  34 + <td>{{ log['numComp'] }}</td>
  35 + <td>
  36 + <label style="margin: auto; width:12px; height:10px;">
  37 + <input type="checkbox" id="item_id_{{ log['idRede'] }}" name="redes[]" value="{{ log['idRede'] }}" checked>
  38 + <input type="hidden" name="rede_{{ log['idRede'] }}" value="{{ log['numComp'] }}">
  39 + </label>
  40 + </td>
  41 + </tr>
  42 +
  43 + {% else %}
  44 + <tr>
  45 + <td style="text-align: center;" colspan="4"><b>{{ "NENHUM REGISTRO ENCONTRADO!"|trans }}</b></td>
  46 + </tr>
  47 + {% endfor %}
  48 +
  49 + </tbody>
  50 + </table>
  51 +
  52 + <div class="control-group">
  53 + <label for="descricao" class="control-label">{{ 'Descrição'|trans }}</label>
  54 + <div class="controls">
  55 + {{ form_widget(ateste.descricao) }}
  56 + <p class="help-block">{{ "Descrição da ação do Ateste."|trans }}</p>
  57 + </div>
  58 + </div>
  59 +
  60 + <div class="control-group">
  61 + <label for="atestado" class="control-label">{{ 'Ateste'|trans }}</label>
  62 + <div class="controls">
  63 + {{ form_widget(ateste.atestado, { 'attr': {'onclick': 'javascript:mostraDetalhes(this)'} }) }}
  64 + <p class="help-block">{{ "Atesto que as informações fornecidas são verídicas."|trans }}</p>
  65 + </div>
  66 + </div>
  67 +
  68 + <div class="control-group" id="_detalhes">
  69 + <label for="detalhes" class="control-label">{{ 'Detalhes'|trans }}</label>
  70 + <div class="controls">
  71 + {{ form_widget(ateste.detalhes) }}
  72 + <p class="help-block">{{ "Descreva os motivos para sua discordância."|trans }}</p>
  73 + </div>
  74 + </div>
  75 +
  76 + <div class="control-group">
  77 + <label for="qualidade_servico" class="control-label">{{ 'Qualidade do Serviço'|trans }}</label>
  78 + <div class="controls">
  79 + {{ form_widget(ateste.qualidade_servico) }}
  80 + <p class="help-block">{{ "Coloque aqui seus comentários sobre a qualidade do serviço."|trans }}</p>
  81 + </div>
  82 + </div>
  83 +
  84 + <div class="control-group">
  85 + <div class="controls">
  86 + <button type="reset" class="btn">
  87 + <i class="icon-refresh"></i>
  88 + {{ "Resetar Valores"|trans }}
  89 + </button>
  90 + <button type="submit" class="btn btn-primary">
  91 + <i class="icon-ok-sign"></i>
  92 + {{ 'Atestar'|trans }}
  93 + </button>
  94 + </div>
  95 + </div>
  96 +
  97 + </form>
  98 +
  99 + </div> <!-- /block -->
  100 + </div> <!-- /box -->
  101 + </div> <!-- /span -->
  102 +</div> <!-- /row -->
0 103 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Resources/views/Ateste/index.html.twig 0 → 100755
... ... @@ -0,0 +1,115 @@
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
  2 +
  3 +{% block breadcrumb %}
  4 + <li class="active">{{ 'Ateste'|trans }}</li>
  5 +{% endblock %}
  6 +
  7 +{% block body %}
  8 +
  9 + <div class="row-fluid">
  10 +
  11 + <div class="span8">
  12 + <div class="box grad_colour_black">
  13 +
  14 + <h2 class="box_head round_top"><i class="icon-search"></i> {{'Pesquisa por Logs de Acesso' |trans }}</h2>
  15 +
  16 + <div class="block box_content round_bottom padding_10">
  17 +
  18 + <h4>{{ "Filtros para consulta"|trans }}</h4><br />
  19 +
  20 + <form id={{ 'formLogPesquisaAcesso'|trans }} class="form-horizontal" action="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" method="post" >
  21 +
  22 + <div class="control-group">
  23 + <label for="log_acesso_periodo" class="control-label">{{ 'Período'|trans }}</label>
  24 + <div class="controls">
  25 + {{ form_widget(form.dtAcaoInicio, { 'attr': {'class': 'datepicker_on'} }) }} a {{ form_widget(form.dtAcaoFim, { 'attr': {'class': 'datepicker_on'} }) }}
  26 + <p class="help-block">{{ "Informe o período no qual deseja realizar a pesquisa."|trans }}</p>
  27 + </div>
  28 + </div>
  29 +
  30 + <div class="control-group _cad_block_opcao">
  31 + <label for="log_acesso_local" class="control-label">{{ 'Local:'|trans }}</label>
  32 + <div class="controls">
  33 + <div>
  34 + {{ form_widget(form.idLocal, {'form_type': 'horizontal'}) }}
  35 + </div>
  36 + </div>
  37 + </div>
  38 +
  39 + <div class="control-group">
  40 + <div class="controls">
  41 + <button type="reset" class="btn">
  42 + <i class="icon-refresh"></i>
  43 + {{ "Resetar Valores"|trans }}
  44 + </button>
  45 + <button type="submit" class="btn btn-primary">
  46 + <i class="icon-search"></i>
  47 + {{ 'Filtrar'|trans }}
  48 + </button>
  49 + </div>
  50 + </div>
  51 +
  52 + </form>
  53 + </div> <!-- /block -->
  54 + </div> <!-- /box -->
  55 + </div> <!-- /span8 -->
  56 +
  57 + <div class="span4">
  58 + <div class="box grad_colour_black">
  59 +
  60 + <h2 class="box_head round_top"><i class="icon-info-sign"></i> {{ "Informações Adicionais"|trans }}</h2>
  61 +
  62 + <div class="block box_content round_bottom padding_10">
  63 + <p>
  64 + {{ "Ateste"|trans }}.
  65 + </p>
  66 + <p>
  67 + {{ "O período é obrigatório"|trans }}.
  68 + </p>
  69 + <p>
  70 + {{ "Não selecionar nenhum valor em determinado critério é o mesmo que selecionar todos"|trans }}.
  71 + </p>
  72 + </div> <!-- /block -->
  73 + </div> <!-- /box -->
  74 + </div> <!-- span4 -->
  75 +
  76 + </div> <!-- /row -->
  77 +
  78 + {% if logs is not null %}
  79 + {% include 'CacicCommonBundle:Ateste:acessoResultado.html.twig' %}
  80 + {% endif %}
  81 +
  82 +{% endblock %}
  83 +
  84 +{% block javascripts %}
  85 +
  86 + <script type="text/javascript">
  87 + function mostraDetalhes(elm) {
  88 + var detalhes = document.getElementById('_detalhes');
  89 + if (elm.checked == false) {
  90 + detalhes.style = '';
  91 + } else {
  92 + detalhes.style = 'display: none;';
  93 + }
  94 + }
  95 + </script>
  96 +
  97 + {{ parent() }}
  98 + {% if locale == 'pt_BR' %}
  99 + <script src="{{ asset('bundles/caciccommon/js/jquery.ui.datepicker-pt-BR.js') }}"></script>
  100 +
  101 + <script type="text/javascript">
  102 +
  103 + $(".datepicker_on").datepicker({ altFormat: "dd/mm/yy" }).mask('99/99/9999');
  104 +
  105 + </script>
  106 + {% else %}
  107 + <script src="{{ asset('bundles/caciccommon/js/jquery.ui.datepicker-en-US.js') }}"></script>
  108 +
  109 + <script type="text/javascript">
  110 +
  111 + $(".datepicker_on").datepicker({ altFormat: "mm/dd/yy" }).mask('99/99/9999');
  112 +
  113 + </script>
  114 + {% endif %}
  115 +{% endblock %}
0 116 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Resources/views/Cacic26/migracao.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ "Migração Cacic 2.6"|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Computador/buscar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Computadores das Subredes'|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Computador/consultar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Computadores das Subredes'|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Computador/detalhar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_computador_navegar') }}">{{ "Computadores"|trans }}</a></li> /
... ... @@ -36,8 +36,10 @@
36 36 <td colspan="3">{{ computador.idSo }}</td>
37 37 </tr>
38 38 <tr>
39   - <th width="20%">{{ 'Endereço TCP/IP'|trans }}</th>
40   - <td colspan="3">{{ computador.teIpComputador }}</td>
  39 + <th width="10%">{{ 'Endereço TCP/IP'|trans }}</th>
  40 + <td width="20%">{{ computador.teIpComputador }}</td>
  41 + <th width="20%">{{ 'Nome/IP da subrede'|trans }}</th>
  42 + <td width="30%">{{ computador.idRede.nmRede }} - {{ computador.idRede.teIpRede }}</td>
41 43 </tr>
42 44 <tr>
43 45 <th width="20%">{{ 'Versão do Agente Principal'|trans }}</th>
... ...
src/Cacic/CommonBundle/Resources/views/Computador/importarcsv.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_sistemaoperacional_index') }}">{{ "Computadores"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/Computador/navegar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li>{{ "Computadores"|trans }} <span class="divider">/</span></li>
... ...
src/Cacic/CommonBundle/Resources/views/Configuracao/agente.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Configuração Local'|trans }} (<i>{{ local.getSgLocal() }}</i>) </li>
... ...
src/Cacic/CommonBundle/Resources/views/Configuracao/gerente.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Configuração Gerente'|trans }} (<i>{{ local.getSgLocal() }}</i>) </li>
... ...
src/Cacic/CommonBundle/Resources/views/Configuracao/padrao.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Configuração Padrão'|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Default/downloads.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block body %}
4 4  
... ...
src/Cacic/CommonBundle/Resources/views/Default/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block body %}
4 4  
... ... @@ -11,7 +11,7 @@
11 11 <div class="block box_content round_bottom padding_10">
12 12 <ul class="statistics">
13 13 <li><a href="{{ path('cacic_computador_navegar') }}"><i class="icon-laptop icon-large"></i><span class="blue">{{ estatisticas['totalCompMonitorados'] }}</span>{{ 'Totais de computadores monitorados'|trans }}</a></li>
14   - <li><a href="{{ path('cacic_log_acesso') }}"><i class="icon-exchange icon-large"></i><span class="blue">0</span> {{ 'Últimos acessos dos agentes'|trans }}</a></li>
  14 + <li><a href="{{ path('cacic_relatorio_faturamento') }}"><i class="icon-exchange icon-large"></i><span class="blue">{{ estatisticas['totalComp'][0][1] }}</span> {{ 'Acessos dos agentes nos últimos 30 dias'|trans }}</a></li>
15 15 <li><a href="{{ path('cacic_log_insucesso_instalacao') }}"><i class="icon-warning-sign icon-large"></i><span class="red">{{ estatisticas['totalInsucessosInstalacao'] }}</span> {{ 'Totais de tentativas de instalação malsucedidas'|trans }}</a></li>
16 16 </ul>
17 17 </div>
... ... @@ -90,4 +90,4 @@
90 90  
91 91 </div> <!-- /row -->
92 92  
93   -{% endblock %}
94 93 \ No newline at end of file
  94 +{% endblock %}
... ...
src/Cacic/CommonBundle/Resources/views/GrupoUsuario/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_grupo_usuario_index') }}">{{ "Grupo de Usuários"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/GrupoUsuario/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ "Grupos de Usuários"|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Local/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_local_index') }}">{{ "Locais"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/Local/importarcsv.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_local_index') }}">{{ "Locais"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/Local/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ "Locais"|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Log/acesso.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Log de Acesso'|trans }}</li>
... ... @@ -104,4 +104,4 @@
104 104  
105 105 </script>
106 106 {% endif %}
107   -{% endblock %}
108 107 \ No newline at end of file
  108 +{% endblock %}
... ...
src/Cacic/CommonBundle/Resources/views/Log/atividade.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Log de Atividades'|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Log/insucesso.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Logs de Insucessos de Instalação'|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Log/suporte.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Log de Suporte Remoto'|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Modulo/editar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_modulo_index') }}">{{ "Módulos"|trans }}</a> / </li>
... ...
src/Cacic/CommonBundle/Resources/views/Modulo/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ "Módulos"|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1.html.twig
... ... @@ -18,7 +18,7 @@
18 18 <td style="text-align: left"><h6>{{ ' Exemplo "Selecione a Gerência de localização este equipamento" '|trans }}</h6></td>
19 19 </tr>
20 20 <tr>
21   - <td style="text-align: center"><h5>{{ 'Elemento origatório?'|trans }}</h5></td>
  21 + <td style="text-align: center"><h5>{{ 'Elemento obrigatório?'|trans }}</h5></td>
22 22 <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td>
23 23 <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td>
24 24 </tr>
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1a.html.twig
... ... @@ -18,7 +18,7 @@
18 18 <td style="text-align: left"><h6>{{ ' Exemplo "Selecione a Linha de negócio de localização deste equipamento" '|trans }}</h6></td>
19 19 </tr>
20 20 <tr>
21   - <td style="text-align: center"><h5>{{ 'Elemento origatório?'|trans }}</h5></td>
  21 + <td style="text-align: center"><h5>{{ 'Elemento obrigatório?'|trans }}</h5></td>
22 22 <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td>
23 23 <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td>
24 24 </tr>
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta2.html.twig
... ... @@ -17,7 +17,7 @@
17 17 <td style="text-align: left"><h6>{{ ' Exemplo "Selecione a divisão onde encontra-se este equipamento" '|trans }}</h6></td>
18 18 </tr>
19 19 <tr>
20   - <td style="text-align: center"><h5>{{ 'Elemento origatório?'|trans }}</h5></td>
  20 + <td style="text-align: center"><h5>{{ 'Elemento obrigatório?'|trans }}</h5></td>
21 21 <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td>
22 22 <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td>
23 23 </tr>
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta3.html.twig
... ... @@ -12,7 +12,7 @@
12 12 <td style="text-align: left"><h6>{{ ' Exemplo "Informe o setor onde esta localizado o equipamento." '|trans }}</h6></td>
13 13 </tr>
14 14 <tr>
15   - <td style="text-align: center"><h5>{{ 'Elemento origatório?'|trans }}</h5></td>
  15 + <td style="text-align: center"><h5>{{ 'Elemento obrigatório?'|trans }}</h5></td>
16 16 <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td>
17 17 <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td>
18 18 </tr>
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta4.html.twig
... ... @@ -18,7 +18,7 @@
18 18 <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td>
19 19 </tr>
20 20 <tr>
21   - <td style="text-align: center"><h5>{{ 'Elemento origatório?'|trans }}</h5></td>
  21 + <td style="text-align: center"><h5>{{ 'Elemento obrigatório?'|trans }}</h5></td>
22 22 <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td>
23 23 <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td>
24 24 </tr>
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta5.html.twig
... ... @@ -18,7 +18,7 @@
18 18 <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td>
19 19 </tr>
20 20 <tr>
21   - <td style="text-align: center"><h5>{{ 'Elemento origatório?'|trans }}</h5></td>
  21 + <td style="text-align: center"><h5>{{ 'Elemento obrigatório?'|trans }}</h5></td>
22 22 <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td>
23 23 <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td>
24 24 </tr>
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta6.html.twig
... ... @@ -18,7 +18,7 @@
18 18 <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td>
19 19 </tr>
20 20 <tr>
21   - <td style="text-align: center"><h5>{{ 'Elemento origatório?'|trans }}</h5></td>
  21 + <td style="text-align: center"><h5>{{ 'Elemento obrigatório?'|trans }}</h5></td>
22 22 <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td>
23 23 <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td>
24 24 </tr>
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta7.html.twig
... ... @@ -18,7 +18,7 @@
18 18 <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td>
19 19 </tr>
20 20 <tr>
21   - <td style="text-align: center"><h5>{{ 'Elemento origatório?'|trans }}</h5></td>
  21 + <td style="text-align: center"><h5>{{ 'Elemento obrigatório?'|trans }}</h5></td>
22 22 <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td>
23 23 <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td>
24 24 </tr>
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta8.html.twig
... ... @@ -18,7 +18,7 @@
18 18 <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td>
19 19 </tr>
20 20 <tr>
21   - <td style="text-align: center"><h5>{{ 'Elemento origatório?'|trans }}</h5></td>
  21 + <td style="text-align: center"><h5>{{ 'Elemento obrigatório?'|trans }}</h5></td>
22 22 <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td>
23 23 <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td>
24 24 </tr>
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta9.html.twig
... ... @@ -19,7 +19,7 @@
19 19 <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td>
20 20 </tr>
21 21 <tr>
22   - <td style="text-align: center"><h5>{{ 'Elemento origatório?'|trans }}</h5></td>
  22 + <td style="text-align: center"><h5>{{ 'Elemento obrigatório?'|trans }}</h5></td>
23 23 <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td>
24 24 <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td>
25 25 </tr>
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block body %}
4 4  
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/interface.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block body %}
4 4  
... ...
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/opcoes.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ "Opções"|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Rede/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_subrede_index') }}">{{ "SubRedes"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/Rede/importarcsv.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_subrede_index') }}">{{ "Subredes"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/Rede/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ "Subredes"|trans }}</li>
... ... @@ -86,22 +86,95 @@
86 86 </div><!-- /span -->
87 87 </div><!-- /row -->
88 88 <!-- Modal para Vincular UORG's -->
89   - <div id="vincularUORGs" title="{{ "Vincular UORG's"|trans }}">
90   - <form id="frmVincularUORGs">
91   - <fieldset>
92   - <div style="margin-top: 200px; margin-left: 100px"><h1> Em manunteção!!!</h1></div>
93   - </fieldset>
94   - </form>
95   - </div>
  89 + <div id="vincularUORGs" title="{{ "Vincular UORG's"|trans }}"> </div>
96 90  
97 91 {% endblock %}
  92 +
  93 +
  94 +{% block stylesheets %}
  95 +
  96 + {{ parent() }}
  97 +
  98 + <link href="{{ asset('bundles/caciccommon/jqTree-0.15/jqtree.css') }}" type="text/css" rel="stylesheet" media="screen" />
  99 +
  100 + <style type="text/css">
  101 + #tree_uorg0 {
  102 + color: #000;
  103 + font-size: 14pt;
  104 + font-weight: bold;
  105 + margin-left: 25px;
  106 + }
  107 + #tree_uorg0 li.jqtree_common {
  108 + line-height: 20pt;
  109 + margin-left: 25px;
  110 + }
  111 + </style>
  112 +
  113 +{% endblock %}
  114 +
  115 +
98 116 {% block javascripts %}
99 117  
100 118 {{ parent() }}
101 119  
102   - <script type="text/javascript">
103 120  
  121 + <script type="text/javascript" src="{{ asset('bundles/caciccommon/jqTree-0.15/tree.jquery.js') }}"></script>
  122 +
  123 + <script type="text/javascript">
  124 +
  125 + var _dados = [ // Unidades de primeiro nível
  126 + {% for uorg in uorgs %}
  127 + {
  128 + label: '{{ uorg.nmUorg }}',
  129 + id: {{ uorg.idUorg }},
  130 + filha:{{ uorg.numFilhas }},
  131 + load_on_demand: {% if uorg.numFilhas %}true {% else %}false{% endif %}
  132 +
  133 + }{% if loop.last != true %},{% endif %}
  134 +
  135 + {% endfor %}
  136 + ];
104 137  
  138 + $(function() {
  139 +
  140 +
  141 + $('#vincularUORGs').tree({
  142 + data: _dados,
  143 + dataUrl: function( node ) {
  144 + return '{{ path('cacic_uorg_loadnodes') }}/'+ node.id +'';
  145 + },
  146 + onCreateLi: function(node, $li) {
  147 +
  148 + if(node.filha <= 0){
  149 +
  150 + var _acoesNode = ' <a onclick="('+ node.id +');"> <input type="checkbox" name="uorg" value="'+node.id+'" /></a> '
  151 + }
  152 +
  153 + if(node.filho <= 0){
  154 +
  155 + var _acoesNode = ' <a onclick="('+ node.id +');"> <input type="checkbox" name="uorg" value="'+node.id+'" /></a> '
  156 +
  157 + }
  158 +
  159 + $li.find('span.jqtree-title').after( _acoesNode );
  160 +
  161 + // Substitui a "seta" indicadora de existência de filhos
  162 + //$li.find('a.jqtree-toggler').html('<i class="icon-folder-close-alt"></i>');
  163 + },
  164 + autoEscape: false
  165 + });
  166 + });
  167 + $(function(){
  168 + $('#vincularUORGs').click(function(){
  169 + var val = [];
  170 + $(':checkbox:checked').each(function(i){
  171 + val[i] = $(this).val();
  172 +
  173 + });
  174 + $( this).data( 'val', val).dialog( "open" );
  175 + });
  176 + });
  177 + var senha = $( '#uorg' ).val();
105 178 $( "#vincularUORGs" ).dialog({
106 179 autoOpen: false,
107 180 height: 550,
... ... @@ -109,7 +182,31 @@
109 182 modal: true,
110 183 buttons: {
111 184 "Salvar" : function(){
112   - $( this ).dialog( "close" );
  185 + var params = {
  186 + 'id' : $( this ).data( 'id' ),
  187 + 'uorg' :$( this ).data( 'val' )
  188 +
  189 + };
  190 + $( this ).dialog( "close" );
  191 + $.ajax(
  192 + {
  193 + type: "POST",
  194 + url: "{{ path('cacic_subrede_vincular') }}",
  195 + cache: false,
  196 + async: false,
  197 + success: function( data )
  198 + {
  199 + System.Flash.show( 'Sucesso', 'Vinculação realizada com sucesso!' );
  200 + },
  201 + error: function( data )
  202 + {
  203 + System.Flash.show( 'Erro', 'Erro na solicitação' );
  204 + },
  205 + data: params
  206 + }
  207 + );
  208 +
  209 + $( this ).dialog( "close" );
113 210 },
114 211 "Cancelar" : function(){
115 212 $( this ).dialog( "close" );
... ... @@ -125,6 +222,5 @@
125 222 var id = $( this ).parent().parent().attr( 'id' ).replace( /.*?(\d+)$/, '$1' );
126 223 $( "#vincularUORGs" ).data( 'id', id ).dialog( "open" );
127 224 });
128   -
129 225 </script>
130   -{% endblock %}
131 226 \ No newline at end of file
  227 +{% endblock %}
... ...
src/Cacic/CommonBundle/Resources/views/Rede/manutencao.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Atualizacoes de subredes'|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_servidorautenticacao_index') }}">{{ 'Servidor de Autenticação'|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ "Servidores de Autenticação"|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/So/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_sistemaoperacional_index') }}">{{ "Sistemas Operacionais"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/So/importarcsv.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_sistemaoperacional_index') }}">{{ "Sistemas Operacionais"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/So/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ "Sistemas Operacionais"|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Software/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_software_index') }}">{{ 'Softwares'|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/Software/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Software'|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/Software/naoclassificados.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Softwares Não Classificados'|trans }}</li>
... ... @@ -49,9 +49,12 @@
49 49  
50 50 </tbody>
51 51 </table>
52   -
  52 + {# display navigation #}
  53 + <div class="navigation">
  54 + {{ knp_pagination_render(softwares) }}
  55 + </div>
53 56 <div class="control-group">
54   - <div class="controls">
  57 + <div class="controls" align="right">
55 58 <button type="reset" class="btn">
56 59 <i class="icon-refresh"></i>
57 60 {{ "Resetar Valores"|trans }}
... ...
src/Cacic/CommonBundle/Resources/views/Software/naousados.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ 'Softwares Não Usados'|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/SoftwareEstacao/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_software_estacao_index') }}">{{ "Software por estação"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/SoftwareEstacao/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ "Software por Estação"|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/TipoLicenca/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_tipo_licenca_index') }}">{{ "Tipos de Licenças"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/TipoLicenca/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ "Tipos de Licenças"|trans }}</li>
... ...
src/Cacic/CommonBundle/Resources/views/TipoSoftware/cadastrar.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li><a href="{{ path('cacic_tiposoftware_index') }}">{{ "Tipos de Softwares"|trans }}</a></li> /
... ...
src/Cacic/CommonBundle/Resources/views/TipoSoftware/index.html.twig
1   -{% extends '::base.html.twig' %}
  1 +{% extends 'CacicCommonBundle::base.html.twig' %}
2 2  
3 3 {% block breadcrumb %}
4 4 <li class="active">{{ "Tipos de Softwares"|trans }}</li>
... ...