This commit is contained in:
José González 2022-09-23 12:54:51 +02:00
parent 2a63f19d38
commit 09c6c5a0f9
1 changed files with 11 additions and 1 deletions

View File

@ -899,6 +899,7 @@ $order = null;
switch ($sortField) { switch ($sortField) {
case 'agent_alias': case 'agent_alias':
$fieldForSorting = 'alias';
switch ($sort) { switch ($sort) {
case 'up': case 'up':
$selectAgentNameUp = $selected; $selectAgentNameUp = $selected;
@ -919,6 +920,7 @@ switch ($sortField) {
break; break;
case 'type': case 'type':
$fieldForSorting = 'id_tipo_modulo';
switch ($sort) { switch ($sort) {
case 'up': case 'up':
$selectDataTypeUp = $selected; $selectDataTypeUp = $selected;
@ -939,6 +941,7 @@ switch ($sortField) {
break; break;
case 'moduletype': case 'moduletype':
$fieldForSorting = 'id_modulo';
switch ($sort) { switch ($sort) {
case 'up': case 'up':
$selectTypeUp = $selected; $selectTypeUp = $selected;
@ -959,6 +962,7 @@ switch ($sortField) {
break; break;
case 'module_name': case 'module_name':
$fieldForSorting = 'nombre';
switch ($sort) { switch ($sort) {
case 'up': case 'up':
$selectModuleNameUp = $selected; $selectModuleNameUp = $selected;
@ -979,6 +983,7 @@ switch ($sortField) {
break; break;
case 'interval': case 'interval':
$fieldForSorting = 'module_interval';
switch ($sort) { switch ($sort) {
case 'up': case 'up':
$selectIntervalUp = $selected; $selectIntervalUp = $selected;
@ -999,6 +1004,7 @@ switch ($sortField) {
break; break;
case 'status': case 'status':
$fieldForSorting = 'estado';
switch ($sort) { switch ($sort) {
case 'up': case 'up':
$selectStatusUp = $selected; $selectStatusUp = $selected;
@ -1019,6 +1025,7 @@ switch ($sortField) {
break; break;
case 'last_status_change': case 'last_status_change':
$fieldForSorting = 'last_status_change';
switch ($sort) { switch ($sort) {
case 'up': case 'up':
$selectStatusUp = $selected; $selectStatusUp = $selected;
@ -1039,6 +1046,7 @@ switch ($sortField) {
break; break;
case 'timestamp': case 'timestamp':
$fieldForSorting = 'utimestamp';
switch ($sort) { switch ($sort) {
case 'up': case 'up':
$selectTimestampUp = $selected; $selectTimestampUp = $selected;
@ -1059,6 +1067,7 @@ switch ($sortField) {
break; break;
case 'data': case 'data':
$fieldForSorting = 'datos';
switch ($sort) { switch ($sort) {
case 'up': case 'up':
$selectDataUp = $selected; $selectDataUp = $selected;
@ -1079,6 +1088,7 @@ switch ($sortField) {
break; break;
default: default:
$fieldForSorting = 'alias';
$selectAgentNameUp = $selected; $selectAgentNameUp = $selected;
$selectAgentNameDown = false; $selectAgentNameDown = false;
$selectDataTypeUp = false; $selectDataTypeUp = false;
@ -1216,7 +1226,7 @@ if ($autosearch) {
$result = array_merge($result, $result_server); $result = array_merge($result, $result_server);
} }
usort($result, arrayOutputSorting($sort, $sortField)); usort($result, arrayOutputSorting($sort, $fieldForSorting));
metaconsole_restore_db(); metaconsole_restore_db();
} }