diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2019-05-30 15:47:52 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-05-30 17:17:39 +0200 |
commit | c9cfd44a967e6be22f07ce3622cf261e51590705 (patch) | |
tree | 2ee71e18f7ea832ddf6cb9f8b9a1e334eb01cb55 /admin/WebConsole/principal | |
parent | dc827546044e8df83adc0bb10536c2f85d6039f3 (diff) |
#915 adapt web console to use new refresh command in REST API
SocketHidra "actualizar" has been replaced by POST /refresh.
Diffstat (limited to 'admin/WebConsole/principal')
-rw-r--r-- | admin/WebConsole/principal/actualizar.php | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/admin/WebConsole/principal/actualizar.php b/admin/WebConsole/principal/actualizar.php index 63f2d1b3..500b0b89 100644 --- a/admin/WebConsole/principal/actualizar.php +++ b/admin/WebConsole/principal/actualizar.php @@ -15,6 +15,7 @@ include_once("../includes/comunes.php"); include_once("../includes/CreaComando.php"); include_once("../includes/RecopilaIpesMacs.php"); + include_once('../includes/restfunctions.php'); //________________________________________________________________________________________________________ $ambito=0; $idambito=0; @@ -41,23 +42,5 @@ //________________________________________________________________________________________________________ // Envio al servidor de la petición //________________________________________________________________________________________________________ - $trama=""; - $shidra=new SockHidra($servidorhidra,$hidraport); - if ($shidra->conectar()){ // Se ha establecido la conexión con el servidor hidra - $parametros="nfn=".$funcion.chr(13); - $parametros.=$aplicacion; - $parametros.=$atributos; - $parametros.=$acciones; - $shidra->envia_comando($parametros); - $trama=$shidra->recibe_respuesta(); - $shidra->desconectar(); - $hlonprm=hexdec(substr($trama,$LONCABECERA,$LONHEXPRM)); - $parametros=substr($trama,$LONCABECERA+$LONHEXPRM,$hlonprm); - $ValorParametros=extrae_parametros($parametros,chr(13),'='); - $trama_notificacion=$ValorParametros["res"]; - echo $trama_notificacion; // Devuelve respuesta - } - else - echo "0"; // Error de conexión - + echo refresh($cadenaip) === 0 ? "0" : "1"; |