From 12eca2dbd4329c3ad6deb29eeb5c174328412dde Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 16 Feb 2024 09:14:34 +0100 Subject: [PATCH] #12350 added agent name editing 3 --- pandora_console/godmode/agentes/agent_manager.php | 5 +++-- pandora_console/include/constants.php | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 3afd44477a..12807e144c 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -378,8 +378,9 @@ if ($new_agent === false) { ); // Other than Linux, Solaris, AIX, BSD, HPUX, MacOs, and Windows. - if ($id_os !== '1' && $id_os !== '2' && $id_os !== '3' && $id_os !== '4' - && $id_os !== '5' && $id_os !== '7' && $id_os !== '8' + if ($id_os !== LINUX && $id_os !== SOLARIS && $id_os !== AIX + && $id_os !== BSD && $id_os !== HPUX && $id_os !== MACOS + && $id_os !== WINDOWS ) { $tableAgent->data['name'][0] .= html_print_anchor( [ diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index d68bba9c22..721712c4cf 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -907,3 +907,13 @@ define('DEMO_SERVICE', 6); define('DEMO_DASHBOARD', 7); define('DEMO_VISUAL_CONSOLE', 8); define('DEMO_PLUGIN', 9); + +// OS. +define('LINUX', '1'); +define('SOLARIS', '2'); +define('AIX', '3'); +define('BSD', '4'); +define('HPUX', '5'); +define('CISCO', '7'); +define('MACOS', '8'); +define('WINDOWS', '9');