diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php
index 198d4a51c8..2062ccb8c8 100755
--- a/pandora_console/include/functions_treeview.php
+++ b/pandora_console/include/functions_treeview.php
@@ -696,6 +696,8 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
$go_to_agent .= '';
$go_to_agent .= html_print_submit_button(__('Go to cluster edition'), 'upd_button', false, 'class="sub config"', true);
} else {
+ $go_to_agent .= '';
+ $go_to_agent .= html_print_submit_button(__('Go to module creation'), 'upd_button', false, 'class="sub config"', true);
$go_to_agent .= '';
$go_to_agent .= html_print_submit_button(__('Go to agent edition'), 'upd_button', false, 'class="sub config"', true);
}
diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php
index 19193d1a1b..52787f1690 100644
--- a/pandora_console/operation/agentes/status_monitor.php
+++ b/pandora_console/operation/agentes/status_monitor.php
@@ -1469,6 +1469,12 @@ if (!empty($result)) {
$table->align[11] = 'left';
}
+ if (check_acl($config['id_user'], 0, 'AR')) {
+ $actions_list = true;
+ $table->head[12] = __('Actions');
+ $table->align[12] = 'left';
+ }
+
$id_type_web_content_string = db_get_value(
'id_tipo',
'ttipo_modulo',
@@ -1589,31 +1595,6 @@ if (!empty($result)) {
if (in_array('data_type', $show_fields) || is_metaconsole()) {
$data[2] = html_print_image('images/'.modules_show_icon_type($row['module_type']), true, ['class' => 'invert_filter']);
$agent_groups = is_metaconsole() ? $row['groups_in_server'] : agents_get_all_groups_agent($row['id_agent'], $row['id_group']);
- if (check_acl_one_of_groups($config['id_user'], $agent_groups, 'AW')) {
- $show_edit_icon = true;
- if (defined('METACONSOLE')) {
- if (!can_user_access_node()) {
- $show_edit_icon = false;
- }
-
- $url_edit_module = $row['server_url'].'index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'id_agente='.$row['id_agent'].'&'.'tab=module&'.'id_agent_module='.$row['id_agente_modulo'].'&'.'edit_module=1'.'&loginhash=auto&loginhash_data='.$row['hashdata'].'&loginhash_user='.str_rot13($row['user']);
- } else {
- $url_edit_module = 'index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'id_agente='.$row['id_agent'].'&'.'tab=module&'.'id_agent_module='.$row['id_agente_modulo'].'&'.'edit_module=1';
- }
-
- if ($show_edit_icon) {
- $table->cellclass[][2] = 'action_buttons';
- $data[2] .= ''.html_print_image(
- 'images/config.png',
- true,
- [
- 'alt' => '0',
- 'border' => '',
- 'title' => __('Edit'),
- ]
- ).'';
- }
- }
}
if (in_array('module_name', $show_fields) || is_metaconsole()) {
@@ -2089,6 +2070,39 @@ if (!empty($result)) {
$data[11] = ui_print_timestamp($row['utimestamp'], true, $option);
}
+ if (check_acl_one_of_groups($config['id_user'], $agent_groups, 'AW')) {
+ if (defined('METACONSOLE')) {
+ $url_edit_module = $row['server_url'].'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&';
+ $url_edit_module .= 'loginhash=auto&id_agente='.$row['id_agent'];
+ $url_edit_module .= '&tab=module&id_agent_module='.$row['id_agente_modulo'].'&edit_module=1&';
+ $url_edit_module .= 'loginhash_data='.$row['hashdata'].'&loginhash_user='.str_rot13($row['user']);
+
+ $url_delete_module = $row['server_url'].'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente';
+ $url_delete_module .= '&id_agente='.$row['id_agent'].'&delete_module='.$row['id_agente_modulo'];
+
+ $table->cellclass[][2] = 'action_buttons';
+ $data[12] .= ''.html_print_image(
+ 'images/config.png',
+ true,
+ [
+ 'alt' => '0',
+ 'border' => '',
+ 'title' => __('Edit'),
+ ]
+ ).'';
+ $onclick = 'onclick="javascript: if (!confirm(\''.__('Are you sure to delete?').'\')) return false;';
+ $data[12] .= ''.html_print_image(
+ 'images/delete.png',
+ true,
+ [
+ 'alt' => '0',
+ 'border' => '',
+ 'title' => __('Delete'),
+ ]
+ ).'';
+ }
+ }
+
array_push($table->data, $data);
}