Commit c390c3ecbfc4015d73cfc6255d7ec8475067dd42

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

Merge para o trunk da versão 3.0 com o objetivo de criar o 3.0b2

git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/gerente@1656 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing 69 changed files with 2836 additions and 438 deletions   Show diff stats
app/AppKernel.php
... ... @@ -28,6 +28,7 @@ class AppKernel extends Kernel
28 28 new JMS\TranslationBundle\JMSTranslationBundle(),
29 29 new Ijanki\Bundle\FtpBundle\IjankiFtpBundle(),
30 30 new FM\ElfinderBundle\FMElfinderBundle(),
  31 + new Knp\Bundle\MenuBundle\KnpMenuBundle(),
31 32 );
32 33  
33 34 if (in_array($this->getEnvironment(), array('dev', 'test'))) {
... ...
app/Resources/views/base.html.twig
... ... @@ -230,12 +230,10 @@
230 230 </li>
231 231 <li class="dropdown-submenu" >
232 232 <a href="javascript:void(0)">
233   - <span>{{ "Hardwares"|trans }}</span>
  233 + <span>{{ "Classes WMI"|trans }}</span>
234 234 <span class="icon">&nbsp;</span>
235 235 </a>
236   - <ul>
237   - <li><a href="{{ path('cacic_relatorio_hardware_configuracoes') }}">{{ "Configurações"|trans }}</a></li>
238   - </ul>
  236 + {{ knp_menu_render('CacicRelatorioBundle:Builder:relatorioMenu') }}
239 237 </li>
240 238 <li><a class="round_top" href="{{ path('cacic_relatorio_autorizacoes') }}">{{ "Autorizações"|trans }}</a></li>
241 239 <li><a class="round_top" href="{{ path('cacic_relatorio_tcpIp') }}">{{ "TCP/IP"|trans }}</a></li>
... ...
app/bootstrap.php.cache
... ... @@ -368,15 +368,22 @@ $authorizationHeader = $this-&gt;parameters[&#39;HTTP_AUTHORIZATION&#39;];
368 368 } elseif (isset($this->parameters['REDIRECT_HTTP_AUTHORIZATION'])) {
369 369 $authorizationHeader = $this->parameters['REDIRECT_HTTP_AUTHORIZATION'];
370 370 }
371   -if ((null !== $authorizationHeader) && (0 === stripos($authorizationHeader,'basic'))) {
  371 +if (null !== $authorizationHeader) {
  372 +if (0 === stripos($authorizationHeader,'basic')) {
372 373 $exploded = explode(':', base64_decode(substr($authorizationHeader, 6)));
373 374 if (count($exploded) == 2) {
374 375 list($headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']) = $exploded;
375 376 }
  377 +} elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && (0 === stripos($authorizationHeader,'digest'))) {
  378 +$headers['PHP_AUTH_DIGEST'] = $authorizationHeader;
  379 +$this->parameters['PHP_AUTH_DIGEST'] = $authorizationHeader;
  380 +}
376 381 }
377 382 }
378 383 if (isset($headers['PHP_AUTH_USER'])) {
379 384 $headers['AUTHORIZATION'] ='Basic '.base64_encode($headers['PHP_AUTH_USER'].':'.$headers['PHP_AUTH_PW']);
  385 +} elseif (isset($headers['PHP_AUTH_DIGEST'])) {
  386 +$headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST'];
380 387 }
381 388 return $headers;
382 389 }
... ... @@ -506,11 +513,19 @@ $request = array();
506 513 $query = $parameters;
507 514 break;
508 515 }
  516 +$queryString ='';
509 517 if (isset($components['query'])) {
510 518 parse_str(html_entity_decode($components['query']), $qs);
  519 +if ($query) {
511 520 $query = array_replace($qs, $query);
  521 +$queryString = http_build_query($query,'','&');
  522 +} else {
  523 +$query = $qs;
  524 +$queryString = $components['query'];
512 525 }
  526 +} elseif ($query) {
513 527 $queryString = http_build_query($query,'','&');
  528 +}
514 529 $server['REQUEST_URI'] = $components['path'].(''!== $queryString ?'?'.$queryString :'');
515 530 $server['QUERY_STRING'] = $queryString;
516 531 return new static($query, $request, array(), $cookies, $files, $server, $content);
... ... @@ -546,8 +561,11 @@ $dup-&gt;baseUrl = null;
546 561 $dup->basePath = null;
547 562 $dup->method = null;
548 563 $dup->format = null;
549   -if (!$dup->get('_format')) {
550   -$dup->setRequestFormat($this->getRequestFormat());
  564 +if (!$dup->get('_format') && $this->get('_format')) {
  565 +$dup->attributes->set('_format', $this->get('_format'));
  566 +}
  567 +if (!$dup->getRequestFormat(null)) {
  568 +$dup->setRequestFormat($format = $this->getRequestFormat(null));
551 569 }
552 570 return $dup;
553 571 }
... ... @@ -583,7 +601,7 @@ $_SERVER[&#39;HTTP_&#39;.$key] = implode(&#39;, &#39;, $value);
583 601 }
584 602 }
585 603 $request = array('g'=> $_GET,'p'=> $_POST,'c'=> $_COOKIE);
586   -$requestOrder = ini_get('request_order') ?: ini_get('variable_order');
  604 +$requestOrder = ini_get('request_order') ?: ini_get('variables_order');
587 605 $requestOrder = preg_replace('#[^cgp]#','', strtolower($requestOrder)) ?:'gp';
588 606 $_REQUEST = array();
589 607 foreach (str_split($requestOrder) as $order) {
... ... @@ -682,12 +700,10 @@ return array($ip);
682 700 }
683 701 $clientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP])));
684 702 $clientIps[] = $ip;
685   -$trustedProxies = !self::$trustedProxies ? array($ip) : self::$trustedProxies;
686 703 $ip = $clientIps[0];
687 704 foreach ($clientIps as $key => $clientIp) {
688   -if (IpUtils::checkIp($clientIp, $trustedProxies)) {
  705 +if (IpUtils::checkIp($clientIp, self::$trustedProxies)) {
689 706 unset($clientIps[$key]);
690   -continue;
691 707 }
692 708 }
693 709 return $clientIps ? array_reverse($clientIps) : array($ip);
... ... @@ -736,6 +752,12 @@ if (self::$trustedHeaders[self::HEADER_CLIENT_PROTO] &amp;&amp;&#39;https&#39;=== $this-&gt;headers
736 752 return 443;
737 753 }
738 754 }
  755 +if ($host = $this->headers->get('HOST')) {
  756 +if (false !== $pos = strrpos($host,':')) {
  757 +return intval(substr($host, $pos + 1));
  758 +}
  759 +return'https'=== $this->getScheme() ? 443 : 80;
  760 +}
739 761 return $this->server->get('SERVER_PORT');
740 762 }
741 763 public function getUser()
... ... @@ -794,7 +816,7 @@ return&#39;&#39;=== $qs ? null : $qs;
794 816 public function isSecure()
795 817 {
796 818 if (self::$trustedProxies && self::$trustedHeaders[self::HEADER_CLIENT_PROTO] && $proto = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PROTO])) {
797   -return in_array(strtolower($proto), array('https','on','1'));
  819 +return in_array(strtolower(current(explode(',', $proto))), array('https','on','ssl','1'));
798 820 }
799 821 return'on'== strtolower($this->server->get('HTTPS')) || 1 == $this->server->get('HTTPS');
800 822 }
... ... @@ -1058,7 +1080,7 @@ do {
1058 1080 $seg = $segs[$index];
1059 1081 $baseUrl ='/'.$seg.$baseUrl;
1060 1082 ++$index;
1061   -} while (($last > $index) && (false !== ($pos = strpos($path, $baseUrl))) && (0 != $pos));
  1083 +} while ($last > $index && (false !== $pos = strpos($path, $baseUrl)) && 0 != $pos);
