summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2019-10-25 12:01:10 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-10-25 14:12:37 +0200
commit1d380e58d00ef55648fd10fedc3a1f72eff55ed6 (patch)
treefb7dea8a3f40374b5ab52c6c76a27e9d68009400 /admin/WebConsole/includes
parent3ca392fce34206ce2d8f82bd23c53664c57c9e46 (diff)
#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.
Diffstat (limited to 'admin/WebConsole/includes')
-rw-r--r--admin/WebConsole/includes/restfunctions.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index fe331153..f73b1fe0 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -25,6 +25,7 @@ define('OG_REST_CMD_CREATE_BASIC_IMAGE', 'image/create/basic');
define('OG_REST_CMD_CREATE_INCREMENTAL_IMAGE', 'image/create/incremental');
define('OG_REST_CMD_RESTORE_BASIC_IMAGE', 'image/restore/basic');
define('OG_REST_CMD_RESTORE_INCREMENTAL_IMAGE', 'image/restore/incremental');
+define('OG_REST_CMD_RUN_SCHEDULE', 'run/schedule');
define('OG_REST_PARAM_CLIENTS', 'clients');
define('OG_REST_PARAM_ADDR', 'addr');
@@ -531,6 +532,12 @@ function setup($string_ips, $params) {
common_request(OG_REST_CMD_SETUP, POST, $data);
}
+function run_schedule($string_ips) {
+ $ips = explode(';',$string_ips);
+ $data = array(OG_REST_PARAM_CLIENTS => $ips);
+ common_request(OG_REST_CMD_RUN_SCHEDULE, POST, $data);
+}
+
/*
* @function multiRequest.
* @param URLs array (may include header and POST data), cURL options array.