diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php
index e598037684..b366797fd4 100755
--- a/pandora_console/include/functions_treeview.php
+++ b/pandora_console/include/functions_treeview.php
@@ -321,16 +321,20 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
$group_name = db_get_value('nombre', 'tgrupo', 'id_grupo', $id_group);
$agent_name = db_get_value('nombre', 'tagente', 'id_agente', $module['id_agente']);
- /*
- if ($user_access_node && check_acl($config['id_user'], $id_group, 'AW')) {
+ if ($user_access_node && check_acl($config['id_user'], $id_group, 'AW')) {
// Actions table
- echo '
';
+ echo '
';
- }*/
+ }
// id_module and id_agent hidden
echo '
';
@@ -921,9 +925,50 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
false,
'',
'white-box-content mrgn_top_0 mrgn_btn_0px border-bottom-gray',
- 'white_table_flex margin-bottom-20'
+ 'white_table_flex'
);
+ if ($user_access_node && check_acl($config['id_user'], $agent['id_grupo'], 'AW')) {
+ $buttons_act = '
';
+
+ if ($agent['id_os'] == CLUSTER_OS_ID) {
+ $cluster = PandoraFMS\Cluster::loadFromAgentId(
+ $agent['id_agente']
+ );
+ $buttons_act .= '
';
+ $buttons_act .= html_print_submit_button(
+ __('Go to cluster edition'),
+ 'upd_button',
+ false,
+ ['class' => 'secondary mini'],
+ true
+ );
+ } else {
+ $buttons_act .= '';
+ $buttons_act .= html_print_submit_button(
+ __('Go to module creation'),
+ 'upd_button',
+ false,
+ ['class' => 'secondary mini'],
+ true
+ );
+
+ $buttons_act .= '';
+ $buttons_act .= html_print_submit_button(
+ __('Go to agent edition'),
+ 'upd_button',
+ false,
+ ['class' => 'secondary mini'],
+ true
+ );
+ }
+
+ $buttons_act .= '';
+ $buttons_act .= '
';
+ }
+
+ echo $buttons_act;
+
if (empty($server_data) === false && is_metaconsole() === true) {
metaconsole_restore_db();
}