1062 1084 }
1063 1085 $requestUri = $this->getRequestUri();
1064 1086 if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl)) {
... ... @@ -1068,14 +1090,14 @@ if ($baseUrl &amp;&amp; false !== $prefix = $this-&gt;getUrlencodedPrefix($requestUri, dirn
1068 1090 return rtrim($prefix,'/');
1069 1091 }
1070 1092 $truncatedRequestUri = $requestUri;
1071   -if (($pos = strpos($requestUri,'?')) !== false) {
  1093 +if (false !== $pos = strpos($requestUri,'?')) {
1072 1094 $truncatedRequestUri = substr($requestUri, 0, $pos);
1073 1095 }
1074 1096 $basename = basename($baseUrl);
1075 1097 if (empty($basename) || !strpos(rawurldecode($truncatedRequestUri), $basename)) {
1076 1098 return'';
1077 1099 }
1078   -if ((strlen($requestUri) >= strlen($baseUrl)) && ((false !== ($pos = strpos($requestUri, $baseUrl))) && ($pos !== 0))) {
  1100 +if (strlen($requestUri) >= strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && $pos !== 0) {
1079 1101 $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl));
1080 1102 }
1081 1103 return rtrim($baseUrl,'/');
... ... @@ -1107,7 +1129,7 @@ $pathInfo =&#39;/&#39;;
1107 1129 if ($pos = strpos($requestUri,'?')) {
1108 1130 $requestUri = substr($requestUri, 0, $pos);
1109 1131 }
1110   -if ((null !== $baseUrl) && (false === ($pathInfo = substr($requestUri, strlen($baseUrl))))) {
  1132 +if (null !== $baseUrl && false === $pathInfo = substr($requestUri, strlen($baseUrl))) {
1111 1133 return'/';
1112 1134 } elseif (null === $baseUrl) {
1113 1135 return $requestUri;
... ... @@ -1234,7 +1256,7 @@ $headers-&gt;set(&#39;Content-Type&#39;, $mimeType);
1234 1256 $charset = $this->charset ?:'UTF-8';
1235 1257 if (!$headers->has('Content-Type')) {
1236 1258 $headers->set('Content-Type','text/html; charset='.$charset);
1237   -} elseif (0 === strpos($headers->get('Content-Type'),'text/') && false === strpos($headers->get('Content-Type'),'charset')) {
  1259 +} elseif (0 === stripos($headers->get('Content-Type'),'text/') && false === stripos($headers->get('Content-Type'),'charset')) {
1238 1260 $headers->set('Content-Type', $headers->get('Content-Type').'; charset='.$charset);
1239 1261 }
1240 1262 if ($headers->has('Transfer-Encoding')) {
... ... @@ -1892,7 +1914,7 @@ throw new RuntimeException(sprintf(&#39;You cannot set service &quot;%s&quot; of inactive scop
1892 1914 $this->scopedServices[$scope][$id] = $service;
1893 1915 }
1894 1916 $this->services[$id] = $service;
1895   -if (method_exists($this, $method ='synchronize'.strtr($id, array('_'=>'','.'=>'_')).'Service')) {
  1917 +if (method_exists($this, $method ='synchronize'.strtr($id, array('_'=>'','.'=>'_','\\'=>'_')).'Service')) {
1896 1918 $this->$method();
1897 1919 }
1898 1920 if (self::SCOPE_CONTAINER !== $scope && null === $service) {
... ... @@ -1905,26 +1927,31 @@ unset($this-&gt;services[$id]);
1905 1927 public function has($id)
1906 1928 {
1907 1929 $id = strtolower($id);
1908   -return array_key_exists($id, $this->services)
1909   -|| array_key_exists($id, $this->aliases)
1910   -|| method_exists($this,'get'.strtr($id, array('_'=>'','.'=>'_')).'Service')
  1930 +return isset($this->services[$id])
  1931 +|| array_key_exists($id, $this->services)
  1932 +|| isset($this->aliases[$id])
  1933 +|| method_exists($this,'get'.strtr($id, array('_'=>'','.'=>'_','\\'=>'_')).'Service')
1911 1934 ;
1912 1935 }
1913 1936 public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
1914 1937 {
  1938 +foreach (array(false, true) as $strtolower) {
  1939 +if ($strtolower) {
1915 1940 $id = strtolower($id);
  1941 +}
1916 1942 if (isset($this->aliases[$id])) {
1917 1943 $id = $this->aliases[$id];
1918 1944 }
1919   -if (array_key_exists($id, $this->services)) {
  1945 +if (isset($this->services[$id]) || array_key_exists($id, $this->services)) {
1920 1946 return $this->services[$id];
1921 1947 }
  1948 +}
1922 1949 if (isset($this->loading[$id])) {
1923 1950 throw new ServiceCircularReferenceException($id, array_keys($this->loading));
1924 1951 }
1925 1952 if (isset($this->methodMap[$id])) {
1926 1953 $method = $this->methodMap[$id];
1927   -} elseif (method_exists($this, $method ='get'.strtr($id, array('_'=>'','.'=>'_')).'Service')) {
  1954 +} elseif (method_exists($this, $method ='get'.strtr($id, array('_'=>'','.'=>'_','\\'=>'_')).'Service')) {
1928 1955 } else {
1929 1956 if (self::EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior) {
1930 1957 if (!$id) {
... ... @@ -1959,7 +1986,8 @@ return $service;
1959 1986 }
1960 1987 public function initialized($id)
1961 1988 {
1962   -return array_key_exists(strtolower($id), $this->services);
  1989 +$id = strtolower($id);
  1990 +return isset($this->services[$id]) || array_key_exists($id, $this->services);
1963 1991 }
1964 1992 public function getServiceIds()
1965 1993 {
... ... @@ -2053,7 +2081,7 @@ return isset($this-&gt;scopedServices[$name]);
2053 2081 }
2054 2082 public static function camelize($id)
2055 2083 {
2056   -return strtr(ucwords(strtr($id, array('_'=>' ','.'=>'_ '))), array(' '=>''));
  2084 +return strtr(ucwords(strtr($id, array('_'=>' ','.'=>'_ ','\\'=>'_ '))), array(' '=>''));
2057 2085 }
2058 2086 public static function underscore($id)
2059 2087 {
... ... @@ -2075,7 +2103,6 @@ public function handle(Request $request, $type = self::MASTER_REQUEST, $catch =
2075 2103 namespace Symfony\Component\HttpKernel
2076 2104 {
2077 2105 use Symfony\Component\DependencyInjection\ContainerInterface;
2078   -use Symfony\Component\HttpKernel\HttpKernelInterface;
2079 2106 use Symfony\Component\HttpKernel\Bundle\BundleInterface;
2080 2107 use Symfony\Component\Config\Loader\LoaderInterface;
2081 2108 interface KernelInterface extends HttpKernelInterface, \Serializable
... ... @@ -2123,7 +2150,6 @@ use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
2123 2150 use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
2124 2151 use Symfony\Component\HttpFoundation\Request;
2125 2152 use Symfony\Component\HttpFoundation\Response;
2126   -use Symfony\Component\HttpKernel\HttpKernelInterface;
2127 2153 use Symfony\Component\HttpKernel\Bundle\BundleInterface;
2128 2154 use Symfony\Component\HttpKernel\Config\FileLocator;
2129 2155 use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass;
... ... @@ -2144,12 +2170,11 @@ protected $booted;
2144 2170 protected $name;
2145 2171 protected $startTime;
2146 2172 protected $loadClassCache;
2147   -protected $errorReportingLevel;
2148   -const VERSION ='2.3.4';
2149   -const VERSION_ID ='20304';
  2173 +const VERSION ='2.3.9';
  2174 +const VERSION_ID ='20309';
2150 2175 const MAJOR_VERSION ='2';
2151 2176 const MINOR_VERSION ='3';
2152   -const RELEASE_VERSION ='4';
  2177 +const RELEASE_VERSION ='9';
2153 2178 const EXTRA_VERSION ='';
2154 2179 public function __construct($environment, $debug)
2155 2180 {
... ... @@ -2371,7 +2396,8 @@ $directChildren[$parentName] = $name;
2371 2396 $topMostBundles[$name] = $bundle;
2372 2397 }
2373 2398 }
2374   -if (count($diff = array_values(array_diff(array_keys($directChildren), array_keys($this->bundles))))) {
  2399 +if (!empty($directChildren) && count($diff = array_diff_key($directChildren, $this->bundles))) {
  2400 +$diff = array_keys($diff);
2375 2401 throw new \LogicException(sprintf('Bundle "%s" extends bundle "%s", which is not registered.', $directChildren[$diff[0]], $diff[0]));
2376 2402 }
2377 2403 $this->bundleMap = array();
... ... @@ -2490,7 +2516,7 @@ $dumper-&gt;setProxyDumper(new ProxyDumper());
2490 2516 }
2491 2517 $content = $dumper->dump(array('class'=> $class,'base_class'=> $baseClass));
2492 2518 if (!$this->debug) {
2493   -$content = self::stripComments($content);
  2519 +$content = static::stripComments($content);
2494 2520 }
2495 2521 $cache->write($content, $container->getResources());
2496 2522 }
... ...
app/config/config.yml
... ... @@ -140,4 +140,8 @@ services:
140 140 tags:
141 141 - name: twig.extension
142 142 elfinder.driver.filesystem:
143   - class: FM\ElFinderPHP\Driver\ElFinderVolumeLocalFileSystem
144 143 \ No newline at end of file
  144 + class: FM\ElFinderPHP\Driver\ElFinderVolumeLocalFileSystem
  145 + cacic_demo.command.demo_command:
  146 + class: Cacic\CommonBundle\Command\DemoCommand
  147 + tags:
  148 + - { name: console.command }
145 149 \ No newline at end of file
... ...
composer.json
... ... @@ -43,7 +43,9 @@
43 43 "ijanki/ftp-bundle": "*",
44 44 "jms/translation-bundle": "1.1.*@dev",
45 45 "jquery/jquery": "1.9.*",
46   - "helios-ag/fm-elfinder-bundle": "1.x"
  46 + "helios-ag/fm-elfinder-bundle": "1.x",
  47 + "knplabs/knp-menu": "2.0.*@dev",
  48 + "knplabs/knp-menu-bundle":"dev-master"
47 49 },
48 50 "scripts": {
49 51 "post-install-cmd": [
... ...
composer.phar
No preview for this file type
src/Cacic/CommonBundle/Command/DemoCommand.php 0 → 100644
... ... @@ -0,0 +1,76 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: eduardo
  5 + * Date: 20/01/14
  6 + * Time: 12:18
  7 + */
  8 +
  9 +namespace Cacic\CommonBundle\Command;
  10 +
  11 +use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
  12 +use Symfony\Component\Console\Input\InputArgument;
  13 +use Symfony\Component\Console\Input\InputInterface;
  14 +use Symfony\Component\Console\Input\InputOption;
  15 +use Symfony\Component\Console\Output\OutputInterface;
  16 +use Cacic\WSBundle\Helper\OldCacicHelper;
  17 +
  18 +
  19 +/*
  20 + * Comando que carrega os dados de demonstração para o Cacic. Diferente dos data fixtures,
  21 + * inclui dados de coleta
  22 + */
  23 +class DemoCommand extends ContainerAwareCommand {
  24 + protected function configure()
  25 + {
  26 + $this
  27 + ->setName('cacic:demo')
  28 + ->setDescription('Carrega dados de demonstração do Cacic')
  29 + ->addArgument('name', InputArgument::OPTIONAL, 'Nome de quem está executando o comando, só para não perder o atributo')
  30 + ->addOption('force', null, InputOption::VALUE_NONE, 'Prossegue com a carga mesmo se acontecer algum erro')
  31 + ;
  32 + }
  33 +
  34 + protected function execute(InputInterface $input, OutputInterface $output)
  35 + {
  36 + $name = $input->getArgument('name');
  37 + $text = "Olá {$name}";
  38 +
  39 + // Conexão e execução do arquivo
  40 + $cacicHelper = new OldCacicHelper($this->getContainer()->get('kernel'));
  41 + $rootDir = $cacicHelper->getRootDir();
  42 + $demo = $rootDir."/src/Cacic/CommonBundle/Resources/data/demo.sql";
  43 + $container = $this->getContainer();
  44 +
  45 +
  46 + // Carrega configurações do banco de dados
  47 + $dbhost = $container->getParameter('database_host');
  48 + $db = $container->getParameter('database_name');
  49 + $port = $container->getParameter('database_port');
  50 + $user = $container->getParameter('database_user');
  51 + $pass = $container->getParameter('database_password');
  52 +
  53 + // A única forma que encontrei foi executar manualmente o psql
  54 + $exec_string = "psql -f $demo -U $user -d $db ";
  55 +
  56 + if (!empty($dbhost)) {
  57 + $exec_string .= "-h $dbhost ";
  58 + }
  59 +
  60 + if (!empty($port)) {
  61 + $exec_string .= "-p $port ";
  62 + }
  63 +
  64 + if (!empty($pass)) {
  65 + // Tem que passar a senha como variável
  66 + $exec("PG_PASSWORD=$pass");
  67 + }
  68 +
  69 + // Manda executar o psql
  70 + exec($exec_string);
  71 +
  72 + $force = ($input->getOption('force'));
  73 +
  74 + $output->writeln($text);
  75 + }
  76 +}
0 77 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Controller/AquisicaoController.php
... ... @@ -65,6 +65,7 @@ class AquisicaoController extends Controller
65 65  
66 66 if ( $request->isMethod('POST') )
67 67 {
  68 + // Debug::dump($form["dtAquisicao"]);die;
68 69 $form->bind( $request );
69 70  
70 71 if ( $form->isValid() )
... ...
src/Cacic/CommonBundle/Controller/Cacic26Controller.php
... ... @@ -9,6 +9,8 @@ use Symfony\Component\HttpFoundation\Request;
9 9 use Symfony\Component\HttpFoundation\Response;
10 10 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
11 11 use ZipArchive;
  12 +use Symfony\Component\Filesystem\Filesystem;
  13 +
12 14  
13 15 /**
14 16 *
... ... @@ -33,16 +35,24 @@ class Cacic26Controller extends Controller
33 35 {
34 36 {
35 37 // grava no diretório src/Cacic/CommonBundle/Resources/data
36   - $dirMigracao = realpath( dirname(__FILE__) .'/../Resources/data/' );
  38 + //$dirMigracao = realpath( dirname(__FILE__) .'/../Resources/data/' );
  39 +
  40 + //$fileName = 'importacao'.'.zip';
  41 + //$form['arquivo']->getData()->move($dirMigracao, $fileName);
37 42  
38   - $fileName = 'importacao'.'.zip';
39   - $form['arquivo']->getData()->move($dirMigracao, $fileName);
  43 + // Eduardo: 13/01/2014
  44 + // Altera a função de migração
  45 + $result = $this->importaPostgreSQL($form['arquivo']->getData());
40 46  
  47 + if ( $result ) {
  48 + $this->get('session')->getFlashBag()->add('success', 'Envio realizado com sucesso!');
  49 + } else {
  50 + $this->get('session')->getFlashBag()->add('error', 'Migração inválida! Ocorreu uma falha ao importar os arquivos');
  51 + }
41 52  
42   - $this->get('session')->getFlashBag()->add('success', 'Envio realizado com sucesso!');
43 53 }
44 54  
45   - return $this->redirect( $this->generateUrl( 'cacic_migracao_importador') );
  55 + //return $this->redirect( $this->generateUrl( 'cacic_migracao_importador') );
46 56 }
47 57  
48 58 return $this->render(
... ... @@ -50,6 +60,254 @@ class Cacic26Controller extends Controller
50 60 array( 'form' => $form->createView() )
51 61 );
52 62 }
  63 +
  64 + /*
  65 + * Função que importa os dadospara o banco de dados PostgreSQL
  66 + * @param $arquivo Arquivo .zip contendo dados gerados pelo extrator
  67 + */
  68 + public function importaPostgreSQL($arquivo) {
  69 + $tmpdir = sys_get_temp_dir();
  70 + $logger = $this->get('logger');
  71 + $importacao = $tmpdir.'/importacao';
  72 +
  73 + // Tabelas
  74 + $lista_tabelas = array(
  75 + //"acao",
  76 + "servidor_autenticacao",
  77 + "local",
  78 + "rede",
  79 + //"acao_excecao",
  80 + //"acao_rede",
  81 + "so",
  82 + //"acao_so",
  83 + "aplicativo",
  84 + "aplicativo_rede",
  85 + "aquisicao",
  86 + "tipo_licenca",
  87 + "software",
  88 + "aquisicao_item",
  89 + "computador",
  90 + "descricao_coluna_computador",
  91 + "grupo_usuario",
  92 + "insucesso_instalacao",
  93 + "usuario",
  94 + "local_secundario",
  95 + "log",
  96 + "unid_organizacional_nivel1",
  97 + "unid_organizacional_nivel1a",
  98 + "unid_organizacional_nivel2",
  99 + "patrimonio",
  100 + "patrimonio_config_interface",
  101 + "rede_grupo_ftp",
  102 + "rede_versao_modulo",
  103 + "software_estacao",
  104 + "srcacic_chat",
  105 + "srcacic_conexao",
  106 + "srcacic_sessao",
  107 + "srcacic_transf",
  108 + "teste",
  109 + "tipo_software",
  110 + "tipo_uorg",
  111 + "uorg",
  112 + "usb_vendor",
  113 + "usb_device",
  114 + "usb_log"
  115 + );
  116 +
  117 + // Sequências
  118 + $lista_sequencias = array(
  119 + "aplicativo" => array(
  120 + "id_aplicativo", "aplicativo_id_aplicativo_seq"
  121 + ),
  122 + "aquisicao" => array(
  123 + "id_aquisicao", "aquisicao_id_aquisicao_seq"
  124 + ),
  125 + "computador" => array(
  126 + "id_computador", "computador_id_computador_seq"
  127 + ),
  128 + "grupo_usuario" => array(
  129 + "id_grupo_usuario", "grupo_usuario_id_grupo_usuario_seq"
  130 + ),
  131 + "insucesso_instalacao" => array(
  132 + "id_insucesso_instalacao", "insucesso_instalacao_id_insucesso_instalacao_seq"
  133 + ),
  134 + "local" => array(
  135 + "id_local", "local_id_local_seq"
  136 + ),
  137 + "log" => array(
  138 + "id_log", "log_id_log_seq"
  139 + ),
  140 + "patrimonio" => array(
  141 + "id_patrimonio", "patrimonio_id_patrimonio_seq"
  142 + ),
  143 + "rede_grupo_ftp" => array(
  144 + "id_ftp", "rede_grupo_ftp_id_ftp_seq"
  145 + ),
  146 + "rede" => array(
  147 + "id_rede", "rede_id_rede_seq"
  148 + ),
  149 + "rede_versao_modulo" => array(
  150 + "id_rede_versao_modulo", "rede_versao_modulo_id_rede_versao_modulo_seq"
  151 + ),
  152 + "servidor_autenticacao" => array(
  153 + "id_servidor_autenticacao", "servidor_autenticacao_id_servidor_autenticacao_seq"
  154 + ),
  155 + "so" => array(
  156 + "id_so", "so_id_so_seq"
  157 + ),
  158 + "software" => array(
  159 + "id_software", "software_id_software_seq"
  160 + ),
  161 + "srcacic_action" => array(
  162 + "id_srcacic_action", "srcacic_action_id_srcacic_action_seq"
  163 + ),
  164 + "srcacic_chat" => array(
  165 + "id_srcacic_chat", "srcacic_chat_id_srcacic_chat_seq"
  166 + ),
  167 + "srcacic_conexao" => array(
  168 + "id_srcacic_conexao", "srcacic_conexao_id_srcacic_conexao_seq"
  169 + ),
  170 + "srcacic_sessao" => array(
  171 + "id_srcacic_sessao", "srcacic_sessao_id_srcacic_sessao_seq"
  172 + ),
  173 + "srcacic_transf" => array(
  174 + "id_srcacic_transf", "srcacic_transf_id_srcacic_transf_seq"
  175 + ),
  176 + "teste" => array(
  177 + "id_transacao", "teste_id_transacao_seq"
  178 + ),
  179 + "tipo_licenca" => array(
  180 + "id_tipo_licenca", "tipo_licenca_id_tipo_licenca_seq"
  181 + ),
  182 + "tipo_software" => array(
  183 + "id_tipo_software", "tipo_software_id_tipo_software_seq"
  184 + ),
  185 + "tipo_uorg" => array(
  186 + "id_tipo_uorg", "tipo_uorg_id_tipo_uorg_seq"
  187 + ),
  188 + "unid_organizacional_nivel1" => array(
  189 + "id_unid_organizacional_nivel1", "unid_organizacional_nivel1_id_unid_organizacional_nivel1_seq"
  190 + ),
  191 + "unid_organizacional_nivel1a" => array(
  192 + "id_unid_organizacional_nivel1a", "unid_organizacional_nivel1a_id_unid_organizacional_nivel1a_seq"
  193 + ),
  194 + "unid_organizacional_nivel2" => array(
  195 + "id_unid_organizacional_nivel2", "unid_organizacional_nivel2_id_unid_organizacional_nivel2_seq"
  196 + ),
  197 + "uorg" => array(
  198 + "id_uorg", "uorg_id_uorg_seq"
  199 + ),
  200 + "usb_log" => array(
  201 + "id_usb_log", "usb_log_id_usb_log_seq"
  202 + ),
  203 + "usuario" => array(
  204 + "id_usuario", "usuario_id_usuario_seq"
  205 + )
  206 + );
  207 +
  208 +
  209 + // Cria um diretório temporário com todos os dados extraídos
  210 + $zip = new ZipArchive();
  211 + $x = $zip->open($arquivo);
  212 +
  213 + $logger->info("Extraindo arquivo de importação no diretorio {$importacao}");
  214 + if ($x === TRUE) {
  215 + $zip->extractTo($importacao);
  216 + $zip->close();
  217 + $logger->info('Arquivo.zip extraído com sucesso');
  218 + } else {
  219 + $logger->error("Erro na extração do arquivo {$x}");
  220 + return false;
  221 + }
  222 +
  223 + // Carrega configurações do banco de dados
  224 + $dbhost = $this->container->getParameter('database_host');
  225 + $db = $this->container->getParameter('database_name');
  226 + $port = $this->container->getParameter('database_port');
  227 + $user = $this->container->getParameter('database_user');
  228 + $pass = $this->container->getParameter('database_password');
  229 +
  230 + if ($dbhost) {
  231 + $dbcon = new PDOConnection("pgsql:host={$dbhost};dbname={$db};port={$port}", $user, $pass);
  232 + } else {
  233 + $dbcon = new PDOConnection("pgsql:dbname={$db};port={$port}", $user, $pass);
  234 + }
  235 +
  236 + // Ou funciona tudo ou não funciona nada
  237 + $dbcon->beginTransaction();
  238 +
  239 + // Primeiro apaga os dados por tabela
  240 + $excluir = array('configuracao_local');
  241 + $excluir = array_reverse(array_merge($lista_tabelas, $excluir));
  242 +
  243 + foreach ($excluir as $tabela) {
  244 + $logger->info("Apagando a tabela {$tabela}");
  245 + try {
  246 + // Apaga a tabela e carrega os dados do arquivo CSV
  247 + $dbcon->exec("DELETE FROM {$tabela} CASCADE");
  248 + } catch (Exception $e) {
  249 + // Falha, dá um rollback e retorna falso
  250 + $logger->error("Erro na exclusão \n" . $e->getMessage());
  251 + $dbcon->rollBack();
  252 + return false;
  253 + }
  254 + }
  255 +
  256 + // Agora carrega os dados
  257 + foreach ($lista_tabelas as $tabela) {
  258 + if (file_exists("{$importacao}/{$tabela}.csv")) {
  259 + $logger->info("Importando a tabela {$tabela}");
  260 + try {
  261 + // Apaga a tabela e carrega os dados do arquivo CSV
  262 + $dbcon->exec("COPY {$tabela} FROM '{$tmpdir}/importacao/{$tabela}.csv' DELIMITER ';' NULL E'\\\N' CSV ESCAPE '\"'");
  263 + } catch (Exception $e) {
  264 + // Falha, dá um rollback e retorna falso
  265 + $logger->error("Erro na importação \n" . $e->getMessage());
  266 + $dbcon->rollBack();
  267 + return false;
  268 + }
  269 + }
  270 + }
  271 +
  272 + // Se tudo funcionou bem, é prciso ajustar o valor das sequências
  273 + foreach ($lista_sequencias as $tabela => $value) {
  274 + // Atualiza as sequencias de auto-increment
  275 + $logger->info("Carregando a sequência para a tabela {$tabela} ....");
  276 + foreach ($dbcon->query("SELECT MAX({$value[0]}) AS $value[0] FROM {$tabela}") as $row) {
  277 + $result = $row["{$value[0]}"];
  278 + }
  279 + if ($result) {
  280 + $logger->info("Ajustando a sequência {$value[1]} para o valor máximo {$result} ...");
  281 + $dbcon->exec("SELECT setval('{$value[1]}', {$result})");
  282 + } else {
  283 + $logger->error("Valor máximo não encontrado para a tabela {$tabela}, ID {$value[0]} e sequência {$value[1]}");
  284 + }
  285 +
  286 + }
  287 +
  288 + // Finaliza a transação
  289 + $dbcon->commit();
  290 +
  291 + // Armazena as senhas para todos os usuários criados
  292 + $arrUsuarios = $this->getDoctrine()->getRepository( 'CacicCommonBundle:Usuario' )->findAll();
  293 + foreach ($arrUsuarios as $usuario) {
  294 + $logger->info("Corrige a senha do usuario {$usuario->getNmUsuarioCompleto()} .....");
  295 + $encoder = $this->container
  296 + ->get('security.encoder_factory')
  297 + ->getEncoder($usuario)
  298 + ;
  299 + // Guarda a senha criptografada
  300 + $usuario->setTeSenha($encoder->encodePassword($usuario->getTeSenha(), $usuario->getSalt()));
  301 + $this->getDoctrine()->getManager()->persist($usuario);
  302 + $this->getDoctrine()->getManager()->flush();
  303 + }
  304 +
  305 + // Finaliza a importação e apaga os arquivos
  306 + $fs = new Filesystem();
  307 + $fs->remove($importacao);
  308 + return true;
  309 + }
  310 +
53 311 public function importarscriptAction(){
54 312 function getconfig() {
55 313 // fixme: do it the synfony way
... ... @@ -67,15 +325,18 @@ class Cacic26Controller extends Controller
67 325 // Conexão com o banco
68 326 $config = @getconfig();
69 327 $server = $config[2];
  328 + $port = $config[3];
70 329 $db = $config[4];
71 330 $user = $config[5];
72 331 $pass = $config[6];
73 332  
  333 + error_log("11111111111111111111111111111111" . $config . " | " . $server . " | " . $db . " | " . $user . " | " . $pass);
  334 +
74 335 if ($server != 'null') {
75   - $dbcon = new PDOConnection("pgsql:host={$server};dbname={$db}", $user, $pass);
  336 + $dbcon = new PDOConnection("pgsql:host={$server};dbname={$db};port={$port}", $user, $pass);
76 337  
77 338 } else {
78   - $dbcon = new PDOConnection("pgsql:dbname={$db}", $user, $pass);
  339 + $dbcon = new PDOConnection("pgsql:dbname={$db};port={$port}", $user, $pass);
79 340  
80 341  
81 342 }
... ...
src/Cacic/CommonBundle/Controller/GrupoUsuarioController.php
... ... @@ -71,13 +71,21 @@ class GrupoUsuarioController extends Controller
71 71  
72 72 if ( $form->isValid() )
73 73 {
74   - $this->getDoctrine()->getManager()->persist( $GrupoUsuario );
75   - $this->getDoctrine()->getManager()->flush();
  74 + $csNivel = $this->getDoctrine()->getRepository('CacicCommonBundle:GrupoUsuario')->nivel($GrupoUsuario);
76 75  
  76 + if($csNivel[0]['teGrupoUsuarios'] != "Administração")
  77 + {
  78 + $this->getDoctrine()->getManager()->persist( $GrupoUsuario );
  79 + $this->getDoctrine()->getManager()->flush();
77 80  
78   - $this->get('session')->getFlashBag()->add('success', 'Dados salvos com sucesso!');
79 81  
80   - return $this->redirect($this->generateUrl('cacic_grupo_usuario_editar', array( 'idGrupoUsuario'=>$GrupoUsuario->getIdGrupoUsuario() ) ) );
  82 + $this->get('session')->getFlashBag()->add('success', 'Dados salvos com sucesso!');
  83 +
  84 + return $this->redirect($this->generateUrl('cacic_grupo_usuario_editar', array( 'idGrupoUsuario'=>$GrupoUsuario->getIdGrupoUsuario() ) ) );
  85 + }else{
  86 + $this->get('session')->getFlashBag()->add('error', 'O Grupo de Administradores, não pode ser editado!!!');
  87 + }
  88 +
81 89 }
82 90 }
83 91  
... ... @@ -97,13 +105,21 @@ class GrupoUsuarioController extends Controller
97 105 if ( ! $GrupoUsuario )
98 106 throw $this->createNotFoundException( 'Grupo de Usuario não encontrado' );
99 107  
100   - $em = $this->getDoctrine()->getManager();
101   - $em->remove( $GrupoUsuario );
102   - $em->flush();
  108 + $csNivel = $this->getDoctrine()->getRepository('CacicCommonBundle:GrupoUsuario')->nivel($request->get('id'));
103 109  
104   - $response = new Response( json_encode( array('status' => 'ok') ) );
105   - $response->headers->set('Content-Type', 'application/json');
  110 + if($csNivel[0]['teGrupoUsuarios'] != "Administração")
  111 + {
  112 + $em = $this->getDoctrine()->getManager();
  113 + $em->remove( $GrupoUsuario );
  114 + $em->flush();
  115 +
  116 + $response = new Response( json_encode( array('status' => 'ok') ) );
  117 + $response->headers->set('Content-Type', 'application/json');
  118 +
  119 + return $response;
  120 + }else{
  121 + $this->get('session')->getFlashBag()->add('error', 'O Grupo de Administradores, não pode ser Excluido!!!');
  122 + }
106 123  
107   - return $response;
108 124 }
109 125 }
110 126 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Controller/ModuloController.php
... ... @@ -19,11 +19,14 @@ class ModuloController extends Controller
19 19 */
20 20 public function indexAction()
21 21 {
  22 + $usuario = $this->getUser()->getIdUsuario();
  23 + $nivel = $this->getDoctrine()->getRepository('CacicCommonBundle:Usuario' )->nivel($usuario);
  24 +
22 25 $local = $this->getUser()->getIdLocal(); // Recupera o Local da sessão do usuário logado
23 26  
24   - $modulos = $this->getDoctrine()->getRepository('CacicCommonBundle:Acao')->listarModulosOpcionais( $local->getIdLocal() );
  27 + $modulos = $this->getDoctrine()->getRepository('CacicCommonBundle:Acao')->listarModulosOpcionais( $nivel, $local->getIdLocal() );
25 28 $totalRedes = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->countByLocal( $local->getIdLocal() );
26   -
  29 + //Debug::dump($modulos);die;
27 30 return $this->render(
28 31 'CacicCommonBundle:Modulo:index.html.twig',
29 32 array('modulos'=>$modulos, 'local'=>$local, 'totalRedes'=>$totalRedes)
... ... @@ -39,12 +42,16 @@ class ModuloController extends Controller
39 42 */
40 43 public function editarAction( $idAcao, Request $request )
41 44 {
  45 + $usuario = $this->getUser()->getIdUsuario();
  46 + $nivel = $this->getDoctrine()->getRepository('CacicCommonBundle:Usuario' )->nivel($usuario);
  47 +
  48 +
42 49 $modulo = $this->getDoctrine()->getRepository( 'CacicCommonBundle:Acao' )->find( $idAcao );
43 50 if ( ! $modulo )
44 51 throw $this->createNotFoundException( 'Página não encontrada' );
45   -
  52 +
46 53 $local = $this->getUser()->getIdLocal(); /* @todo Em caso de usuário administrativo, escolher o Local */
47   -
  54 +
48 55 if ( $request->isMethod('POST') )
49 56 {
50 57 $_data = $request->get('modulo');
... ... @@ -61,8 +68,14 @@ class ModuloController extends Controller
61 68 $this->get('session')->getFlashBag()->add('success', 'Dados salvos com sucesso!');
62 69 return $this->redirect( $this->generateUrl( 'cacic_modulo_editar', array('idAcao'=>$idAcao) ) );
63 70 }
64   -
65   - $redes = $this->getDoctrine()->getRepository( 'CacicCommonBundle:Rede' )->listarPorLocal( $local );
  71 + if($nivel[0]['teGrupoUsuarios'] != "Administração")
  72 + {
  73 + $redes = $this->getDoctrine()->getRepository( 'CacicCommonBundle:Rede' )->listarPorLocal( $local );
  74 + }else
  75 + {
  76 + $redes = $this->getDoctrine()->getRepository( 'CacicCommonBundle:Rede' )->listarPorLocalADM();
  77 + }
  78 +
66 79 $so = $this->getDoctrine()->getRepository( 'CacicCommonBundle:So' )->listar(); // Recupera a lista de SOs cadastrados
67 80  
68 81 $redesSelecionadas = array_keys( // Recupera as Redes já associadas à Ação
... ...
src/Cacic/CommonBundle/Controller/RedeController.php
... ... @@ -12,6 +12,7 @@ use Cacic\CommonBundle\Form\Type\RedeType;
12 12 use Cacic\WSBundle\Helper;
13 13 use Cacic\CommonBundle\Helper as CacicHelper;
14 14 use Ijanki\Bundle\FtpBundle\Exception\FtpException;
  15 +use Symfony\Component\Validator\Constraints\Null;
15 16  
16 17 /**
17 18 *
... ... @@ -29,7 +30,7 @@ class RedeController extends Controller
29 30 */
30 31 public function indexAction( $page )
31 32 {
32   - return $this->render(
  33 + return $this->render(
33 34 'CacicCommonBundle:Rede:index.html.twig',
34 35 array( 'rede' => $this->getDoctrine()->getRepository( 'CacicCommonBundle:Rede' )->paginar( $this->get( 'knp_paginator' ), $page )
35 36 ));
... ... @@ -38,6 +39,7 @@ class RedeController extends Controller
38 39  
39 40 public function cadastrarAction(Request $request)
40 41 {
  42 + $logger = $this->get('logger');
41 43 $rede = new Rede();
42 44 $form = $this->createForm( new RedeType(), $rede );
43 45  
... ... @@ -49,6 +51,17 @@ class RedeController extends Controller
49 51 $this->getDoctrine()->getManager()->persist( $rede );
50 52 $this->getDoctrine()->getManager()->flush(); //Persiste os dados do Usuário
51 53  
  54 + // Marca todas as ações para a rede
  55 + $habilitar = $form['habilitar']->getData();
  56 + $nmRede = $rede->getNmRede();
  57 + if ($habilitar) {
  58 + $logger->debug("Habilitando todas as ações para a rede $nmRede ...");
  59 + $this->getDoctrine()->getRepository( 'CacicCommonBundle:AcaoRede' )->atualizarPorRede( array( $rede ) );
  60 + }
  61 +
  62 + // Grava os dados da tabela rede versão módulo
  63 + $logger->debug("Realizando o update de subredes para a rede $nmRede ...");
  64 +
52 65 // Grava os dados da tabela rede versão módulo
53 66 $this->updateSubredes($rede);
54 67  
... ... @@ -67,6 +80,7 @@ class RedeController extends Controller
67 80 */
68 81 public function editarAction( $idRede, Request $request )
69 82 {
  83 + $logger = $this->get('logger');
70 84 $rede = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->find( $idRede );
71 85 if ( ! $rede )
72 86 throw $this->createNotFoundException( 'Subrede não encontrado' );
... ... @@ -82,7 +96,16 @@ class RedeController extends Controller
82 96 $this->getDoctrine()->getManager()->persist( $rede );
83 97 $this->getDoctrine()->getManager()->flush();// Efetuar a edição do ServidorAutenticacao
84 98  
  99 + // Marca todas as ações para a rede
  100 + $habilitar = $form['habilitar']->getData();
  101 + $nmRede = $rede->getNmRede();
  102 + if ($habilitar) {
  103 + $logger->debug("Habilitando todas as ações para a rede $nmRede ...");
  104 + $this->getDoctrine()->getRepository( 'CacicCommonBundle:AcaoRede' )->atualizarPorRede( array( $rede ) );
  105 + }
  106 +
85 107 // Grava os dados da tabela rede versão módulo
  108 + $logger->debug("Realizando o update de subredes para a rede $nmRede ...");
86 109 $this->updateSubredes($rede);
87 110  
88 111 $this->get('session')->getFlashBag()->add('success', 'Dados salvos com sucesso!');
... ... @@ -180,43 +203,195 @@ class RedeController extends Controller
180 203  
181 204 public function manutencaoAction(Request $request)
182 205 {
  206 + $logger = $this->get('logger');
  207 +
  208 + // Primeiro carrega lista dos módulos
  209 + $modulos = $this->modulosArray();
  210 +
183 211  
184 212 if ( $request->isMethod('POST') )
185 213 {
186 214 if ( count( $request->get('subrede') ) )
187   - {
188   - foreach ( $request->get('subrede') as $resultado )
189 215 {
190   - $manutencao = $this->getDoctrine()->getRepository('CacicCommonBundle:RedeVersaoModulo')->find( $resultado );
191 216  
192   - if ( ! $manutencao )
  217 + foreach ( $request->get('subrede') as $resultado )
193 218 {
194   - $this->get('session')->getFlashBag()->add('error', 'Dados inválidos');
195   - break;
  219 + $logger->debug("Atualizando a subrede {$resultado} ...");
  220 +
  221 + // Junta os módulos windows e linux para enviar para o update de subredes
  222 + $atualizaWindows = $request->get('windows');
  223 + $atualizaLinux = $request->get('linux');
  224 +
  225 + // FIXME: Na requisição só vem o nome dos módulos. Precisa carregar as outras informações.
  226 +
  227 + // Evita Warning do array merge se um dos dois for vazio
  228 + if (empty($atualizaLinux)) {
  229 + $atualiza = $atualizaWindows;
  230 + } elseif (empty($atualizaWindows)) {
  231 + $atualiza = $atualizaLinux;
  232 + } else {
  233 + $atualiza = array_merge($atualizaWindows, $atualizaLinux);
  234 + }
  235 +
  236 + // Passa a rede como parâmetro
  237 + $redeAtualizar = $this->getDoctrine()->getManager()->find('CacicCommonBundle:Rede', $resultado);
  238 +
  239 +
  240 + // Executa a atualização de todos os módulos marcados para a subrede marcada
  241 + $this->updateSubredes($redeAtualizar, $atualiza);
  242 +
196 243 }
197   - $this->getDoctrine()->getManager()->persist( $manutencao );
198   - $this->getDoctrine()->getManager()->flush();
  244 + $this->get('session')->getFlashBag()->add('success', 'Dados salvos com sucesso!');
199 245 }
200   - $this->get('session')->getFlashBag()->add('success', 'Dados salvos com sucesso!');
201 246 }
202   - else
203   - $this->get('session')->getFlashBag()->add('error', 'Nenhum software informado!');
204 247  
  248 + // Lista de subredes e módulos
  249 + $subredesOrig = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->comLocal();
  250 +
  251 + // Varro todas as subredes para cada módulo
  252 + $subredes = array();
  253 + $windows = array();
  254 + $linux = array();
  255 + foreach ($subredesOrig as $redeItem) {
  256 + // Busca o módulo em cada uma das redes
  257 + $codigos = array();
  258 + foreach ($modulos as $key => $value) {
  259 + $idRede = $redeItem['idRede'];
  260 + // Verifico se o módulo existe na subrede
  261 + $rede = $this->getDoctrine()->getRepository('CacicCommonBundle:RedeVersaoModulo')->subrede($idRede, $key);
  262 +
  263 + if (empty($rede)) {
  264 + // O módulo não foi encontrado. Adiciona o código 1
  265 + array_push($codigos, 0);
  266 + //$rede = $redeItem[0];
  267 + } else {
  268 + if ($value['hash'] == $rede[0]['teHash']) {
  269 + // Se o hash for igual, adiciona o código 2
  270 + array_push($codigos, 2);
  271 +
  272 + } else {
  273 + // Se o hash for diferente, adiciona o código 1
  274 + array_push($codigos, 1);
  275 + }
  276 + }
  277 +
  278 + // Cria um array para Windows e outro para Linux
  279 + if ($value['tipoSo'] == 'windows') {
  280 + $windows[$key] = $value;
  281 + } else {
  282 + $linux[$key] = $value;
  283 + }
205 284  
206   - return $this->redirect(
207   - $this->generateUrl( 'cacic_subrede_manutencao'
208   - )
209   - );
210 285 }
  286 +
  287 + // Define o elemento HTML para os módulos
  288 + if (in_array(0, $codigos)) {
  289 + // Se o código 0 for encontrato, marcamos o módulo como inexistente
  290 + if (empty($rede)) {
  291 + $rede[0] = $redeItem;
  292 + }
  293 + $subredes["$idRede"]['teIpRede'] = $rede[0]['teIpRede'];
  294 + $subredes["$idRede"]['nmRede'] = $rede[0]['nmRede'];
  295 + $subredes["$idRede"]['teServUpdates'] = $rede[0]['teServUpdates'];
  296 + $subredes["$idRede"]['tePathServUpdates'] = $rede[0]['tePathServUpdates'];
  297 + $subredes["$idRede"]['nmLocal'] = $rede[0]['nmLocal'];
  298 + $subredes["$idRede"]['codigo'] = "<span class='label label-important'>Módulos inexistentes</span>";
  299 + } elseif (in_array(1, $codigos)) {
  300 + // Se o código 1 for encontrado, alguns módulos estão desatualizados
  301 + $subredes["$idRede"]['teIpRede'] = $rede[0]['teIpRede'];
  302 + $subredes["$idRede"]['nmRede'] = $rede[0]['nmRede'];
  303 + $subredes["$idRede"]['teServUpdates'] = $rede[0]['teServUpdates'];
  304 + $subredes["$idRede"]['tePathServUpdates'] = $rede[0]['tePathServUpdates'];
  305 + $subredes["$idRede"]['nmLocal'] = $rede[0]['nmLocal'];
  306 + $subredes["$idRede"]['codigo'] = "<span class='label label-warning'>Módulos desatualizados</span>";
  307 + } else {
  308 + // Se não existe nenhum módulo inexistente ou desatualizado, está tudo 100% atualizado
  309 + $subredes["$idRede"]['teIpRede'] = $rede[0]['teIpRede'];
  310 + $subredes["$idRede"]['nmRede'] = $rede[0]['nmRede'];
  311 + $subredes["$idRede"]['teServUpdates'] = $rede[0]['teServUpdates'];
  312 + $subredes["$idRede"]['tePathServUpdates'] = $rede[0]['tePathServUpdates'];
  313 + $subredes["$idRede"]['nmLocal'] = $rede[0]['nmLocal'];
  314 + $subredes["$idRede"]['codigo'] = "<span class='label label-success'>Módulos atualizados</span>";
  315 + }
  316 + }
  317 +
211 318 return $this->render( 'CacicCommonBundle:Rede:manutencao.html.twig',
212   - array( 'windows'=> $this->getDoctrine()->getRepository('CacicCommonBundle:RedeVersaoModulo')->listarWindows(),
213   - 'linux' => $this->getDoctrine()->getRepository('CacicCommonBundle:RedeVersaoModulo')->listarLinux(),
214   - 'subredes' => $this->getDoctrine()->getRepository('CacicCommonBundle:RedeVersaoModulo')->subrede()
  319 + array( 'windows'=> $windows,
  320 + 'linux' => $linux,
  321 + 'subredes' => $subredes
215 322 )
216 323 );
217 324  
218 325 }
219 326  
  327 + /*
  328 + * Função que retorna um array multidimensional com o nome dos executáveis,
  329 + * o hash e versão constantes do arquivo versions_and_hashes.ini
  330 + *
  331 + * @param nmModulo Nome do módulo para trazer informações
  332 + *
  333 + * @return Array multidimensional com os dados
  334 + */
  335 +
  336 + public function modulosArray($nmModulos = null)
  337 + {
  338 + $logger = $this->get('logger');
  339 + // Abre e faz o parsing do arquivo
  340 + $cacic_helper = new Helper\OldCacicHelper($this->container->get('kernel'));
  341 + $iniFile = $cacic_helper->iniFile();
  342 + $itemArray = parse_ini_file($iniFile);
  343 + $teste = parse_ini_file($iniFile, true);
  344 +
  345 + // Gera um array com todos os múdlos
  346 + $modulos = array();
  347 + $intLoopVersionsIni = 0;
  348 + foreach ($teste["ItemsDefinitions"] as &$arrItemDefinitions)
  349 + {
  350 + $intLoopVersionsIni ++;
  351 + $arrItemDefinitions = explode(',',$itemArray['Item_' . $intLoopVersionsIni]);
  352 +
  353 + // Cria um array multidimensional com os atributos
  354 + if ($arrItemDefinitions[0] <> '')
  355 + {
  356 + $arquivo = Helper\OldCacicHelper::getOnlyFileName(trim($arrItemDefinitions[0]));
  357 +
  358 + // Verifica se o arquivo deve ser carregado
  359 + if ($nmModulos != null) {
  360 + if (in_array($arquivo, $nmModulos)) {
  361 + $logger->debug("Módulo {$arquivo} encontrado ...");
  362 + // Se for vazio ou o nome for fornecido, carrega
  363 + preg_match('/\.[^\.]+$/i',$arquivo,$ext);
  364 + if ($ext[0] == '.exe') {
  365 + $tipoSo = 'windows';
  366 + } else {
  367 + $tipoSo = 'linux';
  368 + }
  369 + $modulos[$arquivo]['versao'] = $itemArray[$arquivo . '_VER'];
  370 + $modulos[$arquivo]['hash'] = $itemArray[$arquivo . '_HASH'];
  371 + $modulos[$arquivo]['tipoSo'] = $tipoSo;
  372 + }
  373 + } else {
  374 + // Se for vazio ou o nome for fornecido, carrega
  375 + preg_match('/\.[^\.]+$/i',$arquivo,$ext);
  376 + if ($ext[0] == '.exe') {
  377 + $tipoSo = 'windows';
  378 + } else {
  379 + $tipoSo = 'linux';
  380 + }
  381 + $modulos[$arquivo]['versao'] = $itemArray[$arquivo . '_VER'];
  382 + $modulos[$arquivo]['hash'] = $itemArray[$arquivo . '_HASH'];
  383 + $modulos[$arquivo]['tipoSo'] = $tipoSo;
  384 + }
  385 +
  386 +
  387 + }
  388 +
  389 + }
  390 +
  391 + // Retorna o array com todos os resultados
  392 + return $modulos;
  393 + }
  394 +
220 395  
221 396 /**
222 397 * --------------------------------------------------------------------------------------
... ... @@ -224,8 +399,9 @@ class RedeController extends Controller
224 399 * Recebe como parâmetro o objeto da rede
225 400 *--------------------------------------------------------------------------------------
226 401 */
227   - public function updateSubredes($rede)
  402 + public function updateSubredes($rede, $modulos = null)
228 403 {
  404 + $logger = $this->get('logger');
229 405 $pIntIdRede = $rede->getIdRede();
230 406 $cacic_helper = new Helper\OldCacicHelper($this->container->get('kernel'));
231 407 $iniFile = $cacic_helper->iniFile();
... ... @@ -237,51 +413,53 @@ class RedeController extends Controller
237 413 $intLoopSEL = 1;
238 414 $intLoopVersionsIni = 0;
239 415 $sessStrTripaItensEnviados = '';
  416 +
  417 + // Carrega todos os metadados dos módulos fornecidos ou de todos os módulos
  418 + $modulos = $this->modulosArray($modulos);
  419 +
240 420 foreach ($teste["ItemsDefinitions"] as &$arrItemDefinitions)
241 421 {
242 422 $intLoopVersionsIni ++;
243 423 $arrItemDefinitions = explode(',',$itemArray['Item_' . $intLoopVersionsIni]);
244   - if (($arrItemDefinitions[0] <> '') && ($arrItemDefinitions[1] <> 'S') && ($arrItemDefinitions[2] <> 'S'))
245   - {
246   - $pStrNmItem = Helper\OldCacicHelper::getOnlyFileName(trim($arrItemDefinitions[0]));
247   -
248   - //$boolEqualVersions = ($arrVersoesEnviadas[$strItemName] == $itemArray[$strItemName . '_VER'] );
249   - //$boolEqualHashs = ($arrHashsEnviados[$strItemName] == $itemArray[$strItemName . '_HASH']);
250 424  
251   - $strSendProcess = 'Nao Enviado!';
252   - $strProcessStatus = '';
  425 + // Nome do módulo sendo carregado
  426 + $pStrNmItem = Helper\OldCacicHelper::getOnlyFileName(trim($arrItemDefinitions[0]));
  427 + $logger->debug("Nome do módulo: $pStrNmItem");
  428 + if ($modulos[$pStrNmItem])
  429 + {
  430 + $logger->debug("Carregando módulo $pStrNmItem");
253 431  
  432 + // Carrega dados da rede
254 433 $em = $this->getDoctrine()->getManager();
255   -
256   - $arrDadosRede = array( 'rede' => $em->getRepository( 'CacicCommonBundle:Rede' )->listar() );
  434 + //$arrDadosRede = array( 'rede' => $em->getRepository( 'CacicCommonBundle:Rede' )->listar() );
257 435 //Debug::dump($arrDadosRede['rede'][0][0]);
258   - $arrDadosRede = $arrDadosRede['rede'][0];
  436 + //$arrDadosRede = $arrDadosRede['rede'][0];
  437 + $arrDadosRede = array(
  438 + 'teServUpdates' => $rede->getTeServUpdates(),
  439 + 'tePathServUpdates' => $rede->getTePathServUpdates(),
  440 + 'nmUsuarioLoginServUpdatesGerente' => $rede->getNmUsuarioLoginServUpdatesGerente(),
  441 + 'teSenhaLoginServUpdatesGerente' => $rede->getTeSenhaLoginServUpdatesGerente(),
  442 + 'nuPortaServUpdates' => $rede->getNuPortaServUpdates(),
  443 + );
259 444  
260 445 // Caso o servidor de updates ainda não tenha sido trabalhado...
261   - if(!(Helper\OldCacicHelper::stripos2($sessStrTripaItensEnviados,$arrDadosRede[0]['teServUpdates'].'_'.$arrDadosRede[0]['tePathServUpdates'].'_'.$pStrNmItem.'_',false)))
  446 + if(!(Helper\OldCacicHelper::stripos2($sessStrTripaItensEnviados,$arrDadosRede['teServUpdates'].'_'.$arrDadosRede['tePathServUpdates'].'_'.$pStrNmItem.'_',false)))
262 447 {
263   - $sessStrTripaItensEnviados .= $arrDadosRede[0]['teServUpdates'].'_'.$arrDadosRede[0]['tePathServUpdates'].'_'.$pStrNmItem . '_';
264   - //require_once('../../include/ftp_check_and_send.php');
265   - //$logger = $this->get('logger');
266   - //$logger->err('222222222222222222222222222222222222222 '. $arrDadosRede[0]['teSenhaLoginServUpdatesGerente']);
  448 + $sessStrTripaItensEnviados .= $arrDadosRede['teServUpdates'].'_'.$arrDadosRede['tePathServUpdates'].'_'.$pStrNmItem . '_';
267 449  
268 450 $strResult = $this->checkAndSend($pStrNmItem,
269   - $this->get('kernel')->getRootDir() . Helper\OldCacicHelper::CACIC_PATH_RELATIVO_DOWNLOADS . ($pStrNmItem),
270   - $arrDadosRede[0]['teServUpdates'],
271   - $arrDadosRede[0]['tePathServUpdates'],
272   - $arrDadosRede[0]['nmUsuarioLoginServUpdatesGerente'],
273   - $arrDadosRede[0]['teSenhaLoginServUpdatesGerente'],
274   - $arrDadosRede[0]['nuPortaServUpdates']);
  451 + $cacic_helper->getRootDir() . $cacic_helper::CACIC_PATH_RELATIVO_DOWNLOADS . ($pStrNmItem),
  452 + $arrDadosRede['teServUpdates'],
  453 + $arrDadosRede['tePathServUpdates'],
  454 + $arrDadosRede['nmUsuarioLoginServUpdatesGerente'],
  455 + $arrDadosRede['teSenhaLoginServUpdatesGerente'],
  456 + $arrDadosRede['nuPortaServUpdates']
  457 + );
275 458 }
276 459 else
277 460 $strResult = 'Ja Enviado ao Servidor!_=_Ok!_=_Resended';
278 461  
279 462 $arrResult = explode('_=_',$strResult);
280   - //$logger = $this->get('logger');
281   - //$logger->err('222222222222222222222222222222222222222 '.$arrResult[1]);
282   -
283   - // Eduardo: Esquece o teste FTP só para fazer funcionar
284   - //$arrResult[1] = 'Ok!';
285 463  
286 464 if ($arrResult[1] == 'Ok!')
287 465 {
... ... @@ -314,46 +492,8 @@ class RedeController extends Controller
314 492 }
315 493  
316 494 //echo $_GET['pIntIdRede'] . '_=_' . $_GET['pStrNmItem'] . '_=_' . $strResult;
317   -
318   - } else {
319   - // Carrega o restante dos módulos na tabela rede_versao_modulo, mas não copia por FTP
320   - $pStrNmItem = Helper\OldCacicHelper::getOnlyFileName(trim($arrItemDefinitions[0]));
321   - error_log("Carregando item: $pStrNmItem");
322   -
323   - $em = $this->getDoctrine()->getManager();
324   -
325   - // Trocar esse array por um SELECT no Doctrine que retorna os dados das redes num array
326   - $arrDadosRede = array( 'rede' => $em->getRepository( 'CacicCommonBundle:Rede' )->listar() );
327   - $arrDadosRede = $arrDadosRede['rede'][0];
328   -
329   - // Consertar CRUD no Symfony
330   - $redeVersaoModulo = $em->getRepository('CacicCommonBundle:RedeVersaoModulo')->findBy(
331   - array(
332   - 'idRede' => $pIntIdRede,
333   - 'nmModulo' => $pStrNmItem
334   - )
335   - );
336   -
337   - // Se não existir, instancia o objeto
338   - if (!$redeVersaoModulo) {
339   - $redeVersaoModulo = new RedeVersaoModulo(null, null, null, null, null, $rede);
340   - } else {
341   - // Carrego o objeto encontrado
342   - $redeVersaoModulo = $redeVersaoModulo[0];
343   - }
344   -
345   -
346   - // Adicione o restante dos atributos
347   - $redeVersaoModulo->setNmModulo($pStrNmItem);
348   - $redeVersaoModulo->setTeVersaoModulo($itemArray[$pStrNmItem . '_VER']);
349   - $redeVersaoModulo->setDtAtualizacao(new \DateTime('NOW'));
350   - $redeVersaoModulo->setCsTipoSo( $pStrNmItem,'.exe',false ? 'MS-Windows' : 'GNU/LINUX');
351   - $redeVersaoModulo->setTeHash($itemArray[$pStrNmItem . '_HASH']);
352   -
353   - $em->persist($redeVersaoModulo);
354   - $em->flush();
355   -
356 495 #FIXME: Inserir hash do módulo pyCacyc. Atualmente dá erro mas não trava
  496 +
357 497 }
358 498  
359 499 $intLoopSEL++;
... ... @@ -386,6 +526,7 @@ class RedeController extends Controller
386 526 $pStrTeSenhaLogin,
387 527 $pStrNuPortaServer)
388 528 {
  529 + $logger = $this->get('logger');
389 530  
390 531 // Pega objetos do FTP
391 532 $ftp = $this->container->get('ijanki_ftp');
... ... @@ -395,23 +536,19 @@ class RedeController extends Controller
395 536 $strProcessCode = '';
396 537 try
397 538 {
  539 + $logger->debug("Enviando módulo $pStrFullItemName para o servidor $pStrTeServer na pasta $pStrTePathServer");
  540 +
398 541  
399 542 $conn = $ftp->connect($pStrTeServer);
400 543 // Retorno esperado....: 230 => FTP_USER_LOGGED_IN
401 544 // Retorno NÃO esperado: 530 => FTP_USER_NOT_LOGGED_IN
402 545  
403   - # TODO: Acrescentar verificação de sucesso em cada operação
404   - $logger = $this->get('logger');
405   -
406   - //$logger->err("1111111111111111111111111111111111111111111111 ". $pStrNmUsuarioLogin . " | " . $pStrTeSenhaLogin);
407   -
408   -
409   - $result = $ftp->login($pStrNmUsuarioLogin,$pStrTeSenhaLogin);
  546 + # TODO: Acrescentar verificação de sucesso em cada operação
  547 + $result = $ftp->login($pStrNmUsuarioLogin,$pStrTeSenhaLogin);
410 548  
411 549 // Retorno esperado: 250 => FTP_FILE_ACTION_OK
412 550 // Retorno NÃO esperado: 550 => FTP_PERMISSION_DENIED (ou a pasta não existe!)
413 551 $result = $ftp->chdir($pStrTePathServer);
414   -
415 552 $result = $ftp->put($pStrNmItem, $pStrFullItemName, FTP_BINARY);
416 553  
417 554 $strSendProcess = 'Enviado com Sucesso!';
... ... @@ -426,4 +563,30 @@ class RedeController extends Controller
426 563 return $strSendProcess . '_=_' . $strProcessStatus . '_=_' . $strProcessCode;
427 564 }
428 565  
  566 + public function vincularAction(Request $request)
  567 + {
  568 + $rede = new Rede();
  569 + $form = $this->createForm( new RedeType(), $rede );
  570 +
  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
  578 +
  579 + // Grava os dados da tabela rede versão módulo
  580 + $this->updateSubredes($rede);
  581 +
  582 + $this->get('session')->getFlashBag()->add('success', 'Dados salvos com sucesso!');
  583 +
  584 + return $this->redirect( $this->generateUrl( 'cacic_subrede_index') );
  585 + }
  586 + }
  587 +
  588 + return $this->render( 'CacicCommonBundle:Rede:cadastrar.html.twig', array( 'form' => $form->createView() ) );
  589 + }
  590 +
  591 +
429 592 }
... ...
src/Cacic/CommonBundle/Controller/UsuarioController.php
... ... @@ -175,17 +175,26 @@ class UsuarioController extends Controller
175 175 throw $this->createNotFoundException( 'Página não encontrada' );
176 176  
177 177 $usuario = $this->getDoctrine()->getRepository('CacicCommonBundle:Usuario')->find( $request->get('id') );
  178 + $nivelUser = $this->getDoctrine()->getRepository('CacicCommonBundle:Usuario')->nivel($usuario);
  179 + $csNivel = $this->getDoctrine()->getRepository('CacicCommonBundle:Usuario')->csNivelAdm();
  180 +
178 181 if ( ! $usuario )
179 182 throw $this->createNotFoundException( 'Usuário não encontrado' );
180   -
181   - $em = $this->getDoctrine()->getManager();
182   - $em->remove( $usuario );
183   - $em->flush();
184   -
185   - $response = new Response( json_encode( array('status' => 'ok') ) );
186   - $response->headers->set('Content-Type', 'application/json');
187 183  
188   - return $response;
  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');
  186 + }else
  187 + {
  188 + $em = $this->getDoctrine()->getManager();
  189 + $em->remove( $usuario );
  190 + $em->flush();
  191 +
  192 + $response = new Response( json_encode( array('status' => 'ok') ) );
  193 + $response->headers->set('Content-Type', 'application/json');
  194 +
  195 + return $response;
  196 + }
  197 +
189 198 }
190 199  
191 200 /**
... ...
src/Cacic/CommonBundle/DataFixtures/ORM/LoadClassPropertyData.php
... ... @@ -500,6 +500,24 @@ Example IPv6 address: &quot;2010:836B:4179::836B:4179&quot;&#39;);
500 500 // Grava o objeto
501 501 $manager->persist($property);
502 502  
  503 + /*************************
  504 + * Patrimonio Classes
  505 + *
  506 + * A classe precisa ter pelo menos uma propriedade pré cadastrada
  507 + *
  508 + *************************/
  509 +
  510 + // Atributo
  511 + $property = new ClassProperty();
  512 + $property->setNmPropertyName('IDPatrimonio');
  513 + $property->setTePropertyDescription('Número do patrimônio');
  514 +
  515 + // Referência à classe
  516 + $property->setIdClass($this->getReference('Patrimonio'));
  517 +
  518 + // Grava o objeto
  519 + $manager->persist($property);
  520 +
503 521  
504 522 // Commit
505 523 $manager->flush();
... ...
src/Cacic/CommonBundle/DataFixtures/ORM/LoadClasseData.php
... ... @@ -73,6 +73,10 @@ The following syntax is simplified from Managed Object Format (MOF) code and inc
73 73 array('className' => 'Win32_DesktopMonitor',
74 74 'description' => 'Represents the type of monitor or display device attached to the computer system.',
75 75 'reference' => 'DesktopMonitor'
  76 + ),
  77 + array('className' => 'Patrimonio',
  78 + 'description' => 'Dados de patrimônio e localização física',
  79 + 'reference' => 'Patrimonio'
76 80 )
77 81 );
78 82  
... ...
src/Cacic/CommonBundle/DataFixtures/ORM/LoadCollectDefClassData.php
... ... @@ -36,7 +36,7 @@ class LoadCollectDefClassData extends AbstractFixture implements FixtureInterfac
36 36 'DesktopMonitor'
37 37 )),
38 38 //array('id_acao'=>'col_moni','classes'=> array('ComputerSystem','Software', 'OperatingSystem')),
39   - //array('id_acao'=>'col_patr','classes'=> array('ComputerSystem')),
  39 + array('id_acao'=>'col_patr','classes'=> array('Patrimonio')),
40 40 array('id_acao'=>'col_soft','classes'=> array('Software')),
41 41 array('id_acao'=>'col_soft_not_optional','classes'=> array('Software')),
42 42 //array('id_acao'=>'srcacic','classes'=> array('ComputerSystem'))
... ...
src/Cacic/CommonBundle/Entity/AcaoRedeRepository.php
... ... @@ -72,4 +72,35 @@ class AcaoRedeRepository extends EntityRepository
72 72 $em->flush();
73 73 }
74 74  
  75 + /**
  76 + * Habilita todas as ações para a Rede fornecida ou conjunto de redes fornecidas
  77 + *
  78 + * @param array $redes
  79 + *
  80 + */
  81 + public function atualizarPorRede ( $redes ) {
  82 + $em = $this->getEntityManager();
  83 + $acoes = $em->getRepository( 'CacicCommonBundle:Acao' )->findAll();
  84 +
  85 + foreach ($redes as $novaRede) {
  86 + // Para cada rede, habilita as ações
  87 + foreach ($acoes as $novaAcao) {
  88 + $new = $this->find( array( 'acao' => $novaAcao->getIdAcao(), 'rede' => $novaRede->getIdRede() ));
  89 + // Se não existir, cria a ação para a rede
  90 + if ( empty($new) ) {
  91 + $new = new AcaoRede();
  92 + }
  93 +
  94 + // Agora cria a ação
  95 + $new->setAcao($novaAcao);
  96 + $new->setRede($novaRede);
  97 + $em->persist($new);
  98 +
  99 + // Grava as mudanças
  100 + $em->flush();
  101 + }
  102 +
  103 + }
  104 + }
  105 +
75 106 }
76 107 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Entity/AcaoRepository.php
... ... @@ -18,21 +18,22 @@ class AcaoRepository extends EntityRepository
18 18 * Lista as Ações opcionais (cs_opcional=S)
19 19 * @param int $idLocal
20 20 */
21   - public function listarModulosOpcionais( $idLocal = null )
  21 + public function listarModulosOpcionais($nivel, $idLocal = null )
22 22 {
23 23 // Monta a Consulta básica...
24 24 $query = $this->createQueryBuilder('acao')->select('acao', 'COUNT(acao_rede.rede) AS totalRedesAtivadas')
25 25 ->leftJoin('acao.redes', 'acao_rede')
26 26 ->where("acao.csOpcional = 'S'")
27 27 ->groupBy('acao');
28   -
29   - if ( $idLocal !== null )
30   - {
31   - $query->leftJoin('acao_rede.rede', 'rede')
32   - ->leftJoin('rede.idLocal', 'local')
33   - ->andWhere( 'local.idLocal = :idLocal OR local.idLocal IS NULL' )
34   - ->setParameter( 'idLocal', $idLocal );
35   - }
  28 + if($nivel[0]['teGrupoUsuarios'] !== "Administração"){
  29 + if ( $idLocal !== null )
  30 + {
  31 + $query->leftJoin('acao_rede.rede', 'rede')
  32 + ->leftJoin('rede.idLocal', 'local')
  33 + ->andWhere( 'local.idLocal = :idLocal OR local.idLocal IS NULL' )
  34 + ->setParameter( 'idLocal', $idLocal );
  35 + }
  36 + }
36 37  
37 38 return $query->getQuery()->execute();
38 39 }
... ...
src/Cacic/CommonBundle/Entity/AquisicaoRepository.php
... ... @@ -15,9 +15,9 @@ class AquisicaoRepository extends EntityRepository
15 15  
16 16 public function paginar( \Knp\Component\Pager\Paginator $paginator, $page = 1 )
17 17 {
18   - $_dql = "SELECT a.idAquisicao
  18 + $_dql = "SELECT a
19 19 FROM CacicCommonBundle:Aquisicao a
20   - GROUP BY a.idAquisicao";
  20 + GROUP BY a";
21 21  
22 22 return $paginator->paginate(
23 23 $this->getEntityManager()->createQuery( $_dql )->getArrayResult(),
... ...
src/Cacic/CommonBundle/Entity/ClasseRepository.php
... ... @@ -19,9 +19,10 @@ class ClasseRepository extends EntityRepository
19 19 */
20 20 public function listar()
21 21 {
  22 + // TODO: Remover a lista fixa de classes excluídas e parametrizar a informação
22 23 $_dql = "SELECT c
23 24 FROM CacicCommonBundle:Classe c
24   - WHERE c.idClass != 46
  25 + WHERE c.nmClassName NOT IN ('SoftwareList', 'Patrimonio')
25 26 ORDER BY c.nmClassName";
26 27  
27 28 return $this->getEntityManager()->createQuery( $_dql )->getArrayResult();
... ... @@ -46,7 +47,22 @@ class ClasseRepository extends EntityRepository
46 47  
47 48 public function listaDetalhesClasseAcoes( $idClass )
48 49 {
49   - $_dql = "SELECT a, cl, cp, dc
  50 + $_dql = "SELECT a.idAcao,
  51 + a.teDescricaoBreve,
  52 + a.teDescricao,
  53 + a.teNomeCurtoModulo,
  54 + a.dtHrAlteracao,
  55 + a.csOpcional,
  56 + cl.idClass,
  57 + cl.nmClassName,
  58 + cl.teClassDescription,
  59 + cp.idClassProperty,
  60 + cp.nmPropertyName,
  61 + cp.tePropertyDescription,
  62 + cp.nmFunctionPreDb,
  63 + cp.nmFunctionPosDb,
  64 + dc.idCollectDefClass,
  65 + dc.teWhereClause
50 66 FROM CacicCommonBundle:CollectDefClass dc,
51 67 CacicCommonBundle:Classe cl,
52 68 CacicCommonBundle:Acao a,
... ...
src/Cacic/CommonBundle/Entity/ComputadorColetaRepository.php
... ... @@ -37,5 +37,188 @@ class ComputadorColetaRepository extends EntityRepository
37 37  
38 38 return $qb->getQuery()->execute();
39 39 }
40   -
  40 +
  41 + /**
  42 + *
  43 + * Gera relatório de configurações de hardware coletadas dos computadores
  44 + * @param array $filtros
  45 + */
  46 + public function gerarRelatorioConfiguracoes( $filtros )
  47 + {
  48 + $qb = $this->createQueryBuilder('coleta')
  49 + ->select('IDENTITY(coleta.computador), coleta.teClassPropertyValue, comp.nmComputador, comp.teNodeAddress, comp.teIpComputador, so.idSo, so.inMswindows, so.sgSo, rede.idRede, local.nmLocal, local.idLocal')
  50 + ->innerJoin('coleta.classProperty', 'property')
  51 + ->innerJoin('property.idClass', 'classe')
  52 + ->innerJoin('coleta.computador', 'comp')
  53 + ->innerJoin('comp.idSo', 'so')
  54 + ->innerJoin('comp.idRede', 'rede')
  55 + ->innerJoin('rede.idLocal', 'local');
  56 +
  57 + /**
  58 + * Verifica os filtros
  59 + */
  60 + if ( array_key_exists('locais', $filtros) && !empty($filtros['locais']) )
  61 + $qb->andWhere('local.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] ));
  62 +
  63 + if ( array_key_exists('so', $filtros) && !empty($filtros['so']) )
  64 + $qb->andWhere('comp.idSo IN (:so)')->setParameter('so', explode( ',', $filtros['so'] ));
  65 +
  66 + if ( array_key_exists('conf', $filtros) && !empty($filtros['conf']) )
  67 + $qb->andWhere('property.idClass IN (:conf)')->setParameter('conf', explode( ',', $filtros['conf'] ));
  68 +
  69 +
  70 + return $qb->getQuery()->execute();
  71 + }
  72 +
  73 + /*
  74 + * Retorna lista de atributos coletados para a classe fornecida
  75 + *
  76 + * @param $classe
  77 + *
  78 + */
  79 +
  80 + public function listarPropriedades($classe) {
  81 +
  82 + $qb = $this->createQueryBuilder('coleta')
  83 + ->select('DISTINCT IDENTITY(coleta.classProperty) AS idClassProperty, property.nmPropertyName')
  84 + ->innerJoin('coleta.classProperty', 'property')
  85 + ->innerJoin('property.idClass', 'classe')
  86 + ->where('classe.nmClassName = :classe')
  87 + ->orderBy('property.nmPropertyName')
  88 + ->setParameter('classe', $classe);
  89 +
  90 + return $qb->getQuery()->execute();
  91 + }
  92 +
  93 + /*
  94 + * Lista das classes que vão para o Menu de relatórios
  95 + *
  96 + * FIXME: Adicionar parâmetro para excluir classes do Menu
  97 + */
  98 +
  99 + public function menu()
  100 + {
  101 + $_dql = "SELECT c
  102 + FROM CacicCommonBundle:ComputadorColeta coleta
  103 + INNER JOIN CacicCommonBundle:ClassProperty property WITH coleta.classProperty = property.idClassProperty
  104 + INNER JOIN CacicCommonBundle:Classe c WITH property.idClass = c.idClass
  105 + WHERE c.nmClassName NOT IN ('SoftwareList', 'Patrimonio')
  106 + ORDER BY c.nmClassName";
  107 +
  108 + return $this->getEntityManager()->createQuery( $_dql )->getArrayResult();
  109 + }
  110 +
  111 + /**
  112 + *
  113 + * Gera relatório de propriedades WMI coletadas dos computadores
  114 + *
  115 + * @param array $filtros
  116 + * @param $classe
  117 + */
  118 + public function gerarRelatorioWMIDetalhe( $filtros, $classe )
  119 + {
  120 + $qb = $this->createQueryBuilder('coleta')
  121 + ->select('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')
  122 + ->innerJoin('coleta.classProperty', 'property')
  123 + ->innerJoin('property.idClass', 'classe')
  124 + ->innerJoin('coleta.computador', 'comp')
  125 + ->innerJoin('comp.idSo', 'so')
  126 + ->innerJoin('comp.idRede', 'rede')
  127 + ->innerJoin('rede.idLocal', 'local')
  128 + ->where('classe.nmClassName = :classe')
  129 + ->setParameter('classe', $classe);
  130 +
  131 + /**
  132 + * Verifica os filtros
  133 + */
  134 + if ( array_key_exists('locais', $filtros) && !empty($filtros['locais']) )
  135 + $qb->andWhere('local.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] ));
  136 +
  137 + if ( array_key_exists('redes', $filtros) && !empty($filtros['redes']) )
  138 + $qb->andWhere('rede.idRede IN (:redes)')->setParameter('redes', explode( ',', $filtros['redes'] ));
  139 +
  140 + if ( array_key_exists('so', $filtros) && !empty($filtros['so']) )
  141 + $qb->andWhere('comp.idSo IN (:so)')->setParameter('so', explode( ',', $filtros['so'] ));
  142 +
  143 + if ( array_key_exists('conf', $filtros) && !empty($filtros['conf']) )
  144 + $qb->andWhere('property.nmPropertyName IN (:conf)')->setParameter('conf', explode( ',', $filtros['conf'] ));
  145 +
  146 +
  147 + return $qb->getQuery()->execute();
  148 + }
  149 +
  150 + public function gerarRelatorioSoftware( $filtros, $software )
  151 + {
  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')
  154 + ->innerJoin('CacicCommonBundle:ComputadorColetaHistorico','hist', 'WITH', 'coleta.idComputadorColeta = hist.computadorColeta')
  155 + ->innerJoin('coleta.classProperty', 'property')
  156 + ->innerJoin('property.idClass', 'classe')
  157 + ->innerJoin('coleta.computador', 'comp')
  158 + ->innerJoin('comp.idSo', 'so')
  159 + ->innerJoin('comp.idRede', 'rede')
  160 + ->innerJoin('rede.idLocal', 'local')
  161 + ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'prop.classProperty = coleta.classProperty')
  162 + ->innerJoin('prop.software', 'soft')
  163 + ->where('soft.nmSoftware = :software')
  164 + ->setParameter('software', $software);
  165 +
  166 + /**
  167 + * Verifica os filtros
  168 + */
  169 + if ( array_key_exists('locais', $filtros) && !empty($filtros['locais']) )
  170 + $qb->andWhere('local.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] ));
  171 +
  172 + if ( array_key_exists('redes', $filtros) && !empty($filtros['redes']) )
  173 + $qb->andWhere('rede.idRede IN (:redes)')->setParameter('redes', explode( ',', $filtros['redes'] ));
  174 +
  175 + if ( array_key_exists('so', $filtros) && !empty($filtros['so']) )
  176 + $qb->andWhere('comp.idSo IN (:so)')->setParameter('so', explode( ',', $filtros['so'] ));
  177 +
  178 + if ( array_key_exists('conf', $filtros) && !empty($filtros['conf']) )
  179 + $qb->andWhere('property.idClassProperty IN (:conf)')->setParameter('conf', explode( ',', $filtros['conf'] ));
  180 +
  181 +
  182 + return $qb->getQuery()->execute();
  183 + }
  184 +
  185 + /**
  186 + *
  187 + * Gera relatório de propriedades WMI coletadas dos computadores detalhado
  188 + *
  189 + * @param array $filtros
  190 + * @param $classe
  191 + */
  192 + public function gerarRelatorioWMI( $filtros, $classe )
  193 + {
  194 + $qb = $this->createQueryBuilder('coleta')
  195 + ->select('property.nmPropertyName', 'coleta.teClassPropertyValue', 'so.idSo', 'so.inMswindows', 'so.sgSo', 'rede.idRede', 'rede.nmRede', 'rede.teIpRede', 'local.nmLocal', 'local.idLocal', 'count(DISTINCT coleta.computador) as numComp')
  196 + ->innerJoin('coleta.classProperty', 'property')
  197 + ->innerJoin('property.idClass', 'classe')
  198 + ->innerJoin('coleta.computador', 'comp')
  199 + ->innerJoin('comp.idSo', 'so')
  200 + ->innerJoin('comp.idRede', 'rede')
  201 + ->innerJoin('rede.idLocal', 'local')
  202 + ->where('classe.nmClassName = :classe')
  203 + ->groupBy('property.nmPropertyName, coleta.teClassPropertyValue, so.idSo, so.inMswindows,so.sgSo, rede.idRede, rede.nmRede, rede.teIpRede, local.nmLocal, local.idLocal')
  204 + ->setParameter('classe', $classe);
  205 +
  206 + /**
  207 + * Verifica os filtros
  208 + */
  209 + if ( array_key_exists('locais', $filtros) && !empty($filtros['locais']) )
  210 + $qb->andWhere('local.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] ));
  211 +
  212 + if ( array_key_exists('redes', $filtros) && !empty($filtros['redes']) )
  213 + $qb->andWhere('rede.idRede IN (:redes)')->setParameter('redes', explode( ',', $filtros['redes'] ));
  214 +
  215 + if ( array_key_exists('so', $filtros) && !empty($filtros['so']) )
  216 + $qb->andWhere('comp.idSo IN (:so)')->setParameter('so', explode( ',', $filtros['so'] ));
  217 +
  218 + if ( array_key_exists('conf', $filtros) && !empty($filtros['conf']) )
  219 + $qb->andWhere('property.idClassProperty IN (:conf)')->setParameter('conf', explode( ',', $filtros['conf'] ));
  220 +
  221 +
  222 + return $qb->getQuery()->execute();
  223 + }
41 224 }
... ...
src/Cacic/CommonBundle/Entity/ComputadorRepository.php
... ... @@ -196,11 +196,11 @@ class ComputadorRepository extends EntityRepository
196 196 {
197 197 $qb = $this->createQueryBuilder('computador')
198 198 ->select('computador, coleta, classe, rede, local, so')
199   - ->leftJoin('computador.hardwares', 'coleta')
200   - ->leftJoin('coleta.idClass', 'classe')
201   - ->leftJoin('computador.idRede', 'rede')
202   - ->leftJoin('rede.idLocal', 'local')
203   - ->leftJoin('computador.idSo', 'so');
  199 + ->innerJoin('computador.hardwares', 'coleta')
  200 + ->innerJoin('coleta.idClass', 'classe')
  201 + ->innerJoin('computador.idRede', 'rede')
  202 + ->innerJoin('rede.idLocal', 'local')
  203 + ->innerJoin('computador.idSo', 'so');
204 204  
205 205 /**
206 206 * Verifica os filtros
... ...
src/Cacic/CommonBundle/Entity/GrupoUsuarioRepository.php
... ... @@ -36,5 +36,15 @@ class GrupoUsuarioRepository extends EntityRepository
36 36  
37 37 return $this->getEntityManager()->createQuery( $_dql )->getArrayResult();
38 38 }
39   -
  39 + public function nivel($grupoUsuario){
  40 + $_dql = "SELECT g.teGrupoUsuarios
  41 + FROM CacicCommonBundle:GrupoUsuario g
  42 + WHERE g.idGrupoUsuario = :idGrupoUsuario
  43 + GROUP BY g.teGrupoUsuarios";
  44 +
  45 + return $this->getEntityManager()
  46 + ->createQuery( $_dql )
  47 + ->setParameter( 'idGrupoUsuario', $grupoUsuario )
  48 + ->getArrayResult();
  49 + }
40 50 }
41 51 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Entity/Rede.php
... ... @@ -808,4 +808,42 @@ class Rede
808 808 {
809 809 return $this->idAplicativo;
810 810 }
  811 + /**
  812 + * @var \Doctrine\Common\Collections\Collection
  813 + */
  814 + private $uorgs;
  815 +
  816 +
  817 + /**
  818 + * Add uorgs
  819 + *
  820 + * @param \Cacic\CommonBundle\Entity\Uorg $uorgs
  821 + * @return Rede
  822 + */
  823 + public function addUorg(\Cacic\CommonBundle\Entity\Uorg $uorgs)
  824 + {
  825 + $this->uorgs[] = $uorgs;
  826 +
  827 + return $this;
  828 + }
  829 +
  830 + /**
  831 + * Remove uorgs
  832 + *
  833 + * @param \Cacic\CommonBundle\Entity\Uorg $uorgs
  834 + */
  835 + public function removeUorg(\Cacic\CommonBundle\Entity\Uorg $uorgs)
  836 + {
  837 + $this->uorgs->removeElement($uorgs);
  838 + }
  839 +
  840 + /**
  841 + * Get uorgs
  842 + *
  843 + * @return \Doctrine\Common\Collections\Collection
  844 + */
  845 + public function getUorgs()
  846 + {
  847 + return $this->uorgs;
  848 + }
811 849 }
812 850 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Entity/RedeRepository.php
... ... @@ -23,8 +23,7 @@ class RedeRepository extends EntityRepository
23 23 {
24 24 $query = $this->createQueryBuilder('rede')->select('COUNT(rede.idRede)')
25 25 ->innerJoin('rede.idLocal', 'loc')
26   - ->where('loc.idLocal = :idLocal')
27   - ->setParameter('idLocal', $idLocal);
  26 + ;
28 27  
29 28 return $query->getQuery()->getSingleScalarResult();
30 29 }
... ... @@ -36,13 +35,16 @@ class RedeRepository extends EntityRepository
36 35  
37 36 public function paginar( \Knp\Component\Pager\Paginator $paginator, $page = 1 )
38 37 {
39   - $_dql = "SELECT r, count(l.nmLocal) AS local
40   - FROM CacicCommonBundle:Rede r
41   - LEFT JOIN r.idLocal l
42   - GROUP BY 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')
  40 + ->innerJoin('CacicCommonBundle:Local', 'l', 'WITH', 'l.idLocal = r.idLocal')
  41 + ->leftJoin('CacicCommonBundle:ServidorAutenticacao', 's', 'WITH', 's.idServidorAutenticacao = r.idServidorAutenticacao')
  42 + ->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 + ->orderBy('r.teIpRede, l.nmLocal');
43 45  
44 46 return $paginator->paginate(
45   - $this->getEntityManager()->createQuery( $_dql ),
  47 + $qb->getQuery()->execute(),
46 48 $page,
47 49 10
48 50 );
... ... @@ -74,7 +76,13 @@ class RedeRepository extends EntityRepository
74 76 ->setParameter( 'idLocal', $idLocal )
75 77 ->getArrayResult();
76 78 }
77   -
  79 + public function listarPorLocalADM()
  80 + {
  81 + $_dql = "SELECT r
  82 + FROM CacicCommonBundle:Rede r";
  83 +
  84 + return $this->getEntityManager()->createQuery( $_dql )->getArrayResult();
  85 + }
78 86 /**
79 87 *
80 88 * Método de listagem de Redes associadas a determinado Servidor Autenticacao
... ... @@ -144,4 +152,28 @@ class RedeRepository extends EntityRepository
144 152  
145 153 return $rede;
146 154 }
  155 +
  156 + /*
  157 + * Retorna lista de redes e nome do Local
  158 + * @param idLocal Se fornecido o idLocal, retorna somente os locais para aquele local
  159 + */
  160 +
  161 + public function comLocal ($idLocal = null)
  162 + {
  163 + $qb = $this->createQueryBuilder('r')
  164 + ->select('r.idRede',
  165 + 'r.teIpRede',
  166 + 'r.nmRede',
  167 + 'r.teServUpdates',
  168 + 'r.tePathServUpdates',
  169 + 'l.nmLocal')
  170 + ->innerJoin('CacicCommonBundle:Local', 'l', 'WITH', 'r.idLocal = l.idLocal')
  171 + ->orderBy('r.nmRede');
  172 +
  173 + if ($idLocal != null) {
  174 + $qb->andWhere('r.idLocal = :idLocal')->setParameter('idLocal', $idLocal);
  175 + }
  176 +
  177 + return $qb->getQuery()->getArrayResult();
  178 + }
147 179 }
148 180 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Entity/RedeVersaoModuloRepository.php
... ... @@ -35,15 +35,39 @@ class RedeVersaoModuloRepository extends EntityRepository
35 35  
36 36 return $this->getEntityManager()->createQuery( $_dql )->getArrayResult();
37 37 }
38   - public function subrede()
  38 + /*
  39 + * Traz a lista de módulos para a subrede fornecida
  40 + */
  41 + public function subrede($id = null, $modulo = null)
39 42 {
40   - $_dql = "SELECT r.nmModulo, r.teVersaoModulo, r.teHash, l.sgLocal, red.teIpRede, red.nmRede, red.teServUpdates
41   - FROM CacicCommonBundle:RedeVersaoModulo r
42   - Left join r.idRede red
43   - Left join red.idLocal l
44   - GROUP BY r, l, red
45   - ORDER BY red.nmRede ASC";
  43 + $qb = $this->createQueryBuilder('r')
  44 + ->select('red.idRede',
  45 + 'r.nmModulo',
  46 + 'r.teVersaoModulo',
  47 + 'r.teHash',
  48 + 'red.teIpRede',
  49 + 'red.nmRede',
  50 + 'red.teServUpdates',
  51 + 'red.tePathServUpdates',
  52 + 'l.nmLocal')
  53 + ->innerJoin('CacicCommonBundle:Rede', 'red', 'WITH', 'red.idRede = r.idRede')
  54 + ->innerJoin('CacicCommonBundle:Local', 'l', 'WITH', 'red.idLocal = l.idLocal')
  55 + ->groupBy('r', 'l', 'red')
  56 + ->orderBy('red.nmRede');
46 57  
47   - return $this->getEntityManager()->createQuery( $_dql )->getArrayResult();
  58 + // Adiciona filtro por módulo se fornecido
  59 + if ($modulo != null) {
  60 + // Aqui trago somente a lista de todos os módulos naquela subrede
  61 + $qb->andWhere('r.nmModulo = :modulo')->setParameter('modulo', $modulo);
  62 + }
  63 +
  64 + // Adiciona filtro por subrede se fornecido
  65 + if ($id != null) {
  66 + // Somente os módulos desa subrede
  67 + $qb->andWhere('r.idRede = :id')->setParameter('id', $id);
  68 + }
  69 +
  70 + return $qb->getQuery()->getArrayResult();
48 71 }
  72 +
49 73 }
50 74 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Entity/SoftwareRepository.php
... ... @@ -77,13 +77,13 @@ class SoftwareRepository extends EntityRepository
77 77 {
78 78 // Monta a Consulta básica...
79 79 $qb = $this->createQueryBuilder('sw')
80   - ->select('COALESCE(sw.nmSoftware, prop.displayName) as nmSoftware', 'l.nmLocal', 'COUNT(col.computador) AS numComp')
  80 + ->select('COALESCE(sw.nmSoftware, prop.displayName) as nmSoftware', 'l.nmLocal', 'r.nmRede', 'r.teIpRede', 'COUNT(DISTINCT col.computador) AS numComp')
81 81 ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'sw.idSoftware = prop.software')
82 82 ->innerJoin('CacicCommonBundle:ComputadorColeta', 'col', 'WITH', 'col.computador = prop.computador')
83 83 ->innerJoin('CacicCommonBundle:Computador', 'comp', 'WITH', 'col.computador = comp.idComputador')
84 84 ->innerJoin('CacicCommonBundle:Rede', 'r', 'WITH', 'comp.idRede = r.idRede')
85 85 ->leftJoin('r.idLocal', 'l')
86   - ->groupBy('sw.nmSoftware, prop.displayName, l.nmLocal')
  86 + ->groupBy('sw.nmSoftware, prop.displayName, l.nmLocal, r.nmRede, r.teIpRede')
87 87 ->orderBy('sw.nmSoftware, l.nmLocal');
88 88  
89 89 /**
... ... @@ -95,6 +95,9 @@ class SoftwareRepository extends EntityRepository
95 95 if ( array_key_exists('locais', $filtros) && !empty($filtros['locais']) )
96 96 $qb->andWhere('l.idLocal IN (:locais)')->setParameter('locais', explode( ',', $filtros['locais'] ));
97 97  
  98 + if ( array_key_exists('redes', $filtros) && !empty($filtros['redes']) )
  99 + $qb->andWhere('r.idRede IN (:redes)')->setParameter('redes', explode( ',', $filtros['redes'] ));
  100 +
98 101 if ( array_key_exists('so', $filtros) && !empty($filtros['so']) )
99 102 $qb->andWhere('comp.idSo IN (:so)')->setParameter('so', explode( ',', $filtros['so'] ));
100 103  
... ... @@ -111,11 +114,11 @@ class SoftwareRepository extends EntityRepository
111 114 // Monta a Consulta básica...
112 115 $qb = $this->createQueryBuilder('sw')
113 116 ->select('sw.nmSoftware', 'aqit.qtLicenca', 'aqit.dtVencimentoLicenca', 'aq.nrProcesso', 'tpl.teTipoLicenca')
114   - ->innerJoin('sw.licencas', 'aqit')
115   - ->innerJoin('aqit.idAquisicao', 'aq')
116   - ->innerJoin('aqit.idTipoLicenca', 'tpl')
  117 + ->innerJoin('CacicCommonBundle:AquisicaoItem','aqit','WITH','sw.idSoftware = aqit.idSoftware')
  118 + ->innerJoin('CacicCommonBundle:Aquisicao','aq','WITH','aq.idAquisicao = aqit.idAquisicao')
  119 + ->innerJoin('CacicCommonBundle:TipoLicenca','tpl','WITH','tpl.idTipoLicenca = aqit.idTipoLicenca')
117 120 ->orderBy('sw.nmSoftware');
118   -
  121 +
119 122 /**
120 123 * Verifica os filtros que foram parametrizados
121 124 */
... ... @@ -160,17 +163,19 @@ class SoftwareRepository extends EntityRepository
160 163 {
161 164 // Monta a Consulta básica...
162 165 $qb = $this->createQueryBuilder('sw')
163   - ->select('sw', 'tpsw', 'se', 'comp')
164   - ->innerJoin('sw.estacoes', 'se')
165   - ->innerJoin('sw.idTipoSoftware', 'tpsw')
166   - ->innerJoin('se.idComputador', 'comp')
167   - ->orderBy('sw.nmSoftware')->addOrderBy('comp.nmComputador')->addOrderBy('comp.teIpComputador');
  166 + ->select('COALESCE(sw.nmSoftware, prop.displayName) as nmSoftware', 'tipo.teDescricaoTipoSoftware', 'tipo.idTipoSoftware', 'COUNT(DISTINCT col.computador) AS numComp')
  167 + ->innerJoin('CacicCommonBundle:PropriedadeSoftware', 'prop', 'WITH', 'sw.idSoftware = prop.software')
  168 + ->innerJoin('CacicCommonBundle:ComputadorColeta', 'col', 'WITH', 'col.computador = prop.computador')
  169 + ->innerJoin('CacicCommonBundle:Computador', 'comp', 'WITH', 'col.computador = comp.idComputador')
  170 + ->innerJoin('CacicCommonBundle:TipoSoftware', 'tipo', 'WITH', 'sw.idTipoSoftware = tipo.idTipoSoftware')
  171 + ->groupBy('sw.nmSoftware, prop.displayName, tipo.teDescricaoTipoSoftware, tipo.idTipoSoftware')
  172 + ->orderBy('sw.nmSoftware');
168 173  
169 174 /**
170 175 * Verifica os filtros que foram parametrizados
171 176 */
172 177 if ( array_key_exists('TipoSoftware', $filtros) && !empty($filtros['TipoSoftware']) )
173   - $qb->andWhere('tpsw.idTipoSoftware IN (:tpsw)')->setParameter('tpsw', explode( ',', $filtros['TipoSoftware'] ));
  178 + $qb->andWhere('tipo.idTipoSoftware IN (:tpsw)')->setParameter('tpsw', explode( ',', $filtros['TipoSoftware'] ));
174 179  
175 180 return $qb->getQuery()->execute();
176 181 }
... ...
src/Cacic/CommonBundle/Entity/TipoLicencaRepository.php
... ... @@ -15,9 +15,9 @@ class TipoLicencaRepository extends EntityRepository
15 15  
16 16 public function paginar( \Knp\Component\Pager\Paginator $paginator, $page = 1 )
17 17 {
18   - $_dql = "SELECT distinct(t.idTipoLicenca)
  18 + $_dql = "SELECT distinct(t.idTipoLicenca), t.teTipoLicenca
19 19 FROM CacicCommonBundle:TipoLicenca t
20   - ORDER BY t.idTipoLicenca";
  20 + ORDER BY t.idTipoLicenca, t.teTipoLicenca";
21 21  
22 22 return $paginator->paginate(
23 23 $this->getEntityManager()->createQuery( $_dql )->getArrayResult(),
... ...
src/Cacic/CommonBundle/Entity/Uorg.php
... ... @@ -405,4 +405,32 @@ class Uorg
405 405 {
406 406 return $this->nuResponsavelTel2;
407 407 }
  408 + /**
  409 + * @var \Cacic\CommonBundle\Entity\Rede
  410 + */
  411 + private $rede;
  412 +
  413 +
  414 + /**
  415 + * Set rede
  416 + *
  417 + * @param \Cacic\CommonBundle\Entity\Rede $rede
  418 + * @return Uorg
  419 + */
  420 + public function setRede(\Cacic\CommonBundle\Entity\Rede $rede = null)
  421 + {
  422 + $this->rede = $rede;
  423 +
  424 + return $this;
  425 + }
  426 +
  427 + /**
  428 + * Get rede
  429 + *
  430 + * @return \Cacic\CommonBundle\Entity\Rede
  431 + */
  432 + public function getRede()
  433 + {
  434 + return $this->rede;
  435 + }
408 436 }
409 437 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Entity/UsuarioRepository.php
... ... @@ -15,12 +15,12 @@ class UsuarioRepository extends EntityRepository
15 15  
16 16 public function paginar( \Knp\Component\Pager\Paginator $paginator, $page = 1 )
17 17 {
18   - $_dql = "SELECT u, l.nmLocal, g.nmGrupoUsuarios, COUNT(ls.idLocal) as numLocSec
  18 + $_dql = "SELECT u, l.nmLocal, g.teGrupoUsuarios, COUNT(ls.idLocal) as numLocSec
19 19 FROM CacicCommonBundle:Usuario u
20 20 JOIN u.idLocal l
21 21 JOIN u.idGrupoUsuario g
22 22 LEFT JOIN u.locaisSecundarios ls
23   - GROUP BY u, l.nmLocal, g.nmGrupoUsuarios";
  23 + GROUP BY u, l.nmLocal, g.teGrupoUsuarios";
24 24  
25 25 return $paginator->paginate(
26 26 $this->getEntityManager()->createQuery( $_dql ),
... ... @@ -28,6 +28,39 @@ class UsuarioRepository extends EntityRepository
28 28 10
29 29 );
30 30 }
  31 + /**
  32 + *
  33 + * Método que apresenta o grupo de acesso do respectivo usuario
  34 + */
  35 + public function nivel($usuario){
  36 + $_dql = "SELECT g.teGrupoUsuarios
  37 + FROM CacicCommonBundle:Usuario u
  38 + JOIN u.idLocal l
  39 + JOIN u.idGrupoUsuario g
  40 + LEFT JOIN u.locaisSecundarios ls
  41 + WHERE u.idUsuario = :idUsuario
  42 + GROUP BY g.teGrupoUsuarios";
  43 +
  44 + return $this->getEntityManager()
  45 + ->createQuery( $_dql )
  46 + ->setParameter( 'idUsuario', $usuario )
  47 + ->getArrayResult();
  48 + }
  49 + /**
  50 + *
  51 + * Método de contagem de usuario Administrador
  52 + */
  53 + public function csNivelAdm(){
  54 + $_dql = "SELECT COUNT(g.teGrupoUsuarios) AS cont
  55 + FROM CacicCommonBundle:Usuario u
  56 + JOIN u.idGrupoUsuario g
  57 + WHERE g.teGrupoUsuarios = :teGrupoUsuarios";
  58 +
  59 + return $this->getEntityManager()
  60 + ->createQuery( $_dql )
  61 + ->setParameter( 'teGrupoUsuarios', "Administração" )
  62 + ->getArrayResult();
  63 + }
31 64 /**
32 65 *
33 66 * Método de listagem dos Usuários cadastrados e respectivas informações de Login, Nome, Locais e Níveis de acesso
... ...
src/Cacic/CommonBundle/Form/Type/AquisicaoType.php
... ... @@ -43,8 +43,12 @@ class AquisicaoType extends AbstractType
43 43 'date',
44 44 array(
45 45 'widget' => 'single_text',
46   - 'label'=>'Data de aquisicao'
47   - )
  46 + 'format' => 'dd/MM/yyyy',
  47 + 'label'=>'Data de aquisicao',
  48 + 'attr' => array(
  49 + 'class' => 'datepicker_on'
  50 + )
  51 + )
48 52 );
49 53 }
50 54  
... ...
src/Cacic/CommonBundle/Form/Type/GrupoUsuarioType.php
... ... @@ -16,12 +16,19 @@ class GrupoUsuarioType extends AbstractType
16 16  
17 17 public function buildForm( FormBuilderInterface $builder, array $options )
18 18 {
19   - $builder->add( 'nmGrupoUsuarios', 'text',
  19 +
  20 + $builder->add( 'teGrupoUsuarios', 'text',
20 21 array(
21 22 'max_length' => 50,
22 23 'label' => 'Nome do Grupo de Usuário:'
23 24 )
24 25 );
  26 + $builder->add( 'nmGrupoUsuarios', 'text',
  27 + array(
  28 + 'max_length' => 50,
  29 + 'label' => 'Abreviação do Grupo de Usuário:'
  30 + )
  31 + );
25 32 $builder->add( 'teMenuGrupo', 'text',
26 33 array(
27 34 'max_length' => 50,
... ...
src/Cacic/CommonBundle/Form/Type/RedeType.php
... ... @@ -168,9 +168,9 @@ class RedeType extends AbstractType
168 168 );
169 169 $builder->add('habilitar', 'choice',
170 170 array(
171   - 'choices' => array('S' => 'Sim', 'N' => 'Não'),
172   - 'required' => false,
173   - 'expanded' => true,
  171 + 'choices' => array(true => 'Sim', false => 'Não'),
  172 + 'required' => true,
  173 + //'expanded' => true,
174 174 'mapped'=>false,
175 175 'label' => ' '
176 176  
... ... @@ -178,10 +178,10 @@ class RedeType extends AbstractType
178 178 );
179 179 $builder->add('csPermitirDesativarSrcacic', 'choice',
180 180 array(
181   - 'choices' => array('S' => 'Sim', 'N' => 'Não'),
182   - 'required' => false,
  181 + 'choices' => array(true => 'Sim', false => 'Não'),
  182 + 'required' => true,
183 183 'data' => 'N',
184   - 'expanded' => true,
  184 + //'expanded' => true,
185 185 'label' => ' '
186 186  
187 187 )
... ...
src/Cacic/CommonBundle/Resources/config/doctrine/ComputadorColeta.orm.yml
... ... @@ -24,6 +24,7 @@ Cacic\CommonBundle\Entity\ComputadorColeta:
24 24 joinColumns:
25 25 id_computador:
26 26 referencedColumnName: id_computador
  27 + nullable: false
27 28 orphanRemoval: false
28 29 classProperty:
29 30 targetEntity: ClassProperty
... ... @@ -33,6 +34,7 @@ Cacic\CommonBundle\Entity\ComputadorColeta:
33 34 joinColumns:
34 35 id_class_property:
35 36 referencedColumnName: id_class_property
  37 + nullable: false
36 38 orphanRemoval: false
37 39 idClass:
38 40 targetEntity: Classe
... ...
src/Cacic/CommonBundle/Resources/config/doctrine/Local.orm.yml
... ... @@ -49,8 +49,5 @@ Cacic\CommonBundle\Entity\Local:
49 49 configuracoes:
50 50 targetEntity: ConfiguracaoLocal
51 51 mappedBy: idLocal
52   - uorgs:
53   - targetEntity: Uorg
54   - mappedBy: local
55 52 lifecycleCallbacks:
56 53 postPersist: [ configurarFromConfigPadrao ]
... ...
src/Cacic/CommonBundle/Resources/config/doctrine/Patrimonio.orm.yml
... ... @@ -52,7 +52,7 @@ Cacic\CommonBundle\Entity\Patrimonio:
52 52 idUnidOrganizacionalNivel1:
53 53 type: integer
54 54 unsigned: false
55   - nullable: false
  55 + nullable: true
56 56 column: id_unid_organizacional_nivel1
57 57 manyToOne:
58 58 idUsuario:
... ...
src/Cacic/CommonBundle/Resources/config/doctrine/PropriedadeSoftware.orm.yml
... ... @@ -35,6 +35,7 @@ Cacic\CommonBundle\Entity\PropriedadeSoftware:
35 35 joinColumns:
36 36 id_computador:
37 37 referencedColumnName: id_computador
  38 + nullable: false
38 39 orphanRemoval: false
39 40 classProperty:
40 41 targetEntity: ClassProperty
... ... @@ -44,15 +45,18 @@ Cacic\CommonBundle\Entity\PropriedadeSoftware:
44 45 joinColumns:
45 46 id_class_property:
46 47 referencedColumnName: id_class_property
  48 + nullable: false
47 49 orphanRemoval: false
48   - oneToOne:
49 50 software:
50 51 targetEntity: Software
51   - joinColumn:
52   - name: id_software
53   - referencedColumnName: id_software
54   - orphanRemoval: false
  52 + cascade: { }
  53 + mappedBy: null
  54 + inversedBy: null
  55 + joinColumns:
  56 + id_software:
  57 + referencedColumnName: id_software
  58 + nullable: false
55 59 uniqueConstraints:
56 60 property_computador_idx:
57   - columns: [ id_class_property, id_computador ]
  61 + columns: [ id_class_property, id_computador, id_software ]
58 62 lifecycleCallbacks: { }
... ...
src/Cacic/CommonBundle/Resources/config/doctrine/Rede.orm.yml
... ... @@ -164,4 +164,7 @@ Cacic\CommonBundle\Entity\Rede:
164 164 acoes:
165 165 targetEntity: AcaoRede
166 166 mappedBy: rede
  167 + uorgs:
  168 + targetEntity: Uorg
  169 + mappedBy: rede
167 170 lifecycleCallbacks: { }
... ...
src/Cacic/CommonBundle/Resources/config/doctrine/Uorg.orm.yml
... ... @@ -76,11 +76,11 @@ Cacic\CommonBundle\Entity\Uorg:
76 76 name: id_tipo_uorg
77 77 referencedColumnName: id_tipo_uorg
78 78 nullable: false
79   - local:
80   - targetEntity: Cacic\CommonBundle\Entity\Local
  79 + rede:
  80 + targetEntity: Cacic\CommonBundle\Entity\Rede
81 81 inversedBy: uorgs
82 82 joinColumn:
83   - name: id_local
84   - referencedColumnName: id_local
  83 + name: id_rede
  84 + referencedColumnName: id_rede
85 85 nullable: true
86 86 lifecycleCallbacks: { }
... ...
src/Cacic/CommonBundle/Resources/config/routing.yml
... ... @@ -141,6 +141,9 @@ cacic_subrede_manutencao:
141 141 pattern: /subrede/manutencao
142 142 defaults: { _controller: CacicCommonBundle:Rede:manutencao}
143 143  
  144 +cacic_subrede_vincular:
  145 + pattern: /subrede/vincular
  146 + defaults: { _controller: CacicCommonBundle:Rede:vincular}
144 147  
145 148 cacic_aplicativo_index:
146 149 pattern: /aplicativo/{page}
... ... @@ -504,4 +507,4 @@ cacic_grupo_usuario_editar:
504 507  
505 508 cacic_grupo_usuario_excluir:
506 509 pattern: /grupousuario/excluir
507 510 - defaults: { _controller: CacicCommonBundle:GrupoUsuario:excluir}
  511 + defaults: { _controller: CacicCommonBundle:GrupoUsuario:excluir}
508 512 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Resources/data/demo.sql 0 → 100644
... ... @@ -0,0 +1,822 @@
  1 +--
  2 +-- PostgreSQL database dump
  3 +--
  4 +
  5 +SET statement_timeout = 0;
  6 +SET client_encoding = 'UTF8';
  7 +SET standard_conforming_strings = off;
  8 +SET check_function_bodies = false;
  9 +SET client_min_messages = warning;
  10 +SET escape_string_warning = off;
  11 +
  12 +SET search_path = public, pg_catalog;
  13 +
  14 +--
  15 +-- Data for Name: rede; Type: TABLE DATA; Schema: public; Owner: eduardo
  16 +--
  17 +
  18 +INSERT INTO rede (id_rede, id_local, id_servidor_autenticacao, te_ip_rede, nm_rede, te_observacao, nm_pessoa_contato1, nm_pessoa_contato2, nu_telefone1, te_email_contato2, nu_telefone2, te_email_contato1, te_serv_cacic, te_serv_updates, te_path_serv_updates, nm_usuario_login_serv_updates, te_senha_login_serv_updates, nu_porta_serv_updates, te_mascara_rede, dt_verifica_updates, nm_usuario_login_serv_updates_gerente, te_senha_login_serv_updates_gerente, nu_limite_ftp, cs_permitir_desativar_srcacic, te_debugging, dt_debug) VALUES (1, 1, NULL, '192.168.56.0', 'Rede Local', NULL, NULL, NULL, '', NULL, '', NULL, '192.168.56.1/cacic', '192.168.56.1', 'agentes', 'ftpcacic', 'cacicftp', '21', '255.255.255.0', NULL, 'ftpcacic', 'cacicftp', 100, 'N', NULL, NULL);
  19 +
  20 +
  21 +--
  22 +-- Data for Name: so; Type: TABLE DATA; Schema: public; Owner: eduardo
  23 +--
  24 +
  25 +INSERT INTO so (id_so, te_desc_so, sg_so, te_so, in_mswindows) VALUES (1, 'Windows XP SP3', 'WinXP-SP3', '2.5.1.1.256.32', 'S');
  26 +
  27 +
  28 +--
  29 +-- Data for Name: computador; Type: TABLE DATA; Schema: public; Owner: eduardo
  30 +--
  31 +
  32 +INSERT INTO computador (id_computador, id_usuario_exclusao, id_so, id_rede, nm_computador, te_node_address, te_ip_computador, dt_hr_inclusao, dt_hr_exclusao, dt_hr_ult_acesso, te_versao_cacic, te_versao_gercols, te_palavra_chave, dt_hr_coleta_forcada_estacao, te_nomes_curtos_modulos, id_conta, te_debugging, te_ultimo_login, dt_debug) VALUES (1, NULL, 1, 1, 'CACIC-2CEAC447', '08:00:27:1E:11:EE', '192.168.56.101', '2014-01-24 14:52:44', NULL, '2014-01-24 14:54:17', '2.8.1.', '2.8.1.', 'rBdxfI63M3zFF2+JYiWGew==__CRYPTED__', NULL, NULL, NULL, NULL, 'CACIC-2CEAC447\\cacic', NULL);
  33 +INSERT INTO computador (id_computador, id_usuario_exclusao, id_so, id_rede, nm_computador, te_node_address, te_ip_computador, dt_hr_inclusao, dt_hr_exclusao, dt_hr_ult_acesso, te_versao_cacic, te_versao_gercols, te_palavra_chave, dt_hr_coleta_forcada_estacao, te_nomes_curtos_modulos, id_conta, te_debugging, te_ultimo_login, dt_debug) VALUES (2, NULL, 1, 1, 'CAICIC-2CEAC447', '08:00:27:A1:4E:59', '192.168.56.102', '2014-01-24 14:52:54', NULL, '2014-01-24 14:54:37', '2.8.1.', '2.8.1.', 'irmEXAW3nKTVAZqaW1iVghbOEIGZNz8cn0ISfH+jiHw=__CRYPTED__', NULL, NULL, NULL, NULL, 'CAICIC-2CEAC447\\cacic', NULL);
  34 +
  35 +
  36 +--
  37 +-- Name: computador_id_computador_seq; Type: SEQUENCE SET; Schema: public; Owner: eduardo
  38 +--
  39 +
  40 +SELECT pg_catalog.setval('computador_id_computador_seq', 2, true);
  41 +
  42 +
  43 +--
  44 +-- Name: rede_id_rede_seq; Type: SEQUENCE SET; Schema: public; Owner: eduardo
  45 +--
  46 +
  47 +SELECT pg_catalog.setval('rede_id_rede_seq', 1, true);
  48 +
  49 +
  50 +--
  51 +-- Name: so_id_so_seq; Type: SEQUENCE SET; Schema: public; Owner: eduardo
  52 +--
  53 +
  54 +SELECT pg_catalog.setval('so_id_so_seq', 1, true);
  55 +
  56 +
  57 +--
  58 +-- PostgreSQL database dump complete
  59 +--
  60 +
  61 +--
  62 +-- PostgreSQL database dump
  63 +--
  64 +
  65 +SET statement_timeout = 0;
  66 +SET client_encoding = 'UTF8';
  67 +SET standard_conforming_strings = off;
  68 +SET check_function_bodies = false;
  69 +SET client_min_messages = warning;
  70 +SET escape_string_warning = off;
  71 +
  72 +SET search_path = public, pg_catalog;
  73 +
  74 +--
  75 +-- Data for Name: classe; Type: TABLE DATA; Schema: public; Owner: eduardo
  76 +--
  77 +
  78 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (1, 'Win32_ComputerSystem', 'The Win32_ComputerSystem WMI class represents a computer system running Windows.
  79 +The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.');
  80 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (2, 'OperatingSystem', 'The Win32_OperatingSystem WMI class represents a Windows-based operating system installed on a computer. Any operating system that can be installed on a computer that can run a Windows-based operating system is a descendent or member of this class. Win32_OperatingSystem is a singleton class. To get the single instance, use "@" for the key.
  81 +Windows Server 2003 and Windows XP:  If a computer has multiple operating systems installed, this class only returns an instance for the currently active operating system.
  82 +The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties and methods are in alphabetic order, not MOF order.');
  83 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (3, 'NetworkAdapterConfiguration', 'The Win32_NetworkAdapterConfiguration WMI class represents the attributes and behaviors of a network adapter. This class includes extra properties and methods that support the management of the TCP/IP and Internetwork Packet Exchange (IPX) protocols that are independent from the network adapter.
  84 +The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties are listed in alphabetic order, not MOF order.');
  85 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (4, 'SoftwareList', 'Computer softwares');
  86 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (5, 'Win32_Keyboard', 'Represents a keyboard installed on a computer system running Windows.');
  87 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (6, 'Win32_PointingDevice', 'Represents an input device used to point to and select regions on the display of a computer system running Windows.');
  88 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (7, 'Win32_PhysicalMedia', 'Represents any type of documentation or storage medium.');
  89 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (8, 'Win32_BaseBoard', 'Represents a baseboard (also known as a motherboard or system board).');
  90 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (9, 'Win32_BIOS', 'Represents the attributes of the computer system''s basic input or output services (BIOS) that are installed on the computer.');
  91 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (10, 'Win32_MemoryDevice', 'Represents the properties of a computer system''s memory device along with its associated mapped addresses.');
  92 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (11, 'Win32_PhysicalMemory', 'Represents a physical memory device located on a computer as available to the operating system.');
  93 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (12, 'Win32_Processor', 'Represents a device capable of interpreting a sequence of machine instructions on a computer system running Windows.');
  94 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (13, 'Win32_Printer', 'Represents a device connected to a computer system running Windows that is capable of reproducing a visual image on a medium.');
  95 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (14, 'Win32_DesktopMonitor', 'Represents the type of monitor or display device attached to the computer system.');
  96 +INSERT INTO classe (id_class, nm_class_name, te_class_description) VALUES (15, 'Patrimonio', 'Dados de patrimônio e localização física');
  97 +
  98 +
  99 +--
  100 +-- Data for Name: class_property; Type: TABLE DATA; Schema: public; Owner: eduardo
  101 +--
  102 +
  103 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (1, 1, 'Caption', 'Short description of the object—a one-line string. This property is inherited from CIM_ManagedSystemElement.', NULL, NULL);
  104 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (2, 1, 'Domain', 'Name of the domain to which a computer belongs.', NULL, NULL);
  105 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (3, 1, 'TotalPhysicalMemory', 'Total size of physical memory. Be aware that, under some circumstances, this property may not return an accurate value for the physical memory. For example, it is not accurate if the BIOS is using some of the physical memory. For an accurate value, use the Capacity property in Win32_PhysicalMemory instead.', NULL, NULL);
  106 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (4, 1, 'UserName', 'Name of a user that is logged on currently. This property must have a value. In a terminal services session, UserName returns the name of the user that is logged on to the console—not the user logged on during the terminal service session.', NULL, NULL);
  107 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (5, 3, 'DefaultIPGateway', 'Array of IP addresses of default gateways that the computer system uses.', NULL, NULL);
  108 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (6, 3, 'Description', 'Description of the CIM_Setting object. This property is inherited from CIM_Setting.', NULL, NULL);
  109 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (7, 3, 'DHCPServer', 'IP address of the dynamic host configuration protocol (DHCP) server.', NULL, NULL);
  110 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (8, 3, 'DNSDomain', 'Organization name followed by a period and an extension that indicates the type of organization, such as microsoft.com. The name can be any combination of the letters A through Z, the numerals 0 through 9, and the hyphen (-), plus the period (.) character used as a separator.', NULL, NULL);
  111 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (9, 3, 'DNSHostName', 'Host name used to identify the local computer for authentication by some utilities. Other TCP/IP-based utilities can use this value to acquire the name of the local computer. Host names are stored on DNS servers in a table that maps names to IP addresses for use by DNS. The name can be any combination of the letters A through Z, the numerals 0 through 9, and the hyphen (-), plus the period (.) character used as a separator. By default, this value is the Microsoft networking computer name, but the network administrator can assign another host name without affecting the computer name.', NULL, NULL);
  112 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (10, 3, 'DNSServerSearchOrder', 'Array of server IP addresses to be used in querying for DNS servers.', NULL, NULL);
  113 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (11, 3, 'IPAddress', 'Array of all of the IP addresses associated with the current network adapter. Starting with Windows Vista, this property can contain either IPv6 addresses or IPv4 addresses. For more information, see IPv6 and IPv4 Support in WMI.
  114 +Example IPv6 address: "2010:836B:4179::836B:4179"', NULL, NULL);
  115 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (12, 3, 'IPSubnet', 'Array of all of the subnet masks associated with the current network adapter.', NULL, NULL);
  116 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (13, 3, 'MACAddress', 'Media Access Control (MAC) address of the network adapter. A MAC address is assigned by the manufacturer to uniquely identify the network adapter.', NULL, NULL);
  117 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (14, 3, 'WINSPrimaryServer', 'IP address for the primary WINS server.', NULL, NULL);
  118 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (15, 3, 'WINSSecondaryServer', 'IP address for the secondary WINS server.', NULL, NULL);
  119 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (16, 2, 'Caption', 'Short description of the object—a one-line string. The string includes the operating system version. For example, "Microsoft Windows XP Professional Version = 5.1.2500". This property can be localized.', NULL, NULL);
  120 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (17, 2, 'CSDVersion', 'NULL-terminated string that indicates the latest service pack installed on a computer. If no service pack is installed, the string is NULL.', NULL, NULL);
  121 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (18, 2, 'InstallDate', 'Date object was installed. This property does not require a value to indicate that the object is installed.', NULL, NULL);
  122 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (19, 2, 'LastBootUpTime', 'Date and time the operating system was last restarted.', NULL, NULL);
  123 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (20, 2, 'NumberOfLicensedUsers', 'Number of user licenses for the operating system. If unlimited, enter 0 (zero). If unknown, enter -1.', NULL, NULL);
  124 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (21, 2, 'OSArchitecture', 'Architecture of the operating system, as opposed to the processor. This property can be localized.', NULL, NULL);
  125 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (22, 2, 'OSLanguage', 'Language version of the operating system installed.', NULL, NULL);
  126 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (23, 2, 'ProductType', 'Additional system information.', NULL, NULL);
  127 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (24, 2, 'SerialNumber', 'Operating system product serial identification number.', NULL, NULL);
  128 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (25, 2, 'Version', 'Version number of the operating system.', NULL, NULL);
  129 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (26, 4, 'IDSoftware', 'Identificador do software no registro.', NULL, NULL);
  130 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (27, 4, 'DisplayName', 'Nome do software.', NULL, NULL);
  131 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (28, 4, 'DisplayVersion', 'Versão identificada.', NULL, NULL);
  132 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (29, 4, 'URLInfoAbout', 'URL do software.', NULL, NULL);
  133 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (30, 4, 'Publisher', 'Nome do fabricante.', NULL, NULL);
  134 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (31, 5, 'Caption', 'Nome do teclado', NULL, NULL);
  135 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (32, 6, 'Caption', 'Nome', NULL, NULL);
  136 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (33, 7, 'Caption', 'Nome', NULL, NULL);
  137 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (34, 8, 'Caption', 'Nome', NULL, NULL);
  138 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (35, 9, 'Caption', 'Nome', NULL, NULL);
  139 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (36, 10, 'Caption', 'Nome', NULL, NULL);
  140 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (37, 11, 'Caption', 'Nome', NULL, NULL);
  141 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (38, 12, 'Caption', 'Nome', NULL, NULL);
  142 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (39, 13, 'Caption', 'Nome', NULL, NULL);
  143 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (40, 14, 'Caption', 'Nome', NULL, NULL);
  144 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (41, 15, 'IDPatrimonio', 'Número do patrimônio', NULL, NULL);
  145 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (42, 4, 'AddressBook', '', NULL, NULL);
  146 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (43, 4, 'Branding', '', NULL, NULL);
  147 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (44, 4, 'Connection Manager', '', NULL, NULL);
  148 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (45, 4, 'DirectAnimation', '', NULL, NULL);
  149 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (46, 4, 'DirectDrawEx', '', NULL, NULL);
  150 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (47, 4, 'DXM_Runtime', '', NULL, NULL);
  151 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (48, 4, 'EMCO MSI Package Builder Enterprise_is1', 'EMCO MSI Package Builder Enterprise', NULL, NULL);
  152 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (49, 4, 'EMCO MSI Package Builder Starter_is1', 'EMCO MSI Package Builder Starter', NULL, NULL);
  153 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (50, 4, 'Fontcore', '', NULL, NULL);
  154 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (51, 4, 'Gtk+ Development Environment for Windows', 'Gtk+ Development Environment for Windows 2.12.9-2', NULL, NULL);
  155 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (52, 4, 'ICW', '', NULL, NULL);
  156 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (53, 4, 'IE40', '', NULL, NULL);
  157 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (54, 4, 'IE4Data', '', NULL, NULL);
  158 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (55, 4, 'IE5BAKEX', '', NULL, NULL);
  159 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (56, 4, 'IEData', '', NULL, NULL);
  160 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (57, 4, 'Microsoft .NET Framework 2.0', 'Microsoft .NET Framework 2.0', NULL, NULL);
  161 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (58, 4, 'Microsoft .NET Framework 2.0 SDK - ENU', 'Microsoft .NET Framework 2.0 SDK - ENU', NULL, NULL);
  162 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (59, 4, 'Microsoft Visual J# 2.0 Redistributable Package', 'Microsoft Visual J# 2.0 Redistributable Package', NULL, NULL);
  163 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (60, 4, 'MobileOptionPack', '', NULL, NULL);
  164 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (61, 4, 'MPlayer2', '', NULL, NULL);
  165 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (62, 4, 'NetMeeting', '', NULL, NULL);
  166 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (63, 4, 'Oracle VM VirtualBox Guest Additions', 'Oracle VM VirtualBox Guest Additions 4.2.6', NULL, NULL);
  167 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (64, 4, 'OutlookExpress', '', NULL, NULL);
  168 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (65, 4, 'PCHealth', '', NULL, NULL);
  169 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (66, 4, 'RAD Studio', 'RAD Studio', NULL, NULL);
  170 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (67, 4, 'SchedulingAgent', '', NULL, NULL);
  171 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (68, 4, 'TortoiseCVS_is1', 'TortoiseCVS 1.12.5', NULL, NULL);
  172 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (69, 4, '{1D44F148-5A2A-42CB-83AA-DB2B156F1ED7}', 'WixEdit', NULL, NULL);
  173 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (70, 4, '{350C9416-3D7C-4EE8-BAA9-00BCB3D54227}', 'WebFldrs XP', NULL, NULL);
  174 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (71, 4, '{5A37B181-B8D0-48C3-B4A4-5DC1ED104CED}', 'VC9RunTime', NULL, NULL);
  175 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (72, 4, '{639159C2-B27B-4208-8965-D8A0AEDBDED2}', 'Microsoft .NET Framework 2.0 SDK - ENU', NULL, NULL);
  176 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (73, 4, '{68A35043-C55A-4237-88C9-37EE1C63ED71}', 'Microsoft Visual J# 2.0 Redistributable Package', NULL, NULL);
  177 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (172, 9, 'Version', 'On the fly created Property', NULL, NULL);
  178 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (74, 4, '{710D9F65-B7F0-416C-9022-8C9098521270}', '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL);
  179 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (75, 4, '{7131646D-CD3C-40F4-97B9-CD9E4E6262EF}', 'Microsoft .NET Framework 2.0', NULL, NULL);
  180 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (76, 4, '{72263053-50D1-4598-9502-51ED64E54C51}', 'Borland Delphi 7', NULL, NULL);
  181 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (77, 4, '{76F9F5C5-FF87-4ED8-B63C-2A25A299C4AA}', 'CVSNT 2.5.05.3744', NULL, NULL);
  182 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (78, 4, '{84ADC96C-B7E0-4938-9D6E-2B640D5DA224}', 'Python 2.7.4', NULL, NULL);
  183 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (79, 4, '{91227C10-CE03-4A31-BD0E-4986AB490716}', '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL);
  184 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (80, 4, '{99758AC8-E271-4B1F-8092-865CD59A0D44}', '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL);
  185 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (81, 4, '{9B09BEF2-10C4-4011-85F0-D9E5D18D641E}', 'Instalação Cacic2.6Beta2 IPEA', NULL, NULL);
  186 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (82, 4, '{9B74BFA1-CA98-444D-853F-5C28593799CB}', '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL);
  187 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (83, 4, '{B6CF2967-C81E-40C0-9815-C05774FEF120}', 'Skype Click to Call', NULL, NULL);
  188 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (84, 4, '{B7031148-C6E7-40F6-A978-EED2E77E7D1B}', 'RAD Studio', NULL, NULL);
  189 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (85, 4, '{C15A8A76-9077-4DD1-95E5-4807A5B7D2AC}', '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL);
  190 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (86, 4, '{C9DCF4E9-A41B-40E7-B028-2255E36D2A1C}', 'TortoiseOverlays', NULL, NULL);
  191 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (87, 4, '{CF1215D3-8784-4908-9732-970A81248C7A}', '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL);
  192 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (88, 4, '{EE7257A2-39A2-4D2F-9DAC-F9F25B8AE1D8}', 'Skypeâ„¢ 5.9', NULL, NULL);
  193 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (89, 5, 'Availability', 'On the fly created Property', NULL, NULL);
  194 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (90, 5, 'Description', 'On the fly created Property', NULL, NULL);
  195 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (91, 5, 'InstallDate', 'On the fly created Property', NULL, NULL);
  196 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (92, 5, 'Name', 'On the fly created Property', NULL, NULL);
  197 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (93, 6, 'Availability', 'On the fly created Property', NULL, NULL);
  198 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (94, 6, 'Description', 'On the fly created Property', NULL, NULL);
  199 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (95, 6, 'InstallDate', 'On the fly created Property', NULL, NULL);
  200 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (96, 6, 'Manufacturer', 'On the fly created Property', NULL, NULL);
  201 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (97, 6, 'Name', 'On the fly created Property', NULL, NULL);
  202 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (98, 7, 'Capacity', 'On the fly created Property', NULL, NULL);
  203 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (99, 7, 'Description', 'On the fly created Property', NULL, NULL);
  204 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (100, 7, 'InstallDate', 'On the fly created Property', NULL, NULL);
  205 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (101, 7, 'Manufacturer', 'On the fly created Property', NULL, NULL);
  206 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (102, 7, 'MediaDescription', 'On the fly created Property', NULL, NULL);
  207 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (103, 7, 'MediaType', 'On the fly created Property', NULL, NULL);
  208 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (104, 7, 'Model', 'On the fly created Property', NULL, NULL);
  209 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (105, 7, 'Name', 'On the fly created Property', NULL, NULL);
  210 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (106, 7, 'OtherIdentifyingInfo', 'On the fly created Property', NULL, NULL);
  211 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (107, 7, 'PartNumber', 'On the fly created Property', NULL, NULL);
  212 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (108, 7, 'SerialNumber', 'On the fly created Property', NULL, NULL);
  213 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (109, 7, 'SKU', 'On the fly created Property', NULL, NULL);
  214 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (110, 7, 'Tag', 'On the fly created Property', NULL, NULL);
  215 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (111, 7, 'Version', 'On the fly created Property', NULL, NULL);
  216 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (112, 9, 'BiosCharacteristics', 'On the fly created Property', NULL, NULL);
  217 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (113, 9, 'BIOSVersion', 'On the fly created Property', NULL, NULL);
  218 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (114, 9, 'BuildNumber', 'On the fly created Property', NULL, NULL);
  219 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (115, 9, 'CodeSet', 'On the fly created Property', NULL, NULL);
  220 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (116, 9, 'Description', 'On the fly created Property', NULL, NULL);
  221 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (117, 9, 'IdentificationCode', 'On the fly created Property', NULL, NULL);
  222 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (118, 9, 'InstallDate', 'On the fly created Property', NULL, NULL);
  223 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (119, 9, 'Manufacturer', 'On the fly created Property', NULL, NULL);
  224 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (120, 9, 'Name', 'On the fly created Property', NULL, NULL);
  225 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (121, 9, 'OtherTargetOS', 'On the fly created Property', NULL, NULL);
  226 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (122, 9, 'PrimaryBIOS', 'On the fly created Property', NULL, NULL);
  227 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (123, 9, 'ReleaseDate', 'On the fly created Property', NULL, NULL);
  228 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (124, 9, 'SerialNumber', 'On the fly created Property', NULL, NULL);
  229 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (125, 9, 'SMBIOSBIOSVersion', 'On the fly created Property', NULL, NULL);
  230 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (126, 9, 'SMBIOSMajorVersion', 'On the fly created Property', NULL, NULL);
  231 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (127, 9, 'SMBIOSMinorVersion', 'On the fly created Property', NULL, NULL);
  232 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (128, 9, 'SoftwareElementID', 'On the fly created Property', NULL, NULL);
  233 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (129, 9, 'TargetOperatingSystem', 'On the fly created Property', NULL, NULL);
  234 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (130, 9, 'Version', 'On the fly created Property', NULL, NULL);
  235 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (131, 5, 'Availability', 'On the fly created Property', NULL, NULL);
  236 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (132, 5, 'Description', 'On the fly created Property', NULL, NULL);
  237 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (133, 5, 'InstallDate', 'On the fly created Property', NULL, NULL);
  238 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (134, 5, 'Name', 'On the fly created Property', NULL, NULL);
  239 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (135, 6, 'Availability', 'On the fly created Property', NULL, NULL);
  240 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (136, 6, 'Description', 'On the fly created Property', NULL, NULL);
  241 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (137, 6, 'InstallDate', 'On the fly created Property', NULL, NULL);
  242 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (138, 6, 'Manufacturer', 'On the fly created Property', NULL, NULL);
  243 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (139, 6, 'Name', 'On the fly created Property', NULL, NULL);
  244 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (140, 7, 'Capacity', 'On the fly created Property', NULL, NULL);
  245 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (141, 7, 'Description', 'On the fly created Property', NULL, NULL);
  246 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (142, 7, 'InstallDate', 'On the fly created Property', NULL, NULL);
  247 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (143, 7, 'Manufacturer', 'On the fly created Property', NULL, NULL);
  248 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (144, 7, 'MediaDescription', 'On the fly created Property', NULL, NULL);
  249 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (145, 7, 'MediaType', 'On the fly created Property', NULL, NULL);
  250 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (146, 7, 'Model', 'On the fly created Property', NULL, NULL);
  251 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (147, 7, 'Name', 'On the fly created Property', NULL, NULL);
  252 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (148, 7, 'OtherIdentifyingInfo', 'On the fly created Property', NULL, NULL);
  253 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (149, 7, 'PartNumber', 'On the fly created Property', NULL, NULL);
  254 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (150, 7, 'SerialNumber', 'On the fly created Property', NULL, NULL);
  255 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (151, 7, 'SKU', 'On the fly created Property', NULL, NULL);
  256 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (152, 7, 'Tag', 'On the fly created Property', NULL, NULL);
  257 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (153, 7, 'Version', 'On the fly created Property', NULL, NULL);
  258 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (154, 9, 'BiosCharacteristics', 'On the fly created Property', NULL, NULL);
  259 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (155, 9, 'BIOSVersion', 'On the fly created Property', NULL, NULL);
  260 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (156, 9, 'BuildNumber', 'On the fly created Property', NULL, NULL);
  261 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (157, 9, 'CodeSet', 'On the fly created Property', NULL, NULL);
  262 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (158, 9, 'Description', 'On the fly created Property', NULL, NULL);
  263 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (159, 9, 'IdentificationCode', 'On the fly created Property', NULL, NULL);
  264 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (160, 9, 'InstallDate', 'On the fly created Property', NULL, NULL);
  265 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (161, 9, 'Manufacturer', 'On the fly created Property', NULL, NULL);
  266 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (162, 9, 'Name', 'On the fly created Property', NULL, NULL);
  267 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (163, 9, 'OtherTargetOS', 'On the fly created Property', NULL, NULL);
  268 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (164, 9, 'PrimaryBIOS', 'On the fly created Property', NULL, NULL);
  269 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (165, 9, 'ReleaseDate', 'On the fly created Property', NULL, NULL);
  270 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (166, 9, 'SerialNumber', 'On the fly created Property', NULL, NULL);
  271 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (167, 9, 'SMBIOSBIOSVersion', 'On the fly created Property', NULL, NULL);
  272 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (168, 9, 'SMBIOSMajorVersion', 'On the fly created Property', NULL, NULL);
  273 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (169, 9, 'SMBIOSMinorVersion', 'On the fly created Property', NULL, NULL);
  274 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (170, 9, 'SoftwareElementID', 'On the fly created Property', NULL, NULL);
  275 +INSERT INTO class_property (id_class_property, id_class, nm_property_name, te_property_description, nm_function_pre_db, nm_function_pos_db) VALUES (171, 9, 'TargetOperatingSystem', 'On the fly created Property', NULL, NULL);
  276 +
  277 +
  278 +--
  279 +-- Name: class_property_id_class_property_seq; Type: SEQUENCE SET; Schema: public; Owner: eduardo
  280 +--
  281 +
  282 +SELECT pg_catalog.setval('class_property_id_class_property_seq', 172, true);
  283 +
  284 +
  285 +--
  286 +-- Name: classe_id_class_seq; Type: SEQUENCE SET; Schema: public; Owner: eduardo
  287 +--
  288 +
  289 +SELECT pg_catalog.setval('classe_id_class_seq', 15, true);
  290 +
  291 +
  292 +--
  293 +-- PostgreSQL database dump complete
  294 +--
  295 +
  296 +--
  297 +-- PostgreSQL database dump
  298 +--
  299 +
  300 +SET statement_timeout = 0;
  301 +SET client_encoding = 'UTF8';
  302 +SET standard_conforming_strings = off;
  303 +SET check_function_bodies = false;
  304 +SET client_min_messages = warning;
  305 +SET escape_string_warning = off;
  306 +
  307 +SET search_path = public, pg_catalog;
  308 +
  309 +--
  310 +-- Data for Name: computador_coleta; Type: TABLE DATA; Schema: public; Owner: eduardo
  311 +--
  312 +
  313 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (1, 1, 42, NULL, 'AddressBook');
  314 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (2, 1, 43, NULL, 'Branding');
  315 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (3, 1, 44, NULL, 'Connection Manager');
  316 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (4, 1, 45, NULL, 'DirectAnimation');
  317 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (5, 1, 46, NULL, 'DirectDrawEx');
  318 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (6, 1, 47, NULL, 'DXM_Runtime');
  319 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (7, 1, 48, NULL, 'EMCO MSI Package Builder Enterprise_is1');
  320 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (8, 1, 49, NULL, 'EMCO MSI Package Builder Starter_is1');
  321 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (9, 1, 50, NULL, 'Fontcore');
  322 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (10, 1, 51, NULL, 'Gtk+ Development Environment for Windows');
  323 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (11, 1, 52, NULL, 'ICW');
  324 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (12, 1, 53, NULL, 'IE40');
  325 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (13, 1, 54, NULL, 'IE4Data');
  326 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (14, 1, 55, NULL, 'IE5BAKEX');
  327 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (15, 1, 56, NULL, 'IEData');
  328 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (16, 1, 57, NULL, 'Microsoft .NET Framework 2.0');
  329 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (17, 1, 58, NULL, 'Microsoft .NET Framework 2.0 SDK - ENU');
  330 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (18, 1, 59, NULL, 'Microsoft Visual J# 2.0 Redistributable Package');
  331 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (19, 1, 60, NULL, 'MobileOptionPack');
  332 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (20, 1, 61, NULL, 'MPlayer2');
  333 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (21, 1, 62, NULL, 'NetMeeting');
  334 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (22, 1, 63, NULL, 'Oracle VM VirtualBox Guest Additions');
  335 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (23, 1, 64, NULL, 'OutlookExpress');
  336 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (24, 1, 65, NULL, 'PCHealth');
  337 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (25, 1, 66, NULL, 'RAD Studio');
  338 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (26, 1, 67, NULL, 'SchedulingAgent');
  339 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (27, 1, 68, NULL, 'TortoiseCVS_is1');
  340 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (28, 1, 69, NULL, '{1D44F148-5A2A-42CB-83AA-DB2B156F1ED7}');
  341 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (29, 1, 70, NULL, '{350C9416-3D7C-4EE8-BAA9-00BCB3D54227}');
  342 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (30, 1, 71, NULL, '{5A37B181-B8D0-48C3-B4A4-5DC1ED104CED}');
  343 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (31, 1, 72, NULL, '{639159C2-B27B-4208-8965-D8A0AEDBDED2}');
  344 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (32, 1, 73, NULL, '{68A35043-C55A-4237-88C9-37EE1C63ED71}');
  345 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (33, 1, 74, NULL, '{710D9F65-B7F0-416C-9022-8C9098521270}');
  346 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (34, 1, 75, NULL, '{7131646D-CD3C-40F4-97B9-CD9E4E6262EF}');
  347 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (35, 1, 76, NULL, '{72263053-50D1-4598-9502-51ED64E54C51}');
  348 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (36, 1, 77, NULL, '{76F9F5C5-FF87-4ED8-B63C-2A25A299C4AA}');
  349 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (37, 1, 78, NULL, '{84ADC96C-B7E0-4938-9D6E-2B640D5DA224}');
  350 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (38, 1, 79, NULL, '{91227C10-CE03-4A31-BD0E-4986AB490716}');
  351 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (39, 1, 80, NULL, '{99758AC8-E271-4B1F-8092-865CD59A0D44}');
  352 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (40, 1, 81, NULL, '{9B09BEF2-10C4-4011-85F0-D9E5D18D641E}');
  353 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (41, 1, 82, NULL, '{9B74BFA1-CA98-444D-853F-5C28593799CB}');
  354 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (42, 1, 83, NULL, '{B6CF2967-C81E-40C0-9815-C05774FEF120}');
  355 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (43, 1, 84, NULL, '{B7031148-C6E7-40F6-A978-EED2E77E7D1B}');
  356 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (44, 1, 85, NULL, '{C15A8A76-9077-4DD1-95E5-4807A5B7D2AC}');
  357 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (45, 1, 86, NULL, '{C9DCF4E9-A41B-40E7-B028-2255E36D2A1C}');
  358 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (46, 1, 87, NULL, '{CF1215D3-8784-4908-9732-970A81248C7A}');
  359 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (47, 1, 88, NULL, '{EE7257A2-39A2-4D2F-9DAC-F9F25B8AE1D8}');
  360 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (48, 1, 31, NULL, 'Aperfeiçoado (101 ou 102 teclas)');
  361 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (49, 1, 90, NULL, 'Teclado padrão com 101/102 teclas ou Microsoft Natural PS/2 Keyboard');
  362 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (50, 1, 92, NULL, 'Aperfeiçoado (101 ou 102 teclas)');
  363 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (51, 1, 93, NULL, '[[REG]]');
  364 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (52, 1, 32, NULL, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB');
  365 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (53, 1, 94, NULL, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB');
  366 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (54, 1, 95, NULL, '[[REG]]');
  367 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (55, 2, 42, NULL, 'AddressBook');
  368 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (56, 1, 96, NULL, 'Microsoft[[REG]](Dispositivos de sistema padrão)');
  369 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (57, 2, 43, NULL, 'Branding');
  370 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (58, 1, 97, NULL, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB');
  371 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (59, 2, 44, NULL, 'Connection Manager');
  372 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (60, 2, 45, NULL, 'DirectAnimation');
  373 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (61, 2, 46, NULL, 'DirectDrawEx');
  374 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (62, 2, 47, NULL, 'DXM_Runtime');
  375 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (63, 2, 48, NULL, 'EMCO MSI Package Builder Enterprise_is1');
  376 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (64, 2, 49, NULL, 'EMCO MSI Package Builder Starter_is1');
  377 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (65, 1, 108, NULL, '42563862383439663738312d6335626462652062');
  378 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (66, 2, 50, NULL, 'Fontcore');
  379 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (67, 1, 110, NULL, '....PHYSICALDRIVE0');
  380 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (68, 2, 51, NULL, 'Gtk+ Development Environment for Windows');
  381 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (69, 1, 112, NULL, '4');
  382 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (70, 2, 52, NULL, 'ICW');
  383 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (71, 1, 113, NULL, 'VBOX - 1');
  384 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (72, 2, 53, NULL, 'IE40');
  385 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (73, 1, 35, NULL, 'Default System BIOS');
  386 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (74, 2, 54, NULL, 'IE4Data');
  387 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (75, 1, 116, NULL, 'Default System BIOS');
  388 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (76, 2, 55, NULL, 'IE5BAKEX');
  389 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (77, 2, 56, NULL, 'IEData');
  390 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (78, 1, 119, NULL, 'innotek GmbH');
  391 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (79, 1, 120, NULL, 'Default System BIOS');
  392 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (80, 2, 57, NULL, 'Microsoft .NET Framework 2.0');
  393 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (81, 1, 122, NULL, 'True');
  394 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (82, 2, 58, NULL, 'Microsoft .NET Framework 2.0 SDK - ENU');
  395 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (83, 1, 123, NULL, '20061201000000.000000+000');
  396 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (84, 2, 59, NULL, 'Microsoft Visual J# 2.0 Redistributable Package');
  397 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (85, 1, 124, NULL, '0');
  398 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (86, 2, 60, NULL, 'MobileOptionPack');
  399 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (87, 1, 125, NULL, 'VirtualBox');
  400 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (88, 1, 126, NULL, '2');
  401 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (89, 2, 61, NULL, 'MPlayer2');
  402 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (90, 1, 127, NULL, '5');
  403 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (91, 2, 62, NULL, 'NetMeeting');
  404 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (92, 1, 128, NULL, 'Default System BIOS');
  405 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (93, 2, 63, NULL, 'Oracle VM VirtualBox Guest Additions');
  406 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (94, 1, 129, NULL, '0');
  407 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (95, 1, 130, NULL, 'VBOX - 1');
  408 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (96, 2, 64, NULL, 'OutlookExpress');
  409 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (97, 2, 65, NULL, 'PCHealth');
  410 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (98, 2, 66, NULL, 'RAD Studio');
  411 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (99, 2, 67, NULL, 'SchedulingAgent');
  412 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (100, 2, 68, NULL, 'TortoiseCVS_is1');
  413 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (101, 2, 69, NULL, '{1D44F148-5A2A-42CB-83AA-DB2B156F1ED7}');
  414 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (102, 2, 70, NULL, '{350C9416-3D7C-4EE8-BAA9-00BCB3D54227}');
  415 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (103, 2, 71, NULL, '{5A37B181-B8D0-48C3-B4A4-5DC1ED104CED}');
  416 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (104, 2, 72, NULL, '{639159C2-B27B-4208-8965-D8A0AEDBDED2}');
  417 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (105, 2, 73, NULL, '{68A35043-C55A-4237-88C9-37EE1C63ED71}');
  418 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (106, 2, 74, NULL, '{710D9F65-B7F0-416C-9022-8C9098521270}');
  419 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (107, 2, 75, NULL, '{7131646D-CD3C-40F4-97B9-CD9E4E6262EF}');
  420 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (108, 2, 76, NULL, '{72263053-50D1-4598-9502-51ED64E54C51}');
  421 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (109, 2, 77, NULL, '{76F9F5C5-FF87-4ED8-B63C-2A25A299C4AA}');
  422 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (110, 2, 78, NULL, '{84ADC96C-B7E0-4938-9D6E-2B640D5DA224}');
  423 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (111, 2, 79, NULL, '{91227C10-CE03-4A31-BD0E-4986AB490716}');
  424 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (112, 2, 80, NULL, '{99758AC8-E271-4B1F-8092-865CD59A0D44}');
  425 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (113, 2, 81, NULL, '{9B09BEF2-10C4-4011-85F0-D9E5D18D641E}');
  426 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (114, 2, 82, NULL, '{9B74BFA1-CA98-444D-853F-5C28593799CB}');
  427 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (115, 2, 83, NULL, '{B6CF2967-C81E-40C0-9815-C05774FEF120}');
  428 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (116, 2, 84, NULL, '{B7031148-C6E7-40F6-A978-EED2E77E7D1B}');
  429 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (117, 2, 85, NULL, '{C15A8A76-9077-4DD1-95E5-4807A5B7D2AC}');
  430 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (118, 2, 86, NULL, '{C9DCF4E9-A41B-40E7-B028-2255E36D2A1C}');
  431 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (119, 2, 87, NULL, '{CF1215D3-8784-4908-9732-970A81248C7A}');
  432 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (120, 2, 88, NULL, '{EE7257A2-39A2-4D2F-9DAC-F9F25B8AE1D8}');
  433 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (121, 2, 31, NULL, 'Aperfeiçoado (101 ou 102 teclas)');
  434 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (122, 2, 132, NULL, 'Teclado padrão com 101/102 teclas ou Microsoft Natural PS/2 Keyboard');
  435 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (123, 2, 134, NULL, 'Aperfeiçoado (101 ou 102 teclas)');
  436 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (124, 2, 135, NULL, '[[REG]]');
  437 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (125, 2, 32, NULL, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB');
  438 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (126, 2, 136, NULL, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB');
  439 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (127, 2, 137, NULL, '[[REG]]');
  440 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (128, 2, 138, NULL, 'Microsoft[[REG]](Dispositivos de sistema padrão)');
  441 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (129, 2, 139, NULL, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB');
  442 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (130, 2, 150, NULL, '42566431346538656337382d6161626330632039');
  443 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (131, 2, 152, NULL, '....PHYSICALDRIVE0');
  444 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (132, 2, 154, NULL, '4');
  445 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (133, 2, 155, NULL, 'VBOX - 1');
  446 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (134, 2, 35, NULL, 'Default System BIOS');
  447 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (135, 2, 158, NULL, 'Default System BIOS');
  448 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (136, 2, 161, NULL, 'innotek GmbH');
  449 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (137, 2, 162, NULL, 'Default System BIOS');
  450 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (138, 2, 164, NULL, 'True');
  451 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (139, 2, 165, NULL, '20061201000000.000000+000');
  452 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (140, 2, 166, NULL, '0');
  453 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (141, 2, 167, NULL, 'VirtualBox');
  454 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (142, 2, 168, NULL, '2');
  455 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (143, 2, 169, NULL, '5');
  456 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (144, 2, 170, NULL, 'Default System BIOS');
  457 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (145, 2, 171, NULL, '0');
  458 +INSERT INTO computador_coleta (id_computador_coleta, id_computador, id_class_property, id_class, te_class_property_value) VALUES (146, 2, 172, NULL, 'VBOX - 1');
  459 +
  460 +
  461 +--
  462 +-- Data for Name: computador_coleta_historico; Type: TABLE DATA; Schema: public; Owner: eduardo
  463 +--
  464 +
  465 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (1, 1, 1, 42, 'AddressBook', '2014-01-24 14:54:18');
  466 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (2, 2, 1, 43, 'Branding', '2014-01-24 14:54:18');
  467 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (3, 3, 1, 44, 'Connection Manager', '2014-01-24 14:54:18');
  468 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (4, 4, 1, 45, 'DirectAnimation', '2014-01-24 14:54:18');
  469 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (5, 5, 1, 46, 'DirectDrawEx', '2014-01-24 14:54:18');
  470 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (6, 6, 1, 47, 'DXM_Runtime', '2014-01-24 14:54:19');
  471 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (7, 7, 1, 48, 'EMCO MSI Package Builder Enterprise_is1', '2014-01-24 14:54:19');
  472 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (8, 8, 1, 49, 'EMCO MSI Package Builder Starter_is1', '2014-01-24 14:54:19');
  473 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (9, 9, 1, 50, 'Fontcore', '2014-01-24 14:54:19');
  474 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (10, 10, 1, 51, 'Gtk+ Development Environment for Windows', '2014-01-24 14:54:19');
  475 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (11, 11, 1, 52, 'ICW', '2014-01-24 14:54:19');
  476 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (12, 12, 1, 53, 'IE40', '2014-01-24 14:54:19');
  477 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (13, 13, 1, 54, 'IE4Data', '2014-01-24 14:54:19');
  478 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (14, 14, 1, 55, 'IE5BAKEX', '2014-01-24 14:54:19');
  479 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (15, 15, 1, 56, 'IEData', '2014-01-24 14:54:19');
  480 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (16, 16, 1, 57, 'Microsoft .NET Framework 2.0', '2014-01-24 14:54:19');
  481 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (17, 17, 1, 58, 'Microsoft .NET Framework 2.0 SDK - ENU', '2014-01-24 14:54:20');
  482 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (18, 18, 1, 59, 'Microsoft Visual J# 2.0 Redistributable Package', '2014-01-24 14:54:20');
  483 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (19, 19, 1, 60, 'MobileOptionPack', '2014-01-24 14:54:20');
  484 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (20, 20, 1, 61, 'MPlayer2', '2014-01-24 14:54:20');
  485 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (21, 21, 1, 62, 'NetMeeting', '2014-01-24 14:54:20');
  486 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (22, 22, 1, 63, 'Oracle VM VirtualBox Guest Additions', '2014-01-24 14:54:20');
  487 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (23, 23, 1, 64, 'OutlookExpress', '2014-01-24 14:54:20');
  488 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (24, 24, 1, 65, 'PCHealth', '2014-01-24 14:54:20');
  489 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (25, 25, 1, 66, 'RAD Studio', '2014-01-24 14:54:20');
  490 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (26, 26, 1, 67, 'SchedulingAgent', '2014-01-24 14:54:21');
  491 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (27, 27, 1, 68, 'TortoiseCVS_is1', '2014-01-24 14:54:21');
  492 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (28, 28, 1, 69, '{1D44F148-5A2A-42CB-83AA-DB2B156F1ED7}', '2014-01-24 14:54:21');
  493 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (29, 29, 1, 70, '{350C9416-3D7C-4EE8-BAA9-00BCB3D54227}', '2014-01-24 14:54:21');
  494 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (30, 30, 1, 71, '{5A37B181-B8D0-48C3-B4A4-5DC1ED104CED}', '2014-01-24 14:54:21');
  495 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (31, 31, 1, 72, '{639159C2-B27B-4208-8965-D8A0AEDBDED2}', '2014-01-24 14:54:21');
  496 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (32, 32, 1, 73, '{68A35043-C55A-4237-88C9-37EE1C63ED71}', '2014-01-24 14:54:21');
  497 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (33, 33, 1, 74, '{710D9F65-B7F0-416C-9022-8C9098521270}', '2014-01-24 14:54:21');
  498 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (34, 34, 1, 75, '{7131646D-CD3C-40F4-97B9-CD9E4E6262EF}', '2014-01-24 14:54:22');
  499 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (35, 35, 1, 76, '{72263053-50D1-4598-9502-51ED64E54C51}', '2014-01-24 14:54:22');
  500 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (36, 36, 1, 77, '{76F9F5C5-FF87-4ED8-B63C-2A25A299C4AA}', '2014-01-24 14:54:22');
  501 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (37, 37, 1, 78, '{84ADC96C-B7E0-4938-9D6E-2B640D5DA224}', '2014-01-24 14:54:22');
  502 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (38, 38, 1, 79, '{91227C10-CE03-4A31-BD0E-4986AB490716}', '2014-01-24 14:54:22');
  503 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (39, 39, 1, 80, '{99758AC8-E271-4B1F-8092-865CD59A0D44}', '2014-01-24 14:54:22');
  504 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (40, 40, 1, 81, '{9B09BEF2-10C4-4011-85F0-D9E5D18D641E}', '2014-01-24 14:54:22');
  505 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (41, 41, 1, 82, '{9B74BFA1-CA98-444D-853F-5C28593799CB}', '2014-01-24 14:54:23');
  506 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (42, 42, 1, 83, '{B6CF2967-C81E-40C0-9815-C05774FEF120}', '2014-01-24 14:54:23');
  507 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (43, 43, 1, 84, '{B7031148-C6E7-40F6-A978-EED2E77E7D1B}', '2014-01-24 14:54:23');
  508 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (44, 44, 1, 85, '{C15A8A76-9077-4DD1-95E5-4807A5B7D2AC}', '2014-01-24 14:54:23');
  509 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (45, 45, 1, 86, '{C9DCF4E9-A41B-40E7-B028-2255E36D2A1C}', '2014-01-24 14:54:23');
  510 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (46, 46, 1, 87, '{CF1215D3-8784-4908-9732-970A81248C7A}', '2014-01-24 14:54:23');
  511 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (47, 47, 1, 88, '{EE7257A2-39A2-4D2F-9DAC-F9F25B8AE1D8}', '2014-01-24 14:54:23');
  512 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (48, 48, 1, 31, 'Aperfeiçoado (101 ou 102 teclas)', '2014-01-24 14:54:25');
  513 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (49, 49, 1, 90, 'Teclado padrão com 101/102 teclas ou Microsoft Natural PS/2 Keyboard', '2014-01-24 14:54:25');
  514 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (50, 50, 1, 92, 'Aperfeiçoado (101 ou 102 teclas)', '2014-01-24 14:54:25');
  515 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (51, 51, 1, 93, '[[REG]]', '2014-01-24 14:54:25');
  516 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (52, 52, 1, 32, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB', '2014-01-24 14:54:25');
  517 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (53, 53, 1, 94, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB', '2014-01-24 14:54:25');
  518 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (54, 54, 1, 95, '[[REG]]', '2014-01-24 14:54:25');
  519 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (55, 55, 2, 42, 'AddressBook', '2014-01-24 14:54:25');
  520 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (56, 56, 1, 96, 'Microsoft[[REG]](Dispositivos de sistema padrão)', '2014-01-24 14:54:25');
  521 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (57, 57, 2, 43, 'Branding', '2014-01-24 14:54:25');
  522 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (58, 58, 1, 97, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB', '2014-01-24 14:54:25');
  523 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (59, 59, 2, 44, 'Connection Manager', '2014-01-24 14:54:25');
  524 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (60, 60, 2, 45, 'DirectAnimation', '2014-01-24 14:54:25');
  525 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (61, 61, 2, 46, 'DirectDrawEx', '2014-01-24 14:54:25');
  526 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (62, 62, 2, 47, 'DXM_Runtime', '2014-01-24 14:54:25');
  527 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (63, 63, 2, 48, 'EMCO MSI Package Builder Enterprise_is1', '2014-01-24 14:54:25');
  528 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (64, 64, 2, 49, 'EMCO MSI Package Builder Starter_is1', '2014-01-24 14:54:25');
  529 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (65, 65, 1, 108, '42563862383439663738312d6335626462652062', '2014-01-24 14:54:25');
  530 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (66, 66, 2, 50, 'Fontcore', '2014-01-24 14:54:26');
  531 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (67, 67, 1, 110, '....PHYSICALDRIVE0', '2014-01-24 14:54:26');
  532 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (68, 68, 2, 51, 'Gtk+ Development Environment for Windows', '2014-01-24 14:54:26');
  533 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (69, 69, 1, 112, '4', '2014-01-24 14:54:26');
  534 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (70, 70, 2, 52, 'ICW', '2014-01-24 14:54:26');
  535 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (71, 71, 1, 113, 'VBOX - 1', '2014-01-24 14:54:26');
  536 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (72, 72, 2, 53, 'IE40', '2014-01-24 14:54:26');
  537 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (73, 73, 1, 35, 'Default System BIOS', '2014-01-24 14:54:26');
  538 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (74, 74, 2, 54, 'IE4Data', '2014-01-24 14:54:26');
  539 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (75, 75, 1, 116, 'Default System BIOS', '2014-01-24 14:54:26');
  540 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (76, 76, 2, 55, 'IE5BAKEX', '2014-01-24 14:54:26');
  541 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (77, 77, 2, 56, 'IEData', '2014-01-24 14:54:26');
  542 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (78, 78, 1, 119, 'innotek GmbH', '2014-01-24 14:54:26');
  543 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (79, 79, 1, 120, 'Default System BIOS', '2014-01-24 14:54:26');
  544 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (80, 80, 2, 57, 'Microsoft .NET Framework 2.0', '2014-01-24 14:54:26');
  545 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (81, 81, 1, 122, 'True', '2014-01-24 14:54:26');
  546 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (82, 82, 2, 58, 'Microsoft .NET Framework 2.0 SDK - ENU', '2014-01-24 14:54:26');
  547 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (83, 83, 1, 123, '20061201000000.000000+000', '2014-01-24 14:54:26');
  548 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (84, 84, 2, 59, 'Microsoft Visual J# 2.0 Redistributable Package', '2014-01-24 14:54:26');
  549 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (85, 85, 1, 124, '0', '2014-01-24 14:54:27');
  550 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (86, 86, 2, 60, 'MobileOptionPack', '2014-01-24 14:54:27');
  551 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (87, 87, 1, 125, 'VirtualBox', '2014-01-24 14:54:27');
  552 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (88, 88, 1, 126, '2', '2014-01-24 14:54:27');
  553 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (89, 89, 2, 61, 'MPlayer2', '2014-01-24 14:54:27');
  554 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (90, 90, 1, 127, '5', '2014-01-24 14:54:27');
  555 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (91, 91, 2, 62, 'NetMeeting', '2014-01-24 14:54:27');
  556 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (92, 92, 1, 128, 'Default System BIOS', '2014-01-24 14:54:27');
  557 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (93, 93, 2, 63, 'Oracle VM VirtualBox Guest Additions', '2014-01-24 14:54:27');
  558 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (94, 94, 1, 129, '0', '2014-01-24 14:54:27');
  559 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (95, 95, 1, 130, 'VBOX - 1', '2014-01-24 14:54:27');
  560 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (96, 96, 2, 64, 'OutlookExpress', '2014-01-24 14:54:27');
  561 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (97, 97, 2, 65, 'PCHealth', '2014-01-24 14:54:27');
  562 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (98, 98, 2, 66, 'RAD Studio', '2014-01-24 14:54:27');
  563 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (99, 99, 2, 67, 'SchedulingAgent', '2014-01-24 14:54:27');
  564 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (100, 100, 2, 68, 'TortoiseCVS_is1', '2014-01-24 14:54:27');
  565 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (101, 101, 2, 69, '{1D44F148-5A2A-42CB-83AA-DB2B156F1ED7}', '2014-01-24 14:54:27');
  566 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (102, 102, 2, 70, '{350C9416-3D7C-4EE8-BAA9-00BCB3D54227}', '2014-01-24 14:54:27');
  567 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (103, 103, 2, 71, '{5A37B181-B8D0-48C3-B4A4-5DC1ED104CED}', '2014-01-24 14:54:27');
  568 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (104, 104, 2, 72, '{639159C2-B27B-4208-8965-D8A0AEDBDED2}', '2014-01-24 14:54:28');
  569 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (105, 105, 2, 73, '{68A35043-C55A-4237-88C9-37EE1C63ED71}', '2014-01-24 14:54:28');
  570 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (106, 106, 2, 74, '{710D9F65-B7F0-416C-9022-8C9098521270}', '2014-01-24 14:54:28');
  571 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (107, 107, 2, 75, '{7131646D-CD3C-40F4-97B9-CD9E4E6262EF}', '2014-01-24 14:54:28');
  572 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (108, 108, 2, 76, '{72263053-50D1-4598-9502-51ED64E54C51}', '2014-01-24 14:54:28');
  573 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (109, 109, 2, 77, '{76F9F5C5-FF87-4ED8-B63C-2A25A299C4AA}', '2014-01-24 14:54:28');
  574 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (110, 110, 2, 78, '{84ADC96C-B7E0-4938-9D6E-2B640D5DA224}', '2014-01-24 14:54:28');
  575 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (111, 111, 2, 79, '{91227C10-CE03-4A31-BD0E-4986AB490716}', '2014-01-24 14:54:28');
  576 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (112, 112, 2, 80, '{99758AC8-E271-4B1F-8092-865CD59A0D44}', '2014-01-24 14:54:28');
  577 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (113, 113, 2, 81, '{9B09BEF2-10C4-4011-85F0-D9E5D18D641E}', '2014-01-24 14:54:28');
  578 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (114, 114, 2, 82, '{9B74BFA1-CA98-444D-853F-5C28593799CB}', '2014-01-24 14:54:29');
  579 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (115, 115, 2, 83, '{B6CF2967-C81E-40C0-9815-C05774FEF120}', '2014-01-24 14:54:29');
  580 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (116, 116, 2, 84, '{B7031148-C6E7-40F6-A978-EED2E77E7D1B}', '2014-01-24 14:54:29');
  581 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (117, 117, 2, 85, '{C15A8A76-9077-4DD1-95E5-4807A5B7D2AC}', '2014-01-24 14:54:29');
  582 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (118, 118, 2, 86, '{C9DCF4E9-A41B-40E7-B028-2255E36D2A1C}', '2014-01-24 14:54:29');
  583 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (119, 119, 2, 87, '{CF1215D3-8784-4908-9732-970A81248C7A}', '2014-01-24 14:54:29');
  584 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (120, 120, 2, 88, '{EE7257A2-39A2-4D2F-9DAC-F9F25B8AE1D8}', '2014-01-24 14:54:29');
  585 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (121, 121, 2, 31, 'Aperfeiçoado (101 ou 102 teclas)', '2014-01-24 14:54:30');
  586 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (122, 122, 2, 132, 'Teclado padrão com 101/102 teclas ou Microsoft Natural PS/2 Keyboard', '2014-01-24 14:54:30');
  587 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (123, 123, 2, 134, 'Aperfeiçoado (101 ou 102 teclas)', '2014-01-24 14:54:30');
  588 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (124, 124, 2, 135, '[[REG]]', '2014-01-24 14:54:30');
  589 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (125, 125, 2, 32, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB', '2014-01-24 14:54:30');
  590 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (126, 126, 2, 136, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB', '2014-01-24 14:54:30');
  591 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (127, 127, 2, 137, '[[REG]]', '2014-01-24 14:54:30');
  592 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (128, 128, 2, 138, 'Microsoft[[REG]](Dispositivos de sistema padrão)', '2014-01-24 14:54:31');
  593 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (129, 129, 2, 139, 'Microsoft PS/2 Mouse[[REG]]Dispositivo de interface humana USB', '2014-01-24 14:54:31');
  594 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (130, 130, 2, 150, '42566431346538656337382d6161626330632039', '2014-01-24 14:54:31');
  595 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (131, 131, 2, 152, '....PHYSICALDRIVE0', '2014-01-24 14:54:31');
  596 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (132, 132, 2, 154, '4', '2014-01-24 14:54:31');
  597 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (133, 133, 2, 155, 'VBOX - 1', '2014-01-24 14:54:31');
  598 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (134, 134, 2, 35, 'Default System BIOS', '2014-01-24 14:54:31');
  599 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (135, 135, 2, 158, 'Default System BIOS', '2014-01-24 14:54:31');
  600 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (136, 136, 2, 161, 'innotek GmbH', '2014-01-24 14:54:31');
  601 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (137, 137, 2, 162, 'Default System BIOS', '2014-01-24 14:54:31');
  602 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (138, 138, 2, 164, 'True', '2014-01-24 14:54:32');
  603 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (139, 139, 2, 165, '20061201000000.000000+000', '2014-01-24 14:54:32');
  604 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (140, 140, 2, 166, '0', '2014-01-24 14:54:32');
  605 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (141, 141, 2, 167, 'VirtualBox', '2014-01-24 14:54:32');
  606 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (142, 142, 2, 168, '2', '2014-01-24 14:54:32');
  607 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (143, 143, 2, 169, '5', '2014-01-24 14:54:32');
  608 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (144, 144, 2, 170, 'Default System BIOS', '2014-01-24 14:54:32');
  609 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (145, 145, 2, 171, '0', '2014-01-24 14:54:32');
  610 +INSERT INTO computador_coleta_historico (id_computador_coleta_historico, id_computador_coleta, id_computador, id_class_property, te_class_property_value, dt_hr_inclusao) VALUES (146, 146, 2, 172, 'VBOX - 1', '2014-01-24 14:54:32');
  611 +
  612 +
  613 +--
  614 +-- Name: computador_coleta_historico_id_computador_coleta_historico_seq; Type: SEQUENCE SET; Schema: public; Owner: eduardo
  615 +--
  616 +
  617 +SELECT pg_catalog.setval('computador_coleta_historico_id_computador_coleta_historico_seq', 146, true);
  618 +
  619 +
  620 +--
  621 +-- Name: computador_coleta_id_computador_coleta_seq; Type: SEQUENCE SET; Schema: public; Owner: eduardo
  622 +--
  623 +
  624 +SELECT pg_catalog.setval('computador_coleta_id_computador_coleta_seq', 146, true);
  625 +
  626 +
  627 +--
  628 +-- Data for Name: software; Type: TABLE DATA; Schema: public; Owner: eduardo
  629 +--
  630 +
  631 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (1, NULL, 'AddressBook', NULL, NULL, NULL, NULL, NULL);
  632 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (2, NULL, 'Branding', NULL, NULL, NULL, NULL, NULL);
  633 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (3, NULL, 'Connection Manager', NULL, NULL, NULL, NULL, NULL);
  634 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (4, NULL, 'DirectAnimation', NULL, NULL, NULL, NULL, NULL);
  635 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (5, NULL, 'DirectDrawEx', NULL, NULL, NULL, NULL, NULL);
  636 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (6, NULL, 'DXM_Runtime', NULL, NULL, NULL, NULL, NULL);
  637 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (7, NULL, 'EMCO MSI Package Builder Enterprise', NULL, NULL, NULL, NULL, NULL);
  638 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (8, NULL, 'EMCO MSI Package Builder Starter', NULL, NULL, NULL, NULL, NULL);
  639 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (9, NULL, 'Fontcore', NULL, NULL, NULL, NULL, NULL);
  640 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (10, NULL, 'Gtk+ Development Environment for Windows 2.12.9-2', NULL, NULL, NULL, NULL, NULL);
  641 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (11, NULL, 'ICW', NULL, NULL, NULL, NULL, NULL);
  642 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (12, NULL, 'IE40', NULL, NULL, NULL, NULL, NULL);
  643 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (13, NULL, 'IE4Data', NULL, NULL, NULL, NULL, NULL);
  644 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (14, NULL, 'IE5BAKEX', NULL, NULL, NULL, NULL, NULL);
  645 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (15, NULL, 'IEData', NULL, NULL, NULL, NULL, NULL);
  646 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (16, NULL, 'Microsoft .NET Framework 2.0', NULL, NULL, NULL, NULL, NULL);
  647 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (17, NULL, 'Microsoft .NET Framework 2.0 SDK - ENU', NULL, NULL, NULL, NULL, NULL);
  648 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (18, NULL, 'Microsoft Visual J# 2.0 Redistributable Package', NULL, NULL, NULL, NULL, NULL);
  649 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (19, NULL, 'MobileOptionPack', NULL, NULL, NULL, NULL, NULL);
  650 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (20, NULL, 'MPlayer2', NULL, NULL, NULL, NULL, NULL);
  651 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (21, NULL, 'NetMeeting', NULL, NULL, NULL, NULL, NULL);
  652 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (22, NULL, 'Oracle VM VirtualBox Guest Additions 4.2.6', NULL, NULL, NULL, NULL, NULL);
  653 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (23, NULL, 'OutlookExpress', NULL, NULL, NULL, NULL, NULL);
  654 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (24, NULL, 'PCHealth', NULL, NULL, NULL, NULL, NULL);
  655 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (25, NULL, 'RAD Studio', NULL, NULL, NULL, NULL, NULL);
  656 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (26, NULL, 'SchedulingAgent', NULL, NULL, NULL, NULL, NULL);
  657 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (27, NULL, 'TortoiseCVS 1.12.5', NULL, NULL, NULL, NULL, NULL);
  658 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (28, NULL, 'WixEdit', NULL, NULL, NULL, NULL, NULL);
  659 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (29, NULL, 'WebFldrs XP', NULL, NULL, NULL, NULL, NULL);
  660 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (30, NULL, 'VC9RunTime', NULL, NULL, NULL, NULL, NULL);
  661 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (31, NULL, 'Microsoft .NET Framework 2.0 SDK - ENU', NULL, NULL, NULL, NULL, NULL);
  662 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (32, NULL, 'Microsoft Visual J# 2.0 Redistributable Package', NULL, NULL, NULL, NULL, NULL);
  663 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (33, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  664 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (34, NULL, 'Microsoft .NET Framework 2.0', NULL, NULL, NULL, NULL, NULL);
  665 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (35, NULL, 'Borland Delphi 7', NULL, NULL, NULL, NULL, NULL);
  666 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (36, NULL, 'CVSNT 2.5.05.3744', NULL, NULL, NULL, NULL, NULL);
  667 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (37, NULL, 'Python 2.7.4', NULL, NULL, NULL, NULL, NULL);
  668 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (38, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  669 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (39, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  670 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (40, NULL, 'Instalação Cacic2.6Beta2 IPEA', NULL, NULL, NULL, NULL, NULL);
  671 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (41, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  672 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (42, NULL, 'Skype Click to Call', NULL, NULL, NULL, NULL, NULL);
  673 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (43, NULL, 'RAD Studio', NULL, NULL, NULL, NULL, NULL);
  674 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (44, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  675 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (45, NULL, 'TortoiseOverlays', NULL, NULL, NULL, NULL, NULL);
  676 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (46, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  677 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (47, NULL, 'Skypeâ„¢ 5.9', NULL, NULL, NULL, NULL, NULL);
  678 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (48, NULL, 'EMCO MSI Package Builder Enterprise', NULL, NULL, NULL, NULL, NULL);
  679 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (49, NULL, 'EMCO MSI Package Builder Starter', NULL, NULL, NULL, NULL, NULL);
  680 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (50, NULL, 'Gtk+ Development Environment for Windows 2.12.9-2', NULL, NULL, NULL, NULL, NULL);
  681 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (51, NULL, 'Oracle VM VirtualBox Guest Additions 4.2.6', NULL, NULL, NULL, NULL, NULL);
  682 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (52, NULL, 'TortoiseCVS 1.12.5', NULL, NULL, NULL, NULL, NULL);
  683 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (53, NULL, 'WixEdit', NULL, NULL, NULL, NULL, NULL);
  684 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (54, NULL, 'WebFldrs XP', NULL, NULL, NULL, NULL, NULL);
  685 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (55, NULL, 'VC9RunTime', NULL, NULL, NULL, NULL, NULL);
  686 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (56, NULL, 'Microsoft .NET Framework 2.0 SDK - ENU', NULL, NULL, NULL, NULL, NULL);
  687 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (57, NULL, 'Microsoft Visual J# 2.0 Redistributable Package', NULL, NULL, NULL, NULL, NULL);
  688 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (58, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  689 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (59, NULL, 'Microsoft .NET Framework 2.0', NULL, NULL, NULL, NULL, NULL);
  690 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (60, NULL, 'Borland Delphi 7', NULL, NULL, NULL, NULL, NULL);
  691 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (61, NULL, 'CVSNT 2.5.05.3744', NULL, NULL, NULL, NULL, NULL);
  692 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (62, NULL, 'Python 2.7.4', NULL, NULL, NULL, NULL, NULL);
  693 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (63, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  694 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (64, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  695 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (65, NULL, 'Instalação Cacic2.6Beta2 IPEA', NULL, NULL, NULL, NULL, NULL);
  696 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (66, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  697 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (67, NULL, 'Skype Click to Call', NULL, NULL, NULL, NULL, NULL);
  698 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (68, NULL, 'RAD Studio', NULL, NULL, NULL, NULL, NULL);
  699 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (69, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  700 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (70, NULL, 'TortoiseOverlays', NULL, NULL, NULL, NULL, NULL);
  701 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (71, NULL, '(EMCO EVALUATION PACKAGE) - Cacic260', NULL, NULL, NULL, NULL, NULL);
  702 +INSERT INTO software (id_software, id_tipo_software, nm_software, te_descricao_software, qt_licenca, nr_midia, te_local_midia, te_obs) VALUES (72, NULL, 'Skypeâ„¢ 5.9', NULL, NULL, NULL, NULL, NULL);
  703 +
  704 +
  705 +--
  706 +-- Data for Name: proriedade_software; Type: TABLE DATA; Schema: public; Owner: eduardo
  707 +--
  708 +
  709 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (1, 1, 42, 1, NULL, NULL, NULL, NULL);
  710 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (2, 1, 43, 2, NULL, NULL, NULL, NULL);
  711 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (3, 1, 44, 3, NULL, NULL, NULL, NULL);
  712 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (4, 1, 45, 4, NULL, NULL, NULL, NULL);
  713 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (5, 1, 46, 5, NULL, NULL, NULL, NULL);
  714 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (6, 1, 47, 6, NULL, NULL, NULL, NULL);
  715 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (7, 1, 48, 7, NULL, NULL, NULL, NULL);
  716 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (8, 1, 49, 8, NULL, NULL, NULL, NULL);
  717 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (9, 1, 50, 9, NULL, NULL, NULL, NULL);
  718 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (10, 1, 51, 10, NULL, NULL, NULL, NULL);
  719 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (11, 1, 52, 11, NULL, NULL, NULL, NULL);
  720 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (12, 1, 53, 12, NULL, NULL, NULL, NULL);
  721 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (13, 1, 54, 13, NULL, NULL, NULL, NULL);
  722 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (14, 1, 55, 14, NULL, NULL, NULL, NULL);
  723 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (15, 1, 56, 15, NULL, NULL, NULL, NULL);
  724 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (16, 1, 57, 16, NULL, NULL, NULL, NULL);
  725 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (17, 1, 58, 17, NULL, NULL, NULL, NULL);
  726 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (18, 1, 59, 18, NULL, NULL, NULL, NULL);
  727 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (19, 1, 60, 19, NULL, NULL, NULL, NULL);
  728 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (20, 1, 61, 20, NULL, NULL, NULL, NULL);
  729 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (21, 1, 62, 21, NULL, NULL, NULL, NULL);
  730 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (22, 1, 63, 22, NULL, NULL, NULL, NULL);
  731 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (23, 1, 64, 23, NULL, NULL, NULL, NULL);
  732 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (24, 1, 65, 24, NULL, NULL, NULL, NULL);
  733 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (25, 1, 66, 25, NULL, NULL, NULL, NULL);
  734 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (26, 1, 67, 26, NULL, NULL, NULL, NULL);
  735 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (27, 1, 68, 27, NULL, NULL, NULL, NULL);
  736 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (28, 1, 69, 28, NULL, NULL, NULL, NULL);
  737 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (29, 1, 70, 29, NULL, NULL, NULL, NULL);
  738 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (30, 1, 71, 30, NULL, NULL, NULL, NULL);
  739 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (31, 1, 72, 31, NULL, NULL, NULL, NULL);
  740 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (32, 1, 73, 32, NULL, NULL, NULL, NULL);
  741 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (33, 1, 74, 33, NULL, NULL, NULL, NULL);
  742 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (34, 1, 75, 34, NULL, NULL, NULL, NULL);
  743 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (35, 1, 76, 35, NULL, NULL, NULL, NULL);
  744 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (36, 1, 77, 36, NULL, NULL, NULL, NULL);
  745 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (37, 1, 78, 37, NULL, NULL, NULL, NULL);
  746 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (38, 1, 79, 38, NULL, NULL, NULL, NULL);
  747 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (39, 1, 80, 39, NULL, NULL, NULL, NULL);
  748 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (40, 1, 81, 40, NULL, NULL, NULL, NULL);
  749 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (41, 1, 82, 41, NULL, NULL, NULL, NULL);
  750 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (42, 1, 83, 42, NULL, NULL, NULL, NULL);
  751 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (43, 1, 84, 43, NULL, NULL, NULL, NULL);
  752 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (44, 1, 85, 44, NULL, NULL, NULL, NULL);
  753 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (45, 1, 86, 45, NULL, NULL, NULL, NULL);
  754 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (46, 1, 87, 46, NULL, NULL, NULL, NULL);
  755 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (47, 1, 88, 47, NULL, NULL, NULL, NULL);
  756 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (48, 2, 42, 1, NULL, NULL, NULL, NULL);
  757 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (49, 2, 43, 2, NULL, NULL, NULL, NULL);
  758 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (50, 2, 44, 3, NULL, NULL, NULL, NULL);
  759 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (51, 2, 45, 4, NULL, NULL, NULL, NULL);
  760 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (52, 2, 46, 5, NULL, NULL, NULL, NULL);
  761 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (53, 2, 47, 6, NULL, NULL, NULL, NULL);
  762 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (54, 2, 48, 48, NULL, NULL, NULL, NULL);
  763 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (55, 2, 49, 49, NULL, NULL, NULL, NULL);
  764 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (56, 2, 50, 9, NULL, NULL, NULL, NULL);
  765 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (57, 2, 51, 50, NULL, NULL, NULL, NULL);
  766 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (58, 2, 52, 11, NULL, NULL, NULL, NULL);
  767 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (59, 2, 53, 12, NULL, NULL, NULL, NULL);
  768 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (60, 2, 54, 13, NULL, NULL, NULL, NULL);
  769 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (61, 2, 55, 14, NULL, NULL, NULL, NULL);
  770 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (62, 2, 56, 15, NULL, NULL, NULL, NULL);
  771 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (63, 2, 57, 16, NULL, NULL, NULL, NULL);
  772 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (64, 2, 58, 17, NULL, NULL, NULL, NULL);
  773 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (65, 2, 59, 18, NULL, NULL, NULL, NULL);
  774 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (66, 2, 60, 19, NULL, NULL, NULL, NULL);
  775 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (67, 2, 61, 20, NULL, NULL, NULL, NULL);
  776 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (68, 2, 62, 21, NULL, NULL, NULL, NULL);
  777 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (69, 2, 63, 51, NULL, NULL, NULL, NULL);
  778 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (70, 2, 64, 23, NULL, NULL, NULL, NULL);
  779 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (71, 2, 65, 24, NULL, NULL, NULL, NULL);
  780 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (72, 2, 66, 25, NULL, NULL, NULL, NULL);
  781 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (73, 2, 67, 26, NULL, NULL, NULL, NULL);
  782 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (74, 2, 68, 52, NULL, NULL, NULL, NULL);
  783 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (75, 2, 69, 53, NULL, NULL, NULL, NULL);
  784 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (76, 2, 70, 54, NULL, NULL, NULL, NULL);
  785 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (77, 2, 71, 55, NULL, NULL, NULL, NULL);
  786 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (78, 2, 72, 56, NULL, NULL, NULL, NULL);
  787 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (79, 2, 73, 57, NULL, NULL, NULL, NULL);
  788 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (80, 2, 74, 58, NULL, NULL, NULL, NULL);
  789 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (81, 2, 75, 59, NULL, NULL, NULL, NULL);
  790 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (82, 2, 76, 60, NULL, NULL, NULL, NULL);
  791 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (83, 2, 77, 61, NULL, NULL, NULL, NULL);
  792 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (84, 2, 78, 62, NULL, NULL, NULL, NULL);
  793 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (85, 2, 79, 63, NULL, NULL, NULL, NULL);
  794 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (86, 2, 80, 64, NULL, NULL, NULL, NULL);
  795 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (87, 2, 81, 65, NULL, NULL, NULL, NULL);
  796 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (88, 2, 82, 66, NULL, NULL, NULL, NULL);
  797 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (89, 2, 83, 67, NULL, NULL, NULL, NULL);
  798 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (90, 2, 84, 68, NULL, NULL, NULL, NULL);
  799 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (91, 2, 85, 69, NULL, NULL, NULL, NULL);
  800 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (92, 2, 86, 70, NULL, NULL, NULL, NULL);
  801 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (93, 2, 87, 71, NULL, NULL, NULL, NULL);
  802 +INSERT INTO proriedade_software (id_propriedade_software, id_computador, id_class_property, id_software, display_name, display_version, url_info_about, publisher) VALUES (94, 2, 88, 72, NULL, NULL, NULL, NULL);
  803 +
  804 +
  805 +--
  806 +-- Name: proriedade_software_id_propriedade_software_seq; Type: SEQUENCE SET; Schema: public; Owner: eduardo
  807 +--
  808 +
  809 +SELECT pg_catalog.setval('proriedade_software_id_propriedade_software_seq', 94, true);
  810 +
  811 +
  812 +--
  813 +-- Name: software_id_software_seq; Type: SEQUENCE SET; Schema: public; Owner: eduardo
  814 +--
  815 +
  816 +SELECT pg_catalog.setval('software_id_software_seq', 72, true);
  817 +
  818 +
  819 +--
  820 +-- PostgreSQL database dump complete
  821 +--
  822 +
... ...
src/Cacic/CommonBundle/Resources/views/Aquisicao/cadastrar.html.twig
... ... @@ -22,7 +22,7 @@
22 22 {{ form_row(form.nmEmpresa, {'form_type': 'horizontal' }) }}
23 23 {{ form_row(form.nmProprietario, {'form_type': 'horizontal' }) }}
24 24 {{ form_row(form.nrNotafiscal, {'form_type': 'horizontal' }) }}
25   - {{ form_row(form.dtAquisicao, { 'form_type': 'horizontal' }, {'attr': {'class': 'datepicker_on'} }) }}
  25 + {{ form_row(form.dtAquisicao, { 'form_type': 'horizontal' }) }}
26 26 {{ form_rest(form) }}
27 27 </div>
28 28 <br />
... ... @@ -71,28 +71,16 @@
71 71 {% block javascripts %}
72 72  
73 73 {{ parent() }}
74   - {% if idioma =='pt_BR' %}
75   - <script src="{{ asset('bundles/caciccommon/js/jquery.ui.datepicker-pt-BR.js') }}"></script>
76   - <script type="text/javascript">
77   -
78   - $(document).ready(function(){
79   - $( "#Aquisicao_dtAquisicao" ).datepicker({ altFormat: "dd/mm/yy" }).mask('99/99/9999');
80 74  
81   - });
  75 + <script src="{{ asset('bundles/caciccommon/js/jquery.ui.datepicker-pt-BR.js') }}"></script>
82 76  
83   - </script>
84   -{% else %}
85   - {% if idioma =='en_US' %}
86   - <script src="{{ asset('bundles/caciccommon/js/jquery.ui.datepicker-en-US.js') }}"></script>
87 77 <script type="text/javascript">
88 78  
89 79 $(document).ready(function(){
90   - $( "#Aquisicao_dtAquisicao" ).datepicker({ altFormat: "mm/dd/yy" }).mask('99/99/9999');
  80 + $(".datepicker_on").datepicker({ altFormat: "dd/mm/yy" }).mask('99/99/9999');
91 81  
92 82 });
93 83  
94 84 </script>
95   - {% endif %}{% endif %}
96   -
97 85  
98 86 {% endblock %}
99 87 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Resources/views/Computador/resultadoBuscar.html.twig
... ... @@ -7,10 +7,11 @@
7 7 <table class="table table-striped table-bordered">
8 8 <thead>
9 9 <tr>
10   - <th style="text-align: center">{{ "Nome da Máquina"|trans }}</th>
11   - <th style="text-align: center">{{ "Endereço IP"|trans }}</th>
12   - <th style="text-align: center">{{ "Versão Cacic"|trans }}</th>
13   - <th style="text-align: center">{{ "Endereço MAC"|trans }}</th>
  10 + <th width="30%" style="text-align: center">{{ "Nome da Máquina"|trans }}</th>
  11 + <th width="30%" style="text-align: center">{{ "Endereço IP"|trans }}</th>
  12 + <th width="25%" style="text-align: center">{{ "Versão Cacic"|trans }}</th>
  13 + <th width="35%" style="text-align: center">{{ "Endereço MAC"|trans }}</th>
  14 + <th width="5%"></th>
14 15 </tr>
15 16 </thead>
16 17  
... ... @@ -23,6 +24,11 @@
23 24 <td style="text-align: center">{{ computador['teIpComputador'] }}</td>
24 25 <td style="text-align: center">{{'Versão ' |trans }} {{ computador['teVersaoCacic'] }}</td>
25 26 <td style="text-align: center">{{ computador['teNodeAddress'] }}</td>
  27 + <td>
  28 + <a class="btn" href="{{ path("cacic_computador_detalhar") }}/{{ computador['idComputador'] }}" target="_blank">
  29 + <i class="icon-search"></i>
  30 + </a>
  31 + </td>
26 32 </tr>
27 33  
28 34 {% else %}
... ...
src/Cacic/CommonBundle/Resources/views/Computador/resultadoConsulta.html.twig
... ... @@ -8,10 +8,10 @@
8 8 <thead>
9 9 <tr>
10 10 {# <th style="text-align: center">{{ "Número"|trans }}</th>#}
11   - <th width="33%" style="text-align: center">{{ "Nome da Máquina"|trans }}</th>
12   - <th width="33%" style="text-align: center">{{ "Endereço IP"|trans }}</th>
13   - <th width="33%" style="text-align: center">{{ "Versão Cacic"|trans }}</th>
14   -
  11 + <th width="35%" style="text-align: center">{{ "Nome da Máquina"|trans }}</th>
  12 + <th width="30%" style="text-align: center">{{ "Endereço IP"|trans }}</th>
  13 + <th width="30%" style="text-align: center">{{ "Versão Cacic"|trans }}</th>
  14 + <th width="5%"></th>
15 15  
16 16  
17 17 </tr>
... ... @@ -27,6 +27,11 @@
27 27 <td style="text-align: center">{{ computador['nmComputador'] }}</td>
28 28 <td style="text-align: center">{{ computador['teIpComputador'] }}</td>
29 29 <td style="text-align: center">{{'Versão ' |trans }} {{ computador['teVersaoCacic'] }}</td>
  30 + <td>
  31 + <a class="btn" href="{{ path("cacic_computador_detalhar") }}/{{ computador['idComputador'] }}" target="_blank">
  32 + <i class="icon-search"></i>
  33 + </a>
  34 + </td>
30 35  
31 36  
32 37  
... ...
src/Cacic/CommonBundle/Resources/views/GrupoUsuario/index.html.twig
... ... @@ -32,7 +32,7 @@
32 32 {% for grupousuario in GrupoUsuario %}
33 33  
34 34 <tr id="item_{{ grupousuario.idGrupoUsuario }}" class="{{ cycle(['row0', 'row1'], loop.index) }}">
35   - <td id="item_desc_{{ grupousuario.idGrupoUsuario }}">{{ grupousuario.nmGrupoUsuarios }}</td>
  35 + <td id="item_desc_{{ grupousuario.idGrupoUsuario }}">{{ grupousuario.teGrupoUsuarios }}</td>
36 36 <td style="text-align: center">{{ grupousuario.teDescricaoGrupo }}</td>
37 37 <td style="text-align: center" class="td-actions">
38 38 <a href="{{ path('cacic_grupo_usuario_editar', {'idGrupoUsuario': grupousuario.idGrupoUsuario }) }}" class="btn btn-small" title="{{ "Editar Item"|trans }}">
... ...
src/Cacic/CommonBundle/Resources/views/Log/acesso.html.twig
... ... @@ -26,11 +26,13 @@
26 26 <p class="help-block">{{ "Informe o período no qual deseja realizar a pesquisa."|trans }}</p>
27 27 </div>
28 28 </div>
29   -
30   - <div class="control-group">
  29 +
  30 + <div class="control-group _cad_block_opcao">
31 31 <label for="log_acesso_local" class="control-label">{{ 'Local:'|trans }}</label>
32 32 <div class="controls">
33   - {{ form_widget(form.idLocal, {'form_type': 'horizontal'}) }}
  33 + <div style="height: 300px; overflow: auto;">
  34 + {{ form_widget(form.idLocal, {'form_type': 'horizontal'}) }}
  35 + </div>
34 36 </div>
35 37 </div>
36 38  
... ...
src/Cacic/CommonBundle/Resources/views/Log/atividade.html.twig
... ... @@ -30,7 +30,9 @@
30 30 <div class="control-group">
31 31 <label for="log_acesso_local" class="control-label">{{ 'Local:'|trans }}</label>
32 32 <div class="controls">
33   - {{ form_widget(form.idLocal, {'form_type': 'horizontal'}) }}
  33 + <div style="height: 300px; overflow: auto;">
  34 + {{ form_widget(form.idLocal, {'form_type': 'horizontal'}) }}
  35 + </div>
34 36 </div>
35 37 </div>
36 38  
... ...
src/Cacic/CommonBundle/Resources/views/Log/suporte.html.twig
... ... @@ -30,7 +30,9 @@
30 30 <div class="control-group">
31 31 <label for="log_acesso_local" class="control-label">{{ 'Local:'|trans }}</label>
32 32 <div class="controls">
33   - {{ form_widget(form.idLocal, {'form_type': 'horizontal'}) }}
  33 + <div style="height: 300px; overflow: auto;">
  34 + {{ form_widget(form.idLocal, {'form_type': 'horizontal'}) }}
  35 + </div>
34 36 </div>
35 37 </div>
36 38  
... ...
src/Cacic/CommonBundle/Resources/views/Modulo/editar.html.twig
... ... @@ -27,20 +27,24 @@
27 27  
28 28 <form name="frmConfigModulo" id="frmConfigModulo" class="form-horizontal" method="POST">
29 29  
30   - <div class="control-group">
  30 + <div class="control-group _cad_block_opcao">
31 31 <label class="control-label">
32 32 {{ 'Onde executar esta ação-configuração'|trans }}:
33 33 </label>
34 34 <div class="controls">
35 35 {% if redes|length > 0 %}
36   - <input type="checkbox" class="toggleCheck" name="toggleCheck[]" value="modulo\[rede\]" id="toggleRede">
37   - <label for="toggleRede"><b>{{ 'Marcar/desmarcar tudo'|trans }}</b></label>
38   - {% for rede in redes %}
39   - <input type="checkbox" name="modulo[rede][]" value="{{ rede['idRede'] }}" id="modulo_rede_{{ rede['idRede'] }}"
40   - {% if rede['idRede'] in redesSelecionadas %}checked="checked"{% endif %}
41   - />
42   - <label for="modulo_rede_{{ rede['idRede' ] }}">{{ rede['nmRede'] }} ({{ rede['teIpRede'] }})</label>
43   - {% endfor %}
  36 + <input type="checkbox" class="toggleCheck" name="toggleCheck[]" value="modulo\[rede\]" id="toggleRede">
  37 + <label for="toggleRede"><b>{{ 'Marcar/desmarcar tudo'|trans }}</b></label>
  38 + <div style="height: 200px; overflow: auto;">
  39 + {% for rede in redes %}
  40 + <div class="modulo-opt-block">
  41 + <input type="checkbox" name="modulo[rede][]" value="{{ rede['idRede'] }}" id="modulo_rede_{{ rede['idRede'] }}"
  42 + {% if rede['idRede'] in redesSelecionadas %}checked="checked"{% endif %}
  43 + />
  44 + <label for="modulo_rede_{{ rede['idRede' ] }}">{{ rede['nmRede'] }} ({{ rede['teIpRede'] }})</label>
  45 + </div>
  46 + {% endfor %}
  47 + </div>
44 48 {% else %}
45 49 {{ 'Nenhuma Rede cadastrada no sistema.'|trans }}
46 50 {% endif %}
... ... @@ -107,7 +111,7 @@
107 111 </form>
108 112 <hr />
109 113 <div>
110   - <a class="btn btn-danger" href="{{ path('cacic_aquisicao_item_index') }}">
  114 + <a class="btn btn-danger" href="{{ path('cacic_modulo_index') }}">
111 115 <i class="icon-remove-sign"></i>
112 116 {{ "Cancelar"|trans }}
113 117 </a>
... ...
src/Cacic/CommonBundle/Resources/views/Rede/index.html.twig
... ... @@ -22,10 +22,10 @@
22 22 <thead>
23 23 <tr>
24 24 <th width="10%">{{ "Endereço"|trans }}<br />{{ "Máscara"|trans }}</th>
25   - <th width="10%">{{ "Subrede"|trans }}</th>
  25 + <th width="20%">{{ "Subrede"|trans }}</th>
26 26 <th width="10%" style="text-align: center">{{ "Local"|trans }}</th>
27 27 <th width="5%" style="text-align: center">{{ "Máquinas"|trans }}</th>
28   - <th width="5%" style="text-align: center">{{ "Autenticação"|trans }}</th>
  28 + <th width="10%" style="text-align: center">{{ "Autenticação"|trans }}</th>
29 29 <th width="10%" style="text-align: center">{{ "Aplicação"|trans }}</th>
30 30 <th width="10%" style="text-align: center">{{ "Atualização"|trans }}</th>
31 31 <th style="text-align: center">{{ "Ações"|trans }}</th>
... ... @@ -36,22 +36,25 @@
36 36  
37 37 {% for rede in rede %}
38 38  
39   - <tr id="item_{{ rede[0].idRede }}" class="{{ cycle(['row0', 'row1'], loop.index) }}">
40   - <td>{{ rede[0].teIpRede }}/{{ rede[0].teMascaraRede }}</td>
41   - <td id="item_desc_{{ rede[0].idRede }}">{{ rede[0].nmRede }}</td>
42   - <td style="text-align: center">{{ rede['local']}}</td>
43   - <td style="text-align: center"></td>
44   - <td style="text-align: center"></td>
45   - <td style="text-align: center">{{ rede[0].teServCacic }}</td>
46   - <td style="text-align: center">{{ rede[0].teServUpdates }}</td>
  39 + <tr id="item_{{ rede['idRede'] }}" class="{{ cycle(['row0', 'row1'], loop.index) }}">
  40 + <td>{{ rede['teIpRede'] }}/{{ rede['teMascaraRede']}}</td>
  41 + <td id="item_desc_{{ rede['idRede'] }}">{{ rede['nmRede'] }}</td>
  42 + <td style="text-align: center">{{ rede['nmLocal']}}</td>
  43 + <td style="text-align: center">{{ rede['numComp'] }}</td>
  44 + <td style="text-align: center">{{ rede['nmServidorAutenticacao'] }}</td>
  45 + <td style="text-align: center">{{ rede['teServCacic'] }}</td>
  46 + <td style="text-align: center">{{ rede['teServUpdates'] }}</td>
47 47 <td class="td-actions">
48   - <a href="{{ path('cacic_subrede_editar', {'idRede': rede[0].idRede}) }}" class="btn btn-small" title="{{ "Editar Item"|trans }}">
  48 + <a href="{{ path('cacic_subrede_editar', {'idRede': rede['idRede'] }) }}" class="btn btn-small" title="{{ "Editar Item"|trans }}">
49 49 <i class="btn-icon-only icon-edit icon-large"></i>
50 50 </a>
51 51  
52 52 <a href="{{ path('cacic_subrede_excluir') }}" class="btn btn-small btn-danger bt-excluir" title="{{ "Excluir Item"|trans }}">
53 53 <i class="btn-icon-only icon-trash icon-large"></i>
54 54 </a>
  55 + <a href="javascript: void(0);" class="btn btn-small btn-success bt-vincular" title="{{ "Vincular UOR's"|trans }}">
  56 + <i class="icon-cog icon-large"></i>
  57 + </a>
55 58 </td>
56 59 </tr>
57 60  
... ... @@ -82,4 +85,46 @@
82 85  
83 86 </div><!-- /span -->
84 87 </div><!-- /row -->
  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>
  96 +
  97 +{% endblock %}
  98 +{% block javascripts %}
  99 +
  100 + {{ parent() }}
  101 +
  102 + <script type="text/javascript">
  103 +
  104 +
  105 + $( "#vincularUORGs" ).dialog({
  106 + autoOpen: false,
  107 + height: 550,
  108 + width: 550,
  109 + modal: true,
  110 + buttons: {
  111 + "Salvar" : function(){
  112 + $( this ).dialog( "close" );
  113 + },
  114 + "Cancelar" : function(){
  115 + $( this ).dialog( "close" );
  116 + }
  117 + },
  118 + show: { effect: "fade", duration: 500 },
  119 + hide: { effect: "fade", duration: 500 }
  120 +
  121 + });
  122 +
  123 + $( ".bt-vincular" ).click(function(){
  124 +
  125 + var id = $( this ).parent().parent().attr( 'id' ).replace( /.*?(\d+)$/, '$1' );
  126 + $( "#vincularUORGs" ).data( 'id', id ).dialog( "open" );
  127 + });
  128 +
  129 + </script>
85 130 {% endblock %}
86 131 \ No newline at end of file
... ...
src/Cacic/CommonBundle/Resources/views/Rede/manutencao.html.twig
... ... @@ -20,31 +20,31 @@
20 20 <br />
21 21  
22 22 <form id={{ 'formSoftwaresNaoUsados'|trans }} class="form-horizontal" action="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" method="post">
23   - <h4><center>{{ "Agentes para MS-Windows"|trans }}</h4>
  23 + <h4 align="center">{{ "Agentes para MS-Windows"|trans }}</h4>
24 24 <table class="table table-striped table-bordered">
25 25 <thead>
26 26 <tr>
27   - <th width="40%"style="text-align: center">{{ 'Arquivo'|trans }}</th>
28   - <th width="20%"style="text-align: center">{{ 'Versão'|trans }}</th>
29   - <th width="40%"style="text-align: center">{{ 'Hash'|trans }}</th>
  27 + <th width="40%" style="text-align: center">{{ 'Arquivo'|trans }}</th>
  28 + <th width="20%" style="text-align: center">{{ 'Versão'|trans }}</th>
  29 + <th width="40%" style="text-align: center">{{ 'Hash'|trans }}</th>
30 30 <th style="text-align: center">
31 31 <label style="margin: auto; width:12px; height:10px;">
32   - <input type="checkbox" class="toggleCheck" name="toggleCheck[]" value="Windows">
  32 + <input type="checkbox" class="toggleCheck" name="toggleCheck[]" value="windows" checked>
33 33 </label>
34 34 </th>
35 35 </tr>
36 36 </thead>
37 37 <tbody>
38 38  
39   - {% for Windows in windows %}
  39 + {% for key, modulo in windows %}
40 40  
41   - <tr id="item_{{ Windows['nmModulo'] }}">
42   - <td style="text-align: center" id="item_desc_{{ Windows['nmModulo'] }}">{{ windows }}</td>
43   - <td style="text-align: center" >{{ Windows['teVersaoModulo'] }}</td>
44   - <td style="text-align: center" >{{ Windows['teHash'] }}</td>
  41 + <tr id="item_{{ key }}">
  42 + <td style="text-align: center" id="item_desc_{{ key }}">{{ key }}</td>
  43 + <td style="text-align: center" >{{ modulo['versao'] }}</td>
  44 + <td style="text-align: center" >{{ modulo['hash'] }}</td>
45 45 <td>
46 46 <label style="margin: auto; width:12px; height:10px;">
47   - <input type="checkbox" id="item_id_{{ Windows['nmModulo'] }}" name="Windows[]" value="{{ Windows['nmModulo'] }}">
  47 + <input type="checkbox" id="item_id_{{ key }}" name="windows[]" value="{{ key }}" checked>
48 48 </label>
49 49 </td>
50 50 </tr>
... ... @@ -65,19 +65,21 @@
65 65 <th width="40%"style="text-align: center">{{ 'Hash'|trans }}</th>
66 66 <th style="text-align: center">
67 67 <label style="margin: auto; width:12px; height:10px;">
68   - <input type="checkbox" class="toggleCheck" name="toggleCheck[]" value="Linux">
  68 + <input type="checkbox" class="toggleCheck" name="toggleCheck[]" value="linux" checked>
69 69 </label>
70 70 </th>
71 71 </tr>
72 72 </thead>
73   - {% for Linux in linux %}
74   - <tr id="item_{{ Linux['nmModulo'] }}">
75   - <td style="text-align: center" id="item_desc_{{ Linux['nmModulo'] }}">{{ Linux['nmModulo'] }}</td>
76   - <td style="text-align: center" >{{ Linux['teVersaoModulo'] }}</td>
77   - <td style="text-align: center" >{{ Linux['teHash'] }}</td>
  73 + <tbody>
  74 + {% for key, modulo in linux %}
  75 +
  76 + <tr id="item_{{ key }}">
  77 + <td style="text-align: center" id="item_desc_{{ key }}">{{ key }}</td>
  78 + <td style="text-align: center" >{{ modulo['versao'] }}</td>
  79 + <td style="text-align: center" >{{ modulo['hash'] }}</td>
78 80 <td>
79 81 <label style="margin: auto; width:12px; height:10px;">
80   - <input type="checkbox" id="item_id_{{ Linux['nmModulo'] }}" name="Linux[]" value="{{ Linux['nmModulo'] }}">
  82 + <input type="checkbox" id="item_id_{{ key }}" name="linux" value="{{ key }}" checked>
81 83 </label>
82 84 </td>
83 85 </tr>
... ... @@ -90,14 +92,46 @@
90 92 </tbody>
91 93 </table>
92 94 <br />
  95 +
  96 + <hr>
  97 + <h3>{{ 'Subredes cadastradas'|trans }}</h3>
  98 + <p>{{ 'Subredes onde a operação de atualização deve ser executada '|trans }}.</p>
  99 + <br />
  100 +
  101 + <h4 align="center">{{ "Legenda"|trans }}</h4>
  102 + <table class="table table-bordered">
  103 + <thead>
  104 + <tr>
  105 + <th width="30%" style="text-align: center;">{{ "Mensagem"|trans }}</th>
  106 + <th width="70%" style="text-align: center;">{{ "Significado"|trans }}</th>
  107 + </tr>
  108 + </thead>
  109 + <tbody>
  110 + <tr>
  111 + <td width="30%" style="text-align: center;"><span class='label label-important'>{{ "Módulos inexistentes"|trans }}</span></td>
  112 + <td width="70%">{{ "Um ou mais dos módulos obrigatórios não está presente na subrede"|trans }}</td>
  113 + </tr>
  114 + <tr>
  115 + <td width="30%" style="text-align: center;"><span class='label label-warning'>{{ "Módulos desatualizados"|trans }}</span></td>
  116 + <td width="70%">{{ "Um ou mais dos módulos obrigatórios está desatualizado na subrede"|trans }}</td>
  117 + </tr>
  118 + <tr>
  119 + <td width="30%" style="text-align: center;"><span class='label label-success'>{{ "Módulos atualizados"|trans }}</span></td>
  120 + <td width="70%">{{ "Todos os módulos obrigatórios estão atualizados na subrede"|trans }}</td>
  121 + </tr>
  122 + </tbody>
  123 + </table>
  124 +
  125 + <h4 align="center">{{ subredes|length }} {{ "SubRedes Cadastradas"|trans }}</h4>
93 126 <table class="table table-striped table-bordered">
94   - <h4><center>{{ "SubRedes Cadastradas"|trans }}</h4>
  127 +
95 128 <thead>
96 129 <tr>
97   - <th width="30%"style="text-align: center">{{ 'Endereço IP'|trans }}</th>
98   - <th width="30%"style="text-align: center">{{ 'Nome da Subrede'|trans }}</th>
99   - <th width="20%"style="text-align: center">{{ 'Servidor de atualizacoes'|trans }}</th>
100   - <th width="20%"style="text-align: center">{{ 'Localizacao'|trans }}</th>
  130 + <th width="15%" style="text-align: center">{{ 'Endereço IP'|trans }}</th>
  131 + <th width="25%" style="text-align: center">{{ 'Nome da Subrede'|trans }}</th>
  132 + <th width="20%" style="text-align: center">{{ 'Servidor de atualizacoes'|trans }}</th>
  133 + <th width="20%" style="text-align: center">{{ 'Localizacao'|trans }}</th>
  134 + <th width="20%" style="text-align: center">{{ 'Status'|trans }}</th>
101 135 <th style="text-align: center">
102 136 <label style="margin: auto; width:12px; height:10px;">
103 137 <input type="checkbox" class="toggleCheck" name="toggleCheck[]" value="subrede">
... ... @@ -105,15 +139,18 @@
105 139 </th>
106 140 </tr>
107 141 </thead>
108   - {% for rede in subredes %}
109   - <tr id="item_{{ rede['teIpRede'] }}">
110   - <td style="text-align: center" id="item_desc_{{ rede['teIpRede'] }}">{{ rede['teIpRede'] }}</td>
  142 +
  143 + <tbody>
  144 + {% for key, rede in subredes %}
  145 + <tr id="item_{{ key }}">
  146 + <td style="text-align: center" id="item_desc_{{ key }}">{{ rede['teIpRede'] }}</td>
111 147 <td style="text-align: center" >{{ rede['nmRede'] }}</td>
112 148 <td style="text-align: center" >{{ rede['teServUpdates'] }}</td>
113   - <td style="text-align: center" >{{ rede['sgLocal'] }}</td>
  149 + <td style="text-align: center" >{{ rede['nmLocal'] }}</td>
  150 + <td style="text-align: center;">{{ rede['codigo']|raw }}</td>
114 151 <td>
115 152 <label style="margin: auto; width:12px; height:10px;">
116   - <input type="checkbox" id="item_id_{{ rede['teIpRede'] }}" name="subrede[]" value="{{ rede['teIpRede'] }}">
  153 + <input type="checkbox" id="item_id_{{ key }}" name="subrede[]" value="{{ key }}">
117 154 </label>
118 155 </td>
119 156 </tr>
... ...
src/Cacic/CommonBundle/Resources/views/Usuario/index.html.twig
... ... @@ -41,7 +41,7 @@
41 41 <td style="text-align: center">
42 42 {{ usuario['numLocSec'] }}
43 43 </td>
44   - <td>{{ usuario['nmGrupoUsuarios'] }}</td>
  44 + <td>{{ usuario['teGrupoUsuarios'] }}</td>
45 45 <td class="td-actions">
46 46 <a href="{{ path('cacic_usuario_editar', {'idUsuario': usuario[0].idUsuario }) }}" class="btn btn-small" title="{{ "Editar Item"|trans }}">
47 47 <i class="icon-edit icon-large"></i>
... ...
src/Cacic/RelatorioBundle/Controller/HardwareController.php
... ... @@ -17,6 +17,7 @@ class HardwareController extends Controller
17 17 $conf = $this->getDoctrine()->getRepository('CacicCommonBundle:Classe')->listar();
18 18 $locais = $this->getDoctrine()->getRepository('CacicCommonBundle:Local')->listar();
19 19 $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->listar();
  20 +
20 21  
21 22 return $this->render(
22 23 'CacicRelatorioBundle:Hardware:configuracoes_filtro.html.twig',
... ... @@ -34,7 +35,7 @@ class HardwareController extends Controller
34 35 public function configuracoesRelatorioAction( Request $request )
35 36 {
36 37 $dados = $this->getDoctrine()
37   - ->getRepository('CacicCommonBundle:Computador')
  38 + ->getRepository('CacicCommonBundle:ComputadorColeta')
38 39 ->gerarRelatorioConfiguracoes( $request->get('rel_filtro_hardware') );
39 40 $locale = $request->getLocale();
40 41 return $this->render(
... ... @@ -45,5 +46,89 @@ class HardwareController extends Controller
45 46 )
46 47 );
47 48 }
  49 +
  50 + /*
  51 + * Relatório genérico para qualquer classe WMI
  52 + */
  53 +
  54 + public function wmiAction( Request $request, $classe)
  55 + {
  56 + $conf = $this->getDoctrine()->getRepository('CacicCommonBundle:ComputadorColeta')->listarPropriedades($classe);
  57 + $locais = $this->getDoctrine()->getRepository('CacicCommonBundle:Local')->listar();
  58 + $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->listar();
  59 + $redes = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->listar();
  60 +
  61 + return $this->render(
  62 + 'CacicRelatorioBundle:Hardware:wmi_filtro.html.twig',
  63 + array(
  64 + 'conf' => $conf,
  65 + 'locais' => $locais,
  66 + 'so' => $so,
  67 + 'redes' => $redes,
  68 + 'classe' => $classe
  69 + )
  70 + );
  71 + }
  72 +
  73 + /**
  74 + * [RELATÓRIO] Relatório de atributos da classe WMI gerado à partir dos filtros informados
  75 + */
  76 + public function wmiRelatorioAction( Request $request, $classe )
  77 + {
  78 + $dados = $this->getDoctrine()
  79 + ->getRepository('CacicCommonBundle:ComputadorColeta')
  80 + ->gerarRelatorioWMI( $filtros = $request->get('rel_filtro_hardware'), $classe = $classe );
  81 +
  82 + $locale = $request->getLocale();
  83 + return $this->render(
  84 + 'CacicRelatorioBundle:Hardware:rel_wmi.html.twig',
  85 + array(
  86 + 'idioma'=> $locale,
  87 + 'dados' => $dados,
  88 + 'classe' => $classe
  89 + )
  90 + );
  91 + }
  92 +
  93 + /**
  94 + * [RELATÓRIO] Relatório de atributos da classe WMI gerado à partir dos filtros informados detalhado
  95 + */
  96 + public function wmiRelatorioDetalheAction( Request $request, $classe, $propriedade )
  97 + {
  98 + $filtros['conf'] = $propriedade;
  99 + $rede = $request->get('rede');
  100 + $local = $request->get('local');
  101 + $so = $request->get('so');
  102 +
  103 + // Adiciona rede à lista de filtros se for fornecido
  104 + if (!empty($rede)) {
  105 + $filtros['rede'] = $rede;
  106 + }
  107 +
  108 + // Adiciona local à lista de filtros se for fornecido
  109 + if (!empty($local)) {
  110 + $filtros['locais'] = $local;
  111 + }
  112 +
  113 + // Adiciona SO à lista de filtros se for fornecido
  114 + if (!empty($so)) {
  115 + $filtros['so'] = $so;
  116 + }
  117 +
  118 + $dados = $this->getDoctrine()
  119 + ->getRepository('CacicCommonBundle:ComputadorColeta')
  120 + ->gerarRelatorioWMIDetalhe( $filtros = $filtros, $classe = $classe );
  121 +
  122 + $locale = $request->getLocale();
  123 + return $this->render(
  124 + 'CacicRelatorioBundle:Hardware:rel_wmi_detalhe.html.twig',
  125 + array(
  126 + 'idioma'=> $locale,
  127 + 'dados' => $dados,
  128 + 'propriedade' => $propriedade,
  129 + 'classe' => $classe
  130 + )
  131 + );
  132 + }
48 133  
49 134 }
... ...
src/Cacic/RelatorioBundle/Controller/SoftwareController.php
... ... @@ -2,6 +2,7 @@
2 2  
3 3 namespace Cacic\RelatorioBundle\Controller;
4 4  
  5 +use Doctrine\Common\Util\Debug;
5 6 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6 7 use Symfony\Component\HttpFoundation\Request;
7 8 use Cacic\RelatorioBundle\Form\Type\FiltroSoftwareType;
... ... @@ -17,6 +18,7 @@ class SoftwareController extends Controller
17 18 {
18 19 $locais = $this->getDoctrine()->getRepository('CacicCommonBundle:Local')->listar();
19 20 $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->listar();
  21 + $redes = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->listar();
20 22 $sw = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->listar();
21 23  
22 24 return $this->render(
... ... @@ -24,6 +26,7 @@ class SoftwareController extends Controller
24 26 array(
25 27 'softwares' => $sw,
26 28 'locais' => $locais,
  29 + 'redes' => $redes,
27 30 'so' => $so
28 31 )
29 32 );
... ... @@ -38,7 +41,7 @@ class SoftwareController extends Controller
38 41 $dados = $this->getDoctrine()
39 42 ->getRepository('CacicCommonBundle:Software')
40 43 ->gerarRelatorioSoftwaresInventariados( $request->get('rel_filtro_software') );
41   -
  44 +
42 45 return $this->render(
43 46 'CacicRelatorioBundle:Software:rel_inventariados.html.twig',
44 47 array(
... ... @@ -47,6 +50,20 @@ class SoftwareController extends Controller
47 50 )
48 51 );
49 52 }
  53 + public function listarAction( Request $request, $idSoftware )
  54 + {
  55 + $locale = $request->getLocale();
  56 + $dados = $this->getDoctrine()
  57 + ->getRepository('CacicCommonBundle:Software')
  58 + ->getSoftwareDadosComputador( $idSoftware );
  59 +
  60 + return $this->render( 'CacicRelatorioBundle:Software:listar.html.twig',
  61 + array(
  62 + 'idioma' =>$locale,
  63 + 'dados' => $dados
  64 + )
  65 + );
  66 + }
50 67  
51 68 /**
52 69 *
... ... @@ -187,7 +204,7 @@ class SoftwareController extends Controller
187 204 $dados = $this->getDoctrine()
188 205 ->getRepository('CacicCommonBundle:Software')
189 206 ->gerarRelatorioSoftwaresPorTipo( $request->get('form') );
190   -
  207 +
191 208 return $this->render(
192 209 'CacicRelatorioBundle:Software:rel_tipo.html.twig',
193 210 array(
... ... @@ -215,5 +232,27 @@ class SoftwareController extends Controller
215 232 )
216 233 );
217 234 }
218   -
  235 +
  236 + /**
  237 + * [RELATÓRIO] Lista de máquinas que possuem o software instalado
  238 + *
  239 + * @param software O Nome do software a ser listado
  240 + */
  241 +
  242 + public function listaAction(Request $request, $software) {
  243 + $locale = $request->getLocale();
  244 +
  245 + $dados = $this->getDoctrine()
  246 + ->getRepository('CacicCommonBundle:ComputadorColeta')
  247 + ->gerarRelatorioSoftware($filtros = array(), $software);
  248 +
  249 + return $this->render(
  250 + 'CacicRelatorioBundle:Software:rel_software_lista.html.twig',
  251 + array(
  252 + 'idioma'=> $locale,
  253 + 'software' => $software,
  254 + 'dados' => $dados
  255 + )
  256 + );
  257 + }
219 258 }
... ...
src/Cacic/RelatorioBundle/Menu/Builder.php 0 → 100644
... ... @@ -0,0 +1,40 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: eduardo
  5 + * Date: 04/02/14
  6 + * Time: 10:54
  7 + */
  8 +
  9 +namespace Cacic\RelatorioBundle\Menu;
  10 +
  11 +use Knp\Menu\FactoryInterface;
  12 +use Symfony\Component\DependencyInjection\ContainerAware;
  13 +
  14 +class Builder extends ContainerAware
  15 +{
  16 + public function relatorioMenu(FactoryInterface $factory, array $options)
  17 + {
  18 + $logger = $this->container->get('logger');
  19 +
  20 + // Cria menu
  21 + $menu = $factory->createItem('root');
  22 + //$menu->addChild('Configurações', array('route' => 'cacic_relatorio_hardware_configuracoes'));
  23 +
  24 + // Carrega lista de classes WMI para coleta
  25 + $em = $this->container->get('doctrine')->getEntityManager();
  26 + $classes = $em->getRepository('CacicCommonBundle:ComputadorColeta')->menu();
  27 +
  28 + // Adiciona cada uma das classes como slug para um controller
  29 + foreach ($classes as $wmiClass) {
  30 + $menu->addChild($wmiClass['nmClassName'], array(
  31 + 'route' => 'cacic_relatorio_hardware_wmi',
  32 + 'routeParameters' => array(
  33 + 'classe' => $wmiClass['nmClassName']
  34 + )
  35 + ));
  36 + }
  37 +
  38 + return $menu;
  39 + }
  40 +}
0 41 \ No newline at end of file
... ...
src/Cacic/RelatorioBundle/Resources/config/routing.yml
... ... @@ -30,6 +30,12 @@ cacic_relatorio_software_inventariados_rel:
30 30 requirements:
31 31 _method: POST
32 32  
  33 +cacic_relatorio_software_listar:
  34 + pattern: /software/listar/{idSoftware}
  35 + defaults: { _controller: CacicRelatorioBundle:Software:listar, idSoftware: null }
  36 + requirements:
  37 + idSoftware: \d+
  38 +
33 39 cacic_relatorio_software_licenciados:
34 40 pattern: /software/licenciados
35 41 defaults: { _controller: CacicRelatorioBundle:Software:licenciados }
... ... @@ -84,4 +90,24 @@ cacic_relatorio_hardware_configuracoes_rel:
84 90 pattern: /hardware/configuracoes
85 91 defaults: { _controller: CacicRelatorioBundle:Hardware:configuracoesRelatorio }
86 92 requirements:
87   - _method: POST
88 93 \ No newline at end of file
  94 + _method: POST
  95 +
  96 +cacic_relatorio_hardware_wmi:
  97 + pattern: /hardware/{classe}
  98 + defaults: { _controller: CacicRelatorioBundle:Hardware:wmi }
  99 + requirements:
  100 + _method: GET
  101 +
  102 +cacic_relatorio_hardware_wmi_rel:
  103 + pattern: /hardware/{classe}
  104 + defaults: { _controller: CacicRelatorioBundle:Hardware:wmiRelatorio }
  105 + requirements:
  106 + _method: POST
  107 +
  108 +cacic_relatorio_software_lista:
  109 + pattern: /software/inventariados/{software}
  110 + defaults: { _controller: CacicRelatorioBundle:Software:lista }
  111 +
  112 +cacic_relatorio_hardware_wmi_detalhe:
  113 + pattern: /hardware/{classe}/{propriedade}
  114 + defaults: { _controller: CacicRelatorioBundle:Hardware:wmiRelatorioDetalhe }
89 115 \ No newline at end of file
... ...
src/Cacic/RelatorioBundle/Resources/views/Hardware/configuracoes_filtro.html.twig
... ... @@ -20,7 +20,7 @@
20 20  
21 21 tConf.populate([ // Popula o TRANSFER com as Classes de Coleta
22 22 {% for c in conf %}
23   - {value: "{{ c.idClass }}", content:"{{ c.teClassDescription }}"}{% if loop.last != true %},{% endif %}
  23 + {value: "{{ c.idClass }}", content: "{{ c.nmClassName|e('js') }}" }{% if loop.last != true %},{% endif %}
24 24  
25 25 {% endfor %}
26 26 ]);
... ...
src/Cacic/RelatorioBundle/Resources/views/Hardware/rel_configuracoes.html.twig
... ... @@ -25,9 +25,9 @@
25 25 {% if reg.nmComputador %}<br />{{ reg.teNodeAddress }}{% endif %}
26 26 {% if reg.teIpComputador %}<br />{{ reg.teIpComputador }}{% endif %}
27 27 </td>
28   - <td><span class="{% if reg.idSo.inMswindows == 'S' %}red{% else %}blue{% endif %}">{{ reg.idSo.sgSo}}</span></td>
29   - <td>{%if reg.idRede is not null and reg.idRede.idLocal is not null %}{{ reg.idRede.idLocal.nmLocal }}{% endif %}</td>
30   - <td>{{ reg.hardwares|length }}</td>
  28 + <td><span class="{% if reg.inMswindows == 'S' %}red{% else %}blue{% endif %}">{{ reg.sgSo}}</span></td>
  29 + <td>{%if reg.idRede is not null and reg.idLocal is not null %}{{ reg.nmLocal }}{% endif %}</td>
  30 + <td>{{ reg.teClassPropertyValue }}</td>
31 31 </tr>
32 32 {% else %}
33 33 <tr>
... ...
src/Cacic/RelatorioBundle/Resources/views/Hardware/rel_wmi.html.twig 0 → 100755
... ... @@ -0,0 +1,40 @@
  1 +{% extends 'CacicRelatorioBundle::base.html.twig' %}
  2 +
  3 +{% block body %}
  4 +
  5 +<h2>{{ 'Relatório de Configurações da Classe '|trans }} {{ classe }}</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="10%">{{ "Sistema Operacional"|trans }}</th>
  14 + <th width="10%">{{ "Local"|trans }}</th>
  15 + <th width="10%">{{ "Subrede"|trans }}</th>
  16 + <th width="10%">{{ "Propriedade"|trans }}</th>
  17 + <th width="10%">{{ "Computadores"|trans }}</th>
  18 + <th>{{ "Valor"|trans }}</th>
  19 + </tr>
  20 + </thead>
  21 +
  22 + <tbody>
  23 + {% for reg in dados %}
  24 + <tr>
  25 + <td><span class="{% if reg.inMswindows == 'S' %}red{% else %}blue{% endif %}"><a href="{{ path('cacic_relatorio_hardware_wmi_detalhe', {'classe': classe, 'propriedade': reg.nmPropertyName, 'so': reg.idSo}) }}" title="{{ "Lista de computadores"|trans }}" target="_blank">{{ reg.sgSo }}</a></span></td>
  26 + <td><a href="{{ path('cacic_relatorio_hardware_wmi_detalhe', {'classe': classe, 'propriedade': reg.nmPropertyName, 'local': reg.idLocal}) }}" title="{{ "Lista de computadores"|trans }}" target="_blank">{{ reg.nmLocal }}</a></td>
  27 + <td><a href="{{ path('cacic_relatorio_hardware_wmi_detalhe', {'classe': classe, 'propriedade': reg.nmPropertyName, 'rede': reg.idRede}) }}" title="{{ "Lista de computadores"|trans }}" target="_blank">{{ reg.nmRede }} / {{ reg.teIpRede }}</a></td>
  28 + <td><a href="{{ path('cacic_relatorio_hardware_wmi_detalhe', {'classe': classe, 'propriedade': reg.nmPropertyName}) }}" title="{{ "Lista de computadores"|trans }}" target="_blank">{{ reg.nmPropertyName }}</a></td>
  29 + <td><a href="{{ path('cacic_relatorio_hardware_wmi_detalhe', {'classe': classe, 'propriedade': reg.nmPropertyName}) }}" title="{{ "Lista de computadores"|trans }}" target="_blank">{{ reg.numComp }}</a></td>
  30 + <td>{{ reg.teClassPropertyValue }}</td>
  31 + </tr>
  32 + {% else %}
  33 + <tr>
  34 + <td style="text-align: center" colspan="5"><b>{{ "NENHUM REGISTRO ENCONTRADO!"|trans }}</b></td>
  35 + </tr>
  36 + {% endfor %}
  37 + </tbody>
  38 +</table>
  39 +
  40 +{% endblock %}
0 41 \ No newline at end of file
... ...
src/Cacic/RelatorioBundle/Resources/views/Hardware/rel_wmi_detalhe.html.twig 0 → 100755
... ... @@ -0,0 +1,47 @@
  1 +{% extends 'CacicRelatorioBundle::base.html.twig' %}
  2 +
  3 +{% block body %}
  4 +
  5 +<h2>{{ 'Relatório de Configurações da Classe '|trans }} {{ classe }}</h2>
  6 + <h3>{{ 'Dados relativos à Propriedade '|trans }}{{ propriedade }}</h3>
  7 + <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>
  8 +
  9 +<hr />
  10 +
  11 +<table class="table table-striped table-bordered">
  12 + <thead>
  13 + <tr>
  14 + <th width="10%">{{ "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="10%">{{ "Subrede"|trans }}</th>
  20 + <th width="10%">{{ "Propriedade"|trans }}</th>
  21 + <th>{{ "Valor"|trans }}</th>
  22 + </tr>
  23 + </thead>
  24 +
  25 + <tbody>
  26 + {% for reg in dados %}
  27 + <tr>
  28 + <td>
  29 + <b><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.1 }}" 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.1 }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.teNodeAddress }}</a></td>
  32 + <td><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.1 }}" 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.nmPropertyName }}</td>
  37 + <td>{{ reg.teClassPropertyValue }}</td>
  38 + </tr>
  39 + {% else %}
  40 + <tr>
  41 + <td style="text-align: center" colspan="5"><b>{{ "NENHUM REGISTRO ENCONTRADO!"|trans }}</b></td>
  42 + </tr>
  43 + {% endfor %}
  44 + </tbody>
  45 +</table>
  46 +
  47 +{% endblock %}
0 48 \ No newline at end of file
... ...
src/Cacic/RelatorioBundle/Resources/views/Hardware/wmi_filtro.html.twig 0 → 100755
... ... @@ -0,0 +1,116 @@
  1 +{% extends '::base.html.twig' %}
  2 +
  3 +{% block breadcrumb %}
  4 + <li class="active">{{ "Relatório da Classe "|trans }} {{ classe }}</li>
  5 +{% endblock %}
  6 +
  7 +{% block stylesheets %}
  8 + {{ parent() }}
  9 + <link href="{{ asset('bundles/cacicrelatorio/libs/bootstrap-transfer-master/css/bootstrap-transfer.css') }}" rel="stylesheet" />
  10 +{% endblock %}
  11 +
  12 +{% block javascripts %}
  13 + {{ parent() }}
  14 + <script src="{{ asset('bundles/cacicrelatorio/libs/bootstrap-transfer-master/js/bootstrap-transfer.js') }}" type="text/javascript"></script>
  15 + <script type="text/javascript">
  16 + $(document).ready(function(){
  17 + var tConf = $('#transferConf').bootstrapTransfer({'target_id':'tConf'});
  18 + var tLoc = $('#transferLocais').bootstrapTransfer({'target_id':'tLoc'});
  19 + var tSO = $('#transferSO').bootstrapTransfer({'target_id':'tSo'});
  20 + var tRede = $('#transferRede').bootstrapTransfer({'target_id':'tRede'});
  21 +
  22 + tConf.populate([ // Popula o TRANSFER com as Classes de Coleta
  23 + {% for c in conf %}
  24 + {value: "{{ c.idClassProperty }}", content: "{{ c.nmPropertyName|e('js') }}" }{% if loop.last != true %},{% endif %}
  25 +
  26 + {% endfor %}
  27 + ]);
  28 +
  29 + tLoc.populate([ // Popula o TRANSFER com Locais
  30 + {% for l in locais %}
  31 + {value: "{{ l[0]['idLocal'] }}", content:"{{ l[0]['nmLocal'] ~ '/' ~ l[0]['sgLocal'] }}"}{% if loop.last != true %},{% endif %}
  32 +
  33 + {% endfor %}
  34 + ]);
  35 +
  36 + tSO.populate([ // Popula o TRANSFER com Sistemas Operacionais
  37 + {% for _so in so %}
  38 + {value: "{{ _so['idSo'] }}", content:"{{ _so['teDescSo'] }}"}{% if loop.last != true %},{% endif %}
  39 +
  40 + {% endfor %}
  41 + ]);
  42 +
  43 + tRede.populate([ // Popula o TRANSFER com Locais
  44 + {% for r in redes %}
  45 + {value: "{{ r[0]['idRede'] }}", content:"{{ r[0]['nmRede'] ~ '/' ~ r[0]['teIpRede'] }}"}{% if loop.last != true %},{% endif %}
  46 +
  47 + {% endfor %}
  48 + ]);
  49 +
  50 + var transferToHidden = {
  51 + 'form' : $('#frmFiltroRelatorioHWConfiguracoes'),
  52 + 'fieldsPrefix' : 'rel_filtro_hardware',
  53 + 'elms' : [
  54 + { 'transferElement' : tConf , 'inputHiddenName' : 'conf' },
  55 + { 'transferElement' : tLoc , 'inputHiddenName' : 'locais' },
  56 + { 'transferElement' : tSO , 'inputHiddenName' : 'so' },
  57 + { 'transferElement' : tRede , 'inputHiddenName' : 'redes' }
  58 + ]
  59 + };
  60 +
  61 + $('.selector-chooser a, a.selector-clearall, a.selector-chooseall').removeAttr('href').css('cursor', 'pointer');
  62 +
  63 + // Ativa o tratamento dos dados dos transfers a partir da submissão do formulário
  64 + System.Form.bootStrapTransfer.handle( transferToHidden );
  65 +
  66 + });
  67 + </script>
  68 +{% endblock %}
  69 +
  70 +{% block body %}
  71 +
  72 +<div class="row-fluid">
  73 + <div class="span12">
  74 + <div class="box grad_colour_black">
  75 + <h2 class="box_head round_top"><i class="icon-list"></i> {{'Relatório de Configurações de Hardware' |trans }}</h2>
  76 + <div class="block box_content round_bottom padding_10">
  77 +
  78 + <h3>{{'Relatório da Classe '|trans }} {{ classe }}</h3>
  79 + <p class="muted">
  80 + {{ 'Este relatório exibe os dados das classes WMI coletadas nos computadores.'|trans }}
  81 + {{ 'É possível determinar quais propriedades serão exibidas no relatório, e restringir a pesquisa por sistemas operacionais e abrangência das redes.'|trans }}
  82 + </p>
  83 + <hr />
  84 +
  85 + <form method="post" id="frmFiltroRelatorioHWConfiguracoes" class="form-horizontal" target="_blank">
  86 +
  87 + <h4>{{ 'Selecione as propriedades da classe WMI que deseja exibir'|trans }}</h4>
  88 + <div id="transferConf"></div>
  89 +
  90 + <h4>{{ 'Selecione os Locais'|trans }}</h4>
  91 + <div id="transferLocais"></div>
  92 +
  93 + <h4>{{ 'Selecione as Redes'|trans }}</h4>
  94 + <div id="transferRede"></div>
  95 +
  96 + <h4>{{ 'Selecione os Sistemas Operacionais'|trans }}</h4>
  97 + <div id="transferSO"></div>
  98 +
  99 + <hr />
  100 +
  101 + <div align="center">
  102 + <button type="submit" class="btn btn-primary">
  103 + <i class="icon-bar-chart"></i>
  104 + {{ "Gerar Relatório"|trans }}
  105 + </button>
  106 + </div>
  107 +
  108 + </form>
  109 +
  110 + </div> <!-- /block -->
  111 + </div> <!-- /box -->
  112 + </div> <!-- /span -->
  113 +</div> <!-- /row -->
  114 +
  115 +
  116 +{% endblock %}
0 117 \ No newline at end of file
... ...
src/Cacic/RelatorioBundle/Resources/views/Software/inventariados_filtro.html.twig
... ... @@ -17,6 +17,7 @@
17 17 var tSW = $('#transferSW').bootstrapTransfer({'target_id':'tSw'});
18 18 var tLoc = $('#transferLocais').bootstrapTransfer({'target_id':'tLoc'});
19 19 var tSO = $('#transferSO').bootstrapTransfer({'target_id':'tSo'});
  20 + var tRede = $('#transferRede').bootstrapTransfer({'target_id':'tRede'});
20 21  
21 22 tSW.populate([ // Popula o TRANSFER com Softwares
22 23 {% for sw in softwares %}
... ... @@ -31,6 +32,13 @@
31 32  
32 33 {% endfor %}
33 34 ]);
  35 +
  36 + tRede.populate([ // Popula o TRANSFER com Locais
  37 + {% for r in redes %}
  38 + {value: "{{ r[0]['idRede'] }}", content:"{{ r[0]['nmRede'] ~ '/' ~ r[0]['teIpRede'] }}"}{% if loop.last != true %},{% endif %}
  39 +
  40 + {% endfor %}
  41 + ]);
34 42  
35 43 tSO.populate([ // Popula o TRANSFER com Sistemas Operacionais
36 44 {% for _so in so %}
... ... @@ -45,6 +53,7 @@
45 53 'elms' : [
46 54 { 'transferElement' : tSW , 'inputHiddenName' : 'softwares' },
47 55 { 'transferElement' : tLoc , 'inputHiddenName' : 'locais' },
  56 + { 'transferElement' : tRede , 'inputHiddenName' : 'redes' },
48 57 { 'transferElement' : tSO , 'inputHiddenName' : 'so' }
49 58 ]
50 59 };
... ... @@ -80,6 +89,9 @@
80 89  
81 90 <h4>{{ 'Selecione os Locais'|trans }}</h4>
82 91 <div id="transferLocais"></div>
  92 +
  93 + <h4>{{ 'Selecione as Subredes'|trans }}</h4>
  94 + <div id="transferRede"></div>
83 95  
84 96 <h4>{{ 'Selecione os Sistemas Operacionais'|trans }}</h4>
85 97 <div id="transferSO"></div>
... ...
src/Cacic/RelatorioBundle/Resources/views/Software/listar.html.twig 0 → 100644
... ... @@ -0,0 +1,51 @@
  1 +{% extends 'CacicRelatorioBundle::base.html.twig' %}
  2 +
  3 +{% block body %}
  4 +
  5 + <h2 class="">{{ 'Relatório de Softwares Inventariados'|trans }}</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="40%">{{ "Nome da Máquina"|trans }}</th>
  14 + <th width="20%">{{ "Local"|trans }}</th>
  15 + <th width="20%" style="text-align: center">{{ "IP"|trans }}</th>
  16 + <th width="20%" style="text-align: center">{{ "Data último acesso"|trans }}</th>
  17 + <th width="5%"></th>
  18 + </tr>
  19 + </thead>
  20 +
  21 + <tbody>
  22 +
  23 + {% for reg in dados %}
  24 +
  25 + <tr>
  26 + <td>
  27 + <a href="{{ path("cacic_computador_detalhar") }}/{{ reg['idComputador'] }}" target="_blank">
  28 + {{ reg['nmComputador'] }}
  29 + </a>
  30 + </td>
  31 + <td>{{ reg['nmLocal'] }}</td>
  32 + <td style="text-align: center">{{ reg['teIpComputador'] }}</td>
  33 + <td style="text-align: center">{{ reg['dtHrUltAcesso']|date("d/m/Y H\\hi") }}</td>
  34 + <td>
  35 + <a class="btn" href="{{ path("cacic_computador_detalhar") }}/{{ reg['idComputador'] }}" target="_blank">
  36 + <i class="icon-search"></i>
  37 + </a>
  38 + </td>
  39 +
  40 + </tr>
  41 +
  42 + {% else %}
  43 + <tr>
  44 + <td style="text-align: center" colspan="4"><b>{{ "NENHUM REGISTRO ENCONTRADO!"|trans }}</b></td>
  45 + </tr>
  46 + {% endfor %}
  47 +
  48 + </tbody>
  49 + </table>
  50 +
  51 +{% endblock %}
0 52 \ No newline at end of file
... ...
src/Cacic/RelatorioBundle/Resources/views/Software/rel_inventariados.html.twig
... ... @@ -10,8 +10,9 @@
10 10 <table class="table table-striped table-bordered">
11 11 <thead>
12 12 <tr>
13   - <th width="40%">{{ "Software"|trans }}</th>
14   - <th width="40%">{{ "Local"|trans }}</th>
  13 + <th width="30%">{{ "Software"|trans }}</th>
  14 + <th width="20%">{{ "Local"|trans }}</th>
  15 + <th width="20%">{{ "Subrede"|trans }}</th>
15 16 <th width="20%" style="text-align: center">{{ "Máquinas"|trans }}</th>
16 17 </tr>
17 18 </thead>
... ... @@ -21,9 +22,10 @@
21 22 {% for reg in dados %}
22 23  
23 24 <tr>
24   - <td>{{ reg['nmSoftware'] }}</td>
  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>
25 26 <td>{{ reg['nmLocal'] }}</td>
26   - <td style="text-align: center">{{ reg['numComp'] }}</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>
27 29 </tr>
28 30  
29 31 {% else %}
... ...
src/Cacic/RelatorioBundle/Resources/views/Software/rel_software_lista.html.twig 0 → 100755
... ... @@ -0,0 +1,44 @@
  1 +{% extends 'CacicRelatorioBundle::base.html.twig' %}
  2 +
  3 +{% block body %}
  4 +
  5 +<h2>{{ 'Relatório de estações para o Software '|trans }} {{ software }}</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="15%">{{ "Computador"|trans }}</th>
  14 + <th width="10%">{{ "MAC Address"|trans }}</th>
  15 + <th width="10%">{{ "Endereço IP"|trans }}</th>
  16 + <th width="10%">{{ "Sistema Operacional"|trans }}</th>
  17 + <th width="10%">{{ "Local"|trans }}</th>
  18 + <th width="20%">{{ "Subrede"|trans }}</th>
  19 + <th>{{ "Data/Hora da Última coleta"|trans }}</th>
  20 + </tr>
  21 + </thead>
  22 +
  23 + <tbody>
  24 + {% for reg in dados %}
  25 + <tr>
  26 + <td>
  27 + <b><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.1 }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.nmComputador }}</a></b>
  28 + </td>
  29 + <td><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.1 }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.teNodeAddress }}</a></td>
  30 + <td><a href="{{ path('cacic_computador_detalhar') }}/{{ reg.1 }}" title="{{ "Todas as informações do computador"|trans }}" target="_blank">{{ reg.teIpComputador }}</a></td>
  31 + <td><span class="{% if reg.inMswindows == 'S' %}red{% else %}blue{% endif %}">{{ reg.sgSo }}</span></td>
  32 + <td>{{ reg.nmLocal }}</td>
  33 + <td>{{ reg.nmRede }} / {{ reg.teIpRede }}</td>
  34 + <td>{{ reg.dtHrInclusao|date }}</td>
  35 + </tr>
  36 + {% else %}
  37 + <tr>
  38 + <td style="text-align: center" colspan="5"><b>{{ "NENHUM REGISTRO ENCONTRADO!"|trans }}</b></td>
  39 + </tr>
  40 + {% endfor %}
  41 + </tbody>
  42 +</table>
  43 +
  44 +{% endblock %}
0 45 \ No newline at end of file
... ...
src/Cacic/RelatorioBundle/Resources/views/Software/rel_tipo.html.twig
... ... @@ -10,8 +10,8 @@
10 10 <table class="table table-bordered">
11 11 <thead>
12 12 <tr>
  13 + <th width="20%" style="text-align: center">{{ 'Tipo'|trans }}</th>
13 14 <th width="60%">{{ "Software"|trans }}</th>
14   - <th width="20%" style="text-align: center">{{ 'Tipo'|trans }}</th>
15 15 <th style="text-align: center">{{ "Máquinas"|trans }}</th>
16 16 </tr>
17 17 </thead>
... ... @@ -19,30 +19,9 @@
19 19 <tbody>
20 20 {% for reg in dados %}
21 21 <tr>
  22 + <td style="text-align: center"><span class="red">{{ reg.teDescricaoTipoSoftware }}</span></td>
22 23 <td><span class="blue">{{ reg.nmSoftware }}</span></td>
23   - <td style="text-align: center"><span class="red">{{ reg.idTipoSoftware }}</span></td>
24   - <td style="text-align: center">{{ reg.estacoes|length }}</td>
25   - </tr>
26   - <tr>
27   - <td colspan="3">
28   - <table class="table">
29   - <tbody>
30   - <tr>
31   - <th width="40%">{{ 'Nome da máquina'|trans }}</th>
32   - <th width="30%" style="text-align: center">{{ 'IP'|trans }}</th>
33   - <th width="30%" style="text-align: center">{{ 'Última Coleta'|trans }}</th>
34   - </tr>
35   - {% for item in reg.estacoes %}
36   - <tr>
37   - <td>{{ item.idComputador.nmComputador }}</td>
38   - <td style="text-align: center">{{ item.idComputador.teIpComputador }}</td>
39   - <td style="text-align: center">{{ item.idComputador.dtHrUltAcesso|date('d/m/Y H:i') }}</td>
40   - </tr>
41   - {% endfor %}
42   - </tbody>
43   - </table>
44   -
45   - </td>
  24 + <td style="text-align: center">{{ reg.numComp }}</td>
46 25 </tr>
47 26 {% else %}
48 27 <tr>
... ...
src/Cacic/WSBundle/Controller/ColetaController.php
... ... @@ -43,15 +43,16 @@ class ColetaController extends Controller
43 43 public function gerColsSetColletAction( Request $request )
44 44 {
45 45 OldCacicHelper::autenticaAgente( $request ) ;
46   - $rede = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->getDadosRedePreColeta( $request );
  46 + $logger = $this->get('logger');
  47 + //$rede = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->getDadosRedePreColeta( $request );
47 48 $strNetworkAdapterConfiguration = OldCacicHelper::deCrypt( $request, $request->get('NetworkAdapterConfiguration') );
48   - $strComputerSystem = OldCacicHelper::deCrypt( $request, $request->get('ComputerSystem') );
49   - $strOperatingSystem = OldCacicHelper::deCrypt( $request, $request->request->get('OperatingSystem') );
  49 + //$strComputerSystem = OldCacicHelper::deCrypt( $request, $request->get('ComputerSystem') );
  50 + //$strOperatingSystem = OldCacicHelper::deCrypt( $request, $request->request->get('OperatingSystem') );
50 51 $data = new \DateTime('NOW');
51 52  
52 53 $te_node_adress = TagValueHelper::getValueFromTags( 'MACAddress', $strNetworkAdapterConfiguration );
53 54 $te_so = $request->get( 'te_so' );
54   - $ultimo_login = TagValueHelper::getValueFromTags( 'UserName' , $strComputerSystem);
  55 + //$ultimo_login = TagValueHelper::getValueFromTags( 'UserName' , $strComputerSystem);
55 56 $grava_teste = '';
56 57  
57 58 //vefifica se existe SO coletado se não, insere novo SO
... ... @@ -63,51 +64,27 @@ class ColetaController extends Controller
63 64  
64 65 // Defino os dois arrays que conterão as configurações para Coletas, Classes e Propriedades
65 66 $arrClassesNames = array();
66   - $arrCollectsDefClasses = array();
  67 + $arrCollectsDefClasses[$strCollectType] = array();
67 68  
68 69 $detalhesClasses = $this->getDoctrine()->getRepository('CacicCommonBundle:Classe')->listaDetalhesClasseAcoes($strCollectType);
69 70  
70   - // Variável para corrigir o erro do Doctrine
71   - $className = '';
72   -
73 71 foreach ($detalhesClasses as $detalhe)
74 72 {
75 73 // Adiciona classe no Array de classes que estão no banco
76   - if ($detalhe['nmClassName']) {
  74 + if (!in_array($detalhe['nmClassName'], $arrClassesNames)) {
77 75 array_push($arrClassesNames, $detalhe['nmClassName']);
78 76 }
79   -
80   - //$arrCollectsDefClasses[$strCollectType] = $detalhesClasse[$strCollectType] == '' ? $detalhesClasse['nmClassName'] : $arrCollectsDefClasses[$strCollectType];
81   - //$teste1 = $detalhe['nmPropertyName'];
82   - //$teste2 = $detalhe['idClassProperty'];
83   - //$teste3 = $detalhe['nmClassName'];
84   -
85   - // Tem que corrigir o erro do Doctrine que não traz o nome da classe para todos os resultados
86   - if (!empty($detalhe['nmClassName'])) {
87   - // Vou inserir na variável o valor da classe quando ela não for vazia
88   - $className = $detalhe['nmClassName'];
89   - }
90   -
91   - //error_log("444444444444444444444444444444444444444444444444444444 $teste3 | $teste1 | $teste2 | $className");
92   -
93 77 // Primeiro cria array com as informações das propriedades
94 78 $property = array(
95 79 'idClassProperty' => $detalhe['idClassProperty'],
96 80 'nmFunctionPreDb' => $detalhe['nmFunctionPreDb']
97 81 );
98 82  
99   - // Adiciona as classes no Array geral
100   - if ($arrCollectsDefClasses[$strCollectType][$className]) {
101   - // Aqui o array já existe. Só substituo pelo novo valor
102   - $arrCollectsDefClasses[$strCollectType][$className][$detalhe['nmPropertyName']] = $property;
103   - } else if ($className) {
104   - // Aqui adiciona a classe no array
105   - $arrCollectsDefClasses[$strCollectType][$className] = array();
106   -
107   - // Adiciona as propriedades no array de classes
108   - $arrCollectsDefClasses[$strCollectType][$className][$detalhe['nmPropertyName']] = $property;
109   - }
110 83  
  84 + $nmPropertyName = $detalhe['nmPropertyName'];
  85 + $logger->debug("Adicionando propriedade $nmPropertyName no array de propriedades");
  86 + // Aqui o array já existe. Só substituo pelo novo valor
  87 + $arrCollectsDefClasses[$strCollectType][$detalhe['nmClassName']][$detalhe['nmPropertyName']] = $property;
111 88 }
112 89  
113 90 //$teste = print_r($arrCollectsDefClasses, true);
... ... @@ -134,9 +111,8 @@ class ColetaController extends Controller
134 111 foreach( $request->request->all() as $strClassName => $strClassValues)
135 112 {
136 113 //$teste = OldCacicHelper::deCrypt($request, $strClassValues);
137   - //error_log("444444444444444444444444444444444444444444444444444444444: $strClassName | \n $teste");
  114 + //$logger->debug("444444444444444444444444444444444444444444444444444444444: $strClassName | \n $teste");
138 115 //error_log("444444444444444444444444444444444444444444444444444444: $strClassName");
139   - // Aqui executo uma linha para cada atributo definido na coleta
140 116  
141 117  
142 118 // Verifico se o atributo sendo verificado é uma classe de coleta.
... ... @@ -145,13 +121,8 @@ class ColetaController extends Controller
145 121 // Descriptografando os valores da requisição
146 122 $strNewClassValues = OldCacicHelper::deCrypt($request, $strClassValues);
147 123  
148   - //error_log("55555555555555555555555555555555555555555555: Entrei | $strClassName");
149   - //error_log("77777777777777777777777777777777777777777777777: Entrei | $strNewClassValues");
150   -
151 124 // A propriedade da coleta de software é multi valorada. Preciso tratar diferente
152 125 if ($strClassName == "SoftwareList") {
153   - //error_log("77777777777777777777777777777777777777777777777: Entrei | $strNewClassValues");
154   - //error_log("77777777777777777777777777777777777777777777777: Entrei");
155 126  
156 127 // Primeiro preciso pegar todas as tags qure forem software
157 128 $arrSoftware = TagValueHelper::getSoftwareTags($strNewClassValues);
... ... @@ -161,11 +132,8 @@ class ColetaController extends Controller
161 132 // Armazeno todas as propriedades dessa classe enviadas pela requisição
162 133 $arrTags = TagValueHelper::getTagsFromValues($software);
163 134  
164   - //error_log("6666666666666666666666666666666666666666666666: Encontrei a classe no array $software");
165   -
166 135 // Crio um array multidimensional com as tags e os valores
167 136 foreach ($arrTags as $tagNames) {
168   - //error_log("55555555555555555555555555555555555555555555555: $tagNames");
169 137 // Essa função garante que só serão retornados caracteres com UTF8 Válido
170 138 $texto = TagValueHelper::UTF8Sanitize(TagValueHelper::getValueFromTags($tagNames, $software));
171 139 $arrTagsNames[$tagNames] = $texto;
... ... @@ -199,39 +167,49 @@ class ColetaController extends Controller
199 167 // Retorna o novo ID
200 168 $idClassProperty = $property->getIdClassProperty();
201 169 }
202   - //error_log("888888888888888888888888888888888888888888888: $strClassName | $idClassProperty");
203 170  
204 171 // Chama função que grava a propriedade
205 172 $this->gerColsSetProperty('IDSoftware', $software, $idClassProperty, $computador);
206 173  
  174 + // Adiciona referência à tabela de softwares
  175 + $softwareObject = $this->getDoctrine()->getRepository('CacicCommonBundle:Software')->findOneBy( array('nmSoftware' => $softwareName) );
  176 +
  177 + // Se for fazio, crio o objeto software
  178 + if (empty($softwareObject)) {
  179 + $softwareObject = new Software();
  180 + }
  181 +
  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();
  192 +
207 193 // Agora gravo todas as propriedades para o software na tabela propriedade_software
208 194 $classPropertyObject = $this->getDoctrine()->getRepository('CacicCommonBundle:ClassProperty')->findOneBy( array( 'idClassProperty'=> $idClassProperty ) );
209   - $propriedadeSoftware = $this->getDoctrine()->getRepository('CacicCommonBundle:PropriedadeSoftware')->findOneBy( array('classProperty'=> $idClassProperty, 'computador' => $computador) );
  195 + $propriedadeSoftware = $this->getDoctrine()->getRepository('CacicCommonBundle:PropriedadeSoftware')->findOneBy( array('classProperty'=> $idClassProperty, 'computador' => $computador, 'software' => $softwareObject->getIdSoftware()) );
210 196  
211 197 if (empty($propriedadeSoftware)) {
212 198 $propriedadeSoftware = new PropriedadeSoftware();
213 199  
214 200 $propriedadeSoftware->setClassProperty($classPropertyObject);
215 201 $propriedadeSoftware->setComputador($computador);
216   -
217   - // Adiciona referência à tabela de softwares
218   - $softwareObject = new Software();
219   - // Se for fazio coloco o ID Software no nome
220   - if (empty($arrTagsNames['DisplayName'])) {
221   - $softwareObject->setNmSoftware($softwareName);
222   - } else {
223   - $softwareObject->setNmSoftware($arrTagsNames['DisplayName']);
224   - }
  202 + $propriedadeSoftware->setSoftware($softwareObject);
225 203  
226 204 // Grava no banco de dados
227 205 $this->getDoctrine()->getManager()->persist($propriedadeSoftware);
228   - $this->getDoctrine()->getManager()->persist($softwareObject);
229 206 $this->getDoctrine()->getManager()->flush();
230 207 } else {
231 208 // Ajusta valores coletados
232 209 $propriedadeSoftware->setDisplayName($arrTagsNames['DisplayName']);
233 210 $propriedadeSoftware->setDisplayVersion($arrTagsNames['DisplayVersion']);
234 211 $propriedadeSoftware->setURLInfoAbout($arrTagsNames['URLInfoAbout']);
  212 + $propriedadeSoftware->setSoftware($softwareObject);
235 213  
236 214 // Salva valor da coleta
237 215 $this->getDoctrine()->getManager()->persist($propriedadeSoftware);
... ... @@ -240,24 +218,24 @@ class ColetaController extends Controller
240 218  
241 219 }
242 220  
243   - } else {
  221 + } elseif (!empty($strNewClassValues)) {
244 222 // Armazeno todas as propriedades dessa classe enviadas pela requisição
245 223 $arrTagsNames = TagValueHelper::getTagsFromValues($strNewClassValues);
246 224  
247   - //error_log("6666666666666666666666666666666666666666666666: Encontrei a classe no array $strNewClassValues");
248   -
249 225 // Agora gravo todas as propriedades dessa classe na tabela de computadores
250 226 foreach ($arrTagsNames as $classPropertyName) {
251   - //error_log("9999999999999999999999999999999999999999999999999999: $classPropertyName");
252   -
253   - // Pego o Id da classe cadastrada no Banco de Dados para gravar
254   - $idClassProperty = $arrCollectsDefClasses[$strCollectType][$strClassName][$classPropertyName]['idClassProperty'];
  227 + $logger->debug("Processando a proriedade WMI $classPropertyName para a classe $strClassName");
  228 + // Pega classe
  229 + $idClass = $this->getDoctrine()->getRepository('CacicCommonBundle:Classe')->findOneBy( array('nmClassName'=>$strClassName) );
255 230  
256 231 // Caso a propriedade ainda não esteja cadastrada no banco, crio na hora
257   - if (empty($idClassProperty)) {
258   - error_log("Criando propriedade $classPropertyName para a classe $strClassName");
259   - // Pega classe
260   - $idClass = $this->getDoctrine()->getRepository('CacicCommonBundle:Classe')->findOneBy( array('nmClassName'=>$strClassName) );
  232 + if (array_key_exists($classPropertyName, $arrCollectsDefClasses[$strCollectType][$strClassName])) {
  233 + // Somente armazeno o valor que já existe
  234 + $idClassProperty = $arrCollectsDefClasses[$strCollectType][$strClassName][$classPropertyName]['idClassProperty'];
  235 + $logger->debug("Propriedade encontrada: $classPropertyName id_class_property = $idClassProperty. Apenas atualizar");
  236 + } else {
  237 + // Se não existir cria a propriedade
  238 + $logger->info("Criando propriedade $classPropertyName para a classe $strClassName");
261 239  
262 240 $classPropertyObject = new ClassProperty();
263 241 $classPropertyObject->setIdClass($idClass);
... ... @@ -269,7 +247,11 @@ class ColetaController extends Controller
269 247  
270 248 // Finalmente adiciono no array de classes e propriedades
271 249 $idClassProperty = $classPropertyObject->getIdClassProperty();
272   - $arrCollectsDefClasses[$strCollectType][$className][$classPropertyName] = $idClassProperty;
  250 + $property = array(
  251 + 'idClassProperty' => $idClassProperty,
  252 + 'nmFunctionPreDb' => null
  253 + );
  254 + $arrCollectsDefClasses[$strCollectType][$className][$classPropertyName] = $property;
273 255 }
274 256 //error_log("888888888888888888888888888888888888888888888: $strClassName | $idClassProperty | $classPropertyName");
275 257  
... ... @@ -355,19 +337,21 @@ class ColetaController extends Controller
355 337  
356 338 public function gerColsSetProperty($classPropertyName, $strNewClassValues, $idClassProperty, $computador)
357 339 {
  340 + $logger = $this->get('logger');
  341 + $grava_teste = "";
358 342 // pego o valor da classe presente na requisição
359 343 $classProperty = TagValueHelper::getValueFromTags($classPropertyName, $strNewClassValues);
360 344  
361 345 // Se não encontrar o valor, loga o erro e sai
362   - if (empty($classProperty)) {
363   - error_log("ERRO NA COLETA! Propriedade $classPropertyName não encontrada na requisição");
  346 + if (is_null($classProperty) || $classProperty == "") {
  347 + $logger->error("ERRO NA COLETA! Propriedade $classPropertyName não encontrada na requisição ou valor vazio");
364 348 return;
365 349 }
366 350  
367 351 //error_log("888888888888888888888888888888888888888888888: $strNewClassValues | $idClassProperty | $classPropertyName | $classProperty");
368 352  
369 353 // Preparo o objeto da coleta para gravação
370   - $computadorColeta = $this->getDoctrine()->getRepository('CacicCommonBundle:ComputadorColeta')->findOneBy( array( 'computador'=> $computador, 'classProperty'=>$$idClassProperty ) );
  354 + $computadorColeta = $this->getDoctrine()->getRepository('CacicCommonBundle:ComputadorColeta')->findOneBy( array( 'computador'=> $computador, 'classProperty'=> $idClassProperty ) );
371 355 if (empty($computadorColeta)) {
372 356 // Se não existir nenhuma ocorrência para esse atributo, apenas adiciono
373 357 //error_log("3333333333333333333333333333333333333333333: Criando objeto");
... ... @@ -378,8 +362,8 @@ class ColetaController extends Controller
378 362 // Pega o objeto para gravar
379 363 $classPropertyObject = $this->getDoctrine()->getRepository('CacicCommonBundle:ClassProperty')->findOneBy( array( 'idClassProperty'=> $idClassProperty ) );
380 364  
381   - if (!$classPropertyObject) {
382   - error_log("FALHA! Propriedade não encontrada: $idClassProperty");
  365 + if (empty($classPropertyObject)) {
  366 + $logger->error("FALHA! Propriedade não encontrada: $idClassProperty");
383 367 }
384 368  
385 369 // Armazena no banco o objeto
... ...
src/Cacic/WSBundle/Helper/OldCacicHelper.php
... ... @@ -23,7 +23,10 @@ class OldCacicHelper
23 23 }
24 24  
25 25 public function getRootDir() {
26   - return $this->rootDir;
  26 + // Tenta consertar caminho do diretório
  27 + $rootDir = realpath($this->rootDir);
  28 +
  29 + return $rootDir;
27 30 }
28 31  
29 32 /*
... ... @@ -31,7 +34,7 @@ class OldCacicHelper
31 34 */
32 35  
33 36 public function iniFile() {
34   - return $this->getRootDir() . OldCacicHelper::CACIC_PATH_RELATIVO_DOWNLOADS . 'versions_and_hashes.ini';
  37 + return OldCacicHelper::getRootDir() . OldCacicHelper::CACIC_PATH_RELATIVO_DOWNLOADS . 'versions_and_hashes.ini';
35 38 }
36 39  
37 40 // define o nome do agente principal do CACIC
... ...
src/Cacic/WSBundle/Helper/TagValueHelper.php
... ... @@ -37,7 +37,7 @@ class TagValueHelper
37 37 // Garantir que o resultado contenha somente UTF-8 valido
38 38 $resultado = TagValueHelper::UTF8Sanitize($arrResult[1][0]);
39 39  
40   - return empty($resultado) ? null : $resultado;
  40 + return $resultado;
41 41 }
42 42  
43 43 // Metódo para recuperar array com nomes das tags delimitadas por "<" e ">"
... ... @@ -99,7 +99,7 @@ class TagValueHelper
99 99 */
100 100  
101 101 public static function UTF8Sanitize($text) {
102   - return iconv('UTF-8', 'UTF-8//IGNORE', $text);
  102 + return iconv('WINDOWS-1252', 'UTF-8//TRANSLIT', $text);
103 103 }
104 104  
105 105 /*
... ... @@ -107,21 +107,25 @@ class TagValueHelper
107 107 */
108 108  
109 109 public static function getTableValues($source) {
110   - preg_match_all("/\[\[REG\]\](.*?)\[\[REG\]\]/",$source,$arrResult);
  110 + preg_match_all("/(.*)\[\[REG\]\](.*)/", $source, $arrResult);
111 111  
112 112 // Se não houver match, retorna a fonte
113   - if (empty($arrResult[1])) {
  113 + if (empty($arrResult[0])) {
114 114 return $source;
115 115 }
116 116  
117 117 //Caso contrário retorna os elementos prontos para serem inseridos em uma tabela
118 118 $saida = '';
119   - $i = 1;
120   - foreach ($arrResult[1] as $linha) {
121   - $saida = $saida . '<tr>';
122   - $saida = $saida . "<th>#$i</th>";
123   - $saida = $saida . "<td>$linha</td>";
124   - $saida = $saida . '</tr>';
  119 + $i = 0;
  120 + foreach ($arrResult as $linha) {
  121 + if ($i != 0) {
  122 + // Ignora a primeira linha
  123 + //continue;
  124 + $saida = $saida . '<tr>';
  125 + $saida = $saida . "<th>#$i</th>";
  126 + $saida = $saida . "<td>$linha[0]</td>";
  127 + $saida = $saida . '</tr>';
  128 + }
125 129 $i = $i + 1;
126 130 }
127 131  
... ...