Merge branch 'ent-11679-15855-nombres-de-modulos-no-tienen-link-a-su-edicion' into 'develop'

Ent 11679 15855 nombres de modulos no tienen link a su edicion

See merge request artica/pandorafms!6422
This commit is contained in:
Rafael Ameijeiras 2023-11-27 14:39:14 +00:00
commit 8e68198ab5
5 changed files with 27 additions and 16 deletions

View File

@ -1391,7 +1391,6 @@ $table_advanced->data['made_enabled'][0] = html_print_checkbox_switch(
false,
'',
false,
false,
'wp100 static'
);

View File

@ -1168,7 +1168,9 @@ if (check_login()) {
);
}
$data[2] .= '<a href ="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente='.$id_agente.'&amp;tab=module&amp;id_agent_module='.$module['id_agente_modulo'].'&amp;edit_module='.$module['id_modulo'].'">';
$data[2] .= ui_print_truncate_text($module['nombre'], 'module_medium', false, true, true, '&hellip;', 'font-size: 9pt;');
$data[2] .= '</a>';
if (empty($module['extended_info']) === false) {
$data[2] .= ui_print_help_tip($module['extended_info'], true, '/images/default_list.png');
}

View File

@ -19,17 +19,25 @@ require_once $config['homedir'].'/include/functions_users.php';
$searchModules = check_acl($config['id_user'], 0, 'AR');
$selectModuleNameUp = '';
$selectModuleNameDown = '';
$selectAgentNameUp = '';
$selectAgentNameDown = '';
if ($config['style'] === 'pandora_black') {
$selectModuleNameUp = '';
$selectModuleNameDown = '';
$selectAgentNameUp = '';
$selectAgentNameDown = '';
} else {
$selectModuleNameUp = '_black';
$selectModuleNameDown = '_black';
$selectAgentNameUp = '_black';
$selectAgentNameDown = '_black';
}
$is_admin = (bool) db_get_value('is_admin', 'tusuario', 'id_user', $config['id_user']);
switch ($sortField) {
case 'module_name':
switch ($sort) {
case 'up':
$selectModuleNameUp = $selected;
$selectModuleNameUp = $selected_module;
$order = [
'field' => 'module_name',
'order' => 'ASC',
@ -37,7 +45,7 @@ switch ($sortField) {
break;
case 'down':
$selectModuleNameDown = $selected;
$selectModuleNameDown = $selected_module;
$order = [
'field' => 'module_name',
'order' => 'DESC',
@ -49,7 +57,7 @@ switch ($sortField) {
case 'agent_name':
switch ($sort) {
case 'up':
$selectAgentNameUp = $selected;
$selectAgentNameUp = $selected_module;
$order = [
'field' => 'agent_name',
'order' => 'ASC',
@ -57,7 +65,7 @@ switch ($sortField) {
break;
case 'down':
$selectAgentNameDown = $selected;
$selectAgentNameDown = $selected_module;
$order = [
'field' => 'agent_name',
'order' => 'DESC',
@ -67,7 +75,7 @@ switch ($sortField) {
break;
default:
$selectModuleNameUp = $selected;
$selectModuleNameUp = $selected_module;
$order = [
'field' => 'module_name',
'order' => 'ASC',

View File

@ -30,10 +30,9 @@ if (!$modules || !$searchModules) {
$table->cellspacing = 4;
$table->width = '98%';
$table->class = 'info_table';
$table->head = [];
$table->head[0] = __('Module').' <a href="index.php?search_category=modules&keywords='.$config['search_keywords'].'&head_search_keywords=abc&offset='.$offset.'&sort_field=module_name&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectModuleNameUp]).'</a><a href="index.php?search_category=modules&keywords='.$config['search_keywords'].'&head_search_keywords=abc&offset='.$offset.'&sort_field=module_name&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectModuleNameDown]).'</a>';
$table->head[1] = __('Agent').' <a href="index.php?search_category=modules&keywords='.$config['search_keywords'].'&head_search_keywords=abc&offset='.$offset.'&sort_field=agent_name&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectAgentNameUp]).'</a><a href="index.php?search_category=modules&keywords='.$config['search_keywords'].'&head_search_keywords=abc&offset='.$offset.'&sort_field=agent_name&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectAgentNameDown]).'</a>';
$table->head[0] = __('Module').' <a href="index.php?search_category=modules&keywords='.$config['search_keywords'].'&head_search_keywords=abc&offset='.$offset.'&sort_field=module_name&sort=up">'.html_print_image('images/sort_up'.$selectModuleNameUp.'.png', true).'</a><a href="index.php?search_category=modules&keywords='.$config['search_keywords'].'&head_search_keywords=abc&offset='.$offset.'&sort_field=module_name&sort=down">'.html_print_image('images/sort_down'.$selectModuleNameDown.'.png', true).'</a>';
$table->head[1] = __('Agent').' <a href="index.php?search_category=modules&keywords='.$config['search_keywords'].'&head_search_keywords=abc&offset='.$offset.'&sort_field=agent_name&sort=up">'.html_print_image('images/sort_up'.$selectAgentNameUp.'.png', true).'</a><a href="index.php?search_category=modules&keywords='.$config['search_keywords'].'&head_search_keywords=abc&offset='.$offset.'&sort_field=agent_name&sort=down">'.html_print_image('images/sort_down'.$selectAgentNameDown.'.png', true).'</a>';
$table->head[2] = __('Type');
$table->head[3] = __('Interval');
$table->head[4] = __('Status');
@ -80,6 +79,9 @@ if (!$modules || !$searchModules) {
$module['datos'] = modules_get_last_value($module['id_agente_modulo']);
$module['module_name'] = $module['nombre'];
$linked_module_name = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente='.$module['id_agente'].'&amp;tab=module&amp;id_agent_module='.$module['id_agente_modulo'].'&amp;edit_module='.$module['id_modulo'].'">';
$linked_module_name .= $module['module_name'];
$linked_module_name .= '</a>';
// To search the monitor status
$status_sql = sprintf('SELECT estado from tagente_estado where id_agente_modulo ='.$module['id_agente_modulo']);
$status_sql = db_process_sql($status_sql);
@ -217,7 +219,7 @@ if (!$modules || !$searchModules) {
$url_edit = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$module['id_agente'].'&tab=module&id_agent_module='.$module['id_agente_modulo'].'&edit_module=1';
$edit_module = '<a href="'.$url_edit.'">'.html_print_image('images/edit.svg', true).'</a>';
$edit_module = '<a href="'.$url_edit.'">'.html_print_image('images/edit.svg', true, ['class' => 'invert_filter main_menu_icon']).'</a>';
} else {
$edit_module = '';
}
@ -226,7 +228,7 @@ if (!$modules || !$searchModules) {
array_push(
$table->data,
[
$module['module_name'],
$linked_module_name,
$agentCell,
$typeCell,
$intervalCell,

View File

@ -60,7 +60,7 @@ $order = null;
$sortField = get_parameter('sort_field');
$sort = get_parameter('sort', 'none');
$selected = 'border: 1px solid black;';
$selected_module = '_green';
if ($searchMain) {
$main_tab = [
'text' => "<a href='index.php?search_category=main&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(