#11799 hide interval for broker agents
This commit is contained in:
parent
874bd04aa8
commit
cdd9af5108
|
@ -499,19 +499,23 @@ $tableAgent->data['primary_group'][0] .= ui_print_group_icon(
|
|||
'after_input_icon'
|
||||
);
|
||||
$tableAgent->data['primary_group'][0] .= '</span>';
|
||||
// CHECK BROKER FOR SHOW INTERVAL.
|
||||
enterprise_include('include/functions_config_agents.php');
|
||||
// Read configuration file.
|
||||
$files = config_agents_get_agent_config_filenames($id_agente);
|
||||
$file_name = $files['conf'];
|
||||
$agent_config = file_get_contents($file_name);
|
||||
$encoding = 'UTF-8';
|
||||
$agent_config_utf8 = mb_convert_encoding($agent_config, 'UTF-8', $encoding);
|
||||
if ($agent_config_utf8 !== false) {
|
||||
$agent_config = $agent_config_utf8;
|
||||
}
|
||||
|
||||
$broker = str_contains($agent_config, '#broker active');
|
||||
$broker = false;
|
||||
if (enterprise_installed()) {
|
||||
// CHECK BROKER FOR SHOW INTERVAL.
|
||||
enterprise_include('include/functions_config_agents.php');
|
||||
// Read configuration file.
|
||||
$files = config_agents_get_agent_config_filenames($id_agente);
|
||||
$file_name = $files['conf'];
|
||||
$agent_config = file_get_contents($file_name);
|
||||
$encoding = 'UTF-8';
|
||||
$agent_config_utf8 = mb_convert_encoding($agent_config, 'UTF-8', $encoding);
|
||||
if ($agent_config_utf8 !== false) {
|
||||
$agent_config = $agent_config_utf8;
|
||||
}
|
||||
|
||||
$broker = str_contains($agent_config, '#broker active');
|
||||
}
|
||||
|
||||
if ($broker === false) {
|
||||
$tableAgent->data['caption_interval'][0] = __('Interval');
|
||||
|
|
Loading…
Reference in New Issue