Merge branch 'ent-11799-15999-eliminacion-de-intervalo-en-agentes-broker' into 'develop'
Ent 11799 15999 eliminacion de intervalo en agentes broker See merge request artica/pandorafms!6885
This commit is contained in:
commit
5b9bf180d8
|
@ -585,7 +585,7 @@ sub write_broker_conf($){
|
||||||
|
|
||||||
# Change the agent name
|
# Change the agent name
|
||||||
if ($line =~ m/^\s*#*\s*agent_name\s+/) {
|
if ($line =~ m/^\s*#*\s*agent_name\s+/) {
|
||||||
$line = "agent_name $broker_agent\n";
|
$line = "agent_name $broker_agent\n#broker active\n";
|
||||||
}
|
}
|
||||||
# Change the logfile
|
# Change the logfile
|
||||||
elsif ($line =~ m/^\s*logfile\s+(.*)/) {
|
elsif ($line =~ m/^\s*logfile\s+(.*)/) {
|
||||||
|
|
|
@ -1860,7 +1860,7 @@ sub write_broker_conf($){
|
||||||
|
|
||||||
# Change the agent name
|
# Change the agent name
|
||||||
if ($line =~ m/^\s*#*\s*agent_name\s+/) {
|
if ($line =~ m/^\s*#*\s*agent_name\s+/) {
|
||||||
$line = "agent_name $broker_agent\n";
|
$line = "agent_name $broker_agent\n#broker active\n";
|
||||||
}
|
}
|
||||||
# Change the logfile
|
# Change the logfile
|
||||||
elsif ($line =~ m/^\s*logfile\s+(.*)/) {
|
elsif ($line =~ m/^\s*logfile\s+(.*)/) {
|
||||||
|
|
|
@ -500,21 +500,40 @@ $tableAgent->data['primary_group'][0] .= ui_print_group_icon(
|
||||||
);
|
);
|
||||||
$tableAgent->data['primary_group'][0] .= '</span>';
|
$tableAgent->data['primary_group'][0] .= '</span>';
|
||||||
|
|
||||||
$tableAgent->data['caption_interval'][0] = __('Interval');
|
$broker = false;
|
||||||
// $tableAgent->rowstyle['interval'] = 'width: 260px';
|
if (enterprise_installed()) {
|
||||||
$tableAgent->rowclass['interval'] = 'w540px';
|
// CHECK BROKER FOR SHOW INTERVAL.
|
||||||
$tableAgent->data['interval'][0] = html_print_extended_select_for_time(
|
enterprise_include('include/functions_config_agents.php');
|
||||||
'intervalo',
|
// Read configuration file.
|
||||||
$intervalo,
|
$files = config_agents_get_agent_config_filenames($id_agente);
|
||||||
'',
|
$file_name = $files['conf'];
|
||||||
'',
|
$agent_config = file_get_contents($file_name);
|
||||||
'0',
|
$encoding = 'UTF-8';
|
||||||
10,
|
$agent_config_utf8 = mb_convert_encoding($agent_config, 'UTF-8', $encoding);
|
||||||
true,
|
if ($agent_config_utf8 !== false) {
|
||||||
false,
|
$agent_config = $agent_config_utf8;
|
||||||
true,
|
}
|
||||||
'w33p'
|
|
||||||
);
|
$broker = str_contains($agent_config, '#broker active');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($broker === false) {
|
||||||
|
$tableAgent->data['caption_interval'][0] = __('Interval');
|
||||||
|
// $tableAgent->rowstyle['interval'] = 'width: 260px';
|
||||||
|
$tableAgent->rowclass['interval'] = 'w540px';
|
||||||
|
$tableAgent->data['interval'][0] = html_print_extended_select_for_time(
|
||||||
|
'intervalo',
|
||||||
|
$intervalo,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'0',
|
||||||
|
10,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'w33p'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if ($intervalo < SECONDS_5MINUTES) {
|
if ($intervalo < SECONDS_5MINUTES) {
|
||||||
$tableAgent->data['interval'][0] .= clippy_context_help('interval_agent_min');
|
$tableAgent->data['interval'][0] .= clippy_context_help('interval_agent_min');
|
||||||
|
|
Loading…
Reference in New Issue