summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes/restfunctions.php
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2019-06-28 12:17:14 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-07-03 02:56:07 +0200
commitdb537e76582d86856f3eb080287aeb324338e52f (patch)
treecc87d83699052ce06820d1483b5a0983cd0f3426 /admin/WebConsole/includes/restfunctions.php
parenta0f41fca6e0f505e2bc21d8868629fecc363d0fa (diff)
#915 adapt web to use new hardware cmd in REST API
SocketHidra hardware (inventario hardware) has been replaced by POST /hardware.
Diffstat (limited to 'admin/WebConsole/includes/restfunctions.php')
-rw-r--r--admin/WebConsole/includes/restfunctions.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index b24a3353..6e761468 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -15,6 +15,7 @@ define('OG_REST_CMD_POWEROFF', 'poweroff');
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_PARAM_CLIENTS', 'clients');
define('OG_REST_PARAM_ADDR', 'addr');
@@ -183,6 +184,15 @@ function refresh($string_ips) {
common_request(OG_REST_CMD_REFRESH, POST, $data);
}
+function hardware($string_ips) {
+
+ $ips = explode(';',$string_ips);
+
+ $data = array(OG_REST_PARAM_CLIENTS => $ips);
+
+ common_request(OG_REST_CMD_HARDWARE, POST, $data);
+}
+
/*
* @function multiRequest.
* @param URLs array (may include header and POST data), cURL options array.