From 09c6c5a0f90a370adfdfaf5ee40ae3833f83c876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Fri, 23 Sep 2022 12:54:51 +0200 Subject: [PATCH] Fix --- pandora_console/operation/agentes/status_monitor.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index bff5c006f3..0d810f3edb 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -899,6 +899,7 @@ $order = null; switch ($sortField) { case 'agent_alias': + $fieldForSorting = 'alias'; switch ($sort) { case 'up': $selectAgentNameUp = $selected; @@ -919,6 +920,7 @@ switch ($sortField) { break; case 'type': + $fieldForSorting = 'id_tipo_modulo'; switch ($sort) { case 'up': $selectDataTypeUp = $selected; @@ -939,6 +941,7 @@ switch ($sortField) { break; case 'moduletype': + $fieldForSorting = 'id_modulo'; switch ($sort) { case 'up': $selectTypeUp = $selected; @@ -959,6 +962,7 @@ switch ($sortField) { break; case 'module_name': + $fieldForSorting = 'nombre'; switch ($sort) { case 'up': $selectModuleNameUp = $selected; @@ -979,6 +983,7 @@ switch ($sortField) { break; case 'interval': + $fieldForSorting = 'module_interval'; switch ($sort) { case 'up': $selectIntervalUp = $selected; @@ -999,6 +1004,7 @@ switch ($sortField) { break; case 'status': + $fieldForSorting = 'estado'; switch ($sort) { case 'up': $selectStatusUp = $selected; @@ -1019,6 +1025,7 @@ switch ($sortField) { break; case 'last_status_change': + $fieldForSorting = 'last_status_change'; switch ($sort) { case 'up': $selectStatusUp = $selected; @@ -1039,6 +1046,7 @@ switch ($sortField) { break; case 'timestamp': + $fieldForSorting = 'utimestamp'; switch ($sort) { case 'up': $selectTimestampUp = $selected; @@ -1059,6 +1067,7 @@ switch ($sortField) { break; case 'data': + $fieldForSorting = 'datos'; switch ($sort) { case 'up': $selectDataUp = $selected; @@ -1079,6 +1088,7 @@ switch ($sortField) { break; default: + $fieldForSorting = 'alias'; $selectAgentNameUp = $selected; $selectAgentNameDown = false; $selectDataTypeUp = false; @@ -1216,7 +1226,7 @@ if ($autosearch) { $result = array_merge($result, $result_server); } - usort($result, arrayOutputSorting($sort, $sortField)); + usort($result, arrayOutputSorting($sort, $fieldForSorting)); metaconsole_restore_db(); }