summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes
Commit message (Collapse)AuthorAgeFilesLines
* #804 Limit legacy SocketHidra key-value splitJavier Sánchez Parra2021-05-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This bug was found by USAL and UPV. They reported that WebConsole was showing scripts incompletely if they contain "=". SocketHidra stores key-value pair as "<key>=<value>" string, and the parser splits the string on "=" characters and pick the first two elements. Thus, if the value also contains "=", the parser splits it and only picks the first part. Note: keys strings never contain "=". With "scp=this=is=a=test" as example BEFORE this commit the parser returns "scp" as key "this" as value AFTER this commit the parser returns "spc" as key "this=is=a=test" as value Limit legacy SocketHidra key-value split to two elements, key and value. This commit also removes script decoding because WebConsole stores them decoded since v1.2.0.
* #995 Show client link speed if availableJose M. Guisado2021-05-101-0/+17
| | | | | | | If the clients API response included speed information, show it in the default room view. In case link speed is less than 1000 Mbit, highlight so.
* #1032 Use create_schedule_now for immediate logged commandsJose M. Guisado2021-03-111-0/+24
| | | | | | | | | | | Avoid stale commands from being executed when given a time schedule that include past dates, ie. when they are manually scheduled. Use create_schedule_now for immediate execution commands (no manual schedule) that the user want to be logged (by automatic scheduling to the right moment they are processed). Fixes #1032 (https://opengnsys.es/trac/ticket/1032#comment:2)
* #990 restfunctions: wol: require clients and wol_type params onlyJose M. Guisado2021-02-152-30/+2
| | | | | | | | | | | | Webconsole is directly querying the database to build the payload for requesting the ogServer a Wake On Lan. ogServer is expected to query the database for the netmask and mac parameters. Do not require the client request to have such parameters. Adjust calls to the wol php method by other OpenGnsys components. Fixes: a35b7c4 ("#990 Use client broadcast address on WoL")
* #1021 remove LOG_INFO syslogJavier Sánchez Parra2021-02-041-2/+0
| | | | | | | Some distros enable *.* in syslog.conf to add all logging information to /var/log/syslog. The existing LOG_INFO syslog() entry that WebConsole generates fill up the log files very quickly. It writes every time WebConsole calls ogServer. Remove the LOG_INFO syslog() call.
* #1008 Restore support for >4 partitionsJavier Sánchez Parra2021-01-121-1/+3
| | | | | | | | | | | | | WebConsole "Partition and Format"/"Particionar y Formatear" supported more than 4 partitions when it used SocketHidra. When we changed it to use HTTP requests we introduced a limit of 4 partitions. This commit: * Restores "Partition and Format" support for more than 4 partitions. * Adapts client-side checks (JavaScript) for more than 4 partitions and GPT.
* #1015 Fix updateBootMode and use it when updating computer infoJose M. Guisado2020-12-171-1/+1
| | | | | | | | | | | | | | | | | | | When a computer info is updated sometimes their related pxe files need to be updated accordingly. In order to recreate the file the function createBootMode was being used inside gestor_ordenadores. Eg: createBootMode ($cmd, $arranque, $ip, $idioma) This had some problems because the POST message to gestor_ordenadores was sometimes lacking the ip field. This field is not necessary because updateBootMode takes the id of the computer and queries the database for the ip of the computer associated with it. Use updateBootMode ($cmd, "idordenador", $idordenador, $idioma) instead. Fixes related mass updater and "moving pc to another classroom" issues.
* #1008 Add support to work with GPT tablesJavier Sánchez Parra2020-11-271-8/+10
| | | | | | | | | | | | | | | | | | WebConsole needs to rely on /shell/run to work with GPT tables. Because "Partition and Format"/"Particionar y Formatear" form always supposes that the partition table is MBR/MSDOS. "Setup"/"Configurar" script from "Cloning Engine" also supposes that the partition table is MBR/MSDOS. But it uses "Boot.lib" library, that can create MBR and GTP partitions. This commit: * Adds WebConsole support to work with GPT tables. - Adds input field where the user can select between MSDOS and GPT table types. * Adds "Setup" support to work with GPT tables. - Adds script parameter that expects a string with "MSDOS" or "GPT".
* #1008 Add support for partitioning several disksJavier Sánchez Parra2020-11-252-8/+12
| | | | | | | WebConsole only supports for partitioning and formatting the first disk of the client. POST /setup calls in ogserver and ogclient support for multiple disks. Update WebConsole to allow to choose which disk do you want to partition and format.
* #988 Read API token from new json configRoberto Hueso Gómez2020-10-061-2/+2
| | | | | This patch reads configuration from the new json file instead of using the legacy '.cfg' file.
* #1001 Remove trailing \r and \n in some scriptsJavier Sánchez Parra2020-08-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | We find that scripts sent by "Assistants"/"Asistentes" are losing the last character and scripts send by "Run Script"/"Ejecutar Script" have a trailing line feed (\n). This is happening because shell() function, which calls "/shell/run" of ogServer REST API, expects scripts send by "Asistentes" and "Run Script" to have two trailing characters and removes them. But "Assistants" only put one trailing char (\r) and "Run Script" put three trailing chars (\n\n\r). To avoid problems when running scripts without the last char or with trailing line feed this patch updates WebConsole to: 1) "Assistants" no longer put one trailing character at the end of the script 2) "Run Script" no longer puts three trailing characters at the end of the script 3) shell() expects no trailing chars in scripts sent by "Assistants" and "Run Script".
* #980 Update POST /mode to the new ogServer APIRoberto Hueso Gómez2020-08-142-7/+7
| | | | | This patch selects the machines whose modes need to be changed using the client's IP rather than their scope names.
* Change GET and POST /modes URI to /modeRoberto Hueso Gómez2020-08-031-2/+2
| | | | This adapts to the ogServer.
* #993 Send REST request in createBootMode(...)Roberto Hueso Gómez2020-07-292-2/+12
| | | | | This patch replaces a call to the 'setclientmode' script in createBootMode() function for a REST request to the ogServer.
* #990 Use client broadcast address on WoLJavier Sánchez Parra2020-07-032-3/+22
| | | | | | | | | | | | | | | | Some universities have computers in a different subnet where the ogServer is, but ogServer WoL functionality only supported to send packet to its own subnets. This commit solves this. Now ogServer sends two WoL packets per client, one with the broadcast address of the interface indicated in the config file, the other with the broadcast address calculated with the address and netmask of the client. To ensure that the second WoL works correctly you must configure correctly the IP and netmask of the clients. Also, you have to configure the network of your organization to route WoL packet to the correct subnet.
* #986 Rename to ogserverJavier Sánchez Parra2020-06-191-1/+1
| | | | Step forward to rename all ogAdmServer references to ogServer
* #942 add immediate commands on the queue (web)Javier Sánchez Parra2020-06-021-0/+18
| | | | | | | | Users can launch immediate commands on the queue to keep an history and to watch the status and the properties. This commit adapt this functionality to new functions and behaviour of the ogAdmServer.
* #942 Fix immediate procedures (web)Javier Sánchez Parra2020-06-021-0/+5
|
* #942 schedule commands (web)Javier Sánchez Parra2020-06-021-5/+21
|
* #942 Add weeks and week_days to the webconsole schedule (web)Javier Sánchez Parra2020-06-021-2/+6
|
* #942 Use both task_id and schedule_id in /schedule/get (web)OpenGnSys Support Team2020-06-021-3/+5
|
* #942 Adapt web to use /schedule get on /schedule/create (web)Roberto Hueso Gómez2020-06-021-0/+11
|
* #942 Implement update schedule (web)Roberto Hueso Gómez2020-06-021-0/+21
|
* #915 Add new case to command shell/run (web)Javier Sánchez Parra2020-06-021-7/+15
| | | | | | | | | | | | | | | I tried to delete a cache image but the character "*" of the command was missing so the command fails. Command received: "rm -r /opt/opengnsys/cache/opt/opengnsys/images/test." Command expected: "rm -r /opt/opengnsys/cache/opt/opengnsys/images/test.*" This command adds a new case to the call shell/run. This new case is needed because in the case of deleting a image from the cache the web only has to delete the last character of the string instead of last two characters.
* #942 Fix run script encoding (web)Roberto Hueso Gómez2020-06-021-1/+2
| | | | Run script commands should not be encoded as an URL.
* #942 add create/delete schedule api to web (web)Javier Sánchez Parra2020-06-021-0/+37
| | | | Web updates for #942 Add support for scheduled tasks and commands
* #942 Add /run/task to API REST (web)OpenGnSys Support Team2020-06-021-0/+7
|
* #974 Fix task edit formJavier Sánchez Parra2020-04-241-1/+1
| | | | | | | | | We have seen that if you try to edit a task and assign it to a group of computers the form do not work. This happens because the string containing the name of primary key of the table gruposordenadores (Groups of computers) has a trailing white space. This commit fixes this bug removing the trailing whitespace.
* Revert "#969 Images tree: lists are used for show tree and context menues."irinagomez2020-03-171-2/+0
| | | | This reverts commit 46eee4148b92d3218dfe47544623018db540a77b.
* #969 Images tree: lists are used for show tree and context menues.Irina Gómez2020-03-161-0/+2
|
* #914: Delete unused variables.Ramón M. Gómez2019-11-251-7/+0
|
* #914 Software inventory command in console improved info message when no ↵Irina Gómez2019-11-201-1/+1
| | | | operating system is detected.
* #914 Login command in console improved info message when no operating ↵Irina Gómez2019-11-141-1/+1
| | | | system is detected.
* #915 Rename POST /image/setup for /setup in REST APIRoberto Hueso Gómez2019-11-131-1/+1
| | | | This patch renames the setup command to avoid semantic confusion.
* #915 Adapt web to use 'echo' parameter of POST /shell/runRoberto Hueso Gómez2019-11-121-2/+8
|
* #915: Remove duplicate parameter definitions in `restfunctions.php`.Ramón M. Gómez2019-10-301-3/+0
|
* #915 Fix run script commandRoberto Hueso Gómez2019-10-301-0/+3
| | | | | This patch fixes run script command as it now uses REST API instead of SocketHidra.
* #915 Remove dead code that uses SocketHidraRoberto Hueso Gómez2019-10-291-79/+0
| | | | This patch removes files that are dead code and that also use SocketHidra.
* #915 Adapt web to use the new run/schedule cmd in REST APIRoberto Hueso Gómez2019-10-251-0/+7
| | | | | | 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.
* #915 Change WebConsole to read API token from ogAdmServer.cfgJavier Sánchez Parra2019-10-141-2/+2
| | | | | | | | | | This commit changes restfunctions.php to read the API token of ogAmdServer from ogAdmRepo.cfg to ogAdmServer.cfg. This way it avoids possible communication errors if ogAdmRepo.cfg and ogAdmServer.cfg are desynced. In order to restfuntions.php can read ogAdmServer.cfg this commit also changes the permissions of the file.
* #915 Fix POST "software" cmd in ogAdmServer and webJavier Sánchez Parra2019-10-111-2/+8
| | | | | | | | | | | | | | | | | | This patch adds the parameters "disk" and "partition" to POST "software" command. This way the client can create a software profile without failure. New request: POST /software { "clients":[ "192.168.56.12" ], "disk":"1", "partition":"1" } Reply: 200 OK
* #915 Adapt web to use new image/restore/incremental cmd in REST APIJavier Sánchez Parra2019-10-111-0/+53
| | | | SocketHidra command has been replaced by POST image/restore/incremental.
* #915 Adapt web to use new REST API "image/create/incremental" commandRoberto Hueso Gómez2019-10-111-0/+48
| | | | SocketHidra command has been replaced by POST "image/create/incremental".
* #915 Adapt web to use new image/restore/basic cmd in REST APIJavier Sánchez Parra2019-10-091-0/+55
| | | | SocketHidra command has been replaced by POST image/restore/basic.
* #915 Adapt web to use new image/create/basic cmd in REST APIJavier Sánchez Parra2019-10-081-1/+55
| | | | SocketHidra command has been replaced by POST image/create/basic.
* Adapt web to use new image/setup cmd in REST APIRoberto Hueso Gómez2019-10-071-0/+53
| | | | SocketHidra configurar has been replaced by POST image/setup.
* #915: adapt web to use OG_REST_PARAM_ID constantJavier Sánchez Parra2019-10-031-1/+1
| | | | | Update restore_image() in restfunctions.php to use OG_REST_PARAM_ID constant.
* #915: Adapt web to use new image/restore cmd in REST APIRoberto Hueso Gómez2019-10-011-0/+26
| | | | SocketHidra restaurar imagen has been replaced by POST image/restore.
* #915: Adapt web to use new image/create cmd in REST APIRoberto Hueso Gómez2019-10-011-0/+29
| | | | SocketHidra crear imagen has been replaced by POST /imagen/create.
* #834: Setting a default value for some PHP variables to avoid warnings.Ramón M. Gómez2019-08-222-4/+8
|