Commit 6b8c7722d4345be2cc4dcea9c2c7cce6f09fb241
Committed by
Eduardo Santos
1 parent
d499eac1
Exists in
master
and in
1 other branch
Sincronia com a última versão da produção
Showing
141 changed files
with
2716 additions
and
459 deletions
Show diff stats
@@ -0,0 +1,34 @@ | @@ -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,6 +29,8 @@ class AppKernel extends Kernel | ||
29 | new Ijanki\Bundle\FtpBundle\IjankiFtpBundle(), | 29 | new Ijanki\Bundle\FtpBundle\IjankiFtpBundle(), |
30 | new FM\ElfinderBundle\FMElfinderBundle(), | 30 | new FM\ElfinderBundle\FMElfinderBundle(), |
31 | new Knp\Bundle\MenuBundle\KnpMenuBundle(), | 31 | new Knp\Bundle\MenuBundle\KnpMenuBundle(), |
32 | + new Swpb\Bundle\CocarBundle\CocarBundle(), | ||
33 | + new Ddeboer\DataImportBundle\DdeboerDataImportBundle() | ||
32 | ); | 34 | ); |
33 | 35 | ||
34 | if (in_array($this->getEnvironment(), array('dev', 'test'))) { | 36 | if (in_array($this->getEnvironment(), array('dev', 'test'))) { |
app/Resources/views/base.html.twig
@@ -2,9 +2,9 @@ | @@ -2,9 +2,9 @@ | ||
2 | <html lang="en"> | 2 | <html lang="en"> |
3 | <head> | 3 | <head> |
4 | <meta charset="utf-8"> | 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 | <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> | 9 | <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> |
10 | <!--[if lt IE 9]> | 10 | <!--[if lt IE 9]> |
@@ -48,13 +48,14 @@ | @@ -48,13 +48,14 @@ | ||
48 | <span class="i-bar"></span> | 48 | <span class="i-bar"></span> |
49 | <span class="i-bar"></span> | 49 | <span class="i-bar"></span> |
50 | </a> | 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 | <a href="#" | 59 | <a href="#" |
59 | class="dropdown-toggle" | 60 | class="dropdown-toggle" |
60 | data-toggle="dropdown"> | 61 | data-toggle="dropdown"> |
@@ -67,37 +68,39 @@ | @@ -67,37 +68,39 @@ | ||
67 | <li><a href="#">{{ "Alertas antigos..."|trans }}</a></li> | 68 | <li><a href="#">{{ "Alertas antigos..."|trans }}</a></li> |
68 | </ul> | 69 | </ul> |
69 | </li> --> | 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 | </div> | 104 | </div> |
102 | </div> | 105 | </div> |
103 | </div> | 106 | </div> |
@@ -105,191 +108,38 @@ | @@ -105,191 +108,38 @@ | ||
105 | <div class="container-fluid"> | 108 | <div class="container-fluid"> |
106 | <div class="row-fluid"> | 109 | <div class="row-fluid"> |
107 | <!-- side nav --> | 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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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 | <!-- main container --> | 123 | <!-- main container --> |
280 | <div id="main_container" class="span10"> | 124 | <div id="main_container" class="span10"> |
281 | 125 | ||
282 | <!-- Shortcut buttons --> | 126 | <!-- Shortcut buttons --> |
283 | <div class="row-fluid"> | 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 | </div> | 137 | </div> |
288 | 138 | ||
289 | <!-- Breadcrumb --> | 139 | <!-- Breadcrumb --> |
290 | <div class="row-fluid"> | 140 | <div class="row-fluid"> |
291 | <div class="span12"> | 141 | <div class="span12"> |
292 | - <ul class="breadcrumb"> | 142 | + <ul class="breadcrumb"> |
293 | <li><a href="{{ path('cacic_common_homepage') }}">CACIC</a> <span class="divider">/</span></li> | 143 | <li><a href="{{ path('cacic_common_homepage') }}">CACIC</a> <span class="divider">/</span></li> |
294 | {% block breadcrumb %} | 144 | {% block breadcrumb %} |
295 | <li class="active">Home</li> | 145 | <li class="active">Home</li> |
app/bootstrap.php.cache
@@ -2170,11 +2170,11 @@ protected $booted; | @@ -2170,11 +2170,11 @@ protected $booted; | ||
2170 | protected $name; | 2170 | protected $name; |
2171 | protected $startTime; | 2171 | protected $startTime; |
2172 | protected $loadClassCache; | 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 | const MAJOR_VERSION ='2'; | 2175 | const MAJOR_VERSION ='2'; |
2176 | const MINOR_VERSION ='3'; | 2176 | const MINOR_VERSION ='3'; |
2177 | -const RELEASE_VERSION ='9'; | 2177 | +const RELEASE_VERSION ='11'; |
2178 | const EXTRA_VERSION =''; | 2178 | const EXTRA_VERSION =''; |
2179 | public function __construct($environment, $debug) | 2179 | public function __construct($environment, $debug) |
2180 | { | 2180 | { |
app/config/config.yml
@@ -36,7 +36,7 @@ bc_bootstrap: | @@ -36,7 +36,7 @@ bc_bootstrap: | ||
36 | assetic: | 36 | assetic: |
37 | debug: "%kernel.debug%" | 37 | debug: "%kernel.debug%" |
38 | use_controller: false | 38 | use_controller: false |
39 | - bundles: [ CacicCommonBundle, CacicRelatorioBundle, FMElfinderBundle ] | 39 | + bundles: [ CacicCommonBundle, CacicRelatorioBundle, FMElfinderBundle, CocarBundle ] |
40 | java: /usr/bin/java | 40 | java: /usr/bin/java |
41 | filters: | 41 | filters: |
42 | #closure: | 42 | #closure: |
@@ -144,4 +144,4 @@ services: | @@ -144,4 +144,4 @@ services: | ||
144 | cacic_demo.command.demo_command: | 144 | cacic_demo.command.demo_command: |
145 | class: Cacic\CommonBundle\Command\DemoCommand | 145 | class: Cacic\CommonBundle\Command\DemoCommand |
146 | tags: | 146 | tags: |
147 | - - { name: console.command } | ||
148 | \ No newline at end of file | 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 | cacic_ws: | 4 | cacic_ws: |
2 | resource: "@CacicWSBundle/Resources/config/routing.yml" | 5 | resource: "@CacicWSBundle/Resources/config/routing.yml" |
3 | prefix: /ws/ | 6 | prefix: /ws/ |
@@ -13,6 +16,10 @@ cacic_common: | @@ -13,6 +16,10 @@ cacic_common: | ||
13 | elfinder: | 16 | elfinder: |
14 | resource: "@FMElfinderBundle/Resources/config/routing.yml" | 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 | # Internal routing configuration to handle ESI | 23 | # Internal routing configuration to handle ESI |
17 | # ****** WARNING ****** | 24 | # ****** WARNING ****** |
18 | # This route should be enabled with caution as it can open a security vulnerability | 25 | # This route should be enabled with caution as it can open a security vulnerability |
composer.json
@@ -14,7 +14,9 @@ | @@ -14,7 +14,9 @@ | ||
14 | "url": "http://code.jquery.com/jquery-1.9.1.js", | 14 | "url": "http://code.jquery.com/jquery-1.9.1.js", |
15 | "type": "file" | 15 | "type": "file" |
16 | } | 16 | } |
17 | - } | 17 | + }, |
18 | + "type": "vcs", | ||
19 | + "url": "https://github.com/lightbase/cocar.git" | ||
18 | } | 20 | } |
19 | ], | 21 | ], |
20 | "require": { | 22 | "require": { |
@@ -45,7 +47,14 @@ | @@ -45,7 +47,14 @@ | ||
45 | "jquery/jquery": "1.9.*", | 47 | "jquery/jquery": "1.9.*", |
46 | "helios-ag/fm-elfinder-bundle": "1.x", | 48 | "helios-ag/fm-elfinder-bundle": "1.x", |
47 | "knplabs/knp-menu": "2.0.*@dev", | 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 | "scripts": { | 59 | "scripts": { |
51 | "post-install-cmd": [ | 60 | "post-install-cmd": [ |
@@ -0,0 +1,105 @@ | @@ -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 | \ No newline at end of file | 106 | \ No newline at end of file |
src/Cacic/CommonBundle/Controller/DefaultController.php
@@ -16,7 +16,8 @@ class DefaultController extends Controller | @@ -16,7 +16,8 @@ class DefaultController extends Controller | ||
16 | $estatisticas = array( | 16 | $estatisticas = array( |
17 | 'totalCompMonitorados' => $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->countAll(), | 17 | 'totalCompMonitorados' => $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->countAll(), |
18 | 'totalInsucessosInstalacao' => $this->getDoctrine()->getRepository('CacicCommonBundle:InsucessoInstalacao')->countAll(), | 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 | return $this->render( | 23 | return $this->render( |
src/Cacic/CommonBundle/Controller/RedeController.php
@@ -32,7 +32,8 @@ class RedeController extends Controller | @@ -32,7 +32,8 @@ class RedeController extends Controller | ||
32 | { | 32 | { |
33 | return $this->render( | 33 | return $this->render( |
34 | 'CacicCommonBundle:Rede:index.html.twig', | 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,28 +566,33 @@ class RedeController extends Controller | ||
565 | 566 | ||
566 | public function vincularAction(Request $request) | 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 | \ No newline at end of file | 600 | \ No newline at end of file |
src/Cacic/CommonBundle/Controller/SoftwareController.php
@@ -114,7 +114,7 @@ class SoftwareController extends Controller | @@ -114,7 +114,7 @@ class SoftwareController extends Controller | ||
114 | * Tela de classificação EM LOTE de Softwares | 114 | * Tela de classificação EM LOTE de Softwares |
115 | * @param Symfony\Component\HttpFoundation\Request $request | 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 | if ( $request->isMethod('POST') ) | 119 | if ( $request->isMethod('POST') ) |
120 | { | 120 | { |
@@ -148,7 +148,7 @@ class SoftwareController extends Controller | @@ -148,7 +148,7 @@ class SoftwareController extends Controller | ||
148 | return $this->render( | 148 | return $this->render( |
149 | 'CacicCommonBundle:Software:naoclassificados.html.twig', | 149 | 'CacicCommonBundle:Software:naoclassificados.html.twig', |
150 | array( | 150 | array( |
151 | - 'softwares' => $this->getDoctrine()->getRepository( 'CacicCommonBundle:Software' )->listarNaoClassificados(), | 151 | + 'softwares' => $this->getDoctrine()->getRepository( 'CacicCommonBundle:Software' )->listarNaoClassificados( $this->get( 'knp_paginator' ), $page ), |
152 | 'tipos' => $this->getDoctrine()->getRepository( 'CacicCommonBundle:TipoSoftware' )->findAll() | 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,14 +39,14 @@ class UorgController extends Controller | ||
39 | throw $this->createNotFoundException( 'Página não encontrada' ); | 39 | throw $this->createNotFoundException( 'Página não encontrada' ); |
40 | 40 | ||
41 | $uorgs = $this->getDoctrine()->getRepository( 'CacicCommonBundle:Uorg' )->getFolhasDoNo( $request->get( 'idUorgPai' ) ); | 41 | $uorgs = $this->getDoctrine()->getRepository( 'CacicCommonBundle:Uorg' )->getFolhasDoNo( $request->get( 'idUorgPai' ) ); |
42 | - | ||
43 | # Monta um array no formato suportado pelo plugin-in jqTree (JQuery) | 42 | # Monta um array no formato suportado pelo plugin-in jqTree (JQuery) |
44 | $_tree = array(); | 43 | $_tree = array(); |
45 | foreach ( $uorgs as $uorg ) | 44 | foreach ( $uorgs as $uorg ) |
46 | { | 45 | { |
47 | $_tree[] = array( | 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 | 'load_on_demand' => (bool) $uorg['numFilhas'] | 50 | 'load_on_demand' => (bool) $uorg['numFilhas'] |
51 | ); | 51 | ); |
52 | } | 52 | } |
@@ -179,5 +179,5 @@ class UorgController extends Controller | @@ -179,5 +179,5 @@ class UorgController extends Controller | ||
179 | 179 | ||
180 | return $response; | 180 | return $response; |
181 | } | 181 | } |
182 | - | 182 | + |
183 | } | 183 | } |
184 | \ No newline at end of file | 184 | \ No newline at end of file |
src/Cacic/CommonBundle/Controller/UsuarioController.php
@@ -182,7 +182,7 @@ class UsuarioController extends Controller | @@ -182,7 +182,7 @@ class UsuarioController extends Controller | ||
182 | throw $this->createNotFoundException( 'Usuário não encontrado' ); | 182 | throw $this->createNotFoundException( 'Usuário não encontrado' ); |
183 | 183 | ||
184 | if($csNivel[0]["cont"] == 1 && $nivelUser[0]["teGrupoUsuarios"] == "Administração"){ | 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 | }else | 186 | }else |
187 | { | 187 | { |
188 | $em = $this->getDoctrine()->getManager(); | 188 | $em = $this->getDoctrine()->getManager(); |
@@ -0,0 +1,296 @@ | @@ -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 | \ No newline at end of file | 297 | \ No newline at end of file |
@@ -0,0 +1,96 @@ | @@ -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 | \ No newline at end of file | 97 | \ No newline at end of file |
@@ -0,0 +1,15 @@ | @@ -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 | +} |
@@ -0,0 +1,15 @@ | @@ -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,10 +147,11 @@ class ComputadorColetaRepository extends EntityRepository | ||
147 | return $qb->getQuery()->execute(); | 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 | $qb = $this->createQueryBuilder('coleta') | 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 | ->innerJoin('CacicCommonBundle:ComputadorColetaHistorico','hist', 'WITH', 'coleta.idComputadorColeta = hist.computadorColeta') | 155 | ->innerJoin('CacicCommonBundle:ComputadorColetaHistorico','hist', 'WITH', 'coleta.idComputadorColeta = hist.computadorColeta') |
155 | ->innerJoin('coleta.classProperty', 'property') | 156 | ->innerJoin('coleta.classProperty', 'property') |
156 | ->innerJoin('property.idClass', 'classe') | 157 | ->innerJoin('property.idClass', 'classe') |
@@ -166,7 +167,10 @@ class ComputadorColetaRepository extends EntityRepository | @@ -166,7 +167,10 @@ class ComputadorColetaRepository extends EntityRepository | ||
166 | /** | 167 | /** |
167 | * Verifica os filtros | 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 | $qb->andWhere('local.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] )); | 174 | $qb->andWhere('local.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] )); |
171 | 175 | ||
172 | if ( array_key_exists('redes', $filtros) && !empty($filtros['redes']) ) | 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,4 +282,81 @@ class ComputadorRepository extends EntityRepository | ||
282 | return $computador; | 282 | return $computador; |
283 | } | 283 | } |
284 | 284 | ||
285 | -} | ||
286 | \ No newline at end of file | 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 | +} |
@@ -0,0 +1,91 @@ | @@ -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 | +} |
@@ -0,0 +1,109 @@ | @@ -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,6 +12,17 @@ use Doctrine\ORM\EntityRepository; | ||
12 | */ | 12 | */ |
13 | class PatrimonioConfigInterfaceRepository extends EntityRepository | 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,11 +36,13 @@ class RedeRepository extends EntityRepository | ||
36 | public function paginar( \Knp\Component\Pager\Paginator $paginator, $page = 1 ) | 36 | public function paginar( \Knp\Component\Pager\Paginator $paginator, $page = 1 ) |
37 | { | 37 | { |
38 | $qb = $this->createQueryBuilder('r') | 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 | ->innerJoin('CacicCommonBundle:Local', 'l', 'WITH', 'l.idLocal = r.idLocal') | 41 | ->innerJoin('CacicCommonBundle:Local', 'l', 'WITH', 'l.idLocal = r.idLocal') |
41 | ->leftJoin('CacicCommonBundle:ServidorAutenticacao', 's', 'WITH', 's.idServidorAutenticacao = r.idServidorAutenticacao') | 42 | ->leftJoin('CacicCommonBundle:ServidorAutenticacao', 's', 'WITH', 's.idServidorAutenticacao = r.idServidorAutenticacao') |
42 | ->leftJoin('CacicCommonBundle:Computador', 'comp', 'WITH', 'comp.idRede = r.idRede') | 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 | ->orderBy('r.teIpRede, l.nmLocal'); | 46 | ->orderBy('r.teIpRede, l.nmLocal'); |
45 | 47 | ||
46 | return $paginator->paginate( | 48 | return $paginator->paginate( |
@@ -176,4 +178,33 @@ class RedeRepository extends EntityRepository | @@ -176,4 +178,33 @@ class RedeRepository extends EntityRepository | ||
176 | 178 | ||
177 | return $qb->getQuery()->getArrayResult(); | 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 | \ No newline at end of file | 211 | \ No newline at end of file |
src/Cacic/CommonBundle/Entity/SoftwareRepository.php
@@ -39,18 +39,38 @@ class SoftwareRepository extends EntityRepository | @@ -39,18 +39,38 @@ class SoftwareRepository extends EntityRepository | ||
39 | return $this->getEntityManager()->createQuery( $_dql )->getArrayResult(); | 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 | * Método de listagem dos Softwares cadastrados que não foram classificados (sem Tipo de Software) | 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,20 +97,21 @@ class SoftwareRepository extends EntityRepository | ||
77 | { | 97 | { |
78 | // Monta a Consulta básica... | 98 | // Monta a Consulta básica... |
79 | $qb = $this->createQueryBuilder('sw') | 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 | ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'sw.idSoftware = prop.software') | 101 | ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'sw.idSoftware = prop.software') |
102 | + ->innerJoin('CacicCommonBundle:ClassProperty', 'class','WITH', 'prop.classProperty = class.idClassProperty') | ||
82 | ->innerJoin('CacicCommonBundle:ComputadorColeta', 'col', 'WITH', 'col.computador = prop.computador') | 103 | ->innerJoin('CacicCommonBundle:ComputadorColeta', 'col', 'WITH', 'col.computador = prop.computador') |
83 | ->innerJoin('CacicCommonBundle:Computador', 'comp', 'WITH', 'col.computador = comp.idComputador') | 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 | ->leftJoin('r.idLocal', 'l') | 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 | ->orderBy('sw.nmSoftware, l.nmLocal'); | 108 | ->orderBy('sw.nmSoftware, l.nmLocal'); |
88 | 109 | ||
89 | /** | 110 | /** |
90 | * Verifica os filtros que foram parametrizados | 111 | * Verifica os filtros que foram parametrizados |
91 | */ | 112 | */ |
92 | if ( array_key_exists('softwares', $filtros) && !empty($filtros['softwares']) ) | 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 | if ( array_key_exists('locais', $filtros) && !empty($filtros['locais']) ) | 116 | if ( array_key_exists('locais', $filtros) && !empty($filtros['locais']) ) |
96 | $qb->andWhere('l.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] )); | 117 | $qb->andWhere('l.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] )); |
@@ -163,13 +184,12 @@ class SoftwareRepository extends EntityRepository | @@ -163,13 +184,12 @@ class SoftwareRepository extends EntityRepository | ||
163 | { | 184 | { |
164 | // Monta a Consulta básica... | 185 | // Monta a Consulta básica... |
165 | $qb = $this->createQueryBuilder('sw') | 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 | ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'sw.idSoftware = prop.software') | 188 | ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'sw.idSoftware = prop.software') |
168 | ->innerJoin('CacicCommonBundle:ComputadorColeta', 'col', 'WITH', 'col.computador = prop.computador') | 189 | ->innerJoin('CacicCommonBundle:ComputadorColeta', 'col', 'WITH', 'col.computador = prop.computador') |
169 | ->innerJoin('CacicCommonBundle:Computador', 'comp', 'WITH', 'col.computador = comp.idComputador') | 190 | ->innerJoin('CacicCommonBundle:Computador', 'comp', 'WITH', 'col.computador = comp.idComputador') |
170 | ->innerJoin('CacicCommonBundle:TipoSoftware', 'tipo', 'WITH', 'sw.idTipoSoftware = tipo.idTipoSoftware') | 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 | * Verifica os filtros que foram parametrizados | 195 | * Verifica os filtros que foram parametrizados |
@@ -202,14 +222,15 @@ class SoftwareRepository extends EntityRepository | @@ -202,14 +222,15 @@ class SoftwareRepository extends EntityRepository | ||
202 | { | 222 | { |
203 | // Monta a Consulta básica... | 223 | // Monta a Consulta básica... |
204 | $qb = $this->createQueryBuilder('sw') | 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 | * Verifica os filtros que foram parametrizados | 236 | * Verifica os filtros que foram parametrizados |
@@ -224,9 +245,10 @@ class SoftwareRepository extends EntityRepository | @@ -224,9 +245,10 @@ class SoftwareRepository extends EntityRepository | ||
224 | if ( array_key_exists('so', $filtros) && !empty($filtros['so']) ) | 245 | if ( array_key_exists('so', $filtros) && !empty($filtros['so']) ) |
225 | $qb->andWhere('comp.idSo IN (:so)')->setParameter('so', explode( ',', $filtros['so'] )); | 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 | return $qb->getQuery()->execute(); | 251 | return $qb->getQuery()->execute(); |
228 | } | 252 | } |
229 | 253 | ||
230 | - | ||
231 | - | ||
232 | } | 254 | } |
233 | \ No newline at end of file | 255 | \ No newline at end of file |
src/Cacic/CommonBundle/Entity/UorgRepository.php
@@ -12,7 +12,13 @@ use Doctrine\ORM\EntityRepository; | @@ -12,7 +12,13 @@ use Doctrine\ORM\EntityRepository; | ||
12 | */ | 12 | */ |
13 | class UorgRepository extends EntityRepository | 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 | * Recupera as Unidades Organizacionais do primeiro nível | 24 | * Recupera as Unidades Organizacionais do primeiro nível |
@@ -36,12 +42,12 @@ class UorgRepository extends EntityRepository | @@ -36,12 +42,12 @@ class UorgRepository extends EntityRepository | ||
36 | */ | 42 | */ |
37 | public function getFolhasDoNo( $idUorgPai ) | 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 | FROM CacicCommonBundle:Uorg uorg | 46 | FROM CacicCommonBundle:Uorg uorg |
41 | INNER JOIN uorg.uorgPai pai | 47 | INNER JOIN uorg.uorgPai pai |
42 | LEFT JOIN uorg.uorgFilhas filhas | 48 | LEFT JOIN uorg.uorgFilhas filhas |
43 | WHERE pai.idUorg = :idUorgPai | 49 | WHERE pai.idUorg = :idUorgPai |
44 | - GROUP BY uorg.idUorg"; | 50 | + GROUP BY uorg.idUorg, uorg.nmUorg"; |
45 | 51 | ||
46 | return $this->getEntityManager()->createQuery( $_dql ) | 52 | return $this->getEntityManager()->createQuery( $_dql ) |
47 | ->setParameter('idUorgPai', $idUorgPai) | 53 | ->setParameter('idUorgPai', $idUorgPai) |
@@ -67,5 +73,19 @@ class UorgRepository extends EntityRepository | @@ -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,12 +15,13 @@ class UsuarioRepository extends EntityRepository | ||
15 | 15 | ||
16 | public function paginar( \Knp\Component\Pager\Paginator $paginator, $page = 1 ) | 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 | FROM CacicCommonBundle:Usuario u | 19 | FROM CacicCommonBundle:Usuario u |
20 | JOIN u.idLocal l | 20 | JOIN u.idLocal l |
21 | JOIN u.idGrupoUsuario g | 21 | JOIN u.idGrupoUsuario g |
22 | LEFT JOIN u.locaisSecundarios ls | 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 | return $paginator->paginate( | 26 | return $paginator->paginate( |
26 | $this->getEntityManager()->createQuery( $_dql ), | 27 | $this->getEntityManager()->createQuery( $_dql ), |
src/Cacic/CommonBundle/Form/Type/AquisicaoItemType.php
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | 2 | ||
3 | namespace Cacic\CommonBundle\Form\Type; | 3 | namespace Cacic\CommonBundle\Form\Type; |
4 | 4 | ||
5 | +use Cacic\CommonBundle\Entity\SoftwareRepository; | ||
5 | use Symfony\Component\Form\AbstractType; | 6 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\FormBuilderInterface; | 7 | use Symfony\Component\Form\FormBuilderInterface; |
7 | 8 | ||
@@ -31,9 +32,19 @@ class AquisicaoItemType extends AbstractType | @@ -31,9 +32,19 @@ class AquisicaoItemType extends AbstractType | ||
31 | 'entity', | 32 | 'entity', |
32 | array( | 33 | array( |
33 | 'class' => 'CacicCommonBundle:Software', | 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 | 'empty_value' => 'Selecione', | 44 | 'empty_value' => 'Selecione', |
36 | - 'label'=>'Software:', 'max_length'=>100 ) | 45 | + 'label'=>'Software:', |
46 | + 'max_length'=>100 | ||
47 | + ) | ||
37 | ); | 48 | ); |
38 | 49 | ||
39 | $builder->add( | 50 | $builder->add( |
src/Cacic/CommonBundle/Form/Type/AquisicaoType.php
@@ -19,7 +19,7 @@ class AquisicaoType extends AbstractType | @@ -19,7 +19,7 @@ class AquisicaoType extends AbstractType | ||
19 | $builder->add( | 19 | $builder->add( |
20 | 'nrProcesso', | 20 | 'nrProcesso', |
21 | null, | 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 | $builder->add( | 25 | $builder->add( |
@@ -0,0 +1,72 @@ | @@ -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 | \ No newline at end of file | 73 | \ No newline at end of file |
src/Cacic/CommonBundle/Form/Type/GrupoUsuarioType.php
@@ -36,7 +36,7 @@ class GrupoUsuarioType extends AbstractType | @@ -36,7 +36,7 @@ class GrupoUsuarioType extends AbstractType | ||
36 | 'label' => 'Acessos:' | 36 | 'label' => 'Acessos:' |
37 | ) | 37 | ) |
38 | ); | 38 | ); |
39 | - $builder->add( 'csNivelAdministracao', 'text', | 39 | + $builder->add( 'csNivelAdministracao', 'number', |
40 | array( | 40 | array( |
41 | 'max_length' => 50, | 41 | 'max_length' => 50, |
42 | 'required'=>false, | 42 | 'required'=>false, |
src/Cacic/CommonBundle/Form/Type/RedeType.php
@@ -22,6 +22,7 @@ class RedeType extends AbstractType | @@ -22,6 +22,7 @@ class RedeType extends AbstractType | ||
22 | 'empty_value' => 'Selecione o Local', | 22 | 'empty_value' => 'Selecione o Local', |
23 | 'class' => 'CacicCommonBundle:Local', | 23 | 'class' => 'CacicCommonBundle:Local', |
24 | 'property' => 'nmLocal', | 24 | 'property' => 'nmLocal', |
25 | + 'required' =>true, | ||
25 | 'label' => 'Local' | 26 | 'label' => 'Local' |
26 | ) | 27 | ) |
27 | ); | 28 | ); |
src/Cacic/CommonBundle/Form/Type/ServidorAutenticacaoType.php
@@ -55,8 +55,7 @@ class ServidorAutenticacaoType extends AbstractType | @@ -55,8 +55,7 @@ class ServidorAutenticacaoType extends AbstractType | ||
55 | 'label'=>'Servidor Ativo:', | 55 | 'label'=>'Servidor Ativo:', |
56 | 'required' => true, | 56 | 'required' => true, |
57 | 'multiple'=> false, | 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 @@ | @@ -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 | \ No newline at end of file | 44 | \ No newline at end of file |
src/Cacic/CommonBundle/Resources/config/doctrine/AtesteRedes.orm.yml
0 → 100755
@@ -0,0 +1,33 @@ | @@ -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 | \ No newline at end of file | 34 | \ No newline at end of file |
src/Cacic/CommonBundle/Resources/config/doctrine/LogAcesso.orm.yml
0 → 100755
@@ -0,0 +1,27 @@ | @@ -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 | \ No newline at end of file | 28 | \ No newline at end of file |
src/Cacic/CommonBundle/Resources/config/routing.yml
@@ -227,8 +227,10 @@ cacic_software_excluir: | @@ -227,8 +227,10 @@ cacic_software_excluir: | ||
227 | defaults: { _controller: CacicCommonBundle:Software:excluir} | 227 | defaults: { _controller: CacicCommonBundle:Software:excluir} |
228 | 228 | ||
229 | cacic_software_naoclassificados: | 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 | cacic_software_naousados: | 235 | cacic_software_naousados: |
234 | pattern: /software/naousados | 236 | pattern: /software/naousados |
@@ -507,4 +509,8 @@ cacic_grupo_usuario_editar: | @@ -507,4 +509,8 @@ cacic_grupo_usuario_editar: | ||
507 | 509 | ||
508 | cacic_grupo_usuario_excluir: | 510 | cacic_grupo_usuario_excluir: |
509 | pattern: /grupousuario/excluir | 511 | pattern: /grupousuario/excluir |
510 | - defaults: { _controller: CacicCommonBundle:GrupoUsuario:excluir} | ||
511 | \ No newline at end of file | 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 | \ No newline at end of file | 518 | \ No newline at end of file |
src/Cacic/CommonBundle/Resources/config/services.yml
@@ -6,4 +6,9 @@ services: | @@ -6,4 +6,9 @@ services: | ||
6 | cacic.twig.siglas_extension: | 6 | cacic.twig.siglas_extension: |
7 | class: Cacic\CommonBundle\Twig\SiglasExtension | 7 | class: Cacic\CommonBundle\Twig\SiglasExtension |
8 | tags: | 8 | tags: |
9 | - - { name: twig.extension } | ||
10 | \ No newline at end of file | 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,7 +207,7 @@ Cacic\CommonBundle\Entity\Aquisicao: | ||
207 | nrProcesso: | 207 | nrProcesso: |
208 | - NotBlank: ~ | 208 | - NotBlank: ~ |
209 | - Length: | 209 | - Length: |
210 | - max: 11 | 210 | + max: 40 |
211 | nmEmpresa: | 211 | nmEmpresa: |
212 | - NotBlank: ~ | 212 | - NotBlank: ~ |
213 | - Length: | 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 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_aplicativo_index') }}">{{ "Aplicativo"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_aplicativo_index') }}">{{ "Aplicativo"|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/Aplicativo/index.html.twig
src/Cacic/CommonBundle/Resources/views/Aquisicao/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_aquisicao_index') }}">{{ "Aquisição"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_aquisicao_index') }}">{{ "Aquisição"|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/Aquisicao/index.html.twig
src/Cacic/CommonBundle/Resources/views/AquisicaoItem/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_aquisicao_item_index') }}">{{ "Aquisição de Item"|trans }}</a></li> / | 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
src/Cacic/CommonBundle/Resources/views/Ateste/acessoResultado.html.twig
0 → 100755
@@ -0,0 +1,102 @@ | @@ -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 | \ No newline at end of file | 103 | \ No newline at end of file |
src/Cacic/CommonBundle/Resources/views/Ateste/index.html.twig
0 → 100755
@@ -0,0 +1,115 @@ | @@ -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 | \ No newline at end of file | 116 | \ No newline at end of file |
src/Cacic/CommonBundle/Resources/views/Cacic26/migracao.html.twig
src/Cacic/CommonBundle/Resources/views/Computador/buscar.html.twig
src/Cacic/CommonBundle/Resources/views/Computador/consultar.html.twig
src/Cacic/CommonBundle/Resources/views/Computador/detalhar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_computador_navegar') }}">{{ "Computadores"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_computador_navegar') }}">{{ "Computadores"|trans }}</a></li> / |
@@ -36,8 +36,10 @@ | @@ -36,8 +36,10 @@ | ||
36 | <td colspan="3">{{ computador.idSo }}</td> | 36 | <td colspan="3">{{ computador.idSo }}</td> |
37 | </tr> | 37 | </tr> |
38 | <tr> | 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 | </tr> | 43 | </tr> |
42 | <tr> | 44 | <tr> |
43 | <th width="20%">{{ 'Versão do Agente Principal'|trans }}</th> | 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 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_sistemaoperacional_index') }}">{{ "Computadores"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_sistemaoperacional_index') }}">{{ "Computadores"|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/Computador/navegar.html.twig
src/Cacic/CommonBundle/Resources/views/Configuracao/agente.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li class="active">{{ 'Configuração Local'|trans }} (<i>{{ local.getSgLocal() }}</i>) </li> | 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 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li class="active">{{ 'Configuração Gerente'|trans }} (<i>{{ local.getSgLocal() }}</i>) </li> | 4 | <li class="active">{{ 'Configuração Gerente'|trans }} (<i>{{ local.getSgLocal() }}</i>) </li> |
src/Cacic/CommonBundle/Resources/views/Configuracao/padrao.html.twig
src/Cacic/CommonBundle/Resources/views/Default/downloads.html.twig
src/Cacic/CommonBundle/Resources/views/Default/index.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block body %} | 3 | {% block body %} |
4 | 4 | ||
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | <div class="block box_content round_bottom padding_10"> | 11 | <div class="block box_content round_bottom padding_10"> |
12 | <ul class="statistics"> | 12 | <ul class="statistics"> |
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> | 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 | <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> | 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 | </ul> | 16 | </ul> |
17 | </div> | 17 | </div> |
@@ -90,4 +90,4 @@ | @@ -90,4 +90,4 @@ | ||
90 | 90 | ||
91 | </div> <!-- /row --> | 91 | </div> <!-- /row --> |
92 | 92 | ||
93 | -{% endblock %} | ||
94 | \ No newline at end of file | 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 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_grupo_usuario_index') }}">{{ "Grupo de Usuários"|trans }}</a></li> / | 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
src/Cacic/CommonBundle/Resources/views/Local/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_local_index') }}">{{ "Locais"|trans }}</a></li> / | 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 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_local_index') }}">{{ "Locais"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_local_index') }}">{{ "Locais"|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/Local/index.html.twig
src/Cacic/CommonBundle/Resources/views/Log/acesso.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li class="active">{{ 'Log de Acesso'|trans }}</li> | 4 | <li class="active">{{ 'Log de Acesso'|trans }}</li> |
@@ -104,4 +104,4 @@ | @@ -104,4 +104,4 @@ | ||
104 | 104 | ||
105 | </script> | 105 | </script> |
106 | {% endif %} | 106 | {% endif %} |
107 | -{% endblock %} | ||
108 | \ No newline at end of file | 107 | \ No newline at end of file |
108 | +{% endblock %} |
src/Cacic/CommonBundle/Resources/views/Log/atividade.html.twig
src/Cacic/CommonBundle/Resources/views/Log/insucesso.html.twig
src/Cacic/CommonBundle/Resources/views/Log/suporte.html.twig
src/Cacic/CommonBundle/Resources/views/Modulo/editar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_modulo_index') }}">{{ "Módulos"|trans }}</a> / </li> | 4 | <li><a href="{{ path('cacic_modulo_index') }}">{{ "Módulos"|trans }}</a> / </li> |
src/Cacic/CommonBundle/Resources/views/Modulo/index.html.twig
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1.html.twig
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | <td style="text-align: left"><h6>{{ ' Exemplo "Selecione a Gerência de localização este equipamento" '|trans }}</h6></td> | 18 | <td style="text-align: left"><h6>{{ ' Exemplo "Selecione a Gerência de localização este equipamento" '|trans }}</h6></td> |
19 | </tr> | 19 | </tr> |
20 | <tr> | 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 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> | 22 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> |
23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> | 23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> |
24 | </tr> | 24 | </tr> |
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta1a.html.twig
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | <td style="text-align: left"><h6>{{ ' Exemplo "Selecione a Linha de negócio de localização deste equipamento" '|trans }}</h6></td> | 18 | <td style="text-align: left"><h6>{{ ' Exemplo "Selecione a Linha de negócio de localização deste equipamento" '|trans }}</h6></td> |
19 | </tr> | 19 | </tr> |
20 | <tr> | 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 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> | 22 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> |
23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> | 23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> |
24 | </tr> | 24 | </tr> |
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta2.html.twig
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | <td style="text-align: left"><h6>{{ ' Exemplo "Selecione a divisão onde encontra-se este equipamento" '|trans }}</h6></td> | 17 | <td style="text-align: left"><h6>{{ ' Exemplo "Selecione a divisão onde encontra-se este equipamento" '|trans }}</h6></td> |
18 | </tr> | 18 | </tr> |
19 | <tr> | 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 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> | 21 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> |
22 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> | 22 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> |
23 | </tr> | 23 | </tr> |
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta3.html.twig
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <td style="text-align: left"><h6>{{ ' Exemplo "Informe o setor onde esta localizado o equipamento." '|trans }}</h6></td> | 12 | <td style="text-align: left"><h6>{{ ' Exemplo "Informe o setor onde esta localizado o equipamento." '|trans }}</h6></td> |
13 | </tr> | 13 | </tr> |
14 | <tr> | 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 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> | 16 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> |
17 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> | 17 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> |
18 | </tr> | 18 | </tr> |
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta4.html.twig
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> | 18 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> |
19 | </tr> | 19 | </tr> |
20 | <tr> | 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 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> | 22 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> |
23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> | 23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> |
24 | </tr> | 24 | </tr> |
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta5.html.twig
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> | 18 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> |
19 | </tr> | 19 | </tr> |
20 | <tr> | 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 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> | 22 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> |
23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> | 23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> |
24 | </tr> | 24 | </tr> |
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta6.html.twig
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> | 18 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> |
19 | </tr> | 19 | </tr> |
20 | <tr> | 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 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> | 22 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> |
23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> | 23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> |
24 | </tr> | 24 | </tr> |
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta7.html.twig
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> | 18 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> |
19 | </tr> | 19 | </tr> |
20 | <tr> | 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 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> | 22 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> |
23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> | 23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> |
24 | </tr> | 24 | </tr> |
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta8.html.twig
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> | 18 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> |
19 | </tr> | 19 | </tr> |
20 | <tr> | 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 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> | 22 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> |
23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> | 23 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> |
24 | </tr> | 24 | </tr> |
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/etiqueta9.html.twig
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> | 19 | <td style="vertical-align: top">{{ form_widget(form.inDestacarDuplicidade)}}</td> |
20 | </tr> | 20 | </tr> |
21 | <tr> | 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 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> | 23 | <td style="vertical-align: top">{{ form_widget(form.inObrigatorio) }}</td> |
24 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> | 24 | <td style="text-align: left"><h6>{{ ' O preenchimento do campo é obrigatório? '|trans }}</h6></td> |
25 | </tr> | 25 | </tr> |
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/index.html.twig
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/interface.html.twig
src/Cacic/CommonBundle/Resources/views/PatrimonioConfigInterface/opcoes.html.twig
src/Cacic/CommonBundle/Resources/views/Rede/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_subrede_index') }}">{{ "SubRedes"|trans }}</a></li> / | 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 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_subrede_index') }}">{{ "Subredes"|trans }}</a></li> / | 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 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li class="active">{{ "Subredes"|trans }}</li> | 4 | <li class="active">{{ "Subredes"|trans }}</li> |
@@ -86,22 +86,95 @@ | @@ -86,22 +86,95 @@ | ||
86 | </div><!-- /span --> | 86 | </div><!-- /span --> |
87 | </div><!-- /row --> | 87 | </div><!-- /row --> |
88 | <!-- Modal para Vincular UORG's --> | 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 | {% endblock %} | 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 | {% block javascripts %} | 116 | {% block javascripts %} |
99 | 117 | ||
100 | {{ parent() }} | 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 | $( "#vincularUORGs" ).dialog({ | 178 | $( "#vincularUORGs" ).dialog({ |
106 | autoOpen: false, | 179 | autoOpen: false, |
107 | height: 550, | 180 | height: 550, |
@@ -109,7 +182,31 @@ | @@ -109,7 +182,31 @@ | ||
109 | modal: true, | 182 | modal: true, |
110 | buttons: { | 183 | buttons: { |
111 | "Salvar" : function(){ | 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 | "Cancelar" : function(){ | 211 | "Cancelar" : function(){ |
115 | $( this ).dialog( "close" ); | 212 | $( this ).dialog( "close" ); |
@@ -125,6 +222,5 @@ | @@ -125,6 +222,5 @@ | ||
125 | var id = $( this ).parent().parent().attr( 'id' ).replace( /.*?(\d+)$/, '$1' ); | 222 | var id = $( this ).parent().parent().attr( 'id' ).replace( /.*?(\d+)$/, '$1' ); |
126 | $( "#vincularUORGs" ).data( 'id', id ).dialog( "open" ); | 223 | $( "#vincularUORGs" ).data( 'id', id ).dialog( "open" ); |
127 | }); | 224 | }); |
128 | - | ||
129 | </script> | 225 | </script> |
130 | -{% endblock %} | ||
131 | \ No newline at end of file | 226 | \ No newline at end of file |
227 | +{% endblock %} |
src/Cacic/CommonBundle/Resources/views/Rede/manutencao.html.twig
src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_servidorautenticacao_index') }}">{{ 'Servidor de Autenticação'|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_servidorautenticacao_index') }}">{{ 'Servidor de Autenticação'|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/ServidorAutenticacao/index.html.twig
src/Cacic/CommonBundle/Resources/views/So/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_sistemaoperacional_index') }}">{{ "Sistemas Operacionais"|trans }}</a></li> / | 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 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_sistemaoperacional_index') }}">{{ "Sistemas Operacionais"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_sistemaoperacional_index') }}">{{ "Sistemas Operacionais"|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/So/index.html.twig
src/Cacic/CommonBundle/Resources/views/Software/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_software_index') }}">{{ 'Softwares'|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_software_index') }}">{{ 'Softwares'|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/Software/index.html.twig
src/Cacic/CommonBundle/Resources/views/Software/naoclassificados.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li class="active">{{ 'Softwares Não Classificados'|trans }}</li> | 4 | <li class="active">{{ 'Softwares Não Classificados'|trans }}</li> |
@@ -49,9 +49,12 @@ | @@ -49,9 +49,12 @@ | ||
49 | 49 | ||
50 | </tbody> | 50 | </tbody> |
51 | </table> | 51 | </table> |
52 | - | 52 | + {# display navigation #} |
53 | + <div class="navigation"> | ||
54 | + {{ knp_pagination_render(softwares) }} | ||
55 | + </div> | ||
53 | <div class="control-group"> | 56 | <div class="control-group"> |
54 | - <div class="controls"> | 57 | + <div class="controls" align="right"> |
55 | <button type="reset" class="btn"> | 58 | <button type="reset" class="btn"> |
56 | <i class="icon-refresh"></i> | 59 | <i class="icon-refresh"></i> |
57 | {{ "Resetar Valores"|trans }} | 60 | {{ "Resetar Valores"|trans }} |
src/Cacic/CommonBundle/Resources/views/Software/naousados.html.twig
src/Cacic/CommonBundle/Resources/views/SoftwareEstacao/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_software_estacao_index') }}">{{ "Software por estação"|trans }}</a></li> / | 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
src/Cacic/CommonBundle/Resources/views/TipoLicenca/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_tipo_licenca_index') }}">{{ "Tipos de Licenças"|trans }}</a></li> / | 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
src/Cacic/CommonBundle/Resources/views/TipoSoftware/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_tiposoftware_index') }}">{{ "Tipos de Softwares"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_tiposoftware_index') }}">{{ "Tipos de Softwares"|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/TipoSoftware/index.html.twig
src/Cacic/CommonBundle/Resources/views/Uorg/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_uorg_index') }}">{{ "Unidades Organizacionais"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_uorg_index') }}">{{ "Unidades Organizacionais"|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/Uorg/index.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li class="active">{{ "Unidades Organizacionais"|trans }}</li> | 4 | <li class="active">{{ "Unidades Organizacionais"|trans }}</li> |
@@ -94,7 +94,7 @@ | @@ -94,7 +94,7 @@ | ||
94 | return '{{ path('cacic_uorg_loadnodes') }}/'+ node.id +''; | 94 | return '{{ path('cacic_uorg_loadnodes') }}/'+ node.id +''; |
95 | }, | 95 | }, |
96 | onCreateLi: function(node, $li) { | 96 | onCreateLi: function(node, $li) { |
97 | - | 97 | + |
98 | var _acoesNode = ' <a href="{{ path('cacic_uorg_visualizar') }}/'+ node.id +'" rel="modal:open"><i class="icon-search" title="Visualizar dados da Unidade"></i></a> '; | 98 | var _acoesNode = ' <a href="{{ path('cacic_uorg_visualizar') }}/'+ node.id +'" rel="modal:open"><i class="icon-search" title="Visualizar dados da Unidade"></i></a> '; |
99 | _acoesNode += ' <a href="{{ path('cacic_uorg_cadastrar') }}/'+ node.id +'"><i class="icon-plus-sign" title="Cadastrar Unidade"></i></a> '; | 99 | _acoesNode += ' <a href="{{ path('cacic_uorg_cadastrar') }}/'+ node.id +'"><i class="icon-plus-sign" title="Cadastrar Unidade"></i></a> '; |
100 | _acoesNode += ' <a href="{{ path('cacic_uorg_editar') }}/'+ node.id +'"><i class="icon-edit" title="Editar Unidade"></i></a> '; | 100 | _acoesNode += ' <a href="{{ path('cacic_uorg_editar') }}/'+ node.id +'"><i class="icon-edit" title="Editar Unidade"></i></a> '; |
@@ -114,5 +114,5 @@ | @@ -114,5 +114,5 @@ | ||
114 | {% endblock %} | 114 | {% endblock %} |
115 | 115 | ||
116 | {% block alertaExclusao %} | 116 | {% block alertaExclusao %} |
117 | - A Unidade Organizacional e <b>todas as suas sub-unidades</b> serão removidas permanentemente e não poderão ser recuperadas. Tem certeza que deseja continuar? | 117 | + {{ 'A Unidade Organizacional e' |trans}} <b>{{ 'todas as suas sub-unidades' |trans}}</b> {{ 'serão removidas permanentemente e não poderão ser recuperadas. Tem certeza que deseja continuar?'|trans}} |
118 | {% endblock %} | 118 | {% endblock %} |
119 | \ No newline at end of file | 119 | \ No newline at end of file |
src/Cacic/CommonBundle/Resources/views/UorgType/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_uorg_type_index') }}">{{ "Unidades Organizacionais"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_uorg_type_index') }}">{{ "Unidades Organizacionais"|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/UorgType/index.html.twig
src/Cacic/CommonBundle/Resources/views/UsbDevice/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_usbdevice_index') }}">{{ "Dispositivo de USB"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_usbdevice_index') }}">{{ "Dispositivo de USB"|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/UsbDevice/index.html.twig
src/Cacic/CommonBundle/Resources/views/Usuario/cadastrar.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_usuario_index') }}">{{ "Usuários"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_usuario_index') }}">{{ "Usuários"|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/Usuario/index.html.twig
src/Cacic/CommonBundle/Resources/views/Usuario/meusdados.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li><a href="{{ path('cacic_usuario_index') }}">{{ "Usuários"|trans }}</a></li> / | 4 | <li><a href="{{ path('cacic_usuario_index') }}">{{ "Usuários"|trans }}</a></li> / |
src/Cacic/CommonBundle/Resources/views/Usuario/trocarsenha.html.twig
@@ -0,0 +1,180 @@ | @@ -0,0 +1,180 @@ | ||
1 | +{% extends '::base.html.twig' %} | ||
2 | + | ||
3 | +{% block meta %} | ||
4 | + | ||
5 | + <title>{{ "CACIC - Configurador Automático e Coletor de Informações Computacionais"|trans }}</title> | ||
6 | + <meta name="description" content="{{ 'CACIC - Confgurador Automático e Coletor de Informações Computacionais'|trans }}"> | ||
7 | + <meta name="ahoekie" content="CACIC BackEnd"> | ||
8 | + | ||
9 | +{% endblock %} | ||
10 | + | ||
11 | + | ||
12 | +{% block sidenav %} | ||
13 | + | ||
14 | + <ul class="clearfix"> | ||
15 | + <li><a class="round_top" href="{{ path('cacic_common_homepage') }}"> | ||
16 | + <i class="icon-home"></i> | ||
17 | + <span>Home</span></a> | ||
18 | + </li> | ||
19 | + <li class="dropdown"> | ||
20 | + <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"> | ||
21 | + <i class="icon-cogs"></i> | ||
22 | + <span>{{ "Administração"|trans }}</span> | ||
23 | + <span class="icon"> </span> | ||
24 | + </a> | ||
25 | + <ul> | ||
26 | + <li><a class="round_top" href="{{ path('cacic_software_naoclassificados') }}">{{ "Classificar Software"|trans }}</a></li> | ||
27 | + <li><a href="{{ path('cacic_software_naousados') }}">{{ "Softwares não usados"|trans }}</a></li> | ||
28 | + <li><a href="{{ path('cacic_modulo_index') }}">{{ "Configurar Módulos"|trans }}</a></li> | ||
29 | + | ||
30 | + <li class="dropdown-submenu"> | ||
31 | + <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown"> | ||
32 | + Logs | ||
33 | + <span class="icon"> </span> | ||
34 | + </a> | ||
35 | + <ul> | ||
36 | + <li><a href="{{ path('cacic_log_acesso') }}">{{ "Acessos"|trans }}</a></li> | ||
37 | + <li><a href="{{ path('cacic_log_atividade') }}">{{ "Atividades"|trans }}</a></li> | ||
38 | + <li><a href="{{ path('cacic_log_insucesso_instalacao') }}">{{ "Insucessos Instalação"|trans }}</a></li> | ||
39 | + <li><a href="{{ path('cacic_log_suporte_remoto') }}">{{ "Suporte Remoto Seguro"|trans }}</a></li> | ||
40 | + </ul> | ||
41 | + </li> | ||
42 | + <li class="dropdown-submenu" > | ||
43 | + <a href="javascript:void(0)"> | ||
44 | + <span>{{ "Cadastros"|trans }}</span> | ||
45 | + <span class="icon"> </span> | ||
46 | + </a> | ||
47 | + <ul> | ||
48 | + <li><a href="{{ path('cacic_local_index') }}">{{ "Locais"|trans }}</a></li> | ||
49 | + <li><a href="{{ path('cacic_servidorautenticacao_index') }}">{{ "Servidores Autenticação"|trans }}</a></li> | ||
50 | + <li><a href="{{ path('cacic_subrede_index') }}">{{ "Subredes"|trans }}</a></li> | ||
51 | + <li><a href="{{ path('cacic_aplicativo_index') }}">{{ "Aplicativo"|trans }}</a></li> | ||
52 | + <li><a href="{{ path('cacic_usuario_index') }}">{{ "Usuários"|trans }}</a></li> | ||
53 | + <li><a href="{{ path('cacic_grupo_usuario_index') }}">{{ "Grupo de Usuários"|trans }}</a></li> | ||
54 | + <li><a href="{{ path('cacic_tiposoftware_index') }}">{{ "Tipos Softwares"|trans }}</a></li> | ||
55 | + <li><a href="{{ path('cacic_sistemaoperacional_index') }}">{{ "Sistemas Operacionais"|trans }}</a></li> | ||
56 | + <li><a href="{{ path('cacic_software_index') }}">{{ "Softwares"|trans }}</a></li> | ||
57 | + <li><a href="{{ path('cacic_usbdevice_index') }}">{{ "Dispositivos USB"|trans }}</a></li> | ||
58 | + </ul> | ||
59 | + </li> | ||
60 | + <li class="dropdown-submenu" > | ||
61 | + <a href="javascript:void(0)"> | ||
62 | + {{ "Patrimônio"|trans }} | ||
63 | + <span class="icon"> </span> | ||
64 | + </a> | ||
65 | + <ul> | ||
66 | + <li ><a href="{{ path('cacic_patrimonio_index')}}">{{ "Interface"|trans }}</a></li> | ||
67 | + <li ><a href="{{ path('cacic_uorg_index')}}">{{ "Unidades Organizacionais"|trans }}</a></li> | ||
68 | + <li ><a href="{{ path('cacic_uorg_type_index')}}">{{ "Tipos de Unidade"|trans }} <br> {{ "Organizacional"|trans }}</a></li> | ||
69 | + <li ><a href="{{ path('cacic_patrimonio_opcoes')}}">{{ "Opções"|trans }}</a></li> | ||
70 | + </ul> | ||
71 | + </li> | ||
72 | + <li class="dropdown-submenu" > | ||
73 | + <a href="javascript:void(0)"> | ||
74 | + {{ "Gerência Aquisições"|trans }} | ||
75 | + <span class="icon"> </span> | ||
76 | + </a> | ||
77 | + <ul > | ||
78 | + <li><a href="{{ path('cacic_aquisicao_index') }}">{{ "Aquisições"|trans }}</a></li> | ||
79 | + <li><a href="{{ path('cacic_aquisicao_item_index') }}">{{ "Itens adquiridos"|trans }}</a></li> | ||
80 | + <li><a href="{{ path('cacic_software_estacao_index') }}">{{ "Software por estações"|trans }}</a></li> | ||
81 | + <li><a href="{{ path('cacic_tipo_licenca_index') }}">{{ "Tipos de Licença"|trans }}</a></li> | ||
82 | + </ul> | ||
83 | + </li> | ||
84 | + </ul> | ||
85 | + </li> | ||
86 | + | ||
87 | + <li class="subnavbar-open-right" > | ||
88 | + <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"> | ||
89 | + <i class="icon-wrench"></i> | ||
90 | + <span>{{ "Manutenção"|trans }}</span> | ||
91 | + <span class="icon"> </span> | ||
92 | + </a> | ||
93 | + <ul > | ||
94 | + <li><a href="{{ path('cacic_subrede_manutencao') }}">{{ "Atualização de Subrede"|trans }}</a></li> | ||
95 | + <li><a href="{{ path('cacic_migracao_cacic26') }}">{{ "Importar de 2.6"|trans }}</a></li> | ||
96 | + </ul> | ||
97 | + </li> | ||
98 | + | ||
99 | + <li> | ||
100 | + <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"> | ||
101 | + <i class="icon-desktop"></i> | ||
102 | + <span>{{ "Computadores"|trans }}</span> | ||
103 | + <span class="icon"> </span> | ||
104 | + </a> | ||
105 | + <ul> | ||
106 | + <li><a href="{{ path('cacic_computador_navegar') }}">{{ "Navegar"|trans }}</a></li> | ||
107 | + <li><a href="{{ path('cacic_computador_consultar') }}">{{ "Consultar"|trans }}</a></li> | ||
108 | + <li><a href="{{ path('cacic_computador_buscar') }}">{{ "Busca avançada"|trans }}</a></li> | ||
109 | + </ul> | ||
110 | + </li> | ||
111 | + | ||
112 | + <li> | ||
113 | + <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"> | ||
114 | + <i class="icon-book"></i> | ||
115 | + <span>{{ "Relatórios"|trans }}</span> | ||
116 | + <span class="icon"> </span> | ||
117 | + </a> | ||
118 | + <ul> | ||
119 | + <li class="dropdown-submenu" > | ||
120 | + <a href="javascript:void(0)"> | ||
121 | + <span>{{ "Softwares"|trans }}</span> | ||
122 | + <span class="icon"> </span> | ||
123 | + </a> | ||
124 | + <ul> | ||
125 | + <li><a href="{{ path('cacic_relatorio_software_inventariados') }}">{{ "Softwares Inventariados"|trans }}</a></li> | ||
126 | + <li><a href="{{ path('cacic_relatorio_software_licenciados') }}">{{ "Softwares Licenciados"|trans }}</a></li> | ||
127 | + <li><a href="{{ path('cacic_relatorio_software_aquisicoes') }}" target="_blank">{{ "Aquisições de Softwares"|trans }}</a></li> | ||
128 | + <li><a href="{{ path('cacic_relatorio_software_orgao') }}">{{ "Por Órgão/Máquinas"|trans }}</a></li> | ||
129 | + <li><a href="{{ path('cacic_relatorio_software_tipo') }}">{{ "Tipos de Software"|trans }}</a></li> | ||
130 | + <li><a href="{{ path('cacic_relatorio_software_naoVinculados') }}" target="_blank">{{ "Softwares não Vinculados"|trans }}</a></li> | ||
131 | + </ul> | ||
132 | + </li> | ||
133 | + <li class="dropdown-submenu" > | ||
134 | + <a href="javascript:void(0)"> | ||
135 | + <span>{{ "Classes WMI"|trans }}</span> | ||
136 | + <span class="icon"> </span> | ||
137 | + </a> | ||
138 | + {{ knp_menu_render('CacicRelatorioBundle:Builder:relatorioMenu') }} | ||
139 | + </li> | ||
140 | + <li><a class="round_top" href="{{ path('cacic_relatorio_autorizacoes') }}">{{ "Autorizações"|trans }}</a></li> | ||
141 | + <li><a class="round_top" href="{{ path('cacic_relatorio_faturamento') }}">{{ "Faturamento"|trans }}</a></li> | ||
142 | + <li><a class="round_top" href="{{ path('cacic_relatorio_inativos') }}">{{ "Inativos"|trans }}</a></li> | ||
143 | + <li><a class="round_top" href="{{ path('cacic_relatorio_patrimonio') }}">{{ "Patrimônio"|trans }}</a></li> | ||
144 | + </ul> | ||
145 | + </li> | ||
146 | + | ||
147 | + <!-- <li class="dropdown subnavbar-open-right"> | ||
148 | + <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown-"> | ||
149 | + <i class="icon-bar-chart"></i> | ||
150 | + <span>{{ "Estatísticas"|trans }}</span> | ||
151 | + <span class="icon"> </span> | ||
152 | + </a> | ||
153 | + <ul> | ||
154 | + <li><a href="javascript:void(0)">{{ "Sistemas Monitorados"|trans }}</a></li> | ||
155 | + </ul> | ||
156 | + </li> --> | ||
157 | + | ||
158 | + <li> | ||
159 | + <a href="{{ path('cacic_downloads') }}" title="{{ "Baixar Agentes"|trans }}"> | ||
160 | + <i class="icon-download-alt"></i> | ||
161 | + <span>{{ "Downloads"|trans }}</span> | ||
162 | + </a> | ||
163 | + </li> | ||
164 | + | ||
165 | + <!-- <li> | ||
166 | + <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"> | ||
167 | + <i class="icon-info-sign"></i> | ||
168 | + <span>{{ "Projeto CACIC"|trans }}</span> | ||
169 | + </a> | ||
170 | + </li> --> | ||
171 | + | ||
172 | + <li> | ||
173 | + <a href="http://www.softwarepublico.gov.br/ver-comunidade?community_id=3585" target="_blank"> | ||
174 | + <i class="icon-group"></i> | ||
175 | + <span>{{ "Comunidade CACIC"|trans }}</span> | ||
176 | + </a> | ||
177 | + </li> | ||
178 | + </ul> | ||
179 | + <!-- <a href="#" class="minimize round_bottom"><span>minimize</span></a> --> | ||
180 | +{% endblock %} |
@@ -0,0 +1,32 @@ | @@ -0,0 +1,32 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | +namespace Cacic\CommonBundle\Twig; | ||
4 | + | ||
5 | +use Symfony\Component\DependencyInjection\ContainerInterface; | ||
6 | + | ||
7 | +class BundlesExtension extends \Twig_Extension { | ||
8 | + protected $container; | ||
9 | + | ||
10 | + public function __construct(ContainerInterface $container) { | ||
11 | + $this->container = $container; | ||
12 | + } | ||
13 | + | ||
14 | + public function getFunctions() | ||
15 | + { | ||
16 | + return array( | ||
17 | + new \Twig_SimpleFunction('bundleExists', array($this, 'bundleExists')), | ||
18 | + | ||
19 | + ); | ||
20 | + } | ||
21 | + | ||
22 | + | ||
23 | + public function bundleExists($bundle){ | ||
24 | + if (array_key_exists($bundle, $this->container->getParameter('kernel.bundles'))) { | ||
25 | + return true; | ||
26 | + } | ||
27 | + return false; | ||
28 | + } | ||
29 | + public function getName() { | ||
30 | + return 'cacic_bundles'; | ||
31 | + } | ||
32 | +} |
src/Cacic/RelatorioBundle/Controller/DefaultController.php
@@ -5,6 +5,7 @@ namespace Cacic\RelatorioBundle\Controller; | @@ -5,6 +5,7 @@ namespace Cacic\RelatorioBundle\Controller; | ||
5 | use Doctrine\Common\Util\Debug; | 5 | use Doctrine\Common\Util\Debug; |
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Cacic\RelatorioBundle\Form\Type\CompartilhamentosType; | 7 | use Cacic\RelatorioBundle\Form\Type\CompartilhamentosType; |
8 | +use Cacic\RelatorioBundle\Form\Type\PatrimonioType; | ||
8 | use Symfony\Component\HttpFoundation\Request; | 9 | use Symfony\Component\HttpFoundation\Request; |
9 | 10 | ||
10 | class DefaultController extends Controller | 11 | class DefaultController extends Controller |
@@ -27,39 +28,47 @@ class DefaultController extends Controller | @@ -27,39 +28,47 @@ class DefaultController extends Controller | ||
27 | */ | 28 | */ |
28 | public function patrimonioAction() | 29 | public function patrimonioAction() |
29 | { | 30 | { |
30 | - $locais = $this->getDoctrine()->getRepository('CacicCommonBundle:Local')->listar(); | ||
31 | - $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->listar(); | 31 | + $locais = $this->getDoctrine()->getRepository('CacicCommonBundle:Local')->listar(); |
32 | + $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->listar(); | ||
32 | $sw = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->listar(); | 33 | $sw = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->listar(); |
33 | - | ||
34 | - return $this->render( | ||
35 | - 'CacicRelatorioBundle:Default:patrimonio.html.twig', | ||
36 | - array( | 34 | + $uorg = $this->getDoctrine()->getRepository('CacicCommonBundle:Uorg')->listar(); |
35 | + $conf = $this->getDoctrine()->getRepository('CacicCommonBundle:ComputadorColeta')->listarPropriedades('Patrimonio'); | ||
36 | + | ||
37 | + | ||
38 | + return $this->render( | ||
39 | + 'CacicRelatorioBundle:Default:patrimonio.html.twig', | ||
40 | + array( | ||
37 | 'sw' => $sw, | 41 | 'sw' => $sw, |
38 | - 'locais' => $locais, | ||
39 | - 'so' => $so | ||
40 | - ) | 42 | + 'locais' => $locais, |
43 | + 'so' => $so, | ||
44 | + 'conf' => $conf, | ||
45 | + 'uorg' => $uorg | ||
46 | + ) | ||
41 | ); | 47 | ); |
42 | - } | ||
43 | - | 48 | + } |
44 | /** | 49 | /** |
45 | * [RELATÓRIO] Relatório de Patrimônio gerado à partir dos filtros informados | 50 | * [RELATÓRIO] Relatório de Patrimônio gerado à partir dos filtros informados |
46 | */ | 51 | */ |
47 | public function patrimonioRelatorioAction( Request $request ) | 52 | public function patrimonioRelatorioAction( Request $request ) |
48 | { | 53 | { |
49 | - $filtros = $request->get('rel_filtro_hardware'); | ||
50 | - | 54 | + $filtros = $request->get('rel_filtro_patrimonio'); |
55 | + $locale = $request->getLocale(); | ||
51 | $dados = $this->getDoctrine() | 56 | $dados = $this->getDoctrine() |
52 | ->getRepository('CacicCommonBundle:Software') | 57 | ->getRepository('CacicCommonBundle:Software') |
53 | ->gerarRelatorioPatrimonio( $filtros ); | 58 | ->gerarRelatorioPatrimonio( $filtros ); |
54 | - $locale = $request->getLocale(); | 59 | + |
60 | + | ||
61 | + | ||
55 | 62 | ||
56 | return $this->render( | 63 | return $this->render( |
57 | 'CacicRelatorioBundle:Default:rel_patrimonio.html.twig', | 64 | 'CacicRelatorioBundle:Default:rel_patrimonio.html.twig', |
58 | array( | 65 | array( |
59 | 'idioma'=>$locale, | 66 | 'idioma'=>$locale, |
60 | 'dados' => $dados, | 67 | 'dados' => $dados, |
68 | + 'menu' => (bool) strlen( $filtros['pci']), | ||
61 | 'exibirColunaSoftware' => (bool) strlen( $filtros['softwares'] | 69 | 'exibirColunaSoftware' => (bool) strlen( $filtros['softwares'] |
62 | - ) | 70 | + |
71 | + ) | ||
63 | ) | 72 | ) |
64 | ); | 73 | ); |
65 | } | 74 | } |
src/Cacic/RelatorioBundle/Controller/FaturamentoController.php
0 → 100755
@@ -0,0 +1,124 @@ | @@ -0,0 +1,124 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | + namespace Cacic\RelatorioBundle\Controller; | ||
4 | + | ||
5 | + use Cacic\CommonBundle\Entity\ComputadorColetaRepository; | ||
6 | + use Doctrine\Common\Util\Debug; | ||
7 | + use Symfony\Component\HttpFoundation\Request; | ||
8 | + use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
9 | + use Cacic\CommonBundle\Form\Type\LogPesquisaType; | ||
10 | + | ||
11 | + | ||
12 | + class FaturamentoController extends Controller { | ||
13 | + | ||
14 | + | ||
15 | + public function indexAction(Request $request) { | ||
16 | + | ||
17 | + $locale = $request->getLocale(); | ||
18 | + | ||
19 | + $form = $this->createForm( new LogPesquisaType() ); | ||
20 | + | ||
21 | + | ||
22 | + if ( $request->isMethod('POST') ) | ||
23 | + { | ||
24 | + $form->bind( $request ); | ||
25 | + $data = $form->getData(); | ||
26 | + $filtroLocais = array(); // Inicializa array com locais a pesquisar | ||
27 | + foreach ( $data['idLocal'] as $locais ) { | ||
28 | + array_push( $filtroLocais, $locais->getIdLocal() ); | ||
29 | + } | ||
30 | + | ||
31 | + | ||
32 | + $logs = $this->getDoctrine()->getRepository( 'CacicCommonBundle:LogAcesso') | ||
33 | + ->pesquisar( $data['dtAcaoInicio'], $data['dtAcaoFim'], $filtroLocais); | ||
34 | + | ||
35 | + } | ||
36 | + | ||
37 | + return $this->render( 'CacicRelatorioBundle:Faturamento:index.html.twig', | ||
38 | + array( | ||
39 | + 'locale'=> $locale, | ||
40 | + 'form' => $form->createView(), | ||
41 | + 'data' =>$data, | ||
42 | + 'logs' => ( isset( $logs ) ? $logs : null ) | ||
43 | + ) | ||
44 | + ); | ||
45 | + } | ||
46 | + | ||
47 | + public function listarAction( Request $request, $idRede) { | ||
48 | + | ||
49 | + | ||
50 | + $dataInicio = $request->get('dtAcaoInicio'); | ||
51 | + $dataFim = $request->get('dtAcaoFim'); | ||
52 | + | ||
53 | + | ||
54 | + $locale = $request->getLocale(); | ||
55 | + $dados = $this->getDoctrine() | ||
56 | + ->getRepository('CacicCommonBundle:LogAcesso') | ||
57 | + ->gerarRelatorioRede($filtros = array(),$idRede, $dataInicio, $dataFim); | ||
58 | + | ||
59 | + return $this->render( | ||
60 | + 'CacicRelatorioBundle:Faturamento:listar.html.twig', | ||
61 | + array( | ||
62 | + 'rede'=> $dados[0]['nmRede'], | ||
63 | + 'idioma'=> $locale, | ||
64 | + 'dados' => $dados | ||
65 | + ) | ||
66 | + ); | ||
67 | + } | ||
68 | + | ||
69 | + public function inativosAction(Request $request) { | ||
70 | + | ||
71 | + $locale = $request->getLocale(); | ||
72 | + | ||
73 | + $form = $this->createForm( new LogPesquisaType() ); | ||
74 | + | ||
75 | + | ||
76 | + if ( $request->isMethod('POST') ) | ||
77 | + { | ||
78 | + $form->bind( $request ); | ||
79 | + $data = $form->getData(); | ||
80 | + $filtroLocais = array(); // Inicializa array com locais a pesquisar | ||
81 | + foreach ( $data['idLocal'] as $locais ) { | ||
82 | + array_push( $filtroLocais, $locais->getIdLocal() ); | ||
83 | + } | ||
84 | + | ||
85 | + | ||
86 | + $logs = $this->getDoctrine()->getRepository( 'CacicCommonBundle:Computador') | ||
87 | + ->pesquisarInativos( $data['dtAcaoInicio'], $data['dtAcaoFim'], $filtroLocais); | ||
88 | + | ||
89 | + } | ||
90 | + | ||
91 | + return $this->render( 'CacicRelatorioBundle:Faturamento:inativos.html.twig', | ||
92 | + array( | ||
93 | + 'locale'=> $locale, | ||
94 | + 'form' => $form->createView(), | ||
95 | + 'data' =>$data, | ||
96 | + 'logs' => ( isset( $logs ) ? $logs : null ) | ||
97 | + ) | ||
98 | + ); | ||
99 | + } | ||
100 | + | ||
101 | + public function listarInativosAction( Request $request, $idRede) { | ||
102 | + | ||
103 | + | ||
104 | + $dataInicio = $request->get('dtAcaoInicio'); | ||
105 | + $dataFim = $request->get('dtAcaoFim'); | ||
106 | + | ||
107 | + | ||
108 | + $locale = $request->getLocale(); | ||
109 | + $dados = $this->getDoctrine() | ||
110 | + ->getRepository('CacicCommonBundle:Computador') | ||
111 | + ->gerarRelatorioRede($filtros = array(),$idRede, $dataInicio, $dataFim); | ||
112 | + | ||
113 | + return $this->render( | ||
114 | + 'CacicRelatorioBundle:Faturamento:listarInativos.html.twig', | ||
115 | + array( | ||
116 | + 'rede'=> $dados[0]['nmRede'], | ||
117 | + 'idioma'=> $locale, | ||
118 | + 'dados' => $dados | ||
119 | + ) | ||
120 | + ); | ||
121 | + } | ||
122 | + | ||
123 | + | ||
124 | + } |
src/Cacic/RelatorioBundle/Controller/HardwareController.php
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | 2 | ||
3 | namespace Cacic\RelatorioBundle\Controller; | 3 | namespace Cacic\RelatorioBundle\Controller; |
4 | 4 | ||
5 | +use Doctrine\Common\Util\Debug; | ||
5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
6 | use Symfony\Component\HttpFoundation\Request; | 7 | use Symfony\Component\HttpFoundation\Request; |
7 | 8 | ||
@@ -18,7 +19,6 @@ class HardwareController extends Controller | @@ -18,7 +19,6 @@ class HardwareController extends Controller | ||
18 | $locais = $this->getDoctrine()->getRepository('CacicCommonBundle:Local')->listar(); | 19 | $locais = $this->getDoctrine()->getRepository('CacicCommonBundle:Local')->listar(); |
19 | $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->listar(); | 20 | $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->listar(); |
20 | 21 | ||
21 | - | ||
22 | return $this->render( | 22 | return $this->render( |
23 | 'CacicRelatorioBundle:Hardware:configuracoes_filtro.html.twig', | 23 | 'CacicRelatorioBundle:Hardware:configuracoes_filtro.html.twig', |
24 | array( | 24 | array( |
src/Cacic/RelatorioBundle/Controller/SoftwareController.php
@@ -19,7 +19,7 @@ class SoftwareController extends Controller | @@ -19,7 +19,7 @@ class SoftwareController extends Controller | ||
19 | $locais = $this->getDoctrine()->getRepository('CacicCommonBundle:Local')->listar(); | 19 | $locais = $this->getDoctrine()->getRepository('CacicCommonBundle:Local')->listar(); |
20 | $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->listar(); | 20 | $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->listar(); |
21 | $redes = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->listar(); | 21 | $redes = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->listar(); |
22 | - $sw = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->listar(); | 22 | + $sw = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->listarSoftware(); |
23 | 23 | ||
24 | return $this->render( | 24 | return $this->render( |
25 | 'CacicRelatorioBundle:Software:inventariados_filtro.html.twig', | 25 | 'CacicRelatorioBundle:Software:inventariados_filtro.html.twig', |
@@ -71,7 +71,7 @@ class SoftwareController extends Controller | @@ -71,7 +71,7 @@ class SoftwareController extends Controller | ||
71 | */ | 71 | */ |
72 | public function licenciadosAction() | 72 | public function licenciadosAction() |
73 | { | 73 | { |
74 | - $sw = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->listar(); | 74 | + $sw = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->listarSoftware(); |
75 | 75 | ||
76 | return $this->render( | 76 | return $this->render( |
77 | 'CacicRelatorioBundle:Software:licenciados_filtro.html.twig', | 77 | 'CacicRelatorioBundle:Software:licenciados_filtro.html.twig', |
@@ -239,18 +239,18 @@ class SoftwareController extends Controller | @@ -239,18 +239,18 @@ class SoftwareController extends Controller | ||
239 | * @param software O Nome do software a ser listado | 239 | * @param software O Nome do software a ser listado |
240 | */ | 240 | */ |
241 | 241 | ||
242 | - public function listaAction(Request $request, $software) { | 242 | + public function listaAction(Request $request, $nmSoftware, $nmLocal) { |
243 | $locale = $request->getLocale(); | 243 | $locale = $request->getLocale(); |
244 | 244 | ||
245 | $dados = $this->getDoctrine() | 245 | $dados = $this->getDoctrine() |
246 | ->getRepository('CacicCommonBundle:ComputadorColeta') | 246 | ->getRepository('CacicCommonBundle:ComputadorColeta') |
247 | - ->gerarRelatorioSoftware($filtros = array(), $software); | 247 | + ->gerarRelatorioSoftware($filtros = array(), $nmSoftware, $nmLocal); |
248 | 248 | ||
249 | return $this->render( | 249 | return $this->render( |
250 | 'CacicRelatorioBundle:Software:rel_software_lista.html.twig', | 250 | 'CacicRelatorioBundle:Software:rel_software_lista.html.twig', |
251 | array( | 251 | array( |
252 | 'idioma'=> $locale, | 252 | 'idioma'=> $locale, |
253 | - 'software' => $software, | 253 | + 'software' => $nmSoftware, |
254 | 'dados' => $dados | 254 | 'dados' => $dados |
255 | ) | 255 | ) |
256 | ); | 256 | ); |
@@ -0,0 +1,41 @@ | @@ -0,0 +1,41 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | +namespace Cacic\RelatorioBundle\Form\Type; | ||
4 | + | ||
5 | +use Symfony\Component\Form\AbstractType; | ||
6 | +use Symfony\Component\Form\FormBuilderInterface; | ||
7 | + | ||
8 | +/** | ||
9 | + * | ||
10 | + * @author lightbase | ||
11 | + * | ||
12 | + */ | ||
13 | +class PatrimonioType extends AbstractType | ||
14 | +{ | ||
15 | + | ||
16 | + public function buildForm( FormBuilderInterface $builder, array $options ) | ||
17 | + { | ||
18 | + $builder->add( | ||
19 | + 'idLocal', | ||
20 | + 'entity', | ||
21 | + array( | ||
22 | + 'class' => 'CacicCommonBundle:Local', | ||
23 | + 'property' => 'nmLocal', | ||
24 | + 'multiple' => true, | ||
25 | + 'required' => true, | ||
26 | + 'expanded' => true, | ||
27 | + 'label'=> 'Selecione o Local:' | ||
28 | + ) | ||
29 | + ); | ||
30 | + } | ||
31 | + | ||
32 | + /** | ||
33 | + * (non-PHPdoc) | ||
34 | + * @see Symfony\Component\Form.FormTypeInterface::getName() | ||
35 | + */ | ||
36 | + public function getName() | ||
37 | + { | ||
38 | + return 'rel_patrimonio'; | ||
39 | + } | ||
40 | + | ||
41 | +} | ||
0 | \ No newline at end of file | 42 | \ No newline at end of file |
src/Cacic/RelatorioBundle/Resources/config/routing.yml
@@ -2,9 +2,15 @@ cacic_relatorio_autorizacoes: | @@ -2,9 +2,15 @@ cacic_relatorio_autorizacoes: | ||
2 | pattern: /autorizacoes | 2 | pattern: /autorizacoes |
3 | defaults: { _controller: CacicRelatorioBundle:Default:autorizacoes } | 3 | defaults: { _controller: CacicRelatorioBundle:Default:autorizacoes } |
4 | 4 | ||
5 | -cacic_relatorio_tcpIp: | ||
6 | - pattern: /tcpip | ||
7 | - defaults: { _controller: CacicRelatorioBundle:Default:tcpIp } | 5 | +cacic_relatorio_faturamento: |
6 | + pattern: /faturamento | ||
7 | + defaults: { _controller: CacicRelatorioBundle:Faturamento:index } | ||
8 | + | ||
9 | +cacic_relatorio_faturamento_listar: | ||
10 | + pattern: /software/faturamento/{idRede}/{dtAcaoInicio}/{dtAcaoFim} | ||
11 | + defaults: { _controller: CacicRelatorioBundle:Faturamento:listar, idRede: null, dtAcaoInicio: null, dtAcaoFim: null } | ||
12 | + requirements: | ||
13 | + idRede: \d+ | ||
8 | 14 | ||
9 | cacic_relatorio_patrimonio: | 15 | cacic_relatorio_patrimonio: |
10 | pattern: /patrimonio | 16 | pattern: /patrimonio |
@@ -105,9 +111,20 @@ cacic_relatorio_hardware_wmi_rel: | @@ -105,9 +111,20 @@ cacic_relatorio_hardware_wmi_rel: | ||
105 | _method: POST | 111 | _method: POST |
106 | 112 | ||
107 | cacic_relatorio_software_lista: | 113 | cacic_relatorio_software_lista: |
108 | - pattern: /software/inventariados/{software} | ||
109 | - defaults: { _controller: CacicRelatorioBundle:Software:lista } | 114 | + pattern: /software/inventariados/{nmSoftware}/{nmLocal} |
115 | + defaults: { _controller: CacicRelatorioBundle:Software:lista, nmSoftware:null, nmLocal:null } | ||
110 | 116 | ||
111 | cacic_relatorio_hardware_wmi_detalhe: | 117 | cacic_relatorio_hardware_wmi_detalhe: |
112 | pattern: /hardware/{classe}/{propriedade} | 118 | pattern: /hardware/{classe}/{propriedade} |
113 | - defaults: { _controller: CacicRelatorioBundle:Hardware:wmiRelatorioDetalhe } | ||
114 | \ No newline at end of file | 119 | \ No newline at end of file |
120 | + defaults: { _controller: CacicRelatorioBundle:Hardware:wmiRelatorioDetalhe } | ||
121 | + | ||
122 | +cacic_relatorio_inativos: | ||
123 | + pattern: /inativos | ||
124 | + defaults: { _controller: CacicRelatorioBundle:Faturamento:inativos } | ||
125 | + | ||
126 | +cacic_relatorio_inativos_listar: | ||
127 | + pattern: /inativos/{idRede}/{dtAcaoInicio}/{dtAcaoFim} | ||
128 | + defaults: { _controller: CacicRelatorioBundle:Faturamento:listarInativos, idRede: null, dtAcaoInicio: null, dtAcaoFim: null } | ||
129 | + requirements: | ||
130 | + idRede: \d+ | ||
131 | + |
src/Cacic/RelatorioBundle/Resources/views/Default/autorizacoes.html.twig
src/Cacic/RelatorioBundle/Resources/views/Default/patrimonio.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li class="active">{{ "Relatório de Informações Patrimoniais"|trans }}</li> | 4 | <li class="active">{{ "Relatório de Informações Patrimoniais"|trans }}</li> |
@@ -17,6 +17,8 @@ | @@ -17,6 +17,8 @@ | ||
17 | var tSW = $('#transferSW').bootstrapTransfer({'target_id':'tSw'}); | 17 | var tSW = $('#transferSW').bootstrapTransfer({'target_id':'tSw'}); |
18 | var tLoc = $('#transferLocais').bootstrapTransfer({'target_id':'tLoc'}); | 18 | var tLoc = $('#transferLocais').bootstrapTransfer({'target_id':'tLoc'}); |
19 | var tSO = $('#transferSO').bootstrapTransfer({'target_id':'tSo'}); | 19 | var tSO = $('#transferSO').bootstrapTransfer({'target_id':'tSo'}); |
20 | + var tConf = $('#transferConf').bootstrapTransfer({'target_id':'tConf'}); | ||
21 | + var tUorg = $('#transferUorg').bootstrapTransfer({'target_id':'tUorg'}); | ||
20 | 22 | ||
21 | tSW.populate([ // Popula o TRANSFER com Softwares | 23 | tSW.populate([ // Popula o TRANSFER com Softwares |
22 | {% for sw in sw %} | 24 | {% for sw in sw %} |
@@ -39,13 +41,30 @@ | @@ -39,13 +41,30 @@ | ||
39 | {% endfor %} | 41 | {% endfor %} |
40 | ]); | 42 | ]); |
41 | 43 | ||
44 | + tUorg.populate([ // Popula o TRANSFER com Uorg | ||
45 | + {% for uorg in uorg %} | ||
46 | + {value: "{{ uorg['idUorg'] }}", content:"{{ uorg['nmUorg'] }}"}{% if loop.last != true %},{% endif %} | ||
47 | + | ||
48 | + {% endfor %} | ||
49 | + ]); | ||
50 | + | ||
51 | + | ||
52 | + tConf.populate([ // Popula o TRANSFER com as Classes de Coleta | ||
53 | + {% for c in conf %} | ||
54 | + {value: "{{ c.idClassProperty }}", content: "{{ c.nmPropertyName|e('js') }}" }{% if loop.last != true %},{% endif %} | ||
55 | + | ||
56 | + {% endfor %} | ||
57 | + ]); | ||
58 | + | ||
42 | var transferToHidden = { | 59 | var transferToHidden = { |
43 | - 'form' : $('#frmFiltroRelatorioHWConfiguracoes'), | ||
44 | - 'fieldsPrefix' : 'rel_filtro_hardware', | 60 | + 'form' : $('#frmFiltroRelatorioPatrimonio'), |
61 | + 'fieldsPrefix' : 'rel_filtro_patrimonio', | ||
45 | 'elms' : [ | 62 | 'elms' : [ |
46 | { 'transferElement' : tSW , 'inputHiddenName' : 'softwares' }, | 63 | { 'transferElement' : tSW , 'inputHiddenName' : 'softwares' }, |
47 | { 'transferElement' : tLoc , 'inputHiddenName' : 'locais' }, | 64 | { 'transferElement' : tLoc , 'inputHiddenName' : 'locais' }, |
48 | - { 'transferElement' : tSO , 'inputHiddenName' : 'so' } | 65 | + { 'transferElement' : tSO , 'inputHiddenName' : 'so' }, |
66 | + { 'transferElement' : tUorg , 'inputHiddenName' : 'uorg' }, | ||
67 | + { 'transferElement' : tConf , 'inputHiddenName' : 'conf' } | ||
49 | ] | 68 | ] |
50 | }; | 69 | }; |
51 | 70 | ||
@@ -53,8 +72,9 @@ | @@ -53,8 +72,9 @@ | ||
53 | 72 | ||
54 | // Ativa o tratamento dos dados dos transfers a partir da submissão do formulário | 73 | // Ativa o tratamento dos dados dos transfers a partir da submissão do formulário |
55 | System.Form.bootStrapTransfer.handle( transferToHidden ); | 74 | System.Form.bootStrapTransfer.handle( transferToHidden ); |
56 | - | 75 | + |
57 | }); | 76 | }); |
77 | + | ||
58 | </script> | 78 | </script> |
59 | {% endblock %} | 79 | {% endblock %} |
60 | 80 | ||
@@ -73,10 +93,13 @@ | @@ -73,10 +93,13 @@ | ||
73 | </p> | 93 | </p> |
74 | <hr /> | 94 | <hr /> |
75 | 95 | ||
76 | - <form method="post" id="frmFiltroRelatorioHWConfiguracoes" class="form-horizontal" target="_blank"> | ||
77 | - | ||
78 | - <h4>{{ 'Selecione as informações que deseja exibir'|trans }}</h4> | ||
79 | - <div id="transferConf"></div> | 96 | + <form method="post" id={{ 'frmFiltroRelatorioPatrimonio'| trans }} class="form-horizontal" target="_blank"> |
97 | + | ||
98 | + <h4>{{ 'Selecione as informações que deseja exibir'|trans }}</h4> | ||
99 | + <div id="transferUorg"></div> | ||
100 | + | ||
101 | + <h4>{{ 'Selecione as informações que deseja exibir'|trans }}</h4> | ||
102 | + <div id="transferConf"></div> | ||
80 | 103 | ||
81 | <h4>{{ 'Selecione os Softwares que deseja exibir'|trans }}</h4> | 104 | <h4>{{ 'Selecione os Softwares que deseja exibir'|trans }}</h4> |
82 | <div id="transferSW"></div> | 105 | <div id="transferSW"></div> |
src/Cacic/RelatorioBundle/Resources/views/Default/rel_patrimonio.html.twig
@@ -15,8 +15,10 @@ | @@ -15,8 +15,10 @@ | ||
15 | <th width="20%">{{ "I.P"|trans }}</th> | 15 | <th width="20%">{{ "I.P"|trans }}</th> |
16 | <th width="20%">{{ "Local"|trans }}</th> | 16 | <th width="20%">{{ "Local"|trans }}</th> |
17 | {% if ( exibirColunaSoftware ) %} | 17 | {% if ( exibirColunaSoftware ) %} |
18 | - <th width="20%">{{ "Software"|trans }}</th> | 18 | + <th width="20%">{{ "Software"|trans }}</th> |
19 | {% endif %} | 19 | {% endif %} |
20 | + | ||
21 | + | ||
20 | </tr> | 22 | </tr> |
21 | </thead> | 23 | </thead> |
22 | 24 | ||
@@ -25,13 +27,21 @@ | @@ -25,13 +27,21 @@ | ||
25 | {% for reg in dados %} | 27 | {% for reg in dados %} |
26 | 28 | ||
27 | <tr> | 29 | <tr> |
28 | - <td>{{ reg['nmComputador'] }}</td> | ||
29 | - <td>{{ reg['teSo'] }}</td> | ||
30 | - <td>{{ reg["teIpRede"] }}</td> | 30 | + <td><b> |
31 | + <a href="{{ path("cacic_computador_detalhar") }}/{{ reg['idComputador'] }}" target="_blank"> | ||
32 | + {{ reg['nmComputador'] }} | ||
33 | + </a></b> | ||
34 | + </td> | ||
35 | + <td><span class="{% if reg['inMswindows'] == 'S' %}red{% else %}blue{% endif %}">{{ reg['sgSo'] }}</span></td> | ||
36 | + <td><a href="{{ path("cacic_computador_detalhar") }}/{{ reg['idComputador'] }}" target="_blank"> | ||
37 | + {{ reg["teIpRede"] }} | ||
38 | + </a></td> | ||
31 | <td>{{ reg['nmLocal'] }}</td> | 39 | <td>{{ reg['nmLocal'] }}</td> |
32 | {% if ( exibirColunaSoftware ) %} | 40 | {% if ( exibirColunaSoftware ) %} |
33 | <td>{{ reg['nmSoftware'] }}</td> | 41 | <td>{{ reg['nmSoftware'] }}</td> |
34 | {% endif %} | 42 | {% endif %} |
43 | + | ||
44 | + | ||
35 | </tr> | 45 | </tr> |
36 | 46 | ||
37 | {% else %} | 47 | {% else %} |
src/Cacic/RelatorioBundle/Resources/views/Faturamento/acessoResultado.html.twig
0 → 100755
@@ -0,0 +1,58 @@ | @@ -0,0 +1,58 @@ | ||
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 do Faturamento' |trans }}</h2> | ||
5 | + <div class="block box_content round_bottom padding_10"> | ||
6 | + | ||
7 | + | ||
8 | + <form id="faturamento" class="form-horizontal" method="post" > | ||
9 | + | ||
10 | + <table class="table table-striped table-bordered"> | ||
11 | + <thead> | ||
12 | + <tr> | ||
13 | + <th width="10%" style="text-align: center"></th> | ||
14 | + <th width="20%">{{ "Local"|trans }}</th> | ||
15 | + <th width="30%" style="text-align: center">{{ "Rede"|trans }}</th> | ||
16 | + <th width="20%" style="text-align: center">{{ "Endereço IP"|trans }}</th> | ||
17 | + <th width="20%" style="text-align: center">{{ "Estações"|trans }}</th> | ||
18 | + <th style="text-align: center"> | ||
19 | + | ||
20 | + </th> | ||
21 | + </tr> | ||
22 | + </thead> | ||
23 | + | ||
24 | + <tbody> | ||
25 | + {% for log in logs %} | ||
26 | + | ||
27 | + <tr> | ||
28 | + <td style="text-align: center">{{ loop.index }}</td> | ||
29 | + <td> | ||
30 | + <b><a href="{{ path('cacic_relatorio_faturamento_listar') }}/{{ log['idRede'] }}/{{data['dtAcaoInicio'] }}/{{ data['dtAcaoFim'] }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank"> | ||
31 | + {{ log['nmLocal'] }}</a></b> | ||
32 | + </td> | ||
33 | + <td>{{ log['nmRede'] }}</td> | ||
34 | + <td>{{ log['teIpRede'] }}</td> | ||
35 | + <td>{{ log['numComp'] }}</td> | ||
36 | + <td> | ||
37 | + <a class="btn" href="{{ path('cacic_relatorio_faturamento_listar') }}/{{log['idRede'] }}/{{data['dtAcaoInicio'] }}/{{ data['dtAcaoFim'] }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank"> | ||
38 | + <i class="icon-search"></i> | ||
39 | + </a> | ||
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 | + | ||
53 | + </form> | ||
54 | + | ||
55 | + </div> <!-- /block --> | ||
56 | + </div> <!-- /box --> | ||
57 | + </div> <!-- /span --> | ||
58 | +</div> <!-- /row --> | ||
0 | \ No newline at end of file | 59 | \ No newline at end of file |
src/Cacic/RelatorioBundle/Resources/views/Faturamento/inativos.html.twig
0 → 100755
@@ -0,0 +1,122 @@ | @@ -0,0 +1,122 @@ | ||
1 | +{% extends 'CacicCommonBundle::base.html.twig' %} | ||
2 | + | ||
3 | +{% block breadcrumb %} | ||
4 | + <li class="active">{{ 'Inativos'|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> {{'Computadores Inativos' |trans }}</h2> | ||
15 | + | ||
16 | + <div class="block box_content round_bottom padding_10"> | ||
17 | + | ||
18 | + <h4>{{ "Período para verificação de computadores inativos"|trans }}</h4><br /> | ||
19 | + | ||
20 | + <form id={{ 'formFaturamento'|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 faturar."|trans }}</p> | ||
27 | + </div> | ||
28 | + </div> | ||
29 | + | ||
30 | + <div class="control-group _cad_block_opcao"> | ||
31 | + | ||
32 | + <div class="controls"> | ||
33 | + | ||
34 | + <label ><b>{{ 'Local:'|trans }}</b></label> | ||
35 | + <div style="height: 200px; overflow: auto;"> | ||
36 | + | ||
37 | + <div class="modulo-opt-block"> | ||
38 | + {{ form_widget(form.idLocal, {'form_type': 'horizontal'}) }} | ||
39 | + </div> | ||
40 | + </div> | ||
41 | + </div> | ||
42 | + | ||
43 | + </div> | ||
44 | + | ||
45 | + <div class="control-group"> | ||
46 | + <div class="controls"> | ||
47 | + <button type="reset" class="btn"> | ||
48 | + <i class="icon-refresh"></i> | ||
49 | + {{ "Resetar Valores"|trans }} | ||
50 | + </button> | ||
51 | + <button type="submit" class="btn btn-primary"> | ||
52 | + <i class="icon-search"></i> | ||
53 | + {{ 'Gerar relatório'|trans }} | ||
54 | + </button> | ||
55 | + </div> | ||
56 | + </div> | ||
57 | + | ||
58 | + </form> | ||
59 | + </div> <!-- /block --> | ||
60 | + </div> <!-- /box --> | ||
61 | + </div> <!-- /span8 --> | ||
62 | + | ||
63 | + <div class="span4"> | ||
64 | + <div class="box grad_colour_black"> | ||
65 | + | ||
66 | + <h2 class="box_head round_top"><i class="icon-info-sign"></i> {{ "Informações Adicionais"|trans }}</h2> | ||
67 | + | ||
68 | + <div class="block box_content round_bottom padding_10"> | ||
69 | + <p> | ||
70 | + {{ "Faturamento"|trans }}. | ||
71 | + </p> | ||
72 | + <p> | ||
73 | + {{ "O período é obrigatório"|trans }}. | ||
74 | + </p> | ||
75 | + <p> | ||
76 | + {{ "Não selecionar nenhum valor em determinado critério é o mesmo que selecionar todos"|trans }}. | ||
77 | + </p> | ||
78 | + </div> <!-- /block --> | ||
79 | + </div> <!-- /box --> | ||
80 | + </div> <!-- span4 --> | ||
81 | + | ||
82 | + </div> <!-- /row --> | ||
83 | + | ||
84 | + {% if logs is not null %} | ||
85 | + {% include 'CacicRelatorioBundle:Faturamento:inativosResultado.html.twig' %} | ||
86 | + | ||
87 | + {% endif %} | ||
88 | + | ||
89 | +{% endblock %} | ||
90 | + | ||
91 | +{% block javascripts %} | ||
92 | + | ||
93 | + <script type="text/javascript"> | ||
94 | + function mostraDetalhes(elm) { | ||
95 | + var detalhes = document.getElementById('_detalhes'); | ||
96 | + if (elm.checked == false) { | ||
97 | + detalhes.style = ''; | ||
98 | + } else { | ||
99 | + detalhes.style = 'display: none;'; | ||
100 | + } | ||
101 | + } | ||
102 | + </script> | ||
103 | + | ||
104 | + {{ parent() }} | ||
105 | + {% if locale == 'pt_BR' %} | ||
106 | + <script src="{{ asset('bundles/caciccommon/js/jquery.ui.datepicker-pt-BR.js') }}"></script> | ||
107 | + | ||
108 | + <script type="text/javascript"> | ||
109 | + | ||
110 | + $(".datepicker_on").datepicker({ altFormat: "dd/mm/yy" }).mask('99/99/9999'); | ||
111 | + | ||
112 | + </script> | ||
113 | + {% else %} | ||
114 | + <script src="{{ asset('bundles/caciccommon/js/jquery.ui.datepicker-en-US.js') }}"></script> | ||
115 | + | ||
116 | + <script type="text/javascript"> | ||
117 | + | ||
118 | + $(".datepicker_on").datepicker({ altFormat: "mm/dd/yy" }).mask('99/99/9999'); | ||
119 | + | ||
120 | + </script> | ||
121 | + {% endif %} | ||
122 | +{% endblock %} |
src/Cacic/RelatorioBundle/Resources/views/Faturamento/inativosResultado.html.twig
0 → 100755
@@ -0,0 +1,58 @@ | @@ -0,0 +1,58 @@ | ||
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> {{'Total de estações inativas' |trans }}</h2> | ||
5 | + <div class="block box_content round_bottom padding_10"> | ||
6 | + | ||
7 | + | ||
8 | + <form id="faturamento" class="form-horizontal" method="post" > | ||
9 | + | ||
10 | + <table class="table table-striped table-bordered"> | ||
11 | + <thead> | ||
12 | + <tr> | ||
13 | + <th width="10%" style="text-align: center"></th> | ||
14 | + <th width="20%">{{ "Local"|trans }}</th> | ||
15 | + <th width="30%" style="text-align: center">{{ "Rede"|trans }}</th> | ||
16 | + <th width="20%" style="text-align: center">{{ "Endereço IP"|trans }}</th> | ||
17 | + <th width="20%" style="text-align: center">{{ "Estações"|trans }}</th> | ||
18 | + <th style="text-align: center"> | ||
19 | + | ||
20 | + </th> | ||
21 | + </tr> | ||
22 | + </thead> | ||
23 | + | ||
24 | + <tbody> | ||
25 | + {% for log in logs %} | ||
26 | + | ||
27 | + <tr> | ||
28 | + <td style="text-align: center">{{ loop.index }}</td> | ||
29 | + <td> | ||
30 | + <b><a href="{{ path('cacic_relatorio_inativos_listar') }}/{{ log['idRede'] }}/{{data['dtAcaoInicio'] }}/{{ data['dtAcaoFim'] }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank"> | ||
31 | + {{ log['nmLocal'] }}</a></b> | ||
32 | + </td> | ||
33 | + <td>{{ log['nmRede'] }}</td> | ||
34 | + <td>{{ log['teIpRede'] }}</td> | ||
35 | + <td>{{ log['numComp'] }}</td> | ||
36 | + <td> | ||
37 | + <a class="btn" href="{{ path('cacic_relatorio_inativos_listar') }}/{{log['idRede'] }}/{{data['dtAcaoInicio'] }}/{{ data['dtAcaoFim'] }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank"> | ||
38 | + <i class="icon-search"></i> | ||
39 | + </a> | ||
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 | + | ||
53 | + </form> | ||
54 | + | ||
55 | + </div> <!-- /block --> | ||
56 | + </div> <!-- /box --> | ||
57 | + </div> <!-- /span --> | ||
58 | +</div> <!-- /row --> |
src/Cacic/RelatorioBundle/Resources/views/Faturamento/index.html.twig
0 → 100755
@@ -0,0 +1,122 @@ | @@ -0,0 +1,122 @@ | ||
1 | +{% extends 'CacicCommonBundle::base.html.twig' %} | ||
2 | + | ||
3 | +{% block breadcrumb %} | ||
4 | + <li class="active">{{ 'Faturamento'|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> {{'Faturamento mensal' |trans }}</h2> | ||
15 | + | ||
16 | + <div class="block box_content round_bottom padding_10"> | ||
17 | + | ||
18 | + <h4>{{ "Filtros para faturamento mensal"|trans }}</h4><br /> | ||
19 | + | ||
20 | + <form id={{ 'formFaturamento'|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 faturar."|trans }}</p> | ||
27 | + </div> | ||
28 | + </div> | ||
29 | + | ||
30 | + <div class="control-group _cad_block_opcao"> | ||
31 | + | ||
32 | + <div class="controls"> | ||
33 | + | ||
34 | + <label ><b>{{ 'Local:'|trans }}</b></label> | ||
35 | + <div style="height: 200px; overflow: auto;"> | ||
36 | + | ||
37 | + <div class="modulo-opt-block"> | ||
38 | + {{ form_widget(form.idLocal, {'form_type': 'horizontal'}) }} | ||
39 | + </div> | ||
40 | + </div> | ||
41 | + </div> | ||
42 | + | ||
43 | + </div> | ||
44 | + | ||
45 | + <div class="control-group"> | ||
46 | + <div class="controls"> | ||
47 | + <button type="reset" class="btn"> | ||
48 | + <i class="icon-refresh"></i> | ||
49 | + {{ "Resetar Valores"|trans }} | ||
50 | + </button> | ||
51 | + <button type="submit" class="btn btn-primary"> | ||
52 | + <i class="icon-search"></i> | ||
53 | + {{ 'Faturar'|trans }} | ||
54 | + </button> | ||
55 | + </div> | ||
56 | + </div> | ||
57 | + | ||
58 | + </form> | ||
59 | + </div> <!-- /block --> | ||
60 | + </div> <!-- /box --> | ||
61 | + </div> <!-- /span8 --> | ||
62 | + | ||
63 | + <div class="span4"> | ||
64 | + <div class="box grad_colour_black"> | ||
65 | + | ||
66 | + <h2 class="box_head round_top"><i class="icon-info-sign"></i> {{ "Informações Adicionais"|trans }}</h2> | ||
67 | + | ||
68 | + <div class="block box_content round_bottom padding_10"> | ||
69 | + <p> | ||
70 | + {{ "Faturamento"|trans }}. | ||
71 | + </p> | ||
72 | + <p> | ||
73 | + {{ "O período é obrigatório"|trans }}. | ||
74 | + </p> | ||
75 | + <p> | ||
76 | + {{ "Não selecionar nenhum valor em determinado critério é o mesmo que selecionar todos"|trans }}. | ||
77 | + </p> | ||
78 | + </div> <!-- /block --> | ||
79 | + </div> <!-- /box --> | ||
80 | + </div> <!-- span4 --> | ||
81 | + | ||
82 | + </div> <!-- /row --> | ||
83 | + | ||
84 | + {% if logs is not null %} | ||
85 | + {% include 'CacicRelatorioBundle:Faturamento:acessoResultado.html.twig' %} | ||
86 | + | ||
87 | + {% endif %} | ||
88 | + | ||
89 | +{% endblock %} | ||
90 | + | ||
91 | +{% block javascripts %} | ||
92 | + | ||
93 | + <script type="text/javascript"> | ||
94 | + function mostraDetalhes(elm) { | ||
95 | + var detalhes = document.getElementById('_detalhes'); | ||
96 | + if (elm.checked == false) { | ||
97 | + detalhes.style = ''; | ||
98 | + } else { | ||
99 | + detalhes.style = 'display: none;'; | ||
100 | + } | ||
101 | + } | ||
102 | + </script> | ||
103 | + | ||
104 | + {{ parent() }} | ||
105 | + {% if locale == 'pt_BR' %} | ||
106 | + <script src="{{ asset('bundles/caciccommon/js/jquery.ui.datepicker-pt-BR.js') }}"></script> | ||
107 | + | ||
108 | + <script type="text/javascript"> | ||
109 | + | ||
110 | + $(".datepicker_on").datepicker({ altFormat: "dd/mm/yy" }).mask('99/99/9999'); | ||
111 | + | ||
112 | + </script> | ||
113 | + {% else %} | ||
114 | + <script src="{{ asset('bundles/caciccommon/js/jquery.ui.datepicker-en-US.js') }}"></script> | ||
115 | + | ||
116 | + <script type="text/javascript"> | ||
117 | + | ||
118 | + $(".datepicker_on").datepicker({ altFormat: "mm/dd/yy" }).mask('99/99/9999'); | ||
119 | + | ||
120 | + </script> | ||
121 | + {% endif %} | ||
122 | +{% endblock %} | ||
0 | \ No newline at end of file | 123 | \ No newline at end of file |
src/Cacic/RelatorioBundle/Resources/views/Faturamento/listar.html.twig
0 → 100755
@@ -0,0 +1,46 @@ | @@ -0,0 +1,46 @@ | ||
1 | +{% extends 'CacicRelatorioBundle::base.html.twig' %} | ||
2 | + | ||
3 | +{% block body %} | ||
4 | + | ||
5 | + <h2>{{ 'Relatório de máquinas da subrede '|trans }} {{ rede }}</h2> | ||
6 | + <h5>{{ 'Relatório gerado em'|trans }} {% if idioma == 'pt_BR' %}{{ "now"|date("d/m/Y H\\hi") }}{% else %}{{ "now"|date("m/d/Y H\\hi") }}{% endif %}</h5> | ||
7 | + | ||
8 | + <hr /> | ||
9 | + | ||
10 | + <table class="table table-striped table-bordered"> | ||
11 | + <thead> | ||
12 | + <tr> | ||
13 | + <th width="5%" style="text-align: center"></th> | ||
14 | + <th width="15%">{{ "Computador"|trans }}</th> | ||
15 | + <th width="10%">{{ "MAC Address"|trans }}</th> | ||
16 | + <th width="10%">{{ "Endereço IP"|trans }}</th> | ||
17 | + <th width="10%">{{ "Sistema Operacional"|trans }}</th> | ||
18 | + <th width="10%">{{ "Local"|trans }}</th> | ||
19 | + <th width="20%">{{ "Subrede"|trans }}</th> | ||
20 | + <th>{{ "Data/Hora da Última coleta"|trans }}</th> | ||
21 | + </tr> | ||
22 | + </thead> | ||
23 | + | ||
24 | + <tbody> | ||
25 | + {% for reg in dados %} | ||
26 | + <tr> | ||
27 | + <td style="text-align: center">{{ loop.index }}</td> | ||
28 | + <td> | ||
29 | + <b><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.idComputador }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.nmComputador }}</a></b> | ||
30 | + </td> | ||
31 | + <td><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.idComputador }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.teNodeAddress }}</a></td> | ||
32 | + <td><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.idComputador }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.teIpComputador }}</a></td> | ||
33 | + <td><span class="{% if reg.inMswindows == 'S' %}red{% else %}blue{% endif %}">{{ reg.sgSo }}</span></td> | ||
34 | + <td>{{ reg.nmLocal }}</td> | ||
35 | + <td>{{ reg.nmRede }} / {{ reg.teIpRede }}</td> | ||
36 | + <td>{{ reg.data|date(' d, M, Y H:m:s') }}</td> | ||
37 | + </tr> | ||
38 | + {% else %} | ||
39 | + <tr> | ||
40 | + <td style="text-align: center" colspan="7"><b>{{ "NENHUM REGISTRO ENCONTRADO!"|trans }}</b></td> | ||
41 | + </tr> | ||
42 | + {% endfor %} | ||
43 | + </tbody> | ||
44 | + </table> | ||
45 | + | ||
46 | +{% endblock %} |
src/Cacic/RelatorioBundle/Resources/views/Faturamento/listarInativos.html.twig
0 → 100755
@@ -0,0 +1,44 @@ | @@ -0,0 +1,44 @@ | ||
1 | +{% extends 'CacicRelatorioBundle::base.html.twig' %} | ||
2 | + | ||
3 | +{% block body %} | ||
4 | + | ||
5 | + <h2>{{ 'Relatório de máquinas da subrede '|trans }} {{ rede }}</h2> | ||
6 | + <h5>{{ 'Relatório gerado em'|trans }} {% if idioma == 'pt_BR' %}{{ "now"|date("d/m/Y H\\hi") }}{% else %}{{ "now"|date("m/d/Y H\\hi") }}{% endif %}</h5> | ||
7 | + | ||
8 | + <hr /> | ||
9 | + | ||
10 | + <table class="table table-striped table-bordered"> | ||
11 | + <thead> | ||
12 | + <tr> | ||
13 | + <th width="5%" style="text-align: center"></th> | ||
14 | + <th width="15%">{{ "Computador"|trans }}</th> | ||
15 | + <th width="10%">{{ "MAC Address"|trans }}</th> | ||
16 | + <th width="10%">{{ "Endereço IP"|trans }}</th> | ||
17 | + <th width="10%">{{ "Sistema Operacional"|trans }}</th> | ||
18 | + <th width="10%">{{ "Local"|trans }}</th> | ||
19 | + <th width="20%">{{ "Subrede"|trans }}</th> | ||
20 | + </tr> | ||
21 | + </thead> | ||
22 | + | ||
23 | + <tbody> | ||
24 | + {% for reg in dados %} | ||
25 | + <tr> | ||
26 | + <td style="text-align: center">{{ loop.index }}</td> | ||
27 | + <td> | ||
28 | + <b><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.idComputador }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.nmComputador }}</a></b> | ||
29 | + </td> | ||
30 | + <td><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.idComputador }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.teNodeAddress }}</a></td> | ||
31 | + <td><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.idComputador }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.teIpComputador }}</a></td> | ||
32 | + <td><span class="{% if reg.inMswindows == 'S' %}red{% else %}blue{% endif %}">{{ reg.sgSo }}</span></td> | ||
33 | + <td>{{ reg.nmLocal }}</td> | ||
34 | + <td>{{ reg.nmRede }} / {{ reg.teIpRede }}</td> | ||
35 | + </tr> | ||
36 | + {% else %} | ||
37 | + <tr> | ||
38 | + <td style="text-align: center" colspan="7"><b>{{ "NENHUM REGISTRO ENCONTRADO!"|trans }}</b></td> | ||
39 | + </tr> | ||
40 | + {% endfor %} | ||
41 | + </tbody> | ||
42 | + </table> | ||
43 | + | ||
44 | +{% endblock %} |
src/Cacic/RelatorioBundle/Resources/views/Hardware/configuracoes_filtro.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li class="active">{{ "Relatório de Configurações de Hardware"|trans }}</li> | 4 | <li class="active">{{ "Relatório de Configurações de Hardware"|trans }}</li> |
src/Cacic/RelatorioBundle/Resources/views/Hardware/wmi_filtro.html.twig
src/Cacic/RelatorioBundle/Resources/views/Software/inventariados_filtro.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li class="active">{{ "Relatório de Softwares Inventariados"|trans }}</li> | 4 | <li class="active">{{ "Relatório de Softwares Inventariados"|trans }}</li> |
@@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
21 | 21 | ||
22 | tSW.populate([ // Popula o TRANSFER com Softwares | 22 | tSW.populate([ // Popula o TRANSFER com Softwares |
23 | {% for sw in softwares %} | 23 | {% for sw in softwares %} |
24 | - {value: "{{ sw[0]['idSoftware'] }}", content:"{{ sw[0]['nmSoftware'] }}"}{% if loop.last != true %},{% endif %} | 24 | + {value: "{{ sw['idClassProperty'] }}", content:"{{ sw['nmSoftware'] }}"}{% if loop.last != true %},{% endif %} |
25 | 25 | ||
26 | {% endfor %} | 26 | {% endfor %} |
27 | ]); | 27 | ]); |
src/Cacic/RelatorioBundle/Resources/views/Software/licenciados_filtro.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li class="active">{{ "Relatório de Softwares Licenciados"|trans }}</li> | 4 | <li class="active">{{ "Relatório de Softwares Licenciados"|trans }}</li> |
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | 18 | ||
19 | tSW.populate([ // Popula o TRANSFER com Softwares | 19 | tSW.populate([ // Popula o TRANSFER com Softwares |
20 | {% for sw in softwares %} | 20 | {% for sw in softwares %} |
21 | - {value: "{{ sw[0]['idSoftware'] }}", content:"{{ sw[0]['nmSoftware'] }}"}{% if loop.last != true %},{% endif %} | 21 | + {value: "{{ sw['idClassProperty'] }}", content:"{{ sw['nmSoftware'] }}"}{% if loop.last != true %},{% endif %} |
22 | 22 | ||
23 | {% endfor %} | 23 | {% endfor %} |
24 | ]); | 24 | ]); |
src/Cacic/RelatorioBundle/Resources/views/Software/orgao_filtro.html.twig
1 | -{% extends '::base.html.twig' %} | 1 | +{% extends 'CacicCommonBundle::base.html.twig' %} |
2 | 2 | ||
3 | {% block breadcrumb %} | 3 | {% block breadcrumb %} |
4 | <li class="active">{{ "Relatório de Softwares por Órgão/Máquina"|trans }}</li> | 4 | <li class="active">{{ "Relatório de Softwares por Órgão/Máquina"|trans }}</li> |
src/Cacic/RelatorioBundle/Resources/views/Software/rel_aquisicoes.html.twig
@@ -11,10 +11,10 @@ | @@ -11,10 +11,10 @@ | ||
11 | <thead> | 11 | <thead> |
12 | <tr> | 12 | <tr> |
13 | <th width="25%">{{ "Processo"|trans }}</th> | 13 | <th width="25%">{{ "Processo"|trans }}</th> |
14 | - <th width="20%">{{ "Data"|trans }}</th> | 14 | + <th width="20%">{{ "Data de Aquisição"|trans }}</th> |
15 | <th width="20%">{{ "Empresa"|trans }}</th> | 15 | <th width="20%">{{ "Empresa"|trans }}</th> |
16 | <th width="20%">{{ "Proprietário"|trans }}</th> | 16 | <th width="20%">{{ "Proprietário"|trans }}</th> |
17 | - <th>{{ "Nº da NF"|trans }}</th> | 17 | + <th>{{ "Pregão/Contrato"|trans }}</th> |
18 | </tr> | 18 | </tr> |
19 | </thead> | 19 | </thead> |
20 | 20 |
src/Cacic/RelatorioBundle/Resources/views/Software/rel_inventariados.html.twig
@@ -12,7 +12,6 @@ | @@ -12,7 +12,6 @@ | ||
12 | <tr> | 12 | <tr> |
13 | <th width="30%">{{ "Software"|trans }}</th> | 13 | <th width="30%">{{ "Software"|trans }}</th> |
14 | <th width="20%">{{ "Local"|trans }}</th> | 14 | <th width="20%">{{ "Local"|trans }}</th> |
15 | - <th width="20%">{{ "Subrede"|trans }}</th> | ||
16 | <th width="20%" style="text-align: center">{{ "Máquinas"|trans }}</th> | 15 | <th width="20%" style="text-align: center">{{ "Máquinas"|trans }}</th> |
17 | </tr> | 16 | </tr> |
18 | </thead> | 17 | </thead> |
@@ -22,10 +21,9 @@ | @@ -22,10 +21,9 @@ | ||
22 | {% for reg in dados %} | 21 | {% for reg in dados %} |
23 | 22 | ||
24 | <tr> | 23 | <tr> |
25 | - <td><a href="{{ path('cacic_relatorio_software_lista', {'software': reg['nmSoftware']}) }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank">{{ reg['nmSoftware'] }}</a></td> | 24 | + <td><a href="{{ path('cacic_relatorio_software_lista') }}/{{ reg['nmSoftware'] }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank">{{ reg['nmSoftware'] }}</a></td> |
26 | <td>{{ reg['nmLocal'] }}</td> | 25 | <td>{{ reg['nmLocal'] }}</td> |
27 | - <td>{{ reg['nmRede'] }} / {{ reg['teIpRede'] }}</td> | ||
28 | - <td style="text-align: center"><a href="{{ path('cacic_relatorio_software_lista', {'software': reg['nmSoftware']}) }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank">{{ reg['numComp'] }}</a></td> | 26 | + <td style="text-align: center"><a href="{{ path('cacic_relatorio_software_lista') }}/{{ reg['nmSoftware'] }}/{{ reg['nmLocal'] }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank">{{ reg['numComp'] }}</a></td> |
29 | </tr> | 27 | </tr> |
30 | 28 | ||
31 | {% else %} | 29 | {% else %} |
src/Cacic/RelatorioBundle/Resources/views/Software/rel_software_lista.html.twig
@@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
35 | </tr> | 35 | </tr> |
36 | {% else %} | 36 | {% else %} |
37 | <tr> | 37 | <tr> |
38 | - <td style="text-align: center" colspan="5"><b>{{ "NENHUM REGISTRO ENCONTRADO!"|trans }}</b></td> | 38 | + <td style="text-align: center" colspan="7"><b>{{ "NENHUM REGISTRO ENCONTRADO!"|trans }}</b></td> |
39 | </tr> | 39 | </tr> |
40 | {% endfor %} | 40 | {% endfor %} |
41 | </tbody> | 41 | </tbody> |
src/Cacic/RelatorioBundle/Resources/views/Software/rel_tipo.html.twig
@@ -21,7 +21,8 @@ | @@ -21,7 +21,8 @@ | ||
21 | <tr> | 21 | <tr> |
22 | <td style="text-align: center"><span class="red">{{ reg.teDescricaoTipoSoftware }}</span></td> | 22 | <td style="text-align: center"><span class="red">{{ reg.teDescricaoTipoSoftware }}</span></td> |
23 | <td><span class="blue">{{ reg.nmSoftware }}</span></td> | 23 | <td><span class="blue">{{ reg.nmSoftware }}</span></td> |
24 | - <td style="text-align: center">{{ reg.numComp }}</td> | 24 | + <td style="text-align: center"><b><a href="{{ path('cacic_relatorio_software_lista', {'software': reg['nmSoftware']}) }}" title="{{ "Relatório de coletas do software"|trans }}" target="_blank"> |
25 | + {{ reg.numComp }}</a></b></td> | ||
25 | </tr> | 26 | </tr> |
26 | {% else %} | 27 | {% else %} |
27 | <tr> | 28 | <tr> |
src/Cacic/RelatorioBundle/Resources/views/Software/tipo_filtro.html.twig
src/Cacic/WSBundle/Controller/ColetaController.php
@@ -124,7 +124,7 @@ class ColetaController extends Controller | @@ -124,7 +124,7 @@ class ColetaController extends Controller | ||
124 | // A propriedade da coleta de software é multi valorada. Preciso tratar diferente | 124 | // A propriedade da coleta de software é multi valorada. Preciso tratar diferente |
125 | if ($strClassName == "SoftwareList") { | 125 | if ($strClassName == "SoftwareList") { |
126 | 126 | ||
127 | - // Primeiro preciso pegar todas as tags qure forem software | 127 | + // Primeiro preciso pegar todas as tags que forem software |
128 | $arrSoftware = TagValueHelper::getSoftwareTags($strNewClassValues); | 128 | $arrSoftware = TagValueHelper::getSoftwareTags($strNewClassValues); |
129 | 129 | ||
130 | // Agora insere cada registro de software individualmente | 130 | // Agora insere cada registro de software individualmente |
@@ -150,6 +150,7 @@ class ColetaController extends Controller | @@ -150,6 +150,7 @@ class ColetaController extends Controller | ||
150 | 150 | ||
151 | // Se o IDSoftware não existir, cria | 151 | // Se o IDSoftware não existir, cria |
152 | if (empty($idClassProperty)) { | 152 | if (empty($idClassProperty)) { |
153 | + $logger->debug("Software $softwareName não encontrado. Adicionando um novo software"); | ||
153 | // Pega o Id da classe | 154 | // Pega o Id da classe |
154 | $idClass = $this->getDoctrine()->getRepository('CacicCommonBundle:Classe')->findOneBy( array('nmClassName'=>$strClassName) ); | 155 | $idClass = $this->getDoctrine()->getRepository('CacicCommonBundle:Classe')->findOneBy( array('nmClassName'=>$strClassName) ); |
155 | 156 | ||
@@ -171,40 +172,55 @@ class ColetaController extends Controller | @@ -171,40 +172,55 @@ class ColetaController extends Controller | ||
171 | // Chama função que grava a propriedade | 172 | // Chama função que grava a propriedade |
172 | $this->gerColsSetProperty('IDSoftware', $software, $idClassProperty, $computador); | 173 | $this->gerColsSetProperty('IDSoftware', $software, $idClassProperty, $computador); |
173 | 174 | ||
174 | - // Adiciona referência à tabela de softwares | ||
175 | - $softwareObject = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->findOneBy( array('nmSoftware' => $softwareName) ); | 175 | + // Agora gravo todas as propriedades para o software na tabela propriedade_software |
176 | + $propriedadeSoftware = $this->getDoctrine()->getRepository('CacicCommonBundle:PropriedadeSoftware')->findOneBy( array('classProperty'=> $idClassProperty, 'computador' => $computador) ); | ||
177 | + $classPropertyObject = $this->getDoctrine()->getRepository('CacicCommonBundle:ClassProperty')->findOneBy( array( 'idClassProperty'=> $idClassProperty ) ); | ||
176 | 178 | ||
177 | - // Se for fazio, crio o objeto software | ||
178 | - if (empty($softwareObject)) { | 179 | + if (empty($propriedadeSoftware)) { |
180 | + // Primeiro crio o software | ||
179 | $softwareObject = new Software(); | 181 | $softwareObject = new Software(); |
180 | - } | ||
181 | 182 | ||
182 | - // Se não tiver nome coloco o ID Software no nome | ||
183 | - if (empty($arrTagsNames['DisplayName'])) { | ||
184 | - $softwareObject->setNmSoftware($softwareName); | ||
185 | - } else { | ||
186 | - $softwareObject->setNmSoftware($arrTagsNames['DisplayName']); | ||
187 | - } | ||
188 | - | ||
189 | - // Grava software recém inserido | ||
190 | - $this->getDoctrine()->getManager()->persist($softwareObject); | ||
191 | - $this->getDoctrine()->getManager()->flush(); | 183 | + // Se não tiver nome coloco o ID Software no nome |
184 | + if (empty($arrTagsNames['DisplayName'])) { | ||
185 | + $softwareObject->setNmSoftware($softwareName); | ||
186 | + } else { | ||
187 | + $softwareObject->setNmSoftware($arrTagsNames['DisplayName']); | ||
188 | + } | ||
192 | 189 | ||
193 | - // Agora gravo todas as propriedades para o software na tabela propriedade_software | ||
194 | - $classPropertyObject = $this->getDoctrine()->getRepository('CacicCommonBundle:ClassProperty')->findOneBy( array( 'idClassProperty'=> $idClassProperty ) ); | ||
195 | - $propriedadeSoftware = $this->getDoctrine()->getRepository('CacicCommonBundle:PropriedadeSoftware')->findOneBy( array('classProperty'=> $idClassProperty, 'computador' => $computador, 'software' => $softwareObject->getIdSoftware()) ); | 190 | + // Grava software recém inserido |
191 | + $this->getDoctrine()->getManager()->persist($softwareObject); | ||
192 | + $this->getDoctrine()->getManager()->flush(); | ||
196 | 193 | ||
197 | - if (empty($propriedadeSoftware)) { | 194 | + // Depois adiciono as propriedades |
198 | $propriedadeSoftware = new PropriedadeSoftware(); | 195 | $propriedadeSoftware = new PropriedadeSoftware(); |
199 | 196 | ||
200 | $propriedadeSoftware->setClassProperty($classPropertyObject); | 197 | $propriedadeSoftware->setClassProperty($classPropertyObject); |
201 | $propriedadeSoftware->setComputador($computador); | 198 | $propriedadeSoftware->setComputador($computador); |
199 | + | ||
200 | + // Ajusta valores coletados | ||
201 | + $propriedadeSoftware->setDisplayName($arrTagsNames['DisplayName']); | ||
202 | + $propriedadeSoftware->setDisplayVersion($arrTagsNames['DisplayVersion']); | ||
203 | + $propriedadeSoftware->setURLInfoAbout($arrTagsNames['URLInfoAbout']); | ||
202 | $propriedadeSoftware->setSoftware($softwareObject); | 204 | $propriedadeSoftware->setSoftware($softwareObject); |
203 | 205 | ||
204 | // Grava no banco de dados | 206 | // Grava no banco de dados |
205 | $this->getDoctrine()->getManager()->persist($propriedadeSoftware); | 207 | $this->getDoctrine()->getManager()->persist($propriedadeSoftware); |
206 | $this->getDoctrine()->getManager()->flush(); | 208 | $this->getDoctrine()->getManager()->flush(); |
207 | } else { | 209 | } else { |
210 | + // Adiciona referência à tabela de softwares | ||
211 | + $softwareObject = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->find( $propriedadeSoftware->getSoftware()->getIdSoftware() ); | ||
212 | + | ||
213 | + // Se não tiver nome coloco o ID Software no nome | ||
214 | + if (empty($arrTagsNames['DisplayName'])) { | ||
215 | + $softwareObject->setNmSoftware($softwareName); | ||
216 | + } else { | ||
217 | + $softwareObject->setNmSoftware($arrTagsNames['DisplayName']); | ||
218 | + } | ||
219 | + | ||
220 | + // Grava software recém inserido | ||
221 | + $this->getDoctrine()->getManager()->persist($softwareObject); | ||
222 | + $this->getDoctrine()->getManager()->flush(); | ||
223 | + | ||
208 | // Ajusta valores coletados | 224 | // Ajusta valores coletados |
209 | $propriedadeSoftware->setDisplayName($arrTagsNames['DisplayName']); | 225 | $propriedadeSoftware->setDisplayName($arrTagsNames['DisplayName']); |
210 | $propriedadeSoftware->setDisplayVersion($arrTagsNames['DisplayVersion']); | 226 | $propriedadeSoftware->setDisplayVersion($arrTagsNames['DisplayVersion']); |
src/Cacic/WSBundle/Controller/DefaultController.php
@@ -17,6 +17,8 @@ use Cacic\CommonBundle\Entity\InsucessoInstalacao; | @@ -17,6 +17,8 @@ use Cacic\CommonBundle\Entity\InsucessoInstalacao; | ||
17 | use Cacic\CommonBundle\Entity\RedeVersaoModulo; | 17 | use Cacic\CommonBundle\Entity\RedeVersaoModulo; |
18 | use Cacic\WSBundle\Helper\OldCacicHelper; | 18 | use Cacic\WSBundle\Helper\OldCacicHelper; |
19 | use Cacic\WSBundle\Helper\TagValueHelper; | 19 | use Cacic\WSBundle\Helper\TagValueHelper; |
20 | +use Cacic\CommonBundle\Entity\LogAcesso; | ||
21 | + | ||
20 | /** | 22 | /** |
21 | * | 23 | * |
22 | * Classe responsável por Rerceber as coletas Agente | 24 | * Classe responsável por Rerceber as coletas Agente |
@@ -60,6 +62,7 @@ class DefaultController extends Controller | @@ -60,6 +62,7 @@ class DefaultController extends Controller | ||
60 | */ | 62 | */ |
61 | public function testAction( Request $request ) | 63 | public function testAction( Request $request ) |
62 | { | 64 | { |
65 | + $logger = $this->get('logger'); | ||
63 | OldCacicHelper::autenticaAgente( $request ) ; | 66 | OldCacicHelper::autenticaAgente( $request ) ; |
64 | $strNetworkAdapterConfiguration = OldCacicHelper::deCrypt( $request, $request->get('NetworkAdapterConfiguration') ); | 67 | $strNetworkAdapterConfiguration = OldCacicHelper::deCrypt( $request, $request->get('NetworkAdapterConfiguration') ); |
65 | $strComputerSystem = OldCacicHelper::deCrypt( $request, $request->get('ComputerSystem') ); | 68 | $strComputerSystem = OldCacicHelper::deCrypt( $request, $request->get('ComputerSystem') ); |
@@ -81,6 +84,41 @@ class DefaultController extends Controller | @@ -81,6 +84,41 @@ class DefaultController extends Controller | ||
81 | ( TagValueHelper::getValueFromTags('DateToDebugging',$rede->getTeDebugging() ) == date("Ymd") ? $rede->getTeDebugging() : '') ) ); | 84 | ( TagValueHelper::getValueFromTags('DateToDebugging',$rede->getTeDebugging() ) == date("Ymd") ? $rede->getTeDebugging() : '') ) ); |
82 | $debugging = ( $debugging ? TagValueHelper::getValueFromTags('DetailsToDebugging', $debugging ) : '' ); | 85 | $debugging = ( $debugging ? TagValueHelper::getValueFromTags('DetailsToDebugging', $debugging ) : '' ); |
83 | 86 | ||
87 | + // Adiciona no log de acesso. REGRA: só adiciona se o último registro foi em data diferente da de hoje | ||
88 | + // TODO: Colocar um parâmetro que diz quantas vezes deve ser registrado o acesso por dia | ||
89 | + $data_acesso = new \DateTime(); | ||
90 | + $hoje = $data_acesso->format('Y-m-d'); | ||
91 | + | ||
92 | + $ultimo_acesso = $this->getDoctrine()->getRepository('CacicCommonBundle:LogAcesso')->ultimoAcesso( $computador->getIdComputador() ); | ||
93 | + if (empty($ultimo_acesso)) { | ||
94 | + // Se for o primeiro registro grava o acesso do computador | ||
95 | + $logger->debug("Último acesso não encontrado. Registrando acesso para o computador $computador em $hoje"); | ||
96 | + | ||
97 | + $log_acesso = new LogAcesso(); | ||
98 | + $log_acesso->setIdComputador($computador); | ||
99 | + $log_acesso->setData($data_acesso); | ||
100 | + | ||
101 | + // Grava o log | ||
102 | + $this->getDoctrine()->getManager()->persist($log_acesso); | ||
103 | + $this->getDoctrine()->getManager()->flush(); | ||
104 | + } else { | ||
105 | + $dt_ultimo_acesso = $ultimo_acesso->getData()->format('Y-m-d'); | ||
106 | + | ||
107 | + // Só adiciono se a data de útimo acesso for diferente do dia de hoje | ||
108 | + if ($hoje != $dt_ultimo_acesso) { | ||
109 | + $logger->debug("Inserindo novo registro de acesso para o computador $computador em $hoje"); | ||
110 | + | ||
111 | + $log_acesso = new LogAcesso(); | ||
112 | + $log_acesso->setIdComputador($computador); | ||
113 | + $log_acesso->setData($data_acesso); | ||
114 | + | ||
115 | + // Grava o log | ||
116 | + $this->getDoctrine()->getManager()->persist($log_acesso); | ||
117 | + $this->getDoctrine()->getManager()->flush(); | ||
118 | + } | ||
119 | + } | ||
120 | + | ||
121 | + | ||
84 | $response = new Response(); | 122 | $response = new Response(); |
85 | $response->headers->set('Content-Type', 'xml'); | 123 | $response->headers->set('Content-Type', 'xml'); |
86 | $cacic_helper = new OldCacicHelper($this->get('kernel')); | 124 | $cacic_helper = new OldCacicHelper($this->get('kernel')); |
web/app.php
@@ -15,7 +15,7 @@ $loader->register(true); | @@ -15,7 +15,7 @@ $loader->register(true); | ||
15 | require_once __DIR__.'/../app/AppKernel.php'; | 15 | require_once __DIR__.'/../app/AppKernel.php'; |
16 | //require_once __DIR__.'/../app/AppCache.php'; | 16 | //require_once __DIR__.'/../app/AppCache.php'; |
17 | 17 | ||
18 | -$kernel = new AppKernel('prod', false); | 18 | +$kernel = new AppKernel('prod', true); |
19 | $kernel->loadClassCache(); | 19 | $kernel->loadClassCache(); |
20 | //$kernel = new AppCache($kernel); | 20 | //$kernel = new AppCache($kernel); |
21 | $request = Request::createFromGlobals(); | 21 | $request = Request::createFromGlobals(); |
web/app_dev.php
@@ -27,3 +27,4 @@ $request = Request::createFromGlobals(); | @@ -27,3 +27,4 @@ $request = Request::createFromGlobals(); | ||
27 | $response = $kernel->handle($request); | 27 | $response = $kernel->handle($request); |
28 | $response->send(); | 28 | $response->send(); |
29 | $kernel->terminate($request, $response); | 29 | $kernel->terminate($request, $response); |
30 | + |