Commit Graph

3627 Commits (a0df5af7248f31bab8a799268e35373936d5911c)
 

Author SHA1 Message Date
Roberto Hueso Gómez a0df5af724 #915 Validate POST /hardware REST API parameters
This patch ensures that all required parameters are sent in the request.
2019-11-06 11:26:33 +01:00
Roberto Hueso Gómez 3402460091 #915 Validate POST /refresh REST API parameters
This patch ensures that all required parameters are sent in the request.
2019-11-06 11:26:15 +01:00
Roberto Hueso Gómez 04a8c17d71 #915 Validate POST /stop REST API parameters
This patch ensures that all required parameters are sent in the request.
2019-11-06 11:26:06 +01:00
Roberto Hueso Gómez d86ddce3f5 #915 Validate POST /reboot REST API parameters
This patch ensures that all required parameters are sent in the request.
2019-11-06 11:25:54 +01:00
Roberto Hueso Gómez 2aad3d9eaf #915 Validate POST /poweroff REST API parameters
This patch ensures that all required parameters are sent in the request.
2019-11-06 11:25:24 +01:00
Roberto Hueso Gómez 66ce511eb4 #915 Validate POST /session REST API parameters
This patch ensures that all required parameters are sent in the request.
2019-11-06 11:24:24 +01:00
Roberto Hueso Gómez 22469c6586 #915 Validate POST /shell/output REST API parameters
This patch ensures that all required parameters are sent in the request.
2019-11-06 11:22:35 +01:00
Roberto Hueso Gómez 3debec6024 #915 Validate POST /shell/run REST API parameters
This patch ensures that all required parameters are sent in the request.
2019-11-06 11:17:19 +01:00
Roberto Hueso Gómez becce94edd #915 Validate POST /wol REST API parameters
This patch ensures that all required parameters are sent in the request.
2019-11-06 11:16:59 +01:00
Roberto Hueso Gómez 70a698a122 #915 Validate POST /clients parameters
This patch adds og_msg_params_validate function as well as some flags that can
be used to validate parameters of a REST API request.

This patch ensures that all required parameters are sent in the request.
2019-11-06 11:16:36 +01:00
Roberto Hueso Gómez d3bed4e91a #915 Fix ogAdmServer POST /software test parameters
This patch adds missing parameters to the test JSON.
2019-11-06 11:16:22 +01:00
Javier Sánchez Parra 78a97c59c8 #924 Always check the result of a command to avoid errors
Irina reports that if you try to restore an image without success
(for example: the disk does not have enough space), the database changes
as if no error would happen. So you see the computer in the WebConsole
with an image/OS that, actually, does not have.

The bug is caused because the function respuestaEstandar only checks
the result of a command if it has a session. So the problem is that the
commands which use respuestaEstandar without a session can return an
error, but the ogAdmServer always works as no error would occur.

This commit changes the behaviour of respuestaEstadar to always check
the result of a command, whether it has a session or not.
2019-11-04 15:09:04 +01:00
Irina Gomez a445889f0e #802 #888 On UEFI computers, OpenGnsys installs grub to boot from the hard drive. You can use the rEFInd template example for computers without SecureBoot. 2019-11-04 13:58:45 +01:00
Roberto Hueso Gómez 082e812e18 #915 Add test for POST /run/schedule REST API
This test covers 3 scenarios:

1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez 1a73af69f0 #915 Add test for POST /image/restore/incremental REST API
This test covers 3 scenarios:

1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez 8303f96054 #915 Add test for POST /image/restore/basic REST API
This test covers 3 scenarios:

1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez fedec037f4 #915 Add test for POST /image/create/incremental REST API
This test covers 3 scenarios:

1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez 7c85f5286b #915 Add test for POST /image/create/basic REST API
This test covers 3 scenarios:

1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez 2293c0e087 #915 Add test for POST /image/setup REST API
This test covers 3 scenarios:

1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez 4c4efc04ad #915 Add test for POST /image/restore REST API
This test covers 3 scenarios:

1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Roberto Hueso Gómez 56b1b048b5 #915 Add test for POST /image/create REST API
This test covers 3 scenarios:

1. Correct usage.
2. Incorrect usage, without payload.
3. Incorrect usage, use this command with GET.
2019-10-31 13:18:48 +01:00
Ramón M. Gómez 7cb1ca81dd #915: Remove duplicate parameter definitions in `restfunctions.php`. 2019-10-30 15:08:01 +01:00
Roberto Hueso Gómez 15243d40c7 #915 Fix run script command
This patch fixes run script command as it now uses REST API instead of
SocketHidra.
2019-10-30 13:22:05 +01:00
Ramón M. Gómez 940b1c7f51 #816 856: Scripts `setserveraddr` and etclientmode` use common Shell function file. 2019-10-29 14:32:47 +01:00
Roberto Hueso Gómez 5cef356b05 #915 Remove all references to SocketHidra
This patch removes all remaining references to SocketHidra. The existing
code uses the REST API ogAdmServer.
2019-10-29 14:22:31 +01:00
Roberto Hueso Gómez 03e3f88eef #915 Remove dead code that uses SocketHidra
This patch removes files that are dead code and that also use SocketHidra.
2019-10-29 14:22:26 +01:00
Roberto Hueso Gómez e21eb0caeb #915 Remove dead function EjecutandoTareas() from gestor_tareas.php
There are no cases in which gestor_tareas.php is called with $op_ejecucion as
an option. Remove this function.
2019-10-29 14:22:23 +01:00
Roberto Hueso Gómez 37f3de613f #915 Adapt gestor_Comandos.php to use the REST API
This patch removes the possibility of commands being executed using SocketHidra
and replaces it by the calls to the REST API.

