Commit ad4e36aaeca78677306fb59633831ba8e0d5d623
1 parent
d6010a29
Exists in
master
and in
1 other branch
Enviando navegadores de forma separada
Showing
3 changed files
with
26 additions
and
12 deletions
Show diff stats
rn/MdEstatisticasAgendamentoRN.php
| ... | ... | @@ -38,6 +38,9 @@ class MdEstatisticasAgendamentoRN extends InfraRN { |
| 38 | 38 | |
| 39 | 39 | $sistemasOperacionaisUsuarios = $coletor->obterSistemasOperacionaisUsuarios(); |
| 40 | 40 | $enviar->enviarSistemasUsuarios($sistemasOperacionaisUsuarios, $id); |
| 41 | + | |
| 42 | + $navegadores = $coletor->obterNavegadores(); | |
| 43 | + $enviar->enviarNavegadores($navegadores, $id); | |
| 41 | 44 | |
| 42 | 45 | LogSEI::getInstance()->gravar(InfraDebug::getInstance()->getStrDebug(),InfraLog::$INFORMACAO); |
| 43 | 46 | ... | ... |
rn/MdEstatisticasColetarRN.php
| ... | ... | @@ -47,7 +47,6 @@ class MdEstatisticasColetarRN extends InfraRN { |
| 47 | 47 | $ind['modulos'] = $this->obterPlugins(); |
| 48 | 48 | $ind['extensoes'] = $this->obterQuantidadeDocumentosExternosPorExtensao(); |
| 49 | 49 | $ind['anexosTamanhos'] = $this->obterTamanhoDocumentosExternos(); |
| 50 | - $ind['navegadores'] = $this->obterNavegadores(); | |
| 51 | 50 | |
| 52 | 51 | InfraDebug::getInstance()->gravar('Ind: ' . json_encode($ind), InfraLog::$INFORMACAO); |
| 53 | 52 | |
| ... | ... | @@ -160,17 +159,6 @@ class MdEstatisticasColetarRN extends InfraRN { |
| 160 | 159 | return $quantidade; |
| 161 | 160 | } |
| 162 | 161 | |
| 163 | - private function obterNavegadores(){ | |
| 164 | - $query = "select count(*) as quantidade, identificacao as nome, versao from infra_navegador group by identificacao,versao"; | |
| 165 | - $rs = BancoSEI::getInstance()->consultarSql($query); | |
| 166 | - foreach ($rs as $r) { | |
| 167 | - $r['nome'] = utf8_encode($r['nome']); | |
| 168 | - } | |
| 169 | - | |
| 170 | - InfraDebug::getInstance()->gravar('SEI13 - Quantidade de Navegadores: ' . json_encode($rs), InfraLog::$INFORMACAO); | |
| 171 | - return $rs; | |
| 172 | - } | |
| 173 | - | |
| 174 | 162 | private function obterTipoSGBD(){ |
| 175 | 163 | $objConfiguracaoSEI = ConfiguracaoSEI::getInstance(); |
| 176 | 164 | $sgbd = $objConfiguracaoSEI->getValor('BancoSEI','Tipo', false, ''); |
| ... | ... | @@ -477,6 +465,18 @@ class MdEstatisticasColetarRN extends InfraRN { |
| 477 | 465 | InfraDebug::getInstance()->gravar('SEI26 - Sistemas Operacionais dos Clientes: ' . json_encode($sistemas), InfraLog::$INFORMACAO); |
| 478 | 466 | return $sistemas; |
| 479 | 467 | } |
| 468 | + | |
| 469 | + public function obterNavegadores(){ | |
| 470 | + $query = "select count(*) as quantidade, identificacao as nome, versao from infra_navegador group by identificacao,versao"; | |
| 471 | + $rs = BancoSEI::getInstance()->consultarSql($query); | |
| 472 | + foreach ($rs as $r) { | |
| 473 | + $r['nome'] = utf8_encode($r['nome']); | |
| 474 | + } | |
| 475 | + | |
| 476 | + InfraDebug::getInstance()->gravar('SEI13 - Quantidade de Navegadores: ' . json_encode($rs), InfraLog::$INFORMACAO); | |
| 477 | + return $rs; | |
| 478 | + } | |
| 479 | + | |
| 480 | 480 | |
| 481 | 481 | } |
| 482 | 482 | ?> | ... | ... |
rn/MdEstatisticasEnviarRN.php
| ... | ... | @@ -57,6 +57,17 @@ class MdEstatisticasEnviarRN extends InfraRN { |
| 57 | 57 | InfraDebug::getInstance()->gravar('URL: ' . json_encode($obj), InfraLog::$INFORMACAO); |
| 58 | 58 | return $this->doPost($url, $obj, false); |
| 59 | 59 | } |
| 60 | + | |
| 61 | + public function enviarNavegadores($navegadores, $id) { | |
| 62 | + $url = $this->url . '/navegadores'; | |
| 63 | + InfraDebug::getInstance()->gravar('URL: ' . $url, InfraLog::$INFORMACAO); | |
| 64 | + $obj = array( | |
| 65 | + id => $id, | |
| 66 | + navegadores => $navegadores | |
| 67 | + ); | |
| 68 | + InfraDebug::getInstance()->gravar('URL: ' . json_encode($obj), InfraLog::$INFORMACAO); | |
| 69 | + return $this->doPost($url, $obj, false); | |
| 70 | + } | |
| 60 | 71 | |
| 61 | 72 | private function doPost($url, $json, $isjson=true) { |
| 62 | 73 | $data = json_encode($json); | ... | ... |