Merge branch 'develop' into 'ent-10865-15337-15360-Macros-Custom-Fields-no-funcionan-en-modulos-SNMP'
# Conflicts: # pandora_console/extras/mr/64.sql
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.771-230517
|
||||
Version: 7.0NG.771-230524
|
||||
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.771-230517"
|
||||
pandora_version="7.0NG.771-230524"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -1023,7 +1023,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.771';
|
||||
use constant AGENT_BUILD => '230517';
|
||||
use constant AGENT_BUILD => '230524';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.771
|
||||
%define release 230517
|
||||
%define release 230524
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.771
|
||||
%define release 230517
|
||||
%define release 230524
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.771"
|
||||
PI_BUILD="230517"
|
||||
PI_BUILD="230524"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{230517}
|
||||
{230524}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.771 Build 230517")
|
||||
#define PANDORA_VERSION ("7.0NG.771 Build 230524")
|
||||
|
||||
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.771(Build 230517))"
|
||||
VALUE "ProductVersion", "(7.0NG.771(Build 230524))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.771-230517
|
||||
Version: 7.0NG.771-230524
|
||||
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.771-230517"
|
||||
pandora_version="7.0NG.771-230524"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -186,10 +186,6 @@ function pandora_realtime_graphs()
|
|||
|
||||
$table->data[] = $data;
|
||||
|
||||
if ($graph == 'snmp_interface' || $graph == 'snmp_module') {
|
||||
echo snmp_browser_print_container(true, '100%', '60%', 'none');
|
||||
}
|
||||
|
||||
// Print the relative path to AJAX calls.
|
||||
html_print_input_hidden('rel_path', get_parameter('rel_path', ''));
|
||||
|
||||
|
@ -224,7 +220,7 @@ function pandora_realtime_graphs()
|
|||
false,
|
||||
'',
|
||||
'white-box-content',
|
||||
'box-flat white_table_graph'
|
||||
'box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
|
||||
$chart[time()]['graph'] = '0';
|
||||
|
@ -266,6 +262,16 @@ function pandora_realtime_graphs()
|
|||
]
|
||||
);
|
||||
|
||||
if ($graph == 'snmp_interface' || $graph == 'snmp_module') {
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'white_box',
|
||||
'id' => 'graph_snmp_interface',
|
||||
'content' => snmp_browser_print_container(true, '100%', '60%', '', false, false),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// echo $canvas;
|
||||
// Define a custom action to save
|
||||
// the OID selected in the SNMP browser to the form.
|
||||
|
|
|
@ -453,7 +453,7 @@ function resource_exportation_extension_main()
|
|||
true
|
||||
)
|
||||
);
|
||||
$table->data[0][] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'report\');', ['mode' => 'link'], true);
|
||||
$table->data[0][] = html_print_button(__('Export'), '', false, 'export_to_ptr("report");', ['mode' => 'link'], true);
|
||||
|
||||
$table->data[1][] = html_print_label_input_block(
|
||||
__('Visual console'),
|
||||
|
@ -465,7 +465,7 @@ function resource_exportation_extension_main()
|
|||
true
|
||||
)
|
||||
);
|
||||
$table->data[1][] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'visual_console\');', ['mode' => 'link'], true);
|
||||
$table->data[1][] = html_print_button(__('Export'), '', false, 'export_to_ptr("visual_console");', ['mode' => 'link'], true);
|
||||
|
||||
if ($hook_enterprise === true) {
|
||||
add_rows_for_enterprise($table->data);
|
||||
|
|
|
@ -2,8 +2,20 @@ START TRANSACTION;
|
|||
|
||||
ALTER TABLE `tnetwork_component` ADD COLUMN `target_ip` VARCHAR(255) NOT NULL DEFAULT '';
|
||||
|
||||
UPDATE tnetwork_component
|
||||
UPDATE `tnetwork_component`
|
||||
SET module_enabled=1
|
||||
WHERE name='Cisco _nameOID_ power state';
|
||||
|
||||
COMMIT;
|
||||
ALTER TABLE `tlayout_data`
|
||||
ADD COLUMN `recursive_group` TINYINT NOT NULL DEFAULT '0' AFTER `fill_color`;
|
||||
|
||||
ALTER TABLE `tusuario`
|
||||
ADD COLUMN `metaconsole_section` VARCHAR(255) NOT NULL DEFAULT 'Default' AFTER `data_section`;
|
||||
|
||||
ALTER TABLE `tusuario`
|
||||
ADD COLUMN `metaconsole_data_section` VARCHAR(255) NOT NULL DEFAULT '' AFTER `metaconsole_section`;
|
||||
|
||||
ALTER TABLE `tusuario`
|
||||
ADD COLUMN `metaconsole_default_event_filter` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `default_event_filter`;
|
||||
|
||||
COMMIT;
|
|
@ -1546,7 +1546,11 @@ if ($update_module === true || $create_module === true) {
|
|||
}
|
||||
|
||||
// Inverse string checkbox.
|
||||
if ($id_module_type === MODULE_TYPE_GENERIC_DATA_STRING || $id_module_type === MODULE_TYPE_ASYNC_STRING) {
|
||||
if ($id_module_type === MODULE_TYPE_GENERIC_DATA_STRING
|
||||
|| $id_module_type === MODULE_TYPE_ASYNC_STRING
|
||||
|| $id_module_type === MODULE_TYPE_REMOTE_TCP_STRING
|
||||
|| $id_module_type === MODULE_TYPE_REMOTE_CMD_STRING
|
||||
) {
|
||||
// Warning inverse string checkbox.
|
||||
$warning_string_checkbox = get_parameter('warning_inverse_string');
|
||||
if (!empty($warning_string_checkbox) && $warning_string_checkbox === 'warning_inverse_string') {
|
||||
|
@ -2024,10 +2028,10 @@ if ($create_module) {
|
|||
|
||||
// MODULE ENABLE/DISABLE
|
||||
// =====================.
|
||||
if ($enable_module) {
|
||||
/*
|
||||
if ($enable_module) {
|
||||
$result = modules_change_disabled($enable_module, 0);
|
||||
$module_name = modules_get_agentmodule_name($enable_module);
|
||||
|
||||
// Write for conf disable if remote_config.
|
||||
$configuration_data = enterprise_hook(
|
||||
'config_agents_get_module_from_conf',
|
||||
|
@ -2041,10 +2045,8 @@ if ($enable_module) {
|
|||
|
||||
// Force Update when disabled for save disabled in conf.
|
||||
$old_configuration_data = $configuration_data;
|
||||
|
||||
// Successfull action.
|
||||
$success_action = $result;
|
||||
|
||||
$success_action = $result;
|
||||
if ($result === NOERR) {
|
||||
db_pandora_audit(
|
||||
|
@ -2057,9 +2059,11 @@ if ($enable_module) {
|
|||
'Fail to enable #'.$enable_module.' | '.$module_name.' | '.io_safe_output($agent['alias'])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($disable_module) {
|
||||
if ($disable_module) {
|
||||
|
||||
hd($disable_module, true);
|
||||
$result = modules_change_disabled($disable_module, 1);
|
||||
$module_name = modules_get_agentmodule_name($disable_module);
|
||||
|
||||
|
@ -2083,18 +2087,20 @@ if ($disable_module) {
|
|||
|
||||
|
||||
if ($result === NOERR) {
|
||||
hd($disable_module, true);
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_MODULE_MANAGEMENT,
|
||||
'Disable #'.$disable_module.' | '.$module_name.' | '.io_safe_output($agent['alias'])
|
||||
);
|
||||
} else {
|
||||
hd($disable_module, true);
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_MODULE_MANAGEMENT,
|
||||
'Fail to disable #'.$disable_module.' | '.$module_name.' | '.io_safe_output($agent['alias'])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
// Fix to stop the module from being added to the agent's conf
|
||||
// when an error occurred while updating or inserting. or enable disable module.
|
||||
if ($update_module || $create_module
|
||||
|
@ -2521,10 +2527,10 @@ switch ($tab) {
|
|||
});
|
||||
|
||||
// Change description when edit port
|
||||
$( "#text-tcp_port" ).change(function() {
|
||||
/*$( "#text-tcp_port" ).change(function() {
|
||||
$( "#textarea_description" ).text(`Checks port ${$( "#text-tcp_port" ).val()} is opened`);
|
||||
});
|
||||
|
||||
});*/
|
||||
|
||||
// Set the position and width of the subtab
|
||||
/*
|
||||
function agent_wizard_tab_setup() {
|
||||
|
|
|
@ -840,8 +840,8 @@ if ($modules !== false) {
|
|||
$linked = policies_is_module_linked($module['id_agente_modulo']);
|
||||
$adopt = policies_is_module_adopt($module['id_agente_modulo']);
|
||||
|
||||
if ($linked !== false) {
|
||||
if ($adopt === true) {
|
||||
if ((bool) $linked !== false) {
|
||||
if ((bool) $adopt === true) {
|
||||
$img = 'images/policies_brick.png';
|
||||
$title = '('.__('Adopted').') '.$policyInfo['name_policy'];
|
||||
} else {
|
||||
|
@ -849,7 +849,7 @@ if ($modules !== false) {
|
|||
$title = $policyInfo['name_policy'];
|
||||
}
|
||||
} else {
|
||||
if ($adopt === true) {
|
||||
if ((bool) $adopt === true) {
|
||||
$img = 'images/policies_not_brick.png';
|
||||
$title = '('.__('Unlinked').') ('.__('Adopted').') '.$policyInfo['name_policy'];
|
||||
} else {
|
||||
|
@ -1009,7 +1009,7 @@ if ($modules !== false) {
|
|||
$data[8] .= html_print_menu_button(
|
||||
[
|
||||
'href' => 'index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&delete_module='.$module['id_agente_modulo'],
|
||||
'onClick' => "if (!confirm(\' '.__('Are you sure?').'\')) return false;",
|
||||
'onClick' => 'javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;',
|
||||
'image' => 'images/delete.svg',
|
||||
'title' => __('Delete'),
|
||||
],
|
||||
|
|
|
@ -509,7 +509,7 @@ $tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text(
|
|||
10,
|
||||
1024,
|
||||
true,
|
||||
$disabledBecauseInPolicy || $edit === false,
|
||||
$disabledBecauseInPolicy,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
|
@ -1049,8 +1049,8 @@ $table_advanced->data['textarea_description_instructions'][1] = html_print_texta
|
|||
|
||||
$table_advanced->rowclass['caption_textarea_crit_warn_instructions'] = 'field_half_width pdd_t_10px';
|
||||
$table_advanced->rowclass['textarea_crit_warn_instructions'] = 'field_half_width';
|
||||
$table_advanced->data['caption_textarea_crit_warn_instructions'][1] = __('Warning instructions');
|
||||
$table_advanced->data['caption_textarea_crit_warn_instructions'][0] = __('Critical instructions');
|
||||
$table_advanced->data['caption_textarea_crit_warn_instructions'][1] = __('Warning instructions');
|
||||
$table_advanced->data['textarea_crit_warn_instructions'][0] = html_print_textarea(
|
||||
'critical_instructions',
|
||||
5,
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
global $config;
|
||||
require_once $config['homedir'].'/include/class/CredentialStore.class.php';
|
||||
require_once $config['homedir'].'/operation/snmpconsole/snmp_browser.php';
|
||||
require_once $config['homedir'].'/include/functions_snmp_browser.php';
|
||||
$snmp_browser_path = (is_metaconsole() === true) ? '../../' : '';
|
||||
$snmp_browser_path .= 'include/javascript/pandora_snmp_browser.js';
|
||||
|
@ -310,7 +311,7 @@ $data[2] .= html_print_button(
|
|||
__('SNMP Walk'),
|
||||
'snmp_walk',
|
||||
false,
|
||||
'snmpBrowserWindow()',
|
||||
'snmpBrowserWindow('.$id_agente.')',
|
||||
[ 'mode' => 'link' ],
|
||||
true
|
||||
);
|
||||
|
|
|
@ -153,18 +153,24 @@ foreach ($password_fields as $k => $p) {
|
|||
?>
|
||||
<script type="text/javascript">
|
||||
function changePluginSelect() {
|
||||
if (flag_load_plugin_component) {
|
||||
if (typeof flag_load_plugin_component !== 'undefined' && flag_load_plugin_component) {
|
||||
flag_load_plugin_component = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const moduleId = <?php echo $id_agent_module; ?>;
|
||||
|
||||
load_plugin_description($("#id_plugin").val());
|
||||
|
||||
load_plugin_macros_fields('simple-macro');
|
||||
load_plugin_macros_fields('simple-macro', moduleId);
|
||||
|
||||
forced_title_callback();
|
||||
|
||||
$('select#id_plugin').select2('close');
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
changePluginSelect();
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -193,7 +193,7 @@ $actionButtons .= html_print_button(
|
|||
__('Debug'),
|
||||
'btn_debugModule',
|
||||
$disableDebug,
|
||||
'loadDebugWindow()',
|
||||
'',
|
||||
[
|
||||
'icon' => 'cog',
|
||||
'mode' => 'mini secondary ',
|
||||
|
|
|
@ -1430,10 +1430,10 @@ ui_print_spinner('Loading');
|
|||
$table = new stdClass();
|
||||
$table->id = 'editor';
|
||||
$table->width = '100%';
|
||||
$table->colspan['module'][1] = '5';
|
||||
$table->colspan['module'][1] = '6';
|
||||
$table->data = [];
|
||||
$table->data['module'] = [];
|
||||
$table->data['module'][0] = '';
|
||||
// $table->data['module'][0] = '';
|
||||
$table->data['module'][1] = '<h4>'.__('Modules').'</h4>';
|
||||
|
||||
// List of modules, empty, it is populated by javascript.
|
||||
|
@ -1457,7 +1457,7 @@ $table->data['module'][1] = "
|
|||
[
|
||||
'border' => '0',
|
||||
'alt' => __('Delete'),
|
||||
'class' => 'invert_filter',
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>'."</td>
|
||||
</tr>
|
||||
|
@ -1779,7 +1779,6 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||
//Avoid freak states.
|
||||
if (action_in_progress)
|
||||
return;
|
||||
|
||||
//Check if the row editor module exists
|
||||
if ($('#loading_' + id_agent).length > 0) {
|
||||
//The row exists
|
||||
|
@ -1789,7 +1788,6 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||
if ($('#module_editor_' + id_agent).length == 0) {
|
||||
$("#list-agent_" + id_agent).after(
|
||||
$("#loading-loading").clone().attr('id', 'loading_' + id_agent));
|
||||
|
||||
jQuery.post ('ajax.php',
|
||||
{"page": "include/ajax/planned_downtime.ajax",
|
||||
"get_modules_downtime": 1,
|
||||
|
@ -1799,15 +1797,15 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||
function (data) {
|
||||
if (data['correct']) {
|
||||
//Check if the row editor module exists
|
||||
if ($('#loading_' + id_agent).length > 0) {
|
||||
if ($('#list-agent_' + id_agent).length > 0) {
|
||||
//The row exists
|
||||
$('#loading_' + id_agent).remove();
|
||||
|
||||
//$('#loading_' + id_agent).remove();
|
||||
|
||||
$("#list-agent_" + id_agent).after(
|
||||
$("#editor-module").clone()
|
||||
.attr('id', 'module_editor_' + id_agent)
|
||||
.hide());
|
||||
|
||||
|
||||
fill_row_editor(id_agent, data);
|
||||
}
|
||||
}
|
||||
|
@ -2039,7 +2037,7 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
|
|||
var datetime_from = <?php echo json_encode(strtotime($once_date_from.' '.$once_time_from)); ?>;
|
||||
var datetime_now = <?php echo json_encode($utimestamp); ?>;
|
||||
var create = <?php echo json_encode($create); ?>;
|
||||
if (!create && (type_execution == 'periodically' || (type_execution == 'once' && datetime_from < datetime_now))) {
|
||||
if (!create && (type_execution == 'periodically' && (type_execution == 'once' && datetime_from < datetime_now))) {
|
||||
$("input#submit-updbutton, input#submit-add_item, table#list a").click(function (e) {
|
||||
if (!confirm("<?php echo __('WARNING: If you edit this scheduled downtime, the data of future SLA reports may be altered'); ?>")) {
|
||||
e.preventDefault();
|
||||
|
|
|
@ -133,7 +133,7 @@ if (is_ajax()) {
|
|||
}
|
||||
}
|
||||
|
||||
$style = ((int) $field_hidden === 1) ? '-webkit-text-security: disc;' : '';
|
||||
$style = ((int) $field_hidden === 1) ? '-webkit-text-security: disc; font-family: text-security-disc;' : '';
|
||||
|
||||
if (!empty($field_value)) {
|
||||
$field_value = io_safe_output($field_value);
|
||||
|
|
|
@ -1032,7 +1032,7 @@ foreach ($simple_alerts as $alert) {
|
|||
|
||||
$data[4] .= html_print_input_image(
|
||||
'update',
|
||||
'images/builder.png',
|
||||
'images/builder@svg.svg',
|
||||
1,
|
||||
'',
|
||||
true,
|
||||
|
|
|
@ -369,7 +369,7 @@ for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
|
|||
$selected,
|
||||
!$is_management_allowed,
|
||||
'cursor: \'pointer\'',
|
||||
'class="hide_inputs"',
|
||||
['input_class' => 'hide_inputs'],
|
||||
true
|
||||
)
|
||||
);
|
||||
|
@ -413,16 +413,16 @@ $(document).ready (function () {
|
|||
$(".hide_inputs").each(function(index) {
|
||||
var $input_in_row = $(this).closest('tr').find('.field_value');
|
||||
if($(this).is(':checked')) {
|
||||
$input_in_row.prop('style', '-webkit-text-security: disc;');
|
||||
$input_in_row.prop('style', '-webkit-text-security: disc; font-family: text-security-disc;');
|
||||
} else {
|
||||
$input_in_row.prop('style', '');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(".hide_inputs").click(function() {
|
||||
var $input_in_row = $(this).closest('tr').find('.field_value');
|
||||
if($(this).is(':checked')) {
|
||||
$input_in_row.prop('style', '-webkit-text-security: disc;');
|
||||
$input_in_row.prop('style', '-webkit-text-security: disc; font-family: text-security-disc;');
|
||||
} else {
|
||||
$input_in_row.prop('style', '');
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ if ($delete_item) {
|
|||
$buttons['graph_container'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image(
|
||||
'images/graph-container.png',
|
||||
'images/graph-container@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Graph container'),
|
||||
|
|
|
@ -309,7 +309,7 @@ if ($edit_graph === true) {
|
|||
'graph_editor' => [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id='.$id_graph.'">'.html_print_image(
|
||||
'images/builder.png',
|
||||
'images/builder@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Graph editor'),
|
||||
|
|
|
@ -95,7 +95,7 @@ $subsection = reporting_enterprise_add_graph_template_subsection('', $buttons);
|
|||
$buttons['graph_container'] = [
|
||||
'active' => true,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image(
|
||||
'images/graph-container.png',
|
||||
'images/graph-container.svg@svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Graph container'),
|
||||
|
|
|
@ -100,7 +100,7 @@ if ($enterpriseEnable) {
|
|||
$buttons['graph_container'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container">'.html_print_image(
|
||||
'images/graph-container.png',
|
||||
'images/graph-container@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Graphs containers'),
|
||||
|
|
|
@ -408,7 +408,6 @@ $(document).ready (function () {
|
|||
});
|
||||
|
||||
$( "button[type=submit]" ).click(function( event ) {
|
||||
console.log('aaaaaaaaaaa');
|
||||
if (parseInt($('input[name=width]').val()) < 1024){
|
||||
alert('Default width is '+$('input[name=width]').val()+'px, smaller than minimum -> 1024px');
|
||||
$('input[name=width]').val('1024');
|
||||
|
|
|
@ -202,15 +202,6 @@ function visual_map_main() {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
//Resize the view to adapt the screen size.
|
||||
if ($("#main").length) {
|
||||
//Console
|
||||
$("#frame_view").height($("#main").height() - 75);
|
||||
} else {
|
||||
//Metaconsole
|
||||
$("#frame_view").height($("#page").height() - 75);
|
||||
}
|
||||
}
|
||||
|
||||
function cancel_button_palette_callback() {
|
||||
|
@ -2426,10 +2417,10 @@ function loadFieldsFromDB(item) {
|
|||
});
|
||||
}
|
||||
|
||||
function setAspectRatioBackground(side) {
|
||||
function setAspectRatioBackground(side, id) {
|
||||
toggle_item_palette();
|
||||
|
||||
parameter = Array();
|
||||
var parameter = Array();
|
||||
parameter.push({
|
||||
name: "page",
|
||||
value: "include/ajax/visual_console_builder.ajax"
|
||||
|
@ -2440,18 +2431,20 @@ function setAspectRatioBackground(side) {
|
|||
value: $("#background_img").attr("src")
|
||||
});
|
||||
|
||||
parameter.push({ name: "id_visual_console", value: id });
|
||||
|
||||
jQuery.ajax({
|
||||
url: "ajax.php",
|
||||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
old_width = parseInt(
|
||||
var old_width = parseInt(
|
||||
$("#background")
|
||||
.css("width")
|
||||
.replace("px", "")
|
||||
);
|
||||
old_height = parseInt(
|
||||
var old_height = parseInt(
|
||||
$("#background")
|
||||
.css("height")
|
||||
.replace("px", "")
|
||||
|
@ -2464,8 +2457,12 @@ function setAspectRatioBackground(side) {
|
|||
old_height = 768;
|
||||
}
|
||||
|
||||
img_width = data[0];
|
||||
img_height = data[1];
|
||||
var img_width = data[0];
|
||||
var img_height = data[1];
|
||||
|
||||
var ratio = 0;
|
||||
var height = 0;
|
||||
var width = 0;
|
||||
|
||||
if (side == "width") {
|
||||
ratio = old_width / img_width;
|
||||
|
@ -5821,14 +5818,14 @@ function deleteDB(idElement) {
|
|||
}
|
||||
|
||||
function activeToolboxButton(id, active) {
|
||||
if ($("input." + id + "[name=button_toolbox2]").length == 0) {
|
||||
if ($("button." + id + "[name=" + id + "]").length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (active) {
|
||||
$("input." + id + "[name=button_toolbox2]").removeAttr("disabled");
|
||||
$("button." + id + "[name=" + id + "]").removeAttr("disabled");
|
||||
} else {
|
||||
$("input." + id + "[name=button_toolbox2]").attr("disabled", true);
|
||||
$("button." + id + "[name=" + id + "]").attr("disabled", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6446,9 +6443,9 @@ function eventsBackground() {
|
|||
|
||||
function move_elements_resize(original_width, original_height, width, height) {
|
||||
jQuery.each($(".item"), function(key, value) {
|
||||
item = value;
|
||||
var item = value;
|
||||
idItem = $(item).attr("id");
|
||||
classItem = $(item)
|
||||
var classItem = $(item)
|
||||
.attr("class")
|
||||
.replace("item", "")
|
||||
.replace("ui-draggable", "")
|
||||
|
@ -6456,22 +6453,22 @@ function move_elements_resize(original_width, original_height, width, height) {
|
|||
.replace(/^\s+/g, "")
|
||||
.replace(/\s+$/g, "");
|
||||
|
||||
old_height = parseInt(
|
||||
var old_height = parseInt(
|
||||
$(item)
|
||||
.css("top")
|
||||
.replace("px", "")
|
||||
);
|
||||
old_width = parseInt(
|
||||
var old_width = parseInt(
|
||||
$(item)
|
||||
.css("left")
|
||||
.replace("px", "")
|
||||
);
|
||||
|
||||
ratio_width = width / original_width;
|
||||
ratio_height = height / original_height;
|
||||
var ratio_width = width / original_width;
|
||||
var ratio_height = height / original_height;
|
||||
|
||||
new_height = old_height * ratio_height;
|
||||
new_width = old_width * ratio_width;
|
||||
var new_height = old_height * ratio_height;
|
||||
var new_width = old_width * ratio_width;
|
||||
|
||||
var values = {};
|
||||
|
||||
|
|
|
@ -92,14 +92,14 @@ html_print_input_hidden('metaconsole', (is_metaconsole() === true) ? 1 : 0);
|
|||
visual_map_editor_print_hack_translate_strings();
|
||||
visual_map_editor_print_item_palette($visualConsole['id'], $background);
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
if (is_metaconsole() === true) {
|
||||
echo '<div id="frame_view" class="frame_view_meta">';
|
||||
} else {
|
||||
echo '<div id="frame_view" class="frame_view_node mrgn_top_meta_35px">';
|
||||
echo '<div id="frame_view" class="frame_view_node">';
|
||||
}
|
||||
|
||||
echo '<div id="background" class="" style="top:0px;
|
||||
margin: 0px auto;border: 1px lightgray solid; width: '.$widthBackground.'px; height: '.$heightBackground.'px;background-color: '.$visualConsole['background_color'].';">';
|
||||
margin: 0px auto;border: 1px lightgray solid; width: '.$widthBackground.'px; height: '.$heightBackground.'px;background-color: '.$visualConsole['background_color'].';z-index:0;">';
|
||||
echo "<div id='background_grid'
|
||||
style='position: absolute; display: none; overflow: hidden;
|
||||
background: url(".ui_get_full_url('images/console/background/white_boxed.jpg', false, false, false).');
|
||||
|
|
|
@ -833,7 +833,7 @@ $buttons['wizard'] = [
|
|||
if ($config['legacy_vc']) {
|
||||
$buttons['editor'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="'.$url_base.$action.'&tab=editor&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/builder.png', true, ['title' => __('Builder'), 'class' => 'invert_filter']).'</a>',
|
||||
'text' => '<a href="'.$url_base.$action.'&tab=editor&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/builder@svg.svg', true, ['title' => __('Builder'), 'class' => 'invert_filter']).'</a>',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -167,19 +167,22 @@ foreach ($servers as $server) {
|
|||
break;
|
||||
}
|
||||
|
||||
$data[6] = $server['threads'].' : '.$server['queued_modules'];
|
||||
$data[6] = '';
|
||||
if ($server['queued_modules'] > 500) {
|
||||
$data[6] .= ' <div class="inline"><a onclick="show_dialog();" >'.html_print_image(
|
||||
$data[6] .= '<div class="inline"><a onclick="show_dialog();" >'.html_print_image(
|
||||
'images/info-warning.svg',
|
||||
true,
|
||||
[
|
||||
'width' => 16,
|
||||
'heght' => 16,
|
||||
'class' => 'pulsate clickable',
|
||||
'style' => 'margin-left: -25px;',
|
||||
]
|
||||
).'</a></div>';
|
||||
).'</a></div> ';
|
||||
}
|
||||
|
||||
$data[6] .= $server['threads'].' : '.$server['queued_modules'];
|
||||
|
||||
$data[7] = ui_print_timestamp($server['keepalive'], true);
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ global $config;
|
|||
|
||||
check_login();
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true && is_user_admin($config['id_user']) === false) {
|
||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === false && is_user_admin($config['id_user']) === false) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access Setup Management'
|
||||
|
|
|
@ -70,6 +70,10 @@ html_print_input_hidden('update_config', 1);
|
|||
|
||||
$performance_variables_control = (array) json_decode(io_safe_output($config['performance_variables_control']));
|
||||
|
||||
echo "<div id='dialog-legacy-vc' title='".__('Legacy visual console Information')."' class='invisible'>";
|
||||
echo "<p class='center'>".__('Visual console in legacy mode will no longer be supported as of LTS 772').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// BEHAVIOUR CONFIGURATION
|
||||
// ----------------------------------------------------------------------
|
||||
|
@ -2243,9 +2247,22 @@ $(document).ready (function () {
|
|||
// Show the cache expiration conf or not.
|
||||
$("input[name=legacy_vc]").change(function (e) {
|
||||
if ($(this).prop("checked") === true) {
|
||||
$("select#vc_default_cache_expiration_select").closest("tr").hide();
|
||||
$("select#vc_default_cache_expiration_select").closest("td").hide();
|
||||
$("#dialog-legacy-vc").dialog({
|
||||
modal: true,
|
||||
width: 500,
|
||||
buttons:[
|
||||
{
|
||||
class: 'ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-next',
|
||||
text: "<?php echo __('OK'); ?>",
|
||||
click: function(){
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
} else {
|
||||
$("select#vc_default_cache_expiration_select").closest("tr").show();
|
||||
$("select#vc_default_cache_expiration_select").closest("td").show();
|
||||
}
|
||||
}).change();
|
||||
|
||||
|
|
|
@ -69,6 +69,11 @@ $homeScreenValues = [
|
|||
// This defines the working user. Beware with this, old code get confusses
|
||||
// and operates with current logged user (dangerous).
|
||||
$id = get_parameter('id', get_parameter('id_user', ''));
|
||||
|
||||
if (empty($id) === true) {
|
||||
$id = $config['id_user'];
|
||||
}
|
||||
|
||||
// Check if we are the same user for edit or we have a proper profile for edit users.
|
||||
if ($id !== $config['id_user']) {
|
||||
if ((bool) check_acl($config['id_user'], 0, 'UM') === false) {
|
||||
|
@ -85,6 +90,13 @@ if ($id !== $config['id_user']) {
|
|||
// ID given as parameter.
|
||||
$pure = get_parameter('pure', 0);
|
||||
$user_info = get_user_info($id);
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
$user_info['section'] = $user_info['metaconsole_section'];
|
||||
$user_info['data_section'] = $user_info['metaconsole_data_section'];
|
||||
$user_info['default_event_filter'] = $user_info['metaconsole_default_event_filter'];
|
||||
}
|
||||
|
||||
$is_err = false;
|
||||
|
||||
if (is_ajax() === true) {
|
||||
|
@ -677,6 +689,10 @@ if ($update_user) {
|
|||
]
|
||||
);
|
||||
$res3 = save_pass_history($id, $password_new);
|
||||
|
||||
// Generate new API token.
|
||||
$newToken = api_token_generate();
|
||||
$res4 = update_user($id, ['api_token' => $newToken]);
|
||||
}
|
||||
|
||||
ui_print_result_message(
|
||||
|
@ -701,6 +717,10 @@ if ($update_user) {
|
|||
'utimestamp' => time(),
|
||||
]
|
||||
);
|
||||
|
||||
// Generate new API token.
|
||||
$newToken = api_token_generate();
|
||||
$res4 = update_user($id, ['api_token' => $newToken]);
|
||||
}
|
||||
|
||||
ui_print_result_message(
|
||||
|
@ -1453,6 +1473,10 @@ foreach ($event_filter_data as $filter) {
|
|||
$event_filter[$filter['id_filter']] = $filter['id_name'];
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true && empty($user_info['metaconsole_default_event_filter']) !== true) {
|
||||
$user_info['default_event_filter'] = $user_info['metaconsole_default_event_filter'];
|
||||
}
|
||||
|
||||
$default_event_filter = '<div class="label_select"><p class="edit_user_labels">'.__('Default event filter').'</p>';
|
||||
$default_event_filter .= html_print_select(
|
||||
$event_filter,
|
||||
|
|
|
@ -413,10 +413,11 @@ if ($delete_user === true) {
|
|||
);
|
||||
} else if ($disable_user !== false) {
|
||||
// CSRF Validator.
|
||||
if (html_print_csrf_error()) {
|
||||
/*
|
||||
if (html_print_csrf_error()) {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
// Disable_user.
|
||||
$id_user = get_parameter('id', 0);
|
||||
|
||||
|
|
|
@ -272,7 +272,7 @@ $passwordManageTable->data['fields_newpassword'][0] = html_print_input_text_exte
|
|||
'password_new',
|
||||
'',
|
||||
'25',
|
||||
'45',
|
||||
'150',
|
||||
$view_mode,
|
||||
'',
|
||||
[
|
||||
|
@ -291,7 +291,7 @@ $passwordManageTable->data['fields_repeatpassword'][0] = html_print_input_text_e
|
|||
'password_conf',
|
||||
'',
|
||||
'20',
|
||||
'45',
|
||||
'150',
|
||||
$view_mode,
|
||||
'',
|
||||
[
|
||||
|
@ -311,7 +311,7 @@ if ($new_user === false) {
|
|||
'own_password_confirm',
|
||||
'',
|
||||
'20',
|
||||
'45',
|
||||
'150',
|
||||
$view_mode,
|
||||
'',
|
||||
[
|
||||
|
@ -596,11 +596,15 @@ $userManagementTable->data['fields_blocksize_eventfilter'][0] = html_print_input
|
|||
true
|
||||
);
|
||||
|
||||
if (is_metaconsole() === true && empty($user_info['metaconsole_default_event_filter']) !== true) {
|
||||
$user_info['default_event_filter'] = $user_info['metaconsole_default_event_filter'];
|
||||
}
|
||||
|
||||
$userManagementTable->data['captions_blocksize_eventfilter'][1] = __('Event filter');
|
||||
$userManagementTable->data['fields_blocksize_eventfilter'][1] = html_print_select(
|
||||
$event_filter,
|
||||
'default_event_filter',
|
||||
($user_info['default_event_filter'] ?? 0),
|
||||
[$user_info['default_event_filter']],
|
||||
'',
|
||||
'',
|
||||
__('None'),
|
||||
|
@ -617,6 +621,11 @@ $homeScreenTable->style = [];
|
|||
$homeScreenTable->rowclass = [];
|
||||
$homeScreenTable->data = [];
|
||||
// Home screen.
|
||||
if (is_metaconsole() === true && empty($user_info['metaconsole_data_section']) !== true) {
|
||||
$user_info['data_section'] = $user_info['metaconsole_data_section'];
|
||||
$user_info['section'] = $user_info['metaconsole_section'];
|
||||
}
|
||||
|
||||
$homeScreenTable->data['captions_homescreen'][0] = __('Home screen');
|
||||
$homeScreenTable->colspan['captions_homescreen'][0] = 2;
|
||||
$homeScreenTable->rowclass['captions_homescreen'] = 'field_half_width';
|
||||
|
@ -643,6 +652,17 @@ $homeScreenTable->data['fields_homescreen'][1] = html_print_div(
|
|||
$userManagementTable->rowclass['homescreen_table'] = 'w100p';
|
||||
$userManagementTable->data['homescreen_table'] = html_print_table($homeScreenTable, true);
|
||||
|
||||
$homeScreenTable->data['fields_homescreen'][1] = html_print_div(
|
||||
[
|
||||
'class' => 'w100p',
|
||||
'content' => $customHomeScreenDataField,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$userManagementTable->rowclass['homescreen_table'] = 'w100p';
|
||||
$userManagementTable->data['homescreen_table'] = html_print_table($homeScreenTable, true);
|
||||
|
||||
|
||||
if (is_metaconsole() === true && users_is_admin() === true) {
|
||||
$userManagementTable->rowclass['search_custom1_looknfeel'] = 'field_half_width';
|
||||
|
|
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 518 B |
After Width: | Height: | Size: 963 B |
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
|
||||
<title>Dark/20/builder@svg</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Dark/20/builder" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<path d="M11.2000009,9 C11.6418287,9 12.0000009,9.24624341 12.0000009,9.55 L12.0000009,18.625 C12.0000009,19.3444236 11.1963458,19.9348008 10.1725686,19.9949529 L10.0000009,20 C8.89543137,20 8.00000089,19.3843915 8.00000089,18.625 L8.00000089,9.55 C8.00000089,9.24624341 8.35817313,9 8.80000089,9 L11.2000009,9 Z M4.26666773,0 C4.58021643,0.000327502857 4.83365862,0.256429891 4.83333415,0.572021011 L4.83273845,1.1514049 C4.83209502,1.77722291 5.33889914,2.28507025 5.96471715,2.28571369 L5.9658822,2.28571429 C5.97463278,1.028388 6.98240281,0.00602907429 8.2306519,0 L17.2749359,0 C18.227663,0 19.0000009,0.778828069 19.0000009,1.73956118 L19.0000009,2.90444994 C19.0000009,3.21877749 18.7482417,3.47408731 18.4365385,3.47586469 C16.7044902,3.48574131 15.4517873,3.68716343 14.6784298,4.08013103 C13.8970625,4.47716869 13.4597945,5.60295629 13.3666256,7.45749383 C13.3513448,7.76145183 13.1024969,8 12.8006847,8 L8.89562156,8 C7.8879903,8 7.52254304,7.89465034 7.15382124,7.6965828 C6.78509944,7.49851526 6.49535873,7.20772989 6.29718553,6.8368584 C6.1461106,6.55412903 6.04847891,6.27306171 6.00847638,5.70526629 C5.95356666,5.71123749 5.88644204,5.71428571 5.80077411,5.71428571 C5.26339018,5.71428571 4.82759963,6.14962846 4.82704715,6.68701211 L4.82644971,7.2681156 C4.82618797,7.52268394 4.79983225,7.61497223 4.75041109,7.70800617 C4.70098993,7.80104006 4.62852471,7.87403851 4.53621487,7.92377851 C4.44390504,7.97351851 4.35235851,8 4.09991144,8 L2.72643507,8 C2.47383808,8 2.38224031,7.9734784 2.28989463,7.92367634 C2.19754894,7.87387434 2.12507551,7.80079189 2.0756885,7.70767023 C2.02630148,7.61454851 2.00000089,7.52218103 2.00000089,7.26746137 L2.00000089,0.732538629 C2.00000089,0.477818989 2.02630148,0.385451491 2.0756885,0.2923298 C2.12507551,0.199208109 2.19754894,0.126125657 2.28989463,0.0763236286 C2.38224031,0.0265216057 2.47383808,0 2.72643507,0 L4.26666773,0 Z" id="Shape" fill="#3F3F3F"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 623 B |
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Icons/Dark/20/graph container@svg</title>
|
||||
<g id="Icons/Dark/20/graph-container" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g id="Group" transform="translate(2.000000, 2.000000)" stroke="#3F3F3F" stroke-width="2">
|
||||
<g id="Group-2">
|
||||
<polyline id="Path-4" points="0 0 0 16 16 16"></polyline>
|
||||
<g id="Group-3" transform="translate(2.941811, 0.000000)">
|
||||
<polyline id="Path" points="0 9.999897 4.0553112 5.0332489 7.05959702 7.04601669 13.0581894 -1.44328993e-15"></polyline>
|
||||
<polyline id="Path-2" points="13.0581894 4 13.0581894 0 9.05818939 0"></polyline>
|
||||
</g>
|
||||
</g>
|
||||
<line x1="7.03043747" y1="16" x2="7.03043747" y2="13.0441227" id="Path-75"></line>
|
||||
<line x1="3.03043747" y1="16" x2="3.03043747" y2="13.0441227" id="Path-75-Copy"></line>
|
||||
<line x1="11.0304375" y1="16" x2="11.0304375" y2="13.0441227" id="Path-75-Copy-2"></line>
|
||||
<line x1="15.0304375" y1="16" x2="15.0304375" y2="13.0441227" id="Path-75-Copy-3"></line>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -38,6 +38,7 @@ if (check_login()) {
|
|||
enterprise_include_once('include/functions_metaconsole.php');
|
||||
|
||||
$get_plugin_macros = get_parameter('get_plugin_macros');
|
||||
$get_module_macros = get_parameter('get_module_macros');
|
||||
$search_modules = get_parameter('search_modules');
|
||||
$get_module_detail = get_parameter('get_module_detail', 0);
|
||||
$get_module_autocomplete_input = (bool) get_parameter(
|
||||
|
@ -118,6 +119,28 @@ if (check_login()) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ($get_module_macros && $get_module_macros > 0) {
|
||||
if (https_is_running()) {
|
||||
header('Content-type: application/json');
|
||||
}
|
||||
|
||||
$module_id = $get_module_macros;
|
||||
|
||||
$module_macros = db_get_value(
|
||||
'macros',
|
||||
'tagente_modulo',
|
||||
'id_agente_modulo',
|
||||
$module_id
|
||||
);
|
||||
|
||||
$macros = [];
|
||||
$macros['base64'] = base64_encode($module_macros);
|
||||
$macros['array'] = json_decode($module_macros, true);
|
||||
|
||||
echo json_encode($macros);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($search_modules) {
|
||||
if (https_is_running()) {
|
||||
header('Content-type: application/json');
|
||||
|
@ -1058,8 +1081,8 @@ if (check_login()) {
|
|||
$policyInfo = policies_info_module_policy($module['id_policy_module']);
|
||||
$adopt = policies_is_module_adopt($module['id_agente_modulo']);
|
||||
|
||||
if ($linked === true) {
|
||||
if ($adopt === true) {
|
||||
if ((bool) $linked === true) {
|
||||
if ((bool) $adopt === true) {
|
||||
$img = 'images/policies_brick.png';
|
||||
$title = '('.__('Adopted').') '.$name_policy;
|
||||
} else {
|
||||
|
@ -1067,7 +1090,7 @@ if (check_login()) {
|
|||
$title = $name_policy;
|
||||
}
|
||||
} else {
|
||||
if ($adopt === true) {
|
||||
if ((bool) $adopt === true) {
|
||||
$img = 'images/policies_not_brick.png';
|
||||
$title = '('.__('Unlinked').') ('.__('Adopted').') '.$name_policy;
|
||||
} else {
|
||||
|
@ -1159,7 +1182,6 @@ if (check_login()) {
|
|||
$last_status_change_text = __('Time elapsed since last status change: ');
|
||||
$last_status_change_text .= (empty($module['last_status_change']) === false) ? human_time_comparation($module['last_status_change']) : __('N/A');
|
||||
|
||||
$data[4] .= ui_print_status_image($status, htmlspecialchars($title), true, false, false, true, $last_status_change_text);
|
||||
if ($show_context_help_first_time === false) {
|
||||
$show_context_help_first_time = true;
|
||||
|
||||
|
@ -1168,6 +1190,8 @@ if (check_login()) {
|
|||
}
|
||||
}
|
||||
|
||||
$data[4] .= ui_print_status_image($status, htmlspecialchars($title), true, false, false, true, $last_status_change_text);
|
||||
|
||||
// Module thresholds.
|
||||
$data[5] = '';
|
||||
if ((int) $module['id_tipo_modulo'] !== 25) {
|
||||
|
|
|
@ -34,7 +34,7 @@ if ($get_image_path_status) {
|
|||
$id_visual_console = get_parameter('id_visual_console', null);
|
||||
|
||||
// WARNING: CHECK THE ENTIRE FUNCTIONALITY
|
||||
// Visual console id required
|
||||
// Visual console id required.
|
||||
if (empty($id_visual_console)) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
|
@ -1774,7 +1774,7 @@ switch ($action) {
|
|||
break;
|
||||
}
|
||||
|
||||
// visual map element status check
|
||||
// Visual map element status check.
|
||||
if ($get_element_status) {
|
||||
$layoutData = db_get_row_filter(
|
||||
'tlayout_data',
|
||||
|
|
|
@ -801,6 +801,34 @@ function update_user(string $id_user, array $values)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (isset($values['section']) === true) {
|
||||
$homeScreenValues = [
|
||||
HOME_SCREEN_DEFAULT => __('Default'),
|
||||
HOME_SCREEN_VISUAL_CONSOLE => __('Visual console'),
|
||||
HOME_SCREEN_EVENT_LIST => __('Event list'),
|
||||
HOME_SCREEN_GROUP_VIEW => __('Group view'),
|
||||
HOME_SCREEN_TACTICAL_VIEW => __('Tactical view'),
|
||||
HOME_SCREEN_ALERT_DETAIL => __('Alert detail'),
|
||||
HOME_SCREEN_EXTERNAL_LINK => __('External link'),
|
||||
HOME_SCREEN_OTHER => __('Other'),
|
||||
HOME_SCREEN_DASHBOARD => __('Dashboard'),
|
||||
];
|
||||
|
||||
if (array_key_exists($values['section'], $homeScreenValues) === true) {
|
||||
$values['section'] = $homeScreenValues[$values['section']];
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
$values['metaconsole_section'] = $values['section'];
|
||||
$values['metaconsole_data_section'] = $values['data_section'];
|
||||
$values['metaconsole_default_event_filter'] = $values['default_event_filter'];
|
||||
unset($values['id_skin']);
|
||||
unset($values['section']);
|
||||
unset($values['data_section']);
|
||||
unset($values['default_event_filter']);
|
||||
}
|
||||
}
|
||||
|
||||
$output = db_process_sql_update('tusuario', $values, ['id_user' => $id_user]);
|
||||
|
||||
if (isset($values['is_admin']) === true && (bool) $values['is_admin'] === true) {
|
||||
|
|
|
@ -526,12 +526,14 @@ class AgentDeployWizard
|
|||
true
|
||||
);
|
||||
|
||||
$mac_installer_link = 'http://firefly.pandorafms.com/pandorafms/latest/macOS/Pandora_FMS_MacOS_agent-7.0NG.dmg';
|
||||
$mac_content_link = '<a class="green-link" style="font-size: 15px;" href="'.$mac_installer_link.'" target="_blank">'.__('Click to Download the agent').'</a>';
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'mac_installer',
|
||||
'class' => 'white_table_flex agent_details_col',
|
||||
'style' => 'margin-bottom: 20px',
|
||||
'content' => $content.$mac_warn_box,
|
||||
'content' => $content.$mac_warn_box.$mac_content_link,
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -2333,7 +2333,7 @@ class AgentWizard extends HTML
|
|||
}
|
||||
|
||||
$tmp->id_plugin($infoMacros['server_plugin']);
|
||||
$tmp->macros(json_encode($fieldsPlugin));
|
||||
$tmp->macros(io_json_mb_encode($fieldsPlugin));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2507,7 +2507,7 @@ class AgentWizard extends HTML
|
|||
}
|
||||
|
||||
$tmp->id_plugin($infoMacros['server_plugin']);
|
||||
$tmp->macros(json_encode($fieldsPlugin));
|
||||
$tmp->macros(io_json_mb_encode($fieldsPlugin));
|
||||
}
|
||||
|
||||
$tmp->ip_target(io_safe_input($this->targetIp));
|
||||
|
|
|
@ -1339,7 +1339,11 @@ class ModuleTemplates extends HTML
|
|||
function filterGroupComponents(e){
|
||||
var selectedGroup = e.target.value;
|
||||
var entireList = JSON.parse($('#hidden-group-components').val());
|
||||
var componentsToShow = entireList[selectedGroup];
|
||||
if(typeof entireList[selectedGroup] !== 'undefined'){
|
||||
var componentsToShow = entireList[selectedGroup].split(",");
|
||||
} else {
|
||||
var componentsToShow = [];
|
||||
}
|
||||
$('#add-modules-components').children().each(function(){
|
||||
var id = $(this).val();
|
||||
if (typeof componentsToShow === 'undefined' && selectedGroup != '0') {
|
||||
|
@ -1348,7 +1352,7 @@ class ModuleTemplates extends HTML
|
|||
$(this).css('display','block');
|
||||
} else {
|
||||
$(this).css('display','none');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ class WebServerModuleDebug extends Wizard
|
|||
results.setReadOnly(true);
|
||||
results.setShowPrintMargin(false);
|
||||
|
||||
$("#submit-execute_query").click(function() {
|
||||
$("#button-execute_query").click(function() {
|
||||
// Show the spinner.
|
||||
showSpinner(true);
|
||||
// Empty the results container.
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC230517';
|
||||
$build_version = 'PC230524';
|
||||
$pandora_version = 'v7.0NG.771';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -9612,6 +9612,7 @@ function api_set_new_user($id, $thrash2, $other, $thrash3)
|
|||
$values['section'] = $other['data'][11];
|
||||
$values['session_time'] = $other['data'][12];
|
||||
$values['metaconsole_access_node'] = $other['data'][13];
|
||||
$values['api_token'] = api_token_generate();
|
||||
|
||||
if (empty($password) === true) {
|
||||
returnError('Password cannot be empty.');
|
||||
|
@ -9708,6 +9709,8 @@ function api_set_update_user($id, $thrash2, $other, $thrash3)
|
|||
if (!update_user_password($id, $other['data'][4])) {
|
||||
returnError('The user could not be updated. Password info incorrect.');
|
||||
return;
|
||||
} else {
|
||||
$values['api_token'] = api_token_generate();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -296,22 +296,34 @@ function clippy_context_help($help=null)
|
|||
$code = str_replace('{clippy}', '#'.$id, $code);
|
||||
$code = str_replace('{clippy_obj}', 'intro_'.$id, $code);
|
||||
|
||||
$return = $code.'<div id="'.$id.'" class="inline"><a onclick="show_'.$id.'();" href="javascript: void(0);" >'.html_print_image(
|
||||
'images/clippy_icon.png',
|
||||
true
|
||||
).'</a></div>
|
||||
if ($help === 'module_unknow') {
|
||||
$img = html_print_image(
|
||||
'images/info-warning.svg',
|
||||
true,
|
||||
[
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
'style' => 'margin-left: -25px;',
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$img = html_print_image(
|
||||
'images/info-warning.svg',
|
||||
true,
|
||||
['class' => 'main_menu_icon invert_filter']
|
||||
);
|
||||
}
|
||||
|
||||
$return = $code.'<div id="'.$id.'" class="inline"><a onclick="show_'.$id.'();" href="javascript: void(0);" >'.$img.'</a></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
function show_'.$id.'() {
|
||||
if (intro_'.$id.'.started()) {
|
||||
started = 1;
|
||||
}
|
||||
else {
|
||||
started = 0;
|
||||
}
|
||||
|
||||
if (started == 0)
|
||||
intro_'.$id.'.start();
|
||||
confirmDialog({
|
||||
title: "'.__('You have unknown modules in this agent.').'",
|
||||
message: "'.('Unknown modules are modules which receive data normally at least in one occassion, but at this time are not receving data. Please check our troubleshoot help page to help you determine why you have unknown modules.').'",
|
||||
strOKButton: "'.__('Close').'",
|
||||
hideCancelButton: true,
|
||||
size: 675,
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
|
|
@ -2665,7 +2665,7 @@ function events_print_type_img(
|
|||
|
||||
$urlImage = ui_get_full_url(false);
|
||||
$icon = '';
|
||||
$style = 'invert_filter main_menu_icon';
|
||||
$style = 'main_menu_icon';
|
||||
|
||||
switch ($type) {
|
||||
case 'alert_recovered':
|
||||
|
@ -2702,23 +2702,28 @@ function events_print_type_img(
|
|||
break;
|
||||
|
||||
case 'system':
|
||||
$style .= ' invert_filter';
|
||||
$icon = 'images/configuration@svg.svg';
|
||||
break;
|
||||
|
||||
case 'recon_host_detected':
|
||||
$style .= ' invert_filter';
|
||||
$icon = 'images/recon.png';
|
||||
break;
|
||||
|
||||
case 'new_agent':
|
||||
$style .= ' invert_filter';
|
||||
$icon = 'images/agents@svg.svg';
|
||||
break;
|
||||
|
||||
case 'configuration_change':
|
||||
$style .= ' invert_filter';
|
||||
$icon = 'images/configuration@svg.svg';
|
||||
break;
|
||||
|
||||
case 'unknown':
|
||||
default:
|
||||
$style .= ' invert_filter';
|
||||
$icon = 'images/event.svg';
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -601,7 +601,7 @@ function filemanager_file_explorer(
|
|||
}
|
||||
}).show();
|
||||
|
||||
$("#submit-submit").on("click", copyToClipboard);
|
||||
$("#button-submit").on("click", copyToClipboard);
|
||||
}
|
||||
|
||||
function copyToClipboard() {
|
||||
|
|
|
@ -899,10 +899,15 @@ function html_print_select(
|
|||
if (is_array($selected) && in_array($value, $selected)) {
|
||||
$output .= ' selected="selected"';
|
||||
} else if (is_numeric($value) && is_numeric($selected)
|
||||
&& $value == $selected
|
||||
&& $value === $selected
|
||||
) {
|
||||
// This fixes string ($value) to int ($selected) comparisons
|
||||
$output .= ' selected="selected"';
|
||||
} else if (is_numeric($value) && is_string($selected)) {
|
||||
$str_value = strval($value);
|
||||
if ($str_value === $selected) {
|
||||
$output .= ' selected="selected"';
|
||||
}
|
||||
} else if ($value === $selected) {
|
||||
// Needs type comparison otherwise if $selected = 0 and $value = "string" this would evaluate to true
|
||||
$output .= ' selected="selected"';
|
||||
|
@ -4273,22 +4278,22 @@ function html_print_checkbox_extended(
|
|||
|
||||
if (is_array($attributes) === true) {
|
||||
$tmpAttributes = [];
|
||||
foreach ($attributes as $key => $value) {
|
||||
foreach ($attributes as $key => $val) {
|
||||
switch ($key) {
|
||||
case 'input_class':
|
||||
$inputClass .= ' '.$value;
|
||||
$inputClass .= ' '.$val;
|
||||
break;
|
||||
|
||||
case 'label_class':
|
||||
$labelClass .= ' '.$value;
|
||||
$labelClass .= ' '.$val;
|
||||
break;
|
||||
|
||||
case 'label_style':
|
||||
$labelStyle .= 'style="'.$value.'"';
|
||||
$labelStyle .= 'style="'.$val.'"';
|
||||
break;
|
||||
|
||||
default:
|
||||
$tmpAttributes[] = $key.'="'.$value.'"';
|
||||
$tmpAttributes[] = $key.'="'.$val.'"';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2831,7 +2831,7 @@ function modules_get_color_status($status, $force_module=false)
|
|||
|
||||
case STATUS_SERVER_DOWN:
|
||||
case STATUS_SERVER_DOWN_BALL:
|
||||
return '#444';
|
||||
return '#B2B2B2';
|
||||
|
||||
default:
|
||||
// Ignored.
|
||||
|
|
|
@ -1122,10 +1122,18 @@ function snmp_browser_print_container(
|
|||
|
||||
if ($toggle === false) {
|
||||
// This extra div that can be handled by jquery's dialog.
|
||||
$output .= '<div id="snmp_browser_container" style="display:none">';
|
||||
$output .= '<div id="snmp_browser_container" style="'.$display.'">';
|
||||
$output .= '<div style="text-align: left; width: '.$width.'; height: '.$height.';">';
|
||||
$output .= '<div class="w100p">';
|
||||
$output .= '<form onsubmit="snmpBrowse(); return false;">';
|
||||
$output .= html_print_input_hidden(
|
||||
'id_agent_module',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'id_agent_module'
|
||||
);
|
||||
$output .= html_print_table($table, true);
|
||||
$output .= html_print_div(
|
||||
[
|
||||
|
|
|
@ -4610,37 +4610,38 @@ function ui_toggle(
|
|||
$output .= ' var is_metaconsole = '.(int) is_metaconsole().";\n";
|
||||
$output .= ' /* <![CDATA[ */'."\n";
|
||||
$output .= " $(document).ready (function () {\n";
|
||||
$output .= ' var switch_enable = '.(int) $switch.";\n";
|
||||
$output .= " $('#checkbox-".$switch_name."').click(function() {\n";
|
||||
$output .= ' if (is_metaconsole == 0) {';
|
||||
$output .= ' if (hide_tgl_ctrl_'.$uniqid.") {\n";
|
||||
$output .= ' hide_tgl_ctrl_'.$uniqid." = 0;\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('height', 'auto');\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('position', 'relative');\n";
|
||||
$output .= " }\n";
|
||||
$output .= " else {\n";
|
||||
$output .= ' hide_tgl_ctrl_'.$uniqid." = 1;\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('height', 0);\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('position', 'absolute');\n";
|
||||
$output .= " }\n";
|
||||
$output .= " }\n";
|
||||
$output .= " });\n";
|
||||
$output .= " $('#tgl_ctrl_".$uniqid."').click(function() {\n";
|
||||
$output .= ' if (hide_tgl_ctrl_'.$uniqid.") {\n";
|
||||
$output .= ' hide_tgl_ctrl_'.$uniqid." = 0;\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('height', 'auto');\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('position', 'relative');\n";
|
||||
$output .= " $('#image_".$uniqid."').attr('style', 'rotate: ".$rotateA."');\n";
|
||||
$output .= " $('#checkbox-".$switch_name."').prop('checked', true);\n";
|
||||
$output .= $class_table;
|
||||
$output .= ' if (hide_tgl_ctrl_'.$uniqid.") {\n";
|
||||
$output .= ' hide_tgl_ctrl_'.$uniqid." = 0;\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('height', 'auto');\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('position', 'relative');\n";
|
||||
$output .= " }\n";
|
||||
$output .= " else {\n";
|
||||
$output .= ' hide_tgl_ctrl_'.$uniqid." = 1;\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('height', 0);\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('position', 'absolute');\n";
|
||||
$output .= " $('#image_".$uniqid."').attr('style', 'rotate: ".$rotateB."');\n";
|
||||
$output .= " $('#checkbox-".$switch_name."').prop('checked', false);\n";
|
||||
$output .= ' hide_tgl_ctrl_'.$uniqid." = 1;\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('height', 0);\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('position', 'absolute');\n";
|
||||
$output .= " }\n";
|
||||
$output .= " });\n";
|
||||
$output .= ' if (switch_enable === 0) {';
|
||||
$output .= " $('#tgl_ctrl_".$uniqid."').click(function() {\n";
|
||||
$output .= ' if (hide_tgl_ctrl_'.$uniqid.") {\n";
|
||||
$output .= ' hide_tgl_ctrl_'.$uniqid." = 0;\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('height', 'auto');\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('position', 'relative');\n";
|
||||
$output .= " $('#image_".$uniqid."').attr('style', 'rotate: ".$rotateA."');\n";
|
||||
$output .= " $('#checkbox-".$switch_name."').prop('checked', true);\n";
|
||||
$output .= $class_table;
|
||||
$output .= " }\n";
|
||||
$output .= " else {\n";
|
||||
$output .= ' hide_tgl_ctrl_'.$uniqid." = 1;\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('height', 0);\n";
|
||||
$output .= " $('#tgl_div_".$uniqid."').css('position', 'absolute');\n";
|
||||
$output .= " $('#image_".$uniqid."').attr('style', 'rotate: ".$rotateB."');\n";
|
||||
$output .= " $('#checkbox-".$switch_name."').prop('checked', false);\n";
|
||||
$output .= " }\n";
|
||||
$output .= " });\n";
|
||||
$output .= " }\n";
|
||||
$output .= " });\n";
|
||||
$output .= '/* ]]> */';
|
||||
$output .= '</script>';
|
||||
|
@ -7241,10 +7242,8 @@ function ui_query_result_editor($name='default')
|
|||
]
|
||||
);
|
||||
|
||||
$buttons = html_print_submit_button(__('Execute query'), 'execute_query', false, ['icon' => 'update'], true);
|
||||
html_print_action_buttons(
|
||||
$buttons
|
||||
);
|
||||
html_print_submit_button(__('Execute query'), 'execute_query', false, ['icon' => 'update']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -7970,4 +7969,4 @@ function ui_update_name_fav_element($id_element, $section, $label)
|
|||
'id_element' => $id_element,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2846,8 +2846,11 @@ function get_donut_module_data($id_module)
|
|||
|
||||
$values_to_return = [];
|
||||
foreach ($values as $val) {
|
||||
$data = explode(',', $val);
|
||||
if (empty($val) === true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$data = explode(',', $val);
|
||||
if ($data[0] === $val) {
|
||||
continue;
|
||||
}
|
||||
|
@ -3173,7 +3176,12 @@ function visual_map_get_image_status_element($layoutData, $status=false)
|
|||
|
||||
if ($layoutData['type'] == 5) {
|
||||
// ICON ELEMENT.
|
||||
$img .= '.png';
|
||||
$url = parse_url($layoutData['image']);
|
||||
if (isset($url['scheme']) === false) {
|
||||
$img .= '.png';
|
||||
} else {
|
||||
$img = $layoutData['image'];
|
||||
}
|
||||
} else {
|
||||
if ($status === false) {
|
||||
$status = visual_map_get_status_element($layoutData);
|
||||
|
@ -3564,12 +3572,13 @@ function visual_map_print_visual_map(
|
|||
}
|
||||
|
||||
echo '<div id="background_'.$id_layout.'"
|
||||
style="margin:0px auto;text-align:
|
||||
z-index: 0;
|
||||
position:relative;
|
||||
width:'.$mapWidth.'px;
|
||||
height:'.$mapHeight.'px;
|
||||
background-color:'.$layout['background_color'].';">';
|
||||
style="margin:0px auto;text-align:
|
||||
z-index: 0;
|
||||
position:relative;
|
||||
width:'.$mapWidth.'px;
|
||||
height:'.$mapHeight.'px;
|
||||
background-color:'.$layout['background_color'].';
|
||||
z-index:0;">';
|
||||
|
||||
if ($layout['background'] != 'None.png') {
|
||||
echo "<img src='".ui_get_full_url($backgroundImage, false, false, false)."' width='100%' height='100%' />";
|
||||
|
|
|
@ -130,18 +130,16 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
'datos',
|
||||
'box_item',
|
||||
];
|
||||
$form_items['border_color_row']['html'] = '<td align="left" valign="top" >'.__('Border color').'</td>'.'<td align="left" >'.html_print_input_text_extended(
|
||||
$form_items['border_color_row']['html'] = '<td align="left" valign="top" >'.__('Border color').'</td>';
|
||||
$form_items['border_color_row']['html'] .= '<td align="left" >';
|
||||
$form_items['border_color_row']['html'] .= html_print_input_color(
|
||||
'border_color',
|
||||
'#000000',
|
||||
'text-border_color',
|
||||
'',
|
||||
7,
|
||||
7,
|
||||
false,
|
||||
'',
|
||||
'class="border_color"',
|
||||
true
|
||||
).'</td>';
|
||||
);
|
||||
$form_items['border_color_row']['html'] .= '</td>';
|
||||
|
||||
$form_items['border_width_row'] = [];
|
||||
$form_items['border_width_row']['items'] = [
|
||||
|
@ -157,18 +155,16 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
'box_item',
|
||||
'clock',
|
||||
];
|
||||
$form_items['fill_color_row']['html'] = '<td align="left" valign="top" >'.__('Fill color').'</td>'.'<td align="left" >'.html_print_input_text_extended(
|
||||
$form_items['fill_color_row']['html'] = '<td align="left" valign="top" >'.__('Fill color').'</td>';
|
||||
$form_items['fill_color_row']['html'] .= '<td align="left" >';
|
||||
$form_items['fill_color_row']['html'] .= html_print_input_color(
|
||||
'fill_color',
|
||||
'#000000',
|
||||
'text-fill_color',
|
||||
'',
|
||||
7,
|
||||
7,
|
||||
false,
|
||||
'',
|
||||
'class="fill_color"',
|
||||
true
|
||||
).'</td>';
|
||||
);
|
||||
$form_items['fill_color_row']['html'] .= '</td>';
|
||||
|
||||
$form_items['module_graph_size_row'] = [];
|
||||
$form_items['module_graph_size_row']['items'] = [
|
||||
|
@ -375,18 +371,16 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
|
||||
$form_items['grid_color_row'] = [];
|
||||
$form_items['grid_color_row']['items'] = ['bars_graph'];
|
||||
$form_items['grid_color_row']['html'] = '<td align="left" valign="top" >'.__('Grid color').'</td>'.'<td align="left" >'.html_print_input_text_extended(
|
||||
$form_items['grid_color_row']['html'] = '<td align="left" valign="top">'.__('Grid color').'</td>';
|
||||
$form_items['grid_color_row']['html'] .= '<td align="left" >';
|
||||
$form_items['grid_color_row']['html'] .= html_print_input_color(
|
||||
'grid_color',
|
||||
'#000000',
|
||||
'text-grid_color',
|
||||
'',
|
||||
7,
|
||||
7,
|
||||
false,
|
||||
'',
|
||||
'class="grid_color"',
|
||||
true
|
||||
).'</td>';
|
||||
);
|
||||
$form_items['grid_color_row']['html'] .= '</td>';
|
||||
|
||||
$form_items['radio_choice_graph'] = [];
|
||||
$form_items['radio_choice_graph']['items'] = [
|
||||
|
@ -500,18 +494,18 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
|
||||
$form_items['resume_color_row'] = [];
|
||||
$form_items['resume_color_row']['items'] = ['donut_graph'];
|
||||
$form_items['resume_color_row']['html'] = '<td align="left" valign="top" >'.__('Resume data color').'</td>'.'<td align="left" >'.html_print_input_text_extended(
|
||||
$form_items['resume_color_row']['html'] = '<td align="left" valign="top" >';
|
||||
$form_items['resume_color_row']['html'] .= __('Resume data color');
|
||||
$form_items['resume_color_row']['html'] .= '</td>';
|
||||
$form_items['resume_color_row']['html'] .= '<td align="left" >';
|
||||
$form_items['resume_color_row']['html'] .= html_print_input_color(
|
||||
'resume_color',
|
||||
'#000000',
|
||||
'text-resume_color',
|
||||
'',
|
||||
7,
|
||||
7,
|
||||
false,
|
||||
'',
|
||||
'class="resume_color"',
|
||||
true
|
||||
).'</td>';
|
||||
);
|
||||
$form_items['resume_color_row']['html'] .= '</td>';
|
||||
|
||||
$event_times = [
|
||||
86400 => __('24h'),
|
||||
|
@ -637,24 +631,60 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
'background',
|
||||
'datos',
|
||||
];
|
||||
$form_items['background_row_2']['html'] = '<td align="left">'.__('Original Size').'</td>
|
||||
<td align="left">'.html_print_button(__('Apply'), 'original_false', false, "setAspectRatioBackground('original')", 'class="sub vs_button_ghost"', true).'</td>';
|
||||
$form_items['background_row_2']['html'] = '<td align="left">'.__('Original Size').'</td>';
|
||||
$form_items['background_row_2']['html'] .= '<td align="left">';
|
||||
$form_items['background_row_2']['html'] .= html_print_button(
|
||||
__('Apply'),
|
||||
'original_false',
|
||||
false,
|
||||
'setAspectRatioBackground("original", '.$visualConsole_id.')',
|
||||
[
|
||||
'icon' => 'cog',
|
||||
'mode' => 'mini secondary',
|
||||
],
|
||||
true
|
||||
);
|
||||
$form_items['background_row_2']['html'] .= '</td>';
|
||||
|
||||
$form_items['background_row_3'] = [];
|
||||
$form_items['background_row_3']['items'] = [
|
||||
'background',
|
||||
'datos',
|
||||
];
|
||||
$form_items['background_row_3']['html'] = '<td align="left">'.__('Aspect ratio').'</td>
|
||||
<td align="left">'.html_print_button(__('Proportional Width'), 'original_false', false, "setAspectRatioBackground('width')", 'class="sub vs_button_ghost"', true).'</td>';
|
||||
$form_items['background_row_3']['html'] = '<td align="left">'.__('Aspect ratio').'</td>';
|
||||
$form_items['background_row_3']['html'] .= '<td align="left">';
|
||||
$form_items['background_row_3']['html'] .= html_print_button(
|
||||
__('Proportional Width'),
|
||||
'original_false',
|
||||
false,
|
||||
'setAspectRatioBackground("width", '.$visualConsole_id.')',
|
||||
[
|
||||
'icon' => 'cog',
|
||||
'mode' => 'mini secondary',
|
||||
],
|
||||
true
|
||||
);
|
||||
$form_items['background_row_3']['html'] .= '</td>';
|
||||
|
||||
$form_items['background_row_4'] = [];
|
||||
$form_items['background_row_4']['items'] = [
|
||||
'background',
|
||||
'datos',
|
||||
];
|
||||
$form_items['background_row_4']['html'] = '<td align="left"></td>
|
||||
<td align="left">'.html_print_button(__('Height proportional'), 'original_false', false, "setAspectRatioBackground('height')", 'class="sub vs_button_ghost"', true).'</td>';
|
||||
$form_items['background_row_4']['html'] = '<td align="left"></td>';
|
||||
$form_items['background_row_4']['html'] .= '<td align="left">';
|
||||
$form_items['background_row_4']['html'] .= html_print_button(
|
||||
__('Height proportional'),
|
||||
'original_false',
|
||||
false,
|
||||
'setAspectRatioBackground("height", '.$visualConsole_id.')',
|
||||
[
|
||||
'icon' => 'cog',
|
||||
'mode' => 'mini secondary',
|
||||
],
|
||||
true
|
||||
);
|
||||
$form_items['background_row_4']['html'] .= '</td>';
|
||||
|
||||
$form_items['percentile_bar_row_1'] = [];
|
||||
$form_items['percentile_bar_row_1']['items'] = [
|
||||
|
@ -665,11 +695,31 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
'bars_graph',
|
||||
'clock',
|
||||
];
|
||||
$form_items['percentile_bar_row_1']['html'] = '<td align="left">'.__('Widtzzzzh').html_print_input_text('width_percentile', 0, '', 3, 5, true).'</td>';
|
||||
$form_items['percentile_bar_row_1']['html'] = '<td align="left">'.__('Width').'</td>';
|
||||
$form_items['percentile_bar_row_1']['html'] .= '<td align="left">';
|
||||
$form_items['percentile_bar_row_1']['html'] .= html_print_input_text(
|
||||
'width_percentile',
|
||||
0,
|
||||
'',
|
||||
3,
|
||||
5,
|
||||
true
|
||||
);
|
||||
$form_items['percentile_bar_row_1']['html'] .= '</td>';
|
||||
|
||||
$form_items['height_bars_graph_row'] = [];
|
||||
$form_items['height_bars_graph_row']['items'] = ['bars_graph'];
|
||||
$form_items['height_bars_graph_row']['html'] = '<td align="left">'.__('Height').html_print_input_text('bars_graph_height', 0, '', 3, 5, true).'</td>';
|
||||
$form_items['height_bars_graph_row']['html'] = '<td align="left">'.__('Height').'</td>';
|
||||
$form_items['height_bars_graph_row']['html'] .= '<td align="left">';
|
||||
$form_items['height_bars_graph_row']['html'] .= html_print_input_text(
|
||||
'bars_graph_height',
|
||||
0,
|
||||
'',
|
||||
3,
|
||||
5,
|
||||
true
|
||||
);
|
||||
$form_items['height_bars_graph_row']['html'] .= '</td>';
|
||||
|
||||
$form_items['percentile_bar_row_2'] = [];
|
||||
$form_items['percentile_bar_row_2']['items'] = [
|
||||
|
@ -735,16 +785,11 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
'datos',
|
||||
];
|
||||
$form_items['percentile_item_row_5']['html'] = '<td align="left">'.__('Element color').'</td>
|
||||
<td align="left">'.html_print_input_text_extended(
|
||||
<td align="left">'.html_print_input_color(
|
||||
'percentile_color',
|
||||
'#ffffff',
|
||||
'text-percentile_color',
|
||||
'',
|
||||
7,
|
||||
7,
|
||||
false,
|
||||
'',
|
||||
'class="percentile_color"',
|
||||
true
|
||||
).'</td>';
|
||||
|
||||
|
@ -755,16 +800,11 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
'datos',
|
||||
];
|
||||
$form_items['percentile_item_row_6']['html'] = '<td align="left">'.__('Value color').'</td>
|
||||
<td align="left">'.html_print_input_text_extended(
|
||||
<td align="left">'.html_print_input_color(
|
||||
'percentile_label_color',
|
||||
'#ffffff',
|
||||
'text-percentile_label_color',
|
||||
'',
|
||||
7,
|
||||
7,
|
||||
false,
|
||||
'',
|
||||
'class="percentile_label_color"',
|
||||
true
|
||||
).'</td>';
|
||||
|
||||
|
@ -815,8 +855,16 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
// End of Color Cloud rows
|
||||
$form_items['show_on_top_row'] = [];
|
||||
$form_items['show_on_top_row']['items'] = ['group_item'];
|
||||
$form_items['show_on_top_row']['html'] = '<td align="left" >'.__('Always show on top').'</td>
|
||||
<td align="left" >'.html_print_checkbox('show_on_top', 1, '', true).ui_print_help_tip(__('It allows the element to be superimposed to the rest of items of the visual console'), true).'</td>';
|
||||
$form_items['show_on_top_row']['html'] = '<td align="left" >';
|
||||
$form_items['show_on_top_row']['html'] .= __('Always show on top');
|
||||
$form_items['show_on_top_row']['html'] .= ui_print_help_tip(
|
||||
__('It allows the element to be superimposed to the rest of items of the visual console'),
|
||||
true
|
||||
);
|
||||
$form_items['show_on_top_row']['html'] .= '</td>';
|
||||
$form_items['show_on_top_row']['html'] .= '<td align="left" >';
|
||||
$form_items['show_on_top_row']['html'] .= html_print_checkbox('show_on_top', 1, '', true);
|
||||
$form_items['show_on_top_row']['html'] .= '</td>';
|
||||
|
||||
$show_last_value = [
|
||||
'0' => __('Hide last value on boolean modules'),
|
||||
|
@ -875,11 +923,11 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
|
||||
$form_items['button_update_row'] = [];
|
||||
$form_items['button_update_row']['items'] = ['datos'];
|
||||
$form_items['button_update_row']['html'] = '<td align="left" colspan="2" style="text-align: right;">'.html_print_button(__('Cancel'), 'cancel_button', false, 'cancel_button_palette_callback();', 'class="sub cancel"', true).'<span ="margin-right:10px;"> </span>'.html_print_button(__('Update'), 'update_button', false, 'update_button_palette_callback();', 'class="sub upd"', true).'</td>';
|
||||
$form_items['button_update_row']['html'] = '<td align="left" colspan="2"><div class="flex flex-end">'.html_print_button(__('Cancel'), 'cancel_button', false, 'cancel_button_palette_callback();', [ 'icon' => 'delete', 'mode' => 'secondary'], true).'<span ="margin-right:10px;"> </span>'.html_print_button(__('Update'), 'update_button', false, 'update_button_palette_callback();', [ 'icon' => 'upd'], true).'</div></td>';
|
||||
|
||||
$form_items['button_create_row'] = [];
|
||||
$form_items['button_create_row']['items'] = ['datos'];
|
||||
$form_items['button_create_row']['html'] = '<td align="left" colspan="2" style="text-align: right;">'.html_print_button(__('Cancel'), 'cancel_button', false, 'cancel_button_palette_callback();', 'class="sub cancel"', true).'<span ="margin-right:10px;"> </span>'.html_print_button(__('Create'), 'create_button', false, 'create_button_palette_callback();', 'class="sub wand"', true).'</td>';
|
||||
$form_items['button_create_row']['html'] = '<td align="left" colspan="2" ><div class="flex flex-end">'.html_print_button(__('Cancel'), 'cancel_button', false, 'cancel_button_palette_callback();', [ 'icon' => 'delete', 'mode' => 'secondary'], true).'<span ="margin-right:10px;"> </span>'.html_print_button(__('Create'), 'create_button', false, 'create_button_palette_callback();', [ 'icon' => 'wand'], true).'</div></td>';
|
||||
|
||||
foreach ($form_items as $item => $item_options) {
|
||||
echo '<tr id="'.$item.'" class="'.implode(' ', (array) $item_options['items']).'">';
|
||||
|
@ -1054,14 +1102,18 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
<?php
|
||||
$form_items_advance['map_linked_row']['html'] .= ob_get_clean();
|
||||
} else {
|
||||
$visual_maps = array_reduce(
|
||||
$visual_maps,
|
||||
function ($all, $item) {
|
||||
$all[$item['id']] = $item['name'];
|
||||
return $all;
|
||||
},
|
||||
[]
|
||||
);
|
||||
$visual_maps = [];
|
||||
if (empty($visual_maps) === false) {
|
||||
$visual_maps = array_reduce(
|
||||
$visual_maps,
|
||||
function ($all, $item) {
|
||||
$all[$item['id']] = $item['name'];
|
||||
return $all;
|
||||
},
|
||||
[]
|
||||
);
|
||||
}
|
||||
|
||||
$form_items_advance['map_linked_row']['html'] .= html_print_select(
|
||||
$visual_maps,
|
||||
'map_linked',
|
||||
|
@ -1201,7 +1253,15 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
'donut_graph',
|
||||
'color_cloud',
|
||||
];
|
||||
$form_items_advance['element_group_row']['html'] = '<td align="left">'.__('Restrict access to group').'</td>'.'<td align="left">'.html_print_select_groups(
|
||||
$form_items_advance['element_group_row']['html'] = '<td align="left">';
|
||||
$form_items_advance['element_group_row']['html'] .= __('Restrict access to group');
|
||||
$form_items_advance['element_group_row']['html'] .= ui_print_help_tip(
|
||||
__('If selected, restrict visualization of this item in the visual console to users who have access to selected group. This is also used on calculating child visual consoles.'),
|
||||
true
|
||||
);
|
||||
$form_items_advance['element_group_row']['html'] .= '</td>';
|
||||
$form_items_advance['element_group_row']['html'] .= '<td align="left">';
|
||||
$form_items_advance['element_group_row']['html'] .= html_print_select_groups(
|
||||
$config['id_user'],
|
||||
'VR',
|
||||
true,
|
||||
|
@ -1211,10 +1271,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||
'',
|
||||
'',
|
||||
true
|
||||
).ui_print_help_tip(
|
||||
__('If selected, restrict visualization of this item in the visual console to users who have access to selected group. This is also used on calculating child visual consoles.'),
|
||||
true
|
||||
).'</td>';
|
||||
);
|
||||
$form_items_advance['element_group_row']['html'] .= '</td>';
|
||||
|
||||
if (!$config['legacy_vc']) {
|
||||
$intervals = [
|
||||
|
@ -1393,8 +1451,8 @@ function visual_map_editor_print_toolbox()
|
|||
visual_map_print_button_editor('icon', __('Icon'), 'left', false, 'icon_min', true);
|
||||
visual_map_print_button_editor('clock', __('Clock'), 'left', false, 'clock_min', true);
|
||||
visual_map_print_button_editor('group_item', __('Group'), 'left', false, 'group_item_min', true);
|
||||
visual_map_print_button_editor('box_item', __('Box'), 'left', false, 'box_item_min', true);
|
||||
visual_map_print_button_editor('line_item', __('Line'), 'left', false, 'line_item_min', true);
|
||||
visual_map_print_button_editor('box_item', __('Box'), 'left', false, 'box_item', true);
|
||||
visual_map_print_button_editor('line_item', __('Line'), 'left', false, 'line_item', true);
|
||||
visual_map_print_button_editor('color_cloud', __('Color cloud'), 'left', false, 'color_cloud_min', true);
|
||||
if (isset($config['legacy_vc']) === false
|
||||
|| (bool) $config['legacy_vc'] === false
|
||||
|
@ -1415,9 +1473,9 @@ function visual_map_editor_print_toolbox()
|
|||
|
||||
$text_autosave = html_print_input_hidden('auto_save', true, true);
|
||||
visual_map_print_item_toolbox('auto_save', $text_autosave, 'right');
|
||||
visual_map_print_button_editor('show_grid', __('Show grid'), 'right', true, 'grid_min', true);
|
||||
visual_map_print_button_editor('edit_item', __('Update item'), 'right', true, 'config_min', true);
|
||||
visual_map_print_button_editor('delete_item', __('Delete item'), 'right', true, 'delete_min', true);
|
||||
visual_map_print_button_editor('show_grid', __('Show grid'), 'right', true, 'show_grid', true);
|
||||
visual_map_print_button_editor('edit_item', __('Update item'), 'right', true, 'edit_item', true);
|
||||
visual_map_print_button_editor('delete_item', __('Delete item'), 'right', true, 'delete_item', true);
|
||||
visual_map_print_button_editor('copy_item', __('Copy item'), 'right', true, 'copy_item', true);
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
@ -1435,12 +1493,12 @@ function visual_map_print_button_editor(
|
|||
) {
|
||||
html_print_button(
|
||||
$label,
|
||||
'button_toolbox2',
|
||||
$idDiv,
|
||||
$disabled,
|
||||
"click_button_toolbox('".$idDiv."');",
|
||||
'click_button_toolbox("'.$idDiv.'");',
|
||||
[
|
||||
'icon' => $class,
|
||||
'mode' => 'onlyIcon',
|
||||
'class' => $class.' float-'.$float,
|
||||
'mode' => 'onlyIcon',
|
||||
],
|
||||
false,
|
||||
$imageButton
|
||||
|
|
|
@ -1395,6 +1395,76 @@
|
|||
duration = +_;
|
||||
return zoom;
|
||||
};
|
||||
zoom.setTranslate = function(v) {
|
||||
translate = v;
|
||||
};
|
||||
zoom.convertLevelsToScale = function(i) {
|
||||
min = Math.pow(2, (-360 * i) * .002) * 1;
|
||||
max = Math.pow(2, (360 * i) * .002) * 1;
|
||||
|
||||
return [min, max];
|
||||
};
|
||||
zoom.getZoomLevel = function(x, y) {
|
||||
if (typeof(x) == 'undefined') {
|
||||
x = 0;
|
||||
//Get center
|
||||
}
|
||||
if (typeof(y) == 'undefined') {
|
||||
y = 0;
|
||||
//Get center
|
||||
}
|
||||
|
||||
var zoom_levels = [];
|
||||
|
||||
if (!translate0)
|
||||
translate0 = location([x, y]);
|
||||
|
||||
var old_scale = scale;
|
||||
var old_translate = [translate[0], translate[1]];
|
||||
|
||||
var count = 0;
|
||||
|
||||
|
||||
scale = 1;
|
||||
high_levels = [];
|
||||
high_levels.push({'scale': scale, 'translate': [translate[0], translate[1]]});
|
||||
do {
|
||||
scaleTo(Math.pow(2, 360 * .002) * scale);
|
||||
translateTo([x, y], translate0);
|
||||
|
||||
high_levels.push({'scale': scale, 'translate': [translate[0], translate[1]]});
|
||||
|
||||
if (count > 30) {
|
||||
break;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
while (scale < scaleExtent[1]);
|
||||
scale = 1;
|
||||
count = 0;
|
||||
do {
|
||||
scaleTo(Math.pow(2, -360 * .002) * scale);
|
||||
translateTo([x, y], translate0);
|
||||
|
||||
zoom_levels.push({'scale': scale, 'translate': [translate[0], translate[1]]});
|
||||
|
||||
if (count > 30) {
|
||||
break;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
while (scale > scaleExtent[0]);
|
||||
|
||||
zoom_levels.reverse();
|
||||
high_levels.forEach(function(v, i) {
|
||||
zoom_levels.push(v);
|
||||
});
|
||||
|
||||
scale = old_scale;
|
||||
translate = old_translate;
|
||||
|
||||
return zoom_levels;
|
||||
};
|
||||
zoom.x = function(z) {
|
||||
if (!arguments.length) return x1;
|
||||
x1 = z;
|
||||
|
@ -9550,4 +9620,4 @@
|
|||
return request.responseXML;
|
||||
});
|
||||
if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3;
|
||||
}();
|
||||
}();
|
||||
|
|
|
@ -21,7 +21,10 @@ function parse_alert_command(command, classs) {
|
|||
"[RECOVER]" + $($(".fields")[nfield - 1]).val()
|
||||
);
|
||||
}
|
||||
} else if ($(this).css("-webkit-text-security") == "disc") {
|
||||
} else if (
|
||||
$(this).css("-webkit-text-security") == "disc" ||
|
||||
$(this).css("font-family") == "text-security-disc"
|
||||
) {
|
||||
var hidden_character = "*";
|
||||
var hidden_string = hidden_character.repeat($(this).val().length);
|
||||
|
||||
|
|
|
@ -1001,13 +1001,18 @@ function add_macro_field(macro, row_model_id, type_copy, k) {
|
|||
$("#" + row_id).show();
|
||||
}
|
||||
|
||||
function load_plugin_macros_fields(row_model_id) {
|
||||
function load_plugin_macros_fields(row_model_id, moduleId = 0) {
|
||||
// Get plugin macros when selected and load macros fields
|
||||
var id_plugin = $("#id_plugin").val();
|
||||
|
||||
var params = [];
|
||||
params.push("page=include/ajax/module");
|
||||
params.push("get_plugin_macros=1");
|
||||
|
||||
if (moduleId > 0) {
|
||||
params.push("get_module_macros=" + moduleId);
|
||||
} else {
|
||||
params.push("get_plugin_macros=1");
|
||||
}
|
||||
params.push("id_plugin=" + id_plugin);
|
||||
|
||||
jQuery.ajax({
|
||||
|
|
|
@ -258,7 +258,7 @@ function snmpGet(oid) {
|
|||
var ajax_url = $("#hidden-ajax_url").val();
|
||||
var server_to_exec = $("#server_to_exec").val();
|
||||
var target_port = $("#target_port").val();
|
||||
var print_create_agent_module = $("#print_create_agent_module").val();
|
||||
var print_create_agent_module = true;
|
||||
|
||||
// Check for a custom action
|
||||
var custom_action = $("#hidden-custom_action").val();
|
||||
|
@ -533,7 +533,7 @@ function checkSNMPVersion() {
|
|||
}
|
||||
|
||||
// Show the SNMP browser window
|
||||
function snmpBrowserWindow() {
|
||||
function snmpBrowserWindow(id_agente = 0) {
|
||||
// Keep elements in the form and the SNMP browser synced
|
||||
$("#text-target_ip").val($("#text-ip_target").val());
|
||||
$("#target_port").val($("#text-tcp_port").val());
|
||||
|
@ -549,6 +549,8 @@ function snmpBrowserWindow() {
|
|||
$("#password-snmp3_browser_privacy_pass").val(
|
||||
$("#password-snmp3_privacy_pass").val()
|
||||
);
|
||||
// Realation agente module.
|
||||
$("#id_agent_module").val(id_agente);
|
||||
|
||||
checkSNMPVersion();
|
||||
|
||||
|
|
|
@ -561,7 +561,6 @@ class BasicChart extends Widget
|
|||
global $config;
|
||||
|
||||
$size = parent::getSize();
|
||||
hd($size, true);
|
||||
|
||||
include_once $config['homedir'].'/include/functions_graph.php';
|
||||
include_once $config['homedir'].'/include/functions_agents.php';
|
||||
|
@ -625,16 +624,20 @@ class BasicChart extends Widget
|
|||
],
|
||||
];
|
||||
|
||||
$graph = \grafico_modulo_sparse($params);
|
||||
$output = '<div class="container-center widget-mrgn-0px">';
|
||||
$output .= '<div class="basic-chart-title">';
|
||||
$output .= '<span style="color:'.$this->values['colorLabel'].'; font-size:'.$this->values['sizeLabel'].'px;">';
|
||||
$output .= ((bool) $this->values['showLabel'] === true) ? $title : '';
|
||||
$output .= '</span>';
|
||||
$output .= '<span style="color:'.$color_status.'; font-size:'.$this->values['sizeValue'].'px;">';
|
||||
$output .= ((bool) $this->values['showValue'] === true) ? $value : '';
|
||||
$output .= '</span>';
|
||||
$output .= '</div>';
|
||||
$output .= \grafico_modulo_sparse($params);
|
||||
if (str_contains($graph, '<img') === false) {
|
||||
$output .= '<div class="basic-chart-title">';
|
||||
$output .= '<span style="color:'.$this->values['colorLabel'].'; font-size:'.$this->values['sizeLabel'].'px;">';
|
||||
$output .= ((bool) $this->values['showLabel'] === true) ? $title : '';
|
||||
$output .= '</span>';
|
||||
$output .= '<span style="color:'.$color_status.'; font-size:'.$this->values['sizeValue'].'px;">';
|
||||
$output .= ((bool) $this->values['showValue'] === true) ? $value : '';
|
||||
$output .= '</span>';
|
||||
$output .= '</div>';
|
||||
}
|
||||
|
||||
$output .= $graph;
|
||||
$output .= '</div>';
|
||||
return $output;
|
||||
}
|
||||
|
|
|
@ -279,13 +279,26 @@ class AgentModuleWidget extends Widget
|
|||
$return_all_group = true;
|
||||
}
|
||||
|
||||
$mgroup = '';
|
||||
if (isset($this->values['mGroup']) === false) {
|
||||
$sql = sprintf(
|
||||
'SELECT id_group FROM tdashboard WHERE id = %d',
|
||||
$this->dashboardId
|
||||
);
|
||||
|
||||
$group_dahsboard = db_get_value_sql($sql);
|
||||
if ($group_dahsboard > 0) {
|
||||
$mgroup = $group_dahsboard;
|
||||
}
|
||||
}
|
||||
|
||||
$inputs[] = [
|
||||
'class' => 'flex flex-row',
|
||||
'id' => 'select_multiple_modules_filtered',
|
||||
'arguments' => [
|
||||
'type' => 'select_multiple_modules_filtered',
|
||||
'uniqId' => $this->cellId,
|
||||
'mGroup' => (isset($this->values['mGroup']) === true) ? $this->values['mGroup'] : '',
|
||||
'mGroup' => (isset($this->values['mGroup']) === true) ? $this->values['mGroup'] : $mgroup,
|
||||
'mRecursion' => (isset($this->values['mRecursion']) === true) ? $this->values['mRecursion'] : '',
|
||||
'mModuleGroup' => (isset($this->values['mModuleGroup']) === true) ? $this->values['mModuleGroup'] : '',
|
||||
'mAgents' => (isset($this->values['mAgents']) === true) ? $this->values['mAgents'] : '',
|
||||
|
|
|
@ -540,7 +540,7 @@ class TreeViewWidget extends Widget
|
|||
|
||||
$searchAgent = '';
|
||||
if (empty($this->values['filterAgent']) === false) {
|
||||
$searchAgent = $this->values['filterAgent'];
|
||||
$searchAgent = io_safe_output($this->values['filterAgent']);
|
||||
}
|
||||
|
||||
$statusModule = -1;
|
||||
|
@ -552,7 +552,7 @@ class TreeViewWidget extends Widget
|
|||
|
||||
$searchModule = '';
|
||||
if (empty($this->values['filterModule']) === false) {
|
||||
$searchModule = $this->values['filterModule'];
|
||||
$searchModule = io_safe_output($this->values['filterModule']);
|
||||
}
|
||||
|
||||
$searchGroup = 0;
|
||||
|
|
|
@ -160,9 +160,6 @@ final class DonutGraph extends Item
|
|||
if (empty($graphData) === true) {
|
||||
$data['html'] = graph_nodata_image(['width' => $width, 'height' => $height]);
|
||||
} else {
|
||||
array_pop($graphData['labels']);
|
||||
array_pop($graphData['data']);
|
||||
|
||||
$options = [
|
||||
'waterMark' => false,
|
||||
'legend' => [
|
||||
|
@ -226,7 +223,7 @@ final class DonutGraph extends Item
|
|||
'module_input' => true,
|
||||
'module_name' => 'moduleId',
|
||||
'module_none' => false,
|
||||
'get_only_string_modules' => false,
|
||||
'get_only_string_modules' => true,
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -241,7 +238,7 @@ final class DonutGraph extends Item
|
|||
'sort' => false,
|
||||
'agent_id' => $values['agentId'],
|
||||
'metaconsole_id' => $values['metaconsoleId'],
|
||||
'get_only_string_modules' => false,
|
||||
'get_only_string_modules' => true,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -34,6 +34,25 @@ final class Group extends Item
|
|||
protected static $indexCacheByUser = true;
|
||||
|
||||
|
||||
/**
|
||||
* Get the "recursive Group" switch value.
|
||||
*
|
||||
* @param array $data Unknown input data structure.
|
||||
*
|
||||
* @return mixed If the recursive should be true or not.
|
||||
*/
|
||||
private static function getRecursiveGroup(array $data)
|
||||
{
|
||||
return static::issetInArray(
|
||||
$data,
|
||||
[
|
||||
'recursiveGroup',
|
||||
'recursive_group',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the "show statistics" switch value.
|
||||
*
|
||||
|
@ -87,6 +106,11 @@ final class Group extends Item
|
|||
$return['id_group'] = $id_group;
|
||||
}
|
||||
|
||||
$recursive_group = static::getRecursiveGroup($data);
|
||||
if ($recursive_group !== null) {
|
||||
$return['recursive_group'] = static::parseBool($recursive_group);
|
||||
}
|
||||
|
||||
$show_statistics = static::getShowStatistics($data);
|
||||
if ($show_statistics !== null) {
|
||||
$return['show_statistics'] = static::parseBool($show_statistics);
|
||||
|
@ -112,6 +136,7 @@ final class Group extends Item
|
|||
$return['groupId'] = static::extractGroupId($data);
|
||||
$return['imageSrc'] = static::extractImageSrc($data);
|
||||
$return['statusImageSrc'] = static::extractStatusImageSrc($data);
|
||||
$return['recursiveGroup'] = static::extractRecursiveGroup($data);
|
||||
$return['showStatistics'] = static::extractShowStatistics($data);
|
||||
|
||||
return $return;
|
||||
|
@ -177,6 +202,21 @@ final class Group extends Item
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Extract the "show statistics" switch value.
|
||||
*
|
||||
* @param array $data Unknown input data structure.
|
||||
*
|
||||
* @return boolean If the statistics should be shown or not.
|
||||
*/
|
||||
private static function extractRecursiveGroup(array $data): bool
|
||||
{
|
||||
return static::parseBool(
|
||||
static::issetInArray($data, ['recursiveGroup', 'recursive_group'])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Extract the "show statistics" switch value.
|
||||
*
|
||||
|
@ -227,63 +267,147 @@ final class Group extends Item
|
|||
}
|
||||
|
||||
$groupId = static::extractGroupId($data);
|
||||
$recursiveGroup = static::extractrecursiveGroup($data);
|
||||
$showStatistics = static::extractShowStatistics($data);
|
||||
|
||||
if ($showStatistics === true) {
|
||||
$isMetaconsole = \is_metaconsole();
|
||||
if ($recursiveGroup) {
|
||||
$childers_id = groups_get_children_ids($groupId);
|
||||
}
|
||||
|
||||
// Retrieve the agent stats.
|
||||
$agentsCritical = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $groupId,
|
||||
'status' => AGENT_STATUS_CRITICAL,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numCritical = $agentsCritical[0]['total'];
|
||||
$agentsWarning = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $groupId,
|
||||
'status' => AGENT_STATUS_WARNING,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numWarning = $agentsWarning[0]['total'];
|
||||
$agentsUnknown = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $groupId,
|
||||
'status' => AGENT_STATUS_UNKNOWN,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numUnknown = $agentsUnknown[0]['total'];
|
||||
$agentsOk = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $groupId,
|
||||
'status' => AGENT_STATUS_NORMAL,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numNormal = $agentsOk[0]['total'];
|
||||
if ($recursiveGroup) {
|
||||
$numCritical = 0;
|
||||
foreach ($childers_id as $id_group) {
|
||||
$agentsCritical = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $id_group,
|
||||
'status' => AGENT_STATUS_CRITICAL,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numCritical += $agentsCritical[0]['total'];
|
||||
}
|
||||
} else {
|
||||
$agentsCritical = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $groupId,
|
||||
'status' => AGENT_STATUS_CRITICAL,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numCritical = $agentsCritical[0]['total'];
|
||||
}
|
||||
|
||||
if ($recursiveGroup) {
|
||||
$numWarning = 0;
|
||||
foreach ($childers_id as $id_group) {
|
||||
$agentsWarning = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $id_group,
|
||||
'status' => AGENT_STATUS_WARNING,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numWarning += $agentsWarning[0]['total'];
|
||||
}
|
||||
} else {
|
||||
$agentsWarning = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $groupId,
|
||||
'status' => AGENT_STATUS_WARNING,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numWarning = $agentsWarning[0]['total'];
|
||||
}
|
||||
|
||||
if ($recursiveGroup) {
|
||||
$numUnknown = 0;
|
||||
foreach ($childers_id as $id_group) {
|
||||
$agentsUnknown = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $id_group,
|
||||
'status' => AGENT_STATUS_UNKNOWN,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numUnknown += $agentsUnknown[0]['total'];
|
||||
}
|
||||
} else {
|
||||
$agentsUnknown = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $groupId,
|
||||
'status' => AGENT_STATUS_UNKNOWN,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numUnknown = $agentsUnknown[0]['total'];
|
||||
}
|
||||
|
||||
if ($recursiveGroup) {
|
||||
$numNormal = 0;
|
||||
foreach ($childers_id as $id_group) {
|
||||
$agentsOk = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $id_group,
|
||||
'status' => AGENT_STATUS_NORMAL,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numNormal += $agentsOk[0]['total'];
|
||||
}
|
||||
} else {
|
||||
$agentsOk = \agents_get_agents(
|
||||
[
|
||||
'id_grupo' => $groupId,
|
||||
'status' => AGENT_STATUS_NORMAL,
|
||||
],
|
||||
['COUNT(*) AS total'],
|
||||
'AR',
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
$isMetaconsole
|
||||
);
|
||||
$numNormal = $agentsOk[0]['total'];
|
||||
}
|
||||
|
||||
$numTotal = ($numCritical + $numWarning + $numUnknown + $numNormal);
|
||||
|
||||
|
@ -327,6 +451,11 @@ final class Group extends Item
|
|||
',',
|
||||
array_keys(\users_get_groups())
|
||||
);
|
||||
|
||||
if ($recursiveGroup === true) {
|
||||
$childers_id = groups_get_children_ids($groupId);
|
||||
$groupFilter .= ','.implode(',', $childers_id);
|
||||
}
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
|
@ -356,8 +485,25 @@ final class Group extends Item
|
|||
$status = AGENT_STATUS_NORMAL;
|
||||
}
|
||||
} else {
|
||||
// Get the status img src.
|
||||
$status = \groups_get_status($groupId, true);
|
||||
if ($recursiveGroup === true) {
|
||||
$childers_id = groups_get_children_ids($groupId);
|
||||
$flag_stop_foreach = false;
|
||||
foreach ($childers_id as $id_children) {
|
||||
if ($flag_stop_foreach === true) {
|
||||
// Stop if some child is not normal.
|
||||
break;
|
||||
}
|
||||
|
||||
// Get the status img src from all modules childs.
|
||||
$status = \groups_get_status($id_children, true);
|
||||
if ($status !== AGENT_STATUS_NORMAL) {
|
||||
$flag_stop_foreach = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Get the status img src.
|
||||
$status = \groups_get_status($groupId, true);
|
||||
}
|
||||
}
|
||||
|
||||
$imagePath = \visual_map_get_image_status_element($data, $status);
|
||||
|
@ -559,6 +705,23 @@ final class Group extends Item
|
|||
],
|
||||
];
|
||||
|
||||
if ((int) $values['type'] === GROUP_ITEM) {
|
||||
if (isset($values['recursiveGroup']) === false) {
|
||||
$values['recursiveGroup'] = true;
|
||||
}
|
||||
|
||||
// Recursive group.
|
||||
$inputs[] = [
|
||||
'label' => __('Recursive'),
|
||||
'arguments' => [
|
||||
'name' => 'recursiveGroup',
|
||||
'id' => 'recursiveGroup',
|
||||
'type' => 'switch',
|
||||
'value' => $values['recursiveGroup'],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
// Show statistics.
|
||||
$inputs[] = [
|
||||
'label' => __('Show statistics'),
|
||||
|
|
|
@ -116,7 +116,12 @@ final class Icon extends Item
|
|||
|
||||
// Get the img src.
|
||||
$imagePath = \visual_map_get_image_status_element($data);
|
||||
$data['imageSrc'] = \ui_get_full_url($imagePath, false, false, false);
|
||||
$url = parse_url($imagePath);
|
||||
if (isset($url['scheme']) === false) {
|
||||
$data['imageSrc'] = \ui_get_full_url($imagePath, false, false, false);
|
||||
} else {
|
||||
$data['imageSrc'] = $imagePath;
|
||||
}
|
||||
|
||||
// If the width or the height are equal to 0 we will extract them
|
||||
// from the real image size.
|
||||
|
|
|
@ -584,10 +584,12 @@ final class NetworkLink extends Model
|
|||
$inOctets = sprintf('%0.3f %s', $inOctets, $unitIn);
|
||||
|
||||
$labelStart = $interface_name;
|
||||
$labelStart .= ' (in): '.$inOctets;
|
||||
$inOctets = explode(' ', $inOctets);
|
||||
$labelStart .= ' (in): '.format_for_graph($inOctets[0]).' '.$inOctets[1];
|
||||
|
||||
$labelStart .= '<br>'.$interface_name;
|
||||
$labelStart .= ' (out): '.$outOctets;
|
||||
$outOctets = explode(' ', $outOctets);
|
||||
$labelStart .= ' (out): '.format_for_graph($outOctets[0]).' '.$outOctets[1];
|
||||
}
|
||||
|
||||
if (isset($links['start']['id_metaconsole']) === true
|
||||
|
@ -665,10 +667,12 @@ final class NetworkLink extends Model
|
|||
$inOctets = sprintf('%0.3f %s', $inOctets, $unitIn);
|
||||
|
||||
$labelEnd = $interface_name;
|
||||
$labelEnd .= ' (in): '.$inOctets;
|
||||
$inOctets = explode(' ', $inOctets);
|
||||
$labelEnd .= ' (in): '.format_for_graph($inOctets[0]).' '.$inOctets[1];
|
||||
|
||||
$labelEnd .= '<br>'.$interface_name;
|
||||
$labelEnd .= ' (out): '.$outOctets;
|
||||
$outOctets = explode(' ', $outOctets);
|
||||
$labelEnd .= ' (out): '.format_for_graph($outOctets[0]).' '.$outOctets[1];
|
||||
}
|
||||
|
||||
if (isset($links['end']['id_metaconsole']) === true
|
||||
|
|
|
@ -379,6 +379,10 @@ class View extends \HTML
|
|||
|
||||
case GROUP_ITEM:
|
||||
$data['imageSrc'] = \get_parameter('imageSrc');
|
||||
$data['recursiveGroup'] = \get_parameter_switch(
|
||||
'recursiveGroup',
|
||||
0
|
||||
);
|
||||
$data['showStatistics'] = \get_parameter_switch(
|
||||
'showStatistics',
|
||||
0
|
||||
|
|
|
@ -88,6 +88,10 @@ table#table_events > tbody > tr > td {
|
|||
padding: 0px !important;
|
||||
}
|
||||
|
||||
table#table_events > tbody > tr > td > i {
|
||||
font-size: 7.5pt;
|
||||
}
|
||||
|
||||
td > input[id^="checkbox-multi"] {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
|
|
@ -87,6 +87,11 @@
|
|||
font-weight: 900;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "text-security-disc";
|
||||
src: url("https://raw.githubusercontent.com/noppa/text-security/master/dist/text-security-disc.woff");
|
||||
}
|
||||
|
||||
/*
|
||||
@font-face {
|
||||
font-family: "lato-italic";
|
||||
|
@ -4424,9 +4429,13 @@ span.log_zone_line_error {
|
|||
border: 1px solid red;
|
||||
}
|
||||
|
||||
#toolbox > input {
|
||||
border-width: 0px 1px 0px 0px;
|
||||
border-color: lightgray;
|
||||
/* VISUAL MAP */
|
||||
#toolbox {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
#toolbox button {
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
#toolbox > input.service_min {
|
||||
|
@ -10443,12 +10452,24 @@ button.submitButton.onlyIcon.delete_item {
|
|||
-webkit-mask: url(../../images/delete.svg) no-repeat right / contain;
|
||||
}
|
||||
|
||||
button.buttonButton.onlyIcon.edit_item,
|
||||
button.submitButton.onlyIcon.edit_item {
|
||||
mask: url(../../images/edit.svg) no-repeat right / contain;
|
||||
-webkit-mask: url(../../images/edit.svg) no-repeat right / contain;
|
||||
}
|
||||
|
||||
button.buttonButton.onlyIcon.copy_item,
|
||||
button.submitButton.onlyIcon.copy_item {
|
||||
mask: url(../../images/copy.svg) no-repeat right / contain;
|
||||
-webkit-mask: url(../../images/copy.svg) no-repeat right / contain;
|
||||
}
|
||||
|
||||
button.buttonButton.onlyIcon.show_grid,
|
||||
button.submitButton.onlyIcon.show_grid {
|
||||
mask: url(../../images/WMI@svg.svg) no-repeat right / contain;
|
||||
-webkit-mask: url(../../images/WMI@svg.svg) no-repeat right / contain;
|
||||
}
|
||||
|
||||
button.buttonButton.link-create-item,
|
||||
button.submitButton.link-create-item {
|
||||
border-radius: 0;
|
||||
|
|
|
@ -736,7 +736,7 @@ div#main_pure {
|
|||
div#main,
|
||||
div#container,
|
||||
body.pure {
|
||||
background-color: #111;
|
||||
background-color: #111 !important;
|
||||
}
|
||||
|
||||
form ul.form_flex {
|
||||
|
|
|
@ -99,15 +99,6 @@ div#vc-controls img.vc-qr {
|
|||
flex: inherit;
|
||||
}
|
||||
|
||||
input.vs_button_ghost {
|
||||
background-color: transparent;
|
||||
border: 1px solid #82b92e;
|
||||
color: #82b92e;
|
||||
text-align: center;
|
||||
padding: 4px 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#toolbox #auto_save {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
|
|
@ -797,6 +797,7 @@ if (isset($config['id_user']) === false) {
|
|||
$pass2 = get_parameter_post('pass2');
|
||||
$id_user = get_parameter_post('id_user');
|
||||
|
||||
$db_reset_pass_entry = false;
|
||||
if (empty($reset_hash) === false) {
|
||||
$hash_data = explode(':::', $reset_hash);
|
||||
$id_user = $hash_data[0];
|
||||
|
@ -1361,7 +1362,7 @@ if ($searchPage) {
|
|||
$_GET['sec2'] = 'operation/agentes/group_view';
|
||||
break;
|
||||
|
||||
case 'Alert detail':
|
||||
case 'Alert details':
|
||||
$_GET['sec'] = 'view';
|
||||
$_GET['sec2'] = 'operation/agentes/alerts_status';
|
||||
break;
|
||||
|
@ -1388,7 +1389,7 @@ if ($searchPage) {
|
|||
case 'Visual console':
|
||||
$id_visualc = db_get_value('id', 'tlayout', 'name', $home_url);
|
||||
if (($home_url == '') || ($id_visualc == false)) {
|
||||
$str = 'sec=network&sec2=operation/visual_console/index&refr=60';
|
||||
$str = 'sec=godmode/reporting/map_builder&sec2=godmode/reporting/map_builder';
|
||||
} else {
|
||||
$str = 'sec=network&sec2=operation/visual_console/render_view&id='.$id_visualc;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
<div style='padding-bottom: 50px'>
|
||||
<?php
|
||||
$version = '7.0NG.771';
|
||||
$build = '230517';
|
||||
$build = '230524';
|
||||
$banner = "v$version Build $build";
|
||||
error_reporting(0);
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ $fields[AGENT_STATUS_NOT_NORMAL] = __('Not normal');
|
|||
$fields[AGENT_STATUS_NOT_INIT] = __('Not init');
|
||||
|
||||
$searchForm = '';
|
||||
$searchForm .= '<form method="post" action="?sec=view&sec2=operation/agentes/estado_agente&group_id='.$group_id.'">';
|
||||
$searchForm .= '<form method="post" action="?sec=view&sec2=operation/agentes/estado_agente">';
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
|
|
|
@ -187,16 +187,13 @@ html_print_div(
|
|||
'class' => 'agent_details_line',
|
||||
'content' => ui_toggle(
|
||||
$html_toggle,
|
||||
__('List of modules').' '.$help_not_init.ui_print_help_tip(
|
||||
__('To see the list of modules paginated, enable this option in the Styles Configuration.'),
|
||||
true
|
||||
).reporting_tiny_stats(
|
||||
'<span class="subsection_header_title">'.__('List of modules').' '.$help_not_init.reporting_tiny_stats(
|
||||
$agent,
|
||||
true,
|
||||
'modules',
|
||||
':',
|
||||
true,
|
||||
),
|
||||
).'</span>',
|
||||
'status_monitor_agent',
|
||||
false,
|
||||
false,
|
||||
|
@ -549,7 +546,8 @@ function print_form_filter_monitors(
|
|||
$table->size[0] = '25%';
|
||||
$table->size[1] = '25%';
|
||||
$table->size[2] = '25%';
|
||||
$table->size[3] = '25%';
|
||||
$table->size[3] = '15%';
|
||||
$table->size[4] = '10%';
|
||||
// Captions.
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
html_print_input_hidden('filter_monitors', 1, true).html_print_input_hidden(
|
||||
|
@ -618,11 +616,7 @@ function print_form_filter_monitors(
|
|||
)
|
||||
);
|
||||
|
||||
$form_text = html_print_table($table, true);
|
||||
|
||||
$filtersButtons = [];
|
||||
|
||||
$filtersButtons[] = html_print_button(
|
||||
$table->data[0][4] = html_print_button(
|
||||
__('Filter'),
|
||||
'filter',
|
||||
false,
|
||||
|
@ -633,9 +627,7 @@ function print_form_filter_monitors(
|
|||
'style' => 'margin-left: 15px',
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$filtersButtons[] = html_print_button(
|
||||
).html_print_button(
|
||||
__('Reset'),
|
||||
'filter',
|
||||
false,
|
||||
|
@ -646,6 +638,9 @@ function print_form_filter_monitors(
|
|||
],
|
||||
true
|
||||
);
|
||||
$table->cellstyle[0][4] = 'width:20%;display: flex;flex-direction: row-reverse;justify-content: flex-end;height: 60px;align-items: flex-end;width:10%;';
|
||||
|
||||
$form_text = html_print_table($table, true);
|
||||
|
||||
// TODO. Unused code.
|
||||
if ($status_filter_monitor === -1 && empty($status_text_monitor) === true && $status_module_group === -1) {
|
||||
|
@ -655,10 +650,4 @@ function print_form_filter_monitors(
|
|||
}
|
||||
|
||||
echo $form_text;
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons-right-forced',
|
||||
'content' => implode('', $filtersButtons),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -229,6 +229,9 @@ if (empty($result_groups) === false) {
|
|||
|
||||
echo '<table class="info_table mrgn_top_10px" border="0" width="100%">';
|
||||
echo '<thead>';
|
||||
echo '<tr>';
|
||||
echo '<th colspan=14>'.__('Total items').': '.$count.'</th>';
|
||||
echo '</tr>';
|
||||
echo '<tr>';
|
||||
echo '<th colspan=2 ></th>';
|
||||
echo '<th colspan=6>'.__('Agents').'</th>';
|
||||
|
@ -238,13 +241,13 @@ if (empty($result_groups) === false) {
|
|||
echo '<tr>';
|
||||
echo "<th class='w26px'>".__('Force').'</th>';
|
||||
echo "<th width='30%' class='mw60px' style='text-align: justify'>".__('Group').'/'.__('Tags').'</th>';
|
||||
echo "<th width='10%' class='mw60px center'>".__('Total').'</th>';
|
||||
echo "<th class='center'>".__('Total').'</th>';
|
||||
echo "<th width='10%' class='mw60px center'>".__('Unknown').'</th>';
|
||||
echo "<th width='10%' class='mw60px center'>".__('Not init').'</th>';
|
||||
echo "<th width='10%' class='mw60px center'>".__('Normal').'</th>';
|
||||
echo "<th width='10%' class='mw60px center'>".__('Warning').'</th>';
|
||||
echo "<th width='10%' class='mw60px center'>".__('Critical').'</th>';
|
||||
echo "<th width='10%' class='mw60px center'>".__('Unknown').'</th>';
|
||||
echo "<th class='center'>".__('Unknown').'</th>';
|
||||
echo "<th width='10%' class='mw60px center'>".__('Not init').'</th>';
|
||||
echo "<th width='10%' class='mw60px center'>".__('Normal').'</th>';
|
||||
echo "<th width='10%' class='mw60px center'>".__('Warning').'</th>';
|
||||
|
|
|
@ -1100,16 +1100,29 @@ $load_filter_id = (int) get_parameter('filter_id', 0);
|
|||
$fav_menu = [];
|
||||
if ($load_filter_id === 0) {
|
||||
// Load user filter.
|
||||
$loaded_filter = db_get_row_sql(
|
||||
sprintf(
|
||||
'SELECT f.id_filter, f.id_name
|
||||
FROM tevent_filter f
|
||||
INNER JOIN tusuario u
|
||||
ON u.default_event_filter=f.id_filter
|
||||
WHERE u.id_user = "%s" ',
|
||||
$config['id_user']
|
||||
)
|
||||
);
|
||||
if (is_metaconsole() === true) {
|
||||
$loaded_filter = db_get_row_sql(
|
||||
sprintf(
|
||||
'SELECT f.id_filter, f.id_name
|
||||
FROM tevent_filter f
|
||||
INNER JOIN tusuario u
|
||||
ON u.metaconsole_default_event_filter=f.id_filter
|
||||
WHERE u.id_user = "%s" ',
|
||||
$config['id_user']
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$loaded_filter = db_get_row_sql(
|
||||
sprintf(
|
||||
'SELECT f.id_filter, f.id_name
|
||||
FROM tevent_filter f
|
||||
INNER JOIN tusuario u
|
||||
ON u.default_event_filter=f.id_filter
|
||||
WHERE u.id_user = "%s" ',
|
||||
$config['id_user']
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// Load filter selected by user.
|
||||
$loaded_filter['id_filter'] = $load_filter_id;
|
||||
|
|
|
@ -342,7 +342,7 @@ $details_box .= '
|
|||
<div class="integriaims_details_titles">'.__('Type').'</div>';
|
||||
$details_box .= '
|
||||
<div>'.html_print_image('images/heart.png', true, ['class' => 'invert_filter']).'</div>
|
||||
<div>'.html_print_image('images/builder.png', true, ['class' => 'invert_filter']).'</div>
|
||||
<div>'.html_print_image('images/builder@svg.svg', true, ['class' => 'invert_filter']).'</div>
|
||||
<div>'.html_print_image('images/user_green.png', true, ['class' => 'invert_filter']).'</div>
|
||||
<div>'.ui_print_integria_incident_priority($priority, $priority_text).'</div>
|
||||
<div>'.html_print_image('images/incidents.png', true, ['class' => 'invert_filter']).'</div>';
|
||||
|
|
|
@ -637,7 +637,7 @@ $menu_operation['workspace']['id'] = 'oper-users';
|
|||
|
||||
// ANY user can view him/herself !
|
||||
// Users.
|
||||
$query_paramameters_user = '&edit_user=1&pure=0&id_user='.$config['id_user'];
|
||||
$query_paramameters_user = '&edit_user=1&pure=0';
|
||||
|
||||
$sub = [];
|
||||
$sub['godmode/users/configure_user'.$query_paramameters_user]['text'] = __('Edit my user');
|
||||
|
|
|
@ -85,7 +85,7 @@ if (is_ajax() === true) {
|
|||
|
||||
// Read filter configuration.
|
||||
$filter_id = (int) get_parameter('filter_id', 0);
|
||||
$filter['id_name'] = get_parameter('name', '');
|
||||
$filter['id_name'] = get_parameter('new_filter_name', '');
|
||||
$filter['id_group'] = (int) get_parameter('assign_group', 0);
|
||||
$filter['aggregate'] = get_parameter('aggregate', '');
|
||||
$filter['ip_dst'] = get_parameter('ip_dst', '');
|
||||
|
@ -162,6 +162,10 @@ if ($save != '' && check_acl($config['id_user'], 0, 'AW')) {
|
|||
// Save filter args.
|
||||
$filter['filter_args'] = netflow_get_filter_arguments($filter, true);
|
||||
|
||||
if ($filter['id_name'] === '') {
|
||||
$filter['id_name'] = 'Netflow_Filter_'.time();
|
||||
}
|
||||
|
||||
$filter_id = db_process_sql_insert('tnetflow_filter', $filter);
|
||||
if ($filter_id === false) {
|
||||
$filter_id = 0;
|
||||
|
@ -380,6 +384,9 @@ $advanced_toggle .= '<td colspan="2">'.html_print_checkbox_switch(
|
|||
'displayMonitoringFilter()',
|
||||
).'</td>';
|
||||
|
||||
$advanced_toggle .= '<td><b>'.__('New filter name').'</b></td>';
|
||||
$advanced_toggle .= '<td>'.html_print_input_text('new_filter_name', '', false, 40, 80, true).'</td>';
|
||||
|
||||
$advanced_toggle .= '<tr id="netlofw_monitoring_filters">';
|
||||
$advanced_toggle .= "<td style='font-weight:bold;'>".__('Netflow monitoring interval').ui_print_help_tip(__('Netflow monitoring interval in secs.'), true).'</td>';
|
||||
$advanced_toggle .= '<td colspan="2">'.html_print_input_number(
|
||||
|
|
|
@ -198,7 +198,7 @@ if ($view_graph) {
|
|||
'graph_editor' => [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id='.$id_graph.'">'.html_print_image(
|
||||
'images/builder.png',
|
||||
'images/builder@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Graph editor'),
|
||||
|
|
|
@ -93,7 +93,9 @@ ui_print_standard_header(
|
|||
);
|
||||
|
||||
// SNMP tree container.
|
||||
snmp_browser_print_container(false, '100%', '60%', '', true, true);
|
||||
if (!isset($_GET['tab'])) {
|
||||
snmp_browser_print_container(false, '100%', '60%', '', true, true);
|
||||
}
|
||||
|
||||
// Div for modal.
|
||||
echo '<div id="modal" style="display:none"></div>';
|
||||
|
@ -607,87 +609,142 @@ function show_add_module() {
|
|||
|
||||
var id_agent = 0;
|
||||
var id_module = 0;
|
||||
var id_agent_module = $("#id_agent_module").val();
|
||||
|
||||
if (id_agent_module) {
|
||||
// Get SNMP target.
|
||||
confirmDialog({
|
||||
title: '<?php echo __('Are you sure?'); ?>',
|
||||
message: '<?php echo __('Are you sure you want add module?'); ?> ',
|
||||
ok: '<?php echo __('OK'); ?>',
|
||||
cancel: '<?php echo __('Cancel'); ?>',
|
||||
onAccept: function() {
|
||||
|
||||
// Get SNMP target.
|
||||
var snmp_target = {
|
||||
target_ip : $('#text-target_ip').val(),
|
||||
community : $('#text-community').val(),
|
||||
snmp_version : $('#snmp_browser_version').val(),
|
||||
snmp3_auth_user : $('#text-snmp3_browser_auth_user').val(),
|
||||
snmp3_security_level : $('#snmp3_browser_security_level').val(),
|
||||
snmp3_auth_method : $('#snmp3_browser_auth_method').val(),
|
||||
snmp3_auth_pass : $('#password-snmp3_browser_auth_pass').val(),
|
||||
snmp3_privacy_method : $('#snmp3_browser_privacy_method').val(),
|
||||
snmp3_privacy_pass : $('#password-snmp3_browser_privacy_pass').val(),
|
||||
tcp_port : $('#target_port').val(),
|
||||
};
|
||||
|
||||
// Append values to form.
|
||||
var input = "";
|
||||
|
||||
$.each( snmp_target, function( key, val ) {
|
||||
input = $("<input>")
|
||||
.attr("type", "hidden")
|
||||
.attr("name", key).val(val);
|
||||
|
||||
$("#snmp_create_module").append(input);
|
||||
});
|
||||
|
||||
//Submit form to agent module url.
|
||||
$("#snmp_create_module").attr(
|
||||
"action",
|
||||
"index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente="
|
||||
+id_agent_module+
|
||||
"&tab=module&edit_module=1"
|
||||
);
|
||||
|
||||
$('#snmp_create_module').submit();
|
||||
|
||||
$("#dialog_create_module").dialog({
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
width: '300',
|
||||
height:'auto',
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
buttons:
|
||||
[
|
||||
{
|
||||
class: "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-cancel",
|
||||
text: '<?php echo __('Cancel'); ?>',
|
||||
click: function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
class: "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||
text: '<?php echo __('Create module'); ?>',
|
||||
click: function(e) {
|
||||
|
||||
confirmDialog({
|
||||
title: '<?php echo __('Are you sure?'); ?>',
|
||||
message: '<?php echo __('Are you sure you want add module?'); ?> ',
|
||||
ok: '<?php echo __('OK'); ?>',
|
||||
cancel: '<?php echo __('Cancel'); ?>',
|
||||
onAccept: function() {
|
||||
|
||||
// Get id agent and add it to form.
|
||||
id_agent = $('#hidden-id_agent').val();
|
||||
|
||||
// Get SNMP target.
|
||||
var snmp_target = {
|
||||
|
||||
target_ip : $('#text-target_ip').val(),
|
||||
community : $('#text-community').val(),
|
||||
snmp_version : $('#snmp_browser_version').val(),
|
||||
snmp3_auth_user : $('#text-snmp3_browser_auth_user').val(),
|
||||
snmp3_security_level : $('#snmp3_browser_security_level').val(),
|
||||
snmp3_auth_method : $('#snmp3_browser_auth_method').val(),
|
||||
snmp3_auth_pass : $('#password-snmp3_browser_auth_pass').val(),
|
||||
snmp3_privacy_method : $('#snmp3_browser_privacy_method').val(),
|
||||
snmp3_privacy_pass : $('#password-snmp3_browser_privacy_pass').val(),
|
||||
tcp_port : $('#target_port').val(),
|
||||
};
|
||||
|
||||
// Append values to form.
|
||||
var input = "";
|
||||
|
||||
$.each( snmp_target, function( key, val ) {
|
||||
input = $("<input>")
|
||||
.attr("type", "hidden")
|
||||
.attr("name", key).val(val);
|
||||
|
||||
$("#snmp_create_module").append(input);
|
||||
});
|
||||
|
||||
//Submit form to agent module url.
|
||||
$("#snmp_create_module").attr(
|
||||
"action",
|
||||
"index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente="
|
||||
+id_agent+
|
||||
"&tab=module&edit_module=1"
|
||||
);
|
||||
|
||||
$('#snmp_create_module').submit();
|
||||
},
|
||||
onDeny: function () {
|
||||
$("#dialog_create_module").dialog("close");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
onDeny: function () {
|
||||
$("#dialog_create_module").dialog("close");
|
||||
return false;
|
||||
}
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
$("#dialog_create_module").dialog({
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
width: '300',
|
||||
height:'auto',
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
buttons:
|
||||
[
|
||||
{
|
||||
class: "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-cancel",
|
||||
text: '<?php echo __('Cancel'); ?>',
|
||||
click: function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
class: "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||
text: '<?php echo __('Create module'); ?>',
|
||||
click: function(e) {
|
||||
|
||||
confirmDialog({
|
||||
title: '<?php echo __('Are you sure?'); ?>',
|
||||
message: '<?php echo __('Are you sure you want add module?'); ?> ',
|
||||
ok: '<?php echo __('OK'); ?>',
|
||||
cancel: '<?php echo __('Cancel'); ?>',
|
||||
onAccept: function() {
|
||||
|
||||
// Get id agent and add it to form.
|
||||
id_agent = $('#hidden-id_agent').val();
|
||||
|
||||
// Get SNMP target.
|
||||
var snmp_target = {
|
||||
|
||||
target_ip : $('#text-target_ip').val(),
|
||||
community : $('#text-community').val(),
|
||||
snmp_version : $('#snmp_browser_version').val(),
|
||||
snmp3_auth_user : $('#text-snmp3_browser_auth_user').val(),
|
||||
snmp3_security_level : $('#snmp3_browser_security_level').val(),
|
||||
snmp3_auth_method : $('#snmp3_browser_auth_method').val(),
|
||||
snmp3_auth_pass : $('#password-snmp3_browser_auth_pass').val(),
|
||||
snmp3_privacy_method : $('#snmp3_browser_privacy_method').val(),
|
||||
snmp3_privacy_pass : $('#password-snmp3_browser_privacy_pass').val(),
|
||||
tcp_port : $('#target_port').val(),
|
||||
};
|
||||
|
||||
// Append values to form.
|
||||
var input = "";
|
||||
|
||||
$.each( snmp_target, function( key, val ) {
|
||||
input = $("<input>")
|
||||
.attr("type", "hidden")
|
||||
.attr("name", key).val(val);
|
||||
|
||||
$("#snmp_create_module").append(input);
|
||||
});
|
||||
|
||||
//Submit form to agent module url.
|
||||
$("#snmp_create_module").attr(
|
||||
"action",
|
||||
"index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente="
|
||||
+id_agent+
|
||||
"&tab=module&edit_module=1"
|
||||
);
|
||||
|
||||
$('#snmp_create_module').submit();
|
||||
},
|
||||
onDeny: function () {
|
||||
$("#dialog_create_module").dialog("close");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -475,7 +475,12 @@ $skin = '';
|
|||
'Dashboard' => __('Dashboard'),
|
||||
];
|
||||
|
||||
$home_screen .= html_print_select($values, 'section', io_safe_output($user_info['section']), 'show_data_section();', '', -1, true, false, false).'</div>';
|
||||
if (is_metaconsole() === true) {
|
||||
$home_screen .= html_print_select($values, 'metaconsole_section', io_safe_output($user_info['section']), 'show_data_section();', '', -1, true, false, false).'</div>';
|
||||
} else {
|
||||
$home_screen .= html_print_select($values, 'section', io_safe_output($user_info['section']), 'show_data_section();', '', -1, true, false, false).'</div>';
|
||||
}
|
||||
|
||||
|
||||
$dashboards = Manager::getDashboards(
|
||||
-1,
|
||||
|
@ -558,6 +563,10 @@ $skin = '';
|
|||
$double_authentication .= '</div>';
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true && empty($user_info['metaconsole_default_event_filter']) !== true) {
|
||||
$user_info['default_event_filter'] = $user_info['metaconsole_default_event_filter'];
|
||||
}
|
||||
|
||||
if ((bool) check_acl($config['id_user'], 0, 'ER') === true) {
|
||||
$event_filter = '<div class="label_select"><p class="edit_user_labels">'.__('Event filter').'</p>';
|
||||
$user_groups = implode(',', array_keys((users_get_groups($config['id_user'], 'AR', true))));
|
||||
|
|
|
@ -173,7 +173,7 @@ if ($vconsole_write || $vconsole_manage) {
|
|||
]
|
||||
).'</a>';
|
||||
$options['editor']['text'] = '<a href="'.$url_base.$action.'&tab=editor&id_visual_console='.$id_layout.'">'.html_print_image(
|
||||
'images/builder.png',
|
||||
'images/builder@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Builder'),
|
||||
|
@ -192,30 +192,41 @@ $options['view']['text'] = '<a href="index.php?sec=network&sec2=operation/visual
|
|||
).'</a>';
|
||||
$options['view']['active'] = true;
|
||||
|
||||
if (!is_metaconsole()) {
|
||||
if (!$config['pure']) {
|
||||
$options['pure']['text'] = '<a href="index.php?sec=network&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$refr.'&pure=1">'.html_print_image(
|
||||
'images/full_screen.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Full screen mode'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
ui_print_page_header(
|
||||
$layout_name,
|
||||
'images/visual_console.png',
|
||||
false,
|
||||
'visual_console_view',
|
||||
false,
|
||||
$options
|
||||
);
|
||||
}
|
||||
if (!$config['pure']) {
|
||||
$options['pure']['text'] = '<a href="index.php?sec=network&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$refr.'&pure=1">'.html_print_image(
|
||||
'images/full_screen.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Full screen mode'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
|
||||
// Set the hidden value for the javascript
|
||||
ui_print_standard_header(
|
||||
$layout_name,
|
||||
'images/visual_console.png',
|
||||
false,
|
||||
'visual_console_view',
|
||||
false,
|
||||
$options,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Visual console'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
if (!is_metaconsole()) {
|
||||
// Set the hidden value for the javascript.
|
||||
html_print_input_hidden('metaconsole', 0);
|
||||
} else {
|
||||
// Set the hidden value for the javascript
|
||||
// Set the hidden value for the javascript.
|
||||
html_print_input_hidden('metaconsole', 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.771
|
||||
%define release 230517
|
||||
%define release 230524
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.771
|
||||
%define release 230517
|
||||
%define release 230524
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.771
|
||||
%define release 230517
|
||||
%define release 230524
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -1297,6 +1297,8 @@ CREATE TABLE IF NOT EXISTS `tusuario` (
|
|||
`shortcut_data` TEXT,
|
||||
`section` TEXT,
|
||||
`data_section` TEXT,
|
||||
`metaconsole_section` VARCHAR(255) NOT NULL DEFAULT 'Default',
|
||||
`metaconsole_data_section` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`force_change_pass` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`last_pass_change` DATETIME,
|
||||
`last_failed_login` DATETIME,
|
||||
|
@ -1311,6 +1313,7 @@ CREATE TABLE IF NOT EXISTS `tusuario` (
|
|||
`id_filter` INT UNSIGNED NULL DEFAULT NULL,
|
||||
`session_time` INT signed NOT NULL DEFAULT 0,
|
||||
`default_event_filter` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`metaconsole_default_event_filter` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`show_tips_startup` TINYINT UNSIGNED NOT NULL DEFAULT 1,
|
||||
`autorefresh_white_list` TEXT ,
|
||||
`time_autorefresh` INT UNSIGNED NOT NULL DEFAULT 30,
|
||||
|
@ -1727,6 +1730,7 @@ CREATE TABLE IF NOT EXISTS `tlayout_data` (
|
|||
`label_position` VARCHAR(50) NOT NULL DEFAULT 'down',
|
||||
`border_color` VARCHAR(200) DEFAULT '',
|
||||
`fill_color` VARCHAR(200) DEFAULT '',
|
||||
`recursive_group` TINYINT NOT NULL DEFAULT 0,
|
||||
`show_statistics` TINYINT NOT NULL DEFAULT 0,
|
||||
`linked_layout_node_id` INT NOT NULL DEFAULT 0,
|
||||
`linked_layout_status_type` ENUM ('default', 'weight', 'service') DEFAULT 'default',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.771-230517
|
||||
Version: 7.0NG.771-230524
|
||||
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.771-230517"
|
||||
pandora_version="7.0NG.771-230524"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.771";
|
||||
my $pandora_build = "230517";
|
||||
my $pandora_build = "230524";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|