diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2019-06-28 12:21:22 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-07-03 02:56:07 +0200 |
commit | 96cced97a86da63591e6a72ffb5a0b0785119e87 (patch) | |
tree | f128fd6419a05f07f52e2086d5a894e38c1f1dc8 /admin/WebConsole/includes | |
parent | db537e76582d86856f3eb080287aeb324338e52f (diff) |
#915 adapt web to use new software cmd in REST API
SocketHidra software (inventario software) has been replaced by
POST /software.
Diffstat (limited to 'admin/WebConsole/includes')
-rw-r--r-- | admin/WebConsole/includes/restfunctions.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php index 6e761468..159eab48 100644 --- a/admin/WebConsole/includes/restfunctions.php +++ b/admin/WebConsole/includes/restfunctions.php @@ -16,6 +16,7 @@ define('OG_REST_CMD_REBOOT', 'reboot'); define('OG_REST_CMD_STOP', 'stop'); define('OG_REST_CMD_REFRESH', 'refresh'); define('OG_REST_CMD_HARDWARE', 'hardware'); +define('OG_REST_CMD_SOFTWARE', 'software'); define('OG_REST_PARAM_CLIENTS', 'clients'); define('OG_REST_PARAM_ADDR', 'addr'); @@ -193,6 +194,15 @@ function hardware($string_ips) { common_request(OG_REST_CMD_HARDWARE, POST, $data); } +function software($string_ips) { + + $ips = explode(';',$string_ips); + + $data = array(OG_REST_PARAM_CLIENTS => $ips); + + common_request(OG_REST_CMD_SOFTWARE, POST, $data); +} + /* * @function multiRequest. * @param URLs array (may include header and POST data), cURL options array. |