diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index d165592662..74e0af2009 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.770-230328 +Version: 7.0NG.770-230329 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index ca1b28074c..b811cd3723 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.770-230328" +pandora_version="7.0NG.770-230329" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 198ce93a98..dab99b4711 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1023,7 +1023,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.770'; -use constant AGENT_BUILD => '230328'; +use constant AGENT_BUILD => '230329'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index f7a6557826..df2f094194 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.770 -%define release 230328 +%define release 230329 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 8463d27509..06fe72b342 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.770 -%define release 230328 +%define release 230329 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 17bd442365..fbcef5e8ad 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.770" -PI_BUILD="230328" +PI_BUILD="230329" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 91d152f1ca..30df9148e5 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230328} +{230329} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index dc40c0314b..3b69dd0af1 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.770 Build 230328") +#define PANDORA_VERSION ("7.0NG.770 Build 230329") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 934cd7e37e..9786f5bb3a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.770(Build 230328))" + VALUE "ProductVersion", "(7.0NG.770(Build 230329))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index d30c602a99..2035eda646 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.770-230328 +Version: 7.0NG.770-230329 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index dcda7cf218..884edecb5b 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.770-230328" +pandora_version="7.0NG.770-230329" package_pear=0 package_pandora=1 diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index d3467b846c..5bf3d18ab5 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -729,16 +729,31 @@ function mainAgentsModules() if (isset($modules_selected[0]) === true && $modules_selected[0]) { $all_modules = []; foreach ($modules_selected as $key => $value) { - $name = modules_get_agentmodule_name($value); - $sql = "SELECT id_agente_modulo - FROM tagente_modulo - WHERE nombre = '".$name."';"; + if (is_int($value)) { + $name = modules_get_agentmodule_name($value); + $sql = "SELECT id_agente_modulo + FROM tagente_modulo + WHERE nombre = '".$name."';"; - $result_sql = db_get_all_rows_sql($sql); + $result_sql = db_get_all_rows_sql($sql); - if (is_array($result_sql)) { - foreach ($result_sql as $key => $value) { - $all_modules[$value['id_agente_modulo']] = io_safe_output($name); + if (is_array($result_sql)) { + foreach ($result_sql as $key => $value) { + $all_modules[$value['id_agente_modulo']] = io_safe_output($name); + } + } + } else { + $name = $value; + $sql = "SELECT id_agente_modulo + FROM tagente_modulo + WHERE nombre = '".$name."';"; + + $result_sql = db_get_all_rows_sql($sql); + + if (is_array($result_sql)) { + foreach ($result_sql as $key => $value) { + $all_modules[$value['id_agente_modulo']] = io_safe_output($name); + } } } } @@ -838,7 +853,7 @@ function mainAgentsModules() echo ''; - echo "".__('Agents').' / '.__('Modules').''; + echo "".__('Agents').' / '.__('Modules').''; if ($hor_offset > 0) { $new_hor_offset = ($hor_offset - $block); @@ -958,7 +973,7 @@ function mainAgentsModules() foreach ($module['id'] as $module_id) { if (!$match && array_key_exists($module_id, $agent_modules)) { - echo ""; + echo ""; $win_handle = dechex(crc32($module_id.$module['name'])); $graph_type = return_graphtype(modules_get_agentmodule_type($module_id)); $link = "winopeng_var('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module_id.'&'.'refresh='.SECONDS_10MINUTES."', 'day_".$win_handle."', 800, 480)"; diff --git a/pandora_console/extras/mr/62.sql b/pandora_console/extras/mr/62.sql index eaef394fcc..de8ff4c9d2 100644 --- a/pandora_console/extras/mr/62.sql +++ b/pandora_console/extras/mr/62.sql @@ -1,5 +1,19 @@ START TRANSACTION; +CREATE TABLE IF NOT EXISTS `tconsole` ( + `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_console` BIGINT NOT NULL DEFAULT 0, + `description` TEXT, + `version` TINYTEXT, + `last_execution` INT UNSIGNED NOT NULL DEFAULT 0, + `console_type` TINYINT NOT NULL DEFAULT 0, + `timezone` TINYTEXT, + `public_url` TEXT, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +ALTER TABLE `tuser_task_scheduled` ADD COLUMN `id_console` BIGINT NOT NULL DEFAULT 0; + ALTER TABLE `tdatabase` ADD COLUMN `ssh_status` TINYINT UNSIGNED DEFAULT 0; ALTER TABLE `tdatabase` ADD COLUMN `db_status` TINYINT UNSIGNED DEFAULT 0; ALTER TABLE `tdatabase` ADD COLUMN `replication_status` TINYINT UNSIGNED DEFAULT 0; diff --git a/pandora_console/godmode/consoles/consoles.php b/pandora_console/godmode/consoles/consoles.php new file mode 100644 index 0000000000..02bbe981aa --- /dev/null +++ b/pandora_console/godmode/consoles/consoles.php @@ -0,0 +1,69 @@ + $ajax_url, + 'message' => $message, + ] +); diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index e7408759a0..20a977f7fe 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -308,6 +308,13 @@ if ($access_console_node === true) { $sub['godmode/servers/modificar_server']['id'] = 'Manage_servers'; } + if ((bool) check_acl($config['id_user'], 0, 'PM') === true + || is_user_admin($config['id_user']) === true + ) { + $sub['godmode/consoles/consoles']['text'] = __('Manage consoles'); + $sub['godmode/consoles/consoles']['id'] = 'Manage consoles'; + } + // This subtabs are only for Pandora Admin. if ((bool) check_acl($config['id_user'], 0, 'PM') === true) { enterprise_hook('ha_cluster'); diff --git a/pandora_console/include/ajax/consoles.ajax.php b/pandora_console/include/ajax/consoles.ajax.php new file mode 100644 index 0000000000..bb20320c75 --- /dev/null +++ b/pandora_console/include/ajax/consoles.ajax.php @@ -0,0 +1,96 @@ + $data, + 'recordsTotal' => $count, + 'recordsFiltered' => $count, + ] + ); + + return; +} + +if ($delete === true) { + $id = get_parameter('id'); + + try { + $console = new Console($id); + $console->delete(); + $console->save(); + echo json_encode(['result' => __('Console successfully deleted')]); + } catch (Exception $e) { + echo json_encode(['result' => $e->getMessage()]); + } + + return; +} diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index fd138f7fbe..ed7b095f55 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -393,6 +393,10 @@ function process_user_login_remote($login, $pass, $api=false) $user_info['metaconsole_access_node'] = $config['ldap_adv_user_node']; } + if (isset($config['timezonevisual']) === true) { + $user_info['timezone'] = $config['timezonevisual']; + } + $permissions = fill_permissions_ldap($sr); if (empty($permissions) === true) { $config['auth_error'] = __('User not found in database or incorrect password'); diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 191fb8e151..bd150fc852 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230328'; +$build_version = 'PC230329'; $pandora_version = 'v7.0NG.770'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 9c10d5b8ba..505c160411 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -579,6 +579,10 @@ function config_update_config() $error_update[] = __('Automatically assigned no hierarchy'); } + if (config_update_value('timezonevisual', (string) get_parameter('timezonevisual'), true) === false) { + $error_update[] = __('Automatically timezone visual'); + } + if (config_update_value('autocreate_blacklist', get_parameter('autocreate_blacklist'), true) === false) { $error_update[] = __('Autocreate blacklist'); } diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 6363958e09..8afc257399 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -4387,12 +4387,53 @@ function events_page_details($event, $server_id=0) $data = []; $data[0] = '
'.__('Last contact').'
'; - $data[1] = ($agent['ultimo_contacto'] == '1970-01-01 00:00:00') ? ''.__('N/A').'' : ui_print_timestamp($agent['ultimo_contacto'], true); + + $user_timezone = users_get_user_by_id($_SESSION['id_usuario'])['timezone']; + if (!$user_timezone) { + $timezone = timezone_open(date_default_timezone_get()); + $datetime_eur = date_create('now', timezone_open($config['timezone'])); + $dif = timezone_offset_get($timezone, $datetime_eur); + date($config['date_format'], $dif); + if (!date('I')) { + // For summer -3600sec. + $dif -= 3600; + } + + $total_sec = strtotime($agent['ultimo_contacto']); + $total_sec += $dif; + $last_contact = date($config['date_format'], $total_sec); + $last_contact_value = ui_print_timestamp($last_contact, true); + } else { + $user_timezone = users_get_user_by_id($_SESSION['id_usuario'])['timezone']; + date_default_timezone_set($user_timezone); + + $last_contact_value = human_time_comparation(strtotime($agent['ultimo_contacto']), 'large'); + } + + $data[1] = ($agent['ultimo_contacto'] == '1970-01-01 00:00:00') ? ''.__('N/A').'' : $last_contact_value; $table_details->data[] = $data; + $user_timezone = users_get_user_by_id($_SESSION['id_usuario'])['timezone']; + if (!$user_timezone) { + $timezone = timezone_open(date_default_timezone_get()); + $datetime_eur = date_create('now', timezone_open($config['timezone'])); + $dif = timezone_offset_get($timezone, $datetime_eur); + date($config['date_format'], $dif); + if (!date('I')) { + // For summer -3600sec. + $dif -= 3600; + } + + $total_sec = strtotime($agent['ultimo_contacto_remoto']); + $total_sec += $dif; + $lr_contact = date($config['date_format'], $total_sec); + } else { + $lr_contact = date($config['date_format'], strtotime($agent['ultimo_contacto_remoto'])); + } + $data = []; $data[0] = '
'.__('Last remote contact').'
'; - $data[1] = ($agent['ultimo_contacto_remoto'] == '1970-01-01 00:00:00') ? ''.__('N/A').'' : date_w_fixed_tz($agent['ultimo_contacto_remoto']); + $data[1] = ($agent['ultimo_contacto_remoto'] == '1970-01-01 00:00:00') ? ''.__('N/A').'' : $lr_contact; $table_details->data[] = $data; $data = []; @@ -4879,6 +4920,13 @@ function events_page_general($event) $data[1] .= __('Last event').': '; $data[1] .= date($config['date_format'], $event['timestamp_last']); } else { + $user_timezone = users_get_user_by_id($_SESSION['id_usuario'])['timezone']; + if ($user_timezone) { + date_default_timezone_set($user_timezone); + } else { + date_default_timezone_set($config['timezone']); + } + $data[1] = date($config['date_format'], $event['utimestamp']); } diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index 66f60967c7..1e5297dbff 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -751,7 +751,7 @@ function filemanager_file_explorer( && ($readOnly === false) ) { $data[4] .= '
'; - $data[4] .= ''; + $data[4] .= ''; $data[4] .= html_print_input_hidden('filename', $fileinfo['realpath'], true); $data[4] .= html_print_input_hidden('hash', md5($fileinfo['realpath'].$config['server_unique_identifier']), true); $data[4] .= html_print_input_hidden('delete_file', 1, true); diff --git a/pandora_console/include/lib/Console.php b/pandora_console/include/lib/Console.php new file mode 100644 index 0000000000..e6e8d25d57 --- /dev/null +++ b/pandora_console/include/lib/Console.php @@ -0,0 +1,138 @@ + $id]; + + $this->existsInDB = false; + + if (is_numeric($id) === true + && $id > 0 + ) { + parent::__construct( + $table, + $filter, + null, + false + ); + $this->existsInDB = true; + } else { + // Create empty skel. + parent::__construct($table, null); + } + } + + + /** + * Saves current definition of a Console to database. + * + * @return mixed Affected rows of false in case of error. + * @throws \Exception On error. + */ + public function save() + { + if ($this->fields['id'] > 0) { + // Update. + $updates = $this->fields; + + $rs = \db_process_sql_update( + $this->table, + $updates, + ['id' => $this->fields['id']] + ); + + if ($rs === false) { + global $config; + throw new \Exception( + __METHOD__.' error: '.$config['dbconnection']->error + ); + } + } else { + // Creation. + $inserts = $this->fields; + + // Clean null fields. + foreach ($inserts as $k => $v) { + if ($v === null) { + unset($inserts[$k]); + } + } + + $rs = \db_process_sql_insert( + $this->table, + $inserts + ); + + if ($rs === false) { + global $config; + throw new \Exception( + __METHOD__.' error: '.$config['dbconnection']->error + ); + } + + $this->fields['id'] = $rs; + } + + return true; + } + + + /** + * Remove this Console. + * + * @return void + */ + public function delete() + { + if ($this->existsInDB === true) { + \db_process_delete_temp( + $this->table, + 'id', + $this->fields['id'] + ); + } + } +} diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 063e1960d1..805a758100 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -5885,7 +5885,12 @@ div.switch_radio_button label:last-of-type { cursor: pointer; } -.switch_radio_button input:checked + label, +.switch_radio_button input:checked + label { + background-color: var(--primary-color); + box-shadow: none; + color: var(--secondary-color) !important; +} + .switch_radio_button input:checked:has(.custom_checkbox) { background-color: var(--primary-color); box-shadow: none; diff --git a/pandora_console/install.php b/pandora_console/install.php index cba1fee177..1ae3824e7a 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -131,7 +131,7 @@
ack_utimestamp) === true) ? 0 : $tmp->ack_utimestamp, true ); - $tmp->timestamp = ui_print_timestamp( - $tmp->utimestamp, - true - ); + + $user_timezone = users_get_user_by_id($_SESSION['id_usuario'])['timezone']; + if (!$user_timezone) { + $timezone = timezone_open(date_default_timezone_get()); + $datetime_eur = date_create('now', timezone_open($config['timezone'])); + $dif = timezone_offset_get($timezone, $datetime_eur); + date($config['date_format'], $dif); + if (!date('I')) { + // For summer -3600sec. + $dif -= 3600; + } + + $total_sec = strtotime($tmp->timestamp); + $total_sec += $dif; + $last_contact = date($config['date_format'], $total_sec); + $last_contact_value = ui_print_timestamp($last_contact, true); + } else { + $user_timezone = users_get_user_by_id($_SESSION['id_usuario'])['timezone']; + date_default_timezone_set($user_timezone); + $title = date($config['date_format'], strtotime($tmp->timestamp)); + $value = human_time_comparation(strtotime($tmp->timestamp), 'large'); + $last_contact_value = ''.$value.''; + } + + $tmp->timestamp = $last_contact_value; if (is_numeric($tmp->data) === true) { $tmp->data = format_numeric( diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 3ec8de0eea..ec3537d89e 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.770 -%define release 230328 +%define release 230329 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 6733a8deda..a327141778 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.770 -%define release 230328 +%define release 230329 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index b20548fae8..8c68c791e4 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.770 -%define release 230328 +%define release 230329 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 9ff30ae74f..643eb6c4b6 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3769,6 +3769,7 @@ CREATE TABLE IF NOT EXISTS `tuser_task_scheduled` ( `flag_delete` TINYINT UNSIGNED NOT NULL DEFAULT 0, `id_grupo` INT UNSIGNED NOT NULL DEFAULT 0, `enabled` TINYINT UNSIGNED NOT NULL DEFAULT 1, + `id_console` BIGINT NOT NULL DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; @@ -4189,6 +4190,21 @@ CREATE TABLE IF NOT EXISTS `tmonitor_filter` ( PRIMARY KEY (`id_filter`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +-- --------------------------------------------------------------------- +-- Table `tconsole` +-- --------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `tconsole` ( + `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_console` BIGINT NOT NULL DEFAULT 0, + `description` TEXT, + `version` TINYTEXT, + `last_execution` INT UNSIGNED NOT NULL DEFAULT 0, + `console_type` TINYINT NOT NULL DEFAULT 0, + `timezone` TINYTEXT, + `public_url` TEXT, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + -- --------------------------------------------------------------------- -- Table `tagent_filter` -- --------------------------------------------------------------------- @@ -4207,6 +4223,7 @@ CREATE TABLE IF NOT EXISTS `tagent_filter` ( PRIMARY KEY (`id_filter`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +-- --------------------------------------------------------------------- -- Table `tevent_sound` -- --------------------------------------------------------------------- CREATE TABLE `tevent_sound` ( diff --git a/pandora_console/views/consoles/list.php b/pandora_console/views/consoles/list.php new file mode 100644 index 0000000000..dd4a9a8995 --- /dev/null +++ b/pandora_console/views/consoles/list.php @@ -0,0 +1,217 @@ +
'; +echo ''; + + +// Consoles list. +try { + $columns = [ + 'id_console', + 'description', + 'version', + 'last_execution', + 'console_type', + 'timezone', + 'public_url', + 'options', + ]; + + $column_names = [ + __('Console ID'), + __('Description'), + __('Version'), + __('Last Execution'), + __('Console type'), + __('Timezone'), + __('Public URL'), + [ + 'text' => __('Options'), + 'class' => 'action_buttons', + ], + ]; + + + $tableId = 'consoles_list'; + // Load datatables user interface. + ui_print_datatable( + [ + 'id' => $tableId, + 'class' => 'info_table', + 'style' => 'width: 99%', + 'columns' => $columns, + 'column_names' => $column_names, + 'ajax_url' => 'include/ajax/consoles.ajax', + 'ajax_data' => ['get_all_datatables_formatted' => 1], + 'ajax_postprocess' => 'process_datatables_item(item)', + 'no_sortable_columns' => [-1], + 'order' => [ + 'field' => 'id', + 'direction' => 'asc', + ], + ] + ); +} catch (Exception $e) { + echo $e->getMessage(); +} + +?> + \ No newline at end of file diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index e3bf3a5e7b..7188ae00e4 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.770-230328 +Version: 7.0NG.770-230329 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 93ab076a5b..72838307e1 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.770-230328" +pandora_version="7.0NG.770-230329" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 692116d92f..37d067c4c9 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -46,7 +46,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.770"; -my $pandora_build = "230328"; +my $pandora_build = "230329"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index ebe9bc22b2..41e1772755 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -34,7 +34,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.770"; -my $pandora_build = "230328"; +my $pandora_build = "230329"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index baf3fc3826..d2b00dd849 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.770 -%define release 230328 +%define release 230329 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index b77bb73372..95323c1fe4 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_server %define version 7.0NG.770 -%define release 230328 +%define release 230329 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index a67a88b89a..70be237d28 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.770" -PI_BUILD="230328" +PI_BUILD="230329" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 1aa1f9dcdc..8995679d6f 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.770 Build 230328"; +my $version = "7.0NG.770 Build 230329"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index ac6e97e34a..8266fd883d 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.770 Build 230328"; +my $version = "7.0NG.770 Build 230329"; # save program name for logging my $progname = basename($0);