mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'develop' into feature/NewView
This commit is contained in:
commit
2f5596ed9e
@ -1,5 +1,5 @@
|
||||
package: pandorafms-agent-unix
|
||||
Version: 6.0dev-150611
|
||||
Version: 6.0dev-150615
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0dev-150611"
|
||||
pandora_version="6.0dev-150615"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
@ -41,7 +41,7 @@ my $Sem = undef;
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '6.0dev';
|
||||
use constant AGENT_BUILD => '150611';
|
||||
use constant AGENT_BUILD => '150615';
|
||||
|
||||
# Commands to retrieve total memory information in kB
|
||||
use constant TOTALMEMORY_CMDS => {
|
||||
@ -510,6 +510,9 @@ sub parse_conf_modules($) {
|
||||
# Make the module run the first time
|
||||
$module->{'counter'} = $module->{'intensive_interval'};
|
||||
|
||||
# Replace macros
|
||||
replace_macros ($module);
|
||||
|
||||
push (@Modules, {%{$module}});
|
||||
} else {
|
||||
$module->{'func'} = \&module_plugin;
|
||||
@ -601,16 +604,20 @@ sub write_broker_conf($){
|
||||
my ($broker_agent) = @_;
|
||||
my $content = '';
|
||||
|
||||
# I don't think the following should be copied either: proxy_*
|
||||
my %ignored_tokens = (
|
||||
'broker_agent' => 1, 'agent_name_cmd' => 1, 'udp_server' => 1, 'cron_mode' => 1
|
||||
);
|
||||
|
||||
open (CONF_FILE, "$ConfDir/$ConfFile") or error ("Could not open file '$ConfDir/$ConfFile': $!.");
|
||||
open (BROKER_FILE, ">$ConfDir/${broker_agent}.conf") or error ("Could not write configuration file: $!");
|
||||
|
||||
while (my $line = <CONF_FILE>){
|
||||
while (my $line = <CONF_FILE>) {
|
||||
|
||||
my ( $token ) = $line =~ m/^\s*(\S+)(\s.*)?$/;
|
||||
# Skip tokens which should not be copied to broker configuration
|
||||
next if defined $ignored_tokens{$token};
|
||||
|
||||
# Skip broker definitions
|
||||
if ($line =~ m/^\s*broker_agent/) {
|
||||
next;
|
||||
}
|
||||
|
||||
# Change the agent name
|
||||
if ($line =~ m/^\s*#*\s*agent_name\s+/) {
|
||||
$line = "agent_name $broker_agent\n";
|
||||
@ -647,19 +654,6 @@ sub read_config (;$) {
|
||||
# Replace CRLF with LF
|
||||
$line =~ s/\r\n/\n/g;
|
||||
|
||||
# Store the custom fields
|
||||
|
||||
if (($line =~ m/^(custom_field\d+_name)\s+(.*)/) or ($line =~ m/^(custom_field\d+_value)\s+(.*)/)) {
|
||||
$Customfields{$1} = $2;
|
||||
next;
|
||||
}
|
||||
|
||||
# Save global macros
|
||||
if ($line =~ m/^macro(\S+)\s+(.*)/) {
|
||||
$Macros{$1} = $2;
|
||||
next;
|
||||
}
|
||||
|
||||
# Token search
|
||||
if (defined ($token)) {
|
||||
if ($line =~ /^\s*(\S+)\s+(.*)$/ && $1 eq $token) {
|
||||
@ -675,6 +669,20 @@ sub read_config (;$) {
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
# Store the custom fields
|
||||
|
||||
if (($line =~ m/^(custom_field\d+_name)\s+(.*)/) or ($line =~ m/^(custom_field\d+_value)\s+(.*)/)) {
|
||||
$Customfields{$1} = $2;
|
||||
next;
|
||||
}
|
||||
|
||||
# Save global macros
|
||||
if ($line =~ m/^macro(\S+)\s+(.*)/) {
|
||||
$Macros{$1} = $2;
|
||||
next;
|
||||
}
|
||||
|
||||
next if ($line =~ /^module\s*\w*/);
|
||||
|
||||
#Configuration token
|
||||
@ -872,7 +880,7 @@ sub send_buffered_xml_files () {
|
||||
while (my $xml_file = readdir(TEMPORAL)) {
|
||||
|
||||
# Skip non data files and symlinks
|
||||
next if ($xml_file !~ m/\.data$/ || -l "$Conf{'temporal'}/$xml_file");
|
||||
next if ($xml_file !~ m/^$Conf{'agent_name'}\.[0-9]+\.data$/ || -l "$Conf{'temporal'}/$xml_file");
|
||||
|
||||
my $rc = send_file ("$Conf{'temporal'}/$xml_file", 1);
|
||||
unlink ("$Conf{'temporal'}/$xml_file") if ($rc == 0);
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0dev
|
||||
%define release 150611
|
||||
%define release 150615
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0dev
|
||||
%define release 150611
|
||||
%define release 150615
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||
{}
|
||||
|
||||
Version
|
||||
{150611}
|
||||
{150615}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("6.0dev(Build 150611)")
|
||||
#define PANDORA_VERSION ("6.0dev(Build 150615)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
@ -11,7 +11,7 @@ BEGIN
|
||||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(6.0dev(Build 150611))"
|
||||
VALUE "ProductVersion", "(6.0dev(Build 150615))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
@ -116,11 +116,8 @@ Pandora_Wmi::isServiceRunning (string service_name) {
|
||||
if (str_state == "Running") {
|
||||
retval = 1;
|
||||
}
|
||||
else if (str_state == "Stopped") {
|
||||
retval = 0;
|
||||
}
|
||||
else {
|
||||
retval = -1;
|
||||
retval = 0;
|
||||
}
|
||||
dhFreeString (state);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-console
|
||||
Version: 6.0dev-150611
|
||||
Version: 6.0dev-150615
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0dev-150611"
|
||||
pandora_version="6.0dev-150615"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
812
pandora_console/godmode/setup/setup_visuals.php
Normal file → Executable file
812
pandora_console/godmode/setup/setup_visuals.php
Normal file → Executable file
@ -45,18 +45,445 @@ to add it there.
|
||||
require_once ('include/functions_themes.php');
|
||||
require_once ('include/functions_gis.php');
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '98%';
|
||||
$table->data = array ();
|
||||
|
||||
$row = 0;
|
||||
|
||||
$table->data[$row][0] = __('Date format string') . ui_print_help_icon("date_format", true);
|
||||
$table->data[$row][1] = '<em>'.__('Example').'</em> '.date ($config["date_format"]);
|
||||
$table->data[$row][1] .= html_print_input_text ('date_format', $config["date_format"], '', 30, 100, true);
|
||||
//----------------------------------------------------------------------
|
||||
// BEHAVIOUR CONFIGURATION
|
||||
//----------------------------------------------------------------------
|
||||
$table->colspan[$row][0] = 2;
|
||||
$table->data[$row][0] = __('Behaviour configuration') . '<hr>';
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Block size for pagination');
|
||||
$table->data[$row][1] = html_print_input_text ('block_size', $config["global_block_size"], '', 5, 5, true);
|
||||
$row++;
|
||||
|
||||
$values = array ();
|
||||
$values[5] = human_time_description_raw (5);
|
||||
$values[30] = human_time_description_raw (30);
|
||||
$values[SECONDS_1MINUTE] = human_time_description_raw(SECONDS_1MINUTE);
|
||||
$values[SECONDS_2MINUTES] = human_time_description_raw(SECONDS_2MINUTES);
|
||||
$values[SECONDS_5MINUTES] = human_time_description_raw(SECONDS_5MINUTES);
|
||||
$values[SECONDS_10MINUTES] = human_time_description_raw(SECONDS_10MINUTES);
|
||||
$values[SECONDS_30MINUTES] = human_time_description_raw(SECONDS_30MINUTES);
|
||||
|
||||
$table->data[$row][0] = __('Default interval for refresh on Visual Console') . ui_print_help_tip(__('This interval will affect to Visual Console pages'), true);
|
||||
$table->data[$row][1] = html_print_select ($values, 'vc_refr', $config["vc_refr"], '', 'N/A', 0, true, false, false);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Paginated module view');
|
||||
$table->data[$row][1] = html_print_checkbox('paginate_module', 1,
|
||||
$config['paginate_module'], true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Render data of module type is proc.');
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('render_proc', 1, '',
|
||||
$config["render_proc"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('render_proc', 0, '',
|
||||
$config["render_proc"], true);
|
||||
$row++;
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// STYLE CONFIGURATION
|
||||
//----------------------------------------------------------------------
|
||||
$table->colspan[$row][0] = 2;
|
||||
$table->data[$row][0] = __('Style configuration') . '<hr>';
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Style template');
|
||||
$table->data[$row][1] = html_print_select (themes_get_css (), 'style', $config["style"].'.css', '', '', '', true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Status icon set');
|
||||
$iconsets["default"] = __('Colors');
|
||||
$iconsets["faces"] = __('Faces');
|
||||
$iconsets["color_text"] = __('Colors and text');
|
||||
$table->data[$row][1] = html_print_select ($iconsets, 'status_images_set', $config["status_images_set"], '', '', '', true);
|
||||
$table->data[$row][1] .= " " . html_print_button(__("View"), 'status_set_preview', false, '', '', true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Login background') . ui_print_help_tip(__('You can place your custom images into the folder images/backgrounds/'), true);
|
||||
$backgrounds_list_jpg = list_files("images/backgrounds", "jpg", 1, 0);
|
||||
$backgrounds_list_gif = list_files("images/backgrounds", "gif", 1, 0);
|
||||
$backgrounds_list_png = list_files("images/backgrounds", "png", 1, 0);
|
||||
$backgrounds_list = array_merge($backgrounds_list_jpg, $backgrounds_list_png);
|
||||
$backgrounds_list = array_merge($backgrounds_list, $backgrounds_list_gif);
|
||||
asort($backgrounds_list);
|
||||
$table->data[$row][1] = html_print_select ($backgrounds_list,
|
||||
'login_background', $config["login_background"], '', __('Default'),
|
||||
'', true);
|
||||
$table->data[$row][1] .= " " . html_print_button(__("View"), 'login_background_preview', false, '', '', true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Custom logo') . ui_print_help_icon("custom_logo", true);
|
||||
$table->data[$row][1] = html_print_select(
|
||||
list_files('images/custom_logo', "png", 1, 0), 'custom_logo',
|
||||
$config["custom_logo"], '', '', '', true);
|
||||
$table->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_preview', false, '', '', true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Fixed header');
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('fixed_header', 1, '', $config["fixed_header"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('fixed_header', 0, '', $config["fixed_header"], true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Fixed menu');
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('fixed_menu', 1, '', $config["fixed_menu"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('fixed_menu', 0, '', $config["fixed_menu"], true);
|
||||
$row++;
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// GIS CONFIGURATION
|
||||
//----------------------------------------------------------------------
|
||||
$table->colspan[$row][0] = 2;
|
||||
$table->data[$row][0] = __('GIS configuration') . '<hr>';
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('GIS Labels') .
|
||||
ui_print_help_tip(__('This enabling this, you get a label with agent name in GIS maps. If you have lots of agents in the map, will be unreadable. Disabled by default.'), true);
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('gis_label', 1, '', $config["gis_label"], true).' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('gis_label', 0, '', $config["gis_label"], true);
|
||||
$row++;
|
||||
|
||||
$listIcons = gis_get_array_list_icons();
|
||||
$arraySelectIcon = array();
|
||||
foreach ($listIcons as $index => $value)
|
||||
$arraySelectIcon[$index] = $index;
|
||||
$table->data[$row][0] = __('Default icon in GIS') . ui_print_help_tip(__('Agent icon for GIS Maps. If set to "none", group icon will be used'), true);
|
||||
$table->data[$row][1] = html_print_select($arraySelectIcon,
|
||||
"gis_default_icon", $config["gis_default_icon"], "", __('None'),
|
||||
'', true);
|
||||
$table->data[$row][1] .= " " . html_print_button(__("View"), 'gis_icon_preview', false, '', '', true);
|
||||
$row++;
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// FONT AND TEXT CONFIGURATION
|
||||
//----------------------------------------------------------------------
|
||||
$table->colspan[$row][0] = 2;
|
||||
$table->data[$row][0] = __('Font and Text configuration') . '<hr>';
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Font path');
|
||||
$fonts = load_fonts();
|
||||
$table->data[$row][1] = html_print_select($fonts, 'fontpath', $config["fontpath"], '', '', 0, true);
|
||||
|
||||
$row++;
|
||||
|
||||
if($config['prominent_time'] == 'comparation') {
|
||||
$table->data[$row][0] = __('Font size');
|
||||
|
||||
$font_size_array = array(
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
6 => 6,
|
||||
7 => 7,
|
||||
8 => 8,
|
||||
9 => 9,
|
||||
10 => 10,
|
||||
11 => 11,
|
||||
12 => 12,
|
||||
13 => 13,
|
||||
14 => 14,
|
||||
15 => 15);
|
||||
|
||||
$table->data[$row][1] = html_print_select($font_size_array, 'font_size',
|
||||
$config["font_size"], '', '', 0, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Agent size text') . ui_print_help_tip(__('When the agent name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||
$table->data[$row][1] = __('Small:') . html_print_input_text ('agent_size_text_small', $config["agent_size_text_small"], '', 3, 3, true);
|
||||
$table->data[$row][1] .= ' ' . __('Normal:') . html_print_input_text ('agent_size_text_medium', $config["agent_size_text_medium"], '', 3, 3, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Module size text') . ui_print_help_tip(__('When the module name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||
$table->data[$row][1] = __('Small:') . html_print_input_text ('module_size_text_small', $config["module_size_text_small"], '', 3, 3, true);
|
||||
$table->data[$row][1] .= ' ' . __('Normal:') . html_print_input_text ('module_size_text_medium', $config["module_size_text_medium"], '', 3, 3, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Description size text') . ui_print_help_tip(__('When the description name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||
$table->data[$row][1] = html_print_input_text ('description_size_text', $config["description_size_text"], '', 3, 3, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Item title size text') .
|
||||
ui_print_help_tip(__('When the item title name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||
$table->data[$row][1] = html_print_input_text('item_title_size_text',
|
||||
$config["item_title_size_text"], '', 3, 3, true);
|
||||
$row++;
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// CHARS CONFIGURATION
|
||||
//----------------------------------------------------------------------
|
||||
$table->colspan[$row][0] = 2;
|
||||
$table->data[$row][0] = __('Charts configuration') . '<hr>';
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color (min)');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color1', $config["graph_color1"], '', 8, 8, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color (avg)');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color2', $config["graph_color2"], '', 8, 8, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color (max)');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color3', $config["graph_color3"], '', 8, 8, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #4');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color4', $config["graph_color4"], '', 8, 8, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #5');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color5', $config["graph_color5"], '', 8, 8, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #6');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color6', $config["graph_color6"], '', 8, 8, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #7');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color7', $config["graph_color7"], '', 8, 8, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #8');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color8', $config["graph_color8"], '', 8, 8, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #9');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color9', $config["graph_color9"], '', 8, 8, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #10');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color10', $config["graph_color10"], '', 8, 8, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph resolution (1-low, 5-high)');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_res', $config["graph_res"], '', 5, 5, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Default line thickness for the Custom Graph.');
|
||||
$table->data[$row][1] = html_print_input_text ('custom_graph_width',
|
||||
$config["custom_graph_width"], '', 5, 5, true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Use round corners');
|
||||
$table->data[$row][1] = __('Yes').' '.html_print_radio_button ('round_corner', 1, '', $config["round_corner"], true).' ';
|
||||
$table->data[$row][1] .= __('No').' '.html_print_radio_button ('round_corner', 0, '', $config["round_corner"], true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Interactive charts') .
|
||||
ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true);
|
||||
$table->data[$row][1] = __('Yes').' ' .
|
||||
html_print_radio_button ('flash_charts', 1, '', $config["global_flash_charts"], true).' ';
|
||||
$table->data[$row][1] .= __('No').' ' .
|
||||
html_print_radio_button ('flash_charts', 0, '', $config["global_flash_charts"], true);
|
||||
$row++;
|
||||
|
||||
if (!isset($config["short_module_graph_data"]))
|
||||
$config["short_module_graph_data"] = true;
|
||||
$table->data[$row][0] = __('Shortened module graph data');
|
||||
$table->data[$row][0] .= ui_print_help_tip(__('The data number of the module graphs will be rounded and shortened'), true);
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('short_module_graph_data', 1, '',
|
||||
$config["short_module_graph_data"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('short_module_graph_data', 0, '',
|
||||
$config["short_module_graph_data"], true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Type of module charts');
|
||||
$table->data[$row][1] = __('Area').' ' .
|
||||
html_print_radio_button ('type_module_charts', 'area', '',
|
||||
$config["type_module_charts"] == 'area', true).' ';
|
||||
$table->data[$row][1] .= __('Line').' ' .
|
||||
html_print_radio_button ('type_module_charts', 'line', '',
|
||||
$config["type_module_charts"] != 'area', true);
|
||||
$row++;
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// OTHER CONFIGURATION
|
||||
//----------------------------------------------------------------------
|
||||
$table->colspan[$row][0] = 2;
|
||||
$table->data[$row][0] = __('Other configuration') . '<hr>';
|
||||
$row++;
|
||||
|
||||
if (empty($config["vc_line_thickness"])) $config["vc_line_thickness"] = 2;
|
||||
$table->data[$row][0] = __('Default line thickness for the Visual Console') . ui_print_help_tip(__('This interval will affect to the lines between elements on the Visual Console'), true);
|
||||
$table->data[$row][1] = html_print_input_text ('vc_line_thickness', $config["vc_line_thickness"], '', 5, 5, true);
|
||||
$row++;
|
||||
|
||||
// For 5.1 Autohidden menu feature
|
||||
$table->data['autohidden'][0] = __('Autohidden menu');
|
||||
$table->data['autohidden'][1] = html_print_checkbox('autohidden_menu',
|
||||
1, $config['autohidden_menu'], true);
|
||||
|
||||
// Juanma (07/05/2014) New feature: Table for custom front page for reports
|
||||
$table->data[$row][0] = __('Custom report front page') .
|
||||
ui_print_help_tip(
|
||||
__('Custom report front page. It will be applied to all reports and templates by default.'), true);
|
||||
$table->data[$row][1] = html_print_checkbox('custom_report_front', 1,
|
||||
$config['custom_report_front'], true);
|
||||
$row++;
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$dirItems = scandir($config['homedir'] . '/images/custom_logo');
|
||||
foreach ($dirItems as $entryDir) {
|
||||
if (strstr($entryDir, '.jpg') !== false) {
|
||||
$customLogos['images/custom_logo/' . $entryDir] = $entryDir;
|
||||
}
|
||||
}
|
||||
|
||||
$_fonts = array();
|
||||
$dirFonts = scandir(_MPDF_TTFONTPATH);
|
||||
foreach ($dirFonts as $entryDir) {
|
||||
if (strstr($entryDir, '.ttf') !== false) {
|
||||
$_fonts[$entryDir] = $entryDir;
|
||||
}
|
||||
}
|
||||
|
||||
// Font
|
||||
$table->data['custom_report_front-font'][0] = __('Custom report front') . ' - ' . __('Font family');
|
||||
$table->data['custom_report_front-font'][1] = html_print_select ($_fonts,
|
||||
'custom_report_front_font', $config['custom_report_front_font'],
|
||||
false, __('Default'), '', true);
|
||||
|
||||
// Logo
|
||||
$table->data['custom_report_front-logo'][0] = __('Custom report front') . ' - ' .
|
||||
__('Custom logo') .
|
||||
ui_print_help_tip(
|
||||
__("The dir of custom logos is in your www Pandora Console in \"images/custom_logo\". You can upload more files (ONLY JPEG) in upload tool in console."), true);
|
||||
$table->data['custom_report_front-logo'][1] = html_print_select(
|
||||
$customLogos,
|
||||
'custom_report_front_logo',
|
||||
$config['custom_report_front_logo'],
|
||||
'showPreview()',
|
||||
__('Default'),
|
||||
'',
|
||||
true);
|
||||
// Preview
|
||||
$table->data['custom_report_front-preview'][0] = __('Custom report front') . ' - ' . 'Preview';
|
||||
if (empty($config['custom_report_front_logo'])) {
|
||||
$config['custom_report_front_logo'] = 'images/pandora_logo_white.jpg';
|
||||
}
|
||||
$table->data['custom_report_front-preview'][1] = '<span id="preview_image">' .
|
||||
html_print_image ($config['custom_report_front_logo'], true) . '</span>';
|
||||
|
||||
// Header
|
||||
$table->data['custom_report_front-header'][0] = __('Custom report front') . ' - ' . __('Header');
|
||||
$table->data['custom_report_front-header'][1] = html_print_textarea('custom_report_front_header', 5, 15,
|
||||
$config['custom_report_front_header'], 'style="width: 38em;"', true);
|
||||
|
||||
// First page
|
||||
$table->data['custom_report_front-first_page'][0] = __('Custom report front') . ' - ' . __('First page');
|
||||
$table->data['custom_report_front-first_page'][1] = html_print_textarea('custom_report_front_firstpage', 15, 15,
|
||||
$config['custom_report_front_firstpage'], 'style="width: 38em; height: 20em;"', true);
|
||||
|
||||
// Footer
|
||||
$table->data['custom_report_front-footer'][0] = __('Custom report front') . ' - ' . __('Footer');
|
||||
$table->data['custom_report_front-footer'][1] = html_print_textarea('custom_report_front_footer', 5, 15,
|
||||
$config['custom_report_front_footer'], 'style="width: 38em;"', true);
|
||||
|
||||
|
||||
|
||||
|
||||
$table->data[$row][0] = __('Show QR Code icon in the header');
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('show_qr_code_header', 1, '',
|
||||
$config["show_qr_code_header"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('show_qr_code_header', 0, '',
|
||||
$config["show_qr_code_header"], true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Custom graphviz directory') .
|
||||
ui_print_help_tip (__("Custom directory where the graphviz binaries are stored."), true);
|
||||
$table->data[$row][1] = html_print_input_text ('graphviz_bin_dir',
|
||||
$config["graphviz_bin_dir"], '', 50, 255, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Networkmap max width');
|
||||
$table->data[$row][1] = html_print_input_text ('networkmap_max_width',
|
||||
$config["networkmap_max_width"], '', 10, 20, true);
|
||||
$row++;
|
||||
|
||||
|
||||
|
||||
$table->data[$row][0] = __('Show only the group name');
|
||||
$table->data[$row][0] .= ui_print_help_tip(
|
||||
__('Show the group name instead the group icon.'), true);
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('show_group_name', 1, '',
|
||||
$config["show_group_name"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('show_group_name', 0, '',
|
||||
$config["show_group_name"], true);
|
||||
$row++;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$table->data[$row][0] = __('Date format string') . ui_print_help_icon("date_format", true);
|
||||
$table->data[$row][1] = '<em>'.__('Example').'</em> '.date ($config["date_format"]);
|
||||
$table->data[$row][1] .= html_print_input_text ('date_format', $config["date_format"], '', 30, 100, true);
|
||||
$row++;
|
||||
|
||||
if ($config['prominent_time'] == 'comparation') {
|
||||
$timestamp = false;
|
||||
$comparation = true;
|
||||
}
|
||||
@ -64,7 +491,6 @@ else if ($config['prominent_time'] == 'timestamp') {
|
||||
$timestamp = true;
|
||||
$comparation = false;
|
||||
}
|
||||
|
||||
$table->data[$row][0] = __('Timestamp or time comparation') . ui_print_help_icon ("time_stamp-comparation", true);
|
||||
$table->data[$row][1] = __('Comparation in rollover') . ' ';
|
||||
$table->data[$row][1] .= html_print_radio_button ('prominent_time', "comparation", '', $comparation, true);
|
||||
@ -73,63 +499,9 @@ $table->data[$row][1] .= html_print_radio_button ('prominent_time', "timestamp",
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color (min)');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color1', $config["graph_color1"], '', 8, 8, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color (avg)');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color2', $config["graph_color2"], '', 8, 8, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color (max)');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color3', $config["graph_color3"], '', 8, 8, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #4');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color4', $config["graph_color4"], '', 8, 8, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #5');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color5', $config["graph_color5"], '', 8, 8, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #6');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color6', $config["graph_color6"], '', 8, 8, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #7');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color7', $config["graph_color7"], '', 8, 8, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #8');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color8', $config["graph_color8"], '', 8, 8, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #9');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color9', $config["graph_color9"], '', 8, 8, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graph color #10');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_color10', $config["graph_color10"], '', 8, 8, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Graphic resolution (1-low, 5-high)');
|
||||
$table->data[$row][1] = html_print_input_text ('graph_res', $config["graph_res"], '', 5, 5, true);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// CUSTOM VALUES POST PROCESS
|
||||
//----------------------------------------------------------------------
|
||||
$row++;
|
||||
$table->data[$row][0] = __('Custom values post process');
|
||||
$table->data[$row][1] = "<table>";
|
||||
$table->data[$row][1] .= __('Value') . ': ' .
|
||||
@ -186,328 +558,6 @@ $table->data[$row][1] .= html_print_input_hidden ('interval_values', $config["in
|
||||
// This hidden field will be filled from jQuery before submit
|
||||
$table->data[$row][1] .= html_print_input_hidden ('interval_to_delete', '', true);
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
$row++;
|
||||
$table->data[$row][0] = __('Style template');
|
||||
$table->data[$row][1] = html_print_select (themes_get_css (), 'style', $config["style"].'.css', '', '', '', true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Block size for pagination');
|
||||
$table->data[$row][1] = html_print_input_text ('block_size', $config["global_block_size"], '', 5, 5, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Use round corners');
|
||||
$table->data[$row][1] = __('Yes').' '.html_print_radio_button ('round_corner', 1, '', $config["round_corner"], true).' ';
|
||||
$table->data[$row][1] .= __('No').' '.html_print_radio_button ('round_corner', 0, '', $config["round_corner"], true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Status icon set');
|
||||
$iconsets["default"] = __('Colors');
|
||||
$iconsets["faces"] = __('Faces');
|
||||
$iconsets["color_text"] = __('Colors and text');
|
||||
$table->data[$row][1] = html_print_select ($iconsets, 'status_images_set', $config["status_images_set"], '', '', '', true);
|
||||
$table->data[$row][1] .= " " . html_print_button(__("View"), 'status_set_preview', false, '', '', true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Font path');
|
||||
$fonts = load_fonts();
|
||||
$table->data[$row][1] = html_print_select($fonts, 'fontpath', $config["fontpath"], '', '', 0, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Font size');
|
||||
|
||||
$font_size_array = array(
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
6 => 6,
|
||||
7 => 7,
|
||||
8 => 8,
|
||||
9 => 9,
|
||||
10 => 10,
|
||||
11 => 11,
|
||||
12 => 12,
|
||||
13 => 13,
|
||||
14 => 14,
|
||||
15 => 15);
|
||||
|
||||
$table->data[$row][1] = html_print_select($font_size_array, 'font_size',
|
||||
$config["font_size"], '', '', 0, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Interactive charts') .
|
||||
ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true);
|
||||
$table->data[$row][1] = __('Yes').' ' .
|
||||
html_print_radio_button ('flash_charts', 1, '', $config["global_flash_charts"], true).' ';
|
||||
$table->data[$row][1] .= __('No').' ' .
|
||||
html_print_radio_button ('flash_charts', 0, '', $config["global_flash_charts"], true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Custom logo') . ui_print_help_icon("custom_logo", true);
|
||||
$table->data[$row][1] = html_print_select(
|
||||
list_files('images/custom_logo', "png", 1, 0), 'custom_logo',
|
||||
$config["custom_logo"], '', '', '', true);
|
||||
$table->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_preview', false, '', '', true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Login background') . ui_print_help_tip(__('You can place your custom images into the folder images/backgrounds/'), true);
|
||||
$backgrounds_list_jpg = list_files("images/backgrounds", "jpg", 1, 0);
|
||||
$backgrounds_list_gif = list_files("images/backgrounds", "gif", 1, 0);
|
||||
$backgrounds_list_png = list_files("images/backgrounds", "png", 1, 0);
|
||||
$backgrounds_list = array_merge($backgrounds_list_jpg, $backgrounds_list_png);
|
||||
$backgrounds_list = array_merge($backgrounds_list, $backgrounds_list_gif);
|
||||
asort($backgrounds_list);
|
||||
$table->data[$row][1] = html_print_select ($backgrounds_list,
|
||||
'login_background', $config["login_background"], '', __('Default'),
|
||||
'', true);
|
||||
$table->data[$row][1] .= " " . html_print_button(__("View"), 'login_background_preview', false, '', '', true);
|
||||
|
||||
$row++;
|
||||
|
||||
$values = array ();
|
||||
$values[5] = human_time_description_raw (5);
|
||||
$values[30] = human_time_description_raw (30);
|
||||
$values[SECONDS_1MINUTE] = human_time_description_raw(SECONDS_1MINUTE);
|
||||
$values[SECONDS_2MINUTES] = human_time_description_raw(SECONDS_2MINUTES);
|
||||
$values[SECONDS_5MINUTES] = human_time_description_raw(SECONDS_5MINUTES);
|
||||
$values[SECONDS_10MINUTES] = human_time_description_raw(SECONDS_10MINUTES);
|
||||
$values[SECONDS_30MINUTES] = human_time_description_raw(SECONDS_30MINUTES);
|
||||
|
||||
$table->data[$row][0] = __('Default interval for refresh on Visual Console') . ui_print_help_tip(__('This interval will affect to Visual Console pages'), true);
|
||||
$table->data[$row][1] = html_print_select ($values, 'vc_refr', $config["vc_refr"], '', 'N/A', 0, true, false, false);
|
||||
|
||||
$row++;
|
||||
|
||||
if (empty($config["vc_line_thickness"])) $config["vc_line_thickness"] = 2;
|
||||
$table->data[$row][0] = __('Default line thickness for the Visual Console') . ui_print_help_tip(__('This interval will affect to the lines between elements on the Visual Console'), true);
|
||||
$table->data[$row][1] = html_print_input_text ('vc_line_thickness', $config["vc_line_thickness"], '', 5, 5, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Agent size text') . ui_print_help_tip(__('When the agent name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||
$table->data[$row][1] = __('Small:') . html_print_input_text ('agent_size_text_small', $config["agent_size_text_small"], '', 3, 3, true);
|
||||
$table->data[$row][1] .= ' ' . __('Normal:') . html_print_input_text ('agent_size_text_medium', $config["agent_size_text_medium"], '', 3, 3, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Module size text') . ui_print_help_tip(__('When the module name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||
$table->data[$row][1] = __('Small:') . html_print_input_text ('module_size_text_small', $config["module_size_text_small"], '', 3, 3, true);
|
||||
$table->data[$row][1] .= ' ' . __('Normal:') . html_print_input_text ('module_size_text_medium', $config["module_size_text_medium"], '', 3, 3, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Description size text') . ui_print_help_tip(__('When the description name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||
$table->data[$row][1] = html_print_input_text ('description_size_text', $config["description_size_text"], '', 3, 3, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Item title size text') .
|
||||
ui_print_help_tip(__('When the item title name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||
$table->data[$row][1] = html_print_input_text('item_title_size_text',
|
||||
$config["item_title_size_text"], '', 3, 3, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('GIS Labels') .
|
||||
ui_print_help_tip(__('This enabling this, you get a label with agent name in GIS maps. If you have lots of agents in the map, will be unreadable. Disabled by default.'), true);
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('gis_label', 1, '', $config["gis_label"], true).' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('gis_label', 0, '', $config["gis_label"], true);
|
||||
|
||||
$row++;
|
||||
|
||||
$listIcons = gis_get_array_list_icons();
|
||||
|
||||
$arraySelectIcon = array();
|
||||
foreach ($listIcons as $index => $value) $arraySelectIcon[$index] = $index;
|
||||
|
||||
$table->data[$row][0] = __('Default icon in GIS') . ui_print_help_tip(__('Agent icon for GIS Maps. If set to "none", group icon will be used'), true);
|
||||
$table->data[$row][1] = html_print_select($arraySelectIcon,
|
||||
"gis_default_icon", $config["gis_default_icon"], "", __('None'),
|
||||
'', true);
|
||||
$table->data[$row][1] .= " " . html_print_button(__("View"), 'gis_icon_preview', false, '', '', true);
|
||||
|
||||
$row++;
|
||||
|
||||
// For 5.1 Autohidden menu feature
|
||||
|
||||
$table->data['autohidden'][0] = __('Autohidden menu');
|
||||
$table->data['autohidden'][1] = html_print_checkbox('autohidden_menu',
|
||||
1, $config['autohidden_menu'], true);
|
||||
|
||||
// Juanma (07/05/2014) New feature: Table for custom front page for reports
|
||||
|
||||
$table->data[$row][0] = __('Custom report front page') .
|
||||
ui_print_help_tip(__('Custom report front page. It will be applied to all reports and templates by default.'), true);
|
||||
$table->data[$row][1] = html_print_checkbox('custom_report_front', 1,
|
||||
$config['custom_report_front'], true);
|
||||
|
||||
$row++;
|
||||
|
||||
$dirItems = scandir($config['homedir'] . '/images/custom_logo');
|
||||
|
||||
foreach ($dirItems as $entryDir) {
|
||||
if (strstr($entryDir, '.jpg') !== false) {
|
||||
$customLogos['images/custom_logo/' . $entryDir] = $entryDir;
|
||||
}
|
||||
}
|
||||
|
||||
$_fonts = array();
|
||||
$dirFonts = scandir(_MPDF_TTFONTPATH);
|
||||
foreach ($dirFonts as $entryDir) {
|
||||
if (strstr($entryDir, '.ttf') !== false) {
|
||||
$_fonts[$entryDir] = $entryDir;
|
||||
}
|
||||
}
|
||||
|
||||
// Font
|
||||
$table->data['custom_report_front-font'][0] = __('Custom report front') . ' - ' . __('Font family');
|
||||
$table->data['custom_report_front-font'][1] = html_print_select ($_fonts,
|
||||
'custom_report_front_font', $config['custom_report_front_font'],
|
||||
false, __('Default'), '', true);
|
||||
|
||||
// Logo
|
||||
$table->data['custom_report_front-logo'][0] = __('Custom report front') . ' - ' .
|
||||
__('Custom logo') .
|
||||
ui_print_help_tip(
|
||||
__("The dir of custom logos is in your www Pandora Console in \"images/custom_logo\". You can upload more files (ONLY JPEG) in upload tool in console."), true);
|
||||
$table->data['custom_report_front-logo'][1] = html_print_select(
|
||||
$customLogos,
|
||||
'custom_report_front_logo',
|
||||
$config['custom_report_front_logo'],
|
||||
'showPreview()',
|
||||
__('Default'),
|
||||
'',
|
||||
true);
|
||||
|
||||
// Preview
|
||||
$table->data['custom_report_front-preview'][0] = __('Custom report front') . ' - ' . 'Preview';
|
||||
if (empty($config['custom_report_front_logo'])) {
|
||||
$config['custom_report_front_logo'] = 'images/pandora_logo_white.jpg';
|
||||
}
|
||||
$table->data['custom_report_front-preview'][1] = '<span id="preview_image">' .
|
||||
html_print_image ($config['custom_report_front_logo'], true) . '</span>';
|
||||
|
||||
// Header
|
||||
$table->data['custom_report_front-header'][0] = __('Custom report front') . ' - ' . __('Header');
|
||||
$table->data['custom_report_front-header'][1] = html_print_textarea('custom_report_front_header', 5, 15,
|
||||
$config['custom_report_front_header'], 'style="width: 38em;"', true);
|
||||
|
||||
// First page
|
||||
$table->data['custom_report_front-first_page'][0] = __('Custom report front') . ' - ' . __('First page');
|
||||
$table->data['custom_report_front-first_page'][1] = html_print_textarea('custom_report_front_firstpage', 15, 15,
|
||||
$config['custom_report_front_firstpage'], 'style="width: 38em; height: 20em;"', true);
|
||||
|
||||
// Footer
|
||||
$table->data['custom_report_front-footer'][0] = __('Custom report front') . ' - ' . __('Footer');
|
||||
$table->data['custom_report_front-footer'][1] = html_print_textarea('custom_report_front_footer', 5, 15,
|
||||
$config['custom_report_front_footer'], 'style="width: 38em;"', true);
|
||||
|
||||
|
||||
$table->data[$row][0] = __('Paginate module view');
|
||||
$table->data[$row][1] = html_print_checkbox('paginate_module', 1,
|
||||
$config['paginate_module'], true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Show QR Code icon in the header');
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('show_qr_code_header', 1, '',
|
||||
$config["show_qr_code_header"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('show_qr_code_header', 0, '',
|
||||
$config["show_qr_code_header"], true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Custom graphviz directory') .
|
||||
ui_print_help_tip (__("Custom directory where the graphviz binaries are stored."), true);
|
||||
$table->data[$row][1] = html_print_input_text ('graphviz_bin_dir',
|
||||
$config["graphviz_bin_dir"], '', 50, 255, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Networkmap max width');
|
||||
$table->data[$row][1] = html_print_input_text ('networkmap_max_width',
|
||||
$config["networkmap_max_width"], '', 10, 20, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Fixed header');
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('fixed_header', 1, '', $config["fixed_header"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('fixed_header', 0, '', $config["fixed_header"], true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Fixed menu');
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('fixed_menu', 1, '', $config["fixed_menu"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('fixed_menu', 0, '', $config["fixed_menu"], true);
|
||||
|
||||
$row++;
|
||||
|
||||
if (!isset($config["short_module_graph_data"]))
|
||||
$config["short_module_graph_data"] = true;
|
||||
|
||||
$table->data[$row][0] = __('Shortened module graph data');
|
||||
$table->data[$row][0] .= ui_print_help_tip(__('The data number of the module graphs will be rounded and shortened'), true);
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('short_module_graph_data', 1, '',
|
||||
$config["short_module_graph_data"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('short_module_graph_data', 0, '',
|
||||
$config["short_module_graph_data"], true);
|
||||
|
||||
$row++;
|
||||
|
||||
|
||||
$table->data[$row][0] = __('Show only the group name');
|
||||
$table->data[$row][0] .= ui_print_help_tip(
|
||||
__('Show the group name instead the group icon.'), true);
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('show_group_name', 1, '',
|
||||
$config["show_group_name"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('show_group_name', 0, '',
|
||||
$config["show_group_name"], true);
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Default line thickness for the Custom Graph.');
|
||||
$table->data[$row][1] = html_print_input_text ('custom_graph_widht',
|
||||
$config["custom_graph_widht"], '', 5, 5, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$table->data[$row][0] = __('Render data of module type is proc.');
|
||||
$table->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('render_proc', 1, '',
|
||||
$config["render_proc"], true) .
|
||||
' ';
|
||||
$table->data[$row][1] .= __('No') . ' ' .
|
||||
html_print_radio_button ('render_proc', 0, '',
|
||||
$config["render_proc"], true);
|
||||
|
||||
$row++;
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC150611';
|
||||
$build_version = 'PC150615';
|
||||
$pandora_version = 'v6.0dev';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
@ -66,33 +66,33 @@ define ('EVENT_STATUS_INPROCESS', 2);
|
||||
define ('EVENT_STATUS_VALIDATED', 1);
|
||||
|
||||
/* Seconds in a time unit constants */
|
||||
define('SECONDS_1MINUTE', 60);
|
||||
define('SECONDS_2MINUTES', 120);
|
||||
define('SECONDS_5MINUTES', 300);
|
||||
define('SECONDS_10MINUTES', 600);
|
||||
define('SECONDS_15MINUTES', 900);
|
||||
define('SECONDS_30MINUTES', 1800);
|
||||
define('SECONDS_1HOUR', 3600);
|
||||
define('SECONDS_2HOUR', 7200);
|
||||
define('SECONDS_3HOUR', 10800);
|
||||
define('SECONDS_5HOUR', 18000);
|
||||
define('SECONDS_6HOURS', 21600);
|
||||
define('SECONDS_12HOURS', 43200);
|
||||
define('SECONDS_1DAY', 86400);
|
||||
define('SECONDS_2DAY', 172800);
|
||||
define('SECONDS_4DAY', 345600);
|
||||
define('SECONDS_5DAY', 432000);
|
||||
define('SECONDS_1WEEK', 604800);
|
||||
define('SECONDS_10DAY', 864000);
|
||||
define('SECONDS_2WEEK', 1209600);
|
||||
define('SECONDS_15DAYS', 1296000);
|
||||
define('SECONDS_1MONTH', 2592000);
|
||||
define('SECONDS_2MONTHS', 5184000);
|
||||
define('SECONDS_3MONTHS', 7776000);
|
||||
define('SECONDS_6MONTHS', 15552000);
|
||||
define('SECONDS_1YEAR', 31104000);
|
||||
define('SECONDS_2YEARS', 62208000);
|
||||
define('SECONDS_3YEARS', 93312000);
|
||||
define('SECONDS_1MINUTE', 60);
|
||||
define('SECONDS_2MINUTES', 120);
|
||||
define('SECONDS_5MINUTES', 300);
|
||||
define('SECONDS_10MINUTES', 600);
|
||||
define('SECONDS_15MINUTES', 900);
|
||||
define('SECONDS_30MINUTES', 1800);
|
||||
define('SECONDS_1HOUR', 3600);
|
||||
define('SECONDS_2HOUR', 7200);
|
||||
define('SECONDS_3HOUR', 10800);
|
||||
define('SECONDS_5HOUR', 18000);
|
||||
define('SECONDS_6HOURS', 21600);
|
||||
define('SECONDS_12HOURS', 43200);
|
||||
define('SECONDS_1DAY', 86400);
|
||||
define('SECONDS_2DAY', 172800);
|
||||
define('SECONDS_4DAY', 345600);
|
||||
define('SECONDS_5DAY', 432000);
|
||||
define('SECONDS_1WEEK', 604800);
|
||||
define('SECONDS_10DAY', 864000);
|
||||
define('SECONDS_2WEEK', 1209600);
|
||||
define('SECONDS_15DAYS', 1296000);
|
||||
define('SECONDS_1MONTH', 2592000);
|
||||
define('SECONDS_2MONTHS', 5184000);
|
||||
define('SECONDS_3MONTHS', 7776000);
|
||||
define('SECONDS_6MONTHS', 15552000);
|
||||
define('SECONDS_1YEAR', 31104000);
|
||||
define('SECONDS_2YEARS', 62208000);
|
||||
define('SECONDS_3YEARS', 93312000);
|
||||
|
||||
|
||||
|
||||
@ -205,7 +205,7 @@ define('PROCESS_VALUE_AVG', 3);
|
||||
//Status
|
||||
define('VISUAL_MAP_STATUS_CRITICAL_BAD', 1);
|
||||
define('VISUAL_MAP_STATUS_CRITICAL_ALERT', 4);
|
||||
define('VISUAL_MAP_STATUS_NORMAL', 0);
|
||||
define('VISUAL_MAP_STATUS_NORMAL', 0);
|
||||
define('VISUAL_MAP_STATUS_WARNING', 2);
|
||||
define('VISUAL_MAP_STATUS_UNKNOWN', 3);
|
||||
define('VISUAL_MAP_STATUS_WARNING_ALERT', 10);
|
||||
@ -263,169 +263,174 @@ define ('STATUS_SERVER_DOWN', 'server_down.png');
|
||||
|
||||
/* Status images (ball) */
|
||||
//For modules
|
||||
define ('STATUS_MODULE_OK_BALL', 'module_ok_ball.png');
|
||||
define ('STATUS_MODULE_CRITICAL_BALL', 'module_critical_ball.png');
|
||||
define ('STATUS_MODULE_WARNING_BALL', 'module_warning_ball.png');
|
||||
define ('STATUS_MODULE_NO_DATA_BALL', 'module_no_data_ball.png');
|
||||
define ('STATUS_MODULE_UNKNOWN_BALL', 'module_unknown_ball.png');
|
||||
define ('STATUS_MODULE_OK_BALL', 'module_ok_ball.png');
|
||||
define ('STATUS_MODULE_CRITICAL_BALL', 'module_critical_ball.png');
|
||||
define ('STATUS_MODULE_WARNING_BALL', 'module_warning_ball.png');
|
||||
define ('STATUS_MODULE_NO_DATA_BALL', 'module_no_data_ball.png');
|
||||
define ('STATUS_MODULE_UNKNOWN_BALL', 'module_unknown_ball.png');
|
||||
//For agents
|
||||
define ('STATUS_AGENT_CRITICAL_BALL', 'agent_critical_ball.png');
|
||||
define ('STATUS_AGENT_WARNING_BALL', 'agent_warning_ball.png');
|
||||
define ('STATUS_AGENT_DOWN_BALL', 'agent_down_ball.png');
|
||||
define ('STATUS_AGENT_UNKNOWN_BALL', 'agent_unknown_ball.png');
|
||||
define ('STATUS_AGENT_OK_BALL', 'agent_ok_ball.png');
|
||||
define ('STATUS_AGENT_NO_DATA_BALL', 'agent_no_data_ball.png');
|
||||
define ('STATUS_AGENT_NO_MONITORS_BALL', 'agent_no_monitors_ball.png');
|
||||
define ('STATUS_AGENT_NOT_INIT_BALL', 'agent_notinit_ball.png');
|
||||
define ('STATUS_AGENT_CRITICAL_BALL', 'agent_critical_ball.png');
|
||||
define ('STATUS_AGENT_WARNING_BALL', 'agent_warning_ball.png');
|
||||
define ('STATUS_AGENT_DOWN_BALL', 'agent_down_ball.png');
|
||||
define ('STATUS_AGENT_UNKNOWN_BALL', 'agent_unknown_ball.png');
|
||||
define ('STATUS_AGENT_OK_BALL', 'agent_ok_ball.png');
|
||||
define ('STATUS_AGENT_NO_DATA_BALL', 'agent_no_data_ball.png');
|
||||
define ('STATUS_AGENT_NO_MONITORS_BALL', 'agent_no_monitors_ball.png');
|
||||
define ('STATUS_AGENT_NOT_INIT_BALL', 'agent_notinit_ball.png');
|
||||
//For alerts
|
||||
define ('STATUS_ALERT_FIRED_BALL', 'alert_fired_ball.png');
|
||||
define ('STATUS_ALERT_NOT_FIRED_BALL', 'alert_not_fired_ball.png');
|
||||
define ('STATUS_ALERT_DISABLED_BALL', 'alert_disabled_ball.png');
|
||||
define ('STATUS_ALERT_FIRED_BALL', 'alert_fired_ball.png');
|
||||
define ('STATUS_ALERT_NOT_FIRED_BALL', 'alert_not_fired_ball.png');
|
||||
define ('STATUS_ALERT_DISABLED_BALL', 'alert_disabled_ball.png');
|
||||
//For servers
|
||||
define ('STATUS_SERVER_OK_BALL', 'server_ok_ball.png');
|
||||
define ('STATUS_SERVER_DOWN_BALL', 'server_down_ball.png');
|
||||
define ('STATUS_SERVER_OK_BALL', 'server_ok_ball.png');
|
||||
define ('STATUS_SERVER_DOWN_BALL', 'server_down_ball.png');
|
||||
|
||||
|
||||
|
||||
/* Events criticity */
|
||||
define ('EVENT_CRIT_MAINTENANCE', 0);
|
||||
define ('EVENT_CRIT_INFORMATIONAL', 1);
|
||||
define ('EVENT_CRIT_NORMAL', 2);
|
||||
define ('EVENT_CRIT_MINOR', 5);
|
||||
define ('EVENT_CRIT_WARNING', 3);
|
||||
define ('EVENT_CRIT_MAJOR', 6);
|
||||
define ('EVENT_CRIT_CRITICAL', 4);
|
||||
define ('EVENT_CRIT_WARNING_OR_CRITICAL', 34);
|
||||
define ('EVENT_CRIT_NOT_NORMAL', 20);
|
||||
define ('EVENT_CRIT_MAINTENANCE', 0);
|
||||
define ('EVENT_CRIT_INFORMATIONAL', 1);
|
||||
define ('EVENT_CRIT_NORMAL', 2);
|
||||
define ('EVENT_CRIT_MINOR', 5);
|
||||
define ('EVENT_CRIT_WARNING', 3);
|
||||
define ('EVENT_CRIT_MAJOR', 6);
|
||||
define ('EVENT_CRIT_CRITICAL', 4);
|
||||
define ('EVENT_CRIT_WARNING_OR_CRITICAL', 34);
|
||||
define ('EVENT_CRIT_NOT_NORMAL', 20);
|
||||
|
||||
/* Id Module (more use in component)*/
|
||||
define ('MODULE_DATA', 1);
|
||||
define ('MODULE_NETWORK', 2);
|
||||
define ('MODULE_SNMP', 2);
|
||||
define ('MODULE_PLUGIN', 4);
|
||||
define ('MODULE_PREDICTION', 5);
|
||||
define ('MODULE_WMI', 6);
|
||||
define ('MODULE_WEB', 7);
|
||||
define ('MODULE_DATA', 1);
|
||||
define ('MODULE_NETWORK', 2);
|
||||
define ('MODULE_SNMP', 2);
|
||||
define ('MODULE_PLUGIN', 4);
|
||||
define ('MODULE_PREDICTION', 5);
|
||||
define ('MODULE_WMI', 6);
|
||||
define ('MODULE_WEB', 7);
|
||||
|
||||
/* Type of Modules of Prediction */
|
||||
define ('MODULE_PREDICTION_SERVICE', 2);
|
||||
define ('MODULE_PREDICTION_SYNTHETIC', 3);
|
||||
define ('MODULE_PREDICTION_NETFLOW', 4);
|
||||
define ('MODULE_PREDICTION_SERVICE', 2);
|
||||
define ('MODULE_PREDICTION_SYNTHETIC', 3);
|
||||
define ('MODULE_PREDICTION_NETFLOW', 4);
|
||||
|
||||
/* SNMP CONSTANTS */
|
||||
define('SNMP_DIR_MIBS', "attachment/mibs");
|
||||
define('SNMP_TRAP_TYPE_NONE', -1);
|
||||
define('SNMP_TRAP_TYPE_COLD_START', 0);
|
||||
define('SNMP_TRAP_TYPE_WARM_START', 1);
|
||||
define('SNMP_TRAP_TYPE_LINK_DOWN', 2);
|
||||
define('SNMP_TRAP_TYPE_LINK_UP', 3);
|
||||
define('SNMP_TRAP_TYPE_AUTHENTICATION_FAILURE', 4);
|
||||
define('SNMP_TRAP_TYPE_OTHER', 5);
|
||||
define('SNMP_DIR_MIBS', "attachment/mibs");
|
||||
|
||||
define('SNMP_TRAP_TYPE_NONE', -1);
|
||||
define('SNMP_TRAP_TYPE_COLD_START', 0);
|
||||
define('SNMP_TRAP_TYPE_WARM_START', 1);
|
||||
define('SNMP_TRAP_TYPE_LINK_DOWN', 2);
|
||||
define('SNMP_TRAP_TYPE_LINK_UP', 3);
|
||||
define('SNMP_TRAP_TYPE_AUTHENTICATION_FAILURE', 4);
|
||||
define('SNMP_TRAP_TYPE_OTHER', 5);
|
||||
|
||||
/* PASSWORD POLICIES */
|
||||
define('PASSSWORD_POLICIES_OK', 0);
|
||||
define('PASSSWORD_POLICIES_FIRST_CHANGE', 1);
|
||||
define('PASSSWORD_POLICIES_EXPIRED', 2);
|
||||
define('PASSSWORD_POLICIES_OK', 0);
|
||||
define('PASSSWORD_POLICIES_FIRST_CHANGE', 1);
|
||||
define('PASSSWORD_POLICIES_EXPIRED', 2);
|
||||
|
||||
/* SERVER TYPES */
|
||||
define('SERVER_TYPE_DATA', 0);
|
||||
define('SERVER_TYPE_NETWORK', 1);
|
||||
define('SERVER_TYPE_SNMP', 2);
|
||||
define('SERVER_TYPE_RECON', 3);
|
||||
define('SERVER_TYPE_PLUGIN', 4);
|
||||
define('SERVER_TYPE_PREDICTION', 5);
|
||||
define('SERVER_TYPE_WMI', 6);
|
||||
define('SERVER_TYPE_EXPORT', 7);
|
||||
define('SERVER_TYPE_INVENTORY', 8);
|
||||
define('SERVER_TYPE_WEB', 9);
|
||||
define('SERVER_TYPE_EVENT', 10);
|
||||
define('SERVER_TYPE_ENTERPRISE_ICMP', 11);
|
||||
define('SERVER_TYPE_ENTERPRISE_SNMP', 12);
|
||||
define('SERVER_TYPE_DATA', 0);
|
||||
define('SERVER_TYPE_NETWORK', 1);
|
||||
define('SERVER_TYPE_SNMP', 2);
|
||||
define('SERVER_TYPE_RECON', 3);
|
||||
define('SERVER_TYPE_PLUGIN', 4);
|
||||
define('SERVER_TYPE_PREDICTION', 5);
|
||||
define('SERVER_TYPE_WMI', 6);
|
||||
define('SERVER_TYPE_EXPORT', 7);
|
||||
define('SERVER_TYPE_INVENTORY', 8);
|
||||
define('SERVER_TYPE_WEB', 9);
|
||||
define('SERVER_TYPE_EVENT', 10);
|
||||
define('SERVER_TYPE_ENTERPRISE_ICMP', 11);
|
||||
define('SERVER_TYPE_ENTERPRISE_SNMP', 12);
|
||||
|
||||
/* REPORTS */
|
||||
define('REPORT_TOP_N_MAX', 1);
|
||||
define('REPORT_TOP_N_MIN', 2);
|
||||
define('REPORT_TOP_N_AVG', 0);
|
||||
define('REPORT_TOP_N_MAX', 1);
|
||||
define('REPORT_TOP_N_MIN', 2);
|
||||
define('REPORT_TOP_N_AVG', 0);
|
||||
|
||||
define('REPORT_TOP_N_ONLY_GRAPHS', 2);
|
||||
define('REPORT_TOP_N_SHOW_TABLE_GRAPS', 1);
|
||||
define('REPORT_TOP_N_ONLY_TABLE', 0);
|
||||
define('REPORT_TOP_N_ONLY_GRAPHS', 2);
|
||||
define('REPORT_TOP_N_SHOW_TABLE_GRAPS', 1);
|
||||
define('REPORT_TOP_N_ONLY_TABLE', 0);
|
||||
|
||||
define('REPORT_EXCEPTION_CONDITION_EVERYTHING', 0);
|
||||
define('REPORT_EXCEPTION_CONDITION_GE', 1);
|
||||
define('REPORT_EXCEPTION_CONDITION_LE', 5);
|
||||
define('REPORT_EXCEPTION_CONDITION_L', 2);
|
||||
define('REPORT_EXCEPTION_CONDITION_G', 6);
|
||||
define('REPORT_EXCEPTION_CONDITION_E', 7);
|
||||
define('REPORT_EXCEPTION_CONDITION_NE', 8);
|
||||
define('REPORT_EXCEPTION_CONDITION_OK', 3);
|
||||
define('REPORT_EXCEPTION_CONDITION_NOT_OK', 4);
|
||||
define('REPORT_EXCEPTION_CONDITION_EVERYTHING', 0);
|
||||
define('REPORT_EXCEPTION_CONDITION_GE', 1);
|
||||
define('REPORT_EXCEPTION_CONDITION_LE', 5);
|
||||
define('REPORT_EXCEPTION_CONDITION_L', 2);
|
||||
define('REPORT_EXCEPTION_CONDITION_G', 6);
|
||||
define('REPORT_EXCEPTION_CONDITION_E', 7);
|
||||
define('REPORT_EXCEPTION_CONDITION_NE', 8);
|
||||
define('REPORT_EXCEPTION_CONDITION_OK', 3);
|
||||
define('REPORT_EXCEPTION_CONDITION_NOT_OK', 4);
|
||||
|
||||
define('REPORT_ITEM_ORDER_BY_AGENT_NAME', 3);
|
||||
define('REPORT_ITEM_ORDER_BY_ASCENDING', 2);
|
||||
define('REPORT_ITEM_ORDER_BY_DESCENDING', 1);
|
||||
define('REPORT_ITEM_ORDER_BY_UNSORT', 0);
|
||||
define('REPORT_ITEM_ORDER_BY_AGENT_NAME', 3);
|
||||
define('REPORT_ITEM_ORDER_BY_ASCENDING', 2);
|
||||
define('REPORT_ITEM_ORDER_BY_DESCENDING', 1);
|
||||
define('REPORT_ITEM_ORDER_BY_UNSORT', 0);
|
||||
|
||||
define('REPORT_OLD_TYPE_SIMPLE_GRAPH', 1);
|
||||
define('REPORT_OLD_TYPE_CUSTOM_GRAPH', 2);
|
||||
define('REPORT_OLD_TYPE_SLA', 3);
|
||||
define('REPORT_OLD_TYPE_MONITOR_REPORT', 6);
|
||||
define('REPORT_OLD_TYPE_AVG_VALUE', 7);
|
||||
define('REPORT_OLD_TYPE_MAX_VALUE', 8);
|
||||
define('REPORT_OLD_TYPE_MIN_VALUE', 9);
|
||||
define('REPORT_OLD_TYPE_SUMATORY', 10);
|
||||
define('REPORT_OLD_TYPE_SIMPLE_GRAPH', 1);
|
||||
define('REPORT_OLD_TYPE_CUSTOM_GRAPH', 2);
|
||||
define('REPORT_OLD_TYPE_SLA', 3);
|
||||
define('REPORT_OLD_TYPE_MONITOR_REPORT', 6);
|
||||
define('REPORT_OLD_TYPE_AVG_VALUE', 7);
|
||||
define('REPORT_OLD_TYPE_MAX_VALUE', 8);
|
||||
define('REPORT_OLD_TYPE_MIN_VALUE', 9);
|
||||
define('REPORT_OLD_TYPE_SUMATORY', 10);
|
||||
|
||||
define('REPORT_GENERAL_NOT_GROUP_BY_AGENT', 0);
|
||||
define('REPORT_GENERAL_GROUP_BY_AGENT', 1);
|
||||
define('REPORT_GENERAL_NOT_GROUP_BY_AGENT', 0);
|
||||
define('REPORT_GENERAL_GROUP_BY_AGENT', 1);
|
||||
|
||||
define('REPORTING_CUSTOM_GRAPH_LEGEND_EACH_MODULE_VERTICAL_SIZE', 15);
|
||||
define('REPORTING_CUSTOM_GRAPH_LEGEND_EACH_MODULE_VERTICAL_SIZE', 15);
|
||||
|
||||
/* POLICIES */
|
||||
|
||||
define("POLICY_UPDATED", 0);
|
||||
define("POLICY_PENDING_DATABASE", 1);
|
||||
define("POLICY_PENDING_ALL", 2);
|
||||
define("POLICY_UPDATED", 0);
|
||||
define("POLICY_PENDING_DATABASE", 1);
|
||||
define("POLICY_PENDING_ALL", 2);
|
||||
|
||||
define("STATUS_IN_QUEUE_OUT", 0);
|
||||
define("STATUS_IN_QUEUE_IN", 1);
|
||||
define("STATUS_IN_QUEUE_APPLYING", 2);
|
||||
define("STATUS_IN_QUEUE_OUT", 0);
|
||||
define("STATUS_IN_QUEUE_IN", 1);
|
||||
define("STATUS_IN_QUEUE_APPLYING", 2);
|
||||
|
||||
define("MODULE_UNLINKED", 0);
|
||||
define("MODULE_LINKED", 1);
|
||||
define("MODULE_PENDING_UNLINK", 10);
|
||||
define("MODULE_PENDING_LINK", 11);
|
||||
define("MODULE_UNLINKED", 0);
|
||||
define("MODULE_LINKED", 1);
|
||||
define("MODULE_PENDING_UNLINK", 10);
|
||||
define("MODULE_PENDING_LINK", 11);
|
||||
|
||||
/* EVENTS */
|
||||
define("EVENTS_GOING_UNKNOWN" , 'going_unknown');
|
||||
define("EVENTS_UNKNOWN", 'unknown');
|
||||
define("EVENTS_ALERT_FIRED", 'alert_fired');
|
||||
define("EVENTS_ALERT_RECOVERED", 'alert_recovered');
|
||||
define("EVENTS_ALERT_CEASED", 'alert_ceased');
|
||||
define("EVENTS_ALERT_MANUAL_VALIDATION", 'alert_manual_validation');
|
||||
define("EVENTS_RECON_HOST_DETECTED", 'recon_host_detected');
|
||||
define("EVENTS_SYSTEM", 'system');
|
||||
define("EVENTS_ERROR", 'error');
|
||||
define("EVENTS_NEW_AGENT", 'new_agent');
|
||||
define("EVENTS_GOING_UP_WARNING", 'going_up_warning');
|
||||
define("EVENTS_GOING_UP_CRITICAL", 'going_up_critical');
|
||||
define("EVENTS_GOING_DOWN_WARNING", 'going_down_warning');
|
||||
define("EVENTS_GOING_DOWN_NORMAL", 'going_down_normal');
|
||||
define("EVENTS_GOING_DOWN_CRITICAL", 'going_down_critical');
|
||||
define("EVENTS_GOING_UP_NORMAL", 'going_up_normal');
|
||||
define("EVENTS_CONFIGURATION_CHANGE", 'configuration_change');
|
||||
define("EVENTS_GOING_UNKNOWN" , 'going_unknown');
|
||||
define("EVENTS_UNKNOWN", 'unknown');
|
||||
define("EVENTS_ALERT_FIRED", 'alert_fired');
|
||||
define("EVENTS_ALERT_RECOVERED", 'alert_recovered');
|
||||
define("EVENTS_ALERT_CEASED", 'alert_ceased');
|
||||
define("EVENTS_ALERT_MANUAL_VALIDATION", 'alert_manual_validation');
|
||||
define("EVENTS_RECON_HOST_DETECTED", 'recon_host_detected');
|
||||
define("EVENTS_SYSTEM", 'system');
|
||||
define("EVENTS_ERROR", 'error');
|
||||
define("EVENTS_NEW_AGENT", 'new_agent');
|
||||
define("EVENTS_GOING_UP_WARNING", 'going_up_warning');
|
||||
define("EVENTS_GOING_UP_CRITICAL", 'going_up_critical');
|
||||
define("EVENTS_GOING_DOWN_WARNING", 'going_down_warning');
|
||||
define("EVENTS_GOING_DOWN_NORMAL", 'going_down_normal');
|
||||
define("EVENTS_GOING_DOWN_CRITICAL", 'going_down_critical');
|
||||
define("EVENTS_GOING_UP_NORMAL", 'going_up_normal');
|
||||
define("EVENTS_CONFIGURATION_CHANGE", 'configuration_change');
|
||||
|
||||
/* CUSTOM GRAPHS */
|
||||
define("CUSTOM_GRAPH_AREA", 0);
|
||||
define("CUSTOM_GRAPH_STACKED_AREA", 1);
|
||||
define("CUSTOM_GRAPH_LINE", 2);
|
||||
define("CUSTOM_GRAPH_STACKED_LINE", 3);
|
||||
define("CUSTOM_GRAPH_AREA", 0);
|
||||
define("CUSTOM_GRAPH_STACKED_AREA", 1);
|
||||
define("CUSTOM_GRAPH_LINE", 2);
|
||||
define("CUSTOM_GRAPH_STACKED_LINE", 3);
|
||||
|
||||
/* COLLECTIONS */
|
||||
define("COLLECTION_PENDING_APPLY", 0);
|
||||
define("COLLECTION_CORRECT", 1);
|
||||
define("COLLECTION_ERROR_LOST_DIRECTORY", 2);
|
||||
define("COLLECTION_UNSAVED", 3);
|
||||
define("COLLECTION_PENDING_APPLY", 0);
|
||||
define("COLLECTION_CORRECT", 1);
|
||||
define("COLLECTION_ERROR_LOST_DIRECTORY", 2);
|
||||
define("COLLECTION_UNSAVED", 3);
|
||||
|
||||
/* PAGINATION */
|
||||
define("PAGINATION_BLOCKS_LIMIT", 15);
|
||||
define("PAGINATION_BLOCKS_LIMIT", 15);
|
||||
|
||||
/* CHARTS */
|
||||
define("CHART_DEFAULT_WIDTH", 150);
|
||||
define("CHART_DEFAULT_HEIGHT", 110);
|
||||
?>
|
||||
|
@ -457,8 +457,10 @@ function config_update_config () {
|
||||
$error_update[] = __('Shortened module graph data');
|
||||
if (!config_update_value ('show_group_name', get_parameter('show_group_name')))
|
||||
$error_update[] = __('Show the group name instead the group icon.');
|
||||
if (!config_update_value ('custom_graph_widht', (int) get_parameter('custom_graph_widht', 1)))
|
||||
if (!config_update_value ('custom_graph_width', (int) get_parameter('custom_graph_width', 1)))
|
||||
$error_update[] = __('Default line thickness for the Custom Graph.');
|
||||
if (!config_update_value ('type_module_charts', (string) get_parameter('type_module_charts', 'area')))
|
||||
$error_update[] = __('Default type of module charts.');
|
||||
if (!config_update_value ('render_proc', (bool) get_parameter('render_proc', false)))
|
||||
$error_update[] = __('Render data of module type is proc.');
|
||||
|
||||
@ -1248,9 +1250,14 @@ function config_process_config () {
|
||||
config_update_value ('show_group_name', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['custom_graph_widht'])) {
|
||||
config_update_value ('custom_graph_widht', 1);
|
||||
if (!isset($config['custom_graph_width'])) {
|
||||
config_update_value ('custom_graph_width', 1);
|
||||
}
|
||||
|
||||
if (!isset($config['type_module_charts'])) {
|
||||
config_update_value ('type_module_charts', 'area');
|
||||
}
|
||||
|
||||
if (!isset($config['render_proc'])) {
|
||||
config_update_value ('render_proc', 0);
|
||||
}
|
||||
|
@ -742,12 +742,12 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
||||
$series_suffix_str = ' (' . __('Previous') . ')';
|
||||
// Build the data of the previous period
|
||||
|
||||
grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
|
||||
$width, $height, $title, $unit_name,
|
||||
$show_alerts, $avg_only,
|
||||
$date-$period, $unit, $baseline, $return_data, $show_title,
|
||||
$projection, $adapt_key, $compare,
|
||||
$series_suffix, $series_suffix_str, $show_unknown);
|
||||
grafico_modulo_sparse_data ($agent_module_id, $period,
|
||||
$show_events, $width, $height, $title, $unit_name,
|
||||
$show_alerts, $avg_only, $date-$period, $unit, $baseline,
|
||||
$return_data, $show_title, $projection, $adapt_key,
|
||||
$compare, $series_suffix, $series_suffix_str,
|
||||
$show_unknown);
|
||||
|
||||
switch ($compare) {
|
||||
case 'separated':
|
||||
@ -759,7 +759,8 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
||||
$color_prev = $color;
|
||||
break;
|
||||
case 'overlapped':
|
||||
// Store the chart calculated deleting index, because will be over the current period
|
||||
// Store the chart calculated deleting index,
|
||||
// because will be over the current period
|
||||
$chart_prev = array_values($chart);
|
||||
$legend_prev = $legend;
|
||||
$series_type_prev = $series_type;
|
||||
@ -806,26 +807,64 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
||||
$config['homedir'] . "/images/logo_vertical_water.png",
|
||||
'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false));
|
||||
|
||||
if ($compare === 'separated') {
|
||||
return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend,
|
||||
$long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl,
|
||||
$series_type, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false,
|
||||
$series_suffix_str, $menu, $backgroundColor).
|
||||
'<br>'.
|
||||
area_graph($flash_chart, $chart_prev, $width, $height/2, $color_prev, $legend_prev,
|
||||
$long_index_prev, ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl,
|
||||
$series_type_prev, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false,
|
||||
$series_suffix_str, $menu, $backgroundColor);
|
||||
if ($config['type_module_charts'] === 'area') {
|
||||
if ($compare === 'separated') {
|
||||
return
|
||||
area_graph($flash_chart, $chart, $width, $height/2, $color,
|
||||
$legend, $long_index,
|
||||
ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark, $config['fontpath'],
|
||||
$config['font_size'], $unit, $ttl, $series_type,
|
||||
$chart_extra_data, $warning_min, $critical_min,
|
||||
$adapt_key, false, $series_suffix_str, $menu,
|
||||
$backgroundColor).
|
||||
'<br>'.
|
||||
area_graph($flash_chart, $chart_prev, $width, $height/2,
|
||||
$color_prev, $legend_prev, $long_index_prev,
|
||||
ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark, $config['fontpath'],
|
||||
$config['font_size'], $unit, $ttl, $series_type_prev,
|
||||
$chart_extra_data, $warning_min, $critical_min,
|
||||
$adapt_key, false, $series_suffix_str, $menu,
|
||||
$backgroundColor);
|
||||
}
|
||||
else {
|
||||
// Color commented not to restrict serie colors
|
||||
return
|
||||
area_graph($flash_chart, $chart, $width, $height, $color,
|
||||
$legend, $long_index,
|
||||
ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark, $config['fontpath'],
|
||||
$config['font_size'], $unit, $ttl, $series_type,
|
||||
$chart_extra_data, $warning_min, $critical_min,
|
||||
$adapt_key, false, $series_suffix_str, $menu,
|
||||
$backgroundColor);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Color commented not to restrict serie colors
|
||||
return area_graph($flash_chart, $chart, $width, $height, $color, $legend,
|
||||
$long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark, $config['fontpath'], $config['font_size'], $unit, $ttl,
|
||||
$series_type, $chart_extra_data, $warning_min, $critical_min, $adapt_key, false,
|
||||
$series_suffix_str, $menu, $backgroundColor);
|
||||
elseif ($config['type_module_charts'] === 'line') {
|
||||
if ($compare === 'separated') {
|
||||
return
|
||||
line_graph($flash_chart, $chart, $width, $height/2, $color,
|
||||
$legend, $long_index,
|
||||
ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $water_mark, $config['fontpath'],
|
||||
$config['font_size'], $unit, $ttl, $homeurl, $backgroundColor).
|
||||
'<br>'.
|
||||
line_graph($flash_chart, $chart_prev, $width, $height/2, $color,
|
||||
$legend, $long_index,
|
||||
ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $water_mark, $config['fontpath'],
|
||||
$config['font_size'], $unit, $ttl, $homeurl, $backgroundColor);
|
||||
}
|
||||
else {
|
||||
// Color commented not to restrict serie colors
|
||||
return
|
||||
line_graph($flash_chart, $chart, $width, $height, $color,
|
||||
$legend, $long_index,
|
||||
ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $water_mark, $config['fontpath'],
|
||||
$config['font_size'], $unit, $ttl, $homeurl, $backgroundColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -944,7 +983,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
||||
else {
|
||||
$module_number = count ($module_list);
|
||||
}
|
||||
|
||||
|
||||
$names_number = count($name_list);
|
||||
$units_number = count($unit_list);
|
||||
|
||||
@ -1008,7 +1047,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
||||
modules_get_agentmodule_name ($agent_module_id));
|
||||
$module_name = sprintf(__("projection for %s"), $module_name);
|
||||
$module_name = ui_print_truncate_text($module_name, 'module_small', false, true, false, '...', false);
|
||||
|
||||
|
||||
$module_name_list[$i] = $agent_name ." / ". $module_name;
|
||||
}
|
||||
|
||||
@ -1035,10 +1074,10 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
||||
$module_name = io_safe_output(
|
||||
modules_get_agentmodule_name ($agent_module_id));
|
||||
$module_name = ui_print_truncate_text($module_name, 'module_small', false, true, false, '...', false);
|
||||
|
||||
|
||||
$module_name_list[$i] = $agent_name . " / " . $module_name;
|
||||
}
|
||||
|
||||
|
||||
$id_module_type = modules_get_agentmodule_type ($agent_module_id);
|
||||
$module_type = modules_get_moduletype_name ($id_module_type);
|
||||
$uncompressed_module = is_module_uncompressed ($module_type);
|
||||
@ -1228,7 +1267,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
||||
$avg = round($avg / $countAvg, 1);
|
||||
|
||||
$graph_stats = get_graph_statistics($graph_values[$i]);
|
||||
|
||||
|
||||
if (!isset($config["short_module_graph_data"]))
|
||||
$config["short_module_graph_data"] = true;
|
||||
|
||||
@ -1242,17 +1281,17 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
||||
$min = sprintf("%sM", number_format($min / 1000000, 2));
|
||||
else if ($min > 1000)
|
||||
$min = sprintf("%sK", number_format($min / 1000, 2));
|
||||
|
||||
|
||||
if ($max > 1000000)
|
||||
$max = sprintf("%sM", number_format($max / 1000000, 2));
|
||||
else if ($max > 1000)
|
||||
$max = sprintf("%sK", number_format($max / 1000, 2));
|
||||
|
||||
|
||||
if ($avg > 1000000)
|
||||
$avg = sprintf("%sM", number_format($avg / 1000000, 2));
|
||||
else if ($avg > 1000)
|
||||
$avg = sprintf("%sK", number_format($avg / 1000, 2));
|
||||
|
||||
|
||||
if ($last > 1000000)
|
||||
$last = sprintf("%sM", number_format($last / 1000000, 2));
|
||||
else if ($last > 1000)
|
||||
@ -1265,7 +1304,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
||||
$last = number_format($graph_stats['last'], 2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!empty($unit_list) && $units_number == $module_number && isset($unit_list[$i])) {
|
||||
$unit = $unit_list[$i];
|
||||
}
|
||||
@ -3334,25 +3373,52 @@ function grafico_modulo_boolean ($agent_module_id, $period, $show_events,
|
||||
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
'url' => ui_get_full_url("/images/logo_vertical_water.png", false, false, false));
|
||||
|
||||
if ($compare === 'separated') {
|
||||
return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend,
|
||||
$long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark,
|
||||
$config['fontpath'], $config['font_size'], $unit, 1, $series_type,
|
||||
$chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str, $menu).
|
||||
'<br>'.
|
||||
area_graph($flash_chart, $chart_prev, $width, $height/2, $color_prev, $legend_prev,
|
||||
$long_index_prev, ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark,
|
||||
$config['fontpath'], $config['font_size'], $unit, 1, $series_type_prev,
|
||||
$chart_extra_data_prev, 0, 0, $adapt_key, false, $series_suffix_str, $menu);
|
||||
if ($config['type_module_charts'] === 'area') {
|
||||
if ($compare === 'separated') {
|
||||
return area_graph($flash_chart, $chart, $width, $height/2, $color, $legend,
|
||||
$long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark,
|
||||
$config['fontpath'], $config['font_size'], $unit, 1, $series_type,
|
||||
$chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str, $menu).
|
||||
'<br>'.
|
||||
area_graph($flash_chart, $chart_prev, $width, $height/2, $color_prev, $legend_prev,
|
||||
$long_index_prev, ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark,
|
||||
$config['fontpath'], $config['font_size'], $unit, 1, $series_type_prev,
|
||||
$chart_extra_data_prev, 0, 0, $adapt_key, false, $series_suffix_str, $menu);
|
||||
}
|
||||
else {
|
||||
return area_graph($flash_chart, $chart, $width, $height, $color, $legend,
|
||||
$long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark,
|
||||
$config['fontpath'], $config['font_size'], $unit, 1, $series_type,
|
||||
$chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str, $menu);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return area_graph($flash_chart, $chart, $width, $height, $color, $legend,
|
||||
$long_index, ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl, $water_mark,
|
||||
$config['fontpath'], $config['font_size'], $unit, 1, $series_type,
|
||||
$chart_extra_data, 0, 0, $adapt_key, false, $series_suffix_str, $menu);
|
||||
elseif ($config['type_module_charts'] === 'line') {
|
||||
if ($compare === 'separated') {
|
||||
return
|
||||
line_graph($flash_chart, $chart, $width, $height/2, $color,
|
||||
$legend, $long_index,
|
||||
ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $water_mark, $config['fontpath'],
|
||||
$config['font_size'], $unit, $ttl, $homeurl, $backgroundColor).
|
||||
'<br>'.
|
||||
line_graph($flash_chart, $chart_prev, $width, $height/2, $color,
|
||||
$legend, $long_index,
|
||||
ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $water_mark, $config['fontpath'],
|
||||
$config['font_size'], $unit, $ttl, $homeurl, $backgroundColor);
|
||||
}
|
||||
else {
|
||||
// Color commented not to restrict serie colors
|
||||
return
|
||||
line_graph($flash_chart, $chart, $width, $height, $color,
|
||||
$legend, $long_index,
|
||||
ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $water_mark, $config['fontpath'],
|
||||
$config['font_size'], $unit, $ttl, $homeurl, $backgroundColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3855,10 +3921,20 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
||||
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false));
|
||||
|
||||
return area_graph($flash_chart, $chart, $width, $height, $color,
|
||||
$legend, array(), '', "", $unit, $homeurl,
|
||||
$water_mark, $config['fontpath'], $config['font_size'], $unit,
|
||||
1, array(), array(), 0, 0, $adapt_key, true, '', $menu);
|
||||
if ($config['type_module_charts'] === 'area') {
|
||||
return area_graph($flash_chart, $chart, $width, $height, $color,
|
||||
$legend, array(), '', "", $unit, $homeurl,
|
||||
$water_mark, $config['fontpath'], $config['font_size'], $unit,
|
||||
1, array(), array(), 0, 0, $adapt_key, true, '', $menu);
|
||||
}
|
||||
else {
|
||||
return
|
||||
line_graph($flash_chart, $chart, $width, $height, $color,
|
||||
$legend, $long_index,
|
||||
ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $water_mark, $config['fontpath'],
|
||||
$config['font_size'], $unit, $ttl, $homeurl, $backgroundColor);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -118,8 +118,8 @@ function html_print_side_layer ($params) {
|
||||
// Check mandatory values, if any of them is missed, return ''
|
||||
$mandatory = array('icon_closed', 'body_text');
|
||||
|
||||
foreach($mandatory as $man) {
|
||||
if(!isset($params[$man])) {
|
||||
foreach ($mandatory as $man) {
|
||||
if (!isset($params[$man])) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@ -141,15 +141,15 @@ function html_print_side_layer ($params) {
|
||||
'icon_open' => $params['icon_closed']
|
||||
);
|
||||
|
||||
foreach($defaults as $token => $value) {
|
||||
if(!isset($params[$token])) {
|
||||
foreach ($defaults as $token => $value) {
|
||||
if (!isset($params[$token])) {
|
||||
$params[$token] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
//z-index is 1 because 2 made the calendar show under the side_layer
|
||||
|
||||
switch($params['position']) {
|
||||
switch ($params['position']) {
|
||||
case 'left':
|
||||
$round_class = 'menu_sidebar_radius_right';
|
||||
$body_float = 'left';
|
||||
@ -166,29 +166,36 @@ function html_print_side_layer ($params) {
|
||||
$button_float = 'left';
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$out_html = '<div id="side_layer" class="menu_sidebar ' . $round_class . '" style="display:none; z-index:1; overflow: hidden; height: ' . $params['height'] . '; width: ' . $params['width'] . ';">';
|
||||
|
||||
|
||||
$table->id = 'side_layer_layout';
|
||||
$table->width = $params['width'] . 'px';
|
||||
$table->cellspacing = 2;
|
||||
$table->cellpadding = 2;
|
||||
$table->class = 'none';
|
||||
|
||||
$top = '<div id="side_top_text" style="width: 100%";">' . $params['top_text'] . '</div>';
|
||||
|
||||
$top = '<div id="side_top_text" style="width: 100%";">' .
|
||||
$params['top_text'] . '</div>';
|
||||
|
||||
$button = '<div id="show_menu" style="vertical-align: middle; position: relative; width: ' . $params['icon_width'] . 'px; padding-right: 17px; text-align: right; height: ' . $params['icon_height'] . 'px;">';
|
||||
$button .= html_print_image($params['position'] == 'left' ? $params['icon_open'] : $params['icon_closed'], true, array('id' => 'graph_menu_arrow'));
|
||||
$button .= html_print_image(
|
||||
$params['position'] == 'left' ?
|
||||
$params['icon_open']
|
||||
:
|
||||
$params['icon_closed'],
|
||||
true, array('id' => 'graph_menu_arrow'));
|
||||
$button .= '</div>';
|
||||
|
||||
$body = '<div id="side_body_text" style="width: 100%;">' . $params['body_text'] . '</div>';
|
||||
|
||||
$bottom = '<div id="side_bottom_text" style="text-align: ' . $params['position'] . ';">' . $params['bottom_text'] . '</div>';
|
||||
|
||||
switch($params['position']) {
|
||||
$bottom = '<div id="side_bottom_text" style="text-align: ' . $params['position'] . ';">' .
|
||||
$params['bottom_text'] . '</div>';
|
||||
|
||||
switch ($params['position']) {
|
||||
case 'left':
|
||||
$table->size[1] = '15%';
|
||||
|
||||
|
||||
$table->data[0][0] = $top;
|
||||
$table->data[0][1] = '';
|
||||
$table->rowclass[0] = '';
|
||||
@ -197,7 +204,7 @@ function html_print_side_layer ($params) {
|
||||
|
||||
$table->data[1][1] = $button;
|
||||
$table->rowclass[1] = '';
|
||||
|
||||
|
||||
$table->data[2][0] = $bottom;
|
||||
$table->data[2][1] = '';
|
||||
$table->rowclass[2] = '';
|
||||
@ -213,7 +220,7 @@ function html_print_side_layer ($params) {
|
||||
|
||||
$table->data[1][1] = $body;
|
||||
$table->rowclass[1] = '';
|
||||
|
||||
|
||||
$table->data[2][0] = '';
|
||||
$table->data[2][1] = $bottom;
|
||||
$table->rowclass[2] = '';
|
||||
@ -222,23 +229,23 @@ function html_print_side_layer ($params) {
|
||||
$table->data[0][0] = $button;
|
||||
$table->cellstyle[0][0] = 'text-align: center;';
|
||||
$table->rowclass[0] = '';
|
||||
|
||||
|
||||
$table->data[1][0] = $top;
|
||||
$table->rowclass[1] = '';
|
||||
|
||||
|
||||
$table->data[2][0] = $body;
|
||||
$table->rowclass[2] = '';
|
||||
|
||||
|
||||
$table->data[3][0] = $bottom;
|
||||
$table->rowclass[3] = '';
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$out_html .= html_print_table($table, true);
|
||||
|
||||
$out_html .= '</div>';
|
||||
|
||||
|
||||
$out_js = "<script type='text/javascript'>
|
||||
<!--
|
||||
hidded_sidebar('" . $params['position'] . "', " . $params['width'] . ", '" . $params['height'] . "', " . $params['icon_width'] . ",
|
||||
|
@ -7805,4 +7805,54 @@ function reporting_get_stats_servers($tiny = true) {
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the template graphs a user can see.
|
||||
*
|
||||
* @param $id_user User id to check.
|
||||
* @param $only_names Wheter to return only graphs names in an associative array
|
||||
* or all the values.
|
||||
* @param $returnAllGroup Wheter to return graphs of group All or not.
|
||||
* @param $privileges Privileges to check in user group
|
||||
*
|
||||
* @return template graphs of a an user. Empty array if none.
|
||||
*/
|
||||
function reporting_template_graphs_get_user ($id_user = 0, $only_names = false, $returnAllGroup = true, $privileges = 'RR') {
|
||||
global $config;
|
||||
|
||||
if (!$id_user) {
|
||||
$id_user = $config['id_user'];
|
||||
}
|
||||
|
||||
$groups = users_get_groups ($id_user, $privileges, $returnAllGroup);
|
||||
|
||||
$all_templates = db_get_all_rows_in_table ('tgraph_template', 'name');
|
||||
if ($all_templates === false)
|
||||
return array ();
|
||||
|
||||
$templates = array ();
|
||||
foreach ($all_templates as $template) {
|
||||
if (!in_array($template['id_group'], array_keys($groups)))
|
||||
continue;
|
||||
|
||||
if ($template["id_user"] != $id_user && $template['private'])
|
||||
continue;
|
||||
|
||||
if ($template["id_group"] > 0)
|
||||
if (!isset($groups[$template["id_group"]])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($only_names) {
|
||||
$templates[$template['id_graph_template']] = $template['name'];
|
||||
}
|
||||
else {
|
||||
$templates[$template['id_graph_template']] = $template;
|
||||
$templatesCount = db_get_value_sql("SELECT COUNT(id_gs_template) FROM tgraph_source_template WHERE id_template = " . $template['id_graph_template']);
|
||||
$templates[$template['id_graph_template']]['graphs_template_count'] = $templatesCount;
|
||||
}
|
||||
}
|
||||
|
||||
return $templates;
|
||||
}
|
||||
?>
|
@ -2500,55 +2500,7 @@ function reporting_header_content($mini, $content, $report, &$table,
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get all the template graphs a user can see.
|
||||
*
|
||||
* @param $id_user User id to check.
|
||||
* @param $only_names Wheter to return only graphs names in an associative array
|
||||
* or all the values.
|
||||
* @param $returnAllGroup Wheter to return graphs of group All or not.
|
||||
* @param $privileges Privileges to check in user group
|
||||
*
|
||||
* @return template graphs of a an user. Empty array if none.
|
||||
*/
|
||||
function reporting_template_graphs_get_user ($id_user = 0, $only_names = false, $returnAllGroup = true, $privileges = 'RR') {
|
||||
global $config;
|
||||
|
||||
if (!$id_user) {
|
||||
$id_user = $config['id_user'];
|
||||
}
|
||||
|
||||
$groups = users_get_groups ($id_user, $privileges, $returnAllGroup);
|
||||
|
||||
$all_templates = db_get_all_rows_in_table ('tgraph_template', 'name');
|
||||
if ($all_templates === false)
|
||||
return array ();
|
||||
|
||||
$templates = array ();
|
||||
foreach ($all_templates as $template) {
|
||||
if (!in_array($template['id_group'], array_keys($groups)))
|
||||
continue;
|
||||
|
||||
if ($template["id_user"] != $id_user && $template['private'])
|
||||
continue;
|
||||
|
||||
if ($template["id_group"] > 0)
|
||||
if (!isset($groups[$template["id_group"]])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($only_names) {
|
||||
$templates[$template['id_graph_template']] = $template['name'];
|
||||
}
|
||||
else {
|
||||
$templates[$template['id_graph_template']] = $template;
|
||||
$templatesCount = db_get_value_sql("SELECT COUNT(id_gs_template) FROM tgraph_source_template WHERE id_template = " . $template['id_graph_template']);
|
||||
$templates[$template['id_graph_template']]['graphs_template_count'] = $templatesCount;
|
||||
}
|
||||
}
|
||||
|
||||
return $templates;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -216,13 +216,13 @@ function area_graph($flash_chart, $chart_data, $width, $height, $color,
|
||||
|
||||
setup_watermark($water_mark, $water_mark_file, $water_mark_url);
|
||||
|
||||
// ATTENTION: The min size is 110x150
|
||||
// ATTENTION: The min size is in constants.php
|
||||
// It's not the same minsize for all graphs, but we are choosed a prudent minsize for all
|
||||
if ($height <= 110) {
|
||||
$height = 110;
|
||||
if ($height <= CHART_DEFAULT_HEIGHT) {
|
||||
$height = CHART_DEFAULT_HEIGHT;
|
||||
}
|
||||
if ($width < 150) {
|
||||
$width = 150;
|
||||
if ($width < CHART_DEFAULT_WIDTH) {
|
||||
$width = CHART_DEFAULT_WIDTH;
|
||||
}
|
||||
|
||||
if (empty($chart_data)) {
|
||||
|
@ -356,7 +356,7 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
|
||||
$labels_long = $labels;
|
||||
}
|
||||
if (!empty($legend)) {
|
||||
$legend = io_safe_output(implode($separator,$legend));
|
||||
$legend = io_safe_output(implode($separator, $legend));
|
||||
}
|
||||
$serie_types = implode($separator, $serie_types2);
|
||||
$colors = implode($separator, $colors);
|
||||
|
@ -63,7 +63,7 @@
|
||||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '6.0dev';
|
||||
$build = '150611';
|
||||
$build = '150615';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
@ -404,7 +404,8 @@ function adjust_paths_for_freebsd($engine, $connection = false) {
|
||||
"update talert_commands set command = REPLACE(command,'/usr/bin','/usr/local/bin');",
|
||||
"update talert_commands set command = REPLACE(command,'/usr/share', '/usr/local/share');",
|
||||
"update tplugin set execute = REPLACE(execute,'/usr/share','/usr/local/share');",
|
||||
"update tevent_response set target = REPLACE(target,'/usr/share','/usr/local/share');"
|
||||
"update tevent_response set target = REPLACE(target,'/usr/share','/usr/local/share');",
|
||||
"insert into tconfig (token, value) VALUES ('graphviz_bin_dir', '/usr/local/bin');"
|
||||
);
|
||||
|
||||
for ($i = 0; $i < count ($adjust_sql); $i++) {
|
||||
|
@ -436,6 +436,7 @@ ui_pagination ($total_agents,
|
||||
ui_get_url_refresh (array ('group_id' => $group_id, 'recursion' => $recursion, 'search' => $search, 'sort_field' => $sortField, 'sort' => $sort, 'status' => $status)));
|
||||
|
||||
// Show data.
|
||||
$table = new stdClass();
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = "100%";
|
||||
|
@ -341,13 +341,13 @@ $id = get_parameter('id');
|
||||
case 'boolean':
|
||||
case 'sparse':
|
||||
$data = array();
|
||||
$data[0] = __('Time compare') . ' (' . __('Overlapped') . ')';
|
||||
$data[0] = __('Time compare (Overlapped)');
|
||||
$data[1] = html_print_checkbox ("time_compare_overlapped", 1, (bool) $time_compare_overlapped, true);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$data = array();
|
||||
$data[0] = __('Time compare') . ' (' . __('Separated') . ')';
|
||||
$data[0] = __('Time compare (Separated)');
|
||||
$data[1] = html_print_checkbox ("time_compare_separated", 1, (bool) $time_compare_separated, true);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
@ -371,7 +371,7 @@ $id = get_parameter('id');
|
||||
$table->class = 'databox';
|
||||
|
||||
$data = array();
|
||||
$data[0] = html_print_div(array('content' => $form_table,
|
||||
$data[0] = html_print_div(array('id' => 'field_list', 'content' => $form_table,
|
||||
'style' => 'overflow: auto; height: 220px'), true);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
@ -448,4 +448,12 @@ $id = get_parameter('id');
|
||||
?>
|
||||
|
||||
forced_title_callback();
|
||||
|
||||
$(window).ready(function() {
|
||||
$("#field_list").css('height', ($(window).height() - 160) + 'px');
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
$("#field_list").css('height', ($(window).height() - 160) + 'px');
|
||||
});
|
||||
</script>
|
||||
|
@ -103,7 +103,7 @@ if ($view_graph) {
|
||||
include ("general/noaccess.php");
|
||||
exit;
|
||||
}
|
||||
html_print_input_hidden ('lineWidhtGraph', $config['custom_graph_widht']);
|
||||
html_print_input_hidden ('lineWidhtGraph', $config['custom_graph_width']);
|
||||
$url = "index.php?" .
|
||||
"sec=reporting&" .
|
||||
"sec2=operation/reporting/graph_viewer&" .
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0dev
|
||||
%define release 150611
|
||||
%define release 150615
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0dev
|
||||
%define release 150611
|
||||
%define release 150615
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
@ -193,7 +193,7 @@ INSERT INTO "tlanguage" VALUES ('ru','Русский');
|
||||
INSERT INTO "tlanguage" VALUES ('sk','Slovenčina');
|
||||
INSERT INTO "tlanguage" VALUES ('tr','Türkçe');
|
||||
INSERT INTO "tlanguage" VALUES ('zh_CN','简化字');
|
||||
INSERT INTO "tlanguage" VALUES ('ca','Čatalan');
|
||||
INSERT INTO "tlanguage" VALUES ('ca','Catalan');
|
||||
COMMIT WORK;
|
||||
|
||||
--
|
||||
@ -1000,9 +1000,9 @@ SELECT setval('tgis_map_layer_id_tmap_layer_seq', (SELECT (SELECT MAX(id_tmap_la
|
||||
INSERT INTO "talert_commands" ("id", "name", "command", "description", "internal", "fields_descriptions", "fields_values") VALUES (12,'Remote agent control','/usr/share/pandora_server/util/udp_client.pl _address_ 41122 "_field1_"','This command is used to send commands to the Pandora FMS agents with the UDP server enabled. The UDP server is used to order agents (Windows and UNIX) to "refresh" the agent execution: that means, to force the agent to execute and send data',0,'[\"Command\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]');
|
||||
SELECT setval('talert_commands_id_seq', (SELECT (SELECT MAX(id) FROM talert_commands)));
|
||||
|
||||
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "id_group", "action_threshold") VALUES (1,'Mail to XXX',1,'yourmail@domain.es','[PANDORA] Alert from agent _agent_ on module _module_','',0,0);
|
||||
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "id_group", "action_threshold") VALUES (2,'Restart agent',12,'REFRESH AGENT *','','',0,0);
|
||||
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "id_group", "action_threshold") VALUES (3,'Pandora FMS Event',3,'_agent_ _module_ generated an event alert (_data_)','alert_fired','pandora','','4','','','','','',0,0,'RECOVERED: _agent_ _module_ generated event alert (_data_)','alert_ceased','pandora','','4','','','','','');
|
||||
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "field4", "field5", "field6", "field7", "field8", "field9", "field10", "id_group", "action_threshold", "field1_recovery", "field2_recovery", "field3_recovery", "field4_recovery", "field5_recovery", "field6_recovery", "field7_recovery", "field8_recovery", "field9_recovery", "field10_recovery") VALUES (1,'Mail to XXX',1,'yourmail@domain.es','[PANDORA] Alert from agent _agent_ on module _module_','','','','','','','','',0,0,'','','','','','','','','','');
|
||||
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "field4", "field5", "field6", "field7", "field8", "field9", "field10", "id_group", "action_threshold", "field1_recovery", "field2_recovery", "field3_recovery", "field4_recovery", "field5_recovery", "field6_recovery", "field7_recovery", "field8_recovery", "field9_recovery", "field10_recovery") VALUES (2,'Restart agent',12,'REFRESH AGENT *','','','','','','','','','',0,0,'','','','','','','','','','');
|
||||
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "field4", "field5", "field6", "field7", "field8", "field9", "field10", "id_group", "action_threshold", "field1_recovery", "field2_recovery", "field3_recovery", "field4_recovery", "field5_recovery", "field6_recovery", "field7_recovery", "field8_recovery", "field9_recovery", "field10_recovery") VALUES (3,'Pandora FMS Event',3,'_agent_ _module_ generated an event alert (_data_)','alert_fired','pandora','','4','','','','','',0,0,'RECOVERED: _agent_ _module_ generated event alert (_data_)','alert_ceased','pandora','','4','','','','','');
|
||||
INSERT INTO "talert_actions" ("id", "name", "id_alert_command", "field1", "field2", "field3", "field4", "field5", "field6", "field7", "field8", "field9", "field10", "id_group", "action_threshold", "field1_recovery", "field2_recovery", "field3_recovery", "field4_recovery", "field5_recovery", "field6_recovery", "field7_recovery", "field8_recovery", "field9_recovery", "field10_recovery") VALUES (4,'Create a ticket in Integria IMS',11,'http://localhost/integria/include/api.php','1234','admin','_agent_: _alert_name_','1','3','_alert_description_','','','',0,0,'','','','','','','','','','');
|
||||
SELECT setval('talert_actions_id_seq', (SELECT (SELECT MAX(id) FROM talert_actions)));
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
--\c "pandora"
|
||||
|
||||
-- For previous PostgreSQL version 9.0
|
||||
CREATE LANGUAGE plpgsql;
|
||||
CREATE OR REPLACE LANGUAGE plpgsql;
|
||||
|
||||
CREATE OR REPLACE FUNCTION unix_timestamp(TIMESTAMP without time zone = CURRENT_TIMESTAMP) RETURNS double precision AS 'SELECT ceil(date_part(''epoch'', $1)); ' LANGUAGE SQL;
|
||||
|
||||
@ -1118,8 +1118,8 @@ CREATE TABLE "tlayout_data" (
|
||||
"id_group" INTEGER NOT NULL default 0,
|
||||
"id_custom_graph" INTEGER NOT NULL default 0,
|
||||
"border_width" INTEGER NOT NULL default 0,
|
||||
"border_color" varchar(200) DEFAULT "",
|
||||
"fill_color" varchar(200) DEFAULT ""
|
||||
"border_color" varchar(200) DEFAULT '',
|
||||
"fill_color" varchar(200) DEFAULT ''
|
||||
);
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
|
@ -38,7 +38,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
||||
('graph_res','5'),
|
||||
('step_compact','1'),
|
||||
('db_scheme_version','6.0dev'),
|
||||
('db_scheme_build','PD150611'),
|
||||
('db_scheme_build','PD150615'),
|
||||
('show_unknown','0'),
|
||||
('show_lastalerts','1'),
|
||||
('style','pandora'),
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-server
|
||||
Version: 6.0dev-150611
|
||||
Version: 6.0dev-150615
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0dev-150611"
|
||||
pandora_version="6.0dev-150615"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
||||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "6.0dev";
|
||||
my $pandora_build = "150611";
|
||||
my $pandora_build = "150615";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0dev
|
||||
%define release 150611
|
||||
%define release 150615
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0dev
|
||||
%define release 150611
|
||||
%define release 150615
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
||||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0dev PS150611";
|
||||
my $version = "6.0dev PS150615";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
@ -35,7 +35,7 @@ use Encode::Locale;
|
||||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0dev PS150611";
|
||||
my $version = "6.0dev PS150615";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user