Merge branch 'develop' of brutus.artica.es:artica/pandorafms into ent-6280-firmar-instalador-de-agente-macos

This commit is contained in:
Kevin 2021-06-01 15:47:59 +02:00
commit a64360d25f
83 changed files with 1432 additions and 603 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.754-210527
Version: 7.0NG.754-210601
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.754-210527"
pandora_version="7.0NG.754-210601"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.754';
use constant AGENT_BUILD => '210527';
use constant AGENT_BUILD => '210601';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.754
%define release 210527
%define release 210601
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.754
%define release 210527
%define release 210601
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.754"
PI_BUILD="210527"
PI_BUILD="210601"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{210527}
{210601}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.754 Build 210527")
#define PANDORA_VERSION ("7.0NG.754 Build 210601")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.754(Build 210527))"
VALUE "ProductVersion", "(7.0NG.754(Build 210601))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.754-210527
Version: 7.0NG.754-210601
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.754-210527"
pandora_version="7.0NG.754-210601"
package_pear=0
package_pandora=1

View File

@ -1,16 +1,29 @@
<?php
/**
* Pandora FMS - http://pandorafms.com
* ==================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Agents/Modules Monitoring view.
*
* @category Operations
* @package Pandora FMS
* @subpackage Opensource
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
@ -435,14 +448,25 @@ function mainAgentsModules()
if ($config['pure'] == 0) {
// Header.
ui_print_page_header(
ui_print_standard_header(
__('Agents/Modules'),
'images/module.png',
false,
'',
false,
$updated_time
(array) $updated_time,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
);
echo '<table class="w100p">';
echo '<tr>';
echo "<td> <span class='float-right'>".$fullscreen['text'].'</span> </td>';

View File

@ -246,13 +246,24 @@ function mainModuleGroups()
$array_data[$value['id_grupo']][$value['id_mg']] = $value;
}
ui_print_page_header(
// Header.
ui_print_standard_header(
__('Combined table of agent group and module group'),
'images/module_group.png',
false,
'',
false,
''
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
);
echo "<table cellpadding='4' cellspacing='4' class='databox filters bolder margin-bottom-10' width='100%'>

View File

@ -53,13 +53,24 @@ function pandora_realtime_graphs()
$hide_header = get_parameter('hide_header', 0);
if ($hide_header === 0) {
ui_print_page_header(
// Header.
ui_print_standard_header(
__('Realtime graphs'),
'images/extensions.png',
false,
'real_time_view',
false,
$onheader
$onheader,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
);
}

View File

@ -1,29 +1,43 @@
<?php
/**
* Resource registration.
*
* @category Extensions
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Remember the hard-coded values
/*
-- id_modulo now uses tmodule
-- ---------------------------
-- 1 - Data server modules (agent related modules)
-- 2 - Network server modules
-- 4 - Plugin server
-- 5 - Predictive server
-- 6 - WMI server
-- 7 - WEB Server (enteprise)
In the xml is the tag "module_source"
*/
/**
* Remember the hard-coded values.
* -- id_modulo now uses tmodule.
* -- ---------------------------.
* -- 1 - Data server modules (agent related modules)
* -- 2 - Network server modules
* -- 4 - Plugin server
* -- 5 - Predictive server
* -- 6 - WMI server
* -- 7 - WEB Server (enteprise)
* In the xml is the tag "module_source"
*/
require_once $config['homedir'].'/include/functions_agents.php';
enterprise_include_once('include/functions_local_components.php');
@ -1096,6 +1110,7 @@ function resource_registration_extension_main()
}
$xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA);
if ($xml === false) {
ui_print_error_message(
__('Error uploading resource. Check if the selected file is a valid resource template in .ptr format')

View File

@ -192,15 +192,15 @@ if (check_login()) {
echo "
</div>
<div class='right height_30px'>
</div>
<div class='btn_update_online_open height_30px'>
<div class='modalokbutton cerrar'>
<span class='modalokbuttontext'>OK</span>
</div>";
if ($open) {
echo "<div class='modalgobutton gopandora'>
<span class='modalgobuttontext'>About Enterprise</span>
</div>";
</div></div>";
}
}

View File

@ -24,12 +24,20 @@ if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'],
return;
}
\ui_print_page_header(
__('Monitoring').' &raquo; '.__('Clusters'),
// Header.
ui_print_standard_header(
__('Clusters'),
'images/chart.png',
false,
'',
false
false,
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
]
);
ui_require_css_file('first_task');

View File

@ -1668,47 +1668,30 @@ if ($update_module) {
'module_macros' => $module_macros,
];
if (preg_match('/http_auth_user/m', $values['plugin_parameter'])) {
$http_user_conf = true;
}
if (preg_match('/http_auth_pass/m', $values['plugin_parameter'])) {
$http_pass_conf = true;
}
if ($id_module_type == 30 || $id_module_type == 31 || $id_module_type == 32 || $id_module_type == 33) {
$plugin_parameter_split = explode('&#x0a;', $values['plugin_parameter']);
$values['plugin_parameter'] = '';
if (!$http_user_conf || !$http_pass_conf) {
if ($id_module_type == 30 || $id_module_type == 31 || $id_module_type == 32 || $id_module_type == 33) {
$plugin_parameter_split = explode('&#x0a;', $values['plugin_parameter']);
$values['plugin_parameter'] = '';
foreach ($plugin_parameter_split as $key => $value) {
if ($key == 1) {
if ($http_user) {
if ($http_user_conf) {
continue;
}
$values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;';
}
if ($http_pass) {
if ($http_user_pass) {
continue;
}
$values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;';
}
$values['plugin_parameter'] .= $value.'&#x0a;';
} else {
$values['plugin_parameter'] .= $value.'&#x0a;';
foreach ($plugin_parameter_split as $key => $value) {
if ($key == 1) {
if ($http_user) {
$values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;';
}
if ($http_pass) {
$values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;';
}
$values['plugin_parameter'] .= $value.'&#x0a;';
} else {
$values['plugin_parameter'] .= $value.'&#x0a;';
}
}
}
// In local modules, the interval is updated by agent.
$module_kind = (int) get_parameter('moduletype');
if ($module_kind == MODULE_DATA) {

View File

@ -1,17 +1,32 @@
<?php
/**
* Agents defined view.
*
* @category Manage Agents.
* @package Pandora FMS
* @subpackage Resources.
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global vars
// Begin.
check_login();
// Take some parameters (GET).
@ -76,13 +91,23 @@ $viewtab['active'] = false;
$onheader = ['view' => $viewtab];
// Header.
ui_print_page_header(
ui_print_standard_header(
__('Agents defined in %s', get_product_name()),
'images/agent.png',
false,
'',
true,
$onheader
$onheader,
[
[
'link' => '',
'label' => __('Resources'),
],
[
'link' => '',
'label' => __('Manage agents'),
],
]
);
if (is_central_policies_on_node()) {

View File

@ -1130,7 +1130,6 @@ foreach ($modules as $module) {
[
'alt' => __('Enable module'),
'title' => __('Enable module'),
'class' => 'invert_filter_important',
]
).'</a>';
} else {

View File

@ -1,17 +1,32 @@
<?php
/**
* Common editor fields.
*
* @category Module manager
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Begin
require_once $config['homedir'].'/include/functions_modules.php';
require_once $config['homedir'].'/include/functions_categories.php';
require_once $config['homedir'].'/include/graphs/functions_d3.php';
@ -19,7 +34,9 @@ require_once $config['homedir'].'/include/graphs/functions_d3.php';
include_javascript_d3();
global $config;function prepend_table_simple($row, $id=false)
global $config;
function prepend_table_simple($row, $id=false)
{
global $table_simple;

View File

@ -101,12 +101,29 @@ if ($id_policy_module) {
$plugin_parameter = $module['plugin_parameter'];
}
$plugin_parameter_split = explode('&#x0a;', $plugin_parameter);
$plugin_parameter_final_split = '';
foreach ($plugin_parameter_split as $key => $value) {
if (strpos($value, 'http_auth_user') === false && strpos($value, 'http_auth_pass') === false) {
$plugin_parameter_final_split .= $value.'&#x0a;';
}
if (strpos($value, 'http_auth_user') !== false) {
$plugin_parameter_http_user = str_replace('http_auth_user&#x20;', '', $value);
}
if (strpos($value, 'http_auth_pass') !== false) {
$plugin_parameter_http_pass = str_replace('http_auth_pass&#x20;', '', $value);
}
}
if ((bool) $adopt === false) {
$data[1] = html_print_textarea(
'plugin_parameter',
15,
65,
$plugin_parameter,
$plugin_parameter_final_split,
$disabledTextBecauseInPolicy,
true,
'resizev'
@ -116,7 +133,7 @@ if ((bool) $adopt === false) {
'plugin_parameter',
15,
65,
$plugin_parameter,
$plugin_parameter_final_split,
false,
true
);
@ -259,16 +276,12 @@ foreach ($texts as $code => $text) {
"get_content",
"debug",
"task_end",
"head",
"http_auth_user",
"http_auth_pass"
"head"
];
$(document).ready(function() {
var plugin_parameter = $("#textarea_plugin_parameter");
var http_auth_user = $('#text-http_user');
var http_auth_pass = $('#password-http_pass');
$(plugin_parameter).keyup(function() {
@ -278,18 +291,6 @@ foreach ($texts as $code => $text) {
} else {
$('#button-btn_loadbasic').attr('disabled', 'disabled');
}
// Update http_auth_user from conf data
var http_auth_user_value = get_module_token_from_config('http_auth_user', plugin_parameter, "\n");
if (http_auth_user_value != "") {
http_auth_user.val(http_auth_user_value);
}
// Update http_auth_pass from conf data
var http_auth_pass_value = get_module_token_from_config('http_auth_pass', plugin_parameter, "\n");
if (http_auth_pass_value != "") {
http_auth_pass.val(http_auth_pass_value);
}
});
$('#button-btn_loadbasic').click(function() {
@ -413,57 +414,6 @@ foreach ($texts as $code => $text) {
});
$(plugin_parameter).trigger('keyup');
http_auth_user.keyup(function() {
config = plugin_parameter.val();
if (config.search("http_auth_user") == -1) {
var http_auth_user_end =
"http_auth_user " + this.value + "\n" + "task_end" + "\n";
plugin_parameter.val(config.replace(/^task_end.*$/m, http_auth_user_end));
} else {
plugin_parameter.val(
config.replace(/^http_auth_user.*$/m, "http_auth_user " + this.value)
);
// Hide success and error indicators
$(".checks").hide();
}
});
http_auth_pass.keyup(function() {
config = plugin_parameter.val();
if (config.search("http_auth_pass") == -1) {
var http_auth_pass_end =
"http_auth_pass " + this.value + "\n" + "task_end" + "\n";
plugin_parameter.val(config.replace(/^task_end.*$/m, http_auth_pass_end));
} else {
plugin_parameter.val(
config.replace(/^http_auth_pass.*$/m, "http_auth_pass " + this.value)
);
// Hide success and error indicators
$(".checks").hide();
}
});
});
function get_module_token_from_config(token_name, plugin_parameter, separator) {
var return_var = "";
if(token_name == null || token_name == '') {
return '';
}
data = plugin_parameter.val().split(separator);
len = data.length;
for (i = 0; i < len; i++) {
if (data[i][0] == "#") continue;
tokens = data[i].split(" ");
if (tokens.length == 0) continue;
token = tokens.shift();
if (token == token_name ) return_var = tokens.join(" ");
}
return_var = $.trim(return_var);
return return_var;
}
</script>

View File

@ -95,7 +95,7 @@ if ($id_group) {
}
// Header
if (defined('METACONSOLE')) {
if (is_metaconsole() === true) {
agents_meta_print_header();
$sec = 'advanced';
} else {
@ -105,13 +105,24 @@ if (defined('METACONSOLE')) {
$title_in_header = __('Create group');
}
ui_print_page_header(
// Header.
ui_print_standard_header(
$title_in_header,
'images/group.png',
false,
'',
true,
''
false,
[],
[
[
'link' => '',
'label' => __('Profiles'),
],
[
'link' => '',
'label' => __('Manage agents group'),
],
]
);
$sec = 'gagente';
}

View File

@ -333,6 +333,7 @@ $title = __('Groups defined in %s', get_product_name());
switch ($tab) {
case 'tree':
$buttons['tree']['active'] = true;
$title .= sprintf(' &raquo; %s', __('Tree view'));
break;
case 'credbox':
@ -343,23 +344,38 @@ switch ($tab) {
case 'groups':
default:
$buttons['groups']['active'] = true;
$title .= sprintf(' &raquo; %s', __('Table view'));
break;
}
// Header.
if (is_metaconsole() === true) {
agents_meta_print_header();
echo '<div class="notify">';
echo __('Edit or delete groups can cause problems with synchronization');
echo '</div>';
html_print_div(
[
'class' => 'notify',
'content' => __('Edit or delete groups can cause problems with synchronization'),
]
);
} else {
ui_print_page_header(
// Header.
ui_print_standard_header(
$title,
'images/group.png',
false,
'',
true,
$buttons
false,
$buttons,
[
[
'link' => '',
'label' => __('Profiles'),
],
[
'link' => '',
'label' => __('Manage agents group'),
],
]
);
}
@ -471,7 +487,7 @@ if ($update_group) {
$values = [
'nombre' => $name,
'icon' => empty($icon) ? '' : substr($icon, 0, -4),
'parent' => $id_parent == -1 ? 0 : $id_parent,
'parent' => ($id_parent == -1) ? 0 : $id_parent,
'disabled' => !$alerts_enabled,
'custom_id' => $custom_id,
'id_skin' => $skin,

View File

@ -58,12 +58,27 @@ $buttons['view'] = [
$tab = get_parameter('tab', 'view');
if ($tab != 'search_module') {
if ($tab !== 'search_module') {
$buttons[$tab]['active'] = true;
}
ui_print_page_header(__('Module Library').' &raquo; '.__('View'), '', false, 'module_library', true, $buttons);
$headerTitle = ($tab === 'categories') ? __('Categories') : __('Main view');
// Header.
ui_print_standard_header(
$headerTitle,
'',
false,
'module_library',
true,
$buttons,
[
[
'link' => '',
'label' => __('Module library'),
],
]
);
// Styles.
ui_require_css_file('module_library');

View File

@ -26,10 +26,9 @@
* ============================================================================
*/
// Begin.
global $config;
if (is_ajax()) {
$search_agents = (bool) get_parameter('search_agents');
@ -340,37 +339,43 @@ if ($edit_graph) {
$head = __('Graph builder');
if (isset($name)) {
$head .= ' - '.$name;
if (isset($name) === true) {
$head .= ' &raquo; '.$name;
}
// Header.
$tab = get_parameter('tab', '');
$tab = get_parameter('tab');
switch ($tab) {
default:
case 'main':
ui_print_page_header(
$head,
'images/chart.png',
false,
'graph_builder',
false,
$buttons
);
case 'graph_editor':
$headerHelp = '';
break;
case 'graph_editor':
ui_print_page_header(
$head,
'images/chart.png',
false,
'',
false,
$buttons
);
case 'main':
default:
$headerHelp = 'graph_builder';
break;
}
// Header.
ui_print_standard_header(
$head,
'images/chart.png',
false,
$headerHelp,
false,
[$buttons],
[
[
'link' => '',
'label' => __('Reporting'),
],
[
'link' => '',
'label' => __('Custom graphs'),
],
]
);
if ($add_graph) {
ui_print_result_message(
$id_graph,
@ -418,7 +423,8 @@ if (!$delete_module) {
$chunk1 = explode('|', $chunkdata);
$modules = '';
$weights = '';
for ($a = 0; $a < count($chunk1); $a++) {
$chunkCount = count($chunk1);
for ($a = 0; $a < $chunkCount; $a++) {
$chunk2[$a] = [];
$chunk2[$a] = explode(',', $chunk1[$a]);
if (strpos($modules, $chunk2[$a][1]) == 0) {
@ -450,4 +456,8 @@ switch ($active_tab) {
case 'graph_editor':
include_once 'godmode/reporting/graph_builder.graph_editor.php';
break;
default:
// Nothing to do.
break;
}

View File

@ -1,19 +1,35 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global variables
/**
* Custom graph containers
*
* @category Reporting
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2007-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
global $config;
// Check user credentials
// Check user credentials.
check_login();
if (! check_acl($config['id_user'], 0, 'RR') || enterprise_installed() === false) {
@ -87,8 +103,26 @@ $buttons['graph_container'] = [
]
).'</a>',
];
// Header
ui_print_page_header(__('Graph container'), '', false, '', false, $buttons);
// Header.
ui_print_standard_header(
__('Graph container'),
'',
false,
'',
false,
$buttons,
[
[
'link' => '',
'label' => __('Reporting'),
],
[
'link' => '',
'label' => __('Custom graphs'),
],
]
);
$container = folder_get_folders();

View File

@ -1,16 +1,32 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global variables
/**
* Reporting graphs.
*
* @category Reporting
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
global $config;
require_once 'include/functions_custom_graphs.php';
@ -99,8 +115,25 @@ $view_graph = (bool) get_parameter('view_graph');
$id = (int) get_parameter('id');
$multiple_delete = (bool) get_parameter('multiple_delete', 0);
// Header
ui_print_page_header(__('Reporting').' &raquo; '.__('Custom graphs'), 'images/chart.png', false, '', false, $buttons);
// Header.
ui_print_standard_header(
__('List of custom graphs'),
'images/chart.png',
false,
'',
false,
$buttons,
[
[
'link' => '',
'label' => __('Reporting'),
],
[
'link' => '',
'label' => __('Custom graphs'),
],
]
);
// Delete module SQL code
if ($delete_graph) {

View File

@ -1,16 +1,32 @@
<?php
/**
* Map builder console.
*
* @category Topology maps
* @package Pandora FMS
* @subpackage Visual consoles
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2007-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Begin.
global $config;
require_once $config['homedir'].'/include/functions_visual_map.php';
@ -32,9 +48,7 @@ if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
exit;
}
if (!$is_metaconsole) {
if ($is_metaconsole === false) {
$url_visual_console = 'index.php?sec=network&sec2=godmode/reporting/map_builder';
$url_visual_console_favorite = 'index.php?sec=network&sec2=godmode/reporting/visual_console_favorite';
$url_visual_console_template = 'index.php?sec=network&sec2=enterprise/godmode/reporting/visual_console_template';
@ -102,14 +116,24 @@ if ($is_enterprise !== ENTERPRISE_NOT_HOOK && $vconsoles_manage) {
];
}
if (!$is_metaconsole) {
ui_print_page_header(
__('Reporting').' &raquo; '.__('Visual Console'),
if ($is_metaconsole === false) {
ui_print_standard_header(
__('Visual Console List'),
'images/op_reporting.png',
false,
'',
false,
$buttons
true,
$buttons,
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('Visual console'),
],
]
);
} else {
ui_meta_print_header(

View File

@ -567,17 +567,24 @@ switch ($action) {
// Print header.
ui_meta_print_header(__('Reporting'), '', $buttons);
} else {
// Page header for normal console.
ui_print_page_header(
__('Custom reporting'),
// Header.
ui_print_standard_header(
__('List of reports'),
'images/op_reporting.png',
false,
'',
false,
$buttons,
false,
'',
60
[
[
'link' => '',
'label' => __('Reporting'),
],
[
'link' => '',
'label' => __('Custom reports'),
],
]
);
}
@ -2486,7 +2493,7 @@ switch ($action) {
0
);
$values['exception_condition'] = (int) get_parameter(
'radiobutton_exception_condition',
'exception_condition',
0
);
$values['exception_condition_value'] = get_parameter(
@ -3145,17 +3152,24 @@ switch ($action) {
// Print header.
ui_meta_print_header(__('Reporting'), '', $buttons);
} else {
// Page header for normal console.
ui_print_page_header(
// Header.
ui_print_standard_header(
$subsection,
'images/op_reporting.png',
false,
'',
false,
$buttons,
false,
'',
60
[
[
'link' => '',
'label' => __('Reporting'),
],
[
'link' => '',
'label' => __('Custom reports'),
],
]
);
}
@ -3251,17 +3265,25 @@ if ($enterpriseEnable && defined('METACONSOLE')) {
} else {
$tab_builder = ($activeTab === 'item_editor') ? 'reporting_item_editor_tab' : '';
if ($action !== 'update' && !is_metaconsole()) {
ui_print_page_header(
if ($action !== 'update' && is_metaconsole() === false) {
// Header.
ui_print_standard_header(
$textReportName,
'images/op_reporting.png',
false,
$tab_builder,
false,
$buttons,
false,
'',
60
[
[
'link' => '',
'label' => __('Reporting'),
],
[
'link' => '',
'label' => __('Custom reports'),
],
]
);
}
}
@ -3291,17 +3313,25 @@ if ($resultOperationDB !== null) {
$activeTab = 'list_items';
$buttons[$activeTab]['active'] = true;
if (!is_metaconsole()) {
ui_print_page_header(
if (is_metaconsole() === false) {
// Header.
ui_print_standard_header(
$textReportName,
'images/op_reporting.png',
false,
$helpers,
false,
$buttons,
false,
'',
60
[
[
'link' => '',
'label' => __('Reporting'),
],
[
'link' => '',
'label' => __('Custom reports'),
],
]
);
}
}

View File

@ -1,16 +1,33 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Login check
/**
* Extension to manage a list of gateways and the node address where they should
* point to.
*
* @category Extensions
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
global $config;
global $statusProcessInDB;
@ -812,14 +829,25 @@ $buttons[$activeTab]['active'] = true;
$tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : '';
if (!defined('METACONSOLE')) {
ui_print_page_header(
if (is_metaconsole() === false) {
// Header.
ui_print_standard_header(
$visualConsoleName,
'images/visual_console.png',
false,
$tab_builder,
false,
$buttons
$buttons,
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('Visual console'),
],
]
);
}

View File

@ -1,19 +1,38 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
/**
* Favorite visual console.
*
* @category Topology maps
* @package Pandora FMS
* @subpackage Visual consoles
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2007-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
global $config;
require_once $config['homedir'].'/include/functions_visual_map.php';
// Breadcrumb.
require_once $config['homedir'].'/include/class/HTML.class.php';
ui_require_css_file('discovery');
// ACL for the general permission
$vconsoles_read = check_acl($config['id_user'], 0, 'VR');
$vconsoles_write = check_acl($config['id_user'], 0, 'VW');
@ -32,7 +51,7 @@ if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
}
if (!$is_metaconsole) {
if ($is_metaconsole === false) {
$url_visual_console = 'index.php?sec=network&sec2=godmode/reporting/map_builder';
$url_visual_console_favorite = 'index.php?sec=network&sec2=godmode/reporting/visual_console_favorite';
$url_visual_console_template = 'index.php?sec=network&sec2=enterprise/godmode/reporting/visual_console_template';
@ -94,14 +113,24 @@ if ($is_enterprise !== ENTERPRISE_NOT_HOOK && $vconsoles_manage) {
];
}
if (!$is_metaconsole) {
ui_print_page_header(
__('Reporting').' &raquo; '.__('Visual Favourite Console'),
if ($is_metaconsole === false) {
ui_print_standard_header(
__('Favourite Visual Console'),
'images/op_reporting.png',
false,
'',
false,
$buttons
true,
$buttons,
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('Visual console'),
],
]
);
} else {
ui_meta_print_header(

View File

@ -1,17 +1,32 @@
<?php
/**
* OS Edition
*
* @category Server
* @package Pandora FMS
* @subpackage Godmode
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global vars
// Begin.
global $config;
check_login();
@ -45,8 +60,8 @@ if ($idOS) {
$message = '';
switch ($action) {
default:
case 'new':
default:
$actionHidden = 'save';
$textButton = __('Create');
$classButton = 'class="sub next"';
@ -183,12 +198,31 @@ $buttons = [
$buttons[$tab]['active'] = true;
if (!is_metaconsole()) {
$headerTitle = ($tab === 'builder') ? __('Edit OS') : __('List of OS');
if (is_metaconsole() === false) {
// Header.
ui_print_page_header(__('Edit OS'), '', false, '', true, $buttons);
ui_print_standard_header(
$headerTitle,
'',
false,
'',
true,
$buttons,
[
[
'link' => '',
'label' => __('Servers'),
],
[
'link' => '',
'label' => __('Edit OS'),
],
]
);
}
if (!empty($id_message)) {
if (empty($id_message) === false) {
switch ($id_message) {
case 1:
echo ui_print_success_message(__('Success creating OS'), '', true);
@ -226,13 +260,11 @@ if (!empty($id_message)) {
switch ($tab) {
case 'list':
default:
include_once $config['homedir'].'/godmode/setup/os.list.php';
return;
break;
break;
case 'builder':
include_once $config['homedir'].'/godmode/setup/os.builder.php';
return;
break;
break;
}

View File

@ -1257,7 +1257,14 @@ if ($create_alert || $update_alert) {
foreach ($other_actions as $action) {
$data[1] .= '<tr>';
$data[1] .= '<td>'.alerts_get_alert_action_name($action['alert_type']).'</td>';
$data[1] .= '<td> <a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&delete_action=1&action_id='.$action['id'].'" onClick="javascript:return confirm(\''.__('Are you sure?').'\')">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete')]).'</a> </td>';
$data[1] .= '<td> <a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&delete_action=1&action_id='.$action['id'].'" onClick="javascript:return confirm(\''.__('Are you sure?').'\')">'.html_print_image(
'images/cross.png',
true,
[
'border' => '0',
'alt' => __('Delete'),
]
).'</a> </td>';
$data[1] .= '</tr>';
}
}
@ -1278,7 +1285,34 @@ if ($create_alert || $update_alert) {
}
if (check_acl_restricted_all($config['id_user'], $row['id_group'], 'LW')) {
$data[8] = '<a href="index.php?'.'sec=snmpconsole&'.'sec2=godmode/snmpconsole/snmp_alert&'.'duplicate_alert=1&'.'id_alert_snmp='.$row['id_as'].'">'.html_print_image('images/copy.png', true, ['alt' => __('Duplicate'), 'title' => __('Duplicate'), 'class' => 'invert_filter']).'</a>'.'<a href="index.php?'.'sec=snmpconsole&'.'sec2=godmode/snmpconsole/snmp_alert&'.'update_alert=1&'.'id_alert_snmp='.$row['id_as'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update'), 'class' => 'invert_filter']).'</a>'.'<a href="javascript:show_add_action_snmp(\''.$row['id_as'].'\');">'.html_print_image('images/add.png', true, ['title' => __('Add action'), 'class' => 'invert_filter']).'</a>'.'<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&delete_alert='.$row['id_as'].'" onClick="javascript:return confirm(\''.__('Are you sure?').'\')">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter', 'alt' => __('Delete')]).'</a>';
$data[8] = '<a href="index.php?'.'sec=snmpconsole&'.'sec2=godmode/snmpconsole/snmp_alert&'.'duplicate_alert=1&'.'id_alert_snmp='.$row['id_as'].'">'.html_print_image(
'images/copy.png',
true,
[
'alt' => __('Duplicate'),
'title' => __('Duplicate'),
]
).'</a>'.'<a href="index.php?'.'sec=snmpconsole&'.'sec2=godmode/snmpconsole/snmp_alert&'.'update_alert=1&'.'id_alert_snmp='.$row['id_as'].'">'.html_print_image(
'images/config.png',
true,
[
'border' => '0',
'alt' => __('Update'),
]
).'</a>'.'<a href="javascript:show_add_action_snmp(\''.$row['id_as'].'\');">'.html_print_image(
'images/add.png',
true,
[
'title' => __('Add action'),
]
).'</a>'.'<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&delete_alert='.$row['id_as'].'" onClick="javascript:return confirm(\''.__('Are you sure?').'\')">'.html_print_image(
'images/cross.png',
true,
[
'border' => '0',
'alt' => __('Delete'),
]
).'</a>';
$data[9] = html_print_checkbox_extended(
@ -1409,7 +1443,7 @@ if ($create_alert || $update_alert) {
echo '<div class="right mrgn_lft_10px;">';
html_print_input_hidden('multiple_delete', 1);
html_print_submit_button(__('Delete selected'), 'delete_button', false, 'class="sub delete"');
html_print_submit_button(__('Delete selected'), 'delete_button', false, 'class="sub delete mrgn_btn_10px"');
echo '</div>';
echo '</form>';
}

View File

@ -32,15 +32,36 @@ $index_post = (int) get_parameter('index_post', 0);
// Create/update header
if ($edit_filter > -2) {
if ($edit_filter > -1) {
ui_print_page_header(__('SNMP Console').' &raquo; '.__('Update filter'), 'images/op_snmp.png', false, '', false);
$activeFilterCaption = ' &raquo; '.__('Update filter');
} else {
ui_print_page_header(__('SNMP Console').' &raquo; '.__('Create filter'), 'images/op_snmp.png', false, '', false);
$activeFilterCaption = ' &raquo; '.__('Create filter');
}
} else {
// Overview header
ui_print_page_header(__('SNMP Console').' &raquo; '.__('Filter overview'), 'images/op_snmp.png', false, '', false);
$activeFilterCaption = ' &raquo; '.__('Filter overview');
}
// Header.
ui_print_standard_header(
__('SNMP Console').$activeFilterCaption,
'images/op_snmp.png',
false,
'',
false,
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('SMNP'),
],
]
);
// Create/update filter
if ($update_filter > -2) {
// UPDATE

View File

@ -33,14 +33,27 @@ $snmp_type = (int) get_parameter('snmp_type', 0);
$snmp_value = (string) get_parameter('snmp_value', '');
$generate_trap = (bool) get_parameter('generate_trap', 0);
ui_print_page_header(
// Header.
ui_print_standard_header(
__('SNMP Trap generator'),
'images/op_snmp.png',
false,
'snmp_trap_generator_view',
false
false,
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('SMNP'),
],
]
);
if ($generate_trap) {
$result = true;
$error = '';

View File

@ -312,7 +312,7 @@ class AgentWizard extends HTML
$this->idPolicy = get_parameter('id', '');
$this->targetIp = get_parameter('targetIp', '');
if (!empty($this->idAgent)) {
if (empty($this->idAgent) === false) {
$array_aux = db_get_all_rows_sql(
sprintf(
'SELECT ip FROM taddress ta
@ -1582,6 +1582,10 @@ class AgentWizard extends HTML
if ($candidate['execution_type'] === 0
|| $candidate['execution_type'] === EXECUTION_TYPE_NETWORK
) {
if (substr($candidate['value'], 0, 1) !== '.') {
$candidate['value'] = '.'.$candidate['value'];
}
if ($this->serverType === SERVER_TYPE_ENTERPRISE_SATELLITE) {
$values['id_module'] = MODULE_DATA;
$values['module_interval'] = 1;
@ -1687,28 +1691,43 @@ class AgentWizard extends HTML
)
);
if ($fieldsPlugin !== false) {
$fieldsPlugin = json_decode($fieldsPlugin, true);
$i = 1;
foreach ($infoMacros as $key => $value) {
if (empty(preg_match('/_snmp_field/', $key)) === false) {
$new_macros = [];
foreach ($fieldsPlugin as $k => $v) {
if ($v['macro'] === preg_replace('/_snmp_field/', '', $key)) {
$fieldsPlugin[$k]['value'] = $this->replacementMacrosPlugin(
$value,
$infoMacros['macros']
);
$i++;
continue;
if ($this->wizardSection === 'snmp_interfaces_explorer'
&& empty($candidate['macros']) === false
) {
// Use definition provided.
$values['id_plugin'] = $candidate['id_plugin'];
$values['macros'] = base64_decode($candidate['macros']);
} else {
$fieldsPlugin = db_get_value_sql(
sprintf(
'SELECT macros FROM tplugin WHERE id=%d',
(int) $infoMacros['server_plugin']
)
);
if ($fieldsPlugin !== false) {
$fieldsPlugin = json_decode($fieldsPlugin, true);
$i = 1;
foreach ($infoMacros as $key => $value) {
if (empty(preg_match('/_snmp_field/', $key)) === false) {
$new_macros = [];
foreach ($fieldsPlugin as $k => $v) {
if ($v['macro'] === preg_replace('/_snmp_field/', '', $key)) {
$fieldsPlugin[$k]['value'] = $this->replacementMacrosPlugin(
$value,
$infoMacros['macros']
);
$i++;
continue;
}
}
}
}
}
}
$values['id_plugin'] = $infoMacros['server_plugin'];
$values['macros'] = json_encode($fieldsPlugin);
$values['id_plugin'] = $infoMacros['server_plugin'];
$values['macros'] = json_encode($fieldsPlugin);
}
}
}
} else if ($this->protocol === 'wmi') {
@ -1947,6 +1966,10 @@ class AgentWizard extends HTML
|| $candidate['execution_type'] === EXECUTION_TYPE_NETWORK
) {
if ($this->serverType === SERVER_TYPE_ENTERPRISE_SATELLITE) {
if (substr($candidate['value'], 0, 1) !== '.') {
$candidate['value'] = '.'.$candidate['value'];
}
$tmp->module_interval(300);
$tmp->id_modulo(MODULE_DATA);
$tmp->updateConfigurationData(

View File

@ -729,37 +729,24 @@ class AgentsAlerts extends HTML
public function loadHeader()
{
if ($this->pure == 0) {
// Breadcrums.
$this->setBreadcrum([]);
$this->prepareBreadcrum(
[
[
'link' => '',
'label' => __('Monitoring'),
'selected' => false,
],
[
'link' => '',
'label' => __('Views'),
'selected' => true,
],
],
true
);
ui_print_page_header(
// Header.
ui_print_standard_header(
__('Agents/Alerts'),
'',
false,
'',
true,
'',
false,
'',
GENERIC_SIZE_TEXT,
'',
$this->printHeader(true)
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
);
}

View File

@ -279,8 +279,10 @@ class Tree
protected function getTagJoin()
{
return 'INNER JOIN ttag_module ttm
ON tam.id_agente_modulo = ttm.id_agente_modulo';
return 'INNER JOIN tagente_modulo tam
ON ta.id_agente = tam.id_agente
INNER JOIN ttag_module ttm
ON tam.id_agente_modulo = ttm.id_agente_modulo';
}
@ -931,11 +933,16 @@ class Tree
$agent_status_filter = $this->getAgentStatusFilter();
$module_search_filter = $this->getModuleSearchFilter();
$module_status_inner = '';
$module_status_filter = $this->getModuleStatusFilterFromTestado();
if (!empty($module_status_filter)) {
$module_status_inner = '
INNER JOIN tagente_estado tae
ON tae.id_agente_modulo = tam.id_agente_modulo';
$module_search_inner = '';
$module_search_filter = '';
if (!empty($this->filter['searchModule'])) {
$module_search_inner = '
INNER JOIN tagente_modulo tam
ON ta.id_agente = tam.id_agente
INNER JOIN tagente_estado tae
ON tae.id_agente_modulo = tam.id_agente_modulo';
$module_search_filter = "AND tam.disabled = 0
AND tam.nombre LIKE '%%".$this->filter['searchModule']."%%' ".$this->getModuleStatusFilterFromTestado();
}
$sql_model = "SELECT %s FROM
@ -944,13 +951,11 @@ class Tree
FROM tagente ta
LEFT JOIN tagent_secondary_group tasg
ON ta.id_agente = tasg.id_agent
INNER JOIN tagente_modulo tam
ON ta.id_agente = tam.id_agente
$inner_inside
$module_status_inner
$group_inner
$module_search_inner
WHERE ta.disabled = 0
AND tam.disabled = 0
%s
$agent_search_filter
$agent_status_filter
@ -973,6 +978,7 @@ class Tree
$inner
GROUP BY g
ORDER BY $order_by_final";
hd($sql, true);
return $sql;
}
@ -1020,7 +1026,7 @@ class Tree
$agent_search_filter = $this->getAgentSearchFilter();
$agent_status_filter = $this->getAgentStatusFilter();
$module_search_filter = $this->getModuleSearchFilter();
$module_status_filter = $this->getModuleStatusFilterFromTestado($this->filter['statusModule']);
$module_status_filter = $this->getModuleStatusFilter();
$condition = $this->L2condition;
$condition_inside = $this->L2conditionInside;

View File

@ -31,6 +31,8 @@ class TreeModuleGroup extends Tree
'tmg.id_mg AS id',
];
$this->L1inner = 'INNER JOIN tmodule_group tmg ON tmg.id_mg = x2.g';
$this->L1innerInside = 'INNER JOIN tagente_modulo tam
ON ta.id_agente = tam.id_agente';
$this->L1orderByFinal = 'tmg.name';
$this->L2condition = 'AND tam.id_module_group = '.$this->rootID;

View File

@ -27,6 +27,8 @@ class TreeTag extends Tree
$this->L1fieldName = 'id_tag';
$this->L1fieldNameSql = 'ttm.id_tag';
$this->L1innerInside = '
INNER JOIN tagente_modulo tam
ON ta.id_agente = tam.id_agente
INNER JOIN ttag_module ttm
ON ttm.id_agente_modulo = tam.id_agente_modulo
';

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC210527';
$build_version = 'PC210601';
$pandora_version = 'v7.0NG.754';
// Do not overwrite default timezone set if defined.

View File

@ -374,7 +374,7 @@ function db_get_value_filter($field, $table, $filter, $where_join='AND', $search
*
* @param string SQL select statement to execute.
*
* @return the first value of the first row of a table result from query.
* @return mixed the first value of the first row of a table result from query.
*/
function db_get_value_sql($sql, $dbconnection=false)
{

View File

@ -2711,6 +2711,7 @@ function reporting_exception(
// Metaconsole connection.
$server_name = $exc['server_name'];
if (($config['metaconsole'] == 1) && $server_name != '' && is_metaconsole()) {
metaconsole_restore_db();
$connection = metaconsole_get_connection($server_name);
if (metaconsole_load_external_db($connection) != NOERR) {
// ui_print_error_message ("Error connecting to ".$server_name);

View File

@ -27,6 +27,8 @@
*/
// Begin.
global $config;
// Check to avoid error when load this library in error screen situations.
if (isset($config['homedir'])) {
include_once $config['homedir'].'/include/functions_agents.php';
@ -4302,6 +4304,101 @@ function ui_get_full_url($url='', $no_proxy=false, $add_name_php_file=false, $me
}
/**
* Generates the Pandora 75x Standard views header.
* This function should be the standard for
* generating the headers of all PFMS views.
*
* @param string $title The title of this view.
* @param string $icon Icon for show.
* @param boolean $return If true, the string with the formed header is returned.
* @param string $help String for attach at end a link for help.
* @param boolean $godmode If false, it will created like operation mode.
* @param array $options Tabs allowed
* @param array $breadcrumbs Breadcrumbs with the walk.
*
* EXAMPLE:
* ```
* $buttons['option_1'] = [
* 'active' => false,
* 'text' => '<a href="'.$url.'">'.html_print_image(
* 'images/wand.png',
* true,
* [ 'title' => __('Option 1 for show'), 'class' => 'invert_filter' ]
* ).'</a>',
* ];
*
* ui_print_standard_header(
* __('Favorites'),
* 'images/op_reporting.png',
* false,
* '',
* true,
* $buttons,
* [
* [ 'link' => '', 'label' => __('Topology maps') ],
* [ 'link' => '', 'label' => __('Visual console') ],
* ]
* );
* ```
*
* @return string If apply
*/
function ui_print_standard_header(
string $title,
string $icon='',
bool $return=false,
string $help='',
bool $godmode=false,
array $options=[],
array $breadcrumbs=[]
) {
// For standard breadcrumbs.
ui_require_css_file('discovery');
// Create the breadcrumb.
$headerInformation = new HTML();
$headerInformation->setBreadcrum([]);
// Prepare the breadcrumbs.
$countBreadcrumbs = count($breadcrumbs);
$countUnitBreadcrumb = 0;
$applyBreadcrumbs = [];
foreach ($breadcrumbs as $unitBreadcrumb) {
// Count new breadcrumb.
$countUnitBreadcrumb++;
// Apply selected if is the last.
$unitBreadcrumb['selected'] = ($countBreadcrumbs === $countUnitBreadcrumb);
// Apply for another breadcrumb.
$applyBreadcrumbs[] = $unitBreadcrumb;
}
// Attach breadcrumbs.
$headerInformation->prepareBreadcrum(
$applyBreadcrumbs,
true
);
// Create the header.
$output = ui_print_page_header(
$title,
$icon,
true,
$help,
$godmode,
$options,
false,
'',
GENERIC_SIZE_TEXT,
'',
$headerInformation->printHeader(true)
);
if ($return !== true) {
echo $output;
} else {
return $output;
}
}
/**
* Return a standard page header (Pandora FMS 3.1 version)
*

View File

@ -8511,3 +8511,12 @@ div.stat-win-spinner img {
width: 100px !important;
margin-left: 20px;
}
.btn_update_online_open {
float: right;
margin-bottom: 20px;
}
.align-left-important {
text-align: left !important;
}

View File

@ -1019,3 +1019,11 @@ li.ui-tabs-tab.ui-corner-top.ui-state-default.ui-tab {
margin: 20px auto;
border-radius: 3px;
}
table.alternate tr:nth-child(2n + 1) td {
background-color: #222;
}
table.alternate tr:nth-child(2n) td {
background-color: #111;
}

View File

@ -1277,6 +1277,7 @@ if ($config['pure'] == 0) {
// Container div.
echo '</div>';
echo '<div id="both"></div>';
echo '</div>';
echo '<div id="foot">';
include 'general/footer.php';

View File

@ -129,7 +129,7 @@
<div style='height: 10px'>
<?php
$version = '7.0NG.754';
$build = '210527';
$build = '210601';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -188,12 +188,25 @@ if ($idAgent != 0) {
$print_agent = true;
if (!is_metaconsole()) {
ui_print_page_header(
if (is_metaconsole() === false) {
// Header.
ui_print_standard_header(
__('Alert detail'),
'images/op_alerts.png',
false,
''
'',
false,
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
);
} else {
ui_meta_print_header(__('Alerts view'));

View File

@ -1,17 +1,32 @@
<?php
/**
* Agent Status View.
*
* @category View
* @package Pandora FMS
* @subpackage Monitoring.
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global vars
// Begin.
global $config;
ob_start();
@ -192,13 +207,24 @@ if (check_acl($config['id_user'], 0, 'AW')) {
$onheader = ['setup' => $setuptab];
}
ui_print_page_header(
// Header.
ui_print_standard_header(
__('Agent detail'),
'images/agent.png',
false,
'',
false,
$onheader
$onheader,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
);
if (!$strict_user) {

View File

@ -1,16 +1,32 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global vars
/**
* Group View.
*
* @category View
* @package Pandora FMS
* @subpackage Monitoring.
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
require_once 'include/config.php';
require_once 'include/functions_reporting.php';
require_once $config['homedir'].'/include/functions_agents.php';
@ -62,17 +78,27 @@ if ($config['realtimestats'] == 0) {
$updated_time .= '</a>';
} else {
// $updated_info = __("Updated at realtime");
$updated_info = '';
$updated_info = '';
}
// Header.
ui_print_page_header(
ui_print_standard_header(
__('Group view'),
'images/group.png',
false,
'',
false,
$updated_time
(array) $updated_time,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
);
$total_agentes = 0;

View File

@ -1,18 +1,32 @@
<?php
/**
* Pandora FMS - http://pandorafms.com
* ==================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Interfaces view.
*
* @category Monitoring
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2007-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
global $config;
check_login();
@ -45,12 +59,23 @@ $sec = (string) get_parameter('sec', 'view');
$agent_id = (int) get_parameter('id_agente', 0);
if ($sec === 'view') {
ui_print_page_header(
ui_print_standard_header(
__('Interface view').$subpage,
'',
false,
'',
true
true,
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
);
}

View File

@ -1,9 +1,8 @@
<?php
/**
* Extension to manage a list of gateways and the node address where they should
* point to.
* Empty Network editor.
*
* @category Extensions
* @category View
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
@ -27,6 +26,7 @@
* ============================================================================
*/
// Begin.
global $config;
// Check user credentials.
@ -203,12 +203,24 @@ if ($edit_networkmap) {
}
}
ui_print_page_header(
__('Networkmap'),
// Header.
ui_print_standard_header(
__('Network maps editor'),
'images/bricks.png',
false,
'network_map_enterprise_edit',
false
false,
[],
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('Networkmap'),
],
]
);
$id_snmp_l2_recon = db_get_value(

View File

@ -1,15 +1,32 @@
<?php
// ______ __ _______ _______ _______
// | __ \.---.-.-----.--| |.-----.----.---.-. | ___| | | __|
// | __/| _ | | _ || _ | _| _ | | ___| |__ |
// |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
//
// ============================================================================
// Copyright (c) 2007-2021 Artica Soluciones Tecnologicas, http://www.artica.es
// This code is NOT free software. This code is NOT licenced under GPL2 licence
// You cannnot redistribute it without written permission of copyright holder.
// ============================================================================
// Load global variables
/**
* Network map.
*
* @category View
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
global $config;
// Check user credentials.
@ -645,12 +662,24 @@ switch ($tab) {
<?php
}
ui_print_page_header(
__('Networkmap'),
// Header.
ui_print_standard_header(
__('List of network maps'),
'images/op_network.png',
false,
'',
false
false,
[],
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('Networkmap'),
],
]
);
echo $result_txt;

View File

@ -1,17 +1,32 @@
<?php
// This file is an example on how things must NEVER be done.
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global vars
/**
* Monitor Status View.
*
* @category View
* @package Pandora FMS
* @subpackage Monitoring.
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
global $config;
check_login();
@ -67,7 +82,7 @@ if (! defined('METACONSOLE')) {
switch ($section) {
case 'fields':
$buttons['fields']['active'] = true;
$subpage = ' - '.__('Custom fields');
$subpage = ' &raquo; '.__('Custom fields');
break;
default:
@ -75,13 +90,24 @@ if (! defined('METACONSOLE')) {
break;
}
ui_print_page_header(
// Header.
ui_print_standard_header(
__('Monitor detail').$subpage,
'',
'images/agent.png',
false,
'',
true,
$buttons
$buttons,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
);
if ($section == 'fields') {

View File

@ -1,17 +1,32 @@
<?php
/**
* Tactical View.
*
* @category View
* @package Pandora FMS
* @subpackage Monitoring.
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global vars
// Begin.
global $config;
require_once 'include/functions_events.php';
@ -46,17 +61,27 @@ if ($config['realtimestats'] == 0) {
$updated_time .= '</a>';
} else {
// $updated_info = __("Updated at realtime");
$updated_info = '';
$updated_info = '';
}
// Header.
ui_print_page_header(
ui_print_standard_header(
__('Tactical view'),
'',
false,
'',
false,
$updated_time
(array) $updated_time,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
);
// Currently this function makes loading this page is impossible. Change

View File

@ -1,7 +1,6 @@
<?php
/**
* Extension to manage a list of gateways and the node address where they should
* point to.
* Dashboards.
*
* @category Dashboards
* @package Pandora FMS
@ -27,6 +26,7 @@
* ============================================================================
*/
// Begin.
global $config;
require $config['homedir'].'/vendor/autoload.php';

View File

@ -275,7 +275,7 @@ foreach ($incidents_paginated as $key => $value) {
$table->data[$i][0] = '#'.$array_get_incidents[$key][0];
$table->data[$i][1] = '<a href="'.ui_get_full_url('index.php?sec=incident&sec2=operation/incidents/dashboard_detail_integriaims_incident&incident_id='.$array_get_incidents[$key][0]).'">';
$table->data[$i][1] .= $array_get_incidents[$key][3];
$table->data[$i][1] .= ui_print_truncate_text($array_get_incidents[$key][3], 160, false);
$table->data[$i][1] .= '</a>';
$table->data[$i][2] = $group_incident[$array_get_incidents[$key][8]];
$table->data[$i][3] = $status_incident[$array_get_incidents[$key][6]].' / '.$resolution_incident[$array_get_incidents[$key][12]];

View File

@ -1,6 +1,6 @@
<?php
/**
* Message Edition.
* Compose message view
*
* @category Workspace
* @package Pandora FMS
@ -82,13 +82,23 @@ $buttons['create_message'] = [
];
// Header.
ui_print_page_header(
__('Messages'),
ui_print_standard_header(
__('Compose message'),
'images/email_mc.png',
false,
'',
false,
$buttons
$buttons,
[
[
'link' => '',
'label' => __('Workspace'),
],
[
'link' => '',
'label' => __('Messages'),
],
]
);
// Read a message.
@ -381,4 +391,4 @@ html_print_div(
);
echo '</form>';
echo $jsOutput;
echo $jsOutput;

View File

@ -1,9 +1,8 @@
<?php
/**
* Extension to manage a list of gateways and the node address where they should
* point to.
* Sent / Received messages view.
*
* @category Extensions
* @category Workspace
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
@ -27,23 +26,24 @@
* ============================================================================
*/
// Begin.
require_once 'include/functions_messages.php';
global $config;
$delete_msg = get_parameter('delete_message', 0);
$multiple_delete = get_parameter('multiple_delete', 0);
$show_sent = get_parameter('show_sent', 0);
$show_sent = (bool) get_parameter('show_sent', false);
$mark_unread = get_parameter('mark_unread', 0);
$active_list = true;
$active_sent = false;
if ($show_sent !== 0) {
if ($show_sent === true) {
$active_list = false;
$active_sent = true;
}
$tabSelectedMessage = ($show_sent === true) ? __('Sent messages') : __('Received messages');
$buttons['message_list'] = [
'active' => $active_list,
@ -67,14 +67,25 @@ $buttons['create_message'] = [
).'</a>',
];
if (!is_ajax()) {
ui_print_page_header(
__('Messages'),
if (is_ajax() === false) {
// Header.
ui_print_standard_header(
$tabSelectedMessage,
'images/email_mc.png',
false,
'',
false,
$buttons
$buttons,
[
[
'link' => '',
'label' => __('Workspace'),
],
[
'link' => '',
'label' => __('Messages'),
],
]
);
}
@ -86,7 +97,7 @@ if ($mark_unread) {
if ($delete_msg) {
$id = (int) get_parameter('id');
if ($show_sent) {
if ($show_sent === true) {
$result = messages_delete_message_sent($id);
} else {
$result = messages_delete_message($id);
@ -104,7 +115,7 @@ if ($multiple_delete) {
$ids = (array) get_parameter('delete_multiple_messages', []);
foreach ($ids as $id) {
if ($show_sent) {
if ($show_sent === true) {
$result = messages_delete_message_sent($id);
} else {
$result = messages_delete_message($id);
@ -122,7 +133,7 @@ if ($multiple_delete) {
);
}
if ($show_sent) {
if ($show_sent === true) {
// Sent view.
$num_messages = messages_get_count_sent($config['id_user']);
if ($num_messages > 0 && !is_ajax()) {
@ -142,7 +153,7 @@ if ($show_sent) {
}
}
if (empty($messages)) {
if (empty($messages) === true) {
ui_print_info_message(
[
'no_close' => true,
@ -175,7 +186,7 @@ if (empty($messages)) {
$table->head[5] = html_print_checkbox('all_delete_messages', 0, false, true, false);
$table->head[0] = __('Status');
if ($show_sent) {
if ($show_sent === true) {
$table->head[1] = __('Destination');
} else {
$table->head[1] = __('Sender');
@ -194,7 +205,7 @@ if (empty($messages)) {
$data[0] = '';
if ($message['read'] == 1) {
if ($show_sent) {
if ($show_sent === true) {
$data[0] .= '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_edit&read_message=1&amp;show_sent=1&amp;id_message='.$message_id.'">';
$data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Click to read'), 'class' => 'invert_filter']);
$data[0] .= '</a>';
@ -204,7 +215,7 @@ if (empty($messages)) {
$data[0] .= '</a>';
}
} else {
if ($show_sent) {
if ($show_sent === true) {
$data[0] .= '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_edit&amp;read_message=1&amp;show_sent=1&amp;id_message='.$message_id.'">';
$data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Message unread - click to read'), 'class' => 'invert_filter']);
$data[0] .= '</a>';
@ -215,7 +226,7 @@ if (empty($messages)) {
}
}
if ($show_sent) {
if ($show_sent === true) {
$dest_user = get_user_fullname($message['dest']);
if (!$dest_user) {
$dest_user = $message['dest'];
@ -231,7 +242,7 @@ if (empty($messages)) {
$data[1] = $orig_user;
}
if ($show_sent) {
if ($show_sent === true) {
$data[2] = '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_edit&amp;read_message=1&show_sent=1&amp;id_message='.$message_id.'">';
} else {
$data[2] = '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_edit&amp;read_message=1&amp;id_message='.$message_id.'">';
@ -252,7 +263,7 @@ if (empty($messages)) {
);
$table->cellclass[][4] = 'action_buttons';
if ($show_sent) {
if ($show_sent === true) {
$data[4] = '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_list&show_sent=1&delete_message=1&id='.$message_id.'"
onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
} else {
@ -264,8 +275,8 @@ if (empty($messages)) {
}
}
if (!empty($messages)) {
if ($show_sent) {
if (empty($messages) === false) {
if ($show_sent === true) {
echo '<form method="post" action="index.php?sec=message_list&amp;sec2=operation/messages/message_list&show_sent=1">';
} else {
echo '<form method="post" action="index.php?sec=message_list&amp;sec2=operation/messages/message_list">';

View File

@ -173,16 +173,24 @@ if (is_metaconsole()) {
// Print header
ui_meta_print_header(__('Reporting'), '', $options);
} else {
ui_print_page_header(
// Header.
ui_print_standard_header(
reporting_get_name($id_report),
'images/op_reporting.png',
false,
'',
false,
$options,
false,
'',
55
[
[
'link' => '',
'label' => __('Reporting'),
],
[
'link' => '',
'label' => __('Custom reports'),
],
]
);
}

View File

@ -1,9 +1,8 @@
<?php
/**
* Extension to manage a list of gateways and the node address where they should
* point to.
* SMNP Browser view
*
* @category Extensions
* @category Monitoring
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
@ -27,6 +26,7 @@
* ============================================================================
*/
// Begin.
global $config;
require_once $config['homedir'].'/include/functions_snmp_browser.php';
ui_require_javascript_file('pandora_snmp_browser');
@ -42,7 +42,6 @@ if (!check_acl($config['id_user'], 0, 'AR')) {
// Header.
$url = 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_browser&pure='.$config['pure'];
if ($config['pure']) {
// Windowed.
@ -70,13 +69,24 @@ if ($config['pure']) {
$link['text'] .= '</a>';
}
ui_print_page_header(
// Header.
ui_print_standard_header(
__('SNMP Browser'),
'images/op_snmp.png',
false,
'snmp_browser_view',
false,
[$link]
[$link],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('SMNP'),
],
]
);
// SNMP tree container.

View File

@ -1,17 +1,32 @@
<?php
/**
* MIB Uploader view
*
* @category Monitoring
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2013-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global vars
// Begin.
global $config;
check_login();
@ -24,8 +39,26 @@ if (! check_acl($config['id_user'], 0, 'PM')) {
require_once 'include/functions_filemanager.php';
// Header
ui_print_page_header(__('MIB uploader'), 'images/op_snmp.png', false, '', false);
// Header.
ui_print_standard_header(
__('MIB uploader'),
'images/op_snmp.png',
false,
'',
false,
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('SMNP'),
],
]
);
if (isset($config['filemanager']['message'])) {
echo $config['filemanager']['message'];

View File

@ -81,8 +81,8 @@ $statistics['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/
).'</a>';
// Header
ui_print_page_header(
__('SNMP Console'),
ui_print_standard_header(
__('SNMP Statistics'),
'images/op_snmp.png',
false,
'',
@ -91,6 +91,16 @@ ui_print_page_header(
$fullscreen,
$list,
$statistics,
],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('SNMP'),
],
]
);

View File

@ -676,8 +676,8 @@ $trapcount = (int) db_get_value_sql($sql_count);
// No traps.
if (empty($traps)) {
// Header.
ui_print_page_header(
// Header
ui_print_standard_header(
__('SNMP Console'),
'images/op_snmp.png',
false,
@ -686,6 +686,16 @@ if (empty($traps)) {
[
$list,
$statistics,
],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('SNMP'),
],
]
);
@ -774,8 +784,8 @@ if (empty($traps)) {
ui_require_javascript_file('wz_jsgraphics');
ui_require_javascript_file('pandora_visual_console');
} else {
// Header.
ui_print_page_header(
// Header
ui_print_standard_header(
__('SNMP Console'),
'images/op_snmp.png',
false,
@ -785,6 +795,16 @@ if (empty($traps)) {
$fullscreen,
$list,
$statistics,
],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('SNMP'),
],
]
);
}

View File

@ -147,12 +147,29 @@ switch ($tab) {
break;
}
if (!is_metaconsole()) {
if (is_metaconsole() === false) {
if (!$strict_acl) {
$header_title = $header_title.' - '.$header_sub_title;
$header_title = $header_title.' &raquo; '.$header_sub_title;
}
ui_print_page_header($header_title, 'images/extensions.png', false, 'tree_view', false, $tabs);
ui_print_standard_header(
$header_title,
'images/extensions.png',
false,
'tree_view',
false,
$tabs,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('View'),
],
]
);
}
// ---------------------Tabs -------------------------------------------

View File

@ -1,9 +1,8 @@
<?php
/**
* Extension to manage a list of gateways and the node address where they should
* point to.
* User edition.
*
* @category Extensions
* @category Operation
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
@ -29,6 +28,7 @@
global $config;
$headerTitle = __('User detail editor');
// Load the header.
require $config['homedir'].'/operation/users/user_edit_header.php';

View File

@ -113,17 +113,23 @@ if (is_metaconsole()) {
$tab_name = 'User Notifications';
}
ui_print_page_header(
__('User detail editor'),
// Header.
ui_print_standard_header(
$headerTitle,
'images/user.png',
false,
$helpers,
false,
$buttons,
false,
'',
GENERIC_SIZE_TEXT,
'',
__('Workspace').ui_print_breadcrums($tab_name)
[
[
'link' => '',
'label' => __('Workspace'),
],
[
'link' => '',
'label' => __('Edit user'),
],
]
);
}

View File

@ -33,6 +33,7 @@ global $config;
require_once $config['homedir'].'/include/functions_notifications.php';
// Load the header.
$headerTitle = __('User notifications');
require $config['homedir'].'/operation/users/user_edit_header.php';
if (get_parameter('change_label', 0)) {

View File

@ -198,7 +198,7 @@ $options['view']['text'] = '<a href="index.php?sec=network&sec2=operation/visual
).'</a>';
$options['view']['active'] = true;
if (!is_metaconsole()) {
if (is_metaconsole() === false) {
if (!$config['pure']) {
$options['pure']['text'] = '<a href="index.php?sec=network&sec2=operation/visual_console/render_view&id='.$visualConsoleId.'&pure=1&refr='.$refr.'">'.html_print_image(
'images/full_screen.png',
@ -208,13 +208,25 @@ if (!is_metaconsole()) {
'class' => 'invert_filter',
]
).'</a>';
ui_print_page_header(
// Header.
ui_print_standard_header(
$visualConsoleName,
'images/visual_console.png',
false,
'visual_console_view',
false,
$options
$options,
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('Visual console'),
],
]
);
}
@ -465,7 +477,7 @@ if ($pure === true) {
// Check groups can access user.
$aclUserGroups = [];
if (!users_can_manage_group_all('AR')) {
if (users_can_manage_group_all('AR') === false) {
$aclUserGroups = array_keys(users_get_groups(false, 'AR'));
}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.754
%define release 210527
%define release 210601
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.754
%define release 210527
%define release 210601
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.754
%define release 210527
%define release 210601
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.754-210527
Version: 7.0NG.754-210601
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.754-210527"
pandora_version="7.0NG.754-210601"
package_cpan=0
package_pandora=1

View File

@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.754";
my $pandora_build = "210527";
my $pandora_build = "210601";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.754";
my $pandora_build = "210527";
my $pandora_build = "210601";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.754
%define release 210527
%define release 210601
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.754
%define release 210527
%define release 210601
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.754"
PI_BUILD="210527"
PI_BUILD="210601"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.754 Build 210527";
my $version = "7.0NG.754 Build 210601";
# Pandora server configuration
my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.754 Build 210527";
my $version = "7.0NG.754 Build 210601";
# save program name for logging
my $progname = basename($0);