- VERSION 5.08.31

- Se corrigio que no avisaba cuando el query no requeria parametros y si se enviaban (en el JSONHandler)
This commit is contained in:
2025-08-30 21:09:28 -06:00
parent 986eb5e8d4
commit cacf9e7b89
5 changed files with 24 additions and 8 deletions

View File

@@ -16,13 +16,14 @@ End Sub
Sub Handle(req As ServletRequest, resp As ServletResponse)
Dim Command As String = req.GetParameter("command")
If Command = "" Then Command = "ping"
Log($"Command: ${Command}"$)
resp.ContentType = "text/html"
If Command = "reload" Then 'Reload config.properties
' rdcc.Initialize
Private estaDB As String = ""
' Log(Main.listaDeCP)
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <br/>"$)
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
For i = 0 To Main.listaDeCP.Size - 1
Main.Connectors.Get(Main.listaDeCP.get(i)).As(RDCConnector).Initialize(Main.listaDeCP.get(i))
If Main.listaDeCP.get(i) <> "DB1" Then estaDB = "." & Main.listaDeCP.get(i) Else estaDB = ""
@@ -42,7 +43,7 @@ Sub Handle(req As ServletRequest, resp As ServletResponse)
' shl.WorkingDirectory = GlobalParameters.WorkingDirectory
' shl.Run(-1)
else If Command = "rsx" Then 'Reiniciamos el servidor DBReq
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <br/>"$)
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
Log($"Ejecutamos ${File.DirApp}\start.bat"$)
resp.Write($"Ejecutamos ${File.DirApp}\start.bat"$)
Public shl As Shell
@@ -50,13 +51,22 @@ Sub Handle(req As ServletRequest, resp As ServletResponse)
shl.WorkingDirectory = File.DirApp
shl.Run(-1)
else If Command = "rpm2" Then 'Reiniciamos el proceso DBReq en PM2
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <br/>"$)
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
Log($"Ejecutamos ${File.DirApp}\reiniciaProcesoPM2.bat"$)
resp.Write($"Ejecutamos ${File.DirApp}\reiniciaProcesoPM2.bat"$)
Public shl As Shell
shl.Initialize("shl","cmd",Array("/c",File.DirApp & "\reiniciaProcesoPM2.bat " & Main.srvr.Port))
shl.WorkingDirectory = File.DirApp
shl.Run(-1)
else If Command = "reviveBow" Then 'Reiniciamos el proceso DBReq en PM2
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
Log($"Ejecutamos ${File.DirApp}\reiniciaProcesoBow.bat"$)
resp.Write($"Ejecutamos ${File.DirApp}\reiniciaProcesoBow.bat<br><br>"$)
resp.Write($"!!!BOW REINICIANDO!!!"$)
Public shl As Shell
shl.Initialize("shl","cmd",Array("/c",File.DirApp & "\reiniciaProcesoBow.bat " & Main.srvr.Port))
shl.WorkingDirectory = File.DirApp
shl.Run(-1)
else If Command = "paused" Then
GlobalParameters.IsPaused = 1
else If Command = "continue" Then
@@ -124,6 +134,9 @@ Sub Handle(req As ServletRequest, resp As ServletResponse)
j.ToString
resp.Write(j.ToString)
End If
else if Command = "ping" Then
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
resp.Write($"Pong"$)
End If
If GlobalParameters.mpLogs.IsInitialized Then GlobalParameters.mpLogs.Put(Command, "Manager : " & Command & " - Time : " & DateTime.Time(DateTime.Now))
End Sub