Commit 88d71ec790837d7bebf321e76d0a3741d8abbfea
1 parent
54d6a9f7
Exists in
master
and in
1 other branch
Corrige bugs das coletas
Showing
2 changed files
with
6 additions
and
6 deletions
Show diff stats
src/Cacic/WSBundle/Controller/ColetaController.php
| @@ -53,19 +53,19 @@ class ColetaController extends Controller | @@ -53,19 +53,19 @@ class ColetaController extends Controller | ||
| 53 | $data = microtime(); | 53 | $data = microtime(); |
| 54 | $logger->debug("%%% Início da operação de coleta: $data_inicio %%%"); | 54 | $logger->debug("%%% Início da operação de coleta: $data_inicio %%%"); |
| 55 | 55 | ||
| 56 | - $te_node_adress = TagValueHelper::getValueFromTags( 'MACAddress', $strNetworkAdapterConfiguration ); | 56 | + $te_node_address = TagValueHelper::getValueFromTags( 'MACAddress', $strNetworkAdapterConfiguration ); |
| 57 | $te_so = $request->get( 'te_so' ); | 57 | $te_so = $request->get( 'te_so' ); |
| 58 | //$ultimo_login = TagValueHelper::getValueFromTags( 'UserName' , $strComputerSystem); | 58 | //$ultimo_login = TagValueHelper::getValueFromTags( 'UserName' , $strComputerSystem); |
| 59 | $grava_teste = ''; | 59 | $grava_teste = ''; |
| 60 | 60 | ||
| 61 | // Caso não tenha encontrado, tenta pegar a variável da requisição | 61 | // Caso não tenha encontrado, tenta pegar a variável da requisição |
| 62 | if (empty($te_node_address)) { | 62 | if (empty($te_node_address)) { |
| 63 | - $te_node_adress = $request->get('te_node_address'); | 63 | + $te_node_address = $request->get('te_node_address'); |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | //vefifica se existe SO coletado se não, insere novo SO | 66 | //vefifica se existe SO coletado se não, insere novo SO |
| 67 | $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->findOneBy( array('teSo'=>$te_so) ); | 67 | $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->findOneBy( array('teSo'=>$te_so) ); |
| 68 | - $computador = $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->findOneBy( array('idSo'=>$so, 'teNodeAddress'=>$te_node_adress) ); | 68 | + $computador = $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->findOneBy( array('idSo'=>$so, 'teNodeAddress'=>$te_node_address) ); |
| 69 | $netmask = TagValueHelper::getValueFromTags( 'IPSubnet', $strNetworkAdapterConfiguration ); | 69 | $netmask = TagValueHelper::getValueFromTags( 'IPSubnet', $strNetworkAdapterConfiguration ); |
| 70 | if (empty($netmask)) { | 70 | if (empty($netmask)) { |
| 71 | $netmask = $request->get('netmask'); | 71 | $netmask = $request->get('netmask'); |
| @@ -295,11 +295,11 @@ class ColetaController extends Controller | @@ -295,11 +295,11 @@ class ColetaController extends Controller | ||
| 295 | 295 | ||
| 296 | $rede = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->getDadosRedePreColeta( $ip_computador, $netmask ); | 296 | $rede = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->getDadosRedePreColeta( $ip_computador, $netmask ); |
| 297 | 297 | ||
| 298 | - $te_node_adress = TagValueHelper::getValueFromTags( 'MACAddress', $strNetworkAdapterConfiguration ); | 298 | + $te_node_address = TagValueHelper::getValueFromTags( 'MACAddress', $strNetworkAdapterConfiguration ); |
| 299 | $te_so = $request->get( 'te_so' ); | 299 | $te_so = $request->get( 'te_so' ); |
| 300 | 300 | ||
| 301 | $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->findOneBy( array('teSo'=>$te_so) ); | 301 | $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->findOneBy( array('teSo'=>$te_so) ); |
| 302 | - $computador = $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->findOneBy( array('idSo'=>$so, 'teNodeAddress'=>$te_node_adress) ); | 302 | + $computador = $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->findOneBy( array('idSo'=>$so, 'teNodeAddress'=>$te_node_address) ); |
| 303 | $local = $computador->getIdRede()->getIdLocal(); | 303 | $local = $computador->getIdRede()->getIdLocal(); |
| 304 | 304 | ||
| 305 | $te_usb_info = OldCacicHelper::deCrypt($request, $request->get('te_usb_info')); | 305 | $te_usb_info = OldCacicHelper::deCrypt($request, $request->get('te_usb_info')); |
src/Cacic/WSBundle/Controller/DefaultController.php
| @@ -319,7 +319,7 @@ class DefaultController extends Controller | @@ -319,7 +319,7 @@ class DefaultController extends Controller | ||
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | //verifica se computador coletado é exceção | 321 | //verifica se computador coletado é exceção |
| 322 | - $excecao = $this->getDoctrine()->getRepository('CacicCommonBundle:AcaoExcecao')->findOneBy( array('teNodeAddress' => $te_node_adress) ); | 322 | + $excecao = $this->getDoctrine()->getRepository('CacicCommonBundle:AcaoExcecao')->findOneBy( array('teNodeAddress' => $te_node_address) ); |
| 323 | 323 | ||
| 324 | //Aplicativos Monitorados | 324 | //Aplicativos Monitorados |
| 325 | $monitorados = $this->getDoctrine()->getRepository('CacicCommonBundle:Aplicativo')->listarAplicativosMonitorados( $rede->getIdRede() ); | 325 | $monitorados = $this->getDoctrine()->getRepository('CacicCommonBundle:Aplicativo')->listarAplicativosMonitorados( $rede->getIdRede() ); |