It also prevents commands from being executed when they are intended to be added
to a task or scheduled.
2019-10-29 14:22:20 +01:00
Roberto Hueso Gómez 207a74b032 #915 Use og_cmd_legacy_send in og_cmd_run_schedule for ogAdmServer
This patch simplifies the og_cmd_run_schedule function by calling
og_cmd_legacy_send.
2019-10-29 14:22:08 +01:00
Irina Gomez d0bf22a973 #802 #890 ogGrubInstallMbr: Adds NVRAM entry for grub and place it in second order. 2019-10-29 14:06:31 +01:00
Ramón M. Gómez 25bb3d131a #816: Define a new shell parameter to know if client is defined as a teaching computer. 2019-10-29 13:18:38 +01:00
Ramón M. Gómez e020339b6e #856: Fix bug when updating repository IP address. 2019-10-29 10:47:49 +01:00
Irina Gomez 138234ea83 #804 Restore image and partition command: Fix the error when ungroup computers is selected. 2019-10-28 12:38:25 +01:00
Irina Gomez bbef39bea6 #909 updateCache: Fixs log message for multicast. 2019-10-28 11:46:49 +01:00
Roberto Hueso Gómez 1d380e58d0 #915 Adapt web to use the new run/schedule cmd in REST API
This patch implements run/schedule in the set of available PHP functions.
It also replaces old SocketHidra commands by run/schedule in
gestor_colasacciones.php and gestor_ejecutaracciones.php.
2019-10-25 14:12:37 +02:00
Roberto Hueso Gómez 3ca392fce3 #915 Add POST "run/schedule" command to REST API in ogAdmServer
This patch implements the command "run/schedule" that kicks in pending commands
execution.

Request:

    POST /run/schedule
    {
        "clients": ["192.168.56.11"]
    }

Reply:
    200 OK

This patch also adds a simple test to cover correction of the command.
2019-10-25 14:12:09 +02:00
OpenGnSys Support Team 32abc01e23 #915 Add EjecutaComandosPendientes for ogAdmClient
This new command kicks in pending commands execution. This simplies
the update of the web console significantly.
2019-10-25 14:11:11 +02:00
Roberto Hueso Gómez dba299f694 #915 Fix end date for gestor_colasacciones.php
This patch fixes an SQL query bug when trying to upate the end date in the
'acciones' table. The value of 'fechahorafin' cannot be NULL according to the
table definition.

This bug was introduced in 3ec149cb1 so it has been broken for 9 years.
2019-10-25 14:09:39 +02:00
Ramón M. Gómez 90da353673 #839: Drop database event when remote access reservation is finished. 2019-10-24 14:03:43 +02:00
Ramón M. Gómez 31eaff2578 #839: Avoid error code 500 when redirecting a logout operation to the remote access server (UDS). 2019-10-24 13:56:56 +02:00
Ramón M. Gómez 3dc405380a #915: Remove REST function `sendCommand` obsoleted by the ogAdmServer REST API. 2019-10-23 18:50:01 +02:00
Ramón M. Gómez d7a763b5cd #915: Adapt RemotePC reservation function to the new ogAdmServer REST API. 2019-10-23 18:46:19 +02:00
Ramón M. Gómez dbb1b6ccc4 #915: REST function to get client status uses new ogAdmServer REST API. 2019-10-23 16:43:13 +02:00
Irina Gomez a0a2149b8e #909 updateCache: Fixs log message for multicast. 2019-10-22 14:31:12 +02:00
Irina Gomez d661fb52ae #802 #888 PXE templates support EFI partition in whichever partition. Example template for boot with grub. 2019-10-22 10:44:02 +02:00
Ramón M. Gómez 71b7511ae8 #915: Update the database for Wizards to use the REST API. 2019-10-21 13:54:10 +02:00
Irina Gomez dd890f1f39 #802 #890 Linux boot: PXE and rEFInd use grubx64.efi (it's copied as ogloader.efi). NVRAM, bootOs and start operating system from console use shimx64.efi.signed. 2019-10-21 13:38:19 +02:00
Roberto Hueso Gómez 86795cf27c #915 Remove asistentes SocketHidra 'gestor_Comandos.php'
This patch removes asistentes gestor_Comandos.php. Asistentes now uses
the REST API.
2019-10-21 12:10:31 +02:00
Irina Gomez e0e045dac4 #802 deploy wizard: fix undefined variable. asistentes_idioma.js is linked. 2019-10-18 13:28:35 +02:00
Irina Gomez 8b9b6ecbee #802 #890 Fixed error in ogRefindInstall: boots linux correctly and shows a menu entry for ogLive when secure boot is inactive. 2019-10-18 11:42:03 +02:00