Commit 97015d5762b7f1a40b058d0c2cbdbf01e046f9ed
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing
3 changed files
with
65 additions
and
40 deletions
Show diff stats
composer.lock
| ... | ... | @@ -314,9 +314,9 @@ |
| 314 | 314 | "email": "kontakt@beberlei.de" |
| 315 | 315 | }, |
| 316 | 316 | { |
| 317 | - "name": "Johannes Schmitt", | |
| 317 | + "name": "Johannes M. Schmitt", | |
| 318 | 318 | "email": "schmittjoh@gmail.com", |
| 319 | - "homepage": "http://jmsyst.com", | |
| 319 | + "homepage": "https://github.com/schmittjoh", | |
| 320 | 320 | "role": "Developer of wrapped JMSSerializerBundle" |
| 321 | 321 | } |
| 322 | 322 | ], |
| ... | ... | @@ -362,7 +362,7 @@ |
| 362 | 362 | ], |
| 363 | 363 | "authors": [ |
| 364 | 364 | { |
| 365 | - "name": "Jonathan H. Wage", | |
| 365 | + "name": "Jonathan Wage", | |
| 366 | 366 | "email": "jonwage@gmail.com", |
| 367 | 367 | "homepage": "http://www.jwage.com/", |
| 368 | 368 | "role": "Creator" |
| ... | ... | @@ -381,7 +381,7 @@ |
| 381 | 381 | "email": "kontakt@beberlei.de" |
| 382 | 382 | }, |
| 383 | 383 | { |
| 384 | - "name": "Johannes Schmitt", | |
| 384 | + "name": "Johannes M. Schmitt", | |
| 385 | 385 | "email": "schmittjoh@gmail.com", |
| 386 | 386 | "homepage": "https://github.com/schmittjoh", |
| 387 | 387 | "role": "Developer of wrapped JMSSerializerBundle" |
| ... | ... | @@ -837,7 +837,7 @@ |
| 837 | 837 | { |
| 838 | 838 | "name": "Johannes M. Schmitt", |
| 839 | 839 | "email": "schmittjoh@gmail.com", |
| 840 | - "homepage": "http://jmsyst.com", | |
| 840 | + "homepage": "https://github.com/schmittjoh", | |
| 841 | 841 | "role": "Developer of wrapped JMSSerializerBundle" |
| 842 | 842 | } |
| 843 | 843 | ], |
| ... | ... | @@ -889,9 +889,9 @@ |
| 889 | 889 | "email": "roman@code-factory.org" |
| 890 | 890 | }, |
| 891 | 891 | { |
| 892 | - "name": "Johannes Schmitt", | |
| 892 | + "name": "Johannes M. Schmitt", | |
| 893 | 893 | "email": "schmittjoh@gmail.com", |
| 894 | - "homepage": "http://jmsyst.com", | |
| 894 | + "homepage": "https://github.com/schmittjoh", | |
| 895 | 895 | "role": "Developer of wrapped JMSSerializerBundle" |
| 896 | 896 | } |
| 897 | 897 | ], |
| ... | ... | @@ -1041,12 +1041,12 @@ |
| 1041 | 1041 | "source": { |
| 1042 | 1042 | "type": "git", |
| 1043 | 1043 | "url": "https://github.com/FriendsOfSymfony/FOSRestBundle.git", |
| 1044 | - "reference": "5e91023b941cb11d8ac09c46405a4aa1920ca217" | |
| 1044 | + "reference": "22d6b2a401b66fb4f18840efc27826de441d902c" | |
| 1045 | 1045 | }, |
| 1046 | 1046 | "dist": { |
| 1047 | 1047 | "type": "zip", |
| 1048 | - "url": "https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/zipball/5e91023b941cb11d8ac09c46405a4aa1920ca217", | |
| 1049 | - "reference": "5e91023b941cb11d8ac09c46405a4aa1920ca217", | |
| 1048 | + "url": "https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/zipball/22d6b2a401b66fb4f18840efc27826de441d902c", | |
| 1049 | + "reference": "22d6b2a401b66fb4f18840efc27826de441d902c", | |
| 1050 | 1050 | "shasum": "" |
| 1051 | 1051 | }, |
| 1052 | 1052 | "require": { |
| ... | ... | @@ -1062,7 +1062,7 @@ |
| 1062 | 1062 | "jms/serializer-bundle": "<0.11" |
| 1063 | 1063 | }, |
| 1064 | 1064 | "require-dev": { |
| 1065 | - "jms/serializer-bundle": "0.12.*", | |
| 1065 | + "jms/serializer-bundle": "~0.12", | |
| 1066 | 1066 | "sensio/framework-extra-bundle": "~2.2", |
| 1067 | 1067 | "symfony/form": "~2.2", |
| 1068 | 1068 | "symfony/security": "~2.2", |
| ... | ... | @@ -1071,7 +1071,7 @@ |
| 1071 | 1071 | "symfony/yaml": "~2.2" |
| 1072 | 1072 | }, |
| 1073 | 1073 | "suggest": { |
| 1074 | - "jms/serializer-bundle": "Add support for advanced serialization capabilities, recommended, requires 0.12.*", | |
| 1074 | + "jms/serializer-bundle": "Add support for advanced serialization capabilities, recommended, requires ~0.12", | |
| 1075 | 1075 | "sensio/framework-extra-bundle": "Add support for route annotations and the view response listener", |
| 1076 | 1076 | "symfony/serializer": "Add support for basic serialization capabilities and xml decoding, requires ~2.2", |
| 1077 | 1077 | "symfony/validator": "Add support for validation capabilities in the ParamFetcher, requires ~2.2" |
| ... | ... | @@ -1110,7 +1110,7 @@ |
| 1110 | 1110 | "keywords": [ |
| 1111 | 1111 | "rest" |
| 1112 | 1112 | ], |
| 1113 | - "time": "2014-08-02 13:36:07" | |
| 1113 | + "time": "2014-08-11 13:50:52" | |
| 1114 | 1114 | }, |
| 1115 | 1115 | { |
| 1116 | 1116 | "name": "helios-ag/fm-elfinder-bundle", |
| ... | ... | @@ -1195,7 +1195,7 @@ |
| 1195 | 1195 | ], |
| 1196 | 1196 | "authors": [ |
| 1197 | 1197 | { |
| 1198 | - "name": "Al Ganiev", | |
| 1198 | + "name": "Albert Ganiev", | |
| 1199 | 1199 | "email": "helios.ag@gmail.com" |
| 1200 | 1200 | }, |
| 1201 | 1201 | { |
| ... | ... | @@ -1752,12 +1752,12 @@ |
| 1752 | 1752 | "source": { |
| 1753 | 1753 | "type": "git", |
| 1754 | 1754 | "url": "https://github.com/schmittjoh/JMSSerializerBundle.git", |
| 1755 | - "reference": "55bb8fc449c626ab8d47d58fa13fd37f84376dfc" | |
| 1755 | + "reference": "3a980e5409aa3d143534e68a72895e7e33b64c75" | |
| 1756 | 1756 | }, |
| 1757 | 1757 | "dist": { |
| 1758 | 1758 | "type": "zip", |
| 1759 | - "url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/55bb8fc449c626ab8d47d58fa13fd37f84376dfc", | |
| 1760 | - "reference": "55bb8fc449c626ab8d47d58fa13fd37f84376dfc", | |
| 1759 | + "url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/3a980e5409aa3d143534e68a72895e7e33b64c75", | |
| 1760 | + "reference": "3a980e5409aa3d143534e68a72895e7e33b64c75", | |
| 1761 | 1761 | "shasum": "" |
| 1762 | 1762 | }, |
| 1763 | 1763 | "require": { |
| ... | ... | @@ -1799,9 +1799,7 @@ |
| 1799 | 1799 | "authors": [ |
| 1800 | 1800 | { |
| 1801 | 1801 | "name": "Johannes M. Schmitt", |
| 1802 | - "email": "schmittjoh@gmail.com", | |
| 1803 | - "homepage": "http://jmsyst.com", | |
| 1804 | - "role": "Developer of wrapped JMSSerializerBundle" | |
| 1802 | + "email": "schmittjoh@gmail.com" | |
| 1805 | 1803 | } |
| 1806 | 1804 | ], |
| 1807 | 1805 | "description": "Allows you to easily serialize, and deserialize data of any complexity", |
| ... | ... | @@ -1813,7 +1811,7 @@ |
| 1813 | 1811 | "serialization", |
| 1814 | 1812 | "xml" |
| 1815 | 1813 | ], |
| 1816 | - "time": "2014-07-08 16:41:25" | |
| 1814 | + "time": "2014-08-07 13:20:59" | |
| 1817 | 1815 | }, |
| 1818 | 1816 | { |
| 1819 | 1817 | "name": "jms/translation-bundle", |
| ... | ... | @@ -2105,7 +2103,7 @@ |
| 2105 | 2103 | "email": "stof@notk.org" |
| 2106 | 2104 | }, |
| 2107 | 2105 | { |
| 2108 | - "name": "Knplabs", | |
| 2106 | + "name": "KnpLabs", | |
| 2109 | 2107 | "homepage": "http://knplabs.com" |
| 2110 | 2108 | }, |
| 2111 | 2109 | { |
| ... | ... | @@ -2297,12 +2295,12 @@ |
| 2297 | 2295 | "source": { |
| 2298 | 2296 | "type": "git", |
| 2299 | 2297 | "url": "https://github.com/lightbase/cocar.git", |
| 2300 | - "reference": "c9cabf7119e18a49956edae87996dded77e213d2" | |
| 2298 | + "reference": "720c610b5ca409c385902cadb68d8443f0fe9ae3" | |
| 2301 | 2299 | }, |
| 2302 | 2300 | "dist": { |
| 2303 | 2301 | "type": "zip", |
| 2304 | - "url": "https://api.github.com/repos/lightbase/cocar/zipball/c9cabf7119e18a49956edae87996dded77e213d2", | |
| 2305 | - "reference": "c9cabf7119e18a49956edae87996dded77e213d2", | |
| 2302 | + "url": "https://api.github.com/repos/lightbase/cocar/zipball/720c610b5ca409c385902cadb68d8443f0fe9ae3", | |
| 2303 | + "reference": "720c610b5ca409c385902cadb68d8443f0fe9ae3", | |
| 2306 | 2304 | "shasum": "" |
| 2307 | 2305 | }, |
| 2308 | 2306 | "require": { |
| ... | ... | @@ -2333,7 +2331,7 @@ |
| 2333 | 2331 | "support": { |
| 2334 | 2332 | "source": "https://github.com/lightbase/cocar/tree/master" |
| 2335 | 2333 | }, |
| 2336 | - "time": "2014-08-01 13:34:45" | |
| 2334 | + "time": "2014-09-19 21:37:41" | |
| 2337 | 2335 | }, |
| 2338 | 2336 | { |
| 2339 | 2337 | "name": "monolog/monolog", |
| ... | ... | @@ -2483,7 +2481,7 @@ |
| 2483 | 2481 | { |
| 2484 | 2482 | "name": "Johannes M. Schmitt", |
| 2485 | 2483 | "email": "schmittjoh@gmail.com", |
| 2486 | - "homepage": "http://jmsyst.com", | |
| 2484 | + "homepage": "https://github.com/schmittjoh", | |
| 2487 | 2485 | "role": "Developer of wrapped JMSSerializerBundle" |
| 2488 | 2486 | } |
| 2489 | 2487 | ], |
| ... | ... | @@ -2533,7 +2531,7 @@ |
| 2533 | 2531 | { |
| 2534 | 2532 | "name": "Johannes M. Schmitt", |
| 2535 | 2533 | "email": "schmittjoh@gmail.com", |
| 2536 | - "homepage": "http://jmsyst.com", | |
| 2534 | + "homepage": "https://github.com/schmittjoh", | |
| 2537 | 2535 | "role": "Developer of wrapped JMSSerializerBundle" |
| 2538 | 2536 | } |
| 2539 | 2537 | ], |
| ... | ... | @@ -3356,7 +3354,7 @@ |
| 3356 | 3354 | ], |
| 3357 | 3355 | "authors": [ |
| 3358 | 3356 | { |
| 3359 | - "name": "William DURAND", | |
| 3357 | + "name": "William Durand", | |
| 3360 | 3358 | "email": "william.durand1@gmail.com", |
| 3361 | 3359 | "homepage": "http://www.willdurand.fr" |
| 3362 | 3360 | } | ... | ... |
src/Cacic/WSBundle/Controller/DefaultController.php
| ... | ... | @@ -78,24 +78,22 @@ class DefaultController extends Controller |
| 78 | 78 | $strComputerSystem = OldCacicHelper::deCrypt( $request, $request->get('ComputerSystem') ); |
| 79 | 79 | $strOperatingSystem = OldCacicHelper::deCrypt( $request, $request->request->get('OperatingSystem') ); |
| 80 | 80 | |
| 81 | - $teste = $strNetworkAdapterConfiguration; | |
| 82 | - #$logger->debug("00000000000000000000000000000000000000000000 ".print_r($teste, true)); | |
| 83 | 81 | |
| 84 | 82 | $te_node_address = TagValueHelper::getValueFromTags( 'MACAddress', $strNetworkAdapterConfiguration ); |
| 85 | 83 | $netmask = TagValueHelper::getValueFromTags( 'IPSubnet', $strNetworkAdapterConfiguration ); |
| 86 | 84 | $te_so = $request->get( 'te_so' ); |
| 87 | 85 | $ultimo_login = TagValueHelper::getValueFromTags( 'UserName' , $strComputerSystem); |
| 88 | 86 | $ip_computador = $request->get('te_ip_computador'); |
| 89 | - #$logger->debug("11111111111111111111111111111111111: $ip_computador"); | |
| 87 | + | |
| 90 | 88 | if ( empty($ip_computador) ){ |
| 91 | 89 | $ip_computador = TagValueHelper::getValueFromTags( 'IPAddress', $strNetworkAdapterConfiguration ); |
| 92 | - #$logger->debug("555555555555555555555555555555555555555555: $ip_computador"); | |
| 90 | + | |
| 93 | 91 | } |
| 94 | - #$logger->debug("22222222222222222222222222222222222: $ip_computador"); | |
| 92 | + | |
| 95 | 93 | if (empty($ip_computador)) { |
| 96 | 94 | $ip_computador = $request->getClientIp(); |
| 97 | 95 | } |
| 98 | - #$logger->debug("333333333333333333333333333333333333: $ip_computador"); | |
| 96 | + | |
| 99 | 97 | $logger->debug("Teste de Conexão GET-TEST! Ip do computador: $ip_computador Máscara da rede: $netmask"); |
| 100 | 98 | |
| 101 | 99 | // Caso não tenha encontrado, tenta pegar a variável da requisição |
| ... | ... | @@ -110,6 +108,25 @@ class DefaultController extends Controller |
| 110 | 108 | //vefifica se existe SO coletado se não, insere novo SO |
| 111 | 109 | $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->createIfNotExist( $te_so ); |
| 112 | 110 | $rede = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->getDadosRedePreColeta( $ip_computador, $netmask ); |
| 111 | + | |
| 112 | + if (empty($te_node_address) || empty($so)) { | |
| 113 | + $this->get('logger')->error("Erro na operação de getTest. IP = $ip_computador Máscara = $netmask. MAC = $te_node_address. SO = $te_so"); | |
| 114 | + | |
| 115 | + $response = new Response(); | |
| 116 | + $response->headers->set('Content-Type', 'xml'); | |
| 117 | + $cacic_helper = new OldCacicHelper($this->get('kernel')); | |
| 118 | + | |
| 119 | + return $this->render('CacicWSBundle:Default:testUpdate.xml.twig', array( | |
| 120 | + 'configs'=> $cacic_helper->getTest( $request ), | |
| 121 | + //'computador' => $computador, | |
| 122 | + 'rede' => $rede, | |
| 123 | + //'debugging' => $debugging, | |
| 124 | + 'ws_folder' => OldCacicHelper::CACIC_WEB_SERVICES_FOLDER_NAME, | |
| 125 | + 'cs_cipher' => $request->get('cs_cipher'), | |
| 126 | + 'cs_compress' => $request->get('cs_compress') | |
| 127 | + ), $response); | |
| 128 | + } | |
| 129 | + | |
| 113 | 130 | #$logger->debug("444444444444444444444444444444444444: $netmask | ".$rede->getNmRede()); |
| 114 | 131 | $computador = $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->getComputadorPreCole( $request, $te_so, $te_node_address, $rede, $so, $ip_computador ); |
| 115 | 132 | //$local = $this->getDoctrine()->getRepository('CacicCommonBundle:Local')->findOneBy(array( 'idLocal' => $rede->getIdLocal() )); |
| ... | ... | @@ -185,7 +202,6 @@ class DefaultController extends Controller |
| 185 | 202 | $ip_computador = $request->get('te_ip_computador'); |
| 186 | 203 | if ( empty($ip_computador) ){ |
| 187 | 204 | $ip_computador = TagValueHelper::getValueFromTags( 'IPAddress', $strNetworkAdapterConfiguration ); |
| 188 | - #$logger->debug("555555555555555555555555555555555555555555: $ip_computador"); | |
| 189 | 205 | } |
| 190 | 206 | if (empty($ip_computador)) { |
| 191 | 207 | $ip_computador = $request->getClientIp(); |
| ... | ... | @@ -202,16 +218,17 @@ class DefaultController extends Controller |
| 202 | 218 | $netmask = $request->get('netmask'); |
| 203 | 219 | } |
| 204 | 220 | |
| 221 | + $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->findOneBy( array('teSo'=>$request->get( 'te_so' ))); | |
| 222 | + | |
| 205 | 223 | /** |
| 206 | 224 | * Se a máscara de subrede ou o mac address estiver vazio, força o redirecionamento para provável atualização |
| 207 | 225 | */ |
| 208 | - if (empty($netmask) || (empty($te_node_address))) { | |
| 209 | - | |
| 210 | - return $this->forward('CacicWSBundle:Default:update', $this->getRequest()->request->all()); | |
| 226 | + if (empty($te_node_address) || empty($so)) { | |
| 227 | + $this->get('logger')->error("Erro na operação de getConfig. IP = $ip_computador Máscara = $netmask. MAC = $te_node_address. SO =" . $request->get( 'te_so' )); | |
| 211 | 228 | |
| 229 | + return $this->forward('CacicWSBundle:Default:update', $this->getRequest()->request->all()); | |
| 212 | 230 | } |
| 213 | 231 | |
| 214 | - $so = $this->getDoctrine()->getRepository('CacicCommonBundle:So')->findOneBy( array('teSo'=>$request->get( 'te_so' ))); | |
| 215 | 232 | $rede = $this->getDoctrine()->getRepository('CacicCommonBundle:Rede')->getDadosRedePreColeta( $ip_computador, $netmask ); |
| 216 | 233 | $computador = $this->getDoctrine()->getRepository('CacicCommonBundle:Computador')->getComputadorPreCole( $request, $request->get( 'te_so' ),$te_node_address, $rede, $so, $ip_computador ); |
| 217 | 234 | //$local = $this->getDoctrine()->getRepository('CacicCommonBundle:Local')->findOneBy(array( 'idLocal' => $rede->getIdLocal() )); | ... | ... |
src/Cacic/WSBundle/Resources/views/Default/testUpdate.xml.twig
0 → 100644
| ... | ... | @@ -0,0 +1,10 @@ |
| 1 | +{% extends 'CacicWSBundle::common.xml.twig' %} | |
| 2 | +{% block bodyXML %} | |
| 3 | + <WebManagerAddress>{{ rede.getTeServCacic() }}</WebManagerAddress> | |
| 4 | + <WebServicesFolderName>{{ ws_folder }}</WebServicesFolderName> | |
| 5 | + <cs_compress>{{ cs_compress }}</cs_compress> | |
| 6 | + <cs_cipher>{{ cs_cipher }}</cs_cipher> | |
| 7 | + <INSTALLCACIC.EXE_HASH>{{ configs['INSTALLCACIC.EXE_HASH'] }}</INSTALLCACIC.EXE_HASH> | |
| 8 | + <MainProgramName>{{ configs.MainProgramName }}</MainProgramName> | |
| 9 | + <LocalFolderName>{{ configs.LocalFolderName }}</LocalFolderName> | |
| 10 | +{% endblock %} | |
| 0 | 11 | \ No newline at end of file | ... | ... |