new header and menu
Former-commit-id: 3509107664a968fc358a8bb3e662f27b26b10c73
This commit is contained in:
commit
4c92375a58
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.731-190207
|
||||
Version: 7.0NG.731-190225
|
||||
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="7.0NG.731-190207"
|
||||
pandora_version="7.0NG.731-190225"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -42,7 +42,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.731';
|
||||
use constant AGENT_BUILD => '190207';
|
||||
use constant AGENT_BUILD => '190225';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.731
|
||||
%define release 190207
|
||||
%define release 190225
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.731
|
||||
%define release 190207
|
||||
%define release 190225
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.731"
|
||||
PI_BUILD="190207"
|
||||
PI_BUILD="190225"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{190207}
|
||||
{190225}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.731(Build 190207)")
|
||||
#define PANDORA_VERSION ("7.0NG.731(Build 190225)")
|
||||
|
||||
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", "(7.0NG.731(Build 190207))"
|
||||
VALUE "ProductVersion", "(7.0NG.731(Build 190225))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.731-190207
|
||||
Version: 7.0NG.731-190225
|
||||
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="7.0NG.731-190207"
|
||||
pandora_version="7.0NG.731-190225"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -309,7 +309,7 @@ function mainModuleGroups()
|
|||
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined groups or module groups') ]);
|
||||
}
|
||||
|
||||
ui_require_css_file('cluetip','include/styles/js/');
|
||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||
ui_require_jquery_file('cluetip');
|
||||
?>
|
||||
<script>
|
||||
|
@ -328,4 +328,3 @@ function mainModuleGroups()
|
|||
|
||||
extensions_add_operation_menu_option(__('Module groups'), 'estado', 'module_groups/brick.png', 'v1r1', 'view');
|
||||
extensions_add_main_function('mainModuleGroups');
|
||||
|
||||
|
|
|
@ -137,8 +137,8 @@ function get_logs_size($file)
|
|||
function get_status_logs($path)
|
||||
{
|
||||
$status_server_log = '';
|
||||
$size_server_log = get_logs_size($path);
|
||||
if ($size_server_log <= 10240) {
|
||||
$size_server_log = number_format(get_logs_size($path));
|
||||
if ($size_server_log <= 1048576) {
|
||||
$status_server_log = "<a style ='color: green;text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   You have less than 10 MB of logs</a>";
|
||||
} else {
|
||||
$status_server_log = "<a class= 'content' style= 'color: red;text-decoration: none;'>Warning Status</a><a style ='text-decoration: none;'>   You have more than 10 MB of logs</a>";
|
||||
|
@ -412,11 +412,7 @@ render_info_data(
|
|||
render_info_data('SELECT COUNT(*) FROM tagente_modulo', 'Total modules');
|
||||
render_info_data('SELECT COUNT(*) FROM tgrupo', 'Total groups');
|
||||
render_info_data('SELECT COUNT(*) FROM tagente_datos', 'Total module data records');
|
||||
// render_info_data ("SELECT COUNT(*) FROM tagente_datos_string","Total module string data records");
|
||||
// render_info_data ("SELECT COUNT(*) FROM tagente_datos_log4x","Total module log4x data records");
|
||||
render_info_data('SELECT COUNT(*) FROM tagent_access', 'Total agent access record');
|
||||
// render_info ("tagente_estado");
|
||||
// render_info ("talert_template_modules");
|
||||
render_info_data('SELECT COUNT(*) FROM tevento', 'Total events');
|
||||
|
||||
if ($config['enterprise_installed']) {
|
||||
|
@ -700,7 +696,7 @@ render_info_data(
|
|||
render_row(status_values($read_rnd_buffer_size_min_rec_value, $read_rnd_buffer_size), 'Read rnd-buffer size ', 'Read rnd-buffer size ');
|
||||
render_row(status_values($query_cache_min_res_unit_min_rec_value, $query_cache_min_res_unit), 'Query cache min-res-unit ', 'Query cache min-res-unit ');
|
||||
render_row(status_values($innodb_file_per_table_min_rec_value, $innodb_file_per_table), 'InnoDB file per table ', 'InnoDB file per table ');
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__('Tables fragmentation in the PandoraFMS database').'</th></tr>';
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__('Tables fragmentation in the Pandora FMS database').'</th></tr>';
|
||||
|
||||
|
||||
|
||||
|
@ -708,14 +704,14 @@ render_info_data(
|
|||
render_row(number_format($tables_fragmentation, 2).'%', 'Tables fragmentation (current value)');
|
||||
render_row(status_fragmentation_tables($tables_fragmentation_max_rec_value, $tables_fragmentation), 'Status fragmentation tables');
|
||||
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__(' PandoraFMS logs dates').'</th></tr>';
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__(' Pandora FMS logs dates').'</th></tr>';
|
||||
|
||||
render_row(number_format((get_logs_size($path_server_logs) / 1024), 2).'M', 'Size server logs (current value)');
|
||||
render_row(number_format((get_logs_size($path_server_logs) / 1048576), 3).'M', 'Size server logs (current value)');
|
||||
render_row(get_status_logs($path_server_logs), 'Status server logs');
|
||||
render_row(number_format((get_logs_size($path_console_logs) / 1024), 2).'M', 'Size console logs (current value)');
|
||||
render_row(number_format((get_logs_size($path_console_logs) / 1048576), 3).'M', 'Size console logs (current value)');
|
||||
render_row(get_status_logs($path_console_logs), 'Status console logs');
|
||||
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__(' PandoraFMS Licence Information').'</th></tr>';
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__(' Pandora FMS Licence Information').'</th></tr>';
|
||||
|
||||
render_row(html_print_textarea('keys[customer_key]', 10, 255, $settings->customer_key, 'style="height:40px; width:450px;"', true), 'Customer key');
|
||||
render_row($license['expiry_date'], 'Expires');
|
||||
|
|
|
@ -539,7 +539,7 @@ if ($login_screen == 'error_authconfig' || $login_screen == 'error_emptyconfig'
|
|||
}
|
||||
|
||||
ui_require_css_file('dialog');
|
||||
ui_require_css_file('jquery-ui.min','include/styles/js/');
|
||||
ui_require_css_file('jquery-ui.min', 'include/styles/js/');
|
||||
ui_require_jquery_file('jquery-ui.min');
|
||||
?>
|
||||
|
||||
|
|
|
@ -470,7 +470,6 @@ console.log(classic_menu);
|
|||
handsIn2 = 0;
|
||||
|
||||
if(!click_display){
|
||||
if (autohidden_menu) {
|
||||
$('.menu_icon').mouseenter(function() {
|
||||
table_hover = $(this);
|
||||
handsIn = 1;
|
||||
|
@ -490,7 +489,6 @@ console.log(classic_menu);
|
|||
}
|
||||
}, 2500);
|
||||
});
|
||||
}
|
||||
}else{
|
||||
$(document).ready(function() {
|
||||
if (autohidden_menu) {
|
||||
|
|
|
@ -229,14 +229,14 @@ if (!$new_agent) {
|
|||
$table->data[0][1] .= " <span align='right'><a onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\" href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente=$id_agente&search=&offset=0&sort_field=&sort=none'>".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).'</a>';
|
||||
}
|
||||
|
||||
$table->data[1][0] = __('Alias');
|
||||
$table->data[1][0] = __('Alias').ui_print_help_tip(__('Characters /,\,|,%,#,&,$ will be ignored'), true).'</span>';
|
||||
$table->data[1][1] = html_print_input_text('alias', $alias, '', 50, 100, true);
|
||||
if ($new_agent) {
|
||||
$table->data[1][1] .= html_print_checkbox('alias_as_name', 1, $config['alias_as_name'], true).__('Use alias as name');
|
||||
}
|
||||
|
||||
$table->data[2][0] = __('IP Address');
|
||||
$table->data[2][1] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true);
|
||||
$table->data[2][1] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true).html_print_checkbox('unique_ip', 1, $config['unique_ip'], true).__('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true);
|
||||
|
||||
if ($id_agente) {
|
||||
$table->data[2][1] .= ' ';
|
||||
|
|
|
@ -81,6 +81,7 @@ $alias_as_name = 0;
|
|||
$direccion_agente = get_parameter('direccion', '');
|
||||
$direccion_agente = trim(io_safe_output($direccion_agente));
|
||||
$direccion_agente = io_safe_input($direccion_agente);
|
||||
$unique_ip = 0;
|
||||
$intervalo = SECONDS_5MINUTES;
|
||||
$ff_interval = 0;
|
||||
$quiet_module = 0;
|
||||
|
@ -158,9 +159,11 @@ $module_macros = [];
|
|||
// Create agent
|
||||
if ($create_agent) {
|
||||
$mssg_warning = 0;
|
||||
$alias = (string) get_parameter_post('alias', '');
|
||||
$alias_safe_output = io_safe_output(get_parameter('alias', ''));
|
||||
$alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$-]/', '', $alias_safe_output)));
|
||||
$alias_as_name = (int) get_parameter_post('alias_as_name', 0);
|
||||
$direccion_agente = (string) get_parameter_post('direccion', '');
|
||||
$unique_ip = (int) get_parameter_post('unique_ip', 0);
|
||||
|
||||
// safe_output only validate ip
|
||||
$direccion_agente = trim(io_safe_output($direccion_agente));
|
||||
|
@ -216,7 +219,12 @@ if ($create_agent) {
|
|||
$nombre_agente = $alias;
|
||||
}
|
||||
|
||||
if (!$exists_alias) {
|
||||
if ($unique_ip && $direccion_agente != '') {
|
||||
$sql = 'SELECT direccion FROM tagente WHERE direccion = "'.$direccion_agente.'"';
|
||||
$exists_ip = db_get_row_sql($sql);
|
||||
}
|
||||
|
||||
if (!$exists_alias && !$exists_ip) {
|
||||
$id_agente = db_process_sql_insert(
|
||||
'tagente',
|
||||
[
|
||||
|
@ -326,6 +334,8 @@ if ($create_agent) {
|
|||
$agent_creation_error = __('Could not be created');
|
||||
if ($exists_alias) {
|
||||
$agent_creation_error = __('Could not be created, because name already exists');
|
||||
} else if ($exists_ip) {
|
||||
$agent_creation_error = __('Could not be created, because IP already exists');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -755,9 +765,11 @@ if ($update_agent) {
|
|||
$mssg_warning = 0;
|
||||
$id_agente = (int) get_parameter_post('id_agente');
|
||||
$nombre_agente = str_replace('`', '‘', (string) get_parameter_post('agente', ''));
|
||||
$alias = str_replace('`', '‘', (string) get_parameter_post('alias', ''));
|
||||
$alias_safe_output = io_safe_output(get_parameter('alias', ''));
|
||||
$alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$-]/', '', $alias_safe_output)));
|
||||
$alias_as_name = (int) get_parameter_post('alias_as_name', 0);
|
||||
$direccion_agente = (string) get_parameter_post('direccion', '');
|
||||
$unique_ip = (int) get_parameter_post('unique_ip', 0);
|
||||
// safe_output only validate ip
|
||||
$direccion_agente = trim(io_safe_output($direccion_agente));
|
||||
|
||||
|
@ -860,8 +872,15 @@ if ($update_agent) {
|
|||
// If there is an agent with the same name, but a different ID
|
||||
}
|
||||
|
||||
if ($unique_ip && $direccion_agente != '') {
|
||||
$sql = 'SELECT direccion FROM tagente WHERE direccion = "'.$direccion_agente.'"';
|
||||
$exists_ip = db_get_row_sql($sql);
|
||||
}
|
||||
|
||||
if ($grupo <= 0) {
|
||||
ui_print_error_message(__('The group id %d is incorrect.', $grupo));
|
||||
} else if ($exists_ip) {
|
||||
ui_print_error_message(__('Duplicate main IP address'));
|
||||
} else {
|
||||
// If different IP is specified than previous, add the IP
|
||||
if ($direccion_agente != ''
|
||||
|
@ -915,7 +934,7 @@ if ($update_agent) {
|
|||
|
||||
$result = db_process_sql_update('tagente', $values, ['id_agente' => $id_agente]);
|
||||
|
||||
if ($result == false && $update_custom_result == false) {
|
||||
if ($result === false && $update_custom_result == false) {
|
||||
ui_print_error_message(
|
||||
__('There was a problem updating the agent')
|
||||
);
|
||||
|
@ -945,6 +964,10 @@ if ($update_agent) {
|
|||
$disabled ? '1' : '0',
|
||||
]
|
||||
);
|
||||
// Validate alerts for disabled agents.
|
||||
if ($disabled) {
|
||||
alerts_validate_alert_agent($id_agente);
|
||||
}
|
||||
}
|
||||
|
||||
if ($tpolicy_group_old) {
|
||||
|
|
|
@ -128,7 +128,7 @@ $snmp_versions['2c'] = 'v. 2c';
|
|||
$snmp_versions['3'] = 'v. 3';
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('SNMP community');
|
||||
$data[0] = __('SNMP community').ui_print_help_icon('column_macros', true);
|
||||
$adopt = false;
|
||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK && isset($id_agent_module)) {
|
||||
$adopt = policies_is_module_adopt($id_agent_module);
|
||||
|
@ -277,7 +277,7 @@ if (!isset($id_agent_module)) {
|
|||
}
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Auth user');
|
||||
$data[0] = __('Auth user').ui_print_help_icon('column_macros', true);
|
||||
$data[1] = html_print_input_text(
|
||||
'snmp3_auth_user',
|
||||
$snmp3_auth_user,
|
||||
|
@ -290,7 +290,7 @@ $data[1] = html_print_input_text(
|
|||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
$data[2] = __('Auth password').ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
|
||||
$data[2] = __('Auth password').ui_print_help_icon('column_macros', true).ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
|
||||
$data[3] = html_print_input_password(
|
||||
'snmp3_auth_pass',
|
||||
$snmp3_auth_pass,
|
||||
|
@ -312,7 +312,7 @@ push_table_simple($data, 'field_snmpv3_row1');
|
|||
$data = [];
|
||||
$data[0] = __('Privacy method');
|
||||
$data[1] = html_print_select(['DES' => __('DES'), 'AES' => __('AES')], 'snmp3_privacy_method', $snmp3_privacy_method, '', '', '', true, false, false, '', $disabledBecauseInPolicy);
|
||||
$data[2] = __('Privacy pass').ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
|
||||
$data[2] = __('Privacy pass').ui_print_help_icon('column_macros', true).ui_print_help_tip(__('The pass length must be eight character minimum.'), true);
|
||||
$data[3] = html_print_input_password(
|
||||
'snmp3_privacy_pass',
|
||||
$snmp3_privacy_pass,
|
||||
|
|
|
@ -44,8 +44,7 @@ if (empty($update_module_id)) {
|
|||
$data = [];
|
||||
$data[0] = __('Target IP');
|
||||
$data[1] = html_print_input_text('ip_target', $ip_target, '', 15, 60, true);
|
||||
$data[2] = __('Namespace');
|
||||
$data[2] .= ui_print_help_icon('wminamespace', true);
|
||||
$data[2] = __('Namespace').ui_print_help_tip(__('Optional. WMI namespace. If unsure leave blank.'), true);
|
||||
$data[3] = html_print_input_text(
|
||||
'tcp_send',
|
||||
$tcp_send,
|
||||
|
@ -61,7 +60,7 @@ $data[3] = html_print_input_text(
|
|||
push_table_simple($data, 'target_ip');
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Username');
|
||||
$data[0] = __('Username').ui_print_help_icon('column_macros', true);
|
||||
$data[1] = html_print_input_text(
|
||||
'plugin_user',
|
||||
$plugin_user,
|
||||
|
@ -74,7 +73,7 @@ $data[1] = html_print_input_text(
|
|||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
$data[2] = __('Password');
|
||||
$data[2] = __('Password').ui_print_help_icon('column_macros', true);
|
||||
$data[3] = html_print_input_password(
|
||||
'plugin_pass',
|
||||
$plugin_pass,
|
||||
|
@ -110,8 +109,7 @@ $table_simple->colspan['wmi_query'][1] = 3;
|
|||
push_table_simple($data, 'wmi_query');
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Key string');
|
||||
$data[0] .= ui_print_help_icon('wmikey', true);
|
||||
$data[0] = __('Key string').ui_print_help_tip(__('Optional. Substring to look for in the WQL query result. The module returns 1 if found, 0 if not.'), true);
|
||||
$data[1] = html_print_input_text(
|
||||
'snmp_community',
|
||||
$snmp_community,
|
||||
|
@ -124,8 +122,7 @@ $data[1] = html_print_input_text(
|
|||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
$data[2] = __('Field number');
|
||||
$data[2] .= ui_print_help_icon('wmifield', true);
|
||||
$data[2] = __('Field number').ui_print_help_tip(__('Column number to retrieve from the WQL query result (starting from zero).'), true);
|
||||
$data[3] = html_print_input_text(
|
||||
'tcp_port',
|
||||
$tcp_port,
|
||||
|
|
|
@ -192,7 +192,7 @@ if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) {
|
|||
echo '</div></form>';
|
||||
}
|
||||
|
||||
ui_require_css_file('cluetip','include/styles/js/');
|
||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||
ui_require_jquery_file('cluetip');
|
||||
ui_require_jquery_file('pandora.controls');
|
||||
ui_require_jquery_file('bgiframe');
|
||||
|
|
|
@ -836,7 +836,7 @@ if ($display_create && (check_acl($config['id_user'], 0, 'LW') || check_acl($con
|
|||
echo '</div>';
|
||||
}
|
||||
|
||||
ui_require_css_file('cluetip','include/styles/js/');
|
||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||
ui_require_jquery_file('cluetip');
|
||||
ui_require_jquery_file('pandora.controls');
|
||||
ui_require_jquery_file('bgiframe');
|
||||
|
|
|
@ -629,7 +629,7 @@ echo '</form>';
|
|||
|
||||
<?php
|
||||
// -------------------------END CHUNKS---------------------------------------
|
||||
ui_require_css_file('cluetip','include/styles/js/');
|
||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||
ui_require_jquery_file('cluetip');
|
||||
ui_require_jquery_file('pandora.controls');
|
||||
ui_require_jquery_file('json');
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
ui_require_css_file('tree');
|
||||
ui_require_css_file('fixed-bottom-box');
|
||||
|
||||
|
@ -539,17 +538,22 @@ if ($tab == 'tree') {
|
|||
$url_delete = 'index.php?sec=gagente&sec2=godmode/groups/group_list&delete_group=1&id_group='.$group['id_grupo'];
|
||||
$table->data[$key][0] = $group['id_grupo'];
|
||||
$table->data[$key][1] = "<a href='$url'>".$group['nombre'].'</a>';
|
||||
$table->data[$key][2] = html_print_image(
|
||||
'images/groups_small/'.$group['icon'].'.png',
|
||||
true,
|
||||
[
|
||||
'style' => '',
|
||||
'class' => 'bot',
|
||||
'alt' => $group['nombre'],
|
||||
'title' => $group['nombre'],
|
||||
false, false, false, true
|
||||
]
|
||||
);
|
||||
if ($group['icon'] != '') {
|
||||
$table->data[$key][2] = html_print_image(
|
||||
'images/groups_small/'.$group['icon'].'.png',
|
||||
true,
|
||||
[
|
||||
'style' => '',
|
||||
'class' => 'bot',
|
||||
'alt' => $group['nombre'],
|
||||
'title' => $group['nombre'],
|
||||
false, false, false, true
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$table->data[$key][2] = '';
|
||||
}
|
||||
|
||||
|
||||
// reporting_get_group_stats
|
||||
$table->data[$key][3] = $group['disabled'] ? __('Disabled') : __('Enabled');
|
||||
|
|
|
@ -205,6 +205,10 @@ if ($update_agents) {
|
|||
$values['disabled'],
|
||||
]
|
||||
);
|
||||
// Validate alerts for disabled agents.
|
||||
if ($values['disabled'] == 1) {
|
||||
alerts_validate_alert_agent($id_agent);
|
||||
}
|
||||
}
|
||||
|
||||
if ($group_old || $result) {
|
||||
|
|
|
@ -143,7 +143,7 @@ if ($update) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// Standard procedure
|
||||
// Standard procedure.
|
||||
foreach ($agents_ as $agent_) {
|
||||
if ($modules_ == false) {
|
||||
$modules_ = [];
|
||||
|
@ -315,7 +315,7 @@ if ($module_type != '') {
|
|||
|
||||
$names = agents_get_modules(
|
||||
array_keys($agents),
|
||||
'DISTINCT(tagente_modulo.nombre)',
|
||||
'tagente_modulo.nombre',
|
||||
$filter,
|
||||
false
|
||||
);
|
||||
|
@ -1965,4 +1965,3 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ if ($create_network_from_module) {
|
|||
$id_module_group = $data_module['id_module_group'];
|
||||
$id_plugin = $data_module['id_plugin'];
|
||||
$plugin_user = $data_module['plugin_user'];
|
||||
$plugin_pass = $data_module['plugin_pass'];
|
||||
$plugin_pass = io_output_password($data_module['plugin_pass']);
|
||||
$plugin_parameter = $data_module['plugin_parameter'];
|
||||
$macros = $data_module['macros'];
|
||||
$max_timeout = $data_module['max_timeout'];
|
||||
|
@ -104,7 +104,7 @@ if (isset($id)) {
|
|||
$id_group = $component['id_group'];
|
||||
$id_plugin = $component['id_plugin'];
|
||||
$plugin_user = $component['plugin_user'];
|
||||
$plugin_pass = $component['plugin_pass'];
|
||||
$plugin_pass = io_output_password($component['plugin_pass']);
|
||||
$plugin_parameter = $component['plugin_parameter'];
|
||||
$macros = $component['macros'];
|
||||
$max_timeout = $component['max_timeout'];
|
||||
|
@ -140,10 +140,10 @@ if (isset($id)) {
|
|||
// New support for snmp v3
|
||||
$snmp_version = $component['tcp_send'];
|
||||
$snmp3_auth_user = $component['plugin_user'];
|
||||
$snmp3_auth_pass = $component['plugin_pass'];
|
||||
$snmp3_auth_pass = io_output_password($component['plugin_pass']);
|
||||
$snmp3_auth_method = $component['plugin_parameter'];
|
||||
$snmp3_privacy_method = $component['custom_string_1'];
|
||||
$snmp3_privacy_pass = $component['custom_string_2'];
|
||||
$snmp3_privacy_pass = io_output_password($component['custom_string_2']);
|
||||
$snmp3_security_level = $component['custom_string_3'];
|
||||
}
|
||||
} else if (isset($new_component) && $new_component && !$create_network_from_snmp_browser) {
|
||||
|
|
|
@ -57,16 +57,16 @@ $data = [];
|
|||
$data[0] = __('SNMP Enterprise String');
|
||||
$data[1] = html_print_input_text('snmp_oid', $snmp_oid, '', 30, 400, true);
|
||||
// $table->colspan['snmp_2'][1] = 3;
|
||||
$data[2] = __('SNMP community');
|
||||
$data[2] = __('SNMP community').ui_print_help_icon('column_macros', true);
|
||||
$data[3] = html_print_input_text('snmp_community', $snmp_community, '', 15, 60, true);
|
||||
|
||||
push_table_row($data, 'snmp_2');
|
||||
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Auth user');
|
||||
$data[0] = __('Auth user').ui_print_help_icon('column_macros', true);
|
||||
$data[1] = html_print_input_text('snmp3_auth_user', $snmp3_auth_user, '', 15, 60, true);
|
||||
$data[2] = __('Auth password');
|
||||
$data[2] = __('Auth password').ui_print_help_icon('column_macros', true);
|
||||
$data[3] = html_print_input_password('snmp3_auth_pass', $snmp3_auth_pass, '', 15, 60, true);
|
||||
$data[3] .= html_print_input_hidden_extended('active_snmp_v3', 0, 'active_snmp_v3_mncfn', true);
|
||||
push_table_row($data, 'field_snmpv3_row1');
|
||||
|
@ -74,7 +74,7 @@ push_table_row($data, 'field_snmpv3_row1');
|
|||
$data = [];
|
||||
$data[0] = __('Privacy method');
|
||||
$data[1] = html_print_select(['DES' => __('DES'), 'AES' => __('AES')], 'snmp3_privacy_method', $snmp3_privacy_method, '', '', '', true);
|
||||
$data[2] = __('Privacy pass');
|
||||
$data[2] = __('Privacy pass').ui_print_help_icon('column_macros', true);
|
||||
$data[3] = html_print_input_password('snmp3_privacy_pass', $snmp3_privacy_pass, '', 15, 60, true);
|
||||
push_table_row($data, 'field_snmpv3_row2');
|
||||
|
||||
|
|
|
@ -44,9 +44,9 @@ $data[3] = html_print_input_text('tcp_send', $tcp_send, '', 25, 255, true);
|
|||
push_table_row($data, 'wmi_2');
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Username');
|
||||
$data[0] = __('Username').ui_print_help_icon('column_macros', true);
|
||||
$data[1] = html_print_input_text('plugin_user', $plugin_user, '', 15, 255, true);
|
||||
$data[2] = __('Password');
|
||||
$data[2] = __('Password').ui_print_help_icon('column_macros', true);
|
||||
$data[3] = html_print_input_password('plugin_pass', $plugin_pass, '', 25, 255, true);
|
||||
|
||||
push_table_row($data, 'wmi_3');
|
||||
|
|
|
@ -42,6 +42,7 @@ if (!$is_metaconsole) {
|
|||
$url_visual_console_favorite = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_favorite';
|
||||
$url_visual_console_template = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_template';
|
||||
$url_visual_console_template_wizard = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_wizard';
|
||||
$url_visual_console_manager = 'index.php?sec=screen&sec2=enterprise/extensions/visual_console_manager';
|
||||
}
|
||||
|
||||
$pure = (int) get_parameter('pure', 0);
|
||||
|
@ -70,6 +71,12 @@ if ($is_enterprise && $vconsoles_manage) {
|
|||
'active' => false,
|
||||
'text' => '<a href="'.$url_visual_console_template_wizard.'">'.html_print_image('images/wand.png', true, ['title' => __('Visual Console Template Wizard')]).'</a>',
|
||||
];
|
||||
if ($is_metaconsole) {
|
||||
$buttons['visual_console_manager'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="'.$url_visual_console_manager.'">'.html_print_image('images/builder.png', true, ['title' => __('Visual Console Manager')]).'</a>',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
if (!$is_metaconsole) {
|
||||
|
|
|
@ -2720,7 +2720,7 @@ function edit_custom_graph() {
|
|||
}
|
||||
});
|
||||
|
||||
window.location.href = server_url + "/index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id=" + id_element_graph + hash_data;
|
||||
window.location.href = server_url + "index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id=" + id_element_graph + hash_data;
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
|
|
@ -1116,8 +1116,13 @@ switch ($action) {
|
|||
$name_it = (string) get_parameter('name');
|
||||
$values['name'] = reporting_label_macro($items_label, $name_it);
|
||||
|
||||
// Added support for projection graphs, prediction date and SLA reports
|
||||
// 'top_n_value','top_n' and 'text' fields will be reused for these types of report
|
||||
/*
|
||||
Added support for projection graphs,
|
||||
prediction date and SLA reports
|
||||
'top_n_value','top_n' and 'text'
|
||||
fields will be reused for these types of report
|
||||
*/
|
||||
|
||||
switch ($values['type']) {
|
||||
case 'projection_graph':
|
||||
$values['period'] = get_parameter('period1');
|
||||
|
@ -1127,7 +1132,8 @@ switch ($action) {
|
|||
break;
|
||||
|
||||
case 'event_report_log':
|
||||
$agents_to_report = get_parameter('id_agents2');
|
||||
|
||||
$agents_to_report = get_parameter('id_agents3');
|
||||
$source = get_parameter('source', '');
|
||||
$search = get_parameter('search', '');
|
||||
$log_number = get_parameter('log_number', '');
|
||||
|
@ -1525,7 +1531,7 @@ switch ($action) {
|
|||
break;
|
||||
|
||||
case 'event_report_log':
|
||||
$agents_to_report = get_parameter('id_agents2');
|
||||
$agents_to_report = get_parameter('id_agents3');
|
||||
$source = get_parameter('source', '');
|
||||
$search = get_parameter('search', '');
|
||||
$log_number = get_parameter('log_number', '');
|
||||
|
@ -1632,17 +1638,6 @@ switch ($action) {
|
|||
$values['server_name'] = get_parameter('combo_server');
|
||||
}
|
||||
|
||||
|
||||
if (is_metaconsole()) {
|
||||
// For SQL Query check if it is setted in the meta
|
||||
if ($values['type'] == 'sql') {
|
||||
if (empty($values['server_name'])) {
|
||||
$good_format = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$values['id_agent'] = get_parameter('id_agent');
|
||||
$values['id_gs'] = get_parameter('id_custom_graph');
|
||||
if (($values['type'] == 'alert_report_agent') or ($values['type'] == 'event_report_agent') or ($values['type'] == 'agent_configuration') or ($values['type'] == 'group_configuration')) {
|
||||
|
|
|
@ -233,7 +233,7 @@ html_print_submit_button(
|
|||
echo '</div>';
|
||||
|
||||
echo '</form>';
|
||||
ui_require_css_file('color-picker','include/styles/js/');
|
||||
ui_require_css_file('color-picker', 'include/styles/js/');
|
||||
ui_require_jquery_file('colorpicker');
|
||||
?>
|
||||
|
||||
|
|
|
@ -231,6 +231,21 @@ function is_metaconsole() {
|
|||
else return false;
|
||||
}
|
||||
|
||||
function dialog_message(message_id) {
|
||||
$(message_id)
|
||||
.css("display", "inline")
|
||||
.dialog({
|
||||
modal: true,
|
||||
show: "blind",
|
||||
hide: "blind",
|
||||
buttons: {
|
||||
Close: function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function update_button_palette_callback() {
|
||||
var values = {};
|
||||
|
||||
|
@ -240,14 +255,11 @@ function update_button_palette_callback() {
|
|||
switch (selectedItem) {
|
||||
case "background":
|
||||
if (values["width"] < 1024 || values["height"] < 768) {
|
||||
alert("Min allowed size is 1024x768");
|
||||
dialog_message("#message_min_allowed_size");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (values["width"] == 0 && values["height"] == 0) {
|
||||
values["width"] = $("#hidden-background_original_width").val();
|
||||
values["height"] = $("#hidden-background_original_height").val();
|
||||
}
|
||||
$("#hidden-background_width").val(values["width"]);
|
||||
$("#hidden-background_height").val(values["height"]);
|
||||
$("#background").css("width", values["width"]);
|
||||
$("#background").css("height", values["height"]);
|
||||
|
||||
|
@ -259,11 +271,25 @@ function update_button_palette_callback() {
|
|||
break;
|
||||
case "box_item":
|
||||
if ($("input[name=width_box]").val() == "") {
|
||||
alert("Undefined width");
|
||||
dialog_message("#message_alert_no_width");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parseInt($("input[name='width_box']").val()) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
return false;
|
||||
}
|
||||
if ($("input[name=height_box]").val() == "") {
|
||||
alert("Undefined height");
|
||||
dialog_message("#message_alert_no_height");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parseInt($("input[name='height_box']").val()) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -288,7 +314,7 @@ function update_button_palette_callback() {
|
|||
values["label"] == "" &&
|
||||
values["show_statistics"] == false
|
||||
) {
|
||||
alert("Undefined image");
|
||||
dialog_message("#message_alert_no_image");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -428,18 +454,32 @@ function update_button_palette_callback() {
|
|||
break;
|
||||
case "static_graph":
|
||||
if ($("input[name=width]").val() == "") {
|
||||
alert("Undefined width");
|
||||
dialog_message("#message_alert_no_width");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parseInt($("input[name='width']").val()) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
return false;
|
||||
}
|
||||
if ($("input[name=height]").val() == "") {
|
||||
alert("Undefined height");
|
||||
dialog_message("#message_alert_no_height");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parseInt($("input[name='height']").val()) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
(values["image"] == "" || values["image"] == "none") &&
|
||||
values["label"] == ""
|
||||
) {
|
||||
alert("Undefined image");
|
||||
dialog_message("#message_alert_no_image");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -555,13 +595,27 @@ function update_button_palette_callback() {
|
|||
break;
|
||||
case "percentile_bar":
|
||||
case "percentile_item":
|
||||
if ($("input[name=width_percentile]").val() == "") {
|
||||
alert("Undefined width");
|
||||
if ($("input[name=height_percentile]").val() == "") {
|
||||
dialog_message("#message_alert_no_height");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("input[name=height_percentile]").val() == "") {
|
||||
alert("Undefined height");
|
||||
if ($("input[name=width_percentile]").val() == "") {
|
||||
dialog_message("#message_alert_no_width");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
$("input[name=width_percentile]").val() >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
return false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
return false;
|
||||
}
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -604,7 +658,6 @@ function update_button_palette_callback() {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($("#dir_items").html() == "vertical") {
|
||||
if (
|
||||
parseInt($("#text-top").val()) +
|
||||
|
@ -621,20 +674,41 @@ function update_button_palette_callback() {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
return false;
|
||||
}
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
return false;
|
||||
}
|
||||
if ($("input[name=width_module_graph]").val() == "") {
|
||||
alert("Undefined width");
|
||||
dialog_message("#message_alert_no_width");
|
||||
return false;
|
||||
}
|
||||
if ($("input[name=height_module_graph]").val() == "") {
|
||||
alert("Undefined height");
|
||||
dialog_message("#message_alert_no_height");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["width_module_graph"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parseInt($("input[name=height_module_graph]").val()) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
$("#custom_graph_row").css("display") != "none" &&
|
||||
$("#custom_graph option:selected").html() == "None"
|
||||
) {
|
||||
alert("Undefined graph");
|
||||
dialog_message("#message_alert_no_custom_graph");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -644,12 +718,19 @@ function update_button_palette_callback() {
|
|||
break;
|
||||
case "bars_graph":
|
||||
if ($("input[name=width_percentile]").val() == "") {
|
||||
alert("Undefined width");
|
||||
dialog_message("#message_alert_no_width");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("input[name=bars_graph_height]").val() == "") {
|
||||
alert("Undefined height");
|
||||
dialog_message("#message_alert_no_height");
|
||||
return false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
return false;
|
||||
}
|
||||
if (values["agent_string"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -660,18 +741,48 @@ function update_button_palette_callback() {
|
|||
break;
|
||||
|
||||
case "clock":
|
||||
if (
|
||||
parseInt(values["width_percentile"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#text_" + idItem).html(values["label"]);
|
||||
$("#image_" + idItem).attr("src", "images/spinner.gif");
|
||||
setClock(idItem, values);
|
||||
break;
|
||||
|
||||
case "auto_sla_graph":
|
||||
if ($("input[name=width]").val() == "") {
|
||||
alert("Undefined width");
|
||||
if (values["height"] == "") {
|
||||
dialog_message("#message_alert_no_height");
|
||||
return false;
|
||||
}
|
||||
if ($("input[name=height]").val() == "") {
|
||||
alert("Undefined height");
|
||||
if (
|
||||
parseInt(values["height"]) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
return false;
|
||||
}
|
||||
if (values["width"] == "") {
|
||||
dialog_message("#message_alert_no_width");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["width"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
return false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
return false;
|
||||
}
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
return false;
|
||||
}
|
||||
$("#text_" + idItem).html(values["label"]);
|
||||
|
@ -680,8 +791,22 @@ function update_button_palette_callback() {
|
|||
setEventsBar(idItem, values);
|
||||
break;
|
||||
case "donut_graph":
|
||||
if (
|
||||
parseInt(values["width_percentile"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
return false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module_string_type");
|
||||
return false;
|
||||
}
|
||||
if (values["agent_string"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
return false;
|
||||
}
|
||||
$("#image_" + idItem).attr("src", "images/spinner.gif");
|
||||
|
||||
setDonutsGraph(idItem, values);
|
||||
break;
|
||||
case "simple_value":
|
||||
|
@ -718,21 +843,47 @@ function update_button_palette_callback() {
|
|||
"</span></td></tr><tr><td></td></tr></tbody></table>"
|
||||
);
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
return false;
|
||||
}
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case "label":
|
||||
if (values["label"] == "") {
|
||||
dialog_message("#message_alert_no_label");
|
||||
return false;
|
||||
}
|
||||
$("#text_" + idItem).html(values["label"]);
|
||||
break;
|
||||
case "icon":
|
||||
if ($("input[name=width]").val() == "") {
|
||||
alert("Undefined width");
|
||||
dialog_message("#message_alert_no_width");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parseInt($("input[name=width]").val()) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
return false;
|
||||
}
|
||||
if ($("input[name=height]").val() == "") {
|
||||
alert("Undefined height");
|
||||
dialog_message("#message_alert_no_height");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parseInt($("input[name=height]").val()) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
return false;
|
||||
}
|
||||
if (values["image"] == "" || values["image"] == "none") {
|
||||
alert("Undefined image");
|
||||
dialog_message("#message_alert_no_image");
|
||||
return false;
|
||||
}
|
||||
$("#image_" + idItem).attr("src", "images/spinner.gif");
|
||||
|
@ -779,13 +930,70 @@ function update_button_palette_callback() {
|
|||
var image = values["image"] + ".png";
|
||||
set_image("image", idItem, image);
|
||||
break;
|
||||
case "line_item":
|
||||
if (
|
||||
parseInt(values["line_width"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case "color_cloud":
|
||||
if (
|
||||
parseInt(values["diameter"]) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
return false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
return false;
|
||||
}
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case "service":
|
||||
if (values["height"] == "" || values["height_module_graph"] == 0) {
|
||||
dialog_message("#message_alert_no_height");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["height"]) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
return false;
|
||||
}
|
||||
if (values["width"] == "" || values["width_module_graph"] == 0) {
|
||||
dialog_message("#message_alert_no_width");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["width"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
$("select[name=service]").val() == "" ||
|
||||
$("select[name=service]").val() == "none"
|
||||
) {
|
||||
dialog_message("#message_alert_no_service");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if ($("input[name=width]").val() == "") {
|
||||
alert("Undefined width");
|
||||
dialog_message("#message_alert_no_width");
|
||||
return false;
|
||||
}
|
||||
if ($("input[name=height]").val() == "") {
|
||||
alert("Undefined height");
|
||||
dialog_message("#message_alert_no_height");
|
||||
return false;
|
||||
}
|
||||
//Maybe save in any Enterprise item.
|
||||
|
@ -1018,149 +1226,356 @@ function create_button_palette_callback() {
|
|||
switch (creationItem) {
|
||||
case "box_item":
|
||||
if ($("input[name='width_box']").val() == "") {
|
||||
alert("Undefined width");
|
||||
dialog_message("#message_alert_no_width");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt($("input[name='width_box']").val()) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
if ($("input[name='height_box']").val() == "") {
|
||||
alert("Undefined height");
|
||||
dialog_message("#message_alert_no_height");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt($("input[name='height_box']").val()) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "group_item":
|
||||
if (values["height"] == "") {
|
||||
dialog_message("#message_alert_no_height");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["height"]) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
validate = false;
|
||||
}
|
||||
if (values["width"] == "") {
|
||||
dialog_message("#message_alert_no_width");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["width"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
(values["image"] == "" || values["image"] == "none") &&
|
||||
values["label"] == "" &&
|
||||
values["show_statistics"] == false
|
||||
) {
|
||||
alert("Undefined images");
|
||||
dialog_message("#message_alert_no_image");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "static_graph":
|
||||
if (values["width"] == "") {
|
||||
alert("Undefined width");
|
||||
if (values["height"] == "") {
|
||||
dialog_message("#message_alert_no_height");
|
||||
validate = false;
|
||||
}
|
||||
if (values["height"] == "") {
|
||||
alert("Undefined height");
|
||||
if (
|
||||
parseInt(values["height"]) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
validate = false;
|
||||
}
|
||||
if (values["width"] == "") {
|
||||
dialog_message("#message_alert_no_width");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["width"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
(values["image"] == "" || values["image"] == "none") &&
|
||||
values["label"] == false
|
||||
) {
|
||||
alert("Undefined image");
|
||||
dialog_message("#message_alert_no_image");
|
||||
validate = false;
|
||||
}
|
||||
|
||||
break;
|
||||
case "auto_sla_graph":
|
||||
if (values["height"] == "") {
|
||||
dialog_message("#message_alert_no_height");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["height"]) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
validate = false;
|
||||
}
|
||||
if (values["width"] == "") {
|
||||
dialog_message("#message_alert_no_width");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["width"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
validate = false;
|
||||
}
|
||||
if (values["agent"] == "") {
|
||||
alert($("#message_alert_no_agent").html());
|
||||
dialog_message("#message_alert_no_agent");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "donut_graph":
|
||||
if (
|
||||
parseInt(values["width_percentile"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module_string_type");
|
||||
validate = false;
|
||||
}
|
||||
if (values["agent_string"] == "") {
|
||||
alert($("#message_alert_no_agent").html());
|
||||
dialog_message("#message_alert_no_agent");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "label":
|
||||
if (values["label"] == "") {
|
||||
alert($("#message_alert_no_label").html());
|
||||
dialog_message("#message_alert_no_label");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "icon":
|
||||
if (values["width"] == "") {
|
||||
alert("Undefined width");
|
||||
dialog_message("#message_alert_no_width");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["width"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
if (values["height"] == "") {
|
||||
alert("Undefined height");
|
||||
dialog_message("#message_alert_no_height");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["height"]) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
validate = false;
|
||||
}
|
||||
if (values["image"] == "" || values["image"] == "none") {
|
||||
alert($("#message_alert_no_image").html());
|
||||
dialog_message("#message_alert_no_image");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "percentile_bar":
|
||||
case "percentile_item":
|
||||
if (values["width"] == "") {
|
||||
alert("Undefined width");
|
||||
validate = false;
|
||||
}
|
||||
if (values["agent"] == "") {
|
||||
alert($("#message_alert_no_agent").html());
|
||||
validate = false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
alert($("#message_alert_no_module").html());
|
||||
validate = false;
|
||||
}
|
||||
if (values["max_percentile"] == "") {
|
||||
alert($("#message_alert_no_max_percentile").html());
|
||||
if (
|
||||
parseInt(values["width_percentile"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
if (values["width_percentile"] == "") {
|
||||
alert($("#message_alert_no_width_percentile").html());
|
||||
dialog_message("#message_alert_no_width");
|
||||
validate = false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
validate = false;
|
||||
}
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
validate = false;
|
||||
}
|
||||
|
||||
if (values["max_percentile"] == "") {
|
||||
dialog_message("#message_alert_no_max_percentile");
|
||||
validate = false;
|
||||
}
|
||||
|
||||
break;
|
||||
case "module_graph":
|
||||
if (values["width_module_graph"] == "") {
|
||||
alert("Undefined width");
|
||||
validate = false;
|
||||
}
|
||||
if (values["height_module_graph"] == "") {
|
||||
alert("Undefined height");
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
validate = false;
|
||||
}
|
||||
if (values["id_custom_graph"] == 0) {
|
||||
if (values["agent"] == "") {
|
||||
alert($("#message_alert_no_agent").html());
|
||||
validate = false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
alert($("#message_alert_no_module").html());
|
||||
dialog_message("#message_alert_no_agent");
|
||||
validate = false;
|
||||
}
|
||||
if (values["period"] == 0) {
|
||||
alert($("#message_alert_no_period").html());
|
||||
dialog_message("#message_alert_no_period");
|
||||
validate = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "bars_graph":
|
||||
if (values["agent_string"] == "") {
|
||||
alert($("#message_alert_no_agent").html());
|
||||
if (
|
||||
values["height_module_graph"] == "" ||
|
||||
values["height_module_graph"] == 0
|
||||
) {
|
||||
dialog_message("#message_alert_no_height");
|
||||
validate = false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
alert($("#message_alert_no_module").html());
|
||||
if (
|
||||
parseInt(values["height_module_graph"]) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
values["width_module_graph"] == "" ||
|
||||
values["width_module_graph"] == 0
|
||||
) {
|
||||
dialog_message("#message_alert_no_width");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["width_module_graph"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "bars_graph":
|
||||
if (values["bars_graph_height"] == "") {
|
||||
dialog_message("#message_alert_no_height");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["bars_graph_height"]) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
validate = false;
|
||||
}
|
||||
if (values["width_percentile"] == "") {
|
||||
alert($("#message_alert_no_width_percentile").html());
|
||||
dialog_message("#message_alert_no_width");
|
||||
validate = false;
|
||||
}
|
||||
if (values["bars_graph_height"] == "") {
|
||||
alert($("#message_alert_no_bars_graph_height").html());
|
||||
if (
|
||||
parseInt(values["width_percentile"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
validate = false;
|
||||
}
|
||||
if (values["agent_string"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "simple_value":
|
||||
if (values["agent"] == "") {
|
||||
alert($("#message_alert_no_agent").html());
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
validate = false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
alert($("#message_alert_no_module").html());
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "clock":
|
||||
if (
|
||||
parseInt(values["width_percentile"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "line_item":
|
||||
if (
|
||||
parseInt(values["line_width"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "color_cloud":
|
||||
if (
|
||||
parseInt(values["diameter"]) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
validate = false;
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
dialog_message("#message_alert_no_module");
|
||||
validate = false;
|
||||
}
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
case "service":
|
||||
if (values["height"] == "" || values["height_module_graph"] == 0) {
|
||||
dialog_message("#message_alert_no_height");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["height"]) >
|
||||
parseInt($("#hidden-background_height").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_height");
|
||||
validate = false;
|
||||
}
|
||||
if (values["width"] == "" || values["width_module_graph"] == 0) {
|
||||
dialog_message("#message_alert_no_width");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
parseInt(values["width"]) >
|
||||
parseInt($("#hidden-background_width").val())
|
||||
) {
|
||||
dialog_message("#message_alert_max_width");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
$("select[name=service]").val() == "" ||
|
||||
$("select[name=service]").val() == "none"
|
||||
) {
|
||||
dialog_message("#message_alert_no_service");
|
||||
validate = false;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
//Maybe save in any Enterprise item.
|
||||
if (typeof enterprise_create_button_palette_callback == "function") {
|
||||
|
@ -3714,17 +4129,7 @@ function createItem(type, values, id_data) {
|
|||
.attr("height", values["height"]);
|
||||
}
|
||||
}
|
||||
// else{
|
||||
// $('#image_'+id_data).css('width', values['width']+'px');
|
||||
// $('#image_'+id_data).css('height', values['height']+'px');
|
||||
// }
|
||||
/*
|
||||
var $span = $('<span></span>')
|
||||
.attr('id', 'text_' + id_data)
|
||||
.attr('class', 'text')
|
||||
.append(values['label']);
|
||||
|
||||
*/
|
||||
|
||||
var $input = $("<input></input>")
|
||||
.attr("id", "hidden-status_" + id_data)
|
||||
.attr("type", "hidden")
|
||||
|
@ -4489,7 +4894,6 @@ function createItem(type, values, id_data) {
|
|||
case "clock":
|
||||
sizeStyle = "";
|
||||
imageSize = "";
|
||||
|
||||
if (values["label_position"] == "up") {
|
||||
item = $(
|
||||
'<div id="' +
|
||||
|
|
|
@ -168,8 +168,8 @@ echo "<div id='saving_in_progress_dialog' style='display: none; text-align: cent
|
|||
echo "<div id='delete_in_progress_dialog' style='display: none; text-align: center;' title='".__('Action in progress')."'>".__('Deletion in progress').'<br />'.html_print_image('images/spinner.gif', true).'</div>';
|
||||
|
||||
// CSS
|
||||
ui_require_css_file('color-picker','include/styles/js/');
|
||||
ui_require_css_file('jquery-ui.min','include/styles/js/');
|
||||
ui_require_css_file('color-picker', 'include/styles/js/');
|
||||
ui_require_css_file('jquery-ui.min', 'include/styles/js/');
|
||||
|
||||
// Javascript
|
||||
ui_require_jquery_file('colorpicker');
|
||||
|
|
|
@ -697,7 +697,7 @@ echo '<span id="ip_text" style="display: none;">'.__('IP').'</span>';
|
|||
<textarea id="tinyMCE_editor" name="tinyMCE_editor"></textarea>
|
||||
</div>
|
||||
<?php
|
||||
ui_require_css_file('color-picker','include/styles/js/');
|
||||
ui_require_css_file('color-picker', 'include/styles/js/');
|
||||
|
||||
ui_require_jquery_file('colorpicker');
|
||||
ui_require_jquery_file('pandora.controls');
|
||||
|
|
|
@ -41,6 +41,7 @@ if (!$is_metaconsole) {
|
|||
$url_visual_console_favorite = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_favorite';
|
||||
$url_visual_console_template = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_template';
|
||||
$url_visual_console_template_wizard = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_wizard';
|
||||
$url_visual_console_manager = 'index.php?sec=screen&sec2=enterprise/extensions/visual_console_manager';
|
||||
}
|
||||
|
||||
$buttons['visual_console'] = [
|
||||
|
@ -63,6 +64,13 @@ if ($is_enterprise && $vconsoles_manage) {
|
|||
'active' => false,
|
||||
'text' => '<a href="'.$url_visual_console_template_wizard.'">'.html_print_image('images/wand.png', true, ['title' => __('Visual Console Template Wizard')]).'</a>',
|
||||
];
|
||||
|
||||
if ($is_metaconsole) {
|
||||
$buttons['visual_console_manager'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="'.$url_visual_console_manager.'">'.html_print_image('images/builder.png', true, ['title' => __('Visual Console Manager')]).'</a>',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
if (!$is_metaconsole) {
|
||||
|
|
|
@ -1,37 +1,242 @@
|
|||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
// Load global vars.
|
||||
global $config;
|
||||
require_once 'include/config.php';
|
||||
|
||||
check_login();
|
||||
|
||||
if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
|
||||
if (! check_acl($config['id_user'], 0, 'PM')
|
||||
&& ! is_user_admin($config['id_user'])
|
||||
) {
|
||||
db_pandora_audit('ACL Violation', 'Trying to access Setup Management');
|
||||
include 'general/noaccess.php';
|
||||
return;
|
||||
}
|
||||
|
||||
// Load enterprise extensions
|
||||
// ~ enterprise_include_once ('godmode/setup/setup.php');
|
||||
/*
|
||||
NOTICE FOR DEVELOPERS:
|
||||
$update_config = get_parameter('update_config', 0);
|
||||
if ($update_config == 1 && $config['history_db_enabled'] == 1) {
|
||||
if (! isset($config['history_db_connection'])
|
||||
|| $config['history_db_connection'] === false
|
||||
) {
|
||||
$config['history_db_connection'] = db_connect(
|
||||
$config['history_db_host'],
|
||||
$config['history_db_name'],
|
||||
$config['history_db_user'],
|
||||
io_output_password($config['history_db_pass']),
|
||||
$config['history_db_port'],
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
if ($config['history_db_connection'] !== false) {
|
||||
$historical_days_purge = get_parameter('historical_days_purge', 0);
|
||||
$historical_days_compact = get_parameter('historical_days_compact', 0);
|
||||
$historical_step_compact = get_parameter('historical_step_compact', 0);
|
||||
$historical_event_purge = get_parameter('historical_event_purge', 0);
|
||||
$historical_string_purge = get_parameter('historical_string_purge', 0);
|
||||
|
||||
$history_connect = @mysql_db_process_sql(
|
||||
'SELECT 1 FROM tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
|
||||
$config_history = false;
|
||||
if ($history_connect !== false) {
|
||||
$config_history = mysql_db_process_sql(
|
||||
'SELECT * FROM tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
|
||||
if (!$config_history) {
|
||||
$sql = "INSERT INTO tconfig (token, `value`) VALUES
|
||||
('days_purge', ".$historical_days_purge."),
|
||||
('days_compact', ".$historical_days_compact."),
|
||||
('step_compact', ".$historical_step_compact."),
|
||||
('event_purge', ".$historical_event_purge."),
|
||||
('string_purge', ".$historical_string_purge."),
|
||||
('history_db_enabled', 0)";
|
||||
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'insert_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
} else {
|
||||
$sql = 'UPDATE tconfig SET `value` = '.$historical_days_purge." WHERE token = 'days_purge'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
$sql = 'UPDATE tconfig SET `value` = '.$historical_days_compact." WHERE token = 'days_compact'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
$sql = 'UPDATE tconfig SET `value` = '.$historical_step_compact." WHERE token = 'step_compact'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
$sql = 'UPDATE tconfig SET `value` = '.$historical_event_purge." WHERE token = 'event_purge'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
$sql = 'UPDATE tconfig SET `value` = '.$historical_string_purge." WHERE token = 'string_purge'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
$sql = "UPDATE tconfig SET `value` = 0 WHERE token = 'history_db_enabled'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$table_status = new StdClass();
|
||||
$table_status->width = '100%';
|
||||
$table_status->class = 'databox filters';
|
||||
$table_status->style[0] = 'font-weight: bold';
|
||||
$table_status->size[0] = '10%';
|
||||
|
||||
$table_status->data = [];
|
||||
|
||||
$sql = "SELECT UNIX_TIMESTAMP(NOW()) - `value` AS updated_at
|
||||
FROM tconfig
|
||||
WHERE token = 'db_maintance'";
|
||||
|
||||
$time_pandora_db_active = db_get_sql($sql);
|
||||
|
||||
|
||||
if ($time_pandora_db_active < SECONDS_12HOURS) {
|
||||
$table_status->data[0][0] = html_print_image(
|
||||
'images/dot_green.png',
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$table_status->data[0][0] = html_print_image(
|
||||
'images/dot_red.png',
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$table_status->data[0][0] .= ' '.__('Pandora_db running in active database.');
|
||||
$table_status->data[0][0] .= ' '.__('Executed:').' ';
|
||||
$table_status->data[0][0] .= human_time_description_raw(
|
||||
$time_pandora_db_active,
|
||||
true
|
||||
);
|
||||
|
||||
$table_status->data[0][0] .= ' '.__('ago').'.';
|
||||
|
||||
if ($config['history_db_enabled'] == 1) {
|
||||
if (! isset($config['history_db_connection'])
|
||||
|| $config['history_db_connection'] === false
|
||||
) {
|
||||
$config['history_db_connection'] = db_connect(
|
||||
$config['history_db_host'],
|
||||
$config['history_db_name'],
|
||||
$config['history_db_user'],
|
||||
io_output_password($config['history_db_pass']),
|
||||
$config['history_db_port'],
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
$history_connect = @mysql_db_process_sql(
|
||||
'SELECT 1 FROM tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
|
||||
$time_pandora_db_history = false;
|
||||
if ($history_connect !== false) {
|
||||
if ($config['history_db_connection'] !== false) {
|
||||
$time_pandora_db_history = mysql_db_process_sql(
|
||||
$sql,
|
||||
'insert_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($time_pandora_db_history !== false
|
||||
&& $time_pandora_db_history[0]['updated_at'] < SECONDS_12HOURS
|
||||
) {
|
||||
$table_status->data[1][0] = html_print_image(
|
||||
'images/dot_green.png',
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$table_status->data[1][0] = html_print_image(
|
||||
'images/dot_red.png',
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$table_status->data[1][0] .= ' '.__('Pandora_db running in historical database.');
|
||||
$table_status->data[1][0] .= ' '.__('Executed:').' ';
|
||||
if ($time_pandora_db_history !== false) {
|
||||
$table_status->data[1][0] .= human_time_description_raw(
|
||||
$time_pandora_db_history[0]['updated_at'],
|
||||
true
|
||||
).' '.__('ago').'.';
|
||||
} else {
|
||||
$table_status->data[1][0] .= __('not executed');
|
||||
}
|
||||
}
|
||||
|
||||
Update operation is done in config_process.php
|
||||
This is done in that way so the user can see the changes inmediatly.
|
||||
If you added a new token, please check config_update_config() in functions_config.php
|
||||
to add it there.
|
||||
*/
|
||||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
|
@ -44,42 +249,279 @@ $table->size[1] = '30%';
|
|||
|
||||
enterprise_hook('enterprise_warnings_history_days');
|
||||
|
||||
$table->data[1][0] = __('Max. days before delete events').ui_print_help_tip(__('If the compaction or purge of the data is more frequent than the events deletion, anomalies in module graphs could appear'), true);
|
||||
$table->data[1][1] = html_print_input_text('event_purge', $config['event_purge'], '', 5, 5, true);
|
||||
$table->data[1][0] = __('Max. days before delete events');
|
||||
$table->data[1][0] .= ui_print_help_tip(
|
||||
__('If the compaction or purge of the data is more frequent than the events deletion, anomalies in module graphs could appear'),
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[1][1] = html_print_input_text(
|
||||
'event_purge',
|
||||
$config['event_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[2][0] = __('Max. days before delete traps');
|
||||
$table->data[2][1] = html_print_input_text('trap_purge', $config['trap_purge'], '', 5, 5, true);
|
||||
$table->data[2][1] = html_print_input_text(
|
||||
'trap_purge',
|
||||
$config['trap_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[3][0] = __('Max. days before delete audit events');
|
||||
$table->data[3][1] = html_print_input_text('audit_purge', $config['audit_purge'], '', 5, 5, true);
|
||||
$table->data[3][1] = html_print_input_text(
|
||||
'audit_purge',
|
||||
$config['audit_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[4][0] = __('Max. days before delete string data');
|
||||
$table->data[4][1] = html_print_input_text('string_purge', $config['string_purge'], '', 5, 5, true);
|
||||
$table->data[4][1] = html_print_input_text(
|
||||
'string_purge',
|
||||
$config['string_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[5][0] = __('Max. days before delete GIS data');
|
||||
$table->data[5][1] = html_print_input_text('gis_purge', $config['gis_purge'], '', 5, 5, true);
|
||||
$table->data[5][1] = html_print_input_text(
|
||||
'gis_purge',
|
||||
$config['gis_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[6][0] = __('Max. days before purge').ui_print_help_tip(__('Configure a purge period more frequent than a compact data period has no sense'), true);
|
||||
$table->data[6][1] = html_print_input_text('days_purge', $config['days_purge'], '', 5, 5, true);
|
||||
$table->data[6][0] = __('Max. days before purge');
|
||||
$table->data[6][0] .= ui_print_help_tip(
|
||||
__('Configure a purge period more frequent than a compact data period has no sense'),
|
||||
true
|
||||
);
|
||||
$table->data[6][1] = html_print_input_text(
|
||||
'days_purge',
|
||||
$config['days_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[7][0] = __('Max. days before compact data');
|
||||
$table->data[7][1] = html_print_input_text('days_compact', $config['days_compact'], '', 5, 5, true);
|
||||
$table->data[7][1] = html_print_input_text(
|
||||
'days_compact',
|
||||
$config['days_compact'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[8][0] = __('Max. days before delete unknown modules');
|
||||
$table->data[8][1] = html_print_input_text('days_delete_unknown', $config['days_delete_unknown'], '', 5, 5, true);
|
||||
$table->data[8][1] = html_print_input_text(
|
||||
'days_delete_unknown',
|
||||
$config['days_delete_unknown'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[9][0] = __('Max. days before delete autodisabled agents');
|
||||
$table->data[9][1] = html_print_input_text('days_autodisable_deletion', $config['days_autodisable_deletion'], '', 5, 5, true);
|
||||
$table->data[9][1] = html_print_input_text(
|
||||
'days_autodisable_deletion',
|
||||
$config['days_autodisable_deletion'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[10][0] = __('Retention period of past special days').ui_print_help_tip(__('This number is days to keep past special days. 0 means never remove.'), true);
|
||||
$table->data[10][1] = html_print_input_text('num_past_special_days', $config['num_past_special_days'], '', 5, 5, true);
|
||||
$table->data[10][0] = __('Retention period of past special days');
|
||||
$table->data[10][0] .= ui_print_help_tip(
|
||||
__('This number is days to keep past special days. 0 means never remove.'),
|
||||
true
|
||||
);
|
||||
$table->data[10][1] = html_print_input_text(
|
||||
'num_past_special_days',
|
||||
$config['num_past_special_days'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[11][0] = __('Max. macro data fields').ui_print_help_tip(__('Number of macro fields in alerts and templates between 1 and 15'), true);
|
||||
$table->data[11][1] = html_print_input_text('max_macro_fields', $config['max_macro_fields'], '', 5, 5, true, false, false, 'onChange="change_macro_fields()"');
|
||||
$table->data[11][0] = __('Max. macro data fields');
|
||||
$table->data[11][0] .= ui_print_help_tip(
|
||||
__('Number of macro fields in alerts and templates between 1 and 15'),
|
||||
true
|
||||
);
|
||||
$table->data[11][1] = html_print_input_text(
|
||||
'max_macro_fields',
|
||||
$config['max_macro_fields'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'onChange="change_macro_fields()"'
|
||||
);
|
||||
|
||||
if (enterprise_installed()) {
|
||||
$table->data[12][0] = __('Max. days before delete inventory data');
|
||||
$table->data[12][1] = html_print_input_text('inventory_purge', $config['inventory_purge'], '', 5, 5, true);
|
||||
$table->data[12][1] = html_print_input_text(
|
||||
'inventory_purge',
|
||||
$config['inventory_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
if ($config['history_db_enabled'] == 1) {
|
||||
if (! isset($config['history_db_connection'])
|
||||
|| $config['history_db_connection'] === false
|
||||
) {
|
||||
$config['history_db_connection'] = db_connect(
|
||||
$config['history_db_host'],
|
||||
$config['history_db_name'],
|
||||
$config['history_db_user'],
|
||||
io_output_password($config['history_db_pass']),
|
||||
$config['history_db_port'],
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
$history_connect = @mysql_db_process_sql(
|
||||
'SELECT 1 FROM tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
|
||||
$config_history = false;
|
||||
if ($history_connect !== false) {
|
||||
if ($config['history_db_connection'] != false) {
|
||||
$config_history_array = mysql_db_process_sql(
|
||||
'SELECT * FROM tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
|
||||
if (isset($config_history_array) && is_array($config_history_array)) {
|
||||
foreach ($config_history_array as $key => $value) {
|
||||
$config_history[$value['token']] = $value['value'];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo ui_print_error_message(
|
||||
__('The tconfig table does not exist in the historical database')
|
||||
);
|
||||
}
|
||||
|
||||
if ($config_history === false) {
|
||||
$config_history = [];
|
||||
$config_history['days_purge'] = 180;
|
||||
$config_history['days_compact'] = 120;
|
||||
$config_history['step_compact'] = 1;
|
||||
$config_history['event_purge'] = 180;
|
||||
$config_history['string_purge'] = 180;
|
||||
}
|
||||
|
||||
$table_historical = new StdClass();
|
||||
$table_historical->width = '100%';
|
||||
$table_historical->class = 'databox filters';
|
||||
$table_historical->data = [];
|
||||
$table_historical->style[0] = 'font-weight: bold';
|
||||
|
||||
$table_historical->size[0] = '70%';
|
||||
$table_historical->size[1] = '30%';
|
||||
|
||||
enterprise_hook('enterprise_warnings_history_days');
|
||||
|
||||
$table_historical->data[0][0] = __('Max. days before purge');
|
||||
$table_historical->data[0][0] .= ui_print_help_tip(
|
||||
__('Configure a purge period more frequent than a compact data period has no sense'),
|
||||
true
|
||||
);
|
||||
$table_historical->data[0][1] = html_print_input_text(
|
||||
'historical_days_purge',
|
||||
$config_history['days_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[1][0] = __('Max. days before compact data');
|
||||
$table_historical->data[1][1] = html_print_input_text(
|
||||
'historical_days_compact',
|
||||
$config_history['days_compact'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[2][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
||||
$table_historical->data[2][0] .= ui_print_help_tip(
|
||||
__('Data will be compacted in intervals of the specified length.'),
|
||||
true
|
||||
);
|
||||
$table_historical->data[2][1] = html_print_input_text(
|
||||
'historical_step_compact',
|
||||
$config_history['step_compact'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[3][0] = __('Max. days before delete events');
|
||||
$table_historical->data[3][0] .= ui_print_help_tip(
|
||||
__('If the compaction or purge of the data is more frequent than the events deletion, anomalies in module graphs could appear'),
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[3][1] = html_print_input_text(
|
||||
'historical_event_purge',
|
||||
$config_history['event_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[4][0] = __('Max. days before delete string data');
|
||||
$table_historical->data[4][1] = html_print_input_text(
|
||||
'historical_string_purge',
|
||||
$config_history['string_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[4][1] .= html_print_input_hidden(
|
||||
'historical_history_db_enabled',
|
||||
0,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$table_other = new stdClass();
|
||||
|
@ -91,7 +533,11 @@ $table_other->style[0] = 'font-weight: bold';
|
|||
$table_other->size[0] = '70%';
|
||||
$table_other->size[1] = '30%';
|
||||
|
||||
$table_other->data[1][0] = __('Item limit for realtime reports').ui_print_help_tip(__('Set a value too high cause a slowdown on console and a performance penalty in the system.'), true);
|
||||
$table_other->data[1][0] = __('Item limit for realtime reports');
|
||||
$table_other->data[1][0] .= ui_print_help_tip(
|
||||
__('Set a value too high cause a slowdown on console and a performance penalty in the system.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[1][1] = html_print_input_text(
|
||||
'report_limit',
|
||||
$config['report_limit'],
|
||||
|
@ -101,7 +547,11 @@ $table_other->data[1][1] = html_print_input_text(
|
|||
true
|
||||
);
|
||||
|
||||
$table_other->data[2][0] = __('Compact interpolation in hours (1 Fine-20 bad)').ui_print_help_tip(__('Data will be compacted in intervals of the specified length.'), true);
|
||||
$table_other->data[2][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
||||
$table_other->data[2][0] .= ui_print_help_tip(
|
||||
__('Data will be compacted in intervals of the specified length.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[2][1] = html_print_input_text(
|
||||
'step_compact',
|
||||
$config['step_compact'],
|
||||
|
@ -122,49 +572,145 @@ $intervals[SECONDS_2WEEK] = __('2 weeks');
|
|||
$intervals[SECONDS_1MONTH] = __('Last month');
|
||||
|
||||
$table_other->data[3][0] = __('Default hours for event view');
|
||||
$table_other->data[3][1] = html_print_input_text('event_view_hr', $config['event_view_hr'], '', 5, 5, true);
|
||||
$table_other->data[3][1] = html_print_input_text(
|
||||
'event_view_hr',
|
||||
$config['event_view_hr'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[5][0] = __('Use realtime statistics');
|
||||
$table_other->data[5][1] = __('Yes').' '.html_print_radio_button('realtimestats', 1, '', $config['realtimestats'], true).' ';
|
||||
$table_other->data[5][1] .= __('No').' '.html_print_radio_button('realtimestats', 0, '', $config['realtimestats'], true);
|
||||
$table_other->data[5][1] = html_print_checkbox_toogle_switch(
|
||||
'realtimestats',
|
||||
1,
|
||||
$config['realtimestats'],
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[6][0] = __('Batch statistics period (secs)').ui_print_help_tip(__('If realtime statistics are disabled, statistics interval resfresh will be set here.'), true);
|
||||
$table_other->data[6][1] = html_print_input_text('stats_interval', $config['stats_interval'], '', 5, 5, true);
|
||||
$table_other->data[6][0] = __('Batch statistics period (secs)');
|
||||
$table_other->data[6][0] .= ui_print_help_tip(
|
||||
__('If realtime statistics are disabled, statistics interval resfresh will be set here.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[6][1] = html_print_input_text(
|
||||
'stats_interval',
|
||||
$config['stats_interval'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[7][0] = __('Use agent access graph').ui_print_help_icon('agent_access', true);
|
||||
$table_other->data[7][1] = __('Yes').' '.html_print_radio_button('agentaccess', 1, '', $config['agentaccess'], true).' ';
|
||||
$table_other->data[7][1] .= __('No').' '.html_print_radio_button('agentaccess', 0, '', $config['agentaccess'], true);
|
||||
$table_other->data[7][1] = html_print_checkbox_toogle_switch('agentaccess', 1, $config['agentaccess'], true);
|
||||
|
||||
$table_other->data[8][0] = __('Max. recommended number of files in attachment directory').ui_print_help_tip(__('This number is the maximum number of files in attachment directory. If this number is reached then a warning message will appear in the header notification space.'), true);
|
||||
$table_other->data[8][1] = html_print_input_text('num_files_attachment', $config['num_files_attachment'], '', 5, 5, true);
|
||||
$table_other->data[8][0] = __('Max. recommended number of files in attachment directory');
|
||||
$table_other->data[8][0] .= ui_print_help_tip(
|
||||
__('This number is the maximum number of files in attachment directory. If this number is reached then a warning message will appear in the header notification space.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[8][1] = html_print_input_text(
|
||||
'num_files_attachment',
|
||||
$config['num_files_attachment'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[9][0] = __('Delete not init modules');
|
||||
$table_other->data[9][1] = __('Yes').' '.html_print_radio_button('delete_notinit', 1, '', $config['delete_notinit'], true).' ';
|
||||
$table_other->data[9][1] .= __('No').' '.html_print_radio_button('delete_notinit', 0, '', $config['delete_notinit'], true);
|
||||
$table_other->data[9][1] = html_print_checkbox_toogle_switch('delete_notinit', 1, $config['delete_notinit'], true);
|
||||
|
||||
$table_other->data[10][0] = __('Big Operation Step to purge old data').ui_print_help_tip(__('The number of blocks that a time interval is split into. A bigger value means bigger blocks, which is faster but heavier on the database. Default is 100.'), true);
|
||||
$table_other->data[10][1] = html_print_input_text('big_operation_step_datos_purge', $config['big_operation_step_datos_purge'], '', 5, 5, true);
|
||||
$table_other->data[10][0] = __('Big Operation Step to purge old data');
|
||||
$table_other->data[10][0] .= ui_print_help_tip(
|
||||
__('The number of blocks that a time interval is split into. A bigger value means bigger blocks, which is faster but heavier on the database. Default is 100.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[10][1] = html_print_input_text(
|
||||
'big_operation_step_datos_purge',
|
||||
$config['big_operation_step_datos_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[11][0] = __('Small Operation Step to purge old data').ui_print_help_tip(__('The number of rows that are processed in a single query in deletion. Default is 1000. Increase to 3000-5000 in fast systems. Decrease to 500 or 250 on systems with locks.'), true);
|
||||
$table_other->data[11][1] = html_print_input_text('small_operation_step_datos_purge', $config['small_operation_step_datos_purge'], '', 5, 5, true);
|
||||
$table_other->data[11][0] = __('Small Operation Step to purge old data');
|
||||
$table_other->data[11][0] .= ui_print_help_tip(
|
||||
__('The number of rows that are processed in a single query in deletion. Default is 1000. Increase to 3000-5000 in fast systems. Decrease to 500 or 250 on systems with locks.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[11][1] = html_print_input_text(
|
||||
'small_operation_step_datos_purge',
|
||||
$config['small_operation_step_datos_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[12][0] = __('Graph container - Max. Items').ui_print_help_tip(__('The number of graphs that are viewed in a container. Default is 10 .Increasing this number could lead to performance problems'), true);
|
||||
$table_other->data[12][1] = html_print_input_text('max_graph_container', $config['max_graph_container'], '', 5, 5, true);
|
||||
$table_other->data[12][0] = __('Graph container - Max. Items');
|
||||
$table_other->data[12][0] .= ui_print_help_tip(
|
||||
__('The number of graphs that are viewed in a container. Default is 10 .Increasing this number could lead to performance problems'),
|
||||
true
|
||||
);
|
||||
$table_other->data[12][1] = html_print_input_text(
|
||||
'max_graph_container',
|
||||
$config['max_graph_container'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[13][0] = __('Events response max. execution');
|
||||
$table_other->data[13][0] .= ui_print_help_tip(
|
||||
__('Number of events that will perform the desired action at the same time'),
|
||||
true
|
||||
);
|
||||
$table_other->data[13][1] = html_print_input_text(
|
||||
'max_execution_event_response',
|
||||
$config['max_execution_event_response'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
echo '<form id="form_setup" method="post">';
|
||||
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Database maintenance options').'</legend>';
|
||||
html_print_input_hidden('update_config', 1);
|
||||
html_print_table($table);
|
||||
echo '<legend>'.__('Database maintenance status').'</legend>';
|
||||
html_print_table($table_status);
|
||||
echo '</fieldset>';
|
||||
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Others').'</legend>';
|
||||
html_print_input_hidden('update_config', 1);
|
||||
html_print_table($table_other);
|
||||
echo '<legend>'.__('Database maintenance options').'</legend>';
|
||||
html_print_table($table);
|
||||
echo '</fieldset>';
|
||||
|
||||
if ($config['history_db_enabled'] == 1) {
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Historical database maintenance options').'</legend>';
|
||||
html_print_table($table_historical);
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Others').'</legend>';
|
||||
html_print_table($table_other);
|
||||
echo '</fieldset>';
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"');
|
||||
html_print_input_hidden('update_config', 1);
|
||||
html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
'class="sub upd"'
|
||||
);
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
?>
|
||||
|
@ -173,7 +719,6 @@ echo '</form>';
|
|||
|
||||
function change_macro_fields() {
|
||||
var value = $("#text-max_macro_fields").val();
|
||||
console.log(value);
|
||||
if (value <= 0) {
|
||||
$("#text-max_macro_fields").val(1);
|
||||
}
|
||||
|
|
|
@ -1,17 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
|
@ -49,7 +64,7 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
|
|||
return;
|
||||
}
|
||||
|
||||
// Load enterprise extensions
|
||||
// Load enterprise extensions.
|
||||
enterprise_include_once('include/functions_setup.php');
|
||||
enterprise_include_once('include/functions_io.php');
|
||||
enterprise_include_once('godmode/setup/setup.php');
|
||||
|
@ -63,12 +78,12 @@ enterprise_include_once('godmode/setup/setup.php');
|
|||
to add it there.
|
||||
*/
|
||||
|
||||
// Gets section to jump to another section
|
||||
// Gets section to jump to another section.
|
||||
$section = (string) get_parameter('section', 'general');
|
||||
|
||||
$buttons = [];
|
||||
|
||||
// Draws header
|
||||
// Draws header.
|
||||
$buttons['general'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general">'.html_print_image('images/gm_setup.png', true, ['title' => __('General')]).'</a>',
|
||||
|
@ -114,6 +129,7 @@ if (enterprise_installed()) {
|
|||
|
||||
switch ($section) {
|
||||
case 'general':
|
||||
default:
|
||||
$buttons['general']['active'] = true;
|
||||
$subpage = ' » '.__('General');
|
||||
break;
|
||||
|
@ -145,7 +161,7 @@ switch ($section) {
|
|||
break;
|
||||
}
|
||||
|
||||
// Header
|
||||
// Header.
|
||||
ui_print_page_header(__('Configuration').$subpage, '', false, $help_header, true, $buttons);
|
||||
|
||||
if (isset($config['error_config_update_config'])) {
|
||||
|
|
|
@ -44,16 +44,14 @@ if (is_ajax()) {
|
|||
// Fallback to local authentication
|
||||
$row = [];
|
||||
$row['name'] = __('Fallback to local authentication').ui_print_help_tip(__('Enable this option if you want to fallback to local authentication when remote (ldap etc...) authentication failed.'), true);
|
||||
$row['control'] = __('Yes').' '.html_print_radio_button('fallback_local_auth', 1, '', $config['fallback_local_auth'], true).' ';
|
||||
$row['control'] .= __('No').' '.html_print_radio_button('fallback_local_auth', 0, '', $config['fallback_local_auth'], true);
|
||||
$row['control'] = html_print_checkbox_toogle_switch('fallback_local_auth', 1, $config['fallback_local_auth'], true);
|
||||
$table->data['fallback_local_auth'] = $row;
|
||||
|
||||
if (enterprise_installed()) {
|
||||
// Autocreate remote users
|
||||
$row = [];
|
||||
$row['name'] = __('Autocreate remote users');
|
||||
$row['control'] = __('Yes').' '.html_print_radio_button_extended('autocreate_remote_users', 1, '', $config['autocreate_remote_users'], false, '', '', true).' ';
|
||||
$row['control'] .= __('No').' '.html_print_radio_button_extended('autocreate_remote_users', 0, '', $config['autocreate_remote_users'], false, '', '', true);
|
||||
$row['control'] = html_print_checkbox_toogle_switch_extended('autocreate_remote_users', 1, $config['autocreate_remote_users'], false, '', '', true).' ';
|
||||
$table->data['autocreate_remote_users'] = $row;
|
||||
|
||||
add_enterprise_auth_autocreate_profiles($table, $type_auth);
|
||||
|
@ -91,8 +89,7 @@ if (is_ajax()) {
|
|||
// Start TLS
|
||||
$row = [];
|
||||
$row['name'] = __('Start TLS');
|
||||
$row['control'] = __('Yes').' '.html_print_radio_button('ldap_start_tls', 1, '', $config['ldap_start_tls'], true).' ';
|
||||
$row['control'] .= __('No').' '.html_print_radio_button('ldap_start_tls', 0, '', $config['ldap_start_tls'], true);
|
||||
$row['control'] = html_print_checkbox_toogle_switch('ldap_start_tls', 1, $config['ldap_start_tls'], true);
|
||||
$table->data['ldap_start_tls'] = $row;
|
||||
|
||||
// Base DN
|
||||
|
@ -137,11 +134,8 @@ if (is_ajax()) {
|
|||
set_unless_defined($config['double_auth_enabled'], false);
|
||||
$row = [];
|
||||
$row['name'] = __('Double authentication').ui_print_help_tip(__('If this option is enabled, the users can use double authentication with their accounts'), true);
|
||||
$row['control'] = __('Yes').' ';
|
||||
$row['control'] .= html_print_radio_button('double_auth_enabled', 1, '', $config['double_auth_enabled'], true);
|
||||
$row['control'] .= ' ';
|
||||
$row['control'] .= __('No').' ';
|
||||
$row['control'] .= html_print_radio_button('double_auth_enabled', 0, '', $config['double_auth_enabled'], true);
|
||||
$row['control'] = html_print_input_hidden('double_auth_enabled', 0);
|
||||
$row['control'] .= html_print_checkbox_toogle_switch('double_auth_enabled', 1, $config['double_auth_enabled'], true);
|
||||
$table->data['double_auth_enabled'] = $row;
|
||||
|
||||
// Session timeout
|
||||
|
|
|
@ -48,8 +48,8 @@ $table_enable->style['name'] = 'font-weight: bold';
|
|||
// Enable eHorus
|
||||
$row = [];
|
||||
$row['name'] = __('Enable eHorus');
|
||||
$row['control'] = __('Yes').' '.html_print_radio_button('ehorus_enabled', 1, '', $config['ehorus_enabled'], true).' ';
|
||||
$row['control'] .= __('No').' '.html_print_radio_button('ehorus_enabled', 0, '', $config['ehorus_enabled'], true);
|
||||
$row['control'] = __('Enabled').' '.html_print_radio_button('ehorus_enabled', 1, '', $config['ehorus_enabled'], true).' ';
|
||||
$row['control'] .= __('Disabled').' '.html_print_radio_button('ehorus_enabled', 0, '', $config['ehorus_enabled'], true);
|
||||
$row['button'] = html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"', true);
|
||||
$table_enable->data['ehorus_enabled'] = $row;
|
||||
|
||||
|
|
|
@ -82,16 +82,17 @@ $sources['sql'] = __('Database');
|
|||
$table->data[9][1] = html_print_select($sources, 'timesource', $config['timesource'], '', '', '', true);
|
||||
|
||||
$table->data[10][0] = __('Automatic check for updates');
|
||||
$table->data[10][1] = __('Yes').' '.html_print_radio_button('autoupdate', 1, '', $config['autoupdate'], true).' ';
|
||||
$table->data[10][1] .= __('No').' '.html_print_radio_button('autoupdate', 0, '', $config['autoupdate'], true);
|
||||
$table->data[10][1] = html_print_checkbox_toogle_switch('autoupdate', 1, $config['autoupdate'], true);
|
||||
|
||||
echo "<div id='dialog' title='".__('Enforce https Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;'>".__('If SSL is not properly configured you will lose access to ').get_product_name().__(' Console').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
$table->data[11][0] = __('Enforce https');
|
||||
$table->data[11][1] = __('Yes').' '.html_print_radio_button_extended('https', 1, '', $config['https'], false, "if (! confirm ('".__('If SSL is not properly configured you will lose access to %s Console. Do you want to continue?', get_product_name())."')) return false", '', true).' ';
|
||||
$table->data[11][1] .= __('No').' '.html_print_radio_button('https', 0, '', $config['https'], true);
|
||||
$table->data[11][1] = html_print_checkbox_toogle_switch_extended('https', 1, $config['https'], false, '', '', true);
|
||||
|
||||
$table->data[12][0] = __('Use cert of SSL');
|
||||
$table->data[12][1] = __('Yes').' '.html_print_radio_button_extended('use_cert', 1, '', $config['use_cert'], false, '', '', true).' ';
|
||||
$table->data[12][1] .= __('No').' '.html_print_radio_button('use_cert', 0, '', $config['use_cert'], true);
|
||||
$table->data[12][1] = html_print_checkbox_toogle_switch_extended('use_cert', 1, $config['use_cert'], false, '', '', true);
|
||||
|
||||
$table->rowstyle[13] = 'display: none;';
|
||||
$table->data[13][0] = __('Path of SSL Cert.').ui_print_help_tip(__('Path where you put your cert and name of this cert. Remember your cert only in .pem extension.'), true);
|
||||
|
@ -113,8 +114,7 @@ $table->data[16][0] = __('API password').ui_print_help_tip(__('Please be careful
|
|||
$table->data[16][1] = html_print_input_password('api_password', io_output_password($config['api_password']), '', 25, 255, true);
|
||||
|
||||
$table->data[17][0] = __('Enable GIS features');
|
||||
$table->data[17][1] = __('Yes').' '.html_print_radio_button('activate_gis', 1, '', $config['activate_gis'], true).' ';
|
||||
$table->data[17][1] .= __('No').' '.html_print_radio_button('activate_gis', 0, '', $config['activate_gis'], true);
|
||||
$table->data[17][1] = html_print_checkbox_toogle_switch('activate_gis', 1, $config['activate_gis'], true);
|
||||
|
||||
$table->data[19][0] = __('Enable Netflow');
|
||||
$rbt_disabled = false;
|
||||
|
@ -123,8 +123,8 @@ if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
|
|||
$table->data[19][0] .= ui_print_help_tip(__('Not supported in Windows systems'), true);
|
||||
}
|
||||
|
||||
$table->data[19][1] = __('Yes').' '.html_print_radio_button_extended('activate_netflow', 1, '', $config['activate_netflow'], $rbt_disabled, '', '', true).' ';
|
||||
$table->data[19][1] .= __('No').' '.html_print_radio_button_extended('activate_netflow', 0, '', $config['activate_netflow'], $rbt_disabled, '', '', true);
|
||||
$table->data[19][1] = html_print_checkbox_toogle_switch_extended('activate_netflow', 1, $config['activate_netflow'], $rbt_disabled, '', '', true);
|
||||
|
||||
|
||||
$zone_name = [
|
||||
'Africa' => __('Africa'),
|
||||
|
@ -202,18 +202,15 @@ $table->data[28][1] = html_print_input_text('public_url', $config['public_url'],
|
|||
|
||||
$table->data[29][0] = __('Referer security');
|
||||
$table->data[29][0] .= ui_print_help_tip(__("If enabled, actively checks if the user comes from %s's URL", get_product_name()), true);
|
||||
$table->data[29][1] = __('Yes').' '.html_print_radio_button('referer_security', 1, '', $config['referer_security'], true).' ';
|
||||
$table->data[29][1] .= __('No').' '.html_print_radio_button('referer_security', 0, '', $config['referer_security'], true);
|
||||
$table->data[29][1] = html_print_checkbox_toogle_switch('referer_security', 1, $config['referer_security'], true);
|
||||
|
||||
$table->data[30][0] = __('Event storm protection');
|
||||
$table->data[30][0] .= ui_print_help_tip(__('If set to yes no events or alerts will be generated, but agents will continue receiving data.'), true);
|
||||
$table->data[30][1] = __('Yes').' '.html_print_radio_button('event_storm_protection', 1, '', $config['event_storm_protection'], true).' ';
|
||||
$table->data[30][1] .= __('No').' '.html_print_radio_button('event_storm_protection', 0, '', $config['event_storm_protection'], true);
|
||||
$table->data[30][1] = html_print_checkbox_toogle_switch('event_storm_protection', 1, $config['event_storm_protection'], true);
|
||||
|
||||
|
||||
$table->data[31][0] = __('Command Snapshot').ui_print_help_tip(__('The string modules with several lines show as command output'), true);
|
||||
$table->data[31][1] = __('Yes').' '.html_print_radio_button('command_snapshot', 1, '', $config['command_snapshot'], true).' ';
|
||||
$table->data[31][1] .= __('No').' '.html_print_radio_button('command_snapshot', 0, '', $config['command_snapshot'], true);
|
||||
$table->data[31][1] = html_print_checkbox_toogle_switch('command_snapshot', 1, $config['command_snapshot'], true);
|
||||
|
||||
$table->data[32][0] = __('Server logs directory').ui_print_help_tip(__('Directory where the server logs are stored.'), true);
|
||||
$table->data[32][1] = html_print_input_text(
|
||||
|
@ -253,8 +250,7 @@ $table->data['tutorial_mode'][1] = html_print_select(
|
|||
|
||||
$config['past_planned_downtimes'] = isset($config['past_planned_downtimes']) ? $config['past_planned_downtimes'] : 1;
|
||||
$table->data[34][0] = __('Allow create planned downtimes in the past').ui_print_help_tip(__('The planned downtimes created in the past will affect the SLA reports'), true);
|
||||
$table->data[34][1] = __('Yes').' '.html_print_radio_button('past_planned_downtimes', 1, '', $config['past_planned_downtimes'], true).' ';
|
||||
$table->data[34][1] .= __('No').' '.html_print_radio_button('past_planned_downtimes', 0, '', $config['past_planned_downtimes'], true);
|
||||
$table->data[34][1] = html_print_checkbox_toogle_switch('past_planned_downtimes', 1, $config['past_planned_downtimes'], true);
|
||||
|
||||
$table->data[35][0] = __('Limit for bulk operations').ui_print_help_tip(__('Your PHP environment is set to 1000 max_input_vars. This parameter should have the same value or lower.', ini_get('max_input_vars')), true);
|
||||
$table->data[35][1] = html_print_input_text(
|
||||
|
@ -267,8 +263,7 @@ $table->data[35][1] = html_print_input_text(
|
|||
);
|
||||
|
||||
$table->data[36][0] = __('Include agents manually disabled');
|
||||
$table->data[36][1] = __('Yes').' '.html_print_radio_button('include_agents', 1, '', $config['include_agents'], true).' ';
|
||||
$table->data[36][1] .= __('No').' '.html_print_radio_button('include_agents', 0, '', $config['include_agents'], true);
|
||||
$table->data[36][1] = html_print_checkbox_toogle_switch('include_agents', 1, $config['include_agents'], true);
|
||||
|
||||
$table->data[37][0] = __('Audit log directory').ui_print_help_tip(__('Directory where audit log is stored.'), true);
|
||||
$table->data[37][1] = html_print_input_text('auditdir', io_safe_output($config['auditdir']), '', 30, 100, true);
|
||||
|
@ -277,6 +272,10 @@ $table->data[38][0] = __('Set alias as name by default in agent creation');
|
|||
$table->data[38][1] = __('Yes').' '.html_print_radio_button('alias_as_name', 1, '', $config['alias_as_name'], true).' ';
|
||||
$table->data[38][1] .= __('No').' '.html_print_radio_button('alias_as_name', 0, '', $config['alias_as_name'], true);
|
||||
|
||||
$table->data[39][0] = __('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true);
|
||||
$table->data[39][1] = __('Yes').' '.html_print_radio_button('unique_ip', 1, '', $config['unique_ip'], true).' ';
|
||||
$table->data[39][1] .= __('No').' '.html_print_radio_button('unique_ip', 0, '', $config['unique_ip'], true);
|
||||
|
||||
echo '<form id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
||||
|
||||
echo '<fieldset>';
|
||||
|
@ -339,16 +338,30 @@ $(document).ready (function () {
|
|||
$("#zone").attr("hidden", false);
|
||||
$("#timezone").attr("hidden", false);
|
||||
});
|
||||
|
||||
if ($("input[name=use_cert]").is(':checked')) {
|
||||
$('#setup_general-13').show();
|
||||
}
|
||||
|
||||
$("input[name=use_cert]").change(function () {
|
||||
if( $(this).is(":checked") ){
|
||||
var val = $(this).val();
|
||||
if (val == 1) {
|
||||
if( $(this).is(":checked") )
|
||||
$('#setup_general-13').show();
|
||||
}
|
||||
else
|
||||
$('#setup_general-13').hide();
|
||||
}
|
||||
|
||||
});
|
||||
$("input[name=https]").change(function (){
|
||||
if($("input[name=https]").prop('checked')) {
|
||||
$("#dialog").css({'display': 'inline', 'font-weight': 'bold'}).dialog({
|
||||
modal: true,
|
||||
buttons:{
|
||||
"<?php echo __('Close'); ?>": function(){
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
@ -368,5 +381,3 @@ function get_sounds()
|
|||
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ $table_behaviour->data[$row][1] = html_print_select($values, 'vc_refr', $config[
|
|||
$row++;
|
||||
|
||||
$table_behaviour->data[$row][0] = __('Paginated module view');
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox(
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'paginate_module',
|
||||
1,
|
||||
$config['paginate_module'],
|
||||
|
@ -84,7 +84,7 @@ $table_behaviour->data[$row][1] = html_print_checkbox(
|
|||
$row++;
|
||||
|
||||
$table_behaviour->data[$row][0] = __('Display data of proc modules in other format');
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox(
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'render_proc',
|
||||
1,
|
||||
$config['render_proc'],
|
||||
|
@ -102,7 +102,7 @@ $row++;
|
|||
|
||||
// Daniel maya 02/06/2016 Display menu with click --INI
|
||||
$table_behaviour->data[$row][0] = __('Click to display lateral menus').ui_print_help_tip(__('When enabled, the lateral menus are shown when left clicking them, instead of hovering over them'), true);
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox(
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'click_display',
|
||||
1,
|
||||
$config['click_display'],
|
||||
|
@ -121,7 +121,7 @@ if (enterprise_installed()) {
|
|||
}
|
||||
|
||||
$table_behaviour->data[$row][0] = __('Classic menu mode').ui_print_help_tip(__('Text menu options always visible, don\'t hide'), true);
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox(
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'classic_menu',
|
||||
1,
|
||||
$config['classic_menu'],
|
||||
|
@ -511,7 +511,7 @@ if (enterprise_installed()) {
|
|||
|
||||
if (enterprise_installed()) {
|
||||
$table_styles->data[$row][0] = __('Disable logo in graphs');
|
||||
$table_styles->data[$row][1] = html_print_checkbox(
|
||||
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'fixed_graph',
|
||||
1,
|
||||
$config['fixed_graph'],
|
||||
|
@ -527,7 +527,7 @@ if (enterprise_installed()) {
|
|||
*/
|
||||
|
||||
$table_styles->data[$row][0] = __('Disable helps');
|
||||
$table_styles->data[$row][1] = html_print_checkbox(
|
||||
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'disable_help',
|
||||
1,
|
||||
$config['disable_help'],
|
||||
|
@ -536,7 +536,7 @@ $table_styles->data[$row][1] = html_print_checkbox(
|
|||
$row++;
|
||||
|
||||
$table_styles->data[$row][0] = __('Fixed header');
|
||||
$table_styles->data[$row][1] = html_print_checkbox(
|
||||
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'fixed_header',
|
||||
1,
|
||||
$config['fixed_header'],
|
||||
|
@ -545,7 +545,7 @@ $table_styles->data[$row][1] = html_print_checkbox(
|
|||
$row++;
|
||||
|
||||
$table_styles->data[$row][0] = __('Fixed menu');
|
||||
$table_styles->data[$row][1] = html_print_checkbox(
|
||||
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'fixed_menu',
|
||||
1,
|
||||
$config['fixed_menu'],
|
||||
|
@ -555,7 +555,7 @@ $row++;
|
|||
|
||||
// For 5.1 Autohidden menu feature
|
||||
$table_styles->data['autohidden'][0] = __('Autohidden menu');
|
||||
$table_styles->data['autohidden'][1] = html_print_checkbox(
|
||||
$table_styles->data['autohidden'][1] = html_print_checkbox_toogle_switch(
|
||||
'autohidden_menu',
|
||||
1,
|
||||
$config['autohidden_menu'],
|
||||
|
@ -563,13 +563,14 @@ $table_styles->data['autohidden'][1] = html_print_checkbox(
|
|||
);
|
||||
|
||||
$table_styles->data[$row][0] = __('Visual effects and animation');
|
||||
$table_styles->data[$row][1] = html_print_checkbox(
|
||||
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'visual_animation',
|
||||
1,
|
||||
$config['visual_animation'],
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Style configuration').'</legend>';
|
||||
html_print_table($table_styles);
|
||||
|
@ -586,7 +587,7 @@ $table_gis->size[0] = '50%';
|
|||
$table_gis->data = [];
|
||||
|
||||
$table_gis->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_gis->data[$row][1] = html_print_checkbox(
|
||||
$table_gis->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'gis_label',
|
||||
1,
|
||||
$config['gis_label'],
|
||||
|
@ -699,7 +700,7 @@ $table_font->data[$row][1] = html_print_input_text(
|
|||
$row++;
|
||||
|
||||
$table_font->data[$row][0] = __('Show unit along with value in reports').ui_print_help_tip(__('This enabling this, max, min and avg values will be shown with units.'), true);
|
||||
$table_font->data[$row][1] = html_print_checkbox(
|
||||
$table_font->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'simple_module_value',
|
||||
1,
|
||||
$config['simple_module_value'],
|
||||
|
@ -797,7 +798,7 @@ $table_chars->data[$row][1] = html_print_input_text(
|
|||
$row++;
|
||||
|
||||
$table_chars->data[$row][0] = __('Use round corners');
|
||||
$table_chars->data[$row][1] = html_print_checkbox(
|
||||
$table_chars->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'round_corner',
|
||||
1,
|
||||
$config['round_corner'],
|
||||
|
@ -966,7 +967,7 @@ $table_other->data[$row][0] = __('Show report info with description').ui_print_h
|
|||
__('Custom report description info. It will be applied to all reports and templates by default.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[$row][1] = html_print_checkbox(
|
||||
$table_other->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'custom_report_info',
|
||||
1,
|
||||
$config['custom_report_info'],
|
||||
|
@ -986,6 +987,7 @@ $table_other->data[$row][1] = html_print_checkbox(
|
|||
$config['custom_report_front'],
|
||||
true
|
||||
);
|
||||
|
||||
$row++;
|
||||
// ----------------------------------------------------------------------
|
||||
$dirItems = scandir($config['homedir'].'/images/custom_logo');
|
||||
|
@ -1079,7 +1081,7 @@ $table_other->data['custom_report_front-footer'][1] = html_print_textarea(
|
|||
|
||||
|
||||
$table_other->data[$row][0] = __('Show QR Code icon in the header');
|
||||
$table_other->data[$row][1] = html_print_checkbox(
|
||||
$table_other->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'show_qr_code_header',
|
||||
1,
|
||||
$config['show_qr_code_header'],
|
||||
|
@ -1117,7 +1119,7 @@ $table_other->data[$row][0] .= ui_print_help_tip(
|
|||
__('Show the group name instead the group icon.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[$row][1] = html_print_checkbox(
|
||||
$table_other->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'show_group_name',
|
||||
1,
|
||||
$config['show_group_name'],
|
||||
|
@ -1460,6 +1462,7 @@ $(document).ready (function () {
|
|||
.prop('checked');
|
||||
display_custom_report_front(custom_report,$(this).parent().parent().parent().parent().attr('id'));
|
||||
});
|
||||
$(".databox.filters").css('margin-bottom','-10px');
|
||||
});
|
||||
|
||||
// Change the favicon preview when is changed
|
||||
|
|
|
@ -751,7 +751,7 @@ if ($create_alert || $update_alert) {
|
|||
|
||||
// echo '<tr><td class="datos"><b>' . __('Alert filters') . ui_print_help_icon("snmp_alert_filters", true) . '</b></td></tr>';
|
||||
// OID
|
||||
echo '<tr id="tr-oid">'.'<td class="datos2">'.__('Enterprise String').'</td>'.'<td class="datos2">';
|
||||
echo '<tr id="tr-oid">'.'<td class="datos2">'.__('Enterprise String').ui_print_help_tip(__('Matches substrings. End the string with $ for exact matches.'), true).'</td>'.'<td class="datos2">';
|
||||
html_print_input_text('oid', $oid, '', 50, 255);
|
||||
echo '</td></tr>';
|
||||
|
||||
|
|
|
@ -140,8 +140,8 @@ if ($enterprise == ENTERPRISE_NOT_HOOK) {
|
|||
?>
|
||||
|
||||
<script>
|
||||
var open = "<?php echo $open; ?>";
|
||||
if(open){
|
||||
var isopen = "<?php echo $open; ?>";
|
||||
if(isopen){
|
||||
$(document).ready(function() {
|
||||
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
|
||||
jQuery.post ("ajax.php",
|
||||
|
@ -150,6 +150,7 @@ if(open){
|
|||
"message":"infomodal"},
|
||||
function (data, status) {
|
||||
$("#alert_messages").hide ()
|
||||
.css ("opacity", 1)
|
||||
.empty ()
|
||||
.append (data)
|
||||
.show ();
|
||||
|
|
|
@ -90,9 +90,9 @@ if ($get_response_params) {
|
|||
}
|
||||
|
||||
if ($get_response_target) {
|
||||
$response_id = get_parameter('response_id');
|
||||
$event_id = get_parameter('event_id');
|
||||
$server_id = get_parameter('server_id', 0);
|
||||
$response_id = (int) get_parameter('response_id');
|
||||
$event_id = (int) get_parameter('event_id');
|
||||
$server_id = (int) get_parameter('server_id');
|
||||
|
||||
$event_response = db_get_row('tevent_response', 'id', $response_id);
|
||||
|
||||
|
@ -101,7 +101,6 @@ if ($get_response_target) {
|
|||
}
|
||||
|
||||
echo events_get_response_target($event_id, $response_id, $server_id);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -198,12 +198,7 @@ if ($get_metaconsole_hash_data) {
|
|||
$console_password = $auth_serialized['console_password'];
|
||||
}
|
||||
|
||||
$pwd = $auth_token;
|
||||
// Create HASH login info
|
||||
$user = str_rot13($config['id_user']);
|
||||
$hashdata = $user.$pwd;
|
||||
$hashdata = md5($hashdata);
|
||||
$url_hash = "&loginhash=auto&loginhash_data=$hashdata&loginhash_user=$user";
|
||||
$url_hash = metaconsole_get_servers_url_hash($server);
|
||||
|
||||
echo $url_hash;
|
||||
return;
|
||||
|
|
|
@ -88,16 +88,13 @@ if (file_exists('languages/'.$user_language.'.mo')) {
|
|||
$params['menu'] = false;
|
||||
|
||||
if ((!isset($params['width']) || ($params['width'] <= 0))) {
|
||||
$params['width'] = 1048;
|
||||
$params['width'] = 650;
|
||||
}
|
||||
|
||||
$params_combined = json_decode($_REQUEST['data_combined'], true);
|
||||
$module_list = json_decode($_REQUEST['data_module_list'], true);
|
||||
$type_graph_pdf = $_REQUEST['type_graph_pdf'];
|
||||
|
||||
$aux_font_size = $config['font_size'];
|
||||
$config['font_size'] = ($config['font_size'] + 3);
|
||||
|
||||
echo '<div>';
|
||||
switch ($type_graph_pdf) {
|
||||
case 'combined':
|
||||
|
@ -216,7 +213,6 @@ if (file_exists('languages/'.$user_language.'.mo')) {
|
|||
|
||||
echo '</div>';
|
||||
|
||||
$config['font_size'] = $aux_font_size;
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC190207';
|
||||
$build_version = 'PC190225';
|
||||
$pandora_version = 'v7.0NG.731';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -1754,7 +1754,8 @@ function get_snmpwalk(
|
|||
$quick_print=0,
|
||||
$base_oid='',
|
||||
$snmp_port='',
|
||||
$server_to_exec=0
|
||||
$server_to_exec=0,
|
||||
$extra_arguments=''
|
||||
) {
|
||||
global $config;
|
||||
|
||||
|
@ -1805,15 +1806,15 @@ function get_snmpwalk(
|
|||
case '3':
|
||||
switch ($snmp3_security_level) {
|
||||
case 'authNoPriv':
|
||||
$command_str = $snmpwalk_bin.' -m ALL -Oa -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
|
||||
$command_str = $snmpwalk_bin.' -m ALL -Oa '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
|
||||
break;
|
||||
|
||||
case 'noAuthNoPriv':
|
||||
$command_str = $snmpwalk_bin.' -m ALL -Oa -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -l '.escapeshellarg($snmp3_security_level).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
|
||||
$command_str = $snmpwalk_bin.' -m ALL -Oa '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -l '.escapeshellarg($snmp3_security_level).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
|
||||
break;
|
||||
|
||||
default:
|
||||
$command_str = $snmpwalk_bin.' -m ALL -Oa -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
|
||||
$command_str = $snmpwalk_bin.' -m ALL -Oa '.$extra_arguments.' -v 3'.' -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -1822,7 +1823,7 @@ function get_snmpwalk(
|
|||
case '2c':
|
||||
case '1':
|
||||
default:
|
||||
$command_str = $snmpwalk_bin.' -m ALL -Oa -v '.escapeshellarg($snmp_version).' -c '.escapeshellarg(io_safe_output($snmp_community)).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
|
||||
$command_str = $snmpwalk_bin.' -m ALL '.$extra_arguments.' -Oa -v '.escapeshellarg($snmp_version).' -c '.escapeshellarg(io_safe_output($snmp_community)).' '.escapeshellarg($ip_target).' '.$base_oid.' 2> '.$error_redir_dir;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -949,11 +949,11 @@ function agents_get_group_agents(
|
|||
|
||||
$filter = [];
|
||||
|
||||
// check available groups for target user only if asking for 'All' group
|
||||
// Check available groups for target user only if asking for 'All' group.
|
||||
if (!$noACL && $id_group == 0) {
|
||||
$id_group = $id_group == 0 ? array_keys(users_get_groups(false, 'AR', false)) : groups_safe_acl($config['id_user'], $id_group, 'AR');
|
||||
$id_group = ($id_group == 0) ? array_keys(users_get_groups(false, 'AR', false)) : groups_safe_acl($config['id_user'], $id_group, 'AR');
|
||||
if (empty($id_group)) {
|
||||
// An empty array means the user doesn't have access
|
||||
// An empty array means the user doesn't have access.
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
@ -970,7 +970,7 @@ function agents_get_group_agents(
|
|||
$id_group = groups_get_id_recursive($id_group, true);
|
||||
}
|
||||
|
||||
// check available groups for target user only if asking for 'All' group
|
||||
// Check available groups for target user only if asking for 'All' group.
|
||||
if (!$noACL && $id_group == 0) {
|
||||
$id_group = array_keys(
|
||||
users_get_groups(false, 'AR', true, false, (array) $id_group)
|
||||
|
@ -978,7 +978,7 @@ function agents_get_group_agents(
|
|||
}
|
||||
}
|
||||
|
||||
// Search for primary and secondary groups
|
||||
// Search for primary and secondary groups.
|
||||
if (!empty($id_group)) {
|
||||
$filter[] = '('.db_format_array_where_clause_sql(
|
||||
[
|
||||
|
@ -990,7 +990,7 @@ function agents_get_group_agents(
|
|||
}
|
||||
|
||||
if ($search === true) {
|
||||
// No added search. Show both disabled and non-disabled
|
||||
// No added search. Show both disabled and non-disabled.
|
||||
} else if (is_array($search)) {
|
||||
if (!$search['all_agents']) {
|
||||
$filter['disabled'] = 0;
|
||||
|
@ -3102,7 +3102,7 @@ function select_agents_for_module_group(
|
|||
'AND',
|
||||
'tagente_modulo',
|
||||
true,
|
||||
[],
|
||||
$filter['tags'],
|
||||
false
|
||||
);
|
||||
$sql_tags_inner = 'INNER JOIN ttag_module
|
||||
|
|
|
@ -1700,6 +1700,43 @@ function alerts_get_effective_alert_actions($id_agent_module)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validate alerts for the given module.
|
||||
*
|
||||
* @param int agent_module_id ID of the module
|
||||
*/
|
||||
function alerts_validate_alert_module($agent_module_id)
|
||||
{
|
||||
db_process_sql(
|
||||
sprintf(
|
||||
'UPDATE talert_template_modules
|
||||
SET times_fired=0, internal_counter=0
|
||||
WHERE id_agent_module = %d',
|
||||
$agent_module_id
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validate alerts for the given agent.
|
||||
*
|
||||
* @param int agent_id ID of the agent
|
||||
*/
|
||||
function alerts_validate_alert_agent($agent_id)
|
||||
{
|
||||
db_process_sql(
|
||||
sprintf(
|
||||
'UPDATE talert_template_modules tm
|
||||
INNER JOIN tagente_modulo am ON tm.id_agent_module = am.id_agente_modulo
|
||||
SET tm.times_fired=0, tm.internal_counter=0
|
||||
WHERE am.id_agente = %d',
|
||||
$agent_id
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validates an alert id or an array of alert id's.
|
||||
*
|
||||
|
|
|
@ -363,23 +363,18 @@ function api_get_test_event_replication_db()
|
|||
// -------------------------DEFINED OPERATIONS FUNCTIONS-----------------
|
||||
function api_get_groups($thrash1, $thrash2, $other, $returnType, $user_in_db)
|
||||
{
|
||||
if (defined('METACONSOLE')) {
|
||||
return;
|
||||
$returnAllGroup = true;
|
||||
$returnAllColumns = false;
|
||||
|
||||
if (isset($other['data'][1])) {
|
||||
$returnAllGroup = ( $other['data'][1] == '1' ? true : false);
|
||||
}
|
||||
|
||||
if ($other['type'] == 'string') {
|
||||
if ($other['data'] != '') {
|
||||
returnError('error_parameter', 'Error in the parameters.');
|
||||
return;
|
||||
} else {
|
||||
// Default values
|
||||
$separator = ';';
|
||||
}
|
||||
} else if ($other['type'] == 'array') {
|
||||
$separator = $other['data'][0];
|
||||
if (isset($other['data'][2])) {
|
||||
$returnAllColumns = ( $other['data'][2] == '1' ? true : false);
|
||||
}
|
||||
|
||||
$groups = users_get_groups($user_in_db, 'IR');
|
||||
$groups = users_get_groups($user_in_db, 'IR', $returnAllGroup, $returnAllColumns);
|
||||
|
||||
$data_groups = [];
|
||||
foreach ($groups as $id => $group) {
|
||||
|
@ -389,6 +384,13 @@ function api_get_groups($thrash1, $thrash2, $other, $returnType, $user_in_db)
|
|||
];
|
||||
}
|
||||
|
||||
if (!isset($other['data'][0])) {
|
||||
$separator = ';';
|
||||
// by default
|
||||
} else {
|
||||
$separator = $other['data'][0];
|
||||
}
|
||||
|
||||
$data['type'] = 'array';
|
||||
$data['data'] = $data_groups;
|
||||
|
||||
|
@ -472,11 +474,12 @@ function api_get_module_last_value($idAgentModule, $trash1, $other=';', $returnT
|
|||
DB column mapping table used by tree_agents (and get module_properties)
|
||||
*/
|
||||
|
||||
// agent related field mappings (output field => column designation for 'tagente')
|
||||
/*
|
||||
* Agent related field mappings (output field => column designation for 'tagente').
|
||||
* agent_id is not in this list (because it is mandatory).
|
||||
* agent_id_group is not in this list.
|
||||
*/
|
||||
$agent_field_column_mapping = [
|
||||
/*
|
||||
agent_id is not in this list (because it is mandatory) */
|
||||
// agent_id_group is not in this list
|
||||
'agent_name' => 'nombre as agent_name',
|
||||
'agent_direction' => 'direccion as agent_direction',
|
||||
'agent_comentary' => 'comentarios as agent_comentary',
|
||||
|
@ -496,8 +499,8 @@ $agent_field_column_mapping = [
|
|||
];
|
||||
|
||||
// module related field mappings 1/2 (output field => column for 'tagente_modulo')
|
||||
// module_id_agent_modulo is not in this list
|
||||
$module_field_column_mampping = [
|
||||
// module_id_agent_modulo is not in this list
|
||||
'module_id_agent' => 'id_agente as module_id_agent',
|
||||
'module_id_module_type' => 'id_tipo_modulo as module_id_module_type',
|
||||
'module_description' => 'descripcion as module_description',
|
||||
|
@ -541,8 +544,8 @@ $module_field_column_mampping = [
|
|||
];
|
||||
|
||||
// module related field mappings 2/2 (output field => column for 'tagente_estado')
|
||||
// module_id_agent_modulo is not in this list
|
||||
$estado_fields_to_columns_mapping = [
|
||||
// module_id_agent_modulo is not in this list
|
||||
'module_id_agent_state' => 'id_agente_estado as module_id_agent_state',
|
||||
'module_data' => 'datos as module_data',
|
||||
'module_timestamp' => 'timestamp as module_timestamp',
|
||||
|
@ -6172,17 +6175,29 @@ function api_set_planned_downtimes_deleted($id, $thrash1, $thrash2, $returnType)
|
|||
|
||||
/**
|
||||
* Create a new planned downtime.
|
||||
* e.g.: api.php?op=set&op2=planned_downtimes_created&id=pepito&other=testing|08-22-2015|08-31-2015|0|1|1|1|1|1|1|1|17:06:00|19:06:00|1|31|quiet|periodically|weekly&other_mode=url_encode_separator_|
|
||||
*
|
||||
* @param $id name of planned downtime.
|
||||
* @param $thrash1 Don't use.
|
||||
* @param array $other it's array, $other as param is <description>;<date_from>;<date_to>;<id_group>;<monday>;
|
||||
* <tuesday>;<wednesday>;<thursday>;<friday>;<saturday>;<sunday>;<periodically_time_from>;<periodically_time_to>;
|
||||
* <periodically_day_from>;<periodically_day_to>;<type_downtime>;<type_execution>;<type_periodicity>; in this order
|
||||
* and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_<separator>)
|
||||
* example:
|
||||
*
|
||||
* api.php?op=set&op2=planned_downtimes_created&id=pepito&other=testing|08-22-2015|08-31-2015|0|1|1|1|1|1|1|1|17:06:00|19:06:00|1|31|quiet|periodically|weekly&other_mode=url_encode_separator_|
|
||||
*
|
||||
* @param array $other Contains the following elements (in order):
|
||||
* <description>
|
||||
* <date_from>
|
||||
* <date_to>
|
||||
* <id_group>
|
||||
* <monday>
|
||||
* <tuesday>
|
||||
* <wednesday>
|
||||
* <thursday>
|
||||
* <friday>
|
||||
* <saturday>
|
||||
* <sunday>
|
||||
* <periodically_time_from>
|
||||
* <periodically_time_to>
|
||||
* <periodically_day_from>
|
||||
* <periodically_day_to>
|
||||
* <type_downtime>
|
||||
* <type_execution>
|
||||
* <type_periodicity>
|
||||
* @param $thrash3 Don't use.
|
||||
*/
|
||||
|
||||
|
@ -6246,20 +6261,16 @@ function api_set_planned_downtimes_created($id, $thrash1, $other, $thrash3)
|
|||
|
||||
/**
|
||||
* Add new items to planned Downtime.
|
||||
* e.g.: api.php?op=set&op2=planned_downtimes_additem&id=123&other=1;2;3;4|Status;Unkown_modules&other_mode=url_encode_separator_|
|
||||
*
|
||||
* @param $id id of planned downtime.
|
||||
* @param $thrash1 Don't use.
|
||||
* @param array $other it's array, $other as param is <id_agent1;id_agent2;id_agent3;....id_agentn;>;
|
||||
* <name_module1;name_module2;name_module3;......name_modulen;> in this order
|
||||
* and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_<separator>)
|
||||
* example:
|
||||
*
|
||||
* api.php?op=set&op2=planned_downtimes_additem&id=123&other=1;2;3;4|Status;Unkown_modules&other_mode=url_encode_separator_|
|
||||
*
|
||||
* @param array $other
|
||||
* The first index contains a list of agent Ids.
|
||||
* The second index contains a list of module names.
|
||||
* The list separator is the character ';'.
|
||||
* @param $thrash3 Don't use.
|
||||
*/
|
||||
|
||||
|
||||
function api_set_planned_downtimes_additem($id, $thrash1, $other, $thrash3)
|
||||
{
|
||||
if (defined('METACONSOLE')) {
|
||||
|
@ -14609,3 +14620,67 @@ function api_get_users($thrash1, $thrash2, $other, $returnType)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Resets module counts and alert counts in the agents
|
||||
*
|
||||
* @param $id id of the agent you want to synchronize. Add "All" to synchronize all agents
|
||||
* @param $trash1
|
||||
* @param $trash2
|
||||
* @param $trash3
|
||||
*
|
||||
* Example:
|
||||
* api.php?op=set&op2=reset_agent_counts&apipass=1234&user=admin&pass=pandora&id=All
|
||||
*/
|
||||
function api_set_reset_agent_counts($id, $thrash1, $thrash2, $thrash3)
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (!check_acl($config['id_user'], 0, 'AW')) {
|
||||
returnError('forbidden', 'string');
|
||||
return;
|
||||
}
|
||||
|
||||
if ($id == '' || !$id) {
|
||||
returnError('error_parameter', __('Error. Agent cannot be left blank.'));
|
||||
return;
|
||||
}
|
||||
|
||||
if ($id != 'All') {
|
||||
$agent = db_get_row_filter('tagente', ['id_agente' => $id]);
|
||||
if (empty($agent)) {
|
||||
returnError('error_agent', __('This agent does not exist.'));
|
||||
return;
|
||||
} else {
|
||||
$return = db_process_sql_update(
|
||||
'tagente',
|
||||
[
|
||||
'update_module_count' => 1,
|
||||
'update_alert_count' => 1,
|
||||
],
|
||||
['id_agente' => $id]
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$return = db_process_sql_update(
|
||||
'tagente',
|
||||
[
|
||||
'update_module_count' => 1,
|
||||
'update_alert_count' => 1,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$data = __('Successfully updated module/alert count in id agent %d.', $id);
|
||||
if ($id == 'All') {
|
||||
$data = __('Successfully updated module/alert count in all agents');
|
||||
}
|
||||
|
||||
if ($return === false) {
|
||||
returnError('error_reset_agent_counts', 'Could not be updated module/alert counts in id agent %d.', $id);
|
||||
} else {
|
||||
returnData('string', ['type' => 'string', 'data' => $data]);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ function config_update_config()
|
|||
$error_update[] = __('Automatic check for updates');
|
||||
}
|
||||
|
||||
if (!config_update_value('cert_path', (bool) get_parameter('cert_path'))) {
|
||||
if (!config_update_value('cert_path', get_parameter('cert_path'))) {
|
||||
$error_update[] = __('SSL cert path');
|
||||
}
|
||||
|
||||
|
@ -294,6 +294,10 @@ function config_update_config()
|
|||
if (!config_update_value('auditdir', get_parameter('auditdir'))) {
|
||||
$error_update[] = __('Audit log directory');
|
||||
}
|
||||
|
||||
if (!config_update_value('unique_ip', get_parameter('unique_ip'))) {
|
||||
$error_update[] = __('unique_ip');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'enterprise':
|
||||
|
@ -735,6 +739,10 @@ function config_update_config()
|
|||
if (!config_update_value('max_graph_container', get_parameter('max_graph_container'))) {
|
||||
$error_update[] = __('Graph container - Max. Items');
|
||||
}
|
||||
|
||||
if (!config_update_value('max_execution_event_response', get_parameter('max_execution_event_response'))) {
|
||||
$error_update[] = __('Max. execution event response');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'vis':
|
||||
|
@ -1517,6 +1525,10 @@ function config_process_config()
|
|||
config_update_value('max_graph_container', 10);
|
||||
}
|
||||
|
||||
if (!isset($config['max_execution_event_response'])) {
|
||||
config_update_value('max_execution_event_response', 10);
|
||||
}
|
||||
|
||||
if (!isset($config['max_macro_fields'])) {
|
||||
config_update_value('max_macro_fields', 10);
|
||||
}
|
||||
|
@ -1661,6 +1673,10 @@ function config_process_config()
|
|||
config_update_value('limit_parameters_massive', (ini_get('max_input_vars') / 2));
|
||||
}
|
||||
|
||||
if (!isset($config['unique_ip'])) {
|
||||
config_update_value('unique_ip', 0);
|
||||
}
|
||||
|
||||
/*
|
||||
*Parse the ACL IP list for access API
|
||||
*/
|
||||
|
@ -2851,7 +2867,7 @@ function config_check()
|
|||
);
|
||||
}
|
||||
|
||||
$result_ejecution = exec($config['phantomjs_bin'].'/phantomjs --version');
|
||||
$result_ejecution = exec('"'.io_safe_output($config['phantomjs_bin']).'/phantomjs" --version');
|
||||
if (!isset($result_ejecution) || $result_ejecution == '') {
|
||||
if ($config['language'] == 'es') {
|
||||
set_pandora_error_for_header(
|
||||
|
|
|
@ -37,7 +37,7 @@ function events_get_all_fields()
|
|||
$columns['estado'] = __('Status');
|
||||
$columns['timestamp'] = __('Timestamp');
|
||||
$columns['event_type'] = __('Event type');
|
||||
$columns['id_agentmodule'] = __('Agent module');
|
||||
$columns['id_agentmodule'] = __('Module name');
|
||||
$columns['id_alert_am'] = __('Alert');
|
||||
$columns['criticity'] = __('Severity');
|
||||
$columns['user_comment'] = __('Comment');
|
||||
|
@ -166,92 +166,30 @@ function events_get_events_grouped(
|
|||
$groupby_extra = '';
|
||||
}
|
||||
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
db_process_sql('SET group_concat_max_len = 9999999');
|
||||
$event_lj = events_get_secondary_groups_left_join($table);
|
||||
if ($total) {
|
||||
$sql = "SELECT COUNT(*) FROM (SELECT *
|
||||
FROM $table te $event_lj
|
||||
WHERE 1=1 ".$sql_post.'
|
||||
GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra.') AS t';
|
||||
} else {
|
||||
$sql = "SELECT *, MAX(id_evento) AS id_evento,
|
||||
GROUP_CONCAT(DISTINCT user_comment SEPARATOR '<br>') AS user_comment,
|
||||
GROUP_CONCAT(DISTINCT id_evento SEPARATOR ',') AS similar_ids,
|
||||
COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep,
|
||||
MIN(utimestamp) AS timestamp_rep_min,
|
||||
(SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user,
|
||||
(SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario,
|
||||
(SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente,
|
||||
(SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity,
|
||||
(SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp,
|
||||
(SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = te.id_agentmodule) AS module_name
|
||||
FROM $table te $event_lj
|
||||
WHERE 1=1 ".$sql_post.'
|
||||
GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra;
|
||||
$sql .= ' '.events_get_sql_order($sort_field, $order, 2);
|
||||
$sql .= ' LIMIT '.$offset.','.$pagination;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
if ($total) {
|
||||
$sql = "SELECT COUNT(*)
|
||||
FROM $table te
|
||||
WHERE 1=1 ".$sql_post.'
|
||||
GROUP BY estado, evento, id_agentmodule, id_evento, id_agente, id_usuario, id_grupo, estado, timestamp, utimestamp, event_type, id_alert_am, criticity, user_comment, tags, source, id_extra'.$groupby_extra;
|
||||
} else {
|
||||
$sql = "SELECT *, MAX(id_evento) AS id_evento, array_to_string(array_agg(DISTINCT user_comment), '<br>') AS user_comment,
|
||||
array_to_string(array_agg(DISTINCT id_evento), ',') AS similar_ids,
|
||||
COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep,
|
||||
MIN(utimestamp) AS timestamp_rep_min,
|
||||
(SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user,
|
||||
(SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario,
|
||||
(SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente,
|
||||
(SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity,
|
||||
(SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp
|
||||
FROM $table te
|
||||
WHERE 1=1 ".$sql_post.'
|
||||
GROUP BY estado, evento, id_agentmodule, id_evento,
|
||||
id_agente, id_usuario, id_grupo, estado,
|
||||
timestamp, utimestamp, event_type, id_alert_am,
|
||||
criticity, user_comment, tags, source, id_extra,
|
||||
te.critical_instructions,
|
||||
te.warning_instructions,
|
||||
te.unknown_instructions,
|
||||
te.owner_user,
|
||||
te.ack_utimestamp,
|
||||
te.custom_data '.$groupby_extra.'
|
||||
ORDER BY timestamp_rep ASC LIMIT '.$pagination.' OFFSET '.$offset;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
if ($total) {
|
||||
$sql = "SELECT COUNT(*)
|
||||
FROM $table te
|
||||
WHERE 1=1 $sql_post
|
||||
GROUP BY estado, to_char(evento), id_agentmodule".$groupby_extra.') b ';
|
||||
} else {
|
||||
$set = [];
|
||||
$set['limit'] = $pagination;
|
||||
$set['offset'] = $offset;
|
||||
|
||||
$sql = "SELECT ta.*, tb.event_rep, tb.timestamp_rep, tb.timestamp_rep_min, tb.user_comments, tb.similar_ids
|
||||
FROM $table ta
|
||||
INNER JOIN (SELECT MAX(id_evento) AS id_evento, COUNT(id_evento) AS event_rep,
|
||||
MAX(utimestamp) AS timestamp_rep, MIN(utimestamp) AS timestamp_rep_min,
|
||||
TAB_TO_STRING(CAST(COLLECT(TO_CHAR(user_comment) ORDER BY id_evento ASC) AS t_varchar2_tab), '<br>') AS user_comments,
|
||||
TAB_TO_STRING(CAST(COLLECT(CAST(id_evento AS VARCHAR2(4000)) ORDER BY id_evento ASC) AS t_varchar2_tab)) AS similar_ids
|
||||
FROM $table te
|
||||
WHERE 1=1 $sql_post
|
||||
GROUP BY estado, to_char(evento), id_agentmodule$groupby_extra) tb
|
||||
ON ta.id_evento = tb.id_evento
|
||||
ORDER BY tb.timestamp_rep ASC";
|
||||
$sql = oracle_recode_query($sql, $set);
|
||||
}
|
||||
break;
|
||||
db_process_sql('SET group_concat_max_len = 9999999');
|
||||
$event_lj = events_get_secondary_groups_left_join($table);
|
||||
if ($total) {
|
||||
$sql = "SELECT COUNT(*) FROM (SELECT id_evento
|
||||
FROM $table te $event_lj
|
||||
WHERE 1=1 ".$sql_post.'
|
||||
GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra.') AS t';
|
||||
} else {
|
||||
$sql = "SELECT *, MAX(id_evento) AS id_evento,
|
||||
GROUP_CONCAT(DISTINCT user_comment SEPARATOR '<br>') AS user_comment,
|
||||
GROUP_CONCAT(DISTINCT id_evento SEPARATOR ',') AS similar_ids,
|
||||
COUNT(id_evento) AS event_rep, MAX(utimestamp) AS timestamp_rep,
|
||||
MIN(utimestamp) AS timestamp_rep_min,
|
||||
(SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user,
|
||||
(SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario,
|
||||
(SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente,
|
||||
(SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity,
|
||||
(SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp,
|
||||
(SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = te.id_agentmodule) AS module_name
|
||||
FROM $table te $event_lj
|
||||
WHERE 1=1 ".$sql_post.'
|
||||
GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra;
|
||||
$sql .= ' '.events_get_sql_order($sort_field, $order, 2);
|
||||
$sql .= ' LIMIT '.$offset.','.$pagination;
|
||||
}
|
||||
|
||||
// Extract the events by filter (or not) from db
|
||||
|
@ -260,16 +198,6 @@ function events_get_events_grouped(
|
|||
if ($total) {
|
||||
return reset($events[0]);
|
||||
} else {
|
||||
// Override the column 'user_comment' with the column 'user_comments' when oracle
|
||||
if (!empty($events) && $config['dbtype'] == 'oracle') {
|
||||
array_walk(
|
||||
$events,
|
||||
function (&$value, $key) {
|
||||
set_if_defined($value['user_comment'], $value['user_comments']);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return $events;
|
||||
}
|
||||
}
|
||||
|
@ -2161,27 +2089,34 @@ function events_page_responses($event, $childrens_ids=[])
|
|||
}
|
||||
|
||||
|
||||
// Replace macros in the target of a response and return it
|
||||
// If server_id > 0, is a metaconsole query
|
||||
function events_get_response_target($event_id, $response_id, $server_id, $history=false)
|
||||
{
|
||||
/**
|
||||
* Replace macros in the target of a response and return it.
|
||||
* If server_id > 0, it's a metaconsole query.
|
||||
*
|
||||
* @param integer $event_id Event identifier.
|
||||
* @param integer $response_id Event response identifier.
|
||||
* @param integer $server_id Node identifier (for metaconsole).
|
||||
* @param boolean $history Use the history database or not.
|
||||
*
|
||||
* @return string The response text with the macros applied.
|
||||
*/
|
||||
function events_get_response_target(
|
||||
int $event_id,
|
||||
int $response_id,
|
||||
int $server_id=0,
|
||||
bool $history=false
|
||||
) {
|
||||
global $config;
|
||||
|
||||
$event_response = db_get_row('tevent_response', 'id', $response_id);
|
||||
|
||||
if ($server_id > 0) {
|
||||
$meta = true;
|
||||
} else {
|
||||
$meta = false;
|
||||
}
|
||||
|
||||
// If server_id > 0, it's a metaconsole query.
|
||||
$meta = $server_id > 0;
|
||||
$event_table = events_get_events_table($meta, $history);
|
||||
|
||||
$event = db_get_row($event_table, 'id_evento', $event_id);
|
||||
|
||||
$event_response = db_get_row('tevent_response', 'id', $response_id);
|
||||
$target = io_safe_output($event_response['target']);
|
||||
|
||||
// Substitute each macro
|
||||
// Substitute each macro.
|
||||
if (strpos($target, '_agent_address_') !== false) {
|
||||
if ($meta) {
|
||||
$agente_table_name = 'tmetaconsole_agent';
|
||||
|
@ -2195,7 +2130,7 @@ function events_get_response_target($event_id, $response_id, $server_id, $histor
|
|||
}
|
||||
|
||||
$ip = db_get_value_filter('direccion', $agente_table_name, $filter);
|
||||
// If agent has not an ip, display N/A
|
||||
// If agent has not an IP, display N/A.
|
||||
if ($ip === false) {
|
||||
$ip = __('N/A');
|
||||
}
|
||||
|
@ -2360,7 +2295,7 @@ function events_get_response_target($event_id, $response_id, $server_id, $histor
|
|||
$target = str_replace('_group_custom_id_', $group_custom_id, $target);
|
||||
}
|
||||
|
||||
// Parse the event custom data
|
||||
// Parse the event custom data.
|
||||
if (!empty($event['custom_data'])) {
|
||||
$custom_data = json_decode(base64_decode($event['custom_data']));
|
||||
foreach ($custom_data as $key => $value) {
|
||||
|
@ -2368,6 +2303,11 @@ function events_get_response_target($event_id, $response_id, $server_id, $histor
|
|||
}
|
||||
}
|
||||
|
||||
// This will replace the macro with the current logged user.
|
||||
if (strpos($target, '_current_user_') !== false) {
|
||||
$target = str_replace('_current_user_', $config['id_user'], $target);
|
||||
}
|
||||
|
||||
return $target;
|
||||
}
|
||||
|
||||
|
@ -4871,6 +4811,10 @@ function events_get_sql_order($sort_field='timestamp', $sort='DESC', $group_rep=
|
|||
*/
|
||||
function events_get_secondary_groups_left_join($table)
|
||||
{
|
||||
if (users_is_admin()) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($table == 'tevento') {
|
||||
return 'LEFT JOIN tagent_secondary_group tasg ON te.id_agente = tasg.id_agent';
|
||||
}
|
||||
|
|
|
@ -126,6 +126,12 @@ if (isset($config['homedir_filemanager'])) {
|
|||
$homedir_filemanager = $config['homedir'];
|
||||
}
|
||||
|
||||
$sec2 = get_parameter('sec2');
|
||||
if ($sec2 == 'enterprise/godmode/agentes/collections') {
|
||||
$homedir_filemanager .= '/attachment/collection/';
|
||||
}
|
||||
|
||||
|
||||
$upload_file_or_zip = (bool) get_parameter('upload_file_or_zip');
|
||||
|
||||
if ($upload_file_or_zip) {
|
||||
|
@ -499,12 +505,6 @@ function filemanager_file_explorer(
|
|||
$homedir_filemanager = $config['homedir'];
|
||||
}
|
||||
|
||||
unset($config['homedir_filemanager']);
|
||||
config_update_value(
|
||||
'homedir_filemanager',
|
||||
$homedir_filemanager
|
||||
);
|
||||
|
||||
$hack_metaconsole = '';
|
||||
if (defined('METACONSOLE')) {
|
||||
$hack_metaconsole = '../../';
|
||||
|
@ -938,4 +938,3 @@ function filemanager_list_dir($dirpath)
|
|||
|
||||
return array_merge($dirs, $files);
|
||||
}
|
||||
|
||||
|
|
|
@ -245,7 +245,9 @@ function grafico_modulo_sparse_data(
|
|||
}
|
||||
}
|
||||
|
||||
if ($array_data === false || (!$params['graph_combined'] && !isset($array_data['sum1']['data'][0][1]))) {
|
||||
if ($array_data === false || (!$params['graph_combined']
|
||||
&& !isset($array_data['sum1']['data'][0][1]) && !$params['baseline'])
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -4918,21 +4920,19 @@ function get_baseline_data($agent_module_id, $date_array, $data_module_graph, $p
|
|||
$period = $date_array['period'];
|
||||
$date = $date_array['final_date'];
|
||||
$array_data = [];
|
||||
|
||||
for ($i = 0; $i < 4; $i++) {
|
||||
$date_array = [];
|
||||
$date_array['period'] = $period;
|
||||
$date_array['final_date'] = ($date - $period * $i);
|
||||
$date_array['start_date'] = ($date - $period * ($i + 1));
|
||||
|
||||
$data = grafico_modulo_sparse_data(
|
||||
$date_array['final_date'] = ($date - ($period * $i));
|
||||
$date_array['start_date'] = ($date - ($period * ($i + 1)));
|
||||
$array_data[] = grafico_modulo_sparse_data(
|
||||
$agent_module_id,
|
||||
$date_array,
|
||||
$data_module_graph,
|
||||
$params,
|
||||
$i
|
||||
);
|
||||
|
||||
$array_data[] = $data;
|
||||
}
|
||||
|
||||
$result = [];
|
||||
|
|
|
@ -1822,35 +1822,35 @@ function html_get_predefined_table($model='transparent', $columns=4)
|
|||
* Print a nicely formatted table. Code taken from moodle.
|
||||
*
|
||||
* @param object Object with several properties:
|
||||
* $table->head - An array of heading names.
|
||||
* $table->head_colspan - An array of colspans of each head column.
|
||||
* $table->headstyle - An array of styles of each head column.
|
||||
* $table->align - An array of column alignments
|
||||
* $table->valign - An array of column alignments
|
||||
* $table->size - An array of column sizes
|
||||
* $table->wrap - An array of "nowrap"s or nothing
|
||||
* $table->style - An array of personalized style for each column.
|
||||
* $table->rowid - An array of personalized ids of each row.
|
||||
* $table->rowstyle - An array of personalized style of each row.
|
||||
* $table->rowclass - An array of personalized classes of each row (odd-evens classes will be ignored).
|
||||
* $table->colspan - An array of colspans of each column.
|
||||
* $table->rowspan - An array of rowspans of each column.
|
||||
* $table->data[] - An array of arrays containing the data.
|
||||
* $table->width - A percentage of the page
|
||||
* $table->border - Border of the table.
|
||||
* $table->tablealign - Align the whole table (float left or right)
|
||||
* $table->cellpadding - Padding on each cell
|
||||
* $table->cellspacing - Spacing between cells
|
||||
* $table->cellstyle - Style of a cell
|
||||
* $table->cellclass - Class of a cell
|
||||
* $table->class - CSS table class
|
||||
* $table->id - Table ID (useful in JavaScript)
|
||||
* $table->headclass[] - An array of classes for each heading
|
||||
* $table->title - Title of the table is a single string that will be on top of the table in the head spanning the whole table
|
||||
* $table->titlestyle - Title style
|
||||
* $table->titleclass - Title class
|
||||
* $table->styleTable - Table style
|
||||
* $table->caption - Table title
|
||||
* $table->head - An array of heading names.
|
||||
* $table->head_colspan - An array of colspans of each head column.
|
||||
* $table->headstyle - An array of styles of each head column.
|
||||
* $table->align - An array of column alignments
|
||||
* $table->valign - An array of column alignments
|
||||
* $table->size - An array of column sizes
|
||||
* $table->wrap - An array of "nowrap"s or nothing
|
||||
* $table->style - An array of personalized style for each column.
|
||||
* $table->rowid - An array of personalized ids of each row.
|
||||
* $table->rowstyle - An array of personalized style of each row.
|
||||
* $table->rowclass - An array of personalized classes of each row (odd-evens classes will be ignored).
|
||||
* $table->colspan - An array of colspans of each column.
|
||||
* $table->rowspan - An array of rowspans of each column.
|
||||
* $table->data[] - An array of arrays containing the data.
|
||||
* $table->width - A percentage of the page
|
||||
* $table->border - Border of the table.
|
||||
* $table->tablealign - Align the whole table (float left or right)
|
||||
* $table->cellpadding - Padding on each cell
|
||||
* $table->cellspacing - Spacing between cells
|
||||
* $table->cellstyle - Style of a cell
|
||||
* $table->cellclass - Class of a cell
|
||||
* $table->class - CSS table class
|
||||
* $table->id - Table ID (useful in JavaScript)
|
||||
* $table->headclass[] - An array of classes for each heading
|
||||
* $table->title - Title of the table is a single string that will be on top of the table in the head spanning the whole table
|
||||
* $table->titlestyle - Title style
|
||||
* $table->titleclass - Title class
|
||||
* $table->styleTable - Table style
|
||||
* $table->caption - Table title
|
||||
* @param bool Whether to return an output string or echo now
|
||||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
|
@ -2257,7 +2257,7 @@ function html_print_checkbox_extended($name, $value, $checked, $disabled, $scrip
|
|||
if ($id == '') {
|
||||
$output .= ' id="checkbox-'.$id_aux.'"';
|
||||
} else {
|
||||
$output .= ' '.$id.'"';
|
||||
$output .= ' id='.$id;
|
||||
}
|
||||
|
||||
if ($script != '') {
|
||||
|
@ -2306,6 +2306,89 @@ function html_print_checkbox($name, $value, $checked=false, $return=false, $disa
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render a checkbox button input toogle switch type. Extended version, use html_print_checkbox_toogle_switch() to simplify.
|
||||
*
|
||||
* @param string Input name.
|
||||
* @param string Input value.
|
||||
* @param string Set the button to be marked (optional, unmarked by default).
|
||||
* @param bool Disable the button (optional, button enabled by default).
|
||||
* @param string Script to execute when onClick event is triggered (optional).
|
||||
* @param string Optional HTML attributes. It's a free string which will be
|
||||
* @param bool Whether to return an output string or echo now (optional, echo by default).
|
||||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
*/
|
||||
|
||||
|
||||
function html_print_checkbox_toogle_switch_extended($name, $value, $checked, $disabled, $script, $attributes, $return=false, $id='')
|
||||
{
|
||||
static $idcounter = [];
|
||||
|
||||
// If duplicate names exist, it will start numbering. Otherwise it won't
|
||||
if (isset($idcounter[$name])) {
|
||||
$idcounter[$name]++;
|
||||
} else {
|
||||
$idcounter[$name] = 0;
|
||||
}
|
||||
|
||||
$id_aux = preg_replace('/[^a-z0-9\:\;\-\_]/i', '', $name.($idcounter[$name] ? $idcounter[$name] : ''));
|
||||
|
||||
$output = '<label class="toogle_switch"><input name="'.$name.'" type="checkbox" value="'.$value.'" '.($checked ? 'checked="checked"' : '');
|
||||
if ($id == '') {
|
||||
$output .= ' id="checkbox-'.$id_aux.'"';
|
||||
} else {
|
||||
$output .= ' '.$id.'"';
|
||||
}
|
||||
|
||||
if ($script != '') {
|
||||
$output .= ' onclick="'.$script.'"';
|
||||
}
|
||||
|
||||
if ($disabled) {
|
||||
$output .= ' disabled="disabled"';
|
||||
}
|
||||
|
||||
$output .= ' '.$attributes;
|
||||
$output .= ' /><span class="slider"></span></label>';
|
||||
$output .= "\n";
|
||||
|
||||
if ($return === false) {
|
||||
echo $output;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render a checkbox button input toogle switch type.
|
||||
*
|
||||
* @param string Input name.
|
||||
* @param string Input value.
|
||||
* @param string Set the button to be marked (optional, unmarked by default).
|
||||
* @param bool Whether to return an output string or echo now (optional, echo by default).
|
||||
* @param boolean $disabled Disable the button (optional, button enabled by default).
|
||||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
*/
|
||||
|
||||
|
||||
function html_print_checkbox_toogle_switch($name, $value, $checked=false, $return=false, $disabled=false, $script='', $disabled_hidden=false)
|
||||
{
|
||||
$output = html_print_checkbox_toogle_switch_extended($name, $value, (bool) $checked, $disabled, $script, '', true);
|
||||
if (!$disabled_hidden) {
|
||||
$output .= html_print_input_hidden($name.'_sent', 1, true);
|
||||
}
|
||||
|
||||
if ($return === false) {
|
||||
echo $output;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prints an image HTML element.
|
||||
*
|
||||
|
@ -2990,4 +3073,3 @@ function html_print_csrf_error()
|
|||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -541,7 +541,7 @@ function io_input_password($password)
|
|||
global $config;
|
||||
|
||||
enterprise_include_once('include/functions_crypto.php');
|
||||
$ciphertext = enterprise_hook('openssl_encrypt_decrypt', ['encrypt', $password]);
|
||||
$ciphertext = enterprise_hook('openssl_encrypt_decrypt', ['encrypt', io_safe_output($password)]);
|
||||
if ($ciphertext === ENTERPRISE_NOT_HOOK) {
|
||||
return $password;
|
||||
}
|
||||
|
@ -563,7 +563,7 @@ function io_output_password($password)
|
|||
global $config;
|
||||
|
||||
enterprise_include_once('include/functions_crypto.php');
|
||||
$plaintext = enterprise_hook('openssl_encrypt_decrypt', ['decrypt', $password]);
|
||||
$plaintext = enterprise_hook('openssl_encrypt_decrypt', ['decrypt', io_safe_output($password)]);
|
||||
if ($plaintext === ENTERPRISE_NOT_HOOK) {
|
||||
return $password;
|
||||
}
|
||||
|
|
|
@ -372,7 +372,7 @@ function menu_print_menu(&$menu)
|
|||
}
|
||||
|
||||
// Print out the first level
|
||||
$output .= '<li title="'.ucwords(str_replace(['oper-', 'god-'], '', $id)).'" class="'.implode(' ', $classes).' '.$seleccionado.'" id="icon_'.$id.'">';
|
||||
$output .= '<li title="'.$main['text'].'" class="'.implode(' ', $classes).' '.$seleccionado.'" id="icon_'.$id.'">';
|
||||
// onclick="location.href=\'index.php?sec='.$mainsec.'&sec2='.$main["sec2"].($main["refr"] ? '&refr='.$main["refr"] : '').'\'">';
|
||||
$length = strlen(__($main['text']));
|
||||
$padding_top = ( $length >= 18) ? 6 : 12;
|
||||
|
|
|
@ -329,6 +329,11 @@ function modules_change_disabled($id_agent_module, $new_value=1)
|
|||
continue;
|
||||
}
|
||||
|
||||
// Validate alerts for disabled modules.
|
||||
if ($new_value == 1) {
|
||||
alerts_validate_alert_module($id_module);
|
||||
}
|
||||
|
||||
$id_agent_changed[] = modules_get_agentmodule_agent($id_module);
|
||||
$id_agent_module_changed[] = $id_module;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
require_once 'functions_agents.php';
|
||||
require_once $config['homedir'].'/include/functions_modules.php';
|
||||
require_once $config['homedir'].'/include/functions_groups.php';
|
||||
ui_require_css_file('cluetip','include/styles/js/');
|
||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||
|
||||
|
||||
// Check if a node descends from a given node
|
||||
|
|
|
@ -725,8 +725,6 @@ function planned_downtimes_created($values)
|
|||
$check_group = (bool) db_get_value('id_grupo', 'tgrupo', 'id_grupo', $values['id_group']);
|
||||
$check = (bool) db_get_value('name', 'tplanned_downtime', 'name', $values['name']);
|
||||
|
||||
$datetime_from = strtotime($values['once_date_from'].' '.$values['once_time_from']);
|
||||
$datetime_to = strtotime($values['once_date_to'].' '.$values['once_time_to']);
|
||||
$now = time();
|
||||
$result = false;
|
||||
|
||||
|
@ -735,16 +733,16 @@ function planned_downtimes_created($values)
|
|||
'return' => false,
|
||||
'message' => __('Not created. Error inserting data. Start time must be higher than the current time'),
|
||||
];
|
||||
} else if ($values['type_execution'] == 'once' && !$config['past_planned_downtimes'] && $values['date_to'] <= $now) {
|
||||
return [
|
||||
'return' => false,
|
||||
'message' => __('Not created. Error inserting data').'. '.__('The end date must be higher than the current time'),
|
||||
];
|
||||
} else if ($values['type_execution'] == 'once' && $values['date_from'] >= $values['date_to']) {
|
||||
return [
|
||||
'return' => false,
|
||||
'message' => __('Not created. Error inserting data').'. '.__('The end date must be higher than the start date'),
|
||||
];
|
||||
} else if ($values['type_execution'] == 'once' && $values['date_to'] <= $now) {
|
||||
return [
|
||||
'return' => false,
|
||||
'message' => __('Not created. Error inserting data').'. '.__('The end date must be higher than the current time'),
|
||||
];
|
||||
} else if ($values['type_execution'] == 'periodically'
|
||||
&& (($values['type_periodicity'] == 'weekly' && $values['periodically_time_from'] >= $values['periodically_time_to'])
|
||||
|| ($values['type_periodicity'] == 'monthly' && $values['periodically_day_from'] == $values['periodically_day_to'] && $values['periodically_time_from'] >= $values['periodically_time_to']))
|
||||
|
|
|
@ -142,7 +142,6 @@ function reporting_make_reporting_data(
|
|||
enterprise_include_once('include/functions_metaconsole.php');
|
||||
|
||||
$return = [];
|
||||
|
||||
if (!empty($report)) {
|
||||
$contents = $report['contents'];
|
||||
} else {
|
||||
|
@ -261,7 +260,7 @@ function reporting_make_reporting_data(
|
|||
}
|
||||
|
||||
if (isset($content['style']['name_label'])) {
|
||||
// Add macros name
|
||||
// Add macros name.
|
||||
$items_label = [];
|
||||
$items_label['type'] = $content['type'];
|
||||
$items_label['id_agent'] = $content['id_agent'];
|
||||
|
@ -272,11 +271,10 @@ function reporting_make_reporting_data(
|
|||
$metaconsole_on = is_metaconsole();
|
||||
$server_name = $content['server_name'];
|
||||
|
||||
// Metaconsole connection
|
||||
// Metaconsole connection.
|
||||
if ($metaconsole_on && $server_name != '') {
|
||||
$connection = metaconsole_get_connection($server_name);
|
||||
if (!metaconsole_load_external_db($connection)) {
|
||||
// ui_print_error_message ("Error connecting to ".$server_name);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -889,7 +887,6 @@ function reporting_SLA(
|
|||
if ($metaconsole_on && $server_name != '') {
|
||||
$connection = metaconsole_get_connection($server_name);
|
||||
if (!metaconsole_load_external_db($connection)) {
|
||||
// ui_print_error_message ("Error connecting to ".$server_name);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -898,7 +895,7 @@ function reporting_SLA(
|
|||
|| modules_is_not_init($sla['id_agent_module'])
|
||||
) {
|
||||
if ($metaconsole_on) {
|
||||
// Restore db connection
|
||||
// Restore db connection.
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
|
@ -1183,12 +1180,11 @@ function reporting_SLA(
|
|||
}
|
||||
}
|
||||
|
||||
// SLA items sorted descending ()
|
||||
if ($content['top_n'] == 2) {
|
||||
// SLA items sorted descending ()
|
||||
arsort($return['data']['']);
|
||||
}
|
||||
// SLA items sorted ascending
|
||||
else if ($content['top_n'] == 1) {
|
||||
} else if ($content['top_n'] == 1) {
|
||||
// SLA items sorted ascending
|
||||
asort($sla_showed_values);
|
||||
}
|
||||
|
||||
|
@ -6724,7 +6720,7 @@ function reporting_general($report, $content)
|
|||
'id_agente_modulo',
|
||||
$row['id_agent_module']
|
||||
);
|
||||
|
||||
$id_module_type = db_get_value('id_tipo_modulo', 'tagente_modulo', 'nombre', $mod_name);
|
||||
if ($content['period'] == 0) {
|
||||
$data_res[$index] = modules_get_last_value($row['id_agent_module']);
|
||||
} else {
|
||||
|
@ -6771,10 +6767,24 @@ function reporting_general($report, $content)
|
|||
$agent_name[$index] = $ag_name;
|
||||
$module_name[$index] = $mod_name;
|
||||
$units[$index] = $unit;
|
||||
$id_module_types[$index] = $id_module_type;
|
||||
$operations[$index] = $row['operation'];
|
||||
break;
|
||||
|
||||
case REPORT_GENERAL_GROUP_BY_AGENT:
|
||||
$id_module_types[$index] = $id_module_type;
|
||||
if ($id_module_types[$index] == 2 || $id_module_types[$index] == 6 || $id_module_types[$index] == 9 || $id_module_types[$index] == 18) {
|
||||
$data_res[$index] = round($data_res[$index], 0, PHP_ROUND_HALF_DOWN);
|
||||
}
|
||||
|
||||
if ($id_module_types[$index] == 2 || $id_module_types[$index] == 6 || $id_module_types[$index] == 9 || $id_module_types[$index] == 18) {
|
||||
if ($data_res[$index] == 1) {
|
||||
$data_res[$index] = 'Up';
|
||||
} else if ($data_res[$index] == 0) {
|
||||
$data_res[$index] = 'Down';
|
||||
}
|
||||
}
|
||||
|
||||
if ($data_res[$index] === false) {
|
||||
$return['data'][$ag_name][$mod_name] = null;
|
||||
} else {
|
||||
|
@ -6896,7 +6906,7 @@ function reporting_general($report, $content)
|
|||
$data['module'] = $module_name[$i];
|
||||
$data['id_agent_module'] = $id_agent_module[$i];
|
||||
$data['id_agent'] = agents_get_agent_id_by_module_id($id_agent_module[$i]);
|
||||
|
||||
$data['id_module_type'] = $id_module_types[$i];
|
||||
$data['operator'] = '';
|
||||
if ($content['period'] != 0) {
|
||||
switch ($operations[$i]) {
|
||||
|
@ -11322,3 +11332,27 @@ function reporting_translate_sla_status_for_graph($status)
|
|||
];
|
||||
return $sts[$status];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print header to report pdf and add page break
|
||||
*
|
||||
* @param string $title Title of report.
|
||||
* @param string $description Description of report.
|
||||
*
|
||||
* @return html Return table of header.
|
||||
*/
|
||||
function reporting_header_table_for_pdf(string $title='', string $description='')
|
||||
{
|
||||
$result_pdf .= '<pagebreak>';
|
||||
$result_pdf .= '<table class="header_table databox">';
|
||||
$result_pdf .= '<thead class="header_tr"><tr>';
|
||||
$result_pdf .= '<th class="th_first" colspan="2">';
|
||||
$result_pdf .= $title;
|
||||
$result_pdf .= '</th><th style="font-size: 15px;" align="right">';
|
||||
$result_pdf .= '</th></tr><tr><th colspan="3" class="th_description">';
|
||||
$result_pdf .= $description;
|
||||
$result_pdf .= '</th></tr></thead></table>';
|
||||
|
||||
return $result_pdf;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -748,7 +748,7 @@ function tags_get_acl_tags(
|
|||
$id_user = $config['id_user'];
|
||||
}
|
||||
|
||||
if (is_user_admin($id_user)) {
|
||||
if (is_user_admin($id_user) && empty($childrens_ids)) {
|
||||
switch ($return_mode) {
|
||||
case 'data':
|
||||
return [];
|
||||
|
@ -797,7 +797,8 @@ function tags_get_acl_tags(
|
|||
// Return the condition of the tags for tagente_modulo table
|
||||
$condition = tags_get_acl_tags_module_condition(
|
||||
$acltags,
|
||||
$query_table
|
||||
$query_table,
|
||||
empty($childrens_ids) ? [] : $childrens_ids
|
||||
);
|
||||
if (!empty($condition)) {
|
||||
return " $query_prefix ".$condition;
|
||||
|
@ -825,7 +826,7 @@ function tags_get_acl_tags(
|
|||
*
|
||||
* @return string SQL condition for tagente_module
|
||||
*/
|
||||
function tags_get_acl_tags_module_condition($acltags, $modules_table='')
|
||||
function tags_get_acl_tags_module_condition($acltags, $modules_table='', $force_tags=[])
|
||||
{
|
||||
if (!empty($modules_table)) {
|
||||
$modules_table .= '.';
|
||||
|
@ -839,6 +840,17 @@ function tags_get_acl_tags_module_condition($acltags, $modules_table='')
|
|||
// The acltags array contains the groups with the acl propagation applied
|
||||
// after the changes done into the 'tags_get_user_groups_and_tags' function.
|
||||
foreach ($acltags as $group_id => $group_tags) {
|
||||
if (empty($group_tags)) {
|
||||
$group_tags = [];
|
||||
if (!empty($force_tags)) {
|
||||
$group_tags = $force_tags;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($group_tags)) {
|
||||
$group_tags = array_intersect($force_tags, $group_tags);
|
||||
}
|
||||
|
||||
$tag_join = '';
|
||||
if (!empty($group_tags)) {
|
||||
$tag_join = sprintf('AND ttag_module.id_tag IN (%s)', is_array($group_tags) ? implode(',', $group_tags) : $group_tags);
|
||||
|
@ -849,7 +861,7 @@ function tags_get_acl_tags_module_condition($acltags, $modules_table='')
|
|||
}
|
||||
|
||||
$group_conditions[] = $agent_condition;
|
||||
} else {
|
||||
} else if (!empty($force_tags)) {
|
||||
$without_tags[] = $group_id;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -711,7 +711,7 @@ function update_manager_extract_package()
|
|||
|
||||
rrmdir($path_package);
|
||||
|
||||
if ($result != 0) {
|
||||
if ($result == 0) {
|
||||
db_process_sql_update(
|
||||
'tconfig',
|
||||
[
|
||||
|
|
|
@ -3902,13 +3902,16 @@ function visual_map_translate_agent_status($agent_status)
|
|||
{
|
||||
switch ($agent_status) {
|
||||
case AGENT_STATUS_NORMAL:
|
||||
case AGENT_MODULE_STATUS_NORMAL_ALERT:
|
||||
default:
|
||||
return VISUAL_MAP_STATUS_NORMAL;
|
||||
|
||||
case AGENT_STATUS_CRITICAL:
|
||||
case AGENT_MODULE_STATUS_CRITICAL_ALERT:
|
||||
return VISUAL_MAP_STATUS_CRITICAL_BAD;
|
||||
|
||||
case AGENT_STATUS_WARNING:
|
||||
case AGENT_MODULE_STATUS_WARNING_ALERT:
|
||||
return VISUAL_MAP_STATUS_WARNING;
|
||||
|
||||
case AGENT_STATUS_NOT_INIT:
|
||||
|
|
|
@ -1150,7 +1150,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
echo '<div id="div_step_2" class="forced_title_layer"
|
||||
style="display: none; position: absolute; z-index: 99;">'.__('Click end point<br />of the line').'</div>';
|
||||
|
||||
ui_require_css_file('color-picker','include/styles/js/');
|
||||
ui_require_css_file('color-picker', 'include/styles/js/');
|
||||
|
||||
ui_require_jquery_file('colorpicker');
|
||||
?>
|
||||
|
@ -1313,20 +1313,79 @@ function visual_map_editor_print_hack_translate_strings()
|
|||
echo '<span id="any_text" style="display: none;">'.__('Any').'</span>';
|
||||
echo '<span id="ip_text" style="display: none;">'.__('IP').'</span>';
|
||||
|
||||
// Hack to translate messages in javascript
|
||||
echo '<span style="display: none" id="message_alert_no_label_no_image">'.__('No image or name defined.').'</span>';
|
||||
echo '<span style="display: none" id="message_alert_no_label">'.__('No label defined.').'</span>';
|
||||
echo '<span style="display: none" id="message_alert_no_image">'.__('No image defined.').'</span>';
|
||||
echo '<span style="display: none" id="message_alert_no_process">'.__('No process defined.').'</span>';
|
||||
echo '<span style="display: none" id="message_alert_no_max_percentile">'.__('No Max value defined.').'</span>';
|
||||
echo '<span style="display: none" id="message_alert_no_width_percentile">'.__('No width defined.').'</span>';
|
||||
echo '<span style="display: none" id="message_alert_no_bars_graph_height">'.__('No height defined.').'</span>';
|
||||
echo '<span style="display: none" id="message_alert_no_period">'.__('No period defined.').'</span>';
|
||||
echo '<span style="display: none" id="message_alert_no_agent">'.__('No agent defined.').'</span>';
|
||||
echo '<span style="display: none" id="message_alert_no_module">'.__('No module defined.').'</span>';
|
||||
// Hack to translate messages in javascript.
|
||||
echo "<div id='message_min_allowed_size' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('Min allowed size is 1024x768.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_custom_graph' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No custom graph defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_label_no_image' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No image or name defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_label' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No label defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_service' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No service defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_image' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No image defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_process' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No process defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_max_percentile' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No Max value defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_width' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No width defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_height' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No height defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_max_width' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('The width must not exceed the size of the visual console container.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_max_height' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('The height must not exceed the size of the visual console container.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_period' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No period defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_agent' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No agent defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_module' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No module defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_module_string_type' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No module defined. This module must be string type.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='hack_translation_correct_save' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('Successfully save the changes.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='hack_translation_incorrect_save' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('Could not be save.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<span style="display: none" id="hack_translation_correct_save">'.__('Successfully save the changes.').'</span>';
|
||||
echo '<span style="display: none" id="hack_translation_incorrect_save">'.__('Could not be save').'</span>';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -856,11 +856,12 @@ function pandoraFlotSlicebar(
|
|||
}
|
||||
|
||||
var font_size = parseInt(font_size);
|
||||
var font = font
|
||||
.split("/")
|
||||
.pop()
|
||||
.split(".")
|
||||
.shift();
|
||||
if (font != undefined)
|
||||
var font = font
|
||||
.split("/")
|
||||
.pop()
|
||||
.split(".")
|
||||
.shift();
|
||||
// Check possible adapt_keys on classes
|
||||
check_adaptions(graph_id);
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ function gd_histogram($width, $height, $mode, $data, $max_value, $font, $title,
|
|||
foreach ($data as $label => $value) {
|
||||
imagefilledrectangle($image, $leftmargin, $margin_up, (($value / $size_per) + $leftmargin), ($margin_up + $rectangle_height - 1), $colors[$c]);
|
||||
if ($mode != 2) {
|
||||
ImageTTFText($image, $fontsize, 0, 0, ($margin_up + 8), $black, $font, $label);
|
||||
imagettftext($image, $fontsize, 0, 0, ($margin_up + 8), $black, $font, $label);
|
||||
}
|
||||
|
||||
$margin_up += ($rectangle_height + 1);
|
||||
|
@ -164,9 +164,9 @@ function gd_histogram($width, $height, $mode, $data, $max_value, $font, $title,
|
|||
imageline($image, $risk_low, 0, $risk_low, $height, $grey);
|
||||
imageline($image, $risk_med, 0, $risk_med, $height, $grey);
|
||||
imageline($image, $risk_high, 0, $risk_high, $height, $grey);
|
||||
ImageTTFText($image, $fontsize, 0, ($risk_low - 20), $height, $grey, $font, 'Low');
|
||||
ImageTTFText($image, $fontsize, 0, ($risk_med - 20), $height, $grey, $font, 'Med.');
|
||||
ImageTTFText($image, $fontsize, 0, ($risk_high - 25), $height, $grey, $font, 'High');
|
||||
imagettftext($image, $fontsize, 0, ($risk_low - 20), $height, $grey, $font, 'Low');
|
||||
imagettftext($image, $fontsize, 0, ($risk_med - 20), $height, $grey, $font, 'Med.');
|
||||
imagettftext($image, $fontsize, 0, ($risk_high - 25), $height, $grey, $font, 'High');
|
||||
}
|
||||
|
||||
imagepng($image);
|
||||
|
@ -279,7 +279,7 @@ function gd_progress_bubble($width, $height, $progress, $title, $font, $out_of_l
|
|||
|
||||
// Write the value
|
||||
$size = imagettfbbox($fontsize, 0, $font, $value_text);
|
||||
ImageTTFText(
|
||||
imagettftext(
|
||||
$image,
|
||||
$fontsize,
|
||||
0,
|
||||
|
@ -409,12 +409,12 @@ function drawRating($rating, $width, $height, $font, $out_of_lim_str, $mode, $fo
|
|||
|
||||
if ($rating > 50) {
|
||||
if ($rating > 100) {
|
||||
ImageTTFText($image, ($fontsize + 2), 0, ($width / 4), (($height / 2) + ($height / 5)), $back, $font, $out_of_lim_str);
|
||||
imagettftext($image, ($fontsize + 2), 0, ($width / 4), (($height / 2) + ($height / 5)), $back, $font, $out_of_lim_str);
|
||||
} else {
|
||||
ImageTTFText($image, $fontsize, 0, (($width / 2) - ($width / 10)), (($height / 2) + ($height / 5)), $back, $font, $value_text);
|
||||
imagettftext($image, $fontsize, 0, (($width / 2) - ($width / 10)), (($height / 2) + ($height / 5)), $back, $font, $value_text);
|
||||
}
|
||||
} else {
|
||||
ImageTTFText($image, $fontsize, 0, (($width / 2) - ($width / 10)), (($height / 2) + ($height / 5)), $text, $font, $value_text);
|
||||
imagettftext($image, $fontsize, 0, (($width / 2) - ($width / 10)), (($height / 2) + ($height / 5)), $text, $font, $value_text);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Include/help/en
|
||||
*/
|
||||
?>
|
||||
<h1>Module macros</h1>
|
||||
|
||||
<p>
|
||||
The following macros are available:
|
||||
<ul>
|
||||
<li>_agentcustomfield_<i>n</i>_: Agent custom field number <i>n</i> (eg. _agentcustomfield_9_).</li>
|
||||
</ul>
|
||||
<p>
|
||||
</p>
|
|
@ -32,7 +32,8 @@ The accepted macros are:
|
|||
<li><b>Event associated module name:</b> _module_name_</li>
|
||||
<li><b>Event owner user:</b> _owner_user_</li>
|
||||
<li><b>User ID:</b> _user_id_</li>
|
||||
</ul>
|
||||
<li><b>Id of the user who fires the response:</b> _current_user_</li>
|
||||
</ul>
|
||||
|
||||
<h4>Custom fields</h4>
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Include/help/en
|
||||
*/
|
||||
?>
|
||||
<h1>Macros de módulos</h1>
|
||||
|
||||
<p>
|
||||
Las siguientes macros están disponibles:
|
||||
</p>
|
||||
<ul>
|
||||
<li>_agentcustomfield_<i>n</i>_: Campo personalizado número <i>n</i> del agente (eg. _agentcustomfield_9_). </li>
|
||||
</ul>
|
|
@ -33,6 +33,7 @@ Las macros aceptadas son las siguientes:
|
|||
<li><b>Nombre del módulo asociado al evento:</b> _module_name_</li>
|
||||
<li><b>Usuario propietario del evento:</b> _owner_user_</li>
|
||||
<li><b>Id del usuario:</b> _user_id_</li>
|
||||
<li><b>Id del usuario que ejecuta la respuesta:</b> _current_user_</li>
|
||||
</ul>
|
||||
|
||||
<h4>Campos personalizados</h4>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Include/help/ja
|
||||
*/
|
||||
?>
|
||||
<h1>モジュールマクロ</h1>
|
||||
|
||||
<p>
|
||||
次のマクロが利用できます:
|
||||
</p>
|
||||
<ul>
|
||||
<li>_agentcustomfield_<i>n</i>_ : エージェントカスタムフィールド番号<i>n</i> (例: _agentcustomfield_9_). </li>
|
||||
</ul>
|
||||
<p>
|
||||
</p>
|
|
@ -32,6 +32,7 @@
|
|||
<li><b>Event associated module name:</b> _module_name_</li>
|
||||
<li><b>Event owner user:</b> _owner_user_</li>
|
||||
<li><b>User ID:</b> _user_id_</li>
|
||||
<li><b>Id of the user who fires the response:</b> _current_user_</li>
|
||||
</ul>
|
||||
|
||||
<h4>Custom fields</h4>
|
||||
|
|
|
@ -503,6 +503,14 @@ function module_changed_by_multiple_modules(event, id_module, selected) {
|
|||
selection_mode = "common";
|
||||
}
|
||||
|
||||
var tags_selected = [];
|
||||
|
||||
var tags_to_search = $("#tags").val();
|
||||
if (tags_to_search != null) {
|
||||
if (tags_to_search[0] != -1) {
|
||||
tags_selected = tags_to_search;
|
||||
}
|
||||
}
|
||||
jQuery.post(
|
||||
"ajax.php",
|
||||
{
|
||||
|
@ -510,7 +518,8 @@ function module_changed_by_multiple_modules(event, id_module, selected) {
|
|||
get_agents_json_for_multiple_modules: 1,
|
||||
status_module: status_module,
|
||||
"module_name[]": idModules,
|
||||
selection_mode: selection_mode
|
||||
selection_mode: selection_mode,
|
||||
tags: tags_selected
|
||||
},
|
||||
function(data) {
|
||||
$("#agents").append(
|
||||
|
|
|
@ -1312,7 +1312,7 @@ function update_last_package(package, version, homeurl) {
|
|||
|
||||
$("#box_online .content").html("");
|
||||
$("#box_online .loading").show();
|
||||
$("#box_online .download_package").show();
|
||||
$("#box_online .downloading_package").show();
|
||||
|
||||
var parameters = {};
|
||||
parameters["page"] = "include/ajax/update_manager.ajax";
|
||||
|
@ -1326,7 +1326,7 @@ function update_last_package(package, version, homeurl) {
|
|||
parameters,
|
||||
function(data) {
|
||||
if (data["in_progress"]) {
|
||||
$("#box_online .download_package").hide();
|
||||
$("#box_online .downloading_package").hide();
|
||||
|
||||
$("#box_online .content").html(data["message"]);
|
||||
|
||||
|
@ -1341,7 +1341,7 @@ function update_last_package(package, version, homeurl) {
|
|||
parameters2,
|
||||
function(data) {
|
||||
if (data["correct"]) {
|
||||
$("#box_online .download_package").hide();
|
||||
$("#box_online .downloading_package").hide();
|
||||
|
||||
$("#box_online .content").html(data["message"]);
|
||||
|
||||
|
|
|
@ -1,146 +1,144 @@
|
|||
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - CLUSTER VIEW -
|
||||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
#main_cluster {
|
||||
max-width:1770px;
|
||||
margin:0 auto;
|
||||
max-width: 1770px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.sub_cluster_1 {
|
||||
width:400px;
|
||||
float: left;
|
||||
margin-left: 30px;
|
||||
margin-bottom: 25px;
|
||||
vertical-align: top;
|
||||
border:1px solid #e7e9ea;
|
||||
height:150px;
|
||||
width: 400px;
|
||||
float: left;
|
||||
margin-left: 30px;
|
||||
margin-bottom: 25px;
|
||||
vertical-align: top;
|
||||
border: 1px solid #e7e9ea;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.sub_cluster_2 {
|
||||
width:833px;
|
||||
float: left;
|
||||
margin-left: 30px;
|
||||
margin-bottom: 25px;
|
||||
vertical-align: top;
|
||||
border:1px solid #e7e9ea;
|
||||
height:150px;
|
||||
width: 833px;
|
||||
float: left;
|
||||
margin-left: 30px;
|
||||
margin-bottom: 25px;
|
||||
vertical-align: top;
|
||||
border: 1px solid #e7e9ea;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.sub_cluster_header {
|
||||
width:100%;
|
||||
height: 30px;
|
||||
background-color: #373737;
|
||||
color:white;
|
||||
text-align:center;
|
||||
font-size: 9pt;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background-color: #373737;
|
||||
color: white;
|
||||
text-align: center;
|
||||
font-size: 9pt;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sub_cluster_body {
|
||||
width:100%;
|
||||
height: 120px;
|
||||
background-color: #f9faf9;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
background-color: #f9faf9;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sub_cluster_body_3 {
|
||||
width:100%;
|
||||
height: 120px;
|
||||
background-color: #f9faf9;
|
||||
overflow-y: scroll;
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
background-color: #f9faf9;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
#cluster_map {
|
||||
border:1px solid lightgray;
|
||||
width:900px;
|
||||
height:500px;
|
||||
float: left;
|
||||
margin-bottom: 30px;
|
||||
border: 1px solid lightgray;
|
||||
width: 900px;
|
||||
height: 500px;
|
||||
float: left;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
#cluster_status_content {
|
||||
width: 90%;
|
||||
height:30px;
|
||||
margin:0px auto;
|
||||
width: 90%;
|
||||
height: 30px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
#cluster_status_bar {
|
||||
width: 85%;
|
||||
height:100%;
|
||||
float:left;
|
||||
width: 85%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.status_animation {
|
||||
width: 1%;
|
||||
height:100%;
|
||||
left:0%;
|
||||
background-color: red;
|
||||
position:relative;
|
||||
width: 1%;
|
||||
height: 100%;
|
||||
left: 0%;
|
||||
background-color: red;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#cluster_status_button {
|
||||
float:left;
|
||||
width:10%;
|
||||
margin-left:5%;;
|
||||
float: left;
|
||||
width: 10%;
|
||||
margin-left: 5%;
|
||||
}
|
||||
|
||||
#last_contact_content{
|
||||
width: 90%;
|
||||
height:60px;
|
||||
margin:0px auto;
|
||||
#last_contact_content {
|
||||
width: 90%;
|
||||
height: 60px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
#last_contact_clock {
|
||||
width: 15%;
|
||||
height:100%;
|
||||
float:left;
|
||||
width: 15%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#last_contact_date {
|
||||
float:left;
|
||||
height:60px;
|
||||
width:80%;
|
||||
margin-left:5%;
|
||||
text-align:center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
float: left;
|
||||
height: 60px;
|
||||
width: 80%;
|
||||
margin-left: 5%;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#last_contact_date_text {
|
||||
font-size:14pt;
|
||||
font-size: 14pt;
|
||||
}
|
||||
|
||||
|
||||
.balanced_module_item {
|
||||
float:left;
|
||||
margin-top: 11.5px;
|
||||
margin-left: 5%;
|
||||
height: 25px;
|
||||
width:90%;
|
||||
float: left;
|
||||
margin-top: 11.5px;
|
||||
margin-left: 5%;
|
||||
height: 25px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.module_icon {
|
||||
float:left;
|
||||
width:10%;
|
||||
float: left;
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.modal_module_list {
|
||||
float:left;
|
||||
width: 90%;
|
||||
height:100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
float: left;
|
||||
width: 90%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
|
|
@ -34,41 +34,48 @@ div.database_debug_title {
|
|||
width: 95%;
|
||||
}
|
||||
|
||||
|
||||
/* Common useful styles */
|
||||
.invisible {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
.left {
|
||||
clear: left;
|
||||
float: left;
|
||||
}
|
||||
.right {
|
||||
clear: right;
|
||||
float: right;
|
||||
}
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
.left { clear: left; float: left;}
|
||||
.right { clear: right; float: right;}
|
||||
.clear { clear:both; }
|
||||
.top {
|
||||
vertical-align: top;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
vertical-align: top;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
img.left {
|
||||
margin-right:1em;
|
||||
margin-bottom:1.8em;
|
||||
margin-right: 1em;
|
||||
margin-bottom: 1.8em;
|
||||
}
|
||||
img.right {
|
||||
margin-left:1em;
|
||||
margin-bottom:1.8em;
|
||||
margin-left: 1em;
|
||||
margin-bottom: 1.8em;
|
||||
}
|
||||
.text-right {
|
||||
text-align:right;
|
||||
text-align: right;
|
||||
}
|
||||
.noshadow {
|
||||
-moz-box-shadow: 0px !important;
|
||||
-webkit-box-shadow: 0px !important;
|
||||
box-shadow: 0px !important;
|
||||
-moz-box-shadow: 0px !important;
|
||||
-webkit-box-shadow: 0px !important;
|
||||
box-shadow: 0px !important;
|
||||
}
|
||||
.center_align {
|
||||
text-align: center;
|
||||
text-align: center;
|
||||
}
|
||||
.left_align {
|
||||
text-align: left;
|
||||
text-align: left;
|
||||
}
|
||||
.right_align {
|
||||
text-align: right;
|
||||
}
|
||||
text-align: right;
|
||||
}
|
||||
|
|
|
@ -6,62 +6,62 @@
|
|||
|
||||
/* Calendar background */
|
||||
table.scw {
|
||||
background-color: #82b92e;
|
||||
border: 0 !important;
|
||||
border-radius: 4px;
|
||||
background-color: #82b92e;
|
||||
border: 0 !important;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Week number heading */
|
||||
td.scwWeekNumberHead {
|
||||
color: #111;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
td.scwWeek {
|
||||
color: #111 !important;
|
||||
color: #111 !important;
|
||||
}
|
||||
|
||||
/* Today selector */
|
||||
td.scwFootDisabled {
|
||||
background-color: #000;
|
||||
color: #FFFFFF;
|
||||
background-color: #000;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
tfoot.scwFoot {
|
||||
color: #111;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.scwFoot :hover{
|
||||
color: #3F3F3F !important;
|
||||
.scwFoot :hover {
|
||||
color: #3f3f3f !important;
|
||||
}
|
||||
|
||||
table.scwCells {
|
||||
background-color: #fff !important;
|
||||
color: #3c3c3c !important;
|
||||
background-color: #fff !important;
|
||||
color: #3c3c3c !important;
|
||||
}
|
||||
|
||||
table.scwCells:hover {
|
||||
background-color: #fff !important;
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
td.scwCellsExMonth {
|
||||
background-color: #eee !important;
|
||||
color: #3c3c3c !important;
|
||||
background-color: #eee !important;
|
||||
color: #3c3c3c !important;
|
||||
}
|
||||
|
||||
td.scwCellsWeekend {
|
||||
background-color: #3c3c3c !important;
|
||||
color: #fff !important;
|
||||
border: 0 !important;
|
||||
background-color: #3c3c3c !important;
|
||||
color: #fff !important;
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
td.scwInputDate {
|
||||
background-color: #777 !important;
|
||||
color: #ffffff !important;
|
||||
border: 0 !important;
|
||||
background-color: #777 !important;
|
||||
color: #ffffff !important;
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
td.scwFoot {
|
||||
background-color: #fff !important;
|
||||
color: #3c3c3c !important;
|
||||
border: 0 !important;
|
||||
background-color: #fff !important;
|
||||
color: #3c3c3c !important;
|
||||
border: 0 !important;
|
||||
}
|
||||
|
|
|
@ -1,254 +1,263 @@
|
|||
|
||||
@import url(calendar.css);
|
||||
|
||||
/* --- JQUERY-UI --- */
|
||||
.ui-dialog .ui-dialog-titlebar {
|
||||
background-color: #82b92e !important;
|
||||
background-color: #82b92e !important;
|
||||
}
|
||||
|
||||
/*center ui dialog center*/
|
||||
.ui-dialog-titlebar .ui-icon-closethick {
|
||||
margin-top: -5px !important;
|
||||
margin-top: -5px !important;
|
||||
}
|
||||
.ui-button-text-only .ui-button-text {
|
||||
font-family: nunito;
|
||||
font-size: 9pt;
|
||||
color: #82B92E
|
||||
font-family: nunito;
|
||||
font-size: 9pt;
|
||||
color: #82b92e;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title *, .ui-datepicker th * {
|
||||
color: white;
|
||||
.ui-datepicker .ui-datepicker-title *,
|
||||
.ui-datepicker th * {
|
||||
color: white;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title select, .ui-datepicker .ui-datepicker-title option {
|
||||
color: #111 !important;
|
||||
.ui-datepicker .ui-datepicker-title select,
|
||||
.ui-datepicker .ui-datepicker-title option {
|
||||
color: #111 !important;
|
||||
}
|
||||
.ui-dialog .ui-dialog-titlebar {
|
||||
display: inherit;
|
||||
text-align: center;
|
||||
padding: .4em 1em;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
display: inherit;
|
||||
text-align: center;
|
||||
padding: 0.4em 1em;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
}
|
||||
.ui-dialog .ui-dialog-title {
|
||||
font-family: Nunito, sans-serif;
|
||||
margin: .1em 0 !important;
|
||||
white-space: nowrap !important;
|
||||
width: 100% !important;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
font-size: 11pt;
|
||||
position: relative;
|
||||
top: 5px;
|
||||
float: none !important;
|
||||
font-family: Nunito, sans-serif;
|
||||
margin: 0.1em 0 !important;
|
||||
white-space: nowrap !important;
|
||||
width: 100% !important;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
font-size: 11pt;
|
||||
position: relative;
|
||||
top: 5px;
|
||||
float: none !important;
|
||||
}
|
||||
.ui-dialog .ui-dialog-titlebar-close {
|
||||
position: absolute !important;
|
||||
right: 1em !important;
|
||||
width: 21px !important;
|
||||
margin: 0px 0 0 0 !important;
|
||||
padding: 1px !important;
|
||||
height: 20px !important;
|
||||
bottom: 30% !important;
|
||||
top: 20% !important;
|
||||
position: absolute !important;
|
||||
right: 1em !important;
|
||||
width: 21px !important;
|
||||
margin: 0px 0 0 0 !important;
|
||||
padding: 1px !important;
|
||||
height: 20px !important;
|
||||
bottom: 30% !important;
|
||||
top: 20% !important;
|
||||
}
|
||||
.ui-dialog .ui-dialog-content {
|
||||
position: relative !important;
|
||||
border: 0;
|
||||
padding: .5em 1em !important;
|
||||
background: none !important;
|
||||
overflow: auto !important;
|
||||
margin-bottom: 1em;
|
||||
position: relative !important;
|
||||
border: 0;
|
||||
padding: 0.5em 1em !important;
|
||||
background: none !important;
|
||||
overflow: auto !important;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane {
|
||||
text-align: left;
|
||||
border-width: 1px 0 0 0;
|
||||
background-image: none;
|
||||
margin-top: .5em;
|
||||
padding: .3em 1em .5em .4em;
|
||||
text-align: left;
|
||||
border-width: 1px 0 0 0;
|
||||
background-image: none;
|
||||
margin-top: 0.5em;
|
||||
padding: 0.3em 1em 0.5em 0.4em;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
|
||||
float: right;
|
||||
float: right;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane button {
|
||||
margin: .5em 1em .5em 0 !important;
|
||||
cursor: pointer !important;
|
||||
background: white !important;
|
||||
background-color: white !important;
|
||||
border: 1px solid #82b92e !important;
|
||||
height:30px !important;
|
||||
width:90px !important;
|
||||
margin: 0.5em 1em 0.5em 0 !important;
|
||||
cursor: pointer !important;
|
||||
background: white !important;
|
||||
background-color: white !important;
|
||||
border: 1px solid #82b92e !important;
|
||||
height: 30px !important;
|
||||
width: 90px !important;
|
||||
}
|
||||
.ui-widget-header .ui-icon {
|
||||
background-image: url(../images/ui-icons_444444_256x240.png) !important;
|
||||
background-image: url(../images/ui-icons_444444_256x240.png) !important;
|
||||
}
|
||||
.ui-icon, .ui-widget-content .ui-icon {
|
||||
background-image: url(../images/ui-icons_444444_256x240.png) !important;
|
||||
.ui-icon,
|
||||
.ui-widget-content .ui-icon {
|
||||
background-image: url(../images/ui-icons_444444_256x240.png) !important;
|
||||
}
|
||||
.ui-widget-content {
|
||||
background: #ffffff url(../images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
|
||||
background: #ffffff url(../images/ui-bg_flat_75_ffffff_40x100.png) 50% 50%
|
||||
repeat-x;
|
||||
}
|
||||
.ui-state-default,
|
||||
.ui-widget-content .ui-state-default,
|
||||
.ui-widget-header .ui-state-default {
|
||||
margin-top: 3px;
|
||||
border: 1px solid #d3d3d3 !important;
|
||||
border-bottom:0 !important;
|
||||
background: #e6e6e6 url(../images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x !important;
|
||||
font-weight: normal !important;
|
||||
color: #555555 !important;
|
||||
margin-top: 3px;
|
||||
border: 1px solid #d3d3d3 !important;
|
||||
border-bottom: 0 !important;
|
||||
background: #e6e6e6 url(../images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50%
|
||||
repeat-x !important;
|
||||
font-weight: normal !important;
|
||||
color: #555555 !important;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-left,
|
||||
.ui-corner-tl {
|
||||
border-top-left-radius: 0 !important;
|
||||
border-top-left-radius: 0 !important;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-right,
|
||||
.ui-corner-tr {
|
||||
border-top-right-radius: 0 !important;
|
||||
border-top-right-radius: 0 !important;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-left,
|
||||
.ui-corner-bl {
|
||||
border-bottom-left-radius: 0 !important;
|
||||
border-bottom-left-radius: 0 !important;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-right,
|
||||
.ui-corner-br {
|
||||
border-bottom-right-radius: 0 !important;
|
||||
border-bottom-right-radius: 0 !important;
|
||||
}
|
||||
#ui-datepicker-div {
|
||||
border-color: #B1B1B1;
|
||||
background: #ffffff;
|
||||
border-color: #b1b1b1;
|
||||
background: #ffffff;
|
||||
}
|
||||
.ui-widget-header {
|
||||
background: #B1B1B1 !important;
|
||||
color: #ffffff !important;
|
||||
background: #b1b1b1 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.ui-datepicker-calendar th {
|
||||
background-color: #3F3F3F;
|
||||
background-color: #3f3f3f;
|
||||
}
|
||||
.ui-dialog .ui-widget-header {
|
||||
background-color: #82b92e;
|
||||
background-color: #82b92e;
|
||||
}
|
||||
.ui_tpicker_hour,
|
||||
.ui_tpicker_minute,
|
||||
.ui_tpicker_second,
|
||||
.ui-slider-handle {
|
||||
border: 1px solid #AAAAAA !important;
|
||||
border: 1px solid #aaaaaa !important;
|
||||
}
|
||||
.ui-timepicker-div dd {
|
||||
margin: 0px 15px 0px 15px ;
|
||||
margin: 0px 15px 0px 15px;
|
||||
}
|
||||
.ui-timepicker-div .ui-datepicker-title {
|
||||
color: white;
|
||||
color: white;
|
||||
}
|
||||
.ui-datepicker-buttonpane button {
|
||||
border-color: #B1B1B1 !important;
|
||||
border-color: #b1b1b1 !important;
|
||||
}
|
||||
.ui-datepicker-buttonpane .ui-datepicker-current {
|
||||
margin-left: 0.2em !important;
|
||||
margin-left: 0.2em !important;
|
||||
}
|
||||
.ui-dialog .ui-widget-content {
|
||||
border: 0px !important;
|
||||
border: 0px !important;
|
||||
}
|
||||
.ui-dialog {
|
||||
box-shadow: 5px 5px 19px #4e4e4e;
|
||||
border: 0px !important;
|
||||
padding: 0 !important;
|
||||
box-shadow: 5px 5px 19px #4e4e4e;
|
||||
border: 0px !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.ui-dialog-titlebar {
|
||||
border: 0px !important;
|
||||
border: 0px !important;
|
||||
}
|
||||
.ui-dialog-titlebar .ui-icon-closethick,
|
||||
.ui-dialog-titlebar .ui-state-default,
|
||||
.ui-dialog-titlebar .ui-state-hover,
|
||||
.ui-dialog-titlebar button {
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
}
|
||||
.ui-dialog-titlebar .ui-icon-closethick {
|
||||
background-image: url("../../../images/icono_cerrar.png") !important;
|
||||
background-image: url("../../../images/icono_cerrar.png") !important;
|
||||
}
|
||||
.ui-dialog-title {
|
||||
color: #ffffff;
|
||||
font-size: 9pt;
|
||||
color: #ffffff;
|
||||
font-size: 9pt;
|
||||
}
|
||||
.ui-widget input,
|
||||
.ui-widget select,
|
||||
.ui-widget textarea,
|
||||
.ui-widget button{
|
||||
font-family: Verdana,Arial,sans-serif !important;
|
||||
.ui-widget button {
|
||||
font-family: Verdana, Arial, sans-serif !important;
|
||||
}
|
||||
|
||||
a.ui-button:active, .ui-button:active,
|
||||
a.ui-button:active,
|
||||
.ui-button:active,
|
||||
.ui-button.ui-state-active:hover,
|
||||
.ui-state-focus .ui-widget-content,
|
||||
.ui-state-focus .ui-widget-header,
|
||||
.ui-state-focus .ui-button:hover, .ui-button:focus{
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
.ui-state-focus .ui-button:hover,
|
||||
.ui-button:focus {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover{
|
||||
border: 1px solid #999999 !important;
|
||||
border-bottom: 0 !important;
|
||||
background: #dadada url(../images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x !important;
|
||||
.ui-state-hover,
|
||||
.ui-widget-content .ui-state-hover,
|
||||
.ui-widget-header .ui-state-hover {
|
||||
border: 1px solid #999999 !important;
|
||||
border-bottom: 0 !important;
|
||||
background: #dadada url(../images/ui-bg_glass_75_dadada_1x400.png) 50% 50%
|
||||
repeat-x !important;
|
||||
}
|
||||
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active{
|
||||
border: 1px solid #aaaaaa !important;
|
||||
border-bottom: 0 !important;
|
||||
background: #ffffff url(../images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x !important;
|
||||
font-weight: normal !important;
|
||||
color: #212121 !important;
|
||||
.ui-state-active,
|
||||
.ui-widget-content .ui-state-active,
|
||||
.ui-widget-header .ui-state-active {
|
||||
border: 1px solid #aaaaaa !important;
|
||||
border-bottom: 0 !important;
|
||||
background: #ffffff url(../images/ui-bg_glass_65_ffffff_1x400.png) 50% 50%
|
||||
repeat-x !important;
|
||||
font-weight: normal !important;
|
||||
color: #212121 !important;
|
||||
}
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited{
|
||||
color: #212121 !important;
|
||||
.ui-state-active a,
|
||||
.ui-state-active a:link,
|
||||
.ui-state-active a:visited {
|
||||
color: #212121 !important;
|
||||
}
|
||||
|
||||
ul.ui-front{
|
||||
z-index: 1000000 !important;
|
||||
padding-right: 0px !important;
|
||||
ul.ui-front {
|
||||
z-index: 1000000 !important;
|
||||
padding-right: 0px !important;
|
||||
}
|
||||
|
||||
ul.ui-front li{
|
||||
padding: 3px !important;
|
||||
ul.ui-front li {
|
||||
padding: 3px !important;
|
||||
}
|
||||
|
||||
ul.ui-front li:hover{
|
||||
background-color: #e1e3e1 !important;
|
||||
ul.ui-front li:hover {
|
||||
background-color: #e1e3e1 !important;
|
||||
}
|
||||
|
||||
ul.ui-front li a.ui-menu-item-wrapper{
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
ul.ui-front li a.ui-menu-item-wrapper {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
ul.ui-front li a.ui-menu-item-wrapper span{
|
||||
padding-left: 5px !important;
|
||||
ul.ui-front li a.ui-menu-item-wrapper span {
|
||||
padding-left: 5px !important;
|
||||
}
|
||||
|
||||
ul.ui-front li a.ui-menu-item-wrapper:hover{
|
||||
text-decoration: none !important;
|
||||
ul.ui-front li a.ui-menu-item-wrapper:hover {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
input[type=submit].ui-button-dialog{
|
||||
margin: .5em 1em .5em 0 !important;
|
||||
cursor: pointer !important;
|
||||
background: white !important;
|
||||
background-color: white !important;
|
||||
color: #82b92e !important;
|
||||
text-align: center !important;
|
||||
border: 1px solid #82b92e !important;
|
||||
height:30px !important;
|
||||
width:90px !important;
|
||||
input[type="submit"].ui-button-dialog {
|
||||
margin: 0.5em 1em 0.5em 0 !important;
|
||||
cursor: pointer !important;
|
||||
background: white !important;
|
||||
background-color: white !important;
|
||||
color: #82b92e !important;
|
||||
text-align: center !important;
|
||||
border: 1px solid #82b92e !important;
|
||||
height: 30px !important;
|
||||
width: 90px !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -13,86 +13,86 @@
|
|||
*/
|
||||
|
||||
.context-menu-list {
|
||||
margin:0;
|
||||
padding:0;
|
||||
|
||||
min-width: 120px;
|
||||
max-width: 250px;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
list-style-type: none;
|
||||
border: 1px solid #DDD;
|
||||
border-radius: 4px;
|
||||
background: #EEE;
|
||||
|
||||
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
text-align: left;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
min-width: 120px;
|
||||
max-width: 250px;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
list-style-type: none;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
background: #eee;
|
||||
|
||||
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.context-menu-item {
|
||||
padding: 0px 2px 0px 24px;
|
||||
background-color: #EEE;
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: -moz-none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
padding: 0px 2px 0px 24px;
|
||||
background-color: #eee;
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: -moz-none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.context-menu-item span {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.context-menu-separator {
|
||||
padding-bottom:0;
|
||||
border-bottom: 1px solid #DDD;
|
||||
padding-bottom: 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.context-menu-item > label > input,
|
||||
.context-menu-item > label > textarea {
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.context-menu-item.hover {
|
||||
cursor: pointer;
|
||||
background-color: #82b92e;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
background-color: #82b92e;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.context-menu-item.disabled {
|
||||
color: #666 !important;
|
||||
color: #666 !important;
|
||||
}
|
||||
|
||||
.context-menu-input.hover,
|
||||
.context-menu-item.disabled.hover {
|
||||
cursor: default;
|
||||
background-color: #EEE;
|
||||
cursor: default;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.context-menu-submenu:after {
|
||||
content: ">";
|
||||
color: #666;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 3px;
|
||||
z-index: 1;
|
||||
content: ">";
|
||||
color: #666;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 3px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* icons
|
||||
|
@ -101,67 +101,111 @@
|
|||
http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement
|
||||
.context-menu-item.icon:before {}
|
||||
*/
|
||||
.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }
|
||||
.context-menu-item.icon-edit { background-image: url(../../images/page_white_edit.png); }
|
||||
.context-menu-item.icon-cut { background-image: url(../../images/cut.png); }
|
||||
.context-menu-item.icon-copy { background-image: url(../../images/page_white_copy.png); }
|
||||
.context-menu-item.icon-paste { background-image: url(../../images/page_white_paste.png); }
|
||||
.context-menu-item.icon-delete { background-image: url(../../images/delete.png); }
|
||||
.context-menu-item.icon-add { background-image: url(../../images/page_white_add.png); }
|
||||
.context-menu-item.icon-quit { background-image: url(../../images/door.png); }
|
||||
.context-menu-item.icon-refresh { background-image: url(../../images/refresh.png); }
|
||||
.context-menu-item.icon-center { background-image: url(../../images/set_center.png); }
|
||||
.context-menu-item.icon-details { background-image: url(../../images/show_details.png); }
|
||||
.context-menu-item.icon-children { background-image: url(../../images/children.png); }
|
||||
.context-menu-item.icon-cancel_set_parent { background-image: url(../../images/link_delete.png); }
|
||||
.context-menu-item.icon-set_parent { background-image: url(../../images/father.png); }
|
||||
.context-menu-item.icon-add_node { background-image: url(../../images/add.png); }
|
||||
.context-menu-item.icon-refresh_holding_area { background-image: url(../../images/refresh_holding_area.png); }
|
||||
.context-menu-item.icon-restart_map { background-image: url(../../images/reset.png); }
|
||||
.context-menu-item.icon-interface_link_children { background-image: url(../../images/icono_link_hijo.png); }
|
||||
.context-menu-item.icon-interface_link_parent { background-image: url(../../images/icono_link_padre.png); }
|
||||
.context-menu-item.icon-interface_link_cancel { background-image: url(../../images/link_abortar.png); }
|
||||
.context-menu-item.icon {
|
||||
min-height: 18px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 4px 2px;
|
||||
}
|
||||
.context-menu-item.icon-edit {
|
||||
background-image: url(../../images/page_white_edit.png);
|
||||
}
|
||||
.context-menu-item.icon-cut {
|
||||
background-image: url(../../images/cut.png);
|
||||
}
|
||||
.context-menu-item.icon-copy {
|
||||
background-image: url(../../images/page_white_copy.png);
|
||||
}
|
||||
.context-menu-item.icon-paste {
|
||||
background-image: url(../../images/page_white_paste.png);
|
||||
}
|
||||
.context-menu-item.icon-delete {
|
||||
background-image: url(../../images/delete.png);
|
||||
}
|
||||
.context-menu-item.icon-add {
|
||||
background-image: url(../../images/page_white_add.png);
|
||||
}
|
||||
.context-menu-item.icon-quit {
|
||||
background-image: url(../../images/door.png);
|
||||
}
|
||||
.context-menu-item.icon-refresh {
|
||||
background-image: url(../../images/refresh.png);
|
||||
}
|
||||
.context-menu-item.icon-center {
|
||||
background-image: url(../../images/set_center.png);
|
||||
}
|
||||
.context-menu-item.icon-details {
|
||||
background-image: url(../../images/show_details.png);
|
||||
}
|
||||
.context-menu-item.icon-children {
|
||||
background-image: url(../../images/children.png);
|
||||
}
|
||||
.context-menu-item.icon-cancel_set_parent {
|
||||
background-image: url(../../images/link_delete.png);
|
||||
}
|
||||
.context-menu-item.icon-set_parent {
|
||||
background-image: url(../../images/father.png);
|
||||
}
|
||||
.context-menu-item.icon-add_node {
|
||||
background-image: url(../../images/add.png);
|
||||
}
|
||||
.context-menu-item.icon-refresh_holding_area {
|
||||
background-image: url(../../images/refresh_holding_area.png);
|
||||
}
|
||||
.context-menu-item.icon-restart_map {
|
||||
background-image: url(../../images/reset.png);
|
||||
}
|
||||
.context-menu-item.icon-interface_link_children {
|
||||
background-image: url(../../images/icono_link_hijo.png);
|
||||
}
|
||||
.context-menu-item.icon-interface_link_parent {
|
||||
background-image: url(../../images/icono_link_padre.png);
|
||||
}
|
||||
.context-menu-item.icon-interface_link_cancel {
|
||||
background-image: url(../../images/link_abortar.png);
|
||||
}
|
||||
|
||||
/* vertically align inside labels */
|
||||
.context-menu-input > label > * { vertical-align: top; }
|
||||
.context-menu-input > label > * {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* position checkboxes and radios as icons */
|
||||
.context-menu-input > label > input[type="checkbox"],
|
||||
.context-menu-input > label > input[type="radio"] {
|
||||
margin-left: -17px;
|
||||
margin-left: -17px;
|
||||
}
|
||||
.context-menu-input > label > span {
|
||||
margin-left: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.context-menu-input > label,
|
||||
.context-menu-input > label > input[type="text"],
|
||||
.context-menu-input > label > textarea,
|
||||
.context-menu-input > label > select {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.context-menu-input > label > textarea {
|
||||
height: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.context-menu-item > .context-menu-list {
|
||||
display: none;
|
||||
/* re-positioned by js */
|
||||
right: -5px;
|
||||
top: 5px;
|
||||
display: none;
|
||||
/* re-positioned by js */
|
||||
right: -5px;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.context-menu-item.hover > .context-menu-list {
|
||||
display: block;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.context-menu-accesskey {
|
||||
text-decoration: underline;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
|
|
@ -4,33 +4,33 @@
|
|||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
h1#log_title {
|
||||
font-size: 18px;
|
||||
margin-bottom: 0px;
|
||||
color: #FFF !important;
|
||||
width:300px;
|
||||
font-size: 18px;
|
||||
margin-bottom: 0px;
|
||||
color: #fff !important;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
div#log_msg {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
div#error_buttons {
|
||||
margin-top: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
div#error_buttons a{
|
||||
margin: 14px;
|
||||
div#error_buttons a {
|
||||
margin: 14px;
|
||||
}
|
||||
|
||||
#login_body {
|
||||
/* Set rules to fill background */
|
||||
min-height: 100%;
|
||||
min-width: 1200px;
|
||||
width: 100%;
|
||||
z-index: -9999;
|
||||
position: absolute;
|
||||
background-image: url("../../images/backgrounds/background_pandora_console_keys.jpg");
|
||||
background-repeat: repeat;
|
||||
/* Set rules to fill background */
|
||||
min-height: 100%;
|
||||
min-width: 1200px;
|
||||
width: 100%;
|
||||
z-index: -9999;
|
||||
position: absolute;
|
||||
background-image: url("../../images/backgrounds/background_pandora_console_keys.jpg");
|
||||
background-repeat: repeat;
|
||||
}
|
||||
|
||||
/*@media screen and (max-width: 1024px) { /* Specific to this particular image */
|
||||
|
@ -65,52 +65,49 @@ div#error_buttons a{
|
|||
}*/
|
||||
|
||||
p.log_in {
|
||||
color: #FFF !important;
|
||||
padding: 0px 10px;
|
||||
width:300px;
|
||||
color: #fff !important;
|
||||
padding: 0px 10px;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
h1#log_f {
|
||||
color: #c00;
|
||||
border-bottom: 1px solid #c00;
|
||||
padding-bottom: 3px;
|
||||
color: #c00;
|
||||
border-bottom: 1px solid #c00;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
div#error_login {
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
margin-left: 5px;
|
||||
width: 75%;
|
||||
float: right;
|
||||
text-align: left;
|
||||
top: 100px;
|
||||
text-align: center;
|
||||
margin-top: 5px;
|
||||
margin-left: 5px;
|
||||
width: 75%;
|
||||
float: right;
|
||||
text-align: left;
|
||||
top: 100px;
|
||||
}
|
||||
|
||||
div#error_login_icon {
|
||||
margin-top: 10px;
|
||||
margin-right: 7px;
|
||||
text-align: center;
|
||||
width: 20%;
|
||||
float: right;
|
||||
margin-top: 10px;
|
||||
margin-right: 7px;
|
||||
text-align: center;
|
||||
width: 20%;
|
||||
float: right;
|
||||
}
|
||||
|
||||
div#login_f {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 25px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
#ver_num {
|
||||
margin: 0px auto;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
margin: 0px auto;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - LOGIN PAGE -
|
||||
|
@ -118,103 +115,103 @@ div#login_f {
|
|||
*/
|
||||
|
||||
/* --- Login page - header --- */
|
||||
div#header_login{
|
||||
width: 100%;
|
||||
height: 65px;
|
||||
background-color: rgba(255, 255, 255, 0.06);
|
||||
div#header_login {
|
||||
width: 100%;
|
||||
height: 65px;
|
||||
background-color: rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
|
||||
div#icon_custom_pandora{
|
||||
float: left;
|
||||
margin-top: 5px;
|
||||
margin-left: 4%;
|
||||
div#icon_custom_pandora {
|
||||
float: left;
|
||||
margin-top: 5px;
|
||||
margin-left: 4%;
|
||||
}
|
||||
|
||||
div#list_icon_docs_support{
|
||||
float: right;
|
||||
margin-top: 8px;
|
||||
margin-right: 4%;
|
||||
div#list_icon_docs_support {
|
||||
float: right;
|
||||
margin-top: 8px;
|
||||
margin-right: 4%;
|
||||
}
|
||||
|
||||
div#list_icon_docs_support ul{
|
||||
margin-top: 5px;
|
||||
div#list_icon_docs_support ul {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
div#list_icon_docs_support ul li{
|
||||
display: inline-block;
|
||||
color:white;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
font-size: 10pt;
|
||||
div#list_icon_docs_support ul li {
|
||||
display: inline-block;
|
||||
color: white;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
li#li_margin_left{
|
||||
margin-left: 30px;
|
||||
li#li_margin_left {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
/* --- Login page - form --- */
|
||||
div.container_login{
|
||||
margin-top: 10%;
|
||||
margin-left: 5%;
|
||||
margin-right: 5%;
|
||||
div.container_login {
|
||||
margin-top: 10%;
|
||||
margin-left: 5%;
|
||||
margin-right: 5%;
|
||||
}
|
||||
|
||||
div.login_page {
|
||||
width: 35%;
|
||||
min-height: 600px;
|
||||
float:left;
|
||||
width: 35%;
|
||||
min-height: 600px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.login_page form {
|
||||
border-right:1px solid #868686;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 50px;
|
||||
min-width: 400px;
|
||||
max-height: 600px;
|
||||
border-right: 1px solid #868686;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 50px;
|
||||
min-width: 400px;
|
||||
max-height: 600px;
|
||||
}
|
||||
|
||||
div.login_logo_icon {
|
||||
margin-bottom: 40px;
|
||||
text-align: center;
|
||||
margin-bottom: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.login_logo_icon img{
|
||||
margin: 0 auto;
|
||||
width: 150px;
|
||||
div.login_logo_icon img {
|
||||
margin: 0 auto;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
div.login_double_auth_code,
|
||||
div.login_nick,
|
||||
div.login_pass {
|
||||
margin: 0 auto;
|
||||
width: 70%;
|
||||
height: 40px;
|
||||
background-color: rgba(255, 255, 255, 0.20) !important;
|
||||
margin-bottom: 25px;
|
||||
min-width: 260px;
|
||||
margin: 0 auto;
|
||||
width: 70%;
|
||||
height: 40px;
|
||||
background-color: rgba(255, 255, 255, 0.2) !important;
|
||||
margin-bottom: 25px;
|
||||
min-width: 260px;
|
||||
}
|
||||
|
||||
div.login_nick img,
|
||||
div.login_pass img{
|
||||
vertical-align: middle;
|
||||
margin: 3px;
|
||||
div.login_pass img {
|
||||
vertical-align: middle;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
div.login_nick input,
|
||||
div.login_pass input{
|
||||
background-color: rgba(255, 255, 255, 0.00) !important;
|
||||
border:0px !important;
|
||||
color:white !important;
|
||||
border-radius: 0px;
|
||||
width: 89%;
|
||||
height: 40px;
|
||||
font-size: 9pt;
|
||||
padding: 0px !important;
|
||||
div.login_pass input {
|
||||
background-color: rgba(255, 255, 255, 0) !important;
|
||||
border: 0px !important;
|
||||
color: white !important;
|
||||
border-radius: 0px;
|
||||
width: 89%;
|
||||
height: 40px;
|
||||
font-size: 9pt;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
div.login_nick input:focus,
|
||||
div.login_pass input:focus{
|
||||
outline: none;
|
||||
div.login_pass input:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
div.login_nick input:-webkit-autofill,
|
||||
|
@ -225,193 +222,190 @@ div.login_pass input:-webkit-autofill,
|
|||
div.login_pass input:-webkit-autofill:hover,
|
||||
div.login_pass input:-webkit-autofill:focus,
|
||||
div.login_pass input:-webkit-autofill:active {
|
||||
transition: background-color 10000s ease-in-out 0s;
|
||||
-webkit-box-shadow: 0 0 0px 0px transparent inset !important;
|
||||
-webkit-text-fill-color: white !important;
|
||||
border:0px;
|
||||
width: 89%;
|
||||
transition: background-color 10000s ease-in-out 0s;
|
||||
-webkit-box-shadow: 0 0 0px 0px transparent inset !important;
|
||||
-webkit-text-fill-color: white !important;
|
||||
border: 0px;
|
||||
width: 89%;
|
||||
}
|
||||
|
||||
div.login_nick input::-webkit-input-placeholder,
|
||||
div.login_pass input::-webkit-input-placeholder {
|
||||
color:white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
div.login_pass img,
|
||||
div.login_nick img{
|
||||
width: 30px;
|
||||
div.login_nick img {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
div.login_pass div,
|
||||
div.login_nick div{
|
||||
float: left;
|
||||
width: 11%;
|
||||
div.login_nick div {
|
||||
float: left;
|
||||
width: 11%;
|
||||
}
|
||||
|
||||
div.login_button{
|
||||
margin: 0 auto;
|
||||
width: 70%;
|
||||
height: 40px;
|
||||
background-color: rgb(25, 25, 25);
|
||||
border: 1px solid white;
|
||||
min-width: 260px;
|
||||
div.login_button {
|
||||
margin: 0 auto;
|
||||
width: 70%;
|
||||
height: 40px;
|
||||
background-color: rgb(25, 25, 25);
|
||||
border: 1px solid white;
|
||||
min-width: 260px;
|
||||
}
|
||||
|
||||
div.login_button input {
|
||||
width: 100%;
|
||||
background-color: rgb(25, 25, 25) !important;
|
||||
text-align: center;
|
||||
border:0px;
|
||||
border-radius: 0px;
|
||||
height: 40px;
|
||||
padding: 0px;
|
||||
font-size: 9pt;
|
||||
color: white;
|
||||
width: 100%;
|
||||
background-color: rgb(25, 25, 25) !important;
|
||||
text-align: center;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
height: 40px;
|
||||
padding: 0px;
|
||||
font-size: 9pt;
|
||||
color: white;
|
||||
}
|
||||
|
||||
div.login_data {
|
||||
width: 65%;
|
||||
min-height: 600px;
|
||||
float:left;
|
||||
width: 65%;
|
||||
min-height: 600px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.text_banner_login{
|
||||
width: 100%;
|
||||
margin-bottom: 60px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
div.text_banner_login {
|
||||
width: 100%;
|
||||
margin-bottom: 60px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.text_banner_login span{
|
||||
width: 100%;
|
||||
div.text_banner_login span {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
span.span1{
|
||||
font-size: 3vw;
|
||||
font-family: 'lato-thin';
|
||||
color: white;
|
||||
span.span1 {
|
||||
font-size: 3vw;
|
||||
font-family: "lato-thin";
|
||||
color: white;
|
||||
}
|
||||
|
||||
span.span2{
|
||||
font-size: 3vw;
|
||||
font-family: 'lato-bolder';
|
||||
color: white;
|
||||
span.span2 {
|
||||
font-size: 3vw;
|
||||
font-family: "lato-bolder";
|
||||
color: white;
|
||||
}
|
||||
|
||||
div.img_banner_login{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
div.img_banner_login {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.img_banner_login img{
|
||||
max-width: 70%;
|
||||
min-width: 70%;
|
||||
max-height: 50%;
|
||||
min-height: 50%;
|
||||
div.img_banner_login img {
|
||||
max-width: 70%;
|
||||
min-width: 70%;
|
||||
max-height: 50%;
|
||||
min-height: 50%;
|
||||
}
|
||||
|
||||
@media all and (max-width: 1200px) {
|
||||
span.span1{
|
||||
font-size: 30pt;
|
||||
}
|
||||
span.span2{
|
||||
font-size: 30pt;
|
||||
}
|
||||
span.span1 {
|
||||
font-size: 30pt;
|
||||
}
|
||||
span.span2 {
|
||||
font-size: 30pt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* --- Login page - modal windows --- */
|
||||
div.content_alert{
|
||||
width: 98%;
|
||||
margin-top: 20px;
|
||||
div.content_alert {
|
||||
width: 98%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
div.icon_message_alert{
|
||||
float: left;
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
|
||||
div.icon_message_alert {
|
||||
float: left;
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.icon_message_alert img{
|
||||
width: 85px;
|
||||
div.icon_message_alert img {
|
||||
width: 85px;
|
||||
}
|
||||
|
||||
div.content_message_alert{
|
||||
|
||||
width: 75%;
|
||||
float: right;
|
||||
div.content_message_alert {
|
||||
width: 75%;
|
||||
float: right;
|
||||
}
|
||||
|
||||
div.text_message_alert{
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
div.text_message_alert {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
div.text_message_alert h1{
|
||||
margin: 0px;
|
||||
div.text_message_alert h1 {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
div.text_message_alert p{
|
||||
margin: 0px;
|
||||
font-size: 10.3pt;
|
||||
line-height: 14pt;
|
||||
div.text_message_alert p {
|
||||
margin: 0px;
|
||||
font-size: 10.3pt;
|
||||
line-height: 14pt;
|
||||
}
|
||||
|
||||
div.button_message_alert{
|
||||
width: 100%;
|
||||
div.button_message_alert {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.button_message_alert input{
|
||||
float: right;
|
||||
width: 87px;
|
||||
height: 33px;
|
||||
color: #82b92e;
|
||||
border: 1px solid #82b92e;
|
||||
font-weight: bold;
|
||||
margin-right: 20px;
|
||||
margin-top: 20px;
|
||||
font-size: 10pt;
|
||||
div.button_message_alert input {
|
||||
float: right;
|
||||
width: 87px;
|
||||
height: 33px;
|
||||
color: #82b92e;
|
||||
border: 1px solid #82b92e;
|
||||
font-weight: bold;
|
||||
margin-right: 20px;
|
||||
margin-top: 20px;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
div.form_message_alert{
|
||||
width: 90%;
|
||||
clear: both;
|
||||
padding-top: 20px;
|
||||
padding-left: 40px;
|
||||
div.form_message_alert {
|
||||
width: 90%;
|
||||
clear: both;
|
||||
padding-top: 20px;
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
div.form_message_alert ul li{
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
div.form_message_alert ul li {
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
div.form_message_alert ul li input{
|
||||
border: none;
|
||||
background-color: #dadada !important;
|
||||
border-radius: 0px;
|
||||
height: 17px;
|
||||
width: 145px;
|
||||
padding-left: 5px;
|
||||
div.form_message_alert ul li input {
|
||||
border: none;
|
||||
background-color: #dadada !important;
|
||||
border-radius: 0px;
|
||||
height: 17px;
|
||||
width: 145px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
div.form_message_alert ul li label{
|
||||
font-size: 10pt;
|
||||
padding-right: 20px;
|
||||
div.form_message_alert ul li label {
|
||||
font-size: 10pt;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
div.form_message_alert h4{
|
||||
margin: 0px;
|
||||
margin-bottom: 10px;
|
||||
div.form_message_alert h4 {
|
||||
margin: 0px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
div.button_message_alert_form input{
|
||||
float: right;
|
||||
width: 87px;
|
||||
height: 33px;
|
||||
color: #82b92e;
|
||||
border: 1px solid #82b92e;
|
||||
font-weight: bold;
|
||||
font-size: 10pt;
|
||||
margin-right: 25px;
|
||||
}
|
||||
div.button_message_alert_form input {
|
||||
float: right;
|
||||
width: 87px;
|
||||
height: 33px;
|
||||
color: #82b92e;
|
||||
border: 1px solid #82b92e;
|
||||
font-weight: bold;
|
||||
font-size: 10pt;
|
||||
margin-right: 25px;
|
||||
}
|
||||
|
|
|
@ -51,9 +51,13 @@ li:hover ul {
|
|||
padding: 10.5px;
|
||||
margin-left: 0px;
|
||||
width: 100%;
|
||||
<<<<<<< HEAD
|
||||
color: #91a2a7;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
font-size: 10pt;
|
||||
=======
|
||||
color: #fff;
|
||||
>>>>>>> 01fee147745dfd638487449f20211abd8e83b71e
|
||||
}
|
||||
|
||||
.menu li.subselected a {
|
||||
|
@ -281,6 +285,12 @@ ul li a:hover {
|
|||
* - MAIN LEFT MENU and SUBMENU -
|
||||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
.menu li.selected {
|
||||
font-weight: bold;
|
||||
}
|
||||
>>>>>>> 01fee147745dfd638487449f20211abd8e83b71e
|
||||
|
||||
.menu_icon {
|
||||
transition-property: background-color;
|
||||
|
@ -310,7 +320,11 @@ ul li a:hover {
|
|||
-o-transition-property: background-color;
|
||||
-o-transition-duration: 0.5s;
|
||||
-o-transition-timing-function: ease-out;
|
||||
<<<<<<< HEAD
|
||||
background-color: #282828 !important;
|
||||
=======
|
||||
background-color: #585858 !important;
|
||||
>>>>>>> 01fee147745dfd638487449f20211abd8e83b71e
|
||||
}
|
||||
.submenu_not_selected:hover {
|
||||
transition-property: background-color;
|
||||
|
@ -325,10 +339,17 @@ ul li a:hover {
|
|||
-o-transition-property: background-color;
|
||||
-o-transition-duration: 0.5s;
|
||||
-o-transition-timing-function: ease-out;
|
||||
<<<<<<< HEAD
|
||||
background-color: #202020 !important;
|
||||
}
|
||||
.submenu_selected:hover {
|
||||
background-color: #202020 !important;
|
||||
=======
|
||||
background-color: #585858 !important;
|
||||
}
|
||||
.submenu_selected:hover {
|
||||
background-color: #585858 !important;
|
||||
>>>>>>> 01fee147745dfd638487449f20211abd8e83b71e
|
||||
}
|
||||
.sub_subMenu {
|
||||
transition-property: background-color;
|
||||
|
|
|
@ -441,6 +441,14 @@ textarea.conf_error {
|
|||
background-position: top right;
|
||||
}
|
||||
|
||||
input.button {
|
||||
font-family: Arial, Sans-serif;
|
||||
border: 4px solid #ccc;
|
||||
background: #fff;
|
||||
padding: 2px 3px;
|
||||
margin: 10px 15px;
|
||||
}
|
||||
|
||||
a.white_bold {
|
||||
color: #eee;
|
||||
text-decoration: none;
|
||||
|
@ -1554,6 +1562,9 @@ table.databox {
|
|||
font-weight: normal;
|
||||
color: #fff;
|
||||
}
|
||||
.databox > td {
|
||||
#border-bottom: 1px solid #e2e2e2;
|
||||
}
|
||||
|
||||
.databox > th * {
|
||||
color: #fff;
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
table.header_table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.header_table thead tr th,
|
||||
table.header_table tbody tr td {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
thead.header_tr tr {
|
||||
background: #e6e6e6;
|
||||
}
|
||||
|
||||
thead.header_tr tr th {
|
||||
font-weight: normal;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
thead.header_tr tr th.th_first {
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
thead.header_tr tr th.th_description {
|
||||
background-color: #f5f5f5;
|
||||
color: #1c1c1c;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
table.table_beauty {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.table_beauty tbody tr td {
|
||||
padding: 5px;
|
||||
border: 0.1pt solid #acacac;
|
||||
}
|
||||
|
||||
table.databox {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
th.title_table_pdf {
|
||||
background-color: #acacac;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
table.table_agent_module tr td {
|
||||
padding: 5px;
|
||||
}
|
|
@ -1,16 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2012 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
|
@ -112,8 +128,8 @@
|
|||
</div>
|
||||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.731';
|
||||
$build = '190207';
|
||||
$version = '7.0NG.731';
|
||||
$build = '190225';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
@ -520,7 +536,7 @@ function install_step2()
|
|||
echo '<h2>Checking software dependencies</h2>';
|
||||
echo '<table border=0 width=230>';
|
||||
$res = 0;
|
||||
$res += check_variable(phpversion(), '5.2', 'PHP version >= 5.2', 1);
|
||||
$res += check_variable(phpversion(), '7.0', 'PHP version >= 7.0', 1);
|
||||
$res += check_extension('gd', 'PHP GD extension');
|
||||
$res += check_extension('ldap', 'PHP LDAP extension');
|
||||
$res += check_extension('snmp', 'PHP SNMP extension');
|
||||
|
@ -548,7 +564,6 @@ function install_step2()
|
|||
font-size: 8.5pt;margin-top: 2px; font-weight: bolder;'>DB Engines</span>";
|
||||
echo '</td><td>';
|
||||
echo '</td></tr>';
|
||||
check_extension('mysql', 'PHP MySQL extension');
|
||||
check_extension('mysqli', 'PHP MySQL(mysqli) extension');
|
||||
echo '</table>';
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ class Alerts
|
|||
|
||||
$row = [];
|
||||
if (isset($this->columns['agent']) && $this->columns['agent']) {
|
||||
$row[__('Agent')] = sprintf($disabled_style, io_safe_output($alert['agent_name']));
|
||||
$row[__('Agent')] = sprintf($disabled_style, io_safe_output($alert['agent_alias']));
|
||||
}
|
||||
|
||||
$row[__('Module')] = sprintf(
|
||||
|
|
|
@ -634,7 +634,7 @@ echo '</div>';
|
|||
enterprise_hook('close_meta_frame');
|
||||
|
||||
|
||||
ui_require_css_file ('cluetip','include/styles/js/');
|
||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||
ui_require_jquery_file('cluetip');
|
||||
?>
|
||||
|
||||
|
|
|
@ -323,7 +323,7 @@ ui_toggle(
|
|||
}
|
||||
</script>
|
||||
<?php
|
||||
ui_require_css_file('cluetip','include/styles/js/');
|
||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||
ui_require_jquery_file('cluetip');
|
||||
|
||||
echo "<div id='module_details_dialog' style='display: none;'></div>";
|
||||
|
|
|
@ -1,17 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
global $config;
|
||||
|
||||
require_once 'include/functions_gis.php';
|
||||
|
@ -48,16 +63,16 @@ if (is_ajax()) {
|
|||
$id_group = (int) get_parameter('id_group');
|
||||
if ($get_agents_group_json) {
|
||||
$id_group = (int) get_parameter('id_group');
|
||||
$recursion = get_parameter('recursion');
|
||||
$recursion = (bool) get_parameter('recursion');
|
||||
$id_os = get_parameter('id_os', '');
|
||||
$agent_name = get_parameter('name', '');
|
||||
|
||||
$privilege = (string) get_parameter('privilege', 'AR');
|
||||
// Is is possible add keys prefix to avoid auto sorting in js object conversion
|
||||
// Is is possible add keys prefix to avoid auto sorting in js object conversion.
|
||||
$keys_prefix = (string) get_parameter('keys_prefix', '');
|
||||
$status_agents = (int) get_parameter('status_agents', AGENT_STATUS_ALL);
|
||||
|
||||
// Build filter
|
||||
// Build filter.
|
||||
$filter = [];
|
||||
|
||||
if (!empty($id_os)) {
|
||||
|
@ -104,13 +119,23 @@ if (is_ajax()) {
|
|||
}
|
||||
}
|
||||
|
||||
// Perform search
|
||||
$agents = agents_get_group_agents($id_group, $filter, 'lower', false, $recursion, false, '|', $cluster_mode);
|
||||
// Perform search.
|
||||
$agents = agents_get_group_agents(
|
||||
$id_group,
|
||||
$filter,
|
||||
'lower',
|
||||
false,
|
||||
$recursion,
|
||||
false,
|
||||
'|',
|
||||
$cluster_mode
|
||||
);
|
||||
|
||||
if (empty($agents)) {
|
||||
$agents = [];
|
||||
}
|
||||
|
||||
// Add keys prefix
|
||||
// Add keys prefix.
|
||||
if ($keys_prefix !== '') {
|
||||
$i = 0;
|
||||
foreach ($agents as $k => $v) {
|
||||
|
@ -139,7 +164,7 @@ if (is_ajax()) {
|
|||
$id_agents = get_parameter('id_agents');
|
||||
$selection = get_parameter('selection');
|
||||
|
||||
// No filter by module group
|
||||
// No filter by module group.
|
||||
$modules = select_modules_for_agent_group(0, $id_agents, $selection, false, true);
|
||||
echo json_encode($modules);
|
||||
return;
|
||||
|
@ -177,11 +202,14 @@ if (is_ajax()) {
|
|||
$nameModules = get_parameter('module_name');
|
||||
$selection_mode = get_parameter('selection_mode', 'common') == 'all';
|
||||
$status_modulo = (int) get_parameter('status_module', -1);
|
||||
|
||||
$tags_selected = (array) get_parameter('tags', []);
|
||||
$names = select_agents_for_module_group(
|
||||
$nameModules,
|
||||
$selection_mode,
|
||||
['status' => $status_modulo],
|
||||
[
|
||||
'status' => $status_modulo,
|
||||
'tags' => $tags_selected,
|
||||
],
|
||||
'AW'
|
||||
);
|
||||
|
||||
|
@ -311,28 +339,28 @@ if (is_ajax()) {
|
|||
}
|
||||
|
||||
if (!empty($module_name)) {
|
||||
$filter .= " AND t1.nombre COLLATE utf8_general_ci LIKE '%$module_name%'";
|
||||
$filter .= " AND t1.nombre COLLATE utf8_general_ci LIKE '%".$module_name."%'";
|
||||
}
|
||||
|
||||
// Status selector
|
||||
// Status selector.
|
||||
if ($status_modulo == AGENT_MODULE_STATUS_NORMAL) {
|
||||
// Normal
|
||||
// Normal.
|
||||
$sql_conditions .= ' estado = 0 AND utimestamp > 0 )
|
||||
OR (t1.id_tipo_modulo IN(21,22,23,100)) ';
|
||||
} else if ($status_modulo == AGENT_MODULE_STATUS_CRITICAL_BAD) {
|
||||
// Critical
|
||||
// Critical.
|
||||
$sql_conditions .= ' estado = 1 AND utimestamp > 0 )';
|
||||
} else if ($status_modulo == AGENT_MODULE_STATUS_WARNING) {
|
||||
// Warning
|
||||
// Warning.
|
||||
$sql_conditions .= ' estado = 2 AND utimestamp > 0 )';
|
||||
} else if ($status_modulo == AGENT_MODULE_STATUS_NOT_NORMAL) {
|
||||
// Not normal
|
||||
// Not normal.
|
||||
$sql_conditions .= ' estado <> 0)';
|
||||
} else if ($status_modulo == AGENT_MODULE_STATUS_UNKNOWN) {
|
||||
// Unknown
|
||||
// Unknown.
|
||||
$sql_conditions .= ' estado = 3 AND utimestamp <> 0 )';
|
||||
} else if ($status_modulo == AGENT_MODULE_STATUS_NOT_INIT) {
|
||||
// Not init
|
||||
// Not init.
|
||||
$sql_conditions .= ' utimestamp = 0 )
|
||||
AND t1.id_tipo_modulo NOT IN (21,22,23,100)';
|
||||
}
|
||||
|
@ -412,7 +440,7 @@ if (is_ajax()) {
|
|||
|
||||
foreach ($array_reduced as $server_name => $id_agents) {
|
||||
// Metaconsole db connection
|
||||
// $server_name can be the server id (ugly hack, I know)
|
||||
// $server_name can be the server id (ugly hack, I know).
|
||||
if (is_numeric($server_name)) {
|
||||
$connection = metaconsole_get_connection_by_id($server_name);
|
||||
} else {
|
||||
|
@ -423,7 +451,7 @@ if (is_ajax()) {
|
|||
continue;
|
||||
}
|
||||
|
||||
// Get agent's modules
|
||||
// Get agent's modules.
|
||||
$sql = sprintf(
|
||||
'SELECT t1.id_agente, t1.id_agente_modulo, t1.nombre
|
||||
FROM tagente_modulo t1 %s
|
||||
|
@ -451,7 +479,7 @@ if (is_ajax()) {
|
|||
|
||||
$modules_aux = [];
|
||||
foreach ($modules as $key => $module) {
|
||||
// Don't change this order, is used in the serialization
|
||||
// Don't change this order, is used in the serialization.
|
||||
$module_data = [
|
||||
'id_module' => $module['id_agente_modulo'],
|
||||
'id_agent' => $module['id_agente'],
|
||||
|
@ -466,7 +494,7 @@ if (is_ajax()) {
|
|||
|
||||
$modules = $modules_aux;
|
||||
|
||||
// Build the next array using the common values
|
||||
// Build the next array using the common values.
|
||||
if (!empty($last_modules_set)) {
|
||||
$modules = array_intersect_key($modules, $last_modules_set);
|
||||
|
||||
|
@ -480,7 +508,7 @@ if (is_ajax()) {
|
|||
|
||||
$last_modules_set = $modules;
|
||||
|
||||
// Restore db connection
|
||||
// Restore db connection.
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
|
@ -490,7 +518,6 @@ if (is_ajax()) {
|
|||
|
||||
$module_data_processed = array_map(
|
||||
function ($item) {
|
||||
// data: -> id_module | id_agent | server_name;
|
||||
return implode('|', $item);
|
||||
},
|
||||
$module_data
|
||||
|
@ -600,16 +627,16 @@ if (is_ajax()) {
|
|||
if ($get_agent_modules_json) {
|
||||
$id_agent = (int) get_parameter('id_agent');
|
||||
|
||||
// Use -1 as not received
|
||||
// Use -1 as not received.
|
||||
$disabled = (int) get_parameter('disabled', -1);
|
||||
$delete_pending = (int) get_parameter('delete_pending', -1);
|
||||
// Use 0 as not received
|
||||
// Use 0 as not received.
|
||||
$id_tipo_modulo = (int) get_parameter('id_tipo_modulo', 0);
|
||||
$status_modulo = (int) get_parameter('status_module', -1);
|
||||
|
||||
$tags = (array) get_parameter('tags', []);
|
||||
|
||||
// Filter
|
||||
// Filter.
|
||||
$filter = [];
|
||||
if ($disabled !== -1) {
|
||||
$filter['disabled'] = $disabled;
|
||||
|
@ -627,30 +654,34 @@ if (is_ajax()) {
|
|||
$filter = false;
|
||||
}
|
||||
|
||||
$get_only_string_modules = get_parameter('get_only_string_modules', false);
|
||||
$get_only_string_modules = get_parameter(
|
||||
'get_only_string_modules',
|
||||
false
|
||||
);
|
||||
|
||||
if ($get_only_string_modules) {
|
||||
$filter['tagente_modulo.id_tipo_modulo IN'] = '(17,23,3,10,33)';
|
||||
}
|
||||
|
||||
// Status selector
|
||||
// Status selector.
|
||||
if ($status_modulo == AGENT_MODULE_STATUS_NORMAL) {
|
||||
// Normal
|
||||
$sql_conditions .= ' estado = 0 AND utimestamp > 0 )
|
||||
// Normal.
|
||||
$sql_conditions .= ' estado = 0 AND utimestamp > 0 )
|
||||
OR (tagente_modulo.id_tipo_modulo IN(21,22,23,100)) ';
|
||||
} else if ($status_modulo == AGENT_MODULE_STATUS_CRITICAL_BAD) {
|
||||
// Critical
|
||||
// Critical.
|
||||
$sql_conditions .= ' estado = 1 AND utimestamp > 0 )';
|
||||
} else if ($status_modulo == AGENT_MODULE_STATUS_WARNING) {
|
||||
// Warning
|
||||
// Warning.
|
||||
$sql_conditions .= ' estado = 2 AND utimestamp > 0 )';
|
||||
} else if ($status_modulo == AGENT_MODULE_STATUS_NOT_NORMAL) {
|
||||
// Not normal
|
||||
// Not normal.
|
||||
$sql_conditions .= ' estado <> 0 )';
|
||||
} else if ($status_modulo == AGENT_MODULE_STATUS_UNKNOWN) {
|
||||
// Unknown
|
||||
// Unknown.
|
||||
$sql_conditions .= ' estado = 3 AND utimestamp <> 0 )';
|
||||
} else if ($status_modulo == AGENT_MODULE_STATUS_NOT_INIT) {
|
||||
// Not init
|
||||
// Not init.
|
||||
$sql_conditions .= ' utimestamp = 0 )
|
||||
AND tagente_modulo.id_tipo_modulo NOT IN (21,22,23,100)';
|
||||
}
|
||||
|
@ -663,7 +694,7 @@ if (is_ajax()) {
|
|||
$get_id_and_name = (bool) get_parameter('get_id_and_name');
|
||||
$get_distinct_name = (bool) get_parameter('get_distinct_name');
|
||||
|
||||
// Fields
|
||||
// Fields.
|
||||
$fields = '*';
|
||||
if ($get_id_and_name) {
|
||||
$fields = [
|
||||
|
@ -680,7 +711,8 @@ if (is_ajax()) {
|
|||
$agentName = (string) get_parameter('agent_name', null);
|
||||
$server_name = (string) get_parameter('server_name', null);
|
||||
$server_id = (int) get_parameter('server_id', 0);
|
||||
// This will force to get local modules although metaconsole is active, by default get all modules from all nodes
|
||||
// This will force to get local modules although metaconsole is active,
|
||||
// by default get all modules from all nodes.
|
||||
$force_local_modules = (int) get_parameter('force_local_modules', 0);
|
||||
|
||||
if ($agentName != null) {
|
||||
|
@ -703,7 +735,7 @@ if (is_ajax()) {
|
|||
}
|
||||
|
||||
if (metaconsole_load_external_db($connection) == NOERR) {
|
||||
// Get all agents if no agent was given
|
||||
// Get all agents if no agent was given.
|
||||
if ($id_agent == 0) {
|
||||
$id_agent = array_keys(
|
||||
agents_get_group_agents(
|
||||
|
@ -717,11 +749,11 @@ if (is_ajax()) {
|
|||
$agent_modules = agents_get_modules($id_agent, $fields, $filter, $indexed, true, $force_tags);
|
||||
}
|
||||
|
||||
// Restore db connection
|
||||
// Restore db connection.
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
} else {
|
||||
// Get all agents if no agent was given
|
||||
// Get all agents if no agent was given.
|
||||
if ($id_agent == 0) {
|
||||
$id_agent = array_keys(
|
||||
agents_get_group_agents(
|
||||
|
@ -765,7 +797,7 @@ if (is_ajax()) {
|
|||
$id_agent = (int) get_parameter('id_agent');
|
||||
$metaconsole = (bool) get_parameter('metaconsole', false);
|
||||
$id_server = (int) get_parameter('id_server', 0);
|
||||
// Metaconsole
|
||||
// Metaconsole.
|
||||
$server = null;
|
||||
if ($metaconsole) {
|
||||
$filter = [];
|
||||
|
@ -802,7 +834,7 @@ if (is_ajax()) {
|
|||
echo '<strong>'.__('Last remote contact').':</strong> '.human_time_comparation($agent['ultimo_contacto_remoto']).'<br />';
|
||||
|
||||
if (!$metaconsole) {
|
||||
// Fix : Only show agents with module with tags of user profile
|
||||
// Fix : Only show agents with module with tags of user profile.
|
||||
$_user_tags = tags_get_user_tags($config['id_user'], 'RR');
|
||||
|
||||
$_sql_post = '';
|
||||
|
@ -839,10 +871,10 @@ if (is_ajax()) {
|
|||
if ($bad_modules === false) {
|
||||
$size_bad_modules = 0;
|
||||
} else {
|
||||
$size_bad_modules = sizeof($bad_modules);
|
||||
$size_bad_modules = count($bad_modules);
|
||||
}
|
||||
|
||||
// Modules down
|
||||
// Modules down.
|
||||
if ($size_bad_modules > 0) {
|
||||
echo '<strong>'.__('Monitors down').':</strong> '.$size_bad_modules.' / '.$total_modules;
|
||||
echo '<ul>';
|
||||
|
@ -855,7 +887,7 @@ if (is_ajax()) {
|
|||
echo '</ul>';
|
||||
}
|
||||
|
||||
// Alerts (if present)
|
||||
// Alerts (if present).
|
||||
$sql = sprintf(
|
||||
'SELECT COUNT(talert_template_modules.id)
|
||||
FROM talert_template_modules, tagente_modulo, tagente
|
||||
|
@ -937,8 +969,8 @@ if (is_ajax()) {
|
|||
if ($module['id_tipo_modulo'] == 18) {
|
||||
echo '<strong>'.__('Address').':</strong> ';
|
||||
|
||||
// Get the IP/IPs from the module description
|
||||
// Always the IP is the last part of the description (after the last space)
|
||||
// Get the IP/IPs from the module description Always the IP
|
||||
// is the last part of the description (after the last space).
|
||||
$ips = explode(' ', $module['descripcion']);
|
||||
$ips = $ips[(count($ips) - 1)];
|
||||
|
||||
|
@ -948,7 +980,7 @@ if (is_ajax()) {
|
|||
} else {
|
||||
echo '<ul style="display:inline;">';
|
||||
foreach ($ips as $ip) {
|
||||
echo "<li>$ip</li>";
|
||||
echo '<li>'.$ip.'</li>';
|
||||
}
|
||||
|
||||
echo '</ul>';
|
||||
|
@ -1033,7 +1065,7 @@ $agent_a = check_acl($config['id_user'], 0, 'AR');
|
|||
$agent_w = check_acl($config['id_user'], 0, 'AW');
|
||||
$access = ($agent_a == true) ? 'AR' : (($agent_w == true) ? 'AW' : 'AR');
|
||||
$agent = db_get_row('tagente', 'id_agente', $id_agente);
|
||||
// get group for this id_agente
|
||||
// Get group for this id_agente.
|
||||
$id_grupo = $agent['id_grupo'];
|
||||
|
||||
$is_extra = enterprise_hook('policies_is_agent_extra_policy', [$id_agente]);
|
||||
|
@ -1053,7 +1085,7 @@ if (! check_acl_one_of_groups($config['id_user'], $all_groups, 'AR') && ! check_
|
|||
return;
|
||||
}
|
||||
|
||||
// Check for Network FLAG change request
|
||||
// Check for Network FLAG change request.
|
||||
$flag = get_parameter('flag', '');
|
||||
if ($flag !== '') {
|
||||
if ($flag == 1 && check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
|
||||
|
@ -1067,7 +1099,7 @@ if ($flag !== '') {
|
|||
}
|
||||
}
|
||||
|
||||
// Check for Network FLAG change request
|
||||
// Check for Network FLAG change request.
|
||||
$flag_agent = get_parameter('flag_agent', '');
|
||||
if ($flag_agent !== '') {
|
||||
if ($flag_agent == 1 && check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
|
||||
|
@ -1082,10 +1114,10 @@ if ($agent['icon_path']) {
|
|||
}
|
||||
|
||||
|
||||
// -------------Code for the tabs in the header of agent page-----------
|
||||
// Code for the tabs in the header of agent page.
|
||||
$tab = get_parameter('tab', 'main');
|
||||
|
||||
// Manage tab
|
||||
// Manage tab.
|
||||
$managetab = [];
|
||||
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') || $is_extra) {
|
||||
|
@ -1101,7 +1133,7 @@ if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') || $is_extra)
|
|||
}
|
||||
|
||||
|
||||
// Main tab
|
||||
// Main tab.
|
||||
$maintab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'">'.html_print_image('images/agent_mc.png', true, ['title' => __('Main')]).'</a>';
|
||||
|
||||
if ($tab == 'main') {
|
||||
|
@ -1112,7 +1144,7 @@ if ($tab == 'main') {
|
|||
|
||||
|
||||
|
||||
// Alert tab
|
||||
// Alert tab.
|
||||
$alerttab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&tab=alert">'.html_print_image('images/op_alerts.png', true, ['title' => __('Alerts')]).'</a>';
|
||||
|
||||
if ($tab == 'alert') {
|
||||
|
@ -1121,27 +1153,27 @@ if ($tab == 'alert') {
|
|||
$alerttab['active'] = false;
|
||||
}
|
||||
|
||||
// Inventory
|
||||
// Inventory.
|
||||
$inventorytab = enterprise_hook('inventory_tab');
|
||||
if ($inventorytab == -1) {
|
||||
$inventorytab = '';
|
||||
}
|
||||
|
||||
|
||||
// Collection
|
||||
// Collection.
|
||||
$collectiontab = enterprise_hook('collection_tab');
|
||||
if ($collectiontab == -1) {
|
||||
$collectiontab = '';
|
||||
}
|
||||
|
||||
|
||||
// Policy
|
||||
// Policy.
|
||||
$policyTab = enterprise_hook('policy_tab');
|
||||
if ($policyTab == -1) {
|
||||
$policyTab = '';
|
||||
}
|
||||
|
||||
// WUX Console
|
||||
// WUX Console.
|
||||
$modules_wux = enterprise_hook('get_wux_modules', [$id_agente]);
|
||||
if ($modules_wux) {
|
||||
$wux_console_tab = enterprise_hook('wux_console_tab');
|
||||
|
@ -1158,7 +1190,7 @@ if ($url_route_analyzer) {
|
|||
}
|
||||
}
|
||||
|
||||
// GIS tab
|
||||
// GIS tab.
|
||||
$gistab = [];
|
||||
if ($config['activate_gis']) {
|
||||
$gistab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=gis&id_agente='.$id_agente.'">'.html_print_image('images/op_gis.png', true, [ 'title' => __('GIS data')]).'</a>';
|
||||
|
@ -1171,7 +1203,7 @@ if ($config['activate_gis']) {
|
|||
}
|
||||
|
||||
|
||||
// Incident tab
|
||||
// Incident tab.
|
||||
$total_incidents = agents_get_count_incidents($id_agente);
|
||||
if ($total_incidents > 0) {
|
||||
$incidenttab['text'] = '<a href="index.php?sec=gagente&sec2=operation/agentes/ver_agente&tab=incident&id_agente='.$id_agente.'">'.html_print_image('images/book_edit.png', true, ['title' => __('Incidents')]).'</a>';
|
||||
|
@ -1184,7 +1216,7 @@ if ($total_incidents > 0) {
|
|||
}
|
||||
|
||||
|
||||
// Url address tab
|
||||
// Url address tab.
|
||||
if ($agent['url_address'] != '') {
|
||||
$urladdresstab['text'] = '<a href="index.php?sec=gagente&sec2=operation/agentes/ver_agente&tab=url_address&id_agente='.$id_agente.'">'.html_print_image('images/link.png', true, ['title' => __('Url address')]).'</a>';
|
||||
}
|
||||
|
@ -1196,7 +1228,7 @@ if ($tab == 'url_address') {
|
|||
}
|
||||
|
||||
|
||||
// Custom fields tab
|
||||
// Custom fields tab.
|
||||
$custom_fields['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=custom_fields&id_agente='.$id_agente.'">'.html_print_image('images/custom_field.png', true, ['title' => __('Custom fields')]).'</a>';
|
||||
if ($tab == 'custom_fields') {
|
||||
$custom_fields['active'] = true;
|
||||
|
@ -1205,7 +1237,7 @@ if ($tab == 'custom_fields') {
|
|||
}
|
||||
|
||||
|
||||
// Graphs tab
|
||||
// Graphs tab.
|
||||
$graphs['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=graphs&id_agente='.$id_agente.'">'.html_print_image('images/chart.png', true, ['title' => __('Graphs')]).'</a>';
|
||||
if ($tab == 'graphs') {
|
||||
$graphs['active'] = true;
|
||||
|
@ -1214,7 +1246,7 @@ if ($tab == 'graphs') {
|
|||
}
|
||||
|
||||
|
||||
// Log viewer tab
|
||||
// Log viewer tab.
|
||||
if (enterprise_installed() && $config['log_collector']) {
|
||||
$is_windows = strtoupper(substr(PHP_OS, 0, 3)) == 'WIN';
|
||||
$agent_has_logs = (bool) db_get_value('id_agent', 'tagent_module_log', 'id_agent', $id_agente);
|
||||
|
@ -1226,7 +1258,7 @@ if (enterprise_installed() && $config['log_collector']) {
|
|||
}
|
||||
}
|
||||
|
||||
// eHorus tab
|
||||
// EHorus tab.
|
||||
if ($config['ehorus_enabled'] && !empty($config['ehorus_custom_field'])
|
||||
&& (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') || is_user_admin($config['id_user']))
|
||||
) {
|
||||
|
@ -1235,7 +1267,7 @@ if ($config['ehorus_enabled'] && !empty($config['ehorus_custom_field'])
|
|||
$tab_url = 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=ehorus&id_agente='.$id_agente;
|
||||
$ehorus_tab['text'] = '<a href="'.$tab_url.'" class="ehorus_tab">'.html_print_image('images/ehorus/ehorus.png', true, [ 'title' => __('eHorus')]).'</a>';
|
||||
|
||||
// Hidden subtab layer
|
||||
// Hidden subtab layer.
|
||||
$ehorus_tab['sub_menu'] = '<ul class="mn subsubmenu" style="float:none;">';
|
||||
$ehorus_tab['sub_menu'] .= '<a class="tab_terminal" href="'.$tab_url.'&client_tab=terminal">';
|
||||
$ehorus_tab['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">'.html_print_image('images/ehorus/terminal.png', true, [ 'title' => __('Terminal')]);
|
||||
|
@ -1279,7 +1311,7 @@ $onheader = [
|
|||
];
|
||||
|
||||
// Added after it exists
|
||||
// If the agent has incidents associated
|
||||
// If the agent has incidents associated.
|
||||
if ($total_incidents) {
|
||||
$onheader['incident'] = $incidenttab;
|
||||
}
|
||||
|
@ -1288,23 +1320,23 @@ if ($agent['url_address'] != '') {
|
|||
$onheader['url_address'] = $urladdresstab;
|
||||
}
|
||||
|
||||
// If the log viewer tab exists
|
||||
// If the log viewer tab exists.
|
||||
if (isset($log_viewer_tab) && !empty($log_viewer_tab)) {
|
||||
$onheader['log_viewer'] = $log_viewer_tab;
|
||||
}
|
||||
|
||||
// If the ehorus id exists
|
||||
// If the ehorus id exists.
|
||||
if (isset($ehorus_tab) && !empty($ehorus_tab)) {
|
||||
$onheader['ehorus'] = $ehorus_tab;
|
||||
}
|
||||
|
||||
// Tabs for extensions
|
||||
// Tabs for extensions.
|
||||
foreach ($config['extensions'] as $extension) {
|
||||
if (isset($extension['extension_ope_tab']) && !isset($extension['extension_god_tab'])) {
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, $extension['extension_ope_tab']['acl'])) {
|
||||
// VMware extension is only available for VMware OS
|
||||
// VMware extension is only available for VMware OS.
|
||||
if ($extension['extension_ope_tab']['id'] === 'vmware_manager') {
|
||||
// Check if OS is vmware
|
||||
// Check if OS is vmware.
|
||||
$id_remote_field = db_get_value(
|
||||
'id_field',
|
||||
'tagent_custom_fields',
|
||||
|
@ -1326,13 +1358,13 @@ foreach ($config['extensions'] as $extension) {
|
|||
}
|
||||
}
|
||||
|
||||
// RHEV extension is only available for RHEV Virtual Machines
|
||||
// RHEV extension is only available for RHEV Virtual Machines.
|
||||
if ($extension['extension_ope_tab']['id'] === 'rhev_manager') {
|
||||
// Get id for remote field "rhev_type"
|
||||
// Get id for remote field "rhev_type".
|
||||
$id_remote_field = db_get_value('id_field', 'tagent_custom_fields', 'name', 'rhev_type');
|
||||
// Get rhev type for this agent
|
||||
// Get rhev type for this agent.
|
||||
$rhev_type = db_get_value_filter('description', 'tagent_custom_data', ['id_field' => $id_remote_field, 'id_agent' => $agent['id_agente']]);
|
||||
// Check if rhev type is a vm
|
||||
// Check if rhev type is a vm.
|
||||
if ($rhev_type != 'vm') {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* Pandora FMS - http://pandorafms.com
|
||||
* ==================================================
|
||||
* Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
if (check_acl($id_user, 0, 'ER')) {
|
||||
$groups = users_get_groups($id_user, 'ER');
|
||||
} else if (check_acl($id_user, 0, 'EW')) {
|
||||
|
@ -19,7 +21,6 @@ if (check_acl($id_user, 0, 'ER')) {
|
|||
$groups = users_get_groups($id_user, 'EM');
|
||||
}
|
||||
|
||||
|
||||
$propagate = db_get_value('propagate', 'tgrupo', 'id_grupo', $id_group);
|
||||
|
||||
if ($id_group > 0) {
|
||||
|
@ -41,24 +42,67 @@ if ($id_group > 0) {
|
|||
$childrens_ids = array_keys($groups);
|
||||
}
|
||||
|
||||
// Group selection
|
||||
if (!isset($date_from)) {
|
||||
$date_from = '';
|
||||
}
|
||||
|
||||
if (!isset($date_to)) {
|
||||
$date_to = '';
|
||||
}
|
||||
|
||||
if (($date_from === '') && ($date_to === '')) {
|
||||
if ($event_view_hr > 0) {
|
||||
$filter_resume['hours_max'] = $event_view_hr;
|
||||
$unixtime = (get_system_time() - ($event_view_hr * SECONDS_1HOUR));
|
||||
$sql_post .= ' AND (utimestamp > '.$unixtime.')';
|
||||
}
|
||||
} else {
|
||||
// Some of this values will have the user's timezone,
|
||||
// so we need to reverse it to the system's timezone
|
||||
// before using it into the db.
|
||||
$fixed_offset = get_fixed_offset();
|
||||
|
||||
if (!empty($date_from)) {
|
||||
if (empty($time_from)) {
|
||||
$time_from = '00:00:00';
|
||||
}
|
||||
|
||||
$utimestamp_from = (strtotime($date_from.' '.$time_from) - $fixed_offset);
|
||||
$filter_resume['time_from'] = date(DATE_FORMAT.' '.TIME_FORMAT, $utimestamp_from);
|
||||
$sql_post .= ' AND (utimestamp >= '.$utimestamp_from.')';
|
||||
}
|
||||
|
||||
if (!empty($date_to)) {
|
||||
if (empty($time_to)) {
|
||||
$time_to = '23:59:59';
|
||||
}
|
||||
|
||||
$utimestamp_to = (strtotime($date_to.' '.$time_to) - $fixed_offset);
|
||||
$filter_resume['time_to'] = date(DATE_FORMAT.' '.TIME_FORMAT, $utimestamp_to);
|
||||
$sql_post .= ' AND (utimestamp <= '.$utimestamp_to.')';
|
||||
}
|
||||
}
|
||||
|
||||
// Group selection.
|
||||
if ($id_group > 0 && in_array($id_group, array_keys($groups))) {
|
||||
if ($propagate) {
|
||||
$childrens_str = implode(',', $childrens_ids);
|
||||
$sql_post = " AND (id_grupo IN ($childrens_str) OR id_group IN ($childrens_str))";
|
||||
$sql_post .= " AND (id_grupo IN ($childrens_str) OR id_group IN ($childrens_str))";
|
||||
} else {
|
||||
// If a group is selected and it's in the groups allowed
|
||||
$sql_post = " AND (id_grupo = $id_group OR id_group = $id_group)";
|
||||
// If a group is selected and it's in the groups allowed.
|
||||
$sql_post .= " AND (id_grupo = $id_group OR id_group = $id_group)";
|
||||
}
|
||||
} else {
|
||||
$sql_post = sprintf(
|
||||
' AND (id_grupo IN (%s) OR id_group IN (%s)) ',
|
||||
implode(',', array_keys($groups)),
|
||||
implode(',', array_keys($groups))
|
||||
);
|
||||
if (!users_is_admin() && !users_can_manage_group_all('ER')) {
|
||||
$sql_post .= sprintf(
|
||||
' AND (id_grupo IN (%s) OR id_group IN (%s)) ',
|
||||
implode(',', array_keys($groups)),
|
||||
implode(',', array_keys($groups))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Skip system messages if user is not PM
|
||||
// Skip system messages if user is not PM.
|
||||
if (!check_acl($id_user, 0, 'PM')) {
|
||||
$sql_post .= ' AND id_grupo != 0';
|
||||
}
|
||||
|
@ -164,13 +208,13 @@ if ($source != '') {
|
|||
$sql_post .= " AND source LIKE '%$source%'";
|
||||
}
|
||||
|
||||
// In metaconsole mode the agent search is performed by name
|
||||
// In metaconsole mode the agent search is performed by name.
|
||||
if ($meta) {
|
||||
$text_agent = get_parameter('text_agent', '');
|
||||
$id_agent = get_parameter('id_agent', 0);
|
||||
if ($id_agent) {
|
||||
$sql_post .= ' AND agent_name IN (SELECT nombre FROM tmetaconsole_agent WHERE
|
||||
id_tagente ='.$id_agent." AND alias LIKE '".io_safe_input($text_agent)."')";
|
||||
id_tagente ='.$id_agent." AND alias LIKE '".$text_agent."')";
|
||||
$filter_resume['agent'] = $text_agent;
|
||||
}
|
||||
} else {
|
||||
|
@ -179,7 +223,7 @@ if ($meta) {
|
|||
break;
|
||||
|
||||
case -1:
|
||||
// Agent doesnt exist. No results will returned
|
||||
// Agent doesnt exist. No results will returned.
|
||||
$sql_post .= ' AND 1 = 0';
|
||||
break;
|
||||
|
||||
|
@ -192,9 +236,7 @@ if ($meta) {
|
|||
|
||||
|
||||
|
||||
if ($meta) {
|
||||
// There is another filter.
|
||||
} else {
|
||||
if (!$meta) {
|
||||
if (!empty($text_module)) {
|
||||
$filter_resume['module'] = $text_module;
|
||||
$sql_post .= " AND id_agentmodule IN (
|
||||
|
@ -210,48 +252,7 @@ if ($id_user_ack != '0') {
|
|||
$sql_post .= " AND id_usuario = '".$id_user_ack."'";
|
||||
}
|
||||
|
||||
if (!isset($date_from)) {
|
||||
$date_from = '';
|
||||
}
|
||||
|
||||
if (!isset($date_to)) {
|
||||
$date_to = '';
|
||||
}
|
||||
|
||||
if (($date_from == '') && ($date_to == '')) {
|
||||
if ($event_view_hr > 0) {
|
||||
$filter_resume['hours_max'] = $event_view_hr;
|
||||
$unixtime = (get_system_time() - ($event_view_hr * SECONDS_1HOUR));
|
||||
$sql_post .= ' AND (utimestamp > '.$unixtime.')';
|
||||
}
|
||||
} else {
|
||||
// Some of this values will have the user's timezone,
|
||||
// so we need to reverse it to the system's timezone
|
||||
// before using it into the db
|
||||
$fixed_offset = get_fixed_offset();
|
||||
|
||||
if (!empty($date_from)) {
|
||||
if (empty($time_from)) {
|
||||
$time_from = '00:00:00';
|
||||
}
|
||||
|
||||
$utimestamp_from = (strtotime($date_from.' '.$time_from) - $fixed_offset);
|
||||
$filter_resume['time_from'] = date(DATE_FORMAT.' '.TIME_FORMAT, $utimestamp_from);
|
||||
$sql_post .= ' AND (utimestamp >= '.$utimestamp_from.')';
|
||||
}
|
||||
|
||||
if (!empty($date_to)) {
|
||||
if (empty($time_to)) {
|
||||
$time_to = '23:59:59';
|
||||
}
|
||||
|
||||
$utimestamp_to = (strtotime($date_to.' '.$time_to) - $fixed_offset);
|
||||
$filter_resume['time_to'] = date(DATE_FORMAT.' '.TIME_FORMAT, $utimestamp_to);
|
||||
$sql_post .= ' AND (utimestamp <= '.$utimestamp_to.')';
|
||||
}
|
||||
}
|
||||
|
||||
// Search by tag
|
||||
// Search by tag.
|
||||
if (!empty($tag_with)) {
|
||||
if (!users_is_admin()) {
|
||||
$user_tags = array_flip(tags_get_tags_for_module_search());
|
||||
|
@ -305,7 +306,7 @@ if (!empty($tag_without)) {
|
|||
$sql_post .= ' ) ';
|
||||
}
|
||||
|
||||
// Filter/Only alerts
|
||||
// Filter/Only alerts.
|
||||
if (isset($filter_only_alert)) {
|
||||
if ($filter_only_alert == 0) {
|
||||
$filter_resume['alerts'] = $filter_only_alert;
|
||||
|
@ -316,7 +317,7 @@ if (isset($filter_only_alert)) {
|
|||
}
|
||||
}
|
||||
|
||||
// Tags ACLS
|
||||
// Tags ACLS.
|
||||
if ($id_group > 0 && in_array($id_group, array_keys($groups))) {
|
||||
$group_array = (array) $id_group;
|
||||
} else {
|
||||
|
@ -335,7 +336,7 @@ if (check_acl($id_user, 0, 'ER')) {
|
|||
[],
|
||||
true
|
||||
);
|
||||
// FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)"
|
||||
// FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)".
|
||||
} else if (check_acl($id_user, 0, 'EW')) {
|
||||
$tags_acls_condition = tags_get_acl_tags(
|
||||
$id_user,
|
||||
|
@ -348,7 +349,7 @@ if (check_acl($id_user, 0, 'ER')) {
|
|||
[],
|
||||
true
|
||||
);
|
||||
// FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)"
|
||||
// FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)".
|
||||
} else if (check_acl($id_user, 0, 'EM')) {
|
||||
$tags_acls_condition = tags_get_acl_tags(
|
||||
$id_user,
|
||||
|
@ -361,14 +362,14 @@ if (check_acl($id_user, 0, 'ER')) {
|
|||
[],
|
||||
true
|
||||
);
|
||||
// FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)"
|
||||
// FORCE CHECK SQL "(TAG = tag1 AND id_grupo = 1)".
|
||||
}
|
||||
|
||||
if (($tags_acls_condition != ERR_WRONG_PARAMETERS) && ($tags_acls_condition != ERR_ACL) && ($tags_acls_condition != -110000)) {
|
||||
$sql_post .= $tags_acls_condition;
|
||||
}
|
||||
|
||||
// Metaconsole fitlers
|
||||
// Metaconsole fitlers.
|
||||
if ($meta) {
|
||||
if ($server_id) {
|
||||
$filter_resume['server'] = $server_id;
|
||||
|
|
|
@ -983,7 +983,11 @@ if ($group_rep == 2) {
|
|||
html_print_button(__('Execute event response'), 'submit_event_response', false, 'execute_event_response(true);', 'class="sub next"');
|
||||
echo "<span id='response_loading_dialog' style='display:none'>".html_print_image('images/spinner.gif', true).'</span>';
|
||||
echo '</form>';
|
||||
echo '<span id="max_custom_event_resp_msg" style="display:none; color:#FC4444; line-height: 200%;">'.__('A maximum of 10 event custom responses can be selected').'</span>';
|
||||
echo '<span id="max_custom_event_resp_msg" style="display:none; color:#FC4444; line-height: 200%;">';
|
||||
echo __(
|
||||
'A maximum of %s event custom responses can be selected',
|
||||
$config['max_execution_event_response']
|
||||
).'</span>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
@ -1012,7 +1016,7 @@ if ($group_rep == 2) {
|
|||
var total_checked = $(".chk_val:checked").length;
|
||||
|
||||
// Limit number of events to apply custom responses to for performance reasons
|
||||
if (total_checked > 10) {
|
||||
if (total_checked > <?php echo $config['max_execution_event_response']; ?> ) {
|
||||
$('#max_custom_event_resp_msg').show();
|
||||
return;
|
||||
}
|
||||
|
@ -1022,18 +1026,22 @@ if ($group_rep == 2) {
|
|||
$('#response_loading_dialog').show(function() {
|
||||
|
||||
$(".chk_val").each(function() {
|
||||
|
||||
if ($(this).is(":checked")) {
|
||||
//var server_id = $('#hidden-server_id_'+).
|
||||
event_id = $(this).val();
|
||||
server_id = $('#hidden-server_id_'+event_id).val();
|
||||
|
||||
response['target'] = get_response_target(event_id, response_id, server_id);
|
||||
|
||||
response['target'] = get_response_target(
|
||||
event_id,
|
||||
response_id,
|
||||
server_id
|
||||
);
|
||||
if (total_checked-1 === counter) end=1;
|
||||
|
||||
show_massive_response_dialog(event_id, response_id, response, counter, end);
|
||||
|
||||
show_massive_response_dialog(
|
||||
event_id,
|
||||
response_id,
|
||||
response,
|
||||
counter,
|
||||
end
|
||||
);
|
||||
counter++;
|
||||
}
|
||||
});
|
||||
|
@ -1087,4 +1095,3 @@ if ($group_rep == 2) {
|
|||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -681,7 +681,7 @@ if (empty($traps)) {
|
|||
|
||||
ui_require_css_file('pandora_enterprise', ENTERPRISE_DIR.'/include/styles/');
|
||||
ui_require_css_file('pandora_dashboard', ENTERPRISE_DIR.'/include/styles/');
|
||||
ui_require_css_file('cluetip','include/styles/js/');
|
||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||
|
||||
ui_require_jquery_file('countdown');
|
||||
ui_require_javascript_file('pandora_dashboard', ENTERPRISE_DIR.'/include/javascript/');
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
ui_require_css_file('tree');
|
||||
ui_require_css_file('fixed-bottom-box');
|
||||
|
||||
|
|
|
@ -1,17 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
|
@ -29,38 +44,54 @@ if (enterprise_installed() && defined('METACONSOLE')) {
|
|||
}
|
||||
|
||||
$id = get_parameter_get('id', $config['id_user']);
|
||||
// ID given as parameter
|
||||
// ID given as parameter.
|
||||
$status = get_parameter('status', -1);
|
||||
// Flag to print action status message
|
||||
// Flag to print action status message.
|
||||
$user_info = get_user_info($id);
|
||||
|
||||
$id = $user_info['id_user'];
|
||||
// This is done in case there are problems with uppercase/lowercase (MySQL auth has that problem)
|
||||
// This is done in case there are problems with uppercase/lowercase
|
||||
// (MySQL auth has that problem).
|
||||
if ((!check_acl($config['id_user'], users_get_groups($id), 'UM'))
|
||||
and ($id != $config['id_user'])
|
||||
&& ($id != $config['id_user'])
|
||||
) {
|
||||
db_pandora_audit('ACL Violation', 'Trying to view a user without privileges');
|
||||
db_pandora_audit(
|
||||
'ACL Violation',
|
||||
'Trying to view a user without privileges'
|
||||
);
|
||||
include 'general/noaccess.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
// If current user is editing himself or if the user has UM (User Management) rights on any groups the user is part of AND the authorization scheme allows for users/admins to update info
|
||||
if (($config['id_user'] == $id || check_acl($config['id_user'], users_get_groups($id), 'UM')) && $config['user_can_update_info']) {
|
||||
// If current user is editing himself or if the user has UM (User Management)
|
||||
// rights on any groups the user is part of AND the authorization scheme allows
|
||||
// for users/admins to update info.
|
||||
if (($config['id_user'] == $id || check_acl($config['id_user'], users_get_groups($id), 'UM'))
|
||||
&& $config['user_can_update_info']
|
||||
) {
|
||||
$view_mode = false;
|
||||
} else {
|
||||
$view_mode = true;
|
||||
}
|
||||
|
||||
// Header
|
||||
// Header.
|
||||
if ($meta) {
|
||||
user_meta_print_header();
|
||||
$url = 'index.php?sec=advanced&sec2=advanced/users_setup&tab=user_edit';
|
||||
} else {
|
||||
ui_print_page_header(__('User detail editor'), 'images/op_workspace.png', false, '', false, '');
|
||||
ui_print_page_header(
|
||||
__('User detail editor'),
|
||||
'images/op_workspace.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
''
|
||||
);
|
||||
$url = 'index.php?sec=workspace&sec2=operation/users/user_edit';
|
||||
}
|
||||
|
||||
|
||||
// Update user info
|
||||
// Update user info.
|
||||
if (isset($_GET['modified']) && !$view_mode) {
|
||||
if (html_print_csrf_error()) {
|
||||
return;
|
||||
|
@ -78,7 +109,7 @@ if (isset($_GET['modified']) && !$view_mode) {
|
|||
$upd_info['language'] = get_parameter_post('language', $user_info['language']);
|
||||
$upd_info['timezone'] = get_parameter_post('timezone', '');
|
||||
$upd_info['id_skin'] = get_parameter('skin', $user_info['id_skin']);
|
||||
$upd_info['id_filter'] = get_parameter('event_filter', null);
|
||||
$upd_info['default_event_filter'] = get_parameter('event_filter', null);
|
||||
$upd_info['block_size'] = get_parameter('block_size', $config['block_size']);
|
||||
$upd_info['firstname'] = get_parameter('newsletter_reminder', $user_info['first_name']);
|
||||
$default_block_size = get_parameter('default_block_size', 0);
|
||||
|
@ -91,7 +122,7 @@ if (isset($_GET['modified']) && !$view_mode) {
|
|||
$dashboard = get_parameter('dashboard', '');
|
||||
$visual_console = get_parameter('visual_console', '');
|
||||
|
||||
// save autorefresh list
|
||||
// Save autorefresh list.
|
||||
$autorefresh_list = get_parameter_post('autorefresh_list');
|
||||
if (($autorefresh_list[0] === '') || ($autorefresh_list[0] === '0')) {
|
||||
$upd_info['autorefresh_white_list'] = '';
|
||||
|
@ -105,7 +136,10 @@ if (isset($_GET['modified']) && !$view_mode) {
|
|||
|
||||
$section = io_safe_output($upd_info['section']);
|
||||
|
||||
if (($section == 'Event list') || ($section == 'Group view') || ($section == 'Alert detail') || ($section == 'Tactical view') || ($section == 'Default')) {
|
||||
if (($section == 'Event list') || ($section == 'Group view')
|
||||
|| ($section == 'Alert detail') || ($section == 'Tactical view')
|
||||
|| ($section == 'Default')
|
||||
) {
|
||||
$upd_info['data_section'] = '';
|
||||
} else if ($section == 'Dashboard') {
|
||||
$upd_info['data_section'] = $dashboard;
|
||||
|
@ -115,7 +149,9 @@ if (isset($_GET['modified']) && !$view_mode) {
|
|||
|
||||
if (!empty($password_new)) {
|
||||
if ($config['user_can_update_password'] && $password_confirm == $password_new) {
|
||||
if ((!$is_admin || $config['enable_pass_policy_admin']) && $config['enable_pass_policy']) {
|
||||
if ((!$is_admin || $config['enable_pass_policy_admin'])
|
||||
&& $config['enable_pass_policy']
|
||||
) {
|
||||
$pass_ok = login_validate_pass($password_new, $id, true);
|
||||
if ($pass_ok != 1) {
|
||||
ui_print_error_message($pass_ok);
|
||||
|
@ -124,21 +160,11 @@ if (isset($_GET['modified']) && !$view_mode) {
|
|||
if ($return) {
|
||||
$return2 = save_pass_history($id, $password_new);
|
||||
}
|
||||
|
||||
/*
|
||||
ui_print_result_message ($return,
|
||||
__('Password successfully updated'),
|
||||
__('Error updating passwords: %s', $config['auth_error']));*/
|
||||
}
|
||||
} else {
|
||||
$return = update_user_password($id, $password_new);
|
||||
/*
|
||||
ui_print_result_message ($return,
|
||||
__('Password successfully updated'),
|
||||
__('Error updating passwords: %s', $config['auth_error']));*/
|
||||
}
|
||||
} else if ($password_new !== 'NON-INIT') {
|
||||
// ui_print_error_message (__('Passwords didn\'t match or other problem encountered while updating passwords'));
|
||||
$error_msg = __('Passwords didn\'t match or other problem encountered while updating passwords');
|
||||
}
|
||||
} else if (empty($password_new) && empty($password_confirm)) {
|
||||
|
@ -147,16 +173,18 @@ if (isset($_GET['modified']) && !$view_mode) {
|
|||
$return = false;
|
||||
}
|
||||
|
||||
// No need to display "error" here, because when no update is needed (no changes in data)
|
||||
// SQL function returns 0 (FALSE), but is not an error, just no change. Previous error
|
||||
// message could be confussing to the user.
|
||||
// No need to display "error" here, because when no update is needed
|
||||
// (no changes in data) SQL function returns 0 (FALSE), but is not an error,
|
||||
// just no change. Previous error message could be confussing to the user.
|
||||
if ($return) {
|
||||
if (!empty($password_new) && !empty($password_confirm)) {
|
||||
$success_msg = __('Password successfully updated');
|
||||
}
|
||||
|
||||
// if info is valid then proceed with update
|
||||
if ((filter_var($upd_info['email'], FILTER_VALIDATE_EMAIL) || $upd_info['email'] == '') && (preg_match('/^[0-9- ]+$/D', $upd_info['phone']) || $upd_info['phone'] == '')) {
|
||||
// If info is valid then proceed with update.
|
||||
if ((filter_var($upd_info['email'], FILTER_VALIDATE_EMAIL) || $upd_info['email'] == '')
|
||||
&& (preg_match('/^[0-9- ]+$/D', $upd_info['phone']) || $upd_info['phone'] == '')
|
||||
) {
|
||||
$return_update_user = update_user($id, $upd_info);
|
||||
|
||||
if ($return_update_user === false) {
|
||||
|
@ -172,7 +200,12 @@ if (isset($_GET['modified']) && !$view_mode) {
|
|||
}
|
||||
}
|
||||
|
||||
ui_print_result_message($return, $success_msg, $error_msg, $user_auth_error);
|
||||
ui_print_result_message(
|
||||
$return,
|
||||
$success_msg,
|
||||
$error_msg,
|
||||
$user_auth_error
|
||||
);
|
||||
} else if (!filter_var($upd_info['email'], FILTER_VALIDATE_EMAIL)) {
|
||||
ui_print_error_message(__('Please enter a valid email'));
|
||||
} else if (!preg_match('/^[0-9- ]+$/D', $upd_info['phone'])) {
|
||||
|
@ -187,11 +220,16 @@ if (isset($_GET['modified']) && !$view_mode) {
|
|||
|
||||
$user_auth_error = $config['auth_error'];
|
||||
|
||||
ui_print_result_message($return, $success_msg, $error_msg, $user_auth_error);
|
||||
ui_print_result_message(
|
||||
$return,
|
||||
$success_msg,
|
||||
$error_msg,
|
||||
$user_auth_error
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Prints action status for current message
|
||||
// Prints action status for current message.
|
||||
if ($status != -1) {
|
||||
ui_print_result_message(
|
||||
$status,
|
||||
|
@ -221,7 +259,20 @@ $data = [];
|
|||
$data[0] = '<span style="width:50%;float:left;"><b>'.__('User ID').'</b></span>';
|
||||
$data[0] .= $jump.'<span style="font-weight: normal;width:20%;float:left;">'.$id.'</span>';
|
||||
$data[1] = '<span style="width:40%;float:left;line-height:20px;"><b>'.__('Full (display) name').'</b></span>';
|
||||
$data[1] .= $jump.'<span style="width:20%;float:left;line-height:20px;">'.html_print_input_text_extended('fullname', $user_info['fullname'], 'fullname', '', 20, 100, $view_mode, '', 'class="input"', true).'</span>';
|
||||
$data[1] .= $jump.'<span style="width:20%;float:left;line-height:20px;">';
|
||||
$data[1] .= html_print_input_text_extended(
|
||||
'fullname',
|
||||
$user_info['fullname'],
|
||||
'fullname',
|
||||
'',
|
||||
20,
|
||||
100,
|
||||
$view_mode,
|
||||
'',
|
||||
'class="input"',
|
||||
true
|
||||
).'</span>';
|
||||
|
||||
// Show "Picture" (in future versions, why not, allow users to upload it's own avatar here.
|
||||
if (is_user_admin($id)) {
|
||||
$data[2] = html_print_image('images/people_1.png', true);
|
||||
|
@ -368,7 +419,7 @@ if (!$meta) {
|
|||
|
||||
|
||||
|
||||
// User only can change skins if has more than one group
|
||||
// User only can change skins if has more than one group.
|
||||
$data[1] = '';
|
||||
if (function_exists('skins_print_select')) {
|
||||
if (count($usr_groups) > 1) {
|
||||
|
@ -388,18 +439,21 @@ $table->rowclass[] = '';
|
|||
$table->rowstyle[] = 'font-weight: bold;';
|
||||
$table->data[] = $data;
|
||||
|
||||
// Double auth
|
||||
// Double auth.
|
||||
$double_auth_enabled = (bool) db_get_value('id', 'tuser_double_auth', 'id_user', $config['id_user']);
|
||||
$data = [];
|
||||
$data[0] = '<span style="width:50%;float:left;">'.__('Double authentication').'</span>';
|
||||
$data[0] .= $jump;
|
||||
$data[0] .= '<span style="width:20%;float:left;line-height:20px;">'.html_print_checkbox('double_auth', 1, $double_auth_enabled, true).'</span>';
|
||||
if ($config['double_auth_enabled']) {
|
||||
$data[0] = '<span style="width:50%;float:left;">'.__('Double authentication').'</span>';
|
||||
$data[0] .= $jump;
|
||||
$data[0] .= '<span style="width:20%;float:left;line-height:20px;">'.html_print_checkbox('double_auth', 1, $double_auth_enabled, true).'</span>';
|
||||
}
|
||||
|
||||
if ($double_auth_enabled) {
|
||||
$data[0] .= $jump;
|
||||
$data[0] .= html_print_button(__('Show information'), 'show_info', false, 'javascript:show_double_auth_info();', '', true);
|
||||
}
|
||||
|
||||
// Dialog
|
||||
// Dialog.
|
||||
$data[0] .= '<div id="dialog-double_auth"><div id="dialog-double_auth-container"></div></div>';
|
||||
|
||||
if (check_acl($config['id_user'], 0, 'ER')) {
|
||||
|
@ -407,14 +461,13 @@ if (check_acl($config['id_user'], 0, 'ER')) {
|
|||
$data[1] .= $jump.'<span style="width:20%;float:left;line-height:20px;">'.html_print_select_from_sql(
|
||||
'SELECT id_filter, id_name FROM tevent_filter',
|
||||
'event_filter',
|
||||
$user_info['id_filter'],
|
||||
$user_info['default_event_filter'],
|
||||
'',
|
||||
__('None'),
|
||||
null,
|
||||
true
|
||||
).'</span>';
|
||||
}//end if
|
||||
else if (license_free()) {
|
||||
} else if (license_free()) {
|
||||
$data[1] = __('Newsletter Subscribed').':';
|
||||
if ($user_info['middlename']) {
|
||||
$data[1] .= $jump.'<span style="font-weight:initial;">'.__('Already subscribed to %s newsletter', get_product_name()).'</span>';
|
||||
|
@ -465,7 +518,8 @@ if (!isset($autorefresh_list)) {
|
|||
$autorefresh_list[0] = __('None');
|
||||
} else {
|
||||
$aux = [];
|
||||
for ($i = 0; $i < count($autorefresh_list); $i++) {
|
||||
$count_autorefresh_list = count($autorefresh_list);
|
||||
for ($i = 0; $i < $count_autorefresh_list; $i++) {
|
||||
$aux[$autorefresh_list[$i]] = $autorefresh_list_out[$autorefresh_list[$i]];
|
||||
unset($autorefresh_list_out[$autorefresh_list[$i]]);
|
||||
$autorefresh_list[$i] = $aux;
|
||||
|
@ -478,7 +532,8 @@ if (!isset($autorefresh_list)) {
|
|||
$autorefresh_list[0] = __('None');
|
||||
} else {
|
||||
$aux = [];
|
||||
for ($i = 0; $i < count($autorefresh_list); $i++) {
|
||||
$count_autorefresh_list = count($autorefresh_list);
|
||||
for ($i = 0; $i < $count_autorefresh_list; $i++) {
|
||||
$aux[$autorefresh_list[$i]] = $autorefresh_list_out[$autorefresh_list[$i]];
|
||||
unset($autorefresh_list_out[$autorefresh_list[$i]]);
|
||||
$autorefresh_list[$i] = $aux;
|
||||
|
@ -488,10 +543,39 @@ if (!isset($autorefresh_list)) {
|
|||
}
|
||||
}
|
||||
|
||||
$data[0] = _('Autorefresh').ui_print_help_tip(__('This will activate autorefresh in selected pages'), true);
|
||||
$select_out = html_print_select($autorefresh_list_out, 'autorefresh_list_out[]', '', '', '', '', true, true, true, '', false, 'width:200px');
|
||||
$data[0] = _('Autorefresh').ui_print_help_tip(
|
||||
__('This will activate autorefresh in selected pages'),
|
||||
true
|
||||
);
|
||||
$select_out = html_print_select(
|
||||
$autorefresh_list_out,
|
||||
'autorefresh_list_out[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:200px'
|
||||
);
|
||||
$arrows = ' ';
|
||||
$select_in = html_print_select($autorefresh_list, 'autorefresh_list[]', '', '', '', '', true, true, true, '', false, 'width:200px');
|
||||
$select_in = html_print_select(
|
||||
$autorefresh_list,
|
||||
'autorefresh_list[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width:200px'
|
||||
);
|
||||
|
||||
$table_ichanges = '<table style="position:relative;left:160px;">
|
||||
<tr>
|
||||
|
@ -502,19 +586,50 @@ $table_ichanges = '<table style="position:relative;left:160px;">
|
|||
<tr>
|
||||
<td>'.$select_out.'</td>
|
||||
<td>
|
||||
<a href="javascript:">'.html_print_image('images/darrowright.png', true, ['id' => 'right_autorefreshlist', 'alt' => __('Push selected pages into autorefresh list'), 'title' => __('Push selected pages into autorefresh list')]).'</a>
|
||||
<a href="javascript:">'.html_print_image(
|
||||
'images/darrowright.png',
|
||||
true,
|
||||
[
|
||||
'id' => 'right_autorefreshlist',
|
||||
'alt' => __('Push selected pages into autorefresh list'),
|
||||
'title' => __('Push selected pages into autorefresh list'),
|
||||
]
|
||||
).'</a>
|
||||
<br><br>
|
||||
<a href="javascript:">'.html_print_image('images/darrowleft.png', true, ['id' => 'left_autorefreshlist', 'alt' => __('Pop selected pages out of autorefresh list'), 'title' => __('Pop selected pages out of autorefresh list')]).'</a>
|
||||
<a href="javascript:">'.html_print_image(
|
||||
'images/darrowleft.png',
|
||||
true,
|
||||
[
|
||||
'id' => 'left_autorefreshlist',
|
||||
'alt' => __('Pop selected pages out of autorefresh list'),
|
||||
'title' => __('Pop selected pages out of autorefresh list'),
|
||||
]
|
||||
).'</a>
|
||||
</td>
|
||||
<td>'.$select_in.'</td>
|
||||
</tr>
|
||||
</table>';
|
||||
$data[0] .= $table_ichanges;
|
||||
|
||||
// time autorefresh
|
||||
// Time autorefresh.
|
||||
$times = get_refresh_time_array();
|
||||
$data[1] = '<span style="width:40%;float:left;">'.__('Time autorefresh').ui_print_help_tip(__('Interval of autorefresh of the elements, by default they are 30 seconds, needing to enable the autorefresh first'), true).'</span>';
|
||||
$data[1] .= $jump.'<span style="width:20%;float:left;">'.html_print_select($times, 'time_autorefresh', $user_info['time_autorefresh'], '', '', '', true, false, false).'</span>';
|
||||
$data[1] = '<span style="width:40%;float:left;">'.__('Time autorefresh');
|
||||
$data[1] .= ui_print_help_tip(
|
||||
__('Interval of autorefresh of the elements, by default they are 30 seconds, needing to enable the autorefresh first'),
|
||||
true
|
||||
).'</span>';
|
||||
$data[1] .= $jump.'<span style="width:20%;float:left;">';
|
||||
$data[1] .= html_print_select(
|
||||
$times,
|
||||
'time_autorefresh',
|
||||
$user_info['time_autorefresh'],
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
false
|
||||
).'</span>';
|
||||
|
||||
$table->rowclass[] = '';
|
||||
$table->rowstyle[] = 'font-weight: bold;vertical-align: top';
|
||||
|
@ -528,7 +643,16 @@ $table->rowstyle[] = 'font-weight: bold;';
|
|||
$table->data[] = $data;
|
||||
|
||||
$data = [];
|
||||
$data[0] = '<div style="width:98%">'.html_print_textarea('comments', 2, 60, $user_info['comments'], ($view_mode ? 'readonly="readonly"' : ''), true).'</div>';
|
||||
$data[0] = '<div style="width:98%">';
|
||||
$data[0] .= html_print_textarea(
|
||||
'comments',
|
||||
2,
|
||||
60,
|
||||
$user_info['comments'],
|
||||
(($view_mode) ? 'readonly="readonly"' : ''),
|
||||
true
|
||||
);
|
||||
$data[0] .= '</div>';
|
||||
$data[0] .= html_print_input_hidden('quick_language_change', 1, true);
|
||||
$table->colspan[count($table->data)][0] = 3;
|
||||
$table->rowclass[] = '';
|
||||
|
@ -594,9 +718,15 @@ if ($result === false) {
|
|||
foreach ($result as $profile) {
|
||||
$data[0] = '<b>'.profile_get_name($profile['id_perfil']).'</b>';
|
||||
if ($config['show_group_name']) {
|
||||
$data[1] = ui_print_group_icon($profile['id_grupo'], true).'<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$profile['id_grupo'].'">'.' '.'</a>';
|
||||
$data[1] = ui_print_group_icon(
|
||||
$profile['id_grupo'],
|
||||
true
|
||||
).'<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$profile['id_grupo'].'"> </a>';
|
||||
} else {
|
||||
$data[1] = ui_print_group_icon($profile['id_grupo'], true).'<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$profile['id_grupo'].'">'.' '.ui_print_truncate_text(groups_get_name($profile['id_grupo'], true), GENERIC_SIZE_TEXT).'</a>';
|
||||
$data[1] = ui_print_group_icon(
|
||||
$profile['id_grupo'],
|
||||
true
|
||||
).'<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$profile['id_grupo'].'"> '.ui_print_truncate_text(groups_get_name($profile['id_grupo'], true), GENERIC_SIZE_TEXT).'</a>';
|
||||
}
|
||||
|
||||
$tags_ids = explode(',', $profile['tags']);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.731
|
||||
%define release 190207
|
||||
%define release 190225
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -26,7 +26,7 @@ BuildRoot: %{_tmppath}/%{name}
|
|||
BuildArch: noarch
|
||||
AutoReq: 0
|
||||
Requires: %{httpd_name} >= 2.0.0
|
||||
Requires: mod_php >= 5.2.0
|
||||
Requires: mod_php >= 7.0
|
||||
Requires: php-gd, php-ldap, php-snmp, php-session, php-gettext
|
||||
Requires: php-mysqlnd, php-mbstring, php-zip, php-zlib, php-curl
|
||||
Requires: xorg-x11-fonts-75dpi, xorg-x11-fonts-misc, php-pecl-zip
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.731
|
||||
%define release 190207
|
||||
%define release 190225
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
@ -29,7 +29,7 @@ BuildArch: noarch
|
|||
AutoReq: 0
|
||||
Requires: apache2
|
||||
Requires: apache2-mod_php7
|
||||
Requires: php >= 4.3.0
|
||||
Requires: php >= 7.0
|
||||
Requires: php-gd, php-snmp, php-json, php-gettext
|
||||
Requires: php-mysqlnd, php-ldap, php-mbstring, php
|
||||
Requires: graphviz, xorg-x11-fonts-core, graphviz-gd
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.731-190207
|
||||
Version: 7.0NG.731-190225
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue