Changes
This commit is contained in:
parent
9d0f465874
commit
dccd950e9e
|
@ -98,7 +98,7 @@ if (!empty($files)) {
|
|||
// Last modification
|
||||
// Public URL
|
||||
$data[4] = '';
|
||||
$table->cellclass[][4] = 'action_buttons';
|
||||
$table->cellclass[][4] = 'table_action_buttons';
|
||||
if (!empty($file['hash'])) {
|
||||
$public_url = ui_get_full_url(
|
||||
EXTENSIONS_DIR.'/files_repo/files_repo_get_file.php?file='.$file['hash']
|
||||
|
|
|
@ -269,7 +269,7 @@ foreach ($result as $row) {
|
|||
|
||||
$data[2] = mb_substr($row['descripcion'], 0, 60);
|
||||
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$table->cellclass[][3] = 'table_action_buttons';
|
||||
$data[3] = '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'&delete_module='.$row['id_agente_modulo'].'">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter', 'border' => '0', 'alt' => __('Delete'), 'onclick' => "if (!confirm('".__('Are you sure?')."')) return false;"]).'</a>';
|
||||
$data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$row['id_agente_modulo'].'">'.html_print_image('images/config.png', true, ['class' => 'invert_filter', 'border' => '0', 'alt' => __('Update')]).'</a>';
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -150,7 +150,7 @@ foreach ($fields as $field) {
|
|||
);
|
||||
}
|
||||
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$table->cellclass[][3] = 'table_action_buttons';
|
||||
$data[3] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field&id_field='.$field['id_field'].'">'.html_print_image('images/config.png', true, ['alt' => __('Edit'), 'title' => __('Edit'), 'border' => '0', 'class' => 'invert_filter']).'</a>';
|
||||
$data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'border' => '0', 'class' => 'invert_filter']).'</a>';
|
||||
|
||||
|
|
|
@ -905,7 +905,7 @@ if ($agents !== false) {
|
|||
$offsetArg = $offset;
|
||||
}
|
||||
|
||||
echo "<td class='$tdcolor action_buttons' align='left' width=7% valign='middle'>";
|
||||
echo "<td class='$tdcolor table_action_buttons' align='left' width=7% valign='middle'>";
|
||||
|
||||
if ($agent['disabled']) {
|
||||
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
||||
|
|
|
@ -196,12 +196,12 @@ if ($show_creation === true) {
|
|||
// Create module/type combo.
|
||||
$tableCreateModule = new stdClass();
|
||||
$tableCreateModule->id = 'create';
|
||||
$tableCreateModule->class = 'pacullos';
|
||||
$tableCreateModule->width = '100%';
|
||||
$tableCreateModule->data = [];
|
||||
$tableCreateModule->style = [];
|
||||
|
||||
$tableCreateModule->data['caption_type'] = '<form id="create_module_type" method="post" action="'.$url.'">';
|
||||
$tableCreateModule->data['caption_type'] .= html_print_input_hidden('edit_module', 1);
|
||||
$tableCreateModule->data['caption_type'] = html_print_input_hidden('edit_module', 1);
|
||||
$tableCreateModule->data['caption_type'] .= __('Type');
|
||||
$tableCreateModule->data['type'] = html_print_select(
|
||||
$modules,
|
||||
|
@ -215,33 +215,22 @@ if ($show_creation === true) {
|
|||
false,
|
||||
'',
|
||||
false,
|
||||
'max-width:400px;'
|
||||
'width:380px;'
|
||||
);
|
||||
|
||||
$tableCreateModule->data['submitButton'] = html_print_submit_button(
|
||||
__('Create'),
|
||||
'updbutton',
|
||||
false,
|
||||
// Link for get more modules.
|
||||
if ((bool) $config['disable_help'] === false) {
|
||||
$tableCreateModule->data['get_more_modules'] = html_print_anchor(
|
||||
[
|
||||
'icon' => 'next',
|
||||
'mode' => 'mini secondary',
|
||||
'href' => 'https://pandorafms.com/Library/Library/',
|
||||
'target' => '_blank',
|
||||
'class' => 'color-black-grey',
|
||||
'content' => __('Get more modules on Monitoring Library'),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$tableCreateModule->data['submitButton'] .= '</form>';
|
||||
}
|
||||
|
||||
// echo '</table>';
|
||||
/*
|
||||
if (!$config['disable_help']) {
|
||||
echo '<div class="disable_help">';
|
||||
echo '<strong>';
|
||||
echo "<a class='color-black-grey invert_filter' target='_blank' href='https://pandorafms.com/Library/Library/'>".__('Get more modules on Monitoring Library').'</a>';
|
||||
echo '</strong>';
|
||||
echo '</div>';
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
if (isset($id_agente) === false) {
|
||||
return;
|
||||
|
@ -1083,9 +1072,9 @@ foreach ($modules as $module) {
|
|||
$data[7] = '';
|
||||
}
|
||||
|
||||
if ($module['disabled']) {
|
||||
if ((bool) $module['disabled'] === true) {
|
||||
$data[8] = "<a href='index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente=".$id_agente.'&enable_module='.$module['id_agente_modulo']."'>".html_print_image(
|
||||
'images/lightbulb_off.png',
|
||||
'images/svg/change-active.svg',
|
||||
true,
|
||||
[
|
||||
'alt' => __('Enable module'),
|
||||
|
@ -1095,7 +1084,7 @@ foreach ($modules as $module) {
|
|||
).'</a>';
|
||||
} else {
|
||||
$data[8] = "<a href='index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente=".$id_agente.'&disable_module='.$module['id_agente_modulo']."'>".html_print_image(
|
||||
'images/lightbulb.png',
|
||||
'images/svg/change-pause.svg',
|
||||
true,
|
||||
[
|
||||
'alt' => __('Disable module'),
|
||||
|
@ -1108,7 +1097,7 @@ foreach ($modules as $module) {
|
|||
$data[8] .= '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&duplicate_module='.$module['id_agente_modulo'].'"
|
||||
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
$data[8] .= html_print_image(
|
||||
'images/copy.png',
|
||||
'images/svg/duplicate.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Duplicate'),
|
||||
|
@ -1118,11 +1107,11 @@ foreach ($modules as $module) {
|
|||
$data[8] .= '</a> ';
|
||||
|
||||
// Make a data normalization.
|
||||
if (isset($numericModules[$type])) {
|
||||
if (isset($numericModules[$type]) === true) {
|
||||
if ($numericModules[$type] === true) {
|
||||
$data[8] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
$data[8] .= html_print_image(
|
||||
'images/chart.png',
|
||||
'images/svg/module-graph.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Normalize'),
|
||||
|
@ -1133,16 +1122,19 @@ foreach ($modules as $module) {
|
|||
}
|
||||
} else {
|
||||
$data[8] .= html_print_image(
|
||||
'images/chart_curve.disabled.png',
|
||||
'images/svg/module-graph.svg',
|
||||
true,
|
||||
['title' => __('Normalize (Disabled)')]
|
||||
[
|
||||
'title' => __('Normalize (Disabled)'),
|
||||
'style' => 'opacity: 0.5;',
|
||||
]
|
||||
);
|
||||
$data[8] .= ' ';
|
||||
}
|
||||
|
||||
// Create network component action.
|
||||
if ((is_user_admin($config['id_user']))
|
||||
&& ($module['id_modulo'] == MODULE_NETWORK)
|
||||
if ((is_user_admin($config['id_user']) === true)
|
||||
&& ((int) $module['id_modulo'] === MODULE_NETWORK)
|
||||
) {
|
||||
$data[8] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_components&create_network_from_module=1&id_agente='.$id_agente.'&create_module_from='.$module['id_agente_modulo'].'"
|
||||
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
|
@ -1170,7 +1162,7 @@ foreach ($modules as $module) {
|
|||
$data[9] = '<a 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;">';
|
||||
$data[9] .= html_print_image(
|
||||
'images/cross.png',
|
||||
'images/svg/delete.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Delete'),
|
||||
|
@ -1181,13 +1173,13 @@ foreach ($modules as $module) {
|
|||
}
|
||||
|
||||
$table->cellclass[] = [
|
||||
8 => 'action_buttons',
|
||||
9 => 'action_buttons',
|
||||
8 => 'table_action_buttons',
|
||||
9 => 'table_action_buttons',
|
||||
];
|
||||
array_push($table->data, $data);
|
||||
$table->cellclass[] = [
|
||||
8 => 'action_buttons',
|
||||
9 => 'action_buttons',
|
||||
8 => 'table_action_buttons',
|
||||
9 => 'table_action_buttons',
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -1254,12 +1246,12 @@ if ((bool) check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === tr
|
|||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Add'),
|
||||
'create_module_dialog',
|
||||
__('Create'),
|
||||
'create_module',
|
||||
false,
|
||||
[
|
||||
'icon' => 'add',
|
||||
'mode' => 'secondary mini',
|
||||
'icon' => 'next',
|
||||
'mode' => 'mini secondary',
|
||||
],
|
||||
true
|
||||
),
|
||||
|
@ -1281,7 +1273,6 @@ if ((bool) check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === tr
|
|||
<script type="text/javascript">
|
||||
|
||||
function create_module_dialog(){
|
||||
console.log('holaaa');
|
||||
$('#modal')
|
||||
.dialog({
|
||||
title: '<?php echo __('Create Module'); ?>',
|
||||
|
|
|
@ -395,9 +395,9 @@ if ($id_agent_module) {
|
|||
);
|
||||
}
|
||||
} else {
|
||||
if (isset($moduletype) === false) {
|
||||
if (isset($moduletype) === false || $moduletype === 0) {
|
||||
$moduletype = (string) get_parameter('moduletype');
|
||||
if ($_SESSION['create_module'] && $config['welcome_state'] == 1) {
|
||||
if ((bool) $_SESSION['create_module'] === true && (bool) $config['welcome_state'] === true) {
|
||||
$moduletype = 'networkserver';
|
||||
}
|
||||
|
||||
|
@ -579,11 +579,11 @@ if ($__code_from !== 'policies') {
|
|||
$tag_acl = true;
|
||||
|
||||
// If edit a existing module.
|
||||
if (!empty($id_agent_module)) {
|
||||
if (empty($id_agent_module) === false) {
|
||||
$tag_acl = tags_check_acl_by_module($id_agent_module);
|
||||
}
|
||||
|
||||
if (!$tag_acl) {
|
||||
if ($tag_acl !== true) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access agent manager'
|
||||
|
@ -593,16 +593,15 @@ if ($__code_from !== 'policies') {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
switch ($moduletype) {
|
||||
case 'dataserver':
|
||||
case MODULE_DATA:
|
||||
$moduletype = MODULE_DATA;
|
||||
// Has remote configuration ?
|
||||
$remote_conf = false;
|
||||
if (enterprise_installed()) {
|
||||
if (enterprise_installed() === true) {
|
||||
enterprise_include_once('include/functions_config_agents.php');
|
||||
$remote_conf = enterprise_hook(
|
||||
$remote_conf = (bool) enterprise_hook(
|
||||
'config_agents_has_remote_configuration',
|
||||
[$id_agente]
|
||||
);
|
||||
|
@ -619,7 +618,7 @@ switch ($moduletype) {
|
|||
];
|
||||
include 'module_manager_editor_common.php';
|
||||
include 'module_manager_editor_data.php';
|
||||
if ($config['enterprise_installed'] && $remote_conf) {
|
||||
if ((bool) $config['enterprise_installed'] === true && $remote_conf === true) {
|
||||
if ($id_agent_module) {
|
||||
enterprise_include_once('include/functions_config_agents.php');
|
||||
$configuration_data = enterprise_hook(
|
||||
|
@ -647,7 +646,7 @@ switch ($moduletype) {
|
|||
4,
|
||||
5,
|
||||
];
|
||||
if (enterprise_installed()) {
|
||||
if (enterprise_installed() === true) {
|
||||
$categories[] = 10;
|
||||
}
|
||||
|
||||
|
@ -698,7 +697,7 @@ switch ($moduletype) {
|
|||
$moduletype = MODULE_WEB;
|
||||
// Remove content of $ip_target when it is ip_agent because
|
||||
// it is used as HTTP auth (server) ....ONLY IN NEW MODULE!!!
|
||||
if (empty($id_agent_module)
|
||||
if (empty($id_agent_module) === true
|
||||
&& ($ip_target === agents_get_address($id_agente))
|
||||
) {
|
||||
$ip_target = '';
|
||||
|
@ -722,8 +721,8 @@ switch ($moduletype) {
|
|||
}
|
||||
|
||||
|
||||
if ($config['enterprise_installed'] && $id_agent_module) {
|
||||
if (policies_is_module_in_policy($id_agent_module)) {
|
||||
if ((bool) $config['enterprise_installed'] === true && $id_agent_module) {
|
||||
if (policies_is_module_in_policy($id_agent_module) === true) {
|
||||
policies_add_policy_linkation($id_agent_module);
|
||||
}
|
||||
}
|
||||
|
@ -764,7 +763,6 @@ if ($moduletype != 13) {
|
|||
}
|
||||
|
||||
// Submit.
|
||||
echo '<div class="action-buttons" style="width: '.$table_simple->width.'">';
|
||||
if ($id_agent_module) {
|
||||
$actionButtons = html_print_submit_button(
|
||||
__('Update'),
|
||||
|
@ -785,50 +783,40 @@ if ($id_agent_module) {
|
|||
true
|
||||
);
|
||||
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => $actionButtons,
|
||||
]
|
||||
$actionButtons .= html_print_input_hidden('update_module', 1);
|
||||
$actionButtons .= html_print_input_hidden('id_agent_module', $id_agent_module);
|
||||
$actionButtons .= html_print_input_hidden('id_module_type', $id_module_type);
|
||||
|
||||
html_print_action_buttons(
|
||||
$actionButtons,
|
||||
[ 'type' => 'form_action' ]
|
||||
);
|
||||
|
||||
html_print_input_hidden('update_module', 1);
|
||||
html_print_input_hidden('id_agent_module', $id_agent_module);
|
||||
html_print_input_hidden('id_module_type', $id_module_type);
|
||||
|
||||
if ($config['enterprise_installed'] && $remote_conf) {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var check_remote_conf = true;
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
$actionButtons = html_print_submit_button(
|
||||
__('Create'),
|
||||
'crtbutton',
|
||||
false,
|
||||
[ 'icon' => 'wand' ],
|
||||
true
|
||||
),
|
||||
]
|
||||
);
|
||||
html_print_input_hidden('id_module', $moduletype);
|
||||
html_print_input_hidden('create_module', 1);
|
||||
|
||||
if ($config['enterprise_installed'] && $remote_conf) {
|
||||
$actionButtons .= html_print_input_hidden('id_module', $moduletype);
|
||||
$actionButtons .= html_print_input_hidden('create_module', 1);
|
||||
|
||||
html_print_action_buttons(
|
||||
$actionButtons,
|
||||
['type' => 'form_action']
|
||||
);
|
||||
}
|
||||
|
||||
if ((bool) $config['enterprise_installed'] === true && $remote_conf === true) {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var check_remote_conf = true;
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
||||
ui_require_jquery_file('ui');
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -194,7 +194,7 @@ $update_module_id = (int) get_parameter_get('update_module');
|
|||
$edit_module = (bool) get_parameter_get('edit_module');
|
||||
$table_simple = new stdClass();
|
||||
$table_simple->id = 'simple';
|
||||
$table_simple->class = 'w100p mrgn_10px';
|
||||
$table_simple->class = 'w100p mrgn_10px floating_form';
|
||||
$table_simple->data = [];
|
||||
$table_simple->style = [];
|
||||
$table_simple->cellclass = [];
|
||||
|
@ -220,13 +220,13 @@ if (empty($id_agent_module) === false && isset($id_agente) === true) {
|
|||
$moduleIdContent = '';
|
||||
}
|
||||
|
||||
$table_simple->data[$dataRow][$dataCol++] = __('Name');
|
||||
$table_simple->data[$dataRow][$dataCol++] = html_print_input_text_extended(
|
||||
$table_simple->data['caption_module_name'][0] = __('Name');
|
||||
$table_simple->data['module_name'][0] = html_print_input_text_extended(
|
||||
'name',
|
||||
$name,
|
||||
'text-name',
|
||||
'',
|
||||
45,
|
||||
65,
|
||||
100,
|
||||
$disabledBecauseInPolicy,
|
||||
'',
|
||||
|
@ -246,9 +246,17 @@ if ($policy_link != 0) {
|
|||
$disabled_enable = 1;
|
||||
}
|
||||
|
||||
$table_simple->cellclass[$dataRow][$dataCol] = 'flex_center ';
|
||||
$table_simple->data[$dataRow][$dataCol] = __('Disabled');
|
||||
$table_simple->data[$dataRow][$dataCol++] .= html_print_checkbox(
|
||||
$table_simple->rowclass['disable_module'] = 'flex_center ';
|
||||
$table_simple->data['disable_module'][0] = __('Disabled');
|
||||
$table_simple->data['disable_module'][1] .= html_print_checkbox_switch(
|
||||
'disabled',
|
||||
1,
|
||||
$disabled,
|
||||
true,
|
||||
$disabled_enable
|
||||
);
|
||||
/*
|
||||
html_print_checkbox(
|
||||
'disabled',
|
||||
1,
|
||||
$disabled,
|
||||
|
@ -259,13 +267,18 @@ $table_simple->data[$dataRow][$dataCol++] .= html_print_checkbox(
|
|||
'',
|
||||
'',
|
||||
'style="margin-left: 5px;"'
|
||||
);
|
||||
|
||||
$dataRow++;
|
||||
$dataCol = 0;
|
||||
$table_simple->data[$dataRow][$dataCol++] = __('Module group');
|
||||
$table_simple->colspan[$dataRow][$dataCol] = '3';
|
||||
$table_simple->data[$dataRow][$dataCol++] .= html_print_select_from_sql(
|
||||
);
|
||||
*/
|
||||
// Caption for Module group and Type.
|
||||
$table_simple->cellstyle['captions_module_n_type'][0] = 'width: 50%;';
|
||||
$table_simple->cellstyle['captions_module_n_type'][1] = 'width: 50%;';
|
||||
$table_simple->data['captions_module_n_type'][0] = html_print_input_hidden('id_module_type_hidden', $id_module_type, true);
|
||||
$table_simple->data['captions_module_n_type'][0] .= __('Module group');
|
||||
$table_simple->data['captions_module_n_type'][1] = __('Type').ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help');
|
||||
// Module group and Type.
|
||||
$table_simple->cellstyle['module_n_type'][0] = 'width: 50%;';
|
||||
$table_simple->cellstyle['module_n_type'][1] = 'width: 50%;';
|
||||
$table_simple->data['module_n_type'][0] .= html_print_select_from_sql(
|
||||
'SELECT id_mg, name FROM tmodule_group ORDER BY name',
|
||||
'id_module_group',
|
||||
$id_module_group,
|
||||
|
@ -276,10 +289,10 @@ $table_simple->data[$dataRow][$dataCol++] .= html_print_select_from_sql(
|
|||
false,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 280px'
|
||||
'width: 480px'
|
||||
);
|
||||
|
||||
if ((isset($id_agent_module) === true && $id_agent_module) || $id_policy_module != 0) {
|
||||
if ((isset($id_agent_module) === true && $id_agent_module > 0) || (int) $id_policy_module !== 0) {
|
||||
$edit = false;
|
||||
} else {
|
||||
$edit = true;
|
||||
|
@ -287,12 +300,6 @@ if ((isset($id_agent_module) === true && $id_agent_module) || $id_policy_module
|
|||
|
||||
$in_policy = strstr($page, 'policy_modules');
|
||||
|
||||
$dataRow++;
|
||||
$dataCol = 0;
|
||||
$table_simple->data[$dataRow][$dataCol] .= html_print_input_hidden('id_module_type_hidden', $id_module_type, true);
|
||||
$table_simple->data[$dataRow][$dataCol++] = __('Type').ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help');
|
||||
$table_simple->colspan[$dataRow][$dataCol] = '3';
|
||||
|
||||
if ($edit === false) {
|
||||
$sql = sprintf(
|
||||
'SELECT id_tipo, nombre
|
||||
|
@ -309,23 +316,18 @@ if ($edit === false) {
|
|||
$type_names_hash[$tn['id_tipo']] = $tn['nombre'];
|
||||
}
|
||||
|
||||
$table_simple->data[$dataRow][$dataCol] = '<em>'.modules_get_moduletype_description($id_module_type).' ('.$type_names_hash[$id_module_type].')</em>';
|
||||
$table_simple->data[$dataRow][$dataCol] .= html_print_input_hidden(
|
||||
$table_simple->data['module_n_type'][1] = '<em>'.modules_get_moduletype_description($id_module_type).' ('.$type_names_hash[$id_module_type].')</em>';
|
||||
$table_simple->data['module_n_type'][1] .= html_print_input_hidden(
|
||||
'type_names',
|
||||
base64_encode(io_json_mb_encode($type_names_hash)),
|
||||
true
|
||||
);
|
||||
} else {
|
||||
if (isset($id_module_type) === true) {
|
||||
$idModuleType = $id_module_type;
|
||||
} else {
|
||||
$idModuleType = '';
|
||||
}
|
||||
|
||||
$idModuleType = (isset($id_module_type) === true) ? $idModuleType : '';
|
||||
// Removed web analysis and log4x from select.
|
||||
$tipe_not_in = '24, 25';
|
||||
if (is_metaconsole() === true) {
|
||||
$tipe_not_in = '24, 25, 34, 35, 36, 37';
|
||||
$tipe_not_in .= ', 34, 35, 36, 37';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
|
@ -351,7 +353,7 @@ if ($edit === false) {
|
|||
}
|
||||
}
|
||||
|
||||
$table_simple->data[$dataRow][$dataCol] = html_print_select(
|
||||
$table_simple->data['module_n_type'][1] = html_print_select(
|
||||
$type_description_hash,
|
||||
'id_module_type',
|
||||
$idModuleType,
|
||||
|
@ -363,24 +365,24 @@ if ($edit === false) {
|
|||
false,
|
||||
'',
|
||||
false,
|
||||
'width: 280px;',
|
||||
'width: 480px;',
|
||||
false,
|
||||
100
|
||||
);
|
||||
|
||||
// Store the relation between id and name of the types on a hidden field.
|
||||
$table_simple->data[$dataRow][$dataCol] .= html_print_input_hidden(
|
||||
$table_simple->data['module_n_type'][1] .= html_print_input_hidden(
|
||||
'type_names',
|
||||
base64_encode(io_json_mb_encode($type_names_hash)),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
if ($edit_module) {
|
||||
if ($edit_module === true) {
|
||||
$id_module_type = (int) $id_module_type;
|
||||
if (($id_module_type >= 1 && $id_module_type <= 5)
|
||||
|| ($id_module_type >= 21 && $id_module_type <= 23)
|
||||
|| ($id_module_type == 100)
|
||||
|| ($id_module_type === 100)
|
||||
) {
|
||||
$help_header = 'local_module';
|
||||
}
|
||||
|
@ -403,116 +405,148 @@ if ($edit_module) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($disabledBecauseInPolicy) {
|
||||
$table_simple->data[$dataRow][3] .= html_print_input_hidden(
|
||||
if ((bool) $disabledBecauseInPolicy === true) {
|
||||
$table_simple->data['module'][0] .= html_print_input_hidden(
|
||||
'id_module_group',
|
||||
$id_module_group,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$dataRow++;
|
||||
$table_simple->data[$dataRow][0] .= __('Warning threshold');
|
||||
$table_simple->cellclass[$dataRow][1] = 'module_thresholds_fields';
|
||||
if (modules_is_string_type($id_module_type) === false || $edit === true) {
|
||||
$table_simple->data[$dataRow][1] .= '<span class="flex_center" id="minmax_warning"><em>'.__('Min. ').'</em>';
|
||||
$table_simple->data[$dataRow][1] .= html_print_input_text(
|
||||
// Thresholds Table.
|
||||
$tableBasicThresholds = new stdClass();
|
||||
$tableBasicThresholds->class = 'w100p table_section';
|
||||
$tableBasicThresholds->id = 'basic_thresholds';
|
||||
$tableBasicThresholds->style = [];
|
||||
$tableBasicThresholds->data = [];
|
||||
|
||||
// WARNING THRESHOLD.
|
||||
if (modules_is_string_type($id_module_type) === false) {
|
||||
$tableBasicThresholds->cellclass['caption_warning_threshold'] = 'show_hide_thresholds_minmax';
|
||||
$tableBasicThresholds->cellclass['warning_threshold'] = 'show_hide_thresholds_minmax';
|
||||
$tableBasicThresholds->data['caption_warning_threshold'][0] .= __('Warning threshold').' ('.__('Min / Max').')';
|
||||
$tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text(
|
||||
'min_warning',
|
||||
$min_warning,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
$disabledBecauseInPolicy || $edit === true,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
$table_simple->data[$dataRow][1] .= '<em>'.__('Max.').'</em>';
|
||||
$table_simple->data[$dataRow][1] .= html_print_input_text(
|
||||
$tableBasicThresholds->data['warning_threshold'][1] .= html_print_input_text(
|
||||
'max_warning',
|
||||
$max_warning,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
$disabledBecauseInPolicy || $edit === true,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
).'</span>';
|
||||
|
||||
$tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_switch_radio_button(
|
||||
[
|
||||
html_print_radio_button_extended('warning_thresholds_checks', 'normal_warning', __('Normal'), ($percentage_warning && $warning_inverse) === false, false, '', '', true, false, '', 'radius-normal_warning'),
|
||||
html_print_radio_button_extended('warning_thresholds_checks', 'warning_inverse', __('Inverse interval'), $warning_inverse, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-warning_inverse'),
|
||||
html_print_radio_button_extended('warning_thresholds_checks', 'percentage_warning', __('Percentage'), $percentage_warning, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-percentage_warning'),
|
||||
],
|
||||
[],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
if (modules_is_string_type($id_module_type) === true || $edit === true) {
|
||||
$table_simple->data[$dataRow][1] .= '<span id="string_warning"><em>'.__('Str.').'</em>';
|
||||
$table_simple->data[$dataRow][1] .= html_print_input_text(
|
||||
if (modules_is_string_type($id_module_type) === true) {
|
||||
$tableBasicThresholds->cellclass['caption_warning_threshold'] = 'show_hide_thresholds_string';
|
||||
$tableBasicThresholds->cellclass['warning_threshold'] = 'show_hide_thresholds_string';
|
||||
$tableBasicThresholds->data['caption_warning_threshold'][0] .= __('Warning threshold').' ('.__('Str.').')';
|
||||
$tableBasicThresholds->data['warning_threshold'][1] .= html_print_input_text(
|
||||
'str_warning',
|
||||
str_replace('"', '', $str_warning),
|
||||
'',
|
||||
10,
|
||||
1024,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
$disabledBecauseInPolicy || $edit === false,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
).'</span>';
|
||||
}
|
||||
|
||||
$table_simple->data[$dataRow][1] .= '<div class="flex_center" id="warning_inverse"><em>'.__('Inverse interval').'</em>';
|
||||
$table_simple->data[$dataRow][1] .= html_print_checkbox('warning_inverse', 1, $warning_inverse, true, $disabledBecauseInPolicy);
|
||||
$table_simple->data[$dataRow][1] .= '</div>';
|
||||
$divPercentageContent = __('Percentage');
|
||||
$divPercentageContent .= html_print_checkbox_switch('percentage_warning', 1, $percentage_warning, true, $disabledBecauseInPolicy);
|
||||
$divPercentageContent .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
|
||||
|
||||
if (modules_is_string_type($id_module_type) === false) {
|
||||
$table_simple->data[$dataRow][1] .= '<div class="flex_center" id="percentage_warning"><em>'.__('Percentage').'</em>';
|
||||
$table_simple->data[$dataRow][1] .= html_print_checkbox('percentage_warning', 1, $percentage_warning, true, $disabledBecauseInPolicy);
|
||||
$table_simple->data[$dataRow][1] .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
|
||||
$table_simple->data[$dataRow][1] .= '</div>';
|
||||
$tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_div(
|
||||
[
|
||||
'id' => 'percentage_warning',
|
||||
'content' => $divPercentageContent,
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (modules_is_string_type($id_module_type) === false || (bool) $edit === true) {
|
||||
$table_simple->cellstyle[$dataRow][2] = 'top: 160px; left: 700px; position: absolute; width: 280px;';
|
||||
$table_simple->colspan[$dataRow][2] = '2';
|
||||
$table_simple->data[$dataRow][2] = '<svg id="svg_dinamic" width="500" height="300"> </svg>';
|
||||
}
|
||||
|
||||
$dataRow++;
|
||||
$table_simple->data[$dataRow][0] = __('Critical threshold');
|
||||
$table_simple->cellclass[$dataRow][1] = 'module_thresholds_fields';
|
||||
if (modules_is_string_type($id_module_type) === false || $edit === true) {
|
||||
$table_simple->data[$dataRow][1] .= '<span class="flex_center" id="minmax_critical"><em>'.__('Min').'</em>';
|
||||
$table_simple->data[$dataRow][1] .= html_print_input_text(
|
||||
// CRITICAL THRESHOLD.
|
||||
$tableBasicThresholds->cellclass['caption_critical_threshold'] = 'show_hide_thresholds_minmax';
|
||||
$tableBasicThresholds->cellclass['critical_threshold'] = 'show_hide_thresholds_minmax';
|
||||
$tableBasicThresholds->data['caption_critical_threshold'][0] .= __('Critical threshold').' ('.__('Min / Max').')';
|
||||
$tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text(
|
||||
'min_critical',
|
||||
$min_critical,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
$disabledBecauseInPolicy || $edit === false,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
$table_simple->data[$dataRow][1] .= '<br /><em>'.__('Max').'</em>';
|
||||
$table_simple->data[$dataRow][1] .= html_print_input_text(
|
||||
);
|
||||
$tableBasicThresholds->data['critical_threshold'][1] .= html_print_input_text(
|
||||
'max_critical',
|
||||
$max_critical,
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
$disabledBecauseInPolicy || $edit === false,
|
||||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
).'</span>';
|
||||
}
|
||||
).'</span>';
|
||||
|
||||
if (modules_is_string_type($id_module_type) === true || $edit === true) {
|
||||
$table_simple->data[$dataRow][1] .= '<span class="flex_center" id="string_critical"><em>'.__('Str.').'</em>';
|
||||
$table_simple->data[$dataRow][1] .= html_print_input_text(
|
||||
$tableBasicThresholds->data['switch_critical_threshold'][0] .= html_print_switch_radio_button(
|
||||
[
|
||||
html_print_radio_button_extended('critical_thresholds_checks', 'normal_critical', __('Normal'), ($percentage_critical && $critical_inverse) === false, false, '', '', true, false, '', 'radius-normal_critical'),
|
||||
html_print_radio_button_extended('critical_thresholds_checks', 'critical_inverse', __('Inverse interval'), $critical_inverse, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-critical_inverse'),
|
||||
html_print_radio_button_extended('critical_thresholds_checks', 'percentage_critical', __('Percentage'), $percentage_critical, $disabledBecauseInPolicy, '', '', true, false, '', 'radius-percentage_critical'),
|
||||
],
|
||||
[],
|
||||
true
|
||||
);
|
||||
|
||||
$divPercentageContent = __('Percentage');
|
||||
$divPercentageContent .= html_print_checkbox_switch('percentage_critical', 1, $percentage_critical, true, $disabledBecauseInPolicy);
|
||||
$divPercentageContent .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
|
||||
|
||||
$tableBasicThresholds->data['switch_critical_threshold'][0] .= html_print_div(
|
||||
[
|
||||
'id' => 'percentage_critical',
|
||||
'content' => $divPercentageContent,
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$tableBasicThresholds->cellclass['caption_critical_threshold'] = 'show_hide_thresholds_string';
|
||||
$tableBasicThresholds->cellclass['critical_threshold'] = 'show_hide_thresholds_string';
|
||||
$tableBasicThresholds->data['caption_critical_threshold'][0] .= __('Critical threshold').' ('.__('Str.').')';
|
||||
$tableBasicThresholds->data['critical_threshold'][1] .= html_print_input_text(
|
||||
'str_critical',
|
||||
str_replace('"', '', $str_critical),
|
||||
'',
|
||||
|
@ -523,37 +557,30 @@ if (modules_is_string_type($id_module_type) === true || $edit === true) {
|
|||
false,
|
||||
'',
|
||||
$classdisabledBecauseInPolicy
|
||||
).'</span>';
|
||||
);
|
||||
|
||||
$table_simple->cellstyle['thresholds_table'][0] = 'width: 50%;';
|
||||
$table_simple->data['thresholds_table'][0] = html_print_table($tableBasicThresholds, true);
|
||||
if (modules_is_string_type($id_module_type) === false || (bool) $edit === true) {
|
||||
$table_simple->cellstyle['thresholds_table'][1] = 'width: 50%;';
|
||||
$table_simple->data['thresholds_table'][1] = '<svg id="svg_dinamic" width="500" height="300"> </svg>';
|
||||
}
|
||||
|
||||
$table_simple->data[$dataRow][1] .= '<div class="flex_center" id="critical_inverse"><em>'.__('Inverse interval').'</em>';
|
||||
$table_simple->data[$dataRow][1] .= html_print_checkbox('critical_inverse', 1, $critical_inverse, true, $disabledBecauseInPolicy);
|
||||
$table_simple->data[$dataRow][1] .= '</div>';
|
||||
|
||||
|
||||
if (modules_is_string_type($id_module_type) === false) {
|
||||
$table_simple->data[$dataRow][1] .= '<div class="flex_center" id="percentage_critical" /><em>'.__('Percentage').'</em>';
|
||||
$table_simple->data[$dataRow][1] .= html_print_checkbox('percentage_critical', 1, $percentage_critical, true, $disabledBecauseInPolicy);
|
||||
$table_simple->data[$dataRow][1] .= ui_print_help_tip('Defines threshold as a percentage of value decrease/increment', true);
|
||||
$table_simple->data[$dataRow][1] .= '</div>';
|
||||
}
|
||||
|
||||
$dataRow++;
|
||||
$table_simple->data[$dataRow][0] = __('Historical data');
|
||||
$table_simple->data['historical_data'][0] = __('Historical data');
|
||||
if ($disabledBecauseInPolicy) {
|
||||
// If is disabled, we send a hidden in his place and print a false
|
||||
// checkbox because HTML dont send disabled fields
|
||||
// and could be disabled by error.
|
||||
$table_simple->data[$dataRow][1] = html_print_checkbox(
|
||||
$table_simple->data['historical_data'][1] = html_print_checkbox_switch(
|
||||
'history_data_fake',
|
||||
1,
|
||||
$history_data,
|
||||
true,
|
||||
$disabledBecauseInPolicy
|
||||
);
|
||||
$table_simple->data[$dataRow][1] .= '<input type="hidden" name="history_data" value="'.(int) $history_data.'">';
|
||||
$table_simple->data['historical_data'][1] .= html_print_input_hidden('history_data', (int) $history_data, true);
|
||||
} else {
|
||||
$table_simple->data[$dataRow][1] = html_print_checkbox(
|
||||
$table_simple->data['historical_data'][1] = html_print_checkbox_switch(
|
||||
'history_data',
|
||||
1,
|
||||
$history_data,
|
||||
|
@ -574,9 +601,10 @@ $table_advanced->colspan = [];
|
|||
|
||||
$table_advanced->colspan[5][1] = 3;
|
||||
|
||||
$table_advanced->data[0][0] = __('Custom ID');
|
||||
$table_advanced->colspan[0][1] = 2;
|
||||
$table_advanced->data[0][1] = html_print_input_text(
|
||||
$table_advanced->data['captions_custom_id_unit'][0] = __('Custom ID');
|
||||
$table_advanced->data['captions_custom_id_unit'][1] = __('Unit');
|
||||
// $table_advanced->colspan[0][1] = 2;
|
||||
$table_advanced->data['custom_id_unit'][0] = html_print_input_text(
|
||||
'custom_id',
|
||||
$custom_id,
|
||||
'',
|
||||
|
@ -589,8 +617,7 @@ $table_advanced->data[0][1] = html_print_input_text(
|
|||
(($config['module_custom_id_ro'] && $__code_from != 'policies') ? 'readonly' : $classdisabledBecauseInPolicy)
|
||||
);
|
||||
|
||||
$table_advanced->data[0][3] = __('Unit');
|
||||
$table_advanced->data[0][4] = html_print_input_text(
|
||||
$table_advanced->data['custom_id_unit'][1] = html_print_input_text(
|
||||
'unit',
|
||||
$unit,
|
||||
'',
|
||||
|
@ -603,7 +630,7 @@ $table_advanced->data[0][4] = html_print_input_text(
|
|||
$classdisabledBecauseInPolicy
|
||||
);
|
||||
// $table_advanced->colspan[1][4] = 3;
|
||||
$table_advanced->data[0][4] = html_print_extended_select_for_unit(
|
||||
$table_advanced->data['custom_id_unit'][1] = html_print_extended_select_for_unit(
|
||||
'unit',
|
||||
$unit,
|
||||
'',
|
||||
|
@ -616,8 +643,163 @@ $table_advanced->data[0][4] = html_print_extended_select_for_unit(
|
|||
);
|
||||
$table_advanced->colspan[0][4] = 3;
|
||||
|
||||
// Tags
|
||||
global $__code_from;
|
||||
$table_advanced->data['caption_tags_module_parent'][0] = __('Tags available');
|
||||
$table_advanced->data['caption_tags_module_parent'][1] = __('Tags selected');
|
||||
$table_advanced->data['caption_tags_module_parent'][2] = __('Tags from policy');
|
||||
// Code comes from module_editor.
|
||||
if ($__code_from === 'modules') {
|
||||
$__table_modules = 'ttag_module';
|
||||
$__id_where = 'b.id_agente_modulo';
|
||||
$__id = (int) $id_agent_module;
|
||||
|
||||
$__sql = ' AND b.id_policy_module = 0';
|
||||
$__sql_policy = ' AND b.id_policy_module != 0';
|
||||
} else {
|
||||
// Code comes from policy module editor.
|
||||
global $__id_pol_mod;
|
||||
$__table_modules = 'ttag_policy_module';
|
||||
$__id_where = 'b.id_policy_module';
|
||||
$__id = $__id_pol_mod;
|
||||
|
||||
$__sql = '';
|
||||
}
|
||||
|
||||
if (tags_has_user_acl_tags($config['id_user']) === false) {
|
||||
$table_advanced->data['tags_module_parent'][0] = html_print_select_from_sql(
|
||||
"SELECT id_tag, name
|
||||
FROM ttag
|
||||
WHERE id_tag NOT IN (
|
||||
SELECT a.id_tag
|
||||
FROM ttag a, $__table_modules b
|
||||
WHERE a.id_tag = b.id_tag AND $__id_where = $__id )
|
||||
ORDER BY name",
|
||||
'id_tag_available[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 200px',
|
||||
'5'
|
||||
);
|
||||
} else {
|
||||
$user_tags = tags_get_user_tags($config['id_user'], 'AW');
|
||||
if (empty($user_tags) === false) {
|
||||
$id_user_tags = array_keys($user_tags);
|
||||
|
||||
$table_advanced->data['tags_module_parent'][0] = html_print_select_from_sql(
|
||||
'SELECT id_tag, name
|
||||
FROM ttag
|
||||
WHERE id_tag IN ('.implode(',', $id_user_tags).") AND
|
||||
id_tag NOT IN (
|
||||
SELECT a.id_tag
|
||||
FROM ttag a, $__table_modules b
|
||||
WHERE a.id_tag = b.id_tag AND $__id_where = $__id )
|
||||
ORDER BY name",
|
||||
'id_tag_available[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 200px',
|
||||
'5'
|
||||
);
|
||||
} else {
|
||||
$table_advanced->data['tags_module_parent'][0] = html_print_select_from_sql(
|
||||
"SELECT id_tag, name
|
||||
FROM ttag
|
||||
WHERE id_tag NOT IN (
|
||||
SELECT a.id_tag
|
||||
FROM ttag a, $__table_modules b
|
||||
WHERE a.id_tag = b.id_tag AND $__id_where = $__id )
|
||||
ORDER BY name",
|
||||
'id_tag_available[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 200px',
|
||||
'5'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$table_advanced->data['tags_module_parent'][2] = html_print_image(
|
||||
'images/darrowright.png',
|
||||
true,
|
||||
[
|
||||
'id' => 'right',
|
||||
'title' => __('Add tags to module'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
);
|
||||
$table_advanced->data['tags_module_parent'][2] .= '<br><br><br><br>'.html_print_image(
|
||||
'images/darrowleft.png',
|
||||
true,
|
||||
[
|
||||
'id' => 'left',
|
||||
'title' => __('Delete tags to module'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
);
|
||||
$table_advanced->data['tags_module_parent'][3] = '';
|
||||
// .__('Tags selected')
|
||||
$table_advanced->data['tags_module_parent'][4] = html_print_select_from_sql(
|
||||
"SELECT a.id_tag, name
|
||||
FROM ttag a, $__table_modules b
|
||||
WHERE a.id_tag = b.id_tag AND $__id_where = $__id
|
||||
$__sql
|
||||
ORDER BY name",
|
||||
'id_tag_selected[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 200px',
|
||||
'5'
|
||||
);
|
||||
|
||||
if ($__code_from === 'modules') {
|
||||
$table_advanced->data['tags_module_parent'][5] = '<b>'.''.'</b>';
|
||||
$table_advanced->data['tags_module_parent'][6] = html_print_select_from_sql(
|
||||
"SELECT a.id_tag, name
|
||||
FROM ttag a, $__table_modules b
|
||||
WHERE a.id_tag = b.id_tag AND $__id_where = $__id
|
||||
$__sql_policy
|
||||
ORDER BY name",
|
||||
'id_tag_policy[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 200px',
|
||||
'5'
|
||||
);
|
||||
}
|
||||
|
||||
$module_id_policy_module = 0;
|
||||
if (isset($module['id_policy_module'])) {
|
||||
if (isset($module['id_policy_module']) === true) {
|
||||
$module_id_policy_module = $module['id_policy_module'];
|
||||
}
|
||||
|
||||
|
@ -908,160 +1090,6 @@ if (!preg_match('/async/', $module_type_name) || $edit) {
|
|||
|
||||
$table_advanced->colspan[6][4] = 3;
|
||||
|
||||
/*
|
||||
Tags */
|
||||
// This var comes from module_manager_editor.php or policy_modules.php
|
||||
global $__code_from;
|
||||
$table_advanced->data[7][0] = __('Tags available');
|
||||
// Code comes from module_editor
|
||||
if ($__code_from == 'modules') {
|
||||
$__table_modules = 'ttag_module';
|
||||
$__id_where = 'b.id_agente_modulo';
|
||||
$__id = (int) $id_agent_module;
|
||||
|
||||
$__sql = ' AND b.id_policy_module = 0';
|
||||
$__sql_policy = ' AND b.id_policy_module != 0';
|
||||
} else {
|
||||
// Code comes from policy module editor
|
||||
global $__id_pol_mod;
|
||||
$__table_modules = 'ttag_policy_module';
|
||||
$__id_where = 'b.id_policy_module';
|
||||
$__id = $__id_pol_mod;
|
||||
|
||||
$__sql = '';
|
||||
}
|
||||
|
||||
if (!tags_has_user_acl_tags($config['id_user'])) {
|
||||
$table_advanced->data[7][1] = html_print_select_from_sql(
|
||||
"SELECT id_tag, name
|
||||
FROM ttag
|
||||
WHERE id_tag NOT IN (
|
||||
SELECT a.id_tag
|
||||
FROM ttag a, $__table_modules b
|
||||
WHERE a.id_tag = b.id_tag AND $__id_where = $__id )
|
||||
ORDER BY name",
|
||||
'id_tag_available[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 200px',
|
||||
'5'
|
||||
);
|
||||
} else {
|
||||
$user_tags = tags_get_user_tags($config['id_user'], 'AW');
|
||||
if (!empty($user_tags)) {
|
||||
$id_user_tags = array_keys($user_tags);
|
||||
|
||||
$table_advanced->data[7][1] = html_print_select_from_sql(
|
||||
'SELECT id_tag, name
|
||||
FROM ttag
|
||||
WHERE id_tag IN ('.implode(',', $id_user_tags).") AND
|
||||
id_tag NOT IN (
|
||||
SELECT a.id_tag
|
||||
FROM ttag a, $__table_modules b
|
||||
WHERE a.id_tag = b.id_tag AND $__id_where = $__id )
|
||||
ORDER BY name",
|
||||
'id_tag_available[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 200px',
|
||||
'5'
|
||||
);
|
||||
} else {
|
||||
$table_advanced->data[7][1] = html_print_select_from_sql(
|
||||
"SELECT id_tag, name
|
||||
FROM ttag
|
||||
WHERE id_tag NOT IN (
|
||||
SELECT a.id_tag
|
||||
FROM ttag a, $__table_modules b
|
||||
WHERE a.id_tag = b.id_tag AND $__id_where = $__id )
|
||||
ORDER BY name",
|
||||
'id_tag_available[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 200px',
|
||||
'5'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$table_advanced->data[7][2] = html_print_image(
|
||||
'images/darrowright.png',
|
||||
true,
|
||||
[
|
||||
'id' => 'right',
|
||||
'title' => __('Add tags to module'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
);
|
||||
$table_advanced->data[7][2] .= '<br><br><br><br>'.html_print_image(
|
||||
'images/darrowleft.png',
|
||||
true,
|
||||
[
|
||||
'id' => 'left',
|
||||
'title' => __('Delete tags to module'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
);
|
||||
$table_advanced->data[7][3] = '<b>'.__('Tags selected').'</b>';
|
||||
$table_advanced->data[7][4] = html_print_select_from_sql(
|
||||
"SELECT a.id_tag, name
|
||||
FROM ttag a, $__table_modules b
|
||||
WHERE a.id_tag = b.id_tag AND $__id_where = $__id
|
||||
$__sql
|
||||
ORDER BY name",
|
||||
'id_tag_selected[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 200px',
|
||||
'5'
|
||||
);
|
||||
|
||||
if ($__code_from == 'modules') {
|
||||
$table_advanced->data[7][5] = '<b>'.__('Tags from policy').'</b>';
|
||||
$table_advanced->data[7][6] = html_print_select_from_sql(
|
||||
"SELECT a.id_tag, name
|
||||
FROM ttag a, $__table_modules b
|
||||
WHERE a.id_tag = b.id_tag AND $__id_where = $__id
|
||||
$__sql_policy
|
||||
ORDER BY name",
|
||||
'id_tag_policy[]',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
$disabledBecauseInPolicy,
|
||||
'width: 200px',
|
||||
'5'
|
||||
);
|
||||
}
|
||||
|
||||
$table_advanced->data[8][0] = __('Quiet');
|
||||
$table_advanced->data[8][1] = html_print_checkbox('quiet_module', 1, $quiet_module, true, $disabledBecauseInPolicy);
|
||||
|
||||
|
@ -1667,26 +1695,40 @@ $(document).ready (function () {
|
|||
}
|
||||
});
|
||||
|
||||
if ($('#checkbox-warning_inverse').prop('checked') === true) {
|
||||
$('.switch_radio_button label').on('click', function(){
|
||||
var thisLabel = $(this).attr('for');
|
||||
/*
|
||||
console.log(thisLabel);
|
||||
console.log($('#'+thisLabel).attr('name'));
|
||||
console.log($('#'+thisLabel).attr('value'));
|
||||
console.log($('[name='+$('#'+thisLabel).attr('name')+']'));
|
||||
*/
|
||||
//console.log($('#'+$('#'+thisLabel).attr('name')).val());
|
||||
//$('[name='+$('#'+thisLabel).attr('name')+']').val($('#'+thisLabel).attr('value'));
|
||||
//$('[name='+$('#'+thisLabel).attr('name')+']').prop('checked', true);
|
||||
$('#'+thisLabel).attr('checked', 'checked');
|
||||
$('#'+thisLabel).siblings().attr('checked', false);
|
||||
|
||||
if ($('#radius-warning_inverse').prop('checked') === true) {
|
||||
$('#percentage_warning').hide();
|
||||
}
|
||||
|
||||
if ($('#checkbox-critical_inverse').prop('checked') === true) {
|
||||
if ($('#radius-critical_inverse').prop('checked') === true) {
|
||||
$('#percentage_critical').hide();
|
||||
}
|
||||
|
||||
if ($('#checkbox-percentage_warning').prop('checked') === true) {
|
||||
if ($('#radius-percentage_warning').prop('checked') === true) {
|
||||
$('#warning_inverse').hide();
|
||||
}
|
||||
|
||||
if ($('#checkbox-percentage_critical').prop('checked') === true) {
|
||||
if ($('#radius-percentage_critical').prop('checked') === true) {
|
||||
$('#critical_inverse').hide();
|
||||
}
|
||||
|
||||
$('#checkbox-warning_inverse').change (function() {
|
||||
$('#radius-warning_inverse').change (function() {
|
||||
paint_graph_values();
|
||||
if ($('#checkbox-warning_inverse').prop('checked') === true){
|
||||
$('#checkbox-percentage_warning').prop('checked', false);
|
||||
if ($('#radius-warning_inverse').prop('checked') === true){
|
||||
$('#radius-percentage_warning').prop('checked', false);
|
||||
$('#percentage_warning').attr('onClick', 'return false;');
|
||||
$('#percentage_warning>em').addClass('color_666');
|
||||
} else {
|
||||
|
@ -1695,11 +1737,11 @@ $(document).ready (function () {
|
|||
}
|
||||
});
|
||||
|
||||
$('#checkbox-critical_inverse').change (function() {
|
||||
$('#radius-critical_inverse').change (function() {
|
||||
paint_graph_values();
|
||||
|
||||
if ($('#checkbox-critical_inverse').prop('checked') === true){
|
||||
$('#checkbox-percentage_critical').prop('checked', false);
|
||||
if ($('#radius-critical_inverse').prop('checked') === true){
|
||||
$('#radius-percentage_critical').prop('checked', false);
|
||||
$('#percentage_critical').attr('onClick', 'return false;');
|
||||
$('#percentage_critical>em').addClass('color_666');
|
||||
} else {
|
||||
|
@ -1708,10 +1750,10 @@ $(document).ready (function () {
|
|||
}
|
||||
});
|
||||
|
||||
$('#checkbox-percentage_warning').change (function() {
|
||||
$('#radius-percentage_warning').change (function() {
|
||||
paint_graph_values();
|
||||
if ($('#checkbox-percentage_warning').prop('checked') === true){
|
||||
$('#checkbox-warning_inverse').prop('checked', false);
|
||||
if ($('#radius-percentage_warning').prop('checked') === true){
|
||||
$('#radius-warning_inverse').prop('checked', false);
|
||||
$('#warning_inverse').attr('onClick', 'return false;');
|
||||
$('#warning_inverse>em').addClass('color_666');
|
||||
} else {
|
||||
|
@ -1720,18 +1762,20 @@ $(document).ready (function () {
|
|||
}
|
||||
});
|
||||
|
||||
$('#checkbox-percentage_critical').change (function() {
|
||||
$('#radius-percentage_critical').change (function() {
|
||||
paint_graph_values();
|
||||
if ($('#checkbox-percentage_critical').prop('checked') === true){
|
||||
$('#checkbox-critical_inverse').prop('checked', false);
|
||||
if ($('#radius-percentage_critical').prop('checked') === true){
|
||||
$('#radius-critical_inverse').prop('checked', false);
|
||||
$('#critical_inverse').attr('onClick', 'return false;');
|
||||
$('#critical_inverse>em').addClass('color_666');
|
||||
} else {
|
||||
$('#critical_inverse').removeAttr('onClick');
|
||||
$('#critical_inverse>em').removeClass('color_666');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
@ -1998,9 +2042,9 @@ function paint_graph_values(){
|
|||
if(min_c =='0.00'){ min_c = 0; }
|
||||
var max_c = parseFloat($('#text-max_critical').val());
|
||||
if(max_c =='0.00'){ max_c = 0; }
|
||||
var inverse_w = $('input:checkbox[name=warning_inverse]:checked').val();
|
||||
var inverse_w = $('input:radio[name=warning_inverse]:checked').val();
|
||||
if(!inverse_w){ inverse_w = 0; }
|
||||
var inverse_c = $('input:checkbox[name=critical_inverse]:checked').val();
|
||||
var inverse_c = $('input:radio[name=critical_inverse]:checked').val();
|
||||
if(!inverse_c){ inverse_c = 0; }
|
||||
|
||||
//inicialiced error
|
||||
|
|
|
@ -416,8 +416,8 @@ foreach ($actions as $action) {
|
|||
&& check_acl($config['id_user'], $action['id_group'], 'LM')
|
||||
) {
|
||||
$table->cellclass[] = [
|
||||
3 => 'action_buttons',
|
||||
4 => 'action_buttons',
|
||||
3 => 'table_action_buttons',
|
||||
4 => 'table_action_buttons',
|
||||
];
|
||||
|
||||
$id_action = $action['id'];
|
||||
|
|
|
@ -793,7 +793,7 @@ foreach ($commands as $command) {
|
|||
io_safe_output($command['description'])
|
||||
);
|
||||
$data['action'] = '';
|
||||
$table->cellclass[]['action'] = 'action_buttons';
|
||||
$table->cellclass[]['action'] = 'table_action_buttons';
|
||||
|
||||
// (IMPORTANT, DO NOT CHANGE!) only users with permissions over "All" group have access to edition of commands belonging to "All" group.
|
||||
if ($is_management_allowed === true && !$command['internal'] && check_acl_restricted_all($config['id_user'], $command['id_group'], 'LM')) {
|
||||
|
|
|
@ -834,8 +834,8 @@ foreach ($simple_alerts as $alert) {
|
|||
}
|
||||
|
||||
$table_alert_list->cellclass[] = [
|
||||
1 => 'action_buttons',
|
||||
4 => 'action_buttons',
|
||||
1 => 'table_action_buttons',
|
||||
4 => 'table_action_buttons',
|
||||
];
|
||||
$data[4] = '<form class="disable_alert_form display_in" action="'.$url.'" method="post" >';
|
||||
if ($alert['disabled']) {
|
||||
|
|
|
@ -419,7 +419,7 @@ foreach ($templates as $template) {
|
|||
if (is_management_allowed() === true
|
||||
&& check_acl($config['id_user'], $template['id_group'], 'LM')
|
||||
) {
|
||||
$table->cellclass[][4] = 'action_buttons';
|
||||
$table->cellclass[][4] = 'table_action_buttons';
|
||||
$data[4] = '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/configure_alert_template&pure='.$pure.'" class="float-left inline_line">';
|
||||
$data[4] .= html_print_input_hidden('duplicate_template', 1, true);
|
||||
$data[4] .= html_print_input_hidden('source_id', $template['id'], true);
|
||||
|
|
|
@ -202,7 +202,7 @@ if (empty($result) === false) {
|
|||
}
|
||||
|
||||
if ($is_management_allowed === true) {
|
||||
$table->cellclass[][1] = 'action_buttons';
|
||||
$table->cellclass[][1] = 'table_action_buttons';
|
||||
$data[1] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".html_print_image(
|
||||
'images/config.png',
|
||||
true,
|
||||
|
|
|
@ -184,7 +184,7 @@ foreach ($filters as $filter) {
|
|||
if (check_acl_restricted_all($config['id_user'], $filter['id_group'], 'EW')
|
||||
|| check_acl_restricted_all($config['id_user'], $filter['id_group'], 'EM')
|
||||
) {
|
||||
$table->cellclass[][6] = 'action_buttons';
|
||||
$table->cellclass[][6] = 'table_action_buttons';
|
||||
$data[6] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'href='index.php?sec=geventos&sec2=godmode/events/events§ion=filter&delete=1&id=".$filter['id_filter'].'&offset=0&pure='.$config['pure']."'>".html_print_image(
|
||||
'images/cross.png',
|
||||
true,
|
||||
|
|
|
@ -63,7 +63,7 @@ foreach ($event_responses as $response) {
|
|||
$data[0] = '<a href="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&mode=editor&id_response='.$response['id'].'&pure='.$config['pure'].'">'.$response['name'].'</a>';
|
||||
$data[1] = $response['description'];
|
||||
$data[2] = ui_print_group_icon($response['id_group'], true);
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$table->cellclass[][3] = 'table_action_buttons';
|
||||
$data[3] = '<a href="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&action=delete_response&id_response='.$response['id'].'&pure='.$config['pure'].'">'.html_print_image(
|
||||
'images/cross.png',
|
||||
true,
|
||||
|
|
|
@ -252,7 +252,7 @@ foreach ($extensions as $file => $extension) {
|
|||
|
||||
// Avoid to delete or disabled update_manager
|
||||
if ($file != 'update_manager.php') {
|
||||
$table->cellclass[][10] = 'action_buttons';
|
||||
$table->cellclass[][10] = 'table_action_buttons';
|
||||
if (!$extension['enabled']) {
|
||||
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.disabled.png', true, ['class' => 'filter_none']).'</a>'.' <a title="'.__('Enable').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file.'" class="mn">'.html_print_image('images/lightbulb_off.png', true, ['class' => 'filter_none']).'</a>';
|
||||
} else {
|
||||
|
|
|
@ -909,7 +909,7 @@ if ($tab == 'tree') {
|
|||
$table->data[$key][4] = $group['parent_name'];
|
||||
$table->data[$key][5] = $group['description'];
|
||||
if ($is_management_allowed === true) {
|
||||
$table->cellclass[$key][6] = 'action_buttons';
|
||||
$table->cellclass[$key][6] = 'table_action_buttons';
|
||||
$table->data[$key][6] = '<a href="'.$url.'">'.html_print_image(
|
||||
'images/config.png',
|
||||
true,
|
||||
|
|
|
@ -272,7 +272,7 @@ if (empty($groups) === false) {
|
|||
if (is_metaconsole() === true) {
|
||||
$data[2] = '<a href="index.php?sec=advanced&sec2=advanced/component_management&tab=module_group&id_group='.$id_group['id_mg'].'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a>';
|
||||
} else {
|
||||
$table->cellclass[][2] = 'action_buttons';
|
||||
$table->cellclass[][2] = 'table_action_buttons';
|
||||
$data[2] = '<a href="index.php?sec=gmodules&sec2=godmode/groups/modu_group_list&id_group='.$id_group['id_mg'].'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a>';
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -270,7 +270,7 @@ foreach ($groups as $group) {
|
|||
$data[0] = $tabulation.'<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_nc_groups&id='.$group['id_sg'].'">'.$group['name'].'</a>';
|
||||
}
|
||||
|
||||
$table->cellclass[][1] = 'action_buttons';
|
||||
$table->cellclass[][1] = 'table_action_buttons';
|
||||
if (is_management_allowed() === true || is_metaconsole()) {
|
||||
$data[1] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
|
||||
href='index.php?sec=".$sec.'&sec2=godmode/modules/manage_nc_groups&delete=1&id='.$group['id_sg']."&offset=0'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
|
||||
|
|
|
@ -851,7 +851,7 @@ foreach ($components as $component) {
|
|||
$data[5] = $component['max'].' / '.$component['min'];
|
||||
|
||||
if ($is_management_allowed === true) {
|
||||
$table->cellclass[][6] = 'action_buttons';
|
||||
$table->cellclass[][6] = 'table_action_buttons';
|
||||
$data[6] = '<a class="inline_line float-left" href="'.$url.'&search_id_group='.$search_id_group.'search_string='.$search_string.'&duplicate_network_component=1&source_id='.$component['id_nc'].'">'.html_print_image(
|
||||
'images/copy.png',
|
||||
true,
|
||||
|
|
|
@ -261,7 +261,7 @@ foreach ($result as $row) {
|
|||
$data[0] = html_print_checkbox_extended('delete_multiple[]', $row['id_np'], false, false, '', 'class="check_delete"', true);
|
||||
$data[1] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form&id_np='.$row['id_np'].'">'.io_safe_output($row['name']).'</a>';
|
||||
$data[2] = ui_print_truncate_text(io_safe_output($row['description']), 'description', true, true, true, '[…]');
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$table->cellclass[][3] = 'table_action_buttons';
|
||||
$data[3] = html_print_input_image(
|
||||
'delete_profile',
|
||||
'images/cross.png',
|
||||
|
|
|
@ -191,7 +191,7 @@ foreach ($filters as $filter) {
|
|||
$data[3] = '';
|
||||
|
||||
if (check_acl_restricted_all($config['id_user'], $filter['id_group'], 'AW')) {
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$table->cellclass[][3] = 'table_action_buttons';
|
||||
$data[3] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
|
||||
href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&delete=1&id='.$filter['id_sg']."&offset=0&pure=$pure'>".html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
|
||||
}
|
||||
|
|
|
@ -348,7 +348,7 @@ $table_aux = new stdClass();
|
|||
$data[3] = ui_print_group_icon($graph['id_group'], true);
|
||||
|
||||
$data[4] = '';
|
||||
$table->cellclass[][4] = 'action_buttons';
|
||||
$table->cellclass[][4] = 'table_action_buttons';
|
||||
if (($report_w || $report_m)) {
|
||||
$data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.$graph['id_graph'].'">'.html_print_image(
|
||||
'images/config.png',
|
||||
|
|
|
@ -509,8 +509,8 @@ if (!$maps && is_metaconsole() === false) {
|
|||
if ($vconsoles_write_action_btn || $vconsoles_manage_action_btn) {
|
||||
if (is_metaconsole() === false) {
|
||||
$table->cellclass[] = [
|
||||
3 => 'action_buttons',
|
||||
4 => 'action_buttons',
|
||||
3 => 'table_action_buttons',
|
||||
4 => 'table_action_buttons',
|
||||
];
|
||||
$data[3] = '<a class="copy_visualmap" href="index.php?sec=network&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image(
|
||||
'images/copy.png',
|
||||
|
|
|
@ -616,7 +616,7 @@ foreach ($items as $item) {
|
|||
$row[6] = '';
|
||||
|
||||
if (check_acl($config['id_user'], $item['id_group'], 'RM')) {
|
||||
$table->cellclass[][6] = 'action_buttons';
|
||||
$table->cellclass[][6] = 'table_action_buttons';
|
||||
$row[6] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=edit&id_report='.$idReport.'&id_item='.$item['id_rc'].'">'.html_print_image(
|
||||
'images/config.png',
|
||||
true,
|
||||
|
|
|
@ -1148,7 +1148,7 @@ switch ($action) {
|
|||
|
||||
if ($edit || $delete) {
|
||||
$columnview = true;
|
||||
$table->cellclass[][$next] = 'action_buttons';
|
||||
$table->cellclass[][$next] = 'table_action_buttons';
|
||||
|
||||
if (!isset($table->head[$next])) {
|
||||
$table->head[$next] = '<span title="Operations">'.__('Op.').'</span>'.html_print_checkbox('all_delete', 0, false, true, false);
|
||||
|
|
|
@ -1,17 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Server list view.
|
||||
*
|
||||
* @category Server
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
// Load global vars.
|
||||
global $config;
|
||||
|
||||
require_once 'include/functions_servers.php';
|
||||
|
@ -28,10 +43,28 @@ if (! check_acl($config['id_user'], 0, 'AW')) {
|
|||
exit;
|
||||
}
|
||||
|
||||
if (isset($_GET['server'])) {
|
||||
if (isset($_GET['server']) === true) {
|
||||
$id_server = get_parameter_get('server');
|
||||
// Headers.
|
||||
ui_print_page_header(__('Update Server'), 'images/gm_servers.png', false, 'servers', true);
|
||||
ui_print_standard_header(
|
||||
__('Update Server'),
|
||||
'images/gm_servers.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Servers'),
|
||||
],
|
||||
[
|
||||
'link' => 'index.php?sec=gservers&sec2=godmode/servers/modificar_server',
|
||||
'label' => __('%s servers', get_product_name()),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$sql = sprintf('SELECT name, ip_address, description, server_type, exec_proxy, port FROM tserver WHERE id_server = %d', $id_server);
|
||||
$row = db_get_row_sql($sql);
|
||||
echo '<form name="servers" method="POST" action="index.php?sec=gservers&sec2=godmode/servers/modificar_server&update=1">';
|
||||
|
@ -67,7 +100,7 @@ if (isset($_GET['server'])) {
|
|||
html_print_input_text('description', $row['description'], '', 50, 0, true),
|
||||
];
|
||||
|
||||
if (enterprise_installed()) {
|
||||
if (enterprise_installed() === true) {
|
||||
$table->data[] = [
|
||||
__('Type'),
|
||||
$server_type,
|
||||
|
@ -163,7 +196,24 @@ if (isset($_GET['server'])) {
|
|||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
ui_print_page_header(__('Remote Configuration'), 'images/gm_servers.png', false, 'servers', true, $buttons);
|
||||
ui_print_standard_header(
|
||||
__('Remote Configuration'),
|
||||
'images/gm_servers.png',
|
||||
false,
|
||||
'servers',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Servers'),
|
||||
],
|
||||
[
|
||||
'link' => 'index.php?sec=gservers&sec2=godmode/servers/modificar_server',
|
||||
'label' => __('%s servers', get_product_name()),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
if ($tab === 'standard_editor') {
|
||||
$advanced_editor = false;
|
||||
|
@ -186,7 +236,20 @@ if (isset($_GET['server'])) {
|
|||
enterprise_include('godmode/servers/server_disk_conf_editor.php');
|
||||
} else {
|
||||
// Header.
|
||||
ui_print_page_header(__('%s servers', get_product_name()), 'images/gm_servers.png', false, '', true);
|
||||
ui_print_standard_header(
|
||||
__('%s servers', get_product_name()),
|
||||
'images/gm_servers.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Servers'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Move SNMP modules back to the enterprise server.
|
||||
if (isset($_GET['server_reset_snmp_enterprise']) === true) {
|
||||
|
|
|
@ -106,7 +106,7 @@ foreach ($servers as $server) {
|
|||
|
||||
$table->cellclass[] = [
|
||||
3 => 'progress_bar',
|
||||
8 => 'action_buttons',
|
||||
8 => 'table_action_buttons',
|
||||
];
|
||||
$data[0] = '<span title="'.$server['version'].'">'.strip_tags($server['name']).'</span>';
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ if ($mapsConnections !== false) {
|
|||
'<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&section=gis&id_connection_map='.$mapsConnection['id_tmap_connection'].'&action=delete_connection"
|
||||
onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>',
|
||||
];
|
||||
$table->cellclass[][2] = 'action_buttons';
|
||||
$table->cellclass[][2] = 'table_action_buttons';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
|
|||
}
|
||||
|
||||
echo "<tr><td class='$tdcolor'><b><a href='index.php?sec=gsetup&sec2=godmode/setup/links&form_edit=1&id_link=".$row['id_link']."'>".$row['name'].'</a></b></td>';
|
||||
echo '<td class="'.$tdcolor.' action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row['id_link'].'&borrar='.$row['id_link'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
|
||||
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row['id_link'].'&borrar='.$row['id_link'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
|
||||
'images/cross.png',
|
||||
true,
|
||||
['class' => 'invert_filter']
|
||||
|
|
|
@ -287,7 +287,7 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
|
|||
echo "<td class='$tdcolor'>".__('No').'</b></td>';
|
||||
}
|
||||
|
||||
echo '<td class="'.$tdcolor.' action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter']).'</a></td></tr>';
|
||||
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter']).'</a></td></tr>';
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
|
|
|
@ -117,7 +117,7 @@ foreach ($osList as $os) {
|
|||
$data[] = ui_print_truncate_text(io_safe_output($os['description']), 'description', true, true);
|
||||
|
||||
if ($is_management_allowed === true) {
|
||||
$table->cellclass[][4] = 'action_buttons';
|
||||
$table->cellclass[][4] = 'table_action_buttons';
|
||||
if ($os['id_os'] > 16) {
|
||||
if (is_metaconsole()) {
|
||||
$data[] = '<a href="index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&action=delete&tab2=list&id_os='.$os['id_os'].'">'.html_print_image('images/cross.png', true).'</a>';
|
||||
|
|
|
@ -320,7 +320,7 @@ if ($edit_filter > -2) {
|
|||
$data[0] = $compose_id;
|
||||
$data[1] = implode(' AND ', $compose_filter);
|
||||
$data[2] = $compose_action;
|
||||
$table->cellclass[][2] = 'action_buttons';
|
||||
$table->cellclass[][2] = 'table_action_buttons';
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -381,7 +381,7 @@ if (empty($result) === false) {
|
|||
$data[5] = $output;
|
||||
|
||||
if ($is_management_allowed === true) {
|
||||
$table->cellclass[][6] = 'action_buttons';
|
||||
$table->cellclass[][6] = 'table_action_buttons';
|
||||
$data[6] = "<a href='index.php?sec=".$sec.'&sec2=godmode/tag/edit_tag&action=update&id_tag='.$tag['id_tag']."'>";
|
||||
$data[6] .= html_print_image(
|
||||
'images/config.png',
|
||||
|
|
|
@ -425,7 +425,7 @@ foreach ($profiles as $profile) {
|
|||
$data['NW'] = (empty($profile['network_config_edit']) === false) ? $img : '';
|
||||
$data['NM'] = (empty($profile['network_config_management']) === false) ? $img : '';
|
||||
$data['PM'] = (empty($profile['pandora_management']) === false) ? $img : '';
|
||||
$table->cellclass[]['operations'] = 'action_buttons';
|
||||
$table->cellclass[]['operations'] = 'table_action_buttons';
|
||||
if ($is_management_allowed === true) {
|
||||
$data['operations'] = '<a href="index.php?sec='.$sec.'&sec2=godmode/users/configure_profile&id='.$profile['id_perfil'].'&pure='.$pure.'">'.html_print_image(
|
||||
'images/config.png',
|
||||
|
|
|
@ -769,7 +769,7 @@ foreach ($info as $user_id => $user_info) {
|
|||
$data[5] = ui_print_string_substr($user_info['comments'], 24, true);
|
||||
|
||||
if ($is_management_allowed === true) {
|
||||
$table->cellclass[][6] = 'action_buttons';
|
||||
$table->cellclass[][6] = 'table_action_buttons';
|
||||
$data[6] = '';
|
||||
if ($user_is_admin
|
||||
|| $config['id_user'] == $user_info['id_user']
|
||||
|
|
|
@ -1033,7 +1033,7 @@ class DiscoveryTaskList extends HTML
|
|||
$data[9] = '-';
|
||||
}
|
||||
|
||||
$table->cellclass[][9] = 'action_buttons';
|
||||
$table->cellclass[][9] = 'table_action_buttons';
|
||||
|
||||
// Div neccesary for modal progress task.
|
||||
echo '<div id="progress_task_'.$task['id_rt'].'" class="invisible"></div>';
|
||||
|
|
Binary file not shown.
|
@ -116,11 +116,11 @@ class AuditLog extends HTML
|
|||
$columns,
|
||||
[
|
||||
'text' => 'security',
|
||||
'class' => 'w80px action_buttons show_security_info',
|
||||
'class' => 'w80px table_action_buttons show_security_info',
|
||||
],
|
||||
[
|
||||
'text' => 'action',
|
||||
'class' => 'w80px action_buttons show_extended_info',
|
||||
'class' => 'w80px table_action_buttons show_extended_info',
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -599,7 +599,7 @@ class ConfigPEN extends HTML
|
|||
__('Description'),
|
||||
[
|
||||
'text' => __('Options'),
|
||||
'class' => 'action_buttons',
|
||||
'class' => 'table_action_buttons',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -843,7 +843,7 @@ class CredentialStore extends Wizard
|
|||
__('User'),
|
||||
[
|
||||
'text' => __('Options'),
|
||||
'class' => 'action_buttons',
|
||||
'class' => 'table_action_buttons',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -870,7 +870,7 @@ class ModuleTemplates extends HTML
|
|||
$data[0] = html_print_checkbox_extended('delete_multiple[]', $row['id_np'], false, false, '', 'class="check_delete"', true);
|
||||
$data[1] = '<a href="'.$this->baseUrl.'&id_np='.$row['id_np'].'">'.io_safe_output($row['name']).'</a>';
|
||||
$data[2] = ui_print_truncate_text(io_safe_output($row['description']), 'description', true, true, true, '[…]');
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$table->cellclass[][3] = 'table_action_buttons';
|
||||
$data[3] = html_print_input_image(
|
||||
'delete_profile',
|
||||
'images/cross.png',
|
||||
|
|
|
@ -4456,3 +4456,17 @@ function agents_get_starmap(int $id_agent, float $width=0, float $height=0)
|
|||
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines a hash for agent name.
|
||||
*
|
||||
* @param string $alias Alias.
|
||||
* @param string $nombre_agente Agent name.
|
||||
*
|
||||
* @return string.
|
||||
*/
|
||||
function hash_agent_name(string $alias, string $nombre_agente)
|
||||
{
|
||||
return hash('sha256', $alias.'|'.$nombre_agente.'|'.time().'|'.sprintf('%04d', rand(0, 10000)));
|
||||
}
|
|
@ -4053,6 +4053,28 @@ function html_print_radio_button($name, $value, $label='', $checkedvalue='', $re
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render a Switch-Radio selector buttons.
|
||||
*
|
||||
* @param array $switches Switches for add (html_print_radio_button).
|
||||
* @param array $attributes Special attributes.
|
||||
* @param boolean $return Return. False by default.
|
||||
*
|
||||
* @return mixed.
|
||||
*/
|
||||
function html_print_switch_radio_button(array $switches, array $attributes=[], bool $return=false)
|
||||
{
|
||||
return html_print_div(
|
||||
[
|
||||
'id' => ($attributes['id'] ?? ''),
|
||||
'class' => 'switch_radio_button '.($attributes['class'] ?? ''),
|
||||
'content' => implode('', $switches),
|
||||
],
|
||||
$return
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render a checkbox button input. Extended version, use html_print_checkbox() to simplify.
|
||||
*
|
||||
|
@ -4065,6 +4087,7 @@ function html_print_radio_button($name, $value, $label='', $checkedvalue='', $re
|
|||
* @param boolean $return Whether to return an output string or echo now (optional, echo by default).
|
||||
* @param string $id Custom id.
|
||||
* @param string $customAttributes Custom Attribute for customized checkbox.
|
||||
* @param string $customHTML Custom HTML for customized checkbox.
|
||||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
*/
|
||||
|
@ -4077,7 +4100,8 @@ function html_print_checkbox_extended(
|
|||
$attributes,
|
||||
$return=false,
|
||||
$id='',
|
||||
$customAttributes=''
|
||||
$customAttributes='',
|
||||
$customHTML=''
|
||||
) {
|
||||
static $idcounter = [];
|
||||
|
||||
|
@ -4097,6 +4121,7 @@ function html_print_checkbox_extended(
|
|||
$output .= ((bool) $disabled === true) ? ' disabled="disabled"' : '';
|
||||
$output .= ' '.$attributes;
|
||||
$output .= ' />';
|
||||
$output .= $customHTML;
|
||||
$output .= '<span class="custom_checkbox_show custom_checkbox_image" '.$customAttributes.'></span>';
|
||||
$output .= '</label>';
|
||||
$output .= "\n";
|
||||
|
@ -4122,6 +4147,7 @@ function html_print_checkbox_extended(
|
|||
* @param string $attributes Extra attributes.
|
||||
* @param string $id Custom ID.
|
||||
* @param string $customAttributes Custom Attribute for customized checkbox.
|
||||
* @param string $customHTML Custom HTML for customized checkbox.
|
||||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
*/
|
||||
|
@ -4135,7 +4161,8 @@ function html_print_checkbox(
|
|||
$disabled_hidden=false,
|
||||
$attributes='',
|
||||
$id='',
|
||||
$customAttributes=''
|
||||
$customAttributes='',
|
||||
$customHTML=''
|
||||
) {
|
||||
$output = html_print_checkbox_extended(
|
||||
$name,
|
||||
|
@ -4146,7 +4173,8 @@ function html_print_checkbox(
|
|||
$attributes,
|
||||
true,
|
||||
$id,
|
||||
$customAttributes
|
||||
$customAttributes,
|
||||
$customHTML
|
||||
);
|
||||
if (!$disabled_hidden) {
|
||||
$output .= html_print_input_hidden($name.'_sent', 1, true);
|
||||
|
|
|
@ -3580,7 +3580,7 @@ function ui_print_datatable(array $parameters)
|
|||
if($("#button-'.$form_id.'_search_bt") != undefined) {
|
||||
$("#'.$form_id.'_loading").remove();
|
||||
}
|
||||
// Move elements to action_buttons bar.
|
||||
// Move elements to table_action_buttons bar.
|
||||
$(".action_buttons_right_content").append($("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers"));
|
||||
$(".action_buttons_right_content").append($("#'.$table_id.'_wrapper > #table_events_length"));
|
||||
|
||||
|
|
|
@ -617,7 +617,7 @@ class EventsListWidget extends Widget
|
|||
'event_type',
|
||||
[
|
||||
'text' => 'options',
|
||||
'class' => 'action_buttons w120px',
|
||||
'class' => 'table_action_buttons w120px',
|
||||
],
|
||||
];
|
||||
$fields = explode(',', $config['event_fields']);
|
||||
|
|
|
@ -1047,12 +1047,13 @@ select:-internal-list-box {
|
|||
div#page {
|
||||
background: #fbfbfb;
|
||||
background-image: none;
|
||||
clear: both;
|
||||
/* clear: both; */
|
||||
width: auto;
|
||||
padding-top: 5px;
|
||||
/*padding-right: 3em;*/
|
||||
/* padding-top: 5px; */
|
||||
/* padding-right: 3em; */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 58px;
|
||||
}
|
||||
|
||||
body.pure {
|
||||
|
@ -1068,11 +1069,13 @@ div#container {
|
|||
}
|
||||
|
||||
div#main {
|
||||
/*width: 100%;*/
|
||||
/*margin-left: 3em;*/
|
||||
display: flex;
|
||||
/* width: 100%; */
|
||||
/* margin-left: 3em; */
|
||||
margin-bottom: 3em;
|
||||
position: relative;
|
||||
margin-top: 8.8em;
|
||||
/* margin-top: 8.8em; */
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
textarea.conf_editor {
|
||||
|
@ -1711,23 +1714,23 @@ div.title_line {
|
|||
#menu_tab_frame,
|
||||
#menu_tab_frame_view,
|
||||
#menu_tab_frame_view_bc {
|
||||
position: fixed;
|
||||
position: sticky;
|
||||
top: 59px;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
border-bottom: 4px solid #14524f;
|
||||
/*width: calc(100% + 3em);*/
|
||||
/* width: calc(100% + 3em); */
|
||||
width: -webkit-fill-available;
|
||||
width: -moz-fill-available;
|
||||
padding-right: 0px;
|
||||
margin-bottom: 20px;
|
||||
/* margin-bottom: 20px; */
|
||||
height: 56px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
|
||||
/*margin-left: -3em;*/
|
||||
box-shadow: 1px 1px 4px rgb(0 0 0 / 10%);
|
||||
/* margin-left: -3em;*/
|
||||
}
|
||||
|
||||
/* Breadcrum */
|
||||
|
@ -2257,8 +2260,8 @@ table#simple span#component {
|
|||
|
||||
table#simple label {
|
||||
display: inline;
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
/*font-weight: normal;*/
|
||||
/*font-style: italic;*/
|
||||
}
|
||||
|
||||
.clickable {
|
||||
|
@ -5280,42 +5283,6 @@ input:checked + .p-slider:before {
|
|||
color: #4d4d4d;
|
||||
}
|
||||
|
||||
/* This class is for the icons of actions and operations in the tables. */
|
||||
.action_buttons a[href] img,
|
||||
.action_buttons input[type="image"],
|
||||
.action_button_img {
|
||||
border-radius: 4px;
|
||||
border: 1px solid #dcdcdc !important;
|
||||
padding: 1px !important;
|
||||
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
|
||||
max-width: 21px;
|
||||
}
|
||||
|
||||
/* This class is for only one icon to be a button type. */
|
||||
.action_button_img {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.action_buttons a,
|
||||
.action_buttons input[type="image"] {
|
||||
margin-right: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.action_buttons a:last-child,
|
||||
.action_buttons input[type="image"]:last-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.action_buttons a:hover {
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.action_buttons input[type="image"]:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/* Tables to upload files */
|
||||
#table_filemanager tr:first-child th span {
|
||||
font-weight: bold;
|
||||
|
@ -5706,6 +5673,7 @@ div.label_select_child_left > span {
|
|||
.switch_radio_button {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.switch_radio_button input {
|
||||
|
@ -5720,7 +5688,7 @@ div.label_select_child_left > span {
|
|||
.switch_radio_button label {
|
||||
background-color: #fff;
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
line-height: 1;
|
||||
line-height: 0;
|
||||
text-align: center;
|
||||
padding: 14px 10px;
|
||||
margin-right: -1px;
|
||||
|
@ -5728,7 +5696,7 @@ div.label_select_child_left > span {
|
|||
transition: all 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
.switch_radio_button label:first-child {
|
||||
.switch_radio_button label:first {
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
@ -5743,12 +5711,22 @@ div.label_select_child_left > span {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.switch_radio_button input:checked + label {
|
||||
.switch_radio_button input:checked + label,
|
||||
.switch_radio_button input:checked:has(.custom_checkbox) {
|
||||
background-color: #1d7873;
|
||||
box-shadow: none;
|
||||
color: #fff !important;
|
||||
}
|
||||
/*
|
||||
.switch_radio_button .custom_checkbox_show {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.switch_radio_button .custom_checkbox_caption {
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
*/
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - MODULE GRAPHS
|
||||
|
@ -10632,12 +10610,12 @@ pre.external_tools_output {
|
|||
}
|
||||
|
||||
.fixed_filter_bar {
|
||||
position: fixed;
|
||||
position: sticky;
|
||||
height: 60px;
|
||||
top: 114px;
|
||||
border: 1px solid #e5e9ed;
|
||||
background-color: #fff;
|
||||
z-index: 0;
|
||||
z-index: 1;
|
||||
width: -webkit-fill-available;
|
||||
width: -moz-fill-available;
|
||||
}
|
||||
|
|
|
@ -330,8 +330,8 @@ table.black_table_modal_alternate tr:nth-child(even) td {
|
|||
color: #fff;
|
||||
}
|
||||
|
||||
.action_buttons a[href] img,
|
||||
.action_buttons input[type="image"],
|
||||
.table_action_buttons a[href] img,
|
||||
.table_action_buttons input[type="image"],
|
||||
.action_button_img {
|
||||
filter: brightness(4.5) contrast(50%);
|
||||
background-color: transparent !important;
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
.info_table {
|
||||
background-color: #fff;
|
||||
/* margin-bottom: 10px; */
|
||||
margin: 64px auto 0;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
overflow: hidden;
|
||||
|
@ -99,7 +98,8 @@
|
|||
}
|
||||
|
||||
.info_table > tbody > tr:nth-child(even) {
|
||||
background-color: #f5f5f5;
|
||||
/*background-color: #f5f5f5;*/
|
||||
background-color: #f6f7fb;
|
||||
}
|
||||
|
||||
.info_table tr > td:first-child,
|
||||
|
@ -164,7 +164,7 @@
|
|||
}
|
||||
|
||||
.info_table > tbody > tr {
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
/*border-bottom: 1px solid #e2e2e2;*/
|
||||
}
|
||||
|
||||
.info_table > tbody > tr > td {
|
||||
|
@ -193,9 +193,19 @@
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table_action_buttons > a,
|
||||
.table_action_buttons > img {
|
||||
visibility: hidden;
|
||||
}
|
||||
.info_table > tbody > tr:hover {
|
||||
/* This !important is necessary to overwrite the white background of tables with less than 5 rows. */
|
||||
background-color: #eee !important;
|
||||
/*background-color: #eee !important;*/
|
||||
background-color: #d9efee !important;
|
||||
}
|
||||
|
||||
.info_table > tbody > tr:hover .table_action_buttons > a,
|
||||
.info_table > tbody > tr:hover .table_action_buttons > img {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.info_.profile_list > thead > tr > th > a.tip {
|
||||
|
@ -233,9 +243,8 @@
|
|||
.datos4 *,
|
||||
.info_table .datos3 *,
|
||||
.info_table .datos4 * {
|
||||
font-size: 8.6pt;
|
||||
font-weight: 600;
|
||||
padding: 1.3em 0;
|
||||
font-size: 11pt;
|
||||
padding: 1.5em 0 0.5em;
|
||||
}
|
||||
|
||||
.datos5 * {
|
||||
|
@ -263,7 +272,6 @@ table.dataTable.info_table.no-footer {
|
|||
|
||||
a.pandora_pagination {
|
||||
background-color: #f6f7fb;
|
||||
border: 1px solid #c0ccdc;
|
||||
padding: 11px;
|
||||
color: #000;
|
||||
border: 1px solid #cacaca;
|
||||
|
@ -367,3 +375,45 @@ a.pandora_pagination.current:hover {
|
|||
.info_table tr th.sorting_desc {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
/* This class is for the icons of actions and operations in the tables. */
|
||||
.table_action_buttons a[href] img,
|
||||
.table_action_buttons input[type="image"],
|
||||
.action_button_img {
|
||||
border-radius: 4px;
|
||||
/*border: 1px solid #dcdcdc !important;*/
|
||||
padding: 1px !important;
|
||||
/*box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);*/
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
/* This class is for only one icon to be a button type. */
|
||||
.action_button_img {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.table_action_buttons a,
|
||||
.table_action_buttons input[type="image"] {
|
||||
margin-right: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.table_action_buttons a:last-child,
|
||||
.table_action_buttons input[type="image"]:last-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.table_action_buttons a:hover {
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.table_action_buttons input[type="image"]:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.table_action_buttons_image {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
|
|
@ -1566,7 +1566,6 @@ require 'include/php_to_js_values.php';
|
|||
}
|
||||
// Set the position of principal action buttons.
|
||||
//actionButtons.setAttribute('style', $left+$bottom);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -802,9 +802,9 @@ switch ($tab) {
|
|||
|
||||
if ($networkmap_write || $networkmap_manage) {
|
||||
$table->cellclass[] = [
|
||||
'copy' => 'action_buttons',
|
||||
'edit' => 'action_buttons',
|
||||
'delete' => 'action_buttons',
|
||||
'copy' => 'table_action_buttons',
|
||||
'edit' => 'table_action_buttons',
|
||||
'delete' => 'table_action_buttons',
|
||||
];
|
||||
$data['copy'] = '<a href="index.php?'.'sec=network&'.'sec2=operation/agentes/pandora_networkmap&'.'copy_networkmap=1&'.'id_networkmap='.$network_map['id'].'" alt="'.__('Copy').'">'.html_print_image('images/copy.png', true, ['class' => 'invert_filter']).'</a>';
|
||||
$data['edit'] = '<a href="index.php?'.'sec=network&'.'sec2=operation/agentes/pandora_networkmap&'.'tab=edit&'.'edit_networkmap=1&'.'id_networkmap='.$network_map['id'].'" alt="'.__('Config').'">'.html_print_image('images/config.png', true, ['class' => 'invert_filter']).'</a>';
|
||||
|
|
|
@ -1519,7 +1519,7 @@ if (!empty($result)) {
|
|||
}
|
||||
|
||||
if ($show_edit_icon) {
|
||||
$table->cellclass[][2] = 'action_buttons';
|
||||
$table->cellclass[][2] = 'table_action_buttons';
|
||||
$data[2] .= '<a href="'.$url_edit_module.'">'.html_print_image(
|
||||
'images/config.png',
|
||||
true,
|
||||
|
|
|
@ -2177,7 +2177,7 @@ try {
|
|||
'event_type',
|
||||
[
|
||||
'text' => 'options',
|
||||
'class' => 'action_buttons w120px',
|
||||
'class' => 'table_action_buttons w120px',
|
||||
],
|
||||
[
|
||||
'text' => 'm',
|
||||
|
@ -2221,7 +2221,7 @@ try {
|
|||
[
|
||||
[
|
||||
'text' => 'options',
|
||||
'class' => 'action_buttons mw120px',
|
||||
'class' => 'table_action_buttons mw120px',
|
||||
],
|
||||
[
|
||||
'text' => 'm',
|
||||
|
|
|
@ -186,7 +186,7 @@ if ($maps !== false) {
|
|||
$data['default'] = html_print_radio_button_extended('default_map', $map['id_tgis_map'], '', $checked, false, 'setDefault('.$map['id_tgis_map'].');', '', true);
|
||||
}
|
||||
|
||||
$table->cellclass[]['op'] = 'action_buttons';
|
||||
$table->cellclass[]['op'] = 'table_action_buttons';
|
||||
$data['op'] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&map_id='.$map['id_tgis_map'].'&action=edit_map">'.html_print_image('images/config.png', true, ['title' => __('Edit')]).'</a>'.'<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map&map_id='.$map['id_tgis_map'].'&action=delete_map" onclick="return confirmDelete();">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
|
||||
}
|
||||
|
||||
|
|
|
@ -545,7 +545,7 @@ foreach ($incidents_paginated as $key => $value) {
|
|||
$table->data[$i][6] = $array_get_incidents[$key][10];
|
||||
$table->data[$i][7] = $array_get_incidents[$key][5];
|
||||
$table->data[$i][8] = '';
|
||||
$table->cellclass[$i][8] = 'action_buttons';
|
||||
$table->cellclass[$i][8] = 'table_action_buttons';
|
||||
$table->data[$i][8] .= '<a href="'.ui_get_full_url('index.php?sec=incident&sec2=operation/incidents/configure_integriaims_incident&incident_id='.$array_get_incidents[$key][0]).'">';
|
||||
$table->data[$i][8] .= html_print_image('images/config.png', true, ['title' => __('Edit')]);
|
||||
$table->data[$i][8] .= '</a>';
|
||||
|
|
|
@ -266,7 +266,7 @@ if (empty($messages) === true) {
|
|||
['prominent' => 'timestamp']
|
||||
);
|
||||
|
||||
$table->cellclass[][4] = 'action_buttons';
|
||||
$table->cellclass[][4] = 'table_action_buttons';
|
||||
if ($show_sent === true) {
|
||||
$data[4] = '<a href="index.php?sec=message_list&sec2=operation/messages/message_list&show_sent=1&delete_message=1&id='.$message_id.'"
|
||||
onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
|
||||
|
|
|
@ -155,26 +155,26 @@ UNLOCK TABLES;
|
|||
|
||||
LOCK TABLES `tconfig_os` WRITE;
|
||||
INSERT INTO `tconfig_os` (`id_os`, `name`, `description`, `icon_name`, `previous_name`) VALUES
|
||||
(1,'Linux','Linux: All versions','so_linux.png', ''),
|
||||
(2,'Solaris','Sun Solaris','so_solaris.png', ''),
|
||||
(3,'AIX','IBM AIX','so_aix.png', ''),
|
||||
(4,'BSD','OpenBSD, FreeBSD and Others','so_bsd.png', ''),
|
||||
(5,'HP-UX','HP-UX Unix OS','so_hpux.png', ''),
|
||||
(7,'Cisco','CISCO IOS','so_cisco.png', ''),
|
||||
(8,'MacOS','MAC OS','so_mac.png', ''),
|
||||
(9,'Windows','Microsoft Windows OS','so_win.png', ''),
|
||||
(10,'Other','Other SO','so_other.png', ''),
|
||||
(11,'Network','Network Agent','network.png', ''),
|
||||
(12,'Web Server','Web Server/Application','network.png', ''),
|
||||
(13,'Sensor','Hardware Agent (Sensor)','network.png', ''),
|
||||
(14,'Embedded','Embedded device running an agent','embedded.png', ''),
|
||||
(15,'Android','Android agent','android.png', ''),
|
||||
(16, 'VMware', 'VMware Architecture', 'so_vmware.png', ''),
|
||||
(17, 'Router', 'Generic router', 'so_router.png', ''),
|
||||
(18, 'Switch', 'Generic switch', 'so_switch.png', ''),
|
||||
(19, 'Satellite', 'Satellite agent', 'satellite.png', ''),
|
||||
(20, 'Mainframe', 'Mainframe agent', 'so_mainframe.png', ''),
|
||||
(100, 'Cluster', 'Cluster agent', 'so_cluster.png', '');
|
||||
(1,'Linux','Linux: All versions','linux@svg.svg', ''),
|
||||
(2,'Solaris','Sun Solaris','solaris@svg.svg', ''),
|
||||
(3,'AIX','IBM AIX','aix@svg.svg', ''),
|
||||
(4,'BSD','OpenBSD, FreeBSD and Others','freebsd@svg.svg', ''),
|
||||
(5,'HP-UX','HP-UX Unix OS','HP@svg.svg', ''),
|
||||
(7,'Cisco','CISCO IOS','cisco@svg.svg', ''),
|
||||
(8,'MacOS','MAC OS','apple@svg.svg', ''),
|
||||
(9,'Windows','Microsoft Windows OS','windows@svg.svg', ''),
|
||||
(10,'Other','Other SO','other-OS@svg.svg', ''),
|
||||
(11,'Network','Network Agent','network-server@svg.svg', ''),
|
||||
(12,'Web Server','Web Server/Application','network-server@svg.svg', ''),
|
||||
(13,'Sensor','Hardware Agent (Sensor)','network-server@svg.svg', ''),
|
||||
(14,'Embedded','Embedded device running an agent','embedded@svg.svg', ''),
|
||||
(15,'Android','Android agent','android@svg.svg', ''),
|
||||
(16, 'VMware', 'VMware Architecture', 'vmware@svg.svg', ''),
|
||||
(17, 'Router', 'Generic router', 'routers@svg.svg', ''),
|
||||
(18, 'Switch', 'Generic switch', 'switch@svg.svg', ''),
|
||||
(19, 'Satellite', 'Satellite agent', 'satellite@svg.svg', ''),
|
||||
(20, 'Mainframe', 'Mainframe agent', 'mainframe@svg.svg', ''),
|
||||
(100, 'Cluster', 'Cluster agent', 'cluster@svg.svg', '');
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ try {
|
|||
'description',
|
||||
[
|
||||
'text' => 'options',
|
||||
'class' => 'w150px action_buttons',
|
||||
'class' => 'w150px table_action_buttons',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -192,9 +192,9 @@ if (empty($dashboards) === true) {
|
|||
}
|
||||
|
||||
$table->cellclass[] = [
|
||||
'full_screen' => 'action_buttons',
|
||||
'copy' => 'action_buttons',
|
||||
'delete' => 'action_buttons',
|
||||
'full_screen' => 'table_action_buttons',
|
||||
'copy' => 'table_action_buttons',
|
||||
'delete' => 'table_action_buttons',
|
||||
];
|
||||
|
||||
$table->data[] = $data;
|
||||
|
|
Loading…
Reference in New Issue