Merge branch 'develop' into ent-3468-Ayudas_online
Conflicts: pandora_console/godmode/agentes/agent_manager.php Former-commit-id: c53d6c5819284e92caae040c52c6da477c27a2f3
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
docker build --rm=true --build-arg BRANCH="develop" --build-arg DB_PASS="pandora" -t pandorafms/pandorafms:7 . && \
|
||||
docker build --rm=true --pull --no-cache --build-arg BRANCH="develop" --build-arg DB_PASS="pandora" -t pandorafms/pandorafms:7 . && \
|
||||
docker push pandorafms/pandorafms:7
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.734-190508
|
||||
Version: 7.0NG.734-190513
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.734-190508"
|
||||
pandora_version="7.0NG.734-190513"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -42,7 +42,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.734';
|
||||
use constant AGENT_BUILD => '190508';
|
||||
use constant AGENT_BUILD => '190513';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.734
|
||||
%define release 190508
|
||||
%define release 190513
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.734
|
||||
%define release 190508
|
||||
%define release 190513
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.734"
|
||||
PI_BUILD="190508"
|
||||
PI_BUILD="190513"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{190508}
|
||||
{190513}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.734(Build 190508)")
|
||||
#define PANDORA_VERSION ("7.0NG.734(Build 190513)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.734(Build 190508))"
|
||||
VALUE "ProductVersion", "(7.0NG.734(Build 190513))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.734-190508
|
||||
Version: 7.0NG.734-190513
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.734-190508"
|
||||
pandora_version="7.0NG.734-190513"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
START TRANSACTION;
|
||||
|
||||
DELETE FROM `tevent_response` WHERE `name` LIKE 'Create Integria IMS incident from event';
|
||||
|
||||
COMMIT;
|
|
@ -122,7 +122,7 @@ function execution_time()
|
|||
if ($times[0]['datos'] > ($times[1]['datos'] * 1.2)) {
|
||||
return "<a class= 'content' style= 'color: red;'>Warning Status</a><a>   The execution time could be degrading. For a more extensive information of this data consult the Execution Time graph</a>";
|
||||
} else {
|
||||
return "<a style ='color: green;'>Normal Status</a><a>   The execution time is correct. For a more extensive information of this data consult the Execution Time graph</a>";
|
||||
return "<a style ='color: green;'>Normal Status</a><a>   The execution time is correct. For more information about this data, check the Execution Time graph</a>";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -173,9 +173,9 @@ function license_capacity()
|
|||
$status_license_capacity = '';
|
||||
$current_count = db_get_value_sql('SELECT count(*) FROM tagente');
|
||||
if ($current_count > ($license_limit * 90 / 100)) {
|
||||
$status_license_capacity = "<a class= 'content' style= 'color: red;text-decoration: none;'>Warning Status</a><a style ='text-decoration: none;'>   The license capacity is more than 90 percent</a>";
|
||||
$status_license_capacity = "<a class= 'content' style= 'color: red;text-decoration: none;'>Warning Status</a><a style ='text-decoration: none;'>   License capacity exceeds 90 percent</a>";
|
||||
} else {
|
||||
$status_license_capacity = "<a style= 'color: green;text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   The license capacity is less than 90 percent</a>";
|
||||
$status_license_capacity = "<a style= 'color: green;text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   License capacity is less than 90 percent</a>";
|
||||
}
|
||||
|
||||
return $status_license_capacity;
|
||||
|
@ -202,9 +202,9 @@ function interval_average_of_network_modules()
|
|||
$average_time = ((int) $total_module_interval_time / $total_network_modules);
|
||||
|
||||
if ($average_time < 180) {
|
||||
$status_average_modules = "<a class= 'content' style= 'color: red;text-decoration: none;'>Warning Status</a><a style ='text-decoration: none;'>   The system has a lot of load (average time $average_time) and a very fine configuration is required</a>";
|
||||
$status_average_modules = "<a class= 'content' style= 'color: red;text-decoration: none;'>Warning Status</a><a style ='text-decoration: none;'>   The system is overloaded (average time $average_time) and a very fine configuration is required</a>";
|
||||
} else {
|
||||
$status_average_modules = "<a style ='color: green;text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   The system has an acceptable charge (average time $average_time) </a>";
|
||||
$status_average_modules = "<a style ='color: green;text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   The system is not overloaded (average time $average_time) </a>";
|
||||
}
|
||||
|
||||
if ($average_time == 0) {
|
||||
|
@ -221,9 +221,9 @@ $attachment_total_files = count(glob($config['homedir'].'/attachment/{*.*}', GLO
|
|||
function files_attachment_folder($total_files)
|
||||
{
|
||||
if ($total_files <= 700) {
|
||||
$status_total_files = "<a style ='color: green;text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   The attachment folder has less than 700 files.</a>";
|
||||
$status_total_files = "<a style ='color: green;text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   The attached folder contains less than 700 files.</a>";
|
||||
} else {
|
||||
$status_total_files = "<a class= 'content' style= 'color: red;text-decoration: none;'>Warning Status</a><a style ='text-decoration: none;'>   The attachment folder has more than 700 files.</a>";
|
||||
$status_total_files = "<a class= 'content' style= 'color: red;text-decoration: none;'>Warning Status</a><a style ='text-decoration: none;'>   The attached folder contains more than 700 files.</a>";
|
||||
}
|
||||
|
||||
return $status_total_files;
|
||||
|
@ -236,9 +236,9 @@ $tagente_datos_size = db_get_value_sql('SELECT COUNT(*) FROM tagente_datos');
|
|||
function status_tagente_datos($tagente_datos_size)
|
||||
{
|
||||
if ($tagente_datos_size <= 3000000) {
|
||||
$tagente_datos_size = "<a style ='color: green;text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   The tagente_datos table has an acceptable amount of data.</a>";
|
||||
$tagente_datos_size = "<a style ='color: green;text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   The tagente_datos table contains an acceptable amount of data.</a>";
|
||||
} else {
|
||||
$tagente_datos_size = "<a class= 'content' style ='color: red;text-decoration: none;'>Warning Status</a><a>   The tagente_datos table has too much data. A historical database is recommended.</a>";
|
||||
$tagente_datos_size = "<a class= 'content' style ='color: red;text-decoration: none;'>Warning Status</a><a>   The tagente_datos table contains too much data. A historical database is recommended.</a>";
|
||||
}
|
||||
|
||||
return $tagente_datos_size;
|
||||
|
@ -302,9 +302,9 @@ function status_fragmentation_tables($tables_fragmentation_max_rec_value, $table
|
|||
{
|
||||
$status_tables_frag = '';
|
||||
if ($tables_fragmentation > $tables_fragmentation_max_rec_value) {
|
||||
$status_tables_frag = "<a class= 'content' style ='color: red; text-decoration: none;'>Warning Status</a><a style ='text-decoration: none;'>   The fragmentation tables is higher than recommended. You should defragment them.</a>";
|
||||
$status_tables_frag = "<a class= 'content' style ='color: red; text-decoration: none;'>Warning Status</a><a style ='text-decoration: none;'>   Table fragmentation is higher than recommended. They should be defragmented.</a>";
|
||||
} else {
|
||||
$status_tables_frag = "<a style ='color: green; text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   The fragmentation tables is correct.</a>";
|
||||
$status_tables_frag = "<a style ='color: green; text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   Table fragmentation is correct.</a>";
|
||||
}
|
||||
|
||||
return $status_tables_frag;
|
||||
|
@ -320,9 +320,9 @@ if ($console_mode == 1) {
|
|||
echo "\nPandora FMS PHP diagnostic tool v3.2 (c) Artica ST 2009-2010 \n";
|
||||
|
||||
if ($argc == 1 || in_array($argv[1], ['--help', '-help', '-h', '-?'])) {
|
||||
echo "\nThis command line script gives information about Pandora FMS database.
|
||||
This program only can be executed from console, and need a parameter, the
|
||||
full path to Pandora FMS 'config.php' file.
|
||||
echo "\nThis command line script contains information about Pandora FMS database.
|
||||
This program can only be executed from the console, and it needs a parameter, the
|
||||
full path to Pandora FMS 'config.php' file.
|
||||
|
||||
Usage:
|
||||
php pandora_diag.php path_to_pandora_console
|
||||
|
@ -711,7 +711,7 @@ render_info_data(
|
|||
|
||||
render_row($tables_fragmentation_max_rec_value.'%', 'Tables fragmentation (maximum recommended value)');
|
||||
render_row(number_format($tables_fragmentation, 2).'%', 'Tables fragmentation (current value)');
|
||||
render_row(status_fragmentation_tables($tables_fragmentation_max_rec_value, $tables_fragmentation), 'Status fragmentation tables');
|
||||
render_row(status_fragmentation_tables($tables_fragmentation_max_rec_value, $tables_fragmentation), 'Table fragmentation status');
|
||||
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__(' Pandora FMS logs dates').'</th></tr>';
|
||||
|
||||
|
@ -740,14 +740,14 @@ render_info_data(
|
|||
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__(' Status of the attachment folder').'</th></tr>';
|
||||
|
||||
render_row($attachment_total_files, 'Total files in the attachment folder');
|
||||
render_row($attachment_total_files, 'Total files in the attached folder');
|
||||
render_row(files_attachment_folder($attachment_total_files), 'Status of the attachment folder');
|
||||
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__(' Information from the tagente_datos table').'</th></tr>';
|
||||
|
||||
render_row($tagente_datos_size, 'Total data in the tagente_datos table');
|
||||
render_row(status_tagente_datos($tagente_datos_size), 'Status of the tagente_datos table');
|
||||
render_row(execution_time(), 'Degradation of the execution time when executing a count');
|
||||
render_row($tagente_datos_size, 'Total data in tagente_datos table');
|
||||
render_row(status_tagente_datos($tagente_datos_size), 'Tangente_datos table status');
|
||||
render_row(execution_time(), 'Execution time degradation when executing a count');
|
||||
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__(' Pandora FMS server threads').'</th></tr>';
|
||||
|
||||
|
@ -790,6 +790,6 @@ render_info_data(
|
|||
echo "<hr color='#b1b1b1' size=1 width=1000 align=left>";
|
||||
|
||||
echo '<span>'.__(
|
||||
'(*) Please check your Pandora Server setup and be sure that database maintenance daemon is running. It\' very important to
|
||||
keep up-to-date database to get the best performance and results in Pandora'
|
||||
'(*) Please check your Pandora Server setup and make sure that the database maintenance daemon is running. It\' is very important to
|
||||
keep the database up-to-date to get the best performance and results in Pandora'
|
||||
).'</span><br><br><br>';
|
||||
|
|
|
@ -167,27 +167,18 @@ if ($disk_conf_delete) {
|
|||
|
||||
echo '<form name="conf_agent" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">';
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
|
||||
$table->head = [];
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold; width: 150px;';
|
||||
$table->data = [];
|
||||
|
||||
$table->align[2] = 'center';
|
||||
|
||||
if (!$new_agent && $alias != '') {
|
||||
$table->data[0][0] = __('Agent name').ui_print_help_tip(__("The agent's name must be the same as the one defined at the console"), true);
|
||||
$table->data[0][1] = html_print_input_text('agente', $nombre_agente, '', 50, 100, true);
|
||||
$table_agent_name = '<div class="label_select"><p class="input_label">'.__('Agent name').': '.ui_print_help_tip(__("The agent's name must be the same as the one defined at the console"), true).'</p>';
|
||||
$table_agent_name .= '<div class="label_select_parent">';
|
||||
$table_agent_name .= '<div class="label_select_child_left">'.html_print_input_text('agente', $nombre_agente, '', 50, 100, true).'</div>';
|
||||
$table_agent_name .= '<div class="label_select_child_right agent_options_agent_name">';
|
||||
|
||||
$table->data[0][2] = __('QR Code Agent view');
|
||||
$table_qr_code = '<div class="agent_qr white_box"><p class="input_label">'.__('QR Code Agent view').': </p>';
|
||||
|
||||
if ($id_agente) {
|
||||
$table->data[0][1] .= ' <b>'.__('ID')."</b> $id_agente ";
|
||||
$table->data[0][1] .= ' <a href="index.php?sec=gagente&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'">';
|
||||
$table->data[0][1] .= html_print_image(
|
||||
$table_agent_name .= '<span>'.__('ID').' '.$id_agente.'</span>';
|
||||
$table_agent_name .= '<a href="index.php?sec=gagente&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'">';
|
||||
$table_agent_name .= html_print_image(
|
||||
'images/zoom.png',
|
||||
true,
|
||||
[
|
||||
|
@ -195,20 +186,23 @@ if (!$new_agent && $alias != '') {
|
|||
'title' => __('Agent detail'),
|
||||
]
|
||||
);
|
||||
$table->data[0][1] .= '</a>';
|
||||
$table_agent_name .= '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
// Remote configuration available
|
||||
if (!$new_agent) {
|
||||
$agent_options_update = 'agent_options_update';
|
||||
|
||||
// Delete link from here.
|
||||
$table_agent_name .= "<a onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\" href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente=$id_agente&search=&offset=0&sort_field=&sort=none'>".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).'</a>';
|
||||
|
||||
// Remote configuration available.
|
||||
if (isset($filename)) {
|
||||
if (file_exists($filename['md5'])) {
|
||||
$agent_name = agents_get_name($id_agente);
|
||||
$agent_name = io_safe_output($agent_name);
|
||||
$agent_md5 = md5($agent_name, false);
|
||||
|
||||
$table->data[0][1] .= ' '.'<a href="index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'tab=remote_configuration&'.'id_agente='.$id_agente.'&'.'disk_conf='.$agent_md5.'">';
|
||||
$table->data[0][1] .= html_print_image(
|
||||
$table_agent_name .= '<a href="index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'tab=remote_configuration&'.'id_agente='.$id_agente.'&'.'disk_conf='.$agent_md5.'">';
|
||||
$table_agent_name .= html_print_image(
|
||||
'images/application_edit.png',
|
||||
true,
|
||||
[
|
||||
|
@ -216,35 +210,44 @@ if (!$new_agent) {
|
|||
'title' => __('This agent can be remotely configured'),
|
||||
]
|
||||
);
|
||||
$table->data[0][1] .= '</a>'.ui_print_help_tip(
|
||||
$table_agent_name .= '</a>'.ui_print_help_tip(
|
||||
__('You can remotely edit this agent configuration'),
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$table_agent_name .= '</div></div></div>';
|
||||
}
|
||||
|
||||
// Delete link from here
|
||||
if (!$new_agent) {
|
||||
$table->data[0][1] .= " <span align='right'><a onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\" href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente=$id_agente&search=&offset=0&sort_field=&sort=none'>".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).'</a>';
|
||||
}
|
||||
|
||||
$table->data[1][0] = __('Alias').ui_print_help_tip(__('Characters /,\,|,%,#,&,$ will be ignored'), true).'</span>';
|
||||
$table->data[1][1] = html_print_input_text('alias', $alias, '', 50, 100, true);
|
||||
if ($new_agent) {
|
||||
$table->data[1][1] .= html_print_checkbox('alias_as_name', 1, $config['alias_as_name'], true).__('Use alias as name');
|
||||
$label_select_child_left = 'label_select_child_left';
|
||||
$label_select_parent = 'label_select_parent';
|
||||
}
|
||||
|
||||
$table->data[2][0] = __('IP Address');
|
||||
$table->data[2][1] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true).html_print_checkbox('unique_ip', 1, $config['unique_ip'], true).__('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true);
|
||||
$table_alias = '<div class="label_select"><p class="input_label">'.__('Alias').': '.ui_print_help_tip(__('Characters /,\,|,%,#,&,$ will be ignored'), true).'</p>';
|
||||
$table_alias .= '<div class='.$label_select_parent.'>';
|
||||
$table_alias .= '<div class='.$label_select_child_left.'>'.html_print_input_text('alias', $alias, '', 50, 100, true).'</div>';
|
||||
if ($new_agent) {
|
||||
$table_alias .= '<div class="label_select_child_right">'.html_print_checkbox_switch('alias_as_name', 1, $config['alias_as_name'], true).__('Use alias as name').'</div>';
|
||||
}
|
||||
|
||||
$table_alias .= '</div></div>';
|
||||
|
||||
$table_ip = '<div class="label_select"><p class="input_label">'.__('IP Address').': </p>';
|
||||
$table_ip .= '<div class="label_select_parent">';
|
||||
$table_ip .= '<div class="label_select_child_left">'.html_print_input_text('direccion', $direccion_agente, '', 16, 100, true).'</div>';
|
||||
$table_ip .= '<div class="label_select_child_right">'.html_print_checkbox_switch('unique_ip', 1, $config['unique_ip'], true).__('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true).'</div>';
|
||||
$table_ip .= '</div></div>';
|
||||
|
||||
if ($id_agente) {
|
||||
$table->data[2][1] .= ' ';
|
||||
|
||||
$ip_all = agents_get_addresses($id_agente);
|
||||
|
||||
$table->data[2][1] .= html_print_select($ip_all, 'address_list', $direccion_agente, '', '', 0, true);
|
||||
$table->data[2][1] .= ' '.html_print_checkbox('delete_ip', 1, false, true).__('Delete selected');
|
||||
$table_ip .= '<div class="label_select">';
|
||||
$table_ip .= '<div class="label_select_parent">';
|
||||
$table_ip .= '<div class="label_select_child_left">'.html_print_select($ip_all, 'address_list', $direccion_agente, '', '', 0, true).'</div>';
|
||||
$table_ip .= '<div class="label_select_child_right">'.html_print_checkbox_switch('delete_ip', 1, false, true).__('Delete selected').'</div>';
|
||||
$table_ip .= '</div></div>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -254,13 +257,12 @@ if ($id_agente) {
|
|||
}
|
||||
</style>
|
||||
<?php
|
||||
if (!$new_agent) {
|
||||
$table->rowspan[2][2] = 3;
|
||||
if (!$new_agent && $alias != '') {
|
||||
if ($id_agente) {
|
||||
$table->data[2][2] = "<a id='qr_code_agent_view' href='javascript: show_dialog_qrcode(null, \"".ui_get_full_url('mobile/index.php?page=agent&id='.$id_agente)."\" );'></a>";
|
||||
} else {
|
||||
$table->data[2][2] = __('Only it is show when<br />the agent is saved.');
|
||||
$table_qr_code .= "<a id='qr_code_agent_view' href='javascript: show_dialog_qrcode(null, \"".ui_get_full_url('mobile/index.php?page=agent&id='.$id_agente)."\" );'></a>";
|
||||
}
|
||||
|
||||
$table_qr_code .= '</div>';
|
||||
}
|
||||
|
||||
$groups = users_get_groups($config['id_user'], 'AR', false);
|
||||
|
@ -277,28 +279,32 @@ if (is_array($modules)) {
|
|||
}
|
||||
}
|
||||
|
||||
$table->data[4][0] = __('Primary group');
|
||||
// Cannot change primary group if user have not permission for that group
|
||||
$table_primary_group = '<div class="label_select"><p class="input_label">'.__('Primary group').': </p>';
|
||||
$table_primary_group .= '<div class="label_select_parent">';
|
||||
// Cannot change primary group if user have not permission for that group.
|
||||
if (isset($groups[$grupo]) || $new_agent) {
|
||||
$table->data[4][1] = html_print_select_groups(false, 'AR', false, 'grupo', $grupo, '', '', 0, true);
|
||||
$table_primary_group .= html_print_select_groups(false, 'AR', false, 'grupo', $grupo, '', '', 0, true);
|
||||
} else {
|
||||
$table->data[4][1] = groups_get_name($grupo);
|
||||
$table->data[4][1] .= html_print_input_hidden('grupo', $grupo, true);
|
||||
$table_primary_group .= groups_get_name($grupo);
|
||||
$table_primary_group .= html_print_input_hidden('grupo', $grupo, true);
|
||||
}
|
||||
|
||||
$table->data[4][1] .= ' <span id="group_preview">';
|
||||
$table->data[4][1] .= ui_print_group_icon($grupo, true);
|
||||
$table->data[4][1] .= '</span>';
|
||||
$table_primary_group .= '<div class="label_select_child_icons"><span id="group_preview">';
|
||||
$table_primary_group .= ui_print_group_icon($grupo, true);
|
||||
$table_primary_group .= '</span></div></div></div>';
|
||||
|
||||
$table->data[5][0] = __('Interval');
|
||||
|
||||
$table->data[5][1] = html_print_extended_select_for_time('intervalo', $intervalo, '', '', '0', 10, true);
|
||||
$table_interval = '<div class="label_select"><p class="input_label">'.__('Interval').': </p>';
|
||||
$table_interval .= '<div class="label_select_parent">';
|
||||
$table_interval .= html_print_extended_select_for_time('intervalo', $intervalo, '', '', '0', 10, true);
|
||||
if ($intervalo < SECONDS_5MINUTES) {
|
||||
$table->data[5][1] .= clippy_context_help('interval_agent_min');
|
||||
$table_interval .= clippy_context_help('interval_agent_min');
|
||||
}
|
||||
|
||||
$table->data[6][0] = __('OS');
|
||||
$table->data[6][1] = html_print_select_from_sql(
|
||||
$table_interval .= '</div></div>';
|
||||
|
||||
$table_os = '<div class="label_select"><p class="input_label">'.__('OS').': </p>';
|
||||
$table_os .= '<div class="label_select_parent">';
|
||||
$table_os .= html_print_select_from_sql(
|
||||
'SELECT id_os, name FROM tconfig_os',
|
||||
'id_os',
|
||||
$id_os,
|
||||
|
@ -307,18 +313,19 @@ $table->data[6][1] = html_print_select_from_sql(
|
|||
'0',
|
||||
true
|
||||
);
|
||||
$table->data[6][1] .= ' <span id="os_preview">';
|
||||
$table->data[6][1] .= ui_print_os_icon($id_os, false, true);
|
||||
$table->data[6][1] .= '</span>';
|
||||
$table_os .= '<div class="label_select_child_icons"> <span id="os_preview">';
|
||||
$table_os .= ui_print_os_icon($id_os, false, true);
|
||||
$table_os .= '</span></div></div></div>';
|
||||
|
||||
// Network server
|
||||
// Network server.
|
||||
$servers = servers_get_names();
|
||||
if (!array_key_exists($server_name, $servers)) {
|
||||
$server_Name = 0;
|
||||
// Set the agent have not server.
|
||||
}
|
||||
|
||||
$table->data[7][0] = __('Server');
|
||||
$table_server = '<div class="label_select"><p class="input_label">'.__('Server').': </p>';
|
||||
$table_server .= '<div class="label_select_parent">';
|
||||
if ($new_agent) {
|
||||
// Set first server by default.
|
||||
$servers_get_names = servers_get_names();
|
||||
|
@ -326,7 +333,7 @@ if ($new_agent) {
|
|||
$server_name = reset($array_keys_servers_get_names);
|
||||
}
|
||||
|
||||
$table->data[7][1] = html_print_select(
|
||||
$table_server .= html_print_select(
|
||||
servers_get_names(),
|
||||
'server_name',
|
||||
$server_name,
|
||||
|
@ -334,36 +341,35 @@ $table->data[7][1] = html_print_select(
|
|||
__('None'),
|
||||
0,
|
||||
true
|
||||
);
|
||||
).'<div class="label_select_child_icons">'.ui_print_help_icon('agent_server', true).'</div></div></div>';
|
||||
|
||||
// Description.
|
||||
$table->data[8][0] = __('Description');
|
||||
$table->data[8][1] = html_print_input_text(
|
||||
$table_description = '<div class="label_select"><p class="input_label">'.__('Description').': </p>';
|
||||
$table_description .= html_print_input_text(
|
||||
'comentarios',
|
||||
$comentarios,
|
||||
'',
|
||||
45,
|
||||
200,
|
||||
true
|
||||
);
|
||||
).'</div>';
|
||||
|
||||
html_print_table($table);
|
||||
unset($table);
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
echo '<div class="first_row">
|
||||
<div class="agent_options '.$agent_options_update.' white_box">
|
||||
<div class="agent_options_column_left">'.$table_agent_name.$table_alias.$table_ip.$table_primary_group.'</div>
|
||||
<div class="agent_options_column_right">'.$table_interval.$table_os.$table_server.$table_description.'</div>
|
||||
</div>';
|
||||
if (!$new_agent && $alias != '') {
|
||||
echo $table_qr_code;
|
||||
}
|
||||
|
||||
$table->head = [];
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold; ';
|
||||
$table->style[4] = 'font-weight: bold;';
|
||||
$table->data = [];
|
||||
echo '</div>';
|
||||
|
||||
if (enterprise_installed()) {
|
||||
$secondary_groups_selected = enterprise_hook('agents_get_secondary_groups', [$id_agente]);
|
||||
$table->data['secondary_groups'][0] = __('Secondary groups');
|
||||
$table->data['secondary_groups'][1] = html_print_select_groups(
|
||||
$table_adv_secondary_groups = '<div class="label_select"><p class="input_label">'.__('Secondary groups').': '.ui_print_help_icon('secondary_groups', true).'</p></div>';
|
||||
$table_adv_secondary_groups_left = html_print_select_groups(
|
||||
false,
|
||||
// Use the current user to select the groups
|
||||
'AR',
|
||||
|
@ -390,7 +396,7 @@ if (enterprise_installed()) {
|
|||
// CSS classnames (default)
|
||||
false,
|
||||
// Not disabled (default)
|
||||
false,
|
||||
'width:50%; min-width:170px; text-align:center',
|
||||
// Inline styles (default)
|
||||
false,
|
||||
// Option style select (default)
|
||||
|
@ -404,29 +410,31 @@ if (enterprise_installed()) {
|
|||
// Do not show the primary group in this selection
|
||||
);
|
||||
|
||||
$table->data['secondary_groups'][2] = html_print_input_image(
|
||||
$table_adv_secondary_groups_arrows = html_print_input_image(
|
||||
'add_secondary',
|
||||
'images/darrowright.png',
|
||||
'images/darrowright_green.png',
|
||||
1,
|
||||
'',
|
||||
true,
|
||||
[
|
||||
'id' => 'right_autorefreshlist',
|
||||
'title' => __('Add secondary groups'),
|
||||
'onclick' => 'agent_manager_add_secondary_groups(event, '.$id_agente.');',
|
||||
]
|
||||
).'<br /><br /><br /><br />'.html_print_input_image(
|
||||
).html_print_input_image(
|
||||
'remove_secondary',
|
||||
'images/darrowleft.png',
|
||||
'images/darrowleft_green.png',
|
||||
1,
|
||||
'',
|
||||
true,
|
||||
[
|
||||
'id' => 'left_autorefreshlist',
|
||||
'title' => __('Remove secondary groups'),
|
||||
'onclick' => 'agent_manager_remove_secondary_groups(event, '.$id_agente.');',
|
||||
]
|
||||
);
|
||||
|
||||
$table->data['secondary_groups'][3] = html_print_select(
|
||||
$table_adv_secondary_groups_right .= html_print_select(
|
||||
$secondary_groups_selected['for_select'],
|
||||
// Values
|
||||
'secondary_groups_selected',
|
||||
|
@ -441,8 +449,16 @@ if (enterprise_installed()) {
|
|||
// Nothing selected
|
||||
true,
|
||||
// Return HTML (not echo)
|
||||
true
|
||||
true,
|
||||
// Multiple selection
|
||||
true,
|
||||
// Sort
|
||||
'',
|
||||
// Class
|
||||
false,
|
||||
// Disabled
|
||||
'width:50%; min-width:170px; text-align:center'
|
||||
// Style
|
||||
);
|
||||
|
||||
// safe operation mode
|
||||
|
@ -457,47 +473,42 @@ if (enterprise_installed()) {
|
|||
$safe_mode_modules[$m['id_module']] = $m['name'];
|
||||
}
|
||||
|
||||
$table->data[2][0] = __('Safe operation mode').ui_print_help_tip(
|
||||
$table_adv_safe = '<div class="label_select_simple label_simple_items"><p class="input_label input_label_simple">'.__('Safe operation mode').': '.ui_print_help_tip(
|
||||
__(
|
||||
'This mode allow %s to disable all modules
|
||||
of this agent while the selected module is on CRITICAL status',
|
||||
get_product_name()
|
||||
),
|
||||
true
|
||||
);
|
||||
$table->data[2][1] = html_print_checkbox('safe_mode', 1, $safe_mode, true);
|
||||
$table->data[2][1] .= ' '.__('Module').' '.html_print_select($safe_mode_modules, 'safe_mode_module', $safe_mode_module, '', '', 0, true);
|
||||
).'</p>';
|
||||
$table_adv_safe .= html_print_checkbox_switch('safe_mode', 1, $safe_mode, true);
|
||||
$table_adv_safe .= __('Module').' '.html_print_select($safe_mode_modules, 'safe_mode_module', $safe_mode_module, '', '', 0, true).'</div>';
|
||||
}
|
||||
|
||||
// Remote configuration
|
||||
$table->data[5][0] = __('Remote configuration');
|
||||
$table_adv_remote = '<div class="label_select"><p class="input_label">'.__('Remote configuration').': </p>';
|
||||
|
||||
if (!$new_agent) {
|
||||
$table->data[5][1] = '<em>'.__('Not available').'</em>';
|
||||
if (isset($filename)) {
|
||||
if (file_exists($filename['md5'])) {
|
||||
$table->data[5][1] = date('F d Y H:i:s', fileatime($filename['md5']));
|
||||
// Delete remote configuration
|
||||
$table->data[5][1] .= '<a href="index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'tab=main&'.'disk_conf_delete=1&'.'id_agente='.$id_agente.'">';
|
||||
$table->data[5][1] .= html_print_image(
|
||||
'images/cross.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Delete remote configuration file'),
|
||||
'style' => 'vertical-align: middle;',
|
||||
]
|
||||
).'</a>';
|
||||
$table->data[5][1] .= '</a>'.ui_print_help_tip(
|
||||
__('Delete this conf file implies that for restore you must reactive remote config in the local agent.'),
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
if (!$new_agent && isset($filename) && file_exists($filename['md5'])) {
|
||||
$table_adv_remote .= date('F d Y H:i:s', fileatime($filename['md5']));
|
||||
// Delete remote configuration
|
||||
$table_adv_remote .= '<a href="index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'tab=main&'.'disk_conf_delete=1&'.'id_agente='.$id_agente.'">';
|
||||
$table_adv_remote .= html_print_image(
|
||||
'images/cross.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Delete remote configuration file'),
|
||||
'style' => 'vertical-align: middle;',
|
||||
]
|
||||
).'</a>';
|
||||
$table_adv_remote .= '</a>'.ui_print_help_tip(
|
||||
__('Delete this conf file implies that for restore you must reactive remote config in the local agent.'),
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$table->data[5][1] = '<em>'.__('Not available').'</em>';
|
||||
$table_adv_remote .= '<em>'.__('Not available').'</em>';
|
||||
}
|
||||
|
||||
|
||||
$table_adv_remote .= '</div>';
|
||||
|
||||
$cps_array[-1] = __('Disabled');
|
||||
if ($cps > 0) {
|
||||
|
@ -511,16 +522,16 @@ if (enterprise_installed()) {
|
|||
$cps_array[$cps_inc] = __('Enabled');
|
||||
}
|
||||
|
||||
$table->data[6][0] = __('Cascade protection services');
|
||||
$table->data[6][0] .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true);
|
||||
$table->data[6][1] = html_print_select($cps_array, 'cps', $cps, '', '', 0, true);
|
||||
$table_adv_cascade = '<div class="label_select"><p class="input_label">'.__('Cascade protection services').': ';
|
||||
$table_adv_cascade .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true).'</p>';
|
||||
$table_adv_cascade .= html_print_select($cps_array, 'cps', $cps, '', '', 0, true).'</div>';
|
||||
}
|
||||
|
||||
// Custom ID
|
||||
$table->data[0][0] = __('Custom ID');
|
||||
$table->data[0][1] = html_print_input_text('custom_id', $custom_id, '', 16, 255, true);
|
||||
$table_adv_custom_id = '<div class="label_select"><p class="input_label">'.__('Custom ID').': </p>';
|
||||
$table_adv_custom_id .= html_print_input_text('custom_id', $custom_id, '', 16, 255, true).'</div>';
|
||||
|
||||
$table->data[1][0] = __('Parent');
|
||||
$table_adv_parent = '<div class="label_select"><p class="input_label">'.__('Parent').': </p>';
|
||||
$params = [];
|
||||
$params['return'] = true;
|
||||
$params['show_helptip'] = true;
|
||||
|
@ -532,75 +543,79 @@ $params['value'] = db_get_value('alias', 'tagente', 'id_agente', $id_parent);
|
|||
$params['selectbox_id'] = 'cascade_protection_module';
|
||||
$params['javascript_is_function_select'] = true;
|
||||
$params['cascade_protection'] = true;
|
||||
|
||||
$table->data[1][1] = ui_print_agent_autocomplete_input($params);
|
||||
$table_adv_parent .= '<div class="label_simple_items">';
|
||||
$table_adv_parent .= ui_print_agent_autocomplete_input($params);
|
||||
if (enterprise_installed()) {
|
||||
$table->data[1][1] .= html_print_checkbox('cascade_protection', 1, $cascade_protection, true).__('Cascade protection');
|
||||
$table_adv_parent .= html_print_checkbox_switch('cascade_protection', 1, $cascade_protection, true).__('Cascade protection').' '.ui_print_help_icon('cascade_protection', true);
|
||||
}
|
||||
|
||||
$table->data[1][1] .= ' '.__('Module').' '.html_print_select($modules_values, 'cascade_protection_module', $cascade_protection_module, '', '', 0, true);
|
||||
$table_adv_parent .= __('Module').' '.html_print_select($modules_values, 'cascade_protection_module', $cascade_protection_module, '', '', 0, true).'</div></div>';
|
||||
|
||||
// Learn mode / Normal mode
|
||||
$table->data[3][0] = __('Module definition');
|
||||
$table->data[3][1] = __('Learning mode').' '.html_print_radio_button_extended(
|
||||
$table_adv_module_mode = '<div class="label_select"><p class="input_label">'.__('Module definition').': '.ui_print_help_icon('module_definition', true).'</p>';
|
||||
$table_adv_module_mode .= '<div class="switch_radio_button">';
|
||||
$table_adv_module_mode .= html_print_radio_button_extended(
|
||||
'modo',
|
||||
1,
|
||||
'',
|
||||
__('Learning mode'),
|
||||
$modo,
|
||||
false,
|
||||
'show_modules_not_learning_mode_context_help();',
|
||||
'style="margin-right: 40px;"',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$table->data[3][1] .= __('Normal mode').' '.html_print_radio_button_extended(
|
||||
$table_adv_module_mode .= html_print_radio_button_extended(
|
||||
'modo',
|
||||
0,
|
||||
'',
|
||||
__('Normal mode'),
|
||||
$modo,
|
||||
false,
|
||||
'show_modules_not_learning_mode_context_help();',
|
||||
'style="margin-right: 40px;"',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$table->data[3][1] .= __('Autodisable mode').' '.html_print_radio_button_extended(
|
||||
$table_adv_module_mode .= html_print_radio_button_extended(
|
||||
'modo',
|
||||
2,
|
||||
'',
|
||||
__('Autodisable mode'),
|
||||
$modo,
|
||||
false,
|
||||
'show_modules_not_learning_mode_context_help();',
|
||||
'style="margin-right: 40px;"',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$table_adv_module_mode .= '</div></div>';
|
||||
|
||||
// Status (Disabled / Enabled)
|
||||
$table->data[4][0] = __('Status');
|
||||
$table->data[4][1] = __('Disabled').' '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).' '.html_print_radio_button_extended('disabled', 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true);
|
||||
$table->data[4][1] .= __('Enabled').' '.html_print_radio_button_extended('disabled', 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true);
|
||||
$table_adv_status = '<div class="label_select_simple label_simple_one_item"><p class="input_label input_label_simple">'.__('Disabled').': '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).'</p>';
|
||||
$table_adv_status .= html_print_checkbox_switch('disabled', 1, $disabled, true).'</div>';
|
||||
|
||||
// Url address.
|
||||
if (enterprise_installed()) {
|
||||
$table->data[4][2] = __('Url address').ui_print_help_tip(__('URL address must be complete, for example: https://pandorafms.com/'), true);
|
||||
$table->data[4][3] = html_print_input_text(
|
||||
$table_adv_url = '<div class="label_select"><p class="input_label">'.__('Url address').': '.ui_print_help_tip(__('URL address must be complete, for example: https://pandorafms.com/'), true).'</p>';
|
||||
$table_adv_url .= html_print_input_text(
|
||||
'url_description',
|
||||
$url_description,
|
||||
'',
|
||||
45,
|
||||
255,
|
||||
true
|
||||
);
|
||||
).'</div>';
|
||||
} else {
|
||||
$table->data[5][0] = __('Url address');
|
||||
$table->data[5][1] = html_print_input_text(
|
||||
$table_adv_url = '<div class="label_select"><p class="input_label">'.__('Url address').': </p></div>';
|
||||
$table_adv_url .= html_print_input_text(
|
||||
'url_description',
|
||||
$url_description,
|
||||
'',
|
||||
45,
|
||||
255,
|
||||
true
|
||||
);
|
||||
).'</div>';
|
||||
}
|
||||
|
||||
$table->data[5][2] = __('Quiet');
|
||||
$table->data[5][3] .= ui_print_help_tip(__('The agent still runs but the alerts and events will be stop'), true);
|
||||
$table->data[5][3] = html_print_checkbox('quiet', 1, $quiet, true);
|
||||
$table_adv_quiet = '<div class="label_select_simple label_simple_one_item"><p class="input_label input_label_simple">'.__('Quiet').': ';
|
||||
$table_adv_quiet .= ui_print_help_tip(__('The agent still runs but the alerts and events will be stop'), true).'</p>';
|
||||
$table_adv_quiet .= html_print_checkbox_switch('quiet', 1, $quiet, true).'</div>';
|
||||
|
||||
$listIcons = gis_get_array_list_icons();
|
||||
|
||||
|
@ -611,7 +626,7 @@ foreach ($listIcons as $index => $value) {
|
|||
|
||||
$path = 'images/gis_map/icons/';
|
||||
// TODO set better method the path
|
||||
$table->data[0][2] = __('Agent icon').ui_print_help_tip(__('Agent icon for GIS Maps.'), true);
|
||||
$table_adv_agent_icon = '<div class="label_select"><p class="input_label">'.__('Agent icon').': '.ui_print_help_tip(__('Agent icon for GIS Maps.'), true).'</p>';
|
||||
if ($icon_path == '') {
|
||||
$display_icons = 'none';
|
||||
// Hack to show no icon. Use any given image to fix not found image errors
|
||||
|
@ -629,7 +644,7 @@ if ($icon_path == '') {
|
|||
$path_warning = $path.$icon_path.'.warning.png';
|
||||
}
|
||||
|
||||
$table->data[0][3] = html_print_select(
|
||||
$table_adv_agent_icon .= html_print_select(
|
||||
$arraySelectIcon,
|
||||
'icon_path',
|
||||
$icon_path,
|
||||
|
@ -637,63 +652,68 @@ $table->data[0][3] = html_print_select(
|
|||
__('None'),
|
||||
'',
|
||||
true
|
||||
).' '.html_print_image(
|
||||
).html_print_image(
|
||||
$path_ok,
|
||||
true,
|
||||
[
|
||||
'id' => 'icon_ok',
|
||||
'style' => 'display:'.$display_icons.';',
|
||||
]
|
||||
).' '.html_print_image(
|
||||
).html_print_image(
|
||||
$path_bad,
|
||||
true,
|
||||
[
|
||||
'id' => 'icon_bad',
|
||||
'style' => 'display:'.$display_icons.';',
|
||||
]
|
||||
).' '.html_print_image(
|
||||
).html_print_image(
|
||||
$path_warning,
|
||||
true,
|
||||
[
|
||||
'id' => 'icon_warning',
|
||||
'style' => 'display:'.$display_icons.';',
|
||||
]
|
||||
);
|
||||
).'</div>';
|
||||
|
||||
if ($config['activate_gis']) {
|
||||
$table->data[3][2] = __('Ignore new GIS data:');
|
||||
$table->data[3][3] = __('Yes').' '.html_print_radio_button_extended(
|
||||
'update_gis_data',
|
||||
0,
|
||||
'',
|
||||
$update_gis_data,
|
||||
false,
|
||||
'',
|
||||
'style="margin-right: 40px;"',
|
||||
true
|
||||
);
|
||||
$table->data[3][3] .= __('No').' '.html_print_radio_button_extended(
|
||||
'update_gis_data',
|
||||
1,
|
||||
'',
|
||||
$update_gis_data,
|
||||
false,
|
||||
'',
|
||||
'style="margin-right: 40px;"',
|
||||
true
|
||||
);
|
||||
$table_adv_gis = '<div class="label_select_simple label_simple_one_item"><p class="input_label input_label_simple">'.__('Ignore new GIS data:').'</p>';
|
||||
if ($new_agent) {
|
||||
$update_gis_data = true;
|
||||
}
|
||||
|
||||
$table_adv_gis .= html_print_checkbox_switch('update_gis_data', 1, $update_gis_data, true).'No / Yes</div>';
|
||||
}
|
||||
|
||||
ui_toggle(html_print_table($table, true), __('Advanced options'));
|
||||
unset($table);
|
||||
|
||||
|
||||
$table_adv_options = $table_adv_secondary_groups.'<div class="secondary_groups_select" style="margin-bottom:30px;">
|
||||
<div class="secondary_groups_list_left">
|
||||
'.$table_adv_secondary_groups_left.'
|
||||
</div>
|
||||
<div class="secondary_groups_select_arrows">
|
||||
'.$table_adv_secondary_groups_arrows.'
|
||||
</div>
|
||||
<div class="secondary_groups_list_right">
|
||||
'.$table_adv_secondary_groups_right.'
|
||||
</div>
|
||||
</div>
|
||||
<div class="agent_options agent_options_adv">
|
||||
<div class="agent_options_column_left" >'.$table_adv_parent.$table_adv_custom_id.$table_adv_module_mode.$table_adv_cascade.$table_adv_gis.'</div>
|
||||
<div class="agent_options_column_right" >'.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.'</div>
|
||||
</div>';
|
||||
|
||||
echo '<div class="ui_toggle">';
|
||||
ui_toggle($table_adv_options, __('Advanced options'), '', true, false, 'white_box white_box_opened');
|
||||
echo '</div>';
|
||||
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
$table->class = 'custom_fields_table';
|
||||
|
||||
$table->head = [];
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold; width: 100px;';
|
||||
$table->style[0] = 'font-weight: bold;';
|
||||
$table->data = [];
|
||||
|
||||
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||
|
@ -703,11 +723,15 @@ if ($fields === false) {
|
|||
}
|
||||
|
||||
foreach ($fields as $field) {
|
||||
$data[0] = '<b>'.$field['name'].'</b>';
|
||||
$id_custom_field = $field['id_field'];
|
||||
|
||||
$data[0] = '<div class="field_title" onclick="show_custom_field_row('.$id_custom_field.')">';
|
||||
$data[0] .= '<b>'.$field['name'].'</b>';
|
||||
$data[0] .= ui_print_help_tip(
|
||||
__('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url]'),
|
||||
true
|
||||
);
|
||||
$data[0] .= '</div>';
|
||||
$combo = [];
|
||||
$combo = $field['combo_values'];
|
||||
$combo = explode(',', $combo);
|
||||
|
@ -730,7 +754,7 @@ foreach ($fields as $field) {
|
|||
}
|
||||
|
||||
if ($field['is_password_type']) {
|
||||
$data[1] = html_print_input_text_extended(
|
||||
$data_field[1] = html_print_input_text_extended(
|
||||
'customvalue_'.$field['id_field'],
|
||||
$custom_value,
|
||||
'customvalue_'.$field['id_field'],
|
||||
|
@ -744,18 +768,18 @@ foreach ($fields as $field) {
|
|||
true
|
||||
);
|
||||
} else {
|
||||
$data[1] = html_print_textarea(
|
||||
$data_field[1] = html_print_textarea(
|
||||
'customvalue_'.$field['id_field'],
|
||||
2,
|
||||
65,
|
||||
$custom_value,
|
||||
'style="min-height: 30px; width:96%;"',
|
||||
'style="min-height: 30px;"',
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
if ($field['combo_values'] !== '') {
|
||||
$data[1] = html_print_select(
|
||||
$data_field[1] = html_print_select(
|
||||
$combo_values,
|
||||
'customvalue_'.$field['id_field'],
|
||||
$custom_value,
|
||||
|
@ -776,19 +800,25 @@ foreach ($fields as $field) {
|
|||
);
|
||||
};
|
||||
|
||||
$table->rowid[] = 'name_field-'.$id_custom_field;
|
||||
array_push($table->data, $data);
|
||||
|
||||
$table->rowid[] = 'field-'.$id_custom_field;
|
||||
array_push($table->data, $data_field);
|
||||
}
|
||||
|
||||
if (!empty($fields)) {
|
||||
ui_toggle(html_print_table($table, true), __('Custom fields'));
|
||||
echo '<div class="ui_toggle">';
|
||||
ui_toggle(html_print_table($table, true), __('Custom fields'), '', true, false, 'white_box white_box_opened');
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
echo '<div class="action-buttons" style="display: flex; justify-content: flex-end; align-items: center; width: '.$table->width.'">';
|
||||
|
||||
|
||||
// The context help about the learning mode.
|
||||
if ($modo == 0) {
|
||||
echo "<span id='modules_not_learning_mode_context_help' style=''>";
|
||||
echo "<span id='modules_not_learning_mode_context_help' style='padding-right:8px;'>";
|
||||
} else {
|
||||
echo "<span id='modules_not_learning_mode_context_help' style='display: none;'>";
|
||||
}
|
||||
|
@ -798,7 +828,7 @@ echo '</span>';
|
|||
|
||||
|
||||
if ($id_agente) {
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
echo '<div class="action-buttons">';
|
||||
html_print_submit_button(
|
||||
__('Update'),
|
||||
'updbutton',
|
||||
|
@ -825,6 +855,19 @@ ui_require_jquery_file('bgiframe');
|
|||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
// Show/Hide custom field row.
|
||||
function show_custom_field_row(id){
|
||||
if( $('#field-'+id).css('display') == 'none'){
|
||||
$('#field-'+id).css('display','table-row');
|
||||
$('#name_field-'+id).addClass('custom_field_row_opened');
|
||||
}
|
||||
else{
|
||||
$('#field-'+id).css('display','none');
|
||||
$('#name_field-'+id).removeClass('custom_field_row_opened');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Use this function for change 3 icons when change the selectbox
|
||||
function changeIcons() {
|
||||
var icon = $("#icon_path :selected").val();
|
||||
|
@ -863,7 +906,7 @@ ui_require_jquery_file('bgiframe');
|
|||
|
||||
function show_modules_not_learning_mode_context_help() {
|
||||
if ($("input[name='modo'][value=0]").is(':checked')) {
|
||||
$("#modules_not_learning_mode_context_help").show();
|
||||
$("#modules_not_learning_mode_context_help").show().css('padding-right','8px');
|
||||
}
|
||||
else {
|
||||
$("#modules_not_learning_mode_context_help").hide();
|
||||
|
|
|
@ -1084,7 +1084,7 @@ if ($id_agente) {
|
|||
exit;
|
||||
}
|
||||
|
||||
$agent = db_get_row('tagente', 'id_agente', $id_agente);
|
||||
$agent = db_get_row('tagente', 'id_agente', $id_agente, false, false);
|
||||
if (empty($agent)) {
|
||||
// Close out the page.
|
||||
ui_print_error_message(__('There was a problem loading the agent'));
|
||||
|
|
|
@ -1200,6 +1200,7 @@ html_print_input_hidden('module_relations_count', $relations_count);
|
|||
|
||||
ui_require_jquery_file('json');
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -1510,7 +1511,7 @@ function disabled_two_tailed (disabledBecauseInPolicy) {
|
|||
function advanced_option_dynamic() {
|
||||
if($('.hide_dinamic').is(":visible")){
|
||||
$('.hide_dinamic').hide();
|
||||
|
||||
|
||||
} else {
|
||||
$('.hide_dinamic').show();
|
||||
|
||||
|
|
|
@ -261,7 +261,9 @@ $url = ui_get_url_refresh(
|
|||
'offset' => false,
|
||||
'search_string' => $search_string,
|
||||
'search_type' => $search_type,
|
||||
]
|
||||
],
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
||||
$table = new stdClass();
|
||||
|
|
|
@ -33,6 +33,7 @@ if (! check_acl($config['id_user'], 0, 'LM')) {
|
|||
$update_command = (bool) get_parameter('update_command');
|
||||
$id = (int) get_parameter('id');
|
||||
$pure = get_parameter('pure', 0);
|
||||
$alert = [];
|
||||
|
||||
// Header
|
||||
if (defined('METACONSOLE')) {
|
||||
|
@ -86,7 +87,15 @@ if ($update_command) {
|
|||
$result = '';
|
||||
} else {
|
||||
$result = alerts_update_alert_command($id, $values);
|
||||
$info = '{"Name":"'.$name.'","Command":"'.$command.'","Description":"'.$description.' '.$info_fields.'"}';
|
||||
if ($result) {
|
||||
$info = '{"Name":"'.$name.'","Command":"'.$command.'","Description":"'.$description.' '.$info_fields.'"}';
|
||||
$alert['fields_values'] = io_json_mb_encode($fields_values);
|
||||
$alert['fields_descriptions'] = io_json_mb_encode($fields_descriptions);
|
||||
$alert['name'] = $name;
|
||||
$alert['command'] = $command;
|
||||
$alert['description'] = $description;
|
||||
$alert['id_group'] = $id_group;
|
||||
}
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
|
@ -110,7 +119,10 @@ $fields_descriptions = '';
|
|||
$fields_values = '';
|
||||
$id_group = 0;
|
||||
if ($id) {
|
||||
$alert = alerts_get_alert_command($id);
|
||||
if (!$result) {
|
||||
$alert = alerts_get_alert_command($id);
|
||||
}
|
||||
|
||||
$name = $alert['name'];
|
||||
$command = $alert['command'];
|
||||
$description = $alert['description'];
|
||||
|
|
|
@ -674,12 +674,17 @@ function update_button_palette_callback() {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
var radio_value = $("input[name='radio_choice']:checked").val();
|
||||
if (values["agent"] == "" && radio_value == "module_graph") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
return false;
|
||||
}
|
||||
if (values["module"] == 0 && radio_value == "module_graph") {
|
||||
dialog_message("#message_alert_no_module");
|
||||
return false;
|
||||
}
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
if (values["id_custom_graph"] == 0 && radio_value == "custom_graph") {
|
||||
dialog_message("#message_alert_no_custom_graph");
|
||||
return false;
|
||||
}
|
||||
if ($("input[name=width_module_graph]").val() == "") {
|
||||
|
@ -1425,11 +1430,12 @@ function create_button_palette_callback() {
|
|||
|
||||
break;
|
||||
case "module_graph":
|
||||
if (values["module"] == 0) {
|
||||
var radio_value = $("input[name='radio_choice']:checked").val();
|
||||
if (values["module"] == 0 && radio_value == "module_graph") {
|
||||
dialog_message("#message_alert_no_module");
|
||||
validate = false;
|
||||
}
|
||||
if (values["id_custom_graph"] == 0) {
|
||||
if (values["id_custom_graph"] == 0 && radio_value == "module_graph") {
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
validate = false;
|
||||
|
@ -1439,6 +1445,10 @@ function create_button_palette_callback() {
|
|||
validate = false;
|
||||
}
|
||||
}
|
||||
if (values["id_custom_graph"] == 0 && radio_value == "custom_graph") {
|
||||
dialog_message("#message_alert_no_custom_graph");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
values["height_module_graph"] == "" ||
|
||||
values["height_module_graph"] == 0
|
||||
|
|
|
@ -242,7 +242,6 @@ if ($filemanager) {
|
|||
$chunck_url = '&create=1';
|
||||
}
|
||||
|
||||
$homedir_filemanager = isset($config['homedir_filemanager']) ? $config['homedir_filemanager'] : false;
|
||||
filemanager_file_explorer(
|
||||
$real_directory,
|
||||
$directory,
|
||||
|
@ -253,7 +252,7 @@ if ($filemanager) {
|
|||
'index.php?sec=gservers&sec2=godmode/servers/plugin'.$chunck_url.'&plugin_command=[FILE_FULLPATH]&id_plugin='.$id_plugin,
|
||||
true,
|
||||
0775,
|
||||
$homedir_filemanager
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -66,8 +66,6 @@ $real_directory = realpath($config['homedir'].'/'.$directory);
|
|||
|
||||
echo '<h4>'.__('Index of %s', $directory).'</h4>';
|
||||
|
||||
$homedir_filemanager = isset($config['homedir_filemanager']) ? $config['homedir_filemanager'] : false;
|
||||
|
||||
filemanager_file_explorer(
|
||||
$real_directory,
|
||||
$directory,
|
||||
|
@ -78,5 +76,5 @@ filemanager_file_explorer(
|
|||
'',
|
||||
false,
|
||||
'',
|
||||
$homedir_filemanager
|
||||
false
|
||||
);
|
||||
|
|
|
@ -331,7 +331,7 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
|
|||
theme : "advanced",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "left",
|
||||
theme_advanced_buttons1 : "bold,italic, |, image, link, |, cut, copy, paste, |, undo, redo, |, forecolor, |, fontsizeselect, |, justifyleft, justifycenter, justifyright",
|
||||
theme_advanced_buttons1 : "bold,italic, |, image, link, |, cut, copy, paste, |, undo, redo, |, forecolor, |, fontsizeselect, |, justifyleft, justifycenter, justifyright, | ,code",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
convert_urls : false,
|
||||
|
|
|
@ -52,8 +52,9 @@ $table_enable->style['name'] = 'font-weight: bold';
|
|||
|
||||
// Enable eHorus.
|
||||
$row = [];
|
||||
$row['name'] = __('Enable eHorus');
|
||||
$row['name'] = ('Enable eHorus');
|
||||
$row['control'] = html_print_checkbox_switch('ehorus_enabled', 1, $config['ehorus_enabled'], true);
|
||||
$row['button'] = html_print_submit_button(('Update'), 'update_button', false, 'class="sub upd"', true);
|
||||
$table_enable->data['ehorus_enabled'] = $row;
|
||||
|
||||
// Remote config table.
|
||||
|
@ -139,15 +140,15 @@ if ($config['ehorus_enabled'] && !$custom_field_exists) {
|
|||
ui_print_error_message($error_message);
|
||||
}
|
||||
|
||||
echo "<form method='post'>";
|
||||
// Form enable.
|
||||
echo '<form id="form_enable" method="post">';
|
||||
echo '<div id="form_enable">';
|
||||
html_print_input_hidden('update_config', 1);
|
||||
html_print_table($table_enable);
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
|
||||
// Form remote.
|
||||
if ($config['ehorus_enabled']) {
|
||||
echo '<form id="form_remote" method="post">';
|
||||
echo '<div id="form_remote">';
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('eHorus API').'</legend>';
|
||||
html_print_input_hidden('update_config', 1);
|
||||
|
@ -156,30 +157,31 @@ if ($config['ehorus_enabled']) {
|
|||
html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"');
|
||||
echo '</div>';
|
||||
echo '</fieldset>';
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('input:checkbox[name="ehorus_enabled"]').attr('checked', false);
|
||||
$('form#form_remote').hide();
|
||||
$('form#form_enable').css('margin-bottom','20px');
|
||||
if(!$('input:checkbox[name="ehorus_enabled"]').is(':checked')){
|
||||
$('#form_remote').hide();
|
||||
}
|
||||
$('#form_enable').css('margin-bottom','20px');
|
||||
var showFields = function () {
|
||||
$('form#form_remote').show();
|
||||
$('#form_remote').show();
|
||||
}
|
||||
var hideFields = function () {
|
||||
$('form#form_remote').hide();
|
||||
$('#form_remote').hide();
|
||||
}
|
||||
var handleEnable = function (event) {
|
||||
var is_checked = $('input:checkbox[name="ehorus_enabled"]').is(':checked');
|
||||
if (event.target.value == '1' && is_checked) {
|
||||
showFields();
|
||||
$('input:checkbox[name="ehorus_enabled"]').attr('checked', false);
|
||||
$('input:checkbox[name="ehorus_enabled"]').attr('checked', true);
|
||||
}
|
||||
else {
|
||||
hideFields();
|
||||
$('input:checkbox[name="ehorus_enabled"]').attr('checked', true);
|
||||
$('input:checkbox[name="ehorus_enabled"]').attr('checked', false);
|
||||
};
|
||||
}
|
||||
$('input:checkbox[name="ehorus_enabled"]').change(handleEnable);
|
||||
|
|
|
@ -140,6 +140,162 @@
|
|||
}
|
||||
|
||||
#box_online {
|
||||
background-color: #e6e6e6;
|
||||
padding: 10px;
|
||||
background-image: url("../../images/update_manager_background.jpg");
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-color: #fff;
|
||||
padding: 40px 50px;
|
||||
border: 1px solid #f3f3f3;
|
||||
border-radius: 5px;
|
||||
min-height: 600px;
|
||||
}
|
||||
|
||||
div#box_online * {
|
||||
font-size: 16pt;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
}
|
||||
|
||||
#box_online .content {
|
||||
max-width: 60%;
|
||||
}
|
||||
|
||||
.update_popup {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.update_icon {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.update_text h3 {
|
||||
font-weight: bold;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.update_text p {
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
.update_text a {
|
||||
font-size: 11pt;
|
||||
color: #82b92e !important;
|
||||
}
|
||||
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
|
||||
float: left !important;
|
||||
padding-left: 19px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.ui-dialog-buttonset > button.ui-button.ui-corner-all.ui-widget {
|
||||
background-color: #cecece !important;
|
||||
border: none !important;
|
||||
border-radius: 2px !important;
|
||||
text-transform: uppercase !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.ui-dialog-buttonset > button.success_button.ui-button.ui-corner-all.ui-widget,
|
||||
.update_manager_button {
|
||||
background-color: #82b92e !important;
|
||||
color: #fff !important;
|
||||
border-radius: 2px !important;
|
||||
text-transform: uppercase !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
a.update_manager_button {
|
||||
padding: 10px 12px;
|
||||
margin-top: 10px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
font-size: 16px !important;
|
||||
border-radius: 4px !important;
|
||||
text-decoration: none;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
}
|
||||
|
||||
a.update_manager_button:after {
|
||||
content: url(../../images/update_manager_button.png);
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.progressbar {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.ui-draggable,
|
||||
.ui-draggable .ui-dialog-titlebar {
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
#box_online #pkg_version {
|
||||
color: #82b92e;
|
||||
font-size: 75pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* METACONSOLE */
|
||||
.box_online_meta {
|
||||
background: none !important;
|
||||
min-height: 400px !important;
|
||||
text-align: center;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
div#box_online.box_online_meta * {
|
||||
font-size: 14pt;
|
||||
}
|
||||
|
||||
#box_online.box_online_meta .content {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#box_online.box_online_meta #pkg_version {
|
||||
font-size: 60pt;
|
||||
}
|
||||
|
||||
/* COMMUNITY */
|
||||
.update_manager_open {
|
||||
max-width: 50%;
|
||||
font-size: 10pt;
|
||||
margin-top: 40px;
|
||||
padding: 20px;
|
||||
border: 1px solid #eaeaea;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.update_manager_warning {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.update_manager_warning p {
|
||||
font-size: 10pt !important;
|
||||
}
|
||||
|
||||
.update_manager_warning img {
|
||||
padding-right: 20px;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
a.update_manager_button_open {
|
||||
padding: 5px 10px;
|
||||
font-size: 16px !important;
|
||||
border-radius: 4px !important;
|
||||
text-decoration: none;
|
||||
border: 1px solid #82b92e;
|
||||
color: #82b92e;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
a.update_manager_button_open:hover {
|
||||
color: #fff;
|
||||
background-color: #82b92e;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,22 @@
|
|||
<?php
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
/**
|
||||
Pandora FMS - http://pandorafms.com
|
||||
* ==================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; version 2
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* @package category
|
||||
* @subpackage category
|
||||
*/
|
||||
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
|
@ -61,7 +67,7 @@ if ($memory_limit < 100) {
|
|||
);
|
||||
}
|
||||
|
||||
// Translators: Do not translade Update Manager, it's the name of the program
|
||||
// Translators: Do not translade Update Manager, it's the name of the program.
|
||||
if (is_metaconsole()) {
|
||||
echo "<style type='text/css' media='screen'>
|
||||
@import 'styles/meta_pandora.css';
|
||||
|
@ -69,23 +75,29 @@ if (is_metaconsole()) {
|
|||
}
|
||||
|
||||
if (is_metaconsole()) {
|
||||
echo "<div id='box_online' style='float:right;padding-right:400px;padding-top:40px;padding-bottom:40px;' class='cargatextodialogo'>";
|
||||
$baseurl = ui_get_full_url(false, false, false, false);
|
||||
echo ' <link rel="stylesheet" type="text/css" href="'.$baseurl.'/godmode/update_manager/update_manager.css">';
|
||||
echo "<div id='box_online' class='box_online_meta'>";
|
||||
} else {
|
||||
echo "<div id='box_online' style='padding-top:40px;padding-bottom:40px;' class='cargatextodialogo'>";
|
||||
echo "<div id='box_online'>";
|
||||
}
|
||||
|
||||
echo "<span class='loading' style='font-size:18pt;'>";
|
||||
echo "<img src='images/wait.gif' />";
|
||||
echo '</span><br><br>';
|
||||
echo '</span>';
|
||||
|
||||
echo '<div><b>'.__('The latest version of package installed is:').'</b></div><br>';
|
||||
echo "<div id='pkg_version' style='color:#82b92e;font-size:40pt;font-weight:bold;'>".$current_package.'</div>';
|
||||
echo '<p style="font-weight: 600;">'.__('The latest version of package installed is:').'</p>';
|
||||
if ($open) {
|
||||
echo '<div id="pkg_version" style="font-size:40pt;">'.$build_version.'</div>';
|
||||
} else {
|
||||
echo '<div id="pkg_version">'.$current_package.'</div>';
|
||||
}
|
||||
|
||||
echo "<div class='checking_package' style='font-size:18pt;width:100%; text-align: center; display: none;'>";
|
||||
echo "<div class='checking_package' style='font-size:18pt;width:100%; display: none;'>";
|
||||
echo __('Checking for the newest package.');
|
||||
echo '</div>';
|
||||
|
||||
echo "<div class='downloading_package' style='font-size:18pt;width:100%; text-align: center; display: none;'>";
|
||||
echo "<div class='downloading_package' style='font-size:18pt;width:100%; display: none;'>";
|
||||
echo __('Downloading for the newest package.');
|
||||
echo '</div>';
|
||||
|
||||
|
@ -119,22 +131,26 @@ echo "<div id='pkg_version' style='color:#82b92e;font-size:40pt;font-weight:bold
|
|||
let you know this does not reflect any change in our opensource mentality of
|
||||
does the last 14 years.
|
||||
|
||||
------------------------------------------------------------------------- */
|
||||
-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ($open) {
|
||||
echo "
|
||||
<br><br>
|
||||
<div id='updatemodal' class='publienterprisehide' title='Community version' style=''>
|
||||
<img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/icono_exclamacion_2.png'>
|
||||
</div>
|
||||
<br>";
|
||||
echo "<div class='update_manager_open'>
|
||||
<div class='update_manager_warning'>
|
||||
<div><img src='images/icono_info.png'></div>
|
||||
<div><p>".__('WARNING: You are just one click away from an automated update. This may result in a damaged system, including loss of data and operativity. Check you have a recent backup. OpenSource updates are automatically created packages, and there is no WARRANTY or SUPPORT. If you need professional support and warranty, please upgrade to Enterprise Version.')."</p></div>
|
||||
</div>
|
||||
<div style='text-align:center; margin-top:10px;'>
|
||||
<a class='update_manager_button_open' href='https://pandorafms.com/pandora-fms-enterprise/' target='_blank'>About Enterprise</a>
|
||||
</div>
|
||||
</div>";
|
||||
}
|
||||
|
||||
|
||||
$enterprise = enterprise_hook('update_manager_enterprise_main');
|
||||
|
||||
if ($enterprise == ENTERPRISE_NOT_HOOK) {
|
||||
// Open view
|
||||
// Open view.
|
||||
update_manager_main();
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -594,11 +594,11 @@ class HostDevices extends Wizard
|
|||
if (isset($this->page) === false
|
||||
|| $this->page == 0
|
||||
) {
|
||||
|
||||
// Comment input
|
||||
$comment_input ='<div class="label_select"><label>'.__('Comment').':</label></div>';
|
||||
$comment_input = '<div class="label_select"><label>'.__('Comment').':</label></div>';
|
||||
|
||||
$comment_input .= $this->printInput([
|
||||
$comment_input .= $this->printInput(
|
||||
[
|
||||
'name' => 'comment',
|
||||
'rows' => 1,
|
||||
'columns' => 1,
|
||||
|
@ -606,49 +606,55 @@ class HostDevices extends Wizard
|
|||
'type' => 'textarea',
|
||||
'size' => 25,
|
||||
'class' => 'discovery_textarea_input',
|
||||
'return' => true
|
||||
]);
|
||||
'return' => true,
|
||||
]
|
||||
);
|
||||
|
||||
// Task input
|
||||
$taskname_input_label = '<div class="label_select"><label>'.__('Task name').':</label></div>';
|
||||
|
||||
$taskname_input = $this->printInput([
|
||||
$taskname_input = $this->printInput(
|
||||
[
|
||||
'name' => 'taskname',
|
||||
'value' => $this->task['name'],
|
||||
'type' => 'text',
|
||||
'size' => 25,
|
||||
'class' => 'discovery_full_width_input'
|
||||
]);
|
||||
'class' => 'discovery_full_width_input',
|
||||
]
|
||||
);
|
||||
|
||||
// Network input
|
||||
$network_input_label .= '<div class="label_select discovery_label_hint"><label>'.__('Network').':</label>'.ui_print_help_tip(__('You can specify several networks, separated by commas, for example: 192.168.50.0/24,192.168.60.0/24'), true).'</div>';
|
||||
|
||||
$network_input = $this->printInput([
|
||||
$network_input = $this->printInput(
|
||||
[
|
||||
'name' => 'network',
|
||||
'value' => $this->task['subnet'],
|
||||
'type' => 'text',
|
||||
'size' => 25,
|
||||
'class' => 'discovery_full_width_input',
|
||||
]);
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
// Discovery server input
|
||||
$discovery_server_select_label = '<div class="label_select discovery_label_hint"><label>'.__('Discovery server').':</label>'.ui_print_help_tip(__('You must select a Discovery Server to run the Task, otherwise the Recon Task will never run'), true).'</div>';
|
||||
|
||||
$discovery_server_select = $this->printInput([
|
||||
'type' => 'select_from_sql',
|
||||
'sql' => sprintf(
|
||||
'SELECT id_server, name
|
||||
$discovery_server_select = $this->printInput(
|
||||
[
|
||||
'type' => 'select_from_sql',
|
||||
'sql' => sprintf(
|
||||
'SELECT id_server, name
|
||||
FROM tserver
|
||||
WHERE server_type = %d
|
||||
ORDER BY name',
|
||||
SERVER_TYPE_DISCOVERY
|
||||
),
|
||||
'name' => 'id_recon_server',
|
||||
'selected' => $this->task['id_recon_server'],
|
||||
'return' => true,
|
||||
'style' => 'width: 100%',
|
||||
]);
|
||||
SERVER_TYPE_DISCOVERY
|
||||
),
|
||||
'name' => 'id_recon_server',
|
||||
'selected' => $this->task['id_recon_server'],
|
||||
'return' => true,
|
||||
'style' => 'width: 100%',
|
||||
]
|
||||
);
|
||||
|
||||
// Interval input
|
||||
$interv_manual = 0;
|
||||
|
@ -658,38 +664,40 @@ class HostDevices extends Wizard
|
|||
|
||||
$interval_input_label = '<div class="label_select discovery_label_hint" style="padding-top: 6px;"><label>'.__('Interval').':</label>'.ui_print_help_tip(__('Manual interval means that it will run only on demand.'), true).'</div>';
|
||||
|
||||
$interval_input = $this->printInput([
|
||||
'type' => 'select',
|
||||
'selected' => $interv_manual,
|
||||
'fields' => [
|
||||
0 => __('Defined'),
|
||||
1 => __('Manual'),
|
||||
],
|
||||
'name' => 'interval_manual_defined',
|
||||
'return' => true,
|
||||
'style' => 'float: right;'
|
||||
]);
|
||||
$interval_input = $this->printInput(
|
||||
[
|
||||
'type' => 'select',
|
||||
'selected' => $interv_manual,
|
||||
'fields' => [
|
||||
0 => __('Defined'),
|
||||
1 => __('Manual'),
|
||||
],
|
||||
'name' => 'interval_manual_defined',
|
||||
'return' => true,
|
||||
'style' => 'float: right;',
|
||||
]
|
||||
);
|
||||
|
||||
$interval_input_extra = '<span id="interval_manual_container">'.html_print_extended_select_for_time(
|
||||
'interval',
|
||||
$this->task['interval_sweep'],
|
||||
'',
|
||||
'',
|
||||
'0',
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
).ui_print_help_tip(
|
||||
__('The minimum recomended interval for Recon Task is 5 minutes'),
|
||||
true
|
||||
).'</span>';
|
||||
|
||||
'interval',
|
||||
$this->task['interval_sweep'],
|
||||
'',
|
||||
'',
|
||||
'0',
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
).ui_print_help_tip(
|
||||
__('The minimum recomended interval for Recon Task is 5 minutes'),
|
||||
true
|
||||
).'</span>';
|
||||
|
||||
// Group select
|
||||
$group_select = '<div class="label_select"><label>'.__('Group').':</label></div>';
|
||||
|
||||
$group_select .= $this->printInput([
|
||||
$group_select .= $this->printInput(
|
||||
[
|
||||
'name' => 'id_group',
|
||||
'returnAllGroup' => false,
|
||||
'privilege' => 'PM',
|
||||
|
@ -699,15 +707,18 @@ class HostDevices extends Wizard
|
|||
'class' => 'discovery_list_input',
|
||||
'size' => 9,
|
||||
'simple_multiple_options' => true,
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
if (isset($this->task['id_rt']) === true) {
|
||||
//Propagate ID
|
||||
$task_hidden = $this->printInput([
|
||||
'name' => 'task',
|
||||
'value' => $this->task['id_rt'],
|
||||
'type' => 'hidden'
|
||||
]);
|
||||
if (isset($this->task['id_rt']) === true) {
|
||||
// Propagate ID
|
||||
$task_hidden = $this->printInput(
|
||||
[
|
||||
'name' => 'task',
|
||||
'value' => $this->task['id_rt'],
|
||||
'type' => 'hidden',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$task_url = '';
|
||||
|
@ -725,32 +736,20 @@ class HostDevices extends Wizard
|
|||
|
||||
// XXX: Could be improved validating inputs before continue (JS)
|
||||
// Print NetScan page 0.
|
||||
//$this->printForm($form);
|
||||
|
||||
// $this->printForm($form);
|
||||
echo '<form action="'.$this->url.'&mode=netscan&page='.($this->page + 1).$task_url.'" method="POST">';
|
||||
echo $task_hidden;
|
||||
|
||||
echo '<div class="white_box">
|
||||
<div class="edit_discovery_info" style="margin-bottom: 15px;">
|
||||
<div style="width: 25%; padding: 9px;">'
|
||||
.'<div style="height: 50%; margin-bottom: 35px;">'.html_print_image ("images/wizard/netscan_green.png", true, array ("title" => __('Close'), "style" => 'width: 60%;'), false).'</div>'
|
||||
.'<div class="edit_discovery_input"><div style="display: flex;">'.$interval_input_label.'<div style="margin-left: 15 px; width: 50%;">'.$interval_input.'</div></div>'.$interval_input_extra.'</div>'
|
||||
.'</div>
|
||||
<div style="width: 25%; padding: 9px;">'.'<div style="height: 50%; margin-bottom: 35px;">'.html_print_image('images/wizard/netscan_green.png', true, ['title' => __('Close')], false).'</div>'.'<div class="edit_discovery_input"><div style="display: flex;">'.$interval_input_label.'<div style="margin-left: 15 px; width: 50%;">'.$interval_input.'</div></div>'.$interval_input_extra.'</div>'.'</div>
|
||||
|
||||
<div style="width: 40%; padding-left: 5%; padding-right: 12%;">
|
||||
<div class="edit_discovery_input">'.$taskname_input_label.'<div class="discovery_text_input">'.$taskname_input.'</div></div>'
|
||||
.'<div class="edit_discovery_input discovery_select_input">'.$discovery_server_select_label.$discovery_server_select.'<div class="discovery_hint"></div></div>'
|
||||
.'<div class="edit_discovery_input">'.$network_input_label.'<div class="discovery_text_input">'.$network_input.'</div></div>'
|
||||
.'</div>'
|
||||
.'<div style="width: 35%;">'.$group_select.'</div>'
|
||||
.'</div>'
|
||||
|
||||
.'<div class="edit_discovery_info">
|
||||
<div class="edit_discovery_input">'.$taskname_input_label.'<div class="discovery_text_input">'.$taskname_input.'</div></div>'.'<div class="edit_discovery_input discovery_select_input">'.$discovery_server_select_label.$discovery_server_select.'<div class="discovery_hint"></div></div>'.'<div class="edit_discovery_input">'.$network_input_label.'<div class="discovery_text_input">'.$network_input.'</div></div>'.'</div>'.'<div style="width: 35%;">'.$group_select.'</div>'.'</div>'.'<div class="edit_discovery_info">
|
||||
<div style="width: 100%;">
|
||||
'.$comment_input.'
|
||||
</div>
|
||||
</div>'
|
||||
.'</div>';
|
||||
</div>'.'</div>';
|
||||
|
||||
$str = __('Next');
|
||||
|
||||
|
@ -778,7 +777,6 @@ class HostDevices extends Wizard
|
|||
}).change();
|
||||
|
||||
</script>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -661,22 +661,25 @@ class Wizard
|
|||
$output_submit = '';
|
||||
$output = '';
|
||||
|
||||
if ($print_white_box === true)
|
||||
if ($print_white_box === true) {
|
||||
$output .= '<div class="white_box">';
|
||||
}
|
||||
|
||||
$output .= '<ul class="wizard">';
|
||||
|
||||
foreach ($inputs as $input) {
|
||||
if ($input['arguments']['type']!='submit')
|
||||
if ($input['arguments']['type'] != 'submit') {
|
||||
$output .= $this->printBlock($input, true);
|
||||
else
|
||||
} else {
|
||||
$output_submit .= $this->printBlock($input, true);
|
||||
}
|
||||
}
|
||||
|
||||
$output .= '</ul>';
|
||||
|
||||
if ($print_white_box === true)
|
||||
if ($print_white_box === true) {
|
||||
$output .= '</div>';
|
||||
}
|
||||
|
||||
$output .= '<ul class="wizard">'.$output_submit.'</ul>';
|
||||
$output .= '</form>';
|
||||
|
|
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 266 KiB |
After Width: | Height: | Size: 291 B |
|
@ -418,15 +418,15 @@ if ($get_extended_event) {
|
|||
}
|
||||
|
||||
// Tabs.
|
||||
$tabs = "<ul style='background:#ffffff !important; border-top: 0px; border-left: 0px; border-right: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-color: #D3D3D3;'>";
|
||||
$tabs .= "<li><a href='#extended_event_general_page' id='link_general'>".html_print_image('images/lightning_go.png', true)."<span style='position:relative;top:-6px;left:5px;margin-right:10px;'>".__('General').'</span></a></li>';
|
||||
$tabs = "<ul class='events_tabs'>";
|
||||
$tabs .= "<li><a href='#extended_event_general_page' id='link_general'>".html_print_image('images/lightning_go.png', true).'<span>'.__('General').'</span></a></li>';
|
||||
if (events_has_extended_info($event['id_evento']) === true) {
|
||||
$tabs .= "<li><a href='#extended_event_related_page' id='link_related'>".html_print_image('images/zoom.png', true)."<span style='position:relative;top:-6px;left:5px;margin-right:10px;'>".__('Related').'</span></a></li>';
|
||||
$tabs .= "<li><a href='#extended_event_related_page' id='link_related'>".html_print_image('images/zoom.png', true).'<span>'.__('Related').'</span></a></li>';
|
||||
}
|
||||
|
||||
$tabs .= "<li><a href='#extended_event_details_page' id='link_details'>".html_print_image('images/zoom.png', true)."<span style='position:relative;top:-6px;left:5px;margin-right:10px;'>".__('Details').'</span></a></li>';
|
||||
$tabs .= "<li><a href='#extended_event_custom_fields_page' id='link_custom_fields'>".html_print_image('images/custom_field_col.png', true)."<span style='position:relative;top:-6px;left:5px;margin-right:10px;'>".__('Agent fields').'</span></a></li>';
|
||||
$tabs .= "<li><a href='#extended_event_comments_page' id='link_comments'>".html_print_image('images/pencil.png', true)."<span style='position:relative;top:-6px;left:5px;margin-right:10px;'>".__('Comments').'</span></a></li>';
|
||||
$tabs .= "<li><a href='#extended_event_details_page' id='link_details'>".html_print_image('images/zoom.png', true).'<span>'.__('Details').'</span></a></li>';
|
||||
$tabs .= "<li><a href='#extended_event_custom_fields_page' id='link_custom_fields'>".html_print_image('images/custom_field_col.png', true).'<span>'.__('Agent fields').'</span></a></li>';
|
||||
$tabs .= "<li><a href='#extended_event_comments_page' id='link_comments'>".html_print_image('images/pencil.png', true).'<span>'.__('Comments').'</span></a></li>';
|
||||
|
||||
if (!$readonly
|
||||
&& ((tags_checks_event_acl(
|
||||
|
@ -546,7 +546,7 @@ if ($get_extended_event) {
|
|||
|
||||
$loading = '<div id="response_loading" style="display:none">'.html_print_image('images/spinner.gif', true).'</div>';
|
||||
|
||||
$out = '<div id="tabs" style="height:95%; overflow: auto">'.$tabs.$notifications.$loading.$general.$details.$related.$custom_fields.$comments.$responses.$custom_data.html_print_input_hidden('id_event', $event['id_evento']).'</div>';
|
||||
$out = '<div id="tabs">'.$tabs.$notifications.$loading.$general.$details.$related.$custom_fields.$comments.$responses.$custom_data.html_print_input_hidden('id_event', $event['id_evento']).'</div>';
|
||||
|
||||
$js = '<script>
|
||||
$(function() {
|
||||
|
|
|
@ -82,11 +82,9 @@ if ($get_extended_info == 1) {
|
|||
$table->width = '100%';
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
$table->style[0] = 'min-width:120px; text-align: left;';
|
||||
$table->style[1] = 'text-align: left;';
|
||||
$table->cellspacing = 2;
|
||||
$table->cellpadding = 2;
|
||||
$table->class = 'alternate rounded_cells';
|
||||
$table->class = 'events_show_more_table';
|
||||
|
||||
$output = [];
|
||||
$output[] = '<b>'.__('Timestamp').'</b>';
|
||||
|
|
|
@ -1120,11 +1120,11 @@ if (check_login()) {
|
|||
$draw_events = 0;
|
||||
}
|
||||
|
||||
$link = "winopeng('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module['id_agente_modulo'].'&'.'label='.rawurlencode(
|
||||
$link = "winopeng_var('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module['id_agente_modulo'].'&'.'label='.rawurlencode(
|
||||
urlencode(
|
||||
base64_encode($module['nombre'])
|
||||
)
|
||||
).'&'.'refresh='.SECONDS_10MINUTES.'&'."draw_events=$draw_events', 'day_".$win_handle."')";
|
||||
).'&'.'refresh='.SECONDS_10MINUTES.'&'."draw_events=$draw_events', 'day_".$win_handle."', 1000, 650)";
|
||||
if (!is_snapshot_data($module['datos'])) {
|
||||
$data[8] .= '<a href="javascript:'.$link.'">'.html_print_image('images/chart_curve.png', true, ['border' => '0', 'alt' => '']).'</a> ';
|
||||
}
|
||||
|
|
|
@ -37,6 +37,9 @@ $api_password = get_parameter('apipass', '');
|
|||
$password = get_parameter('pass', '');
|
||||
$user = get_parameter('user', '');
|
||||
$info = get_parameter('info', '');
|
||||
|
||||
$other = parseOtherParameter($otherSerialize, $otherMode);
|
||||
|
||||
$other = parseOtherParameter($otherSerialize, $otherMode);
|
||||
$apiPassword = io_output_password(db_get_value_filter('value', 'tconfig', ['token' => 'api_password']));
|
||||
|
||||
|
@ -104,6 +107,7 @@ if ($correctLogin) {
|
|||
if ($op == 'set' && $id) {
|
||||
switch ($op2) {
|
||||
case 'update_agent':
|
||||
|
||||
case 'add_module_in_conf':
|
||||
case 'update_module_in_conf':
|
||||
case 'delete_module_in_conf':
|
||||
|
@ -184,6 +188,7 @@ if ($correctLogin) {
|
|||
break;
|
||||
|
||||
default:
|
||||
|
||||
// break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -443,7 +443,7 @@ class CustomNetScan extends Wizard
|
|||
'name' => 'taskname',
|
||||
'value' => $this->task['name'],
|
||||
'type' => 'text',
|
||||
'size' => 25,
|
||||
'size' => 50,
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -465,7 +465,7 @@ class CustomNetScan extends Wizard
|
|||
'name' => 'comment',
|
||||
'value' => $this->task['description'],
|
||||
'type' => 'text',
|
||||
'size' => 25,
|
||||
'size' => 50,
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -652,7 +652,7 @@ class CustomNetScan extends Wizard
|
|||
'value' => $explanation,
|
||||
'return' => true,
|
||||
'attributes' => 'style="width: 388px;"',
|
||||
'class' => 'discovery_textarea_input'
|
||||
'class' => 'discovery_textarea_input',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC190508';
|
||||
$build_version = 'PC190513';
|
||||
$pandora_version = 'v7.0NG.734';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -205,7 +205,7 @@ function mysql_db_get_value($field, $table, $field_search=1, $condition=1, $sear
|
|||
*
|
||||
* @return mixed The first row of a database query or false.
|
||||
*/
|
||||
function mysql_db_get_row($table, $field_search, $condition, $fields=false)
|
||||
function mysql_db_get_row($table, $field_search, $condition, $fields=false, $cache=true)
|
||||
{
|
||||
if (empty($fields)) {
|
||||
$fields = '*';
|
||||
|
@ -243,7 +243,7 @@ function mysql_db_get_row($table, $field_search, $condition, $fields=false)
|
|||
);
|
||||
}
|
||||
|
||||
$result = db_get_all_rows_sql($sql);
|
||||
$result = db_get_all_rows_sql($sql, false, $cache);
|
||||
|
||||
if ($result === false) {
|
||||
return false;
|
||||
|
|
|
@ -3541,25 +3541,27 @@ function series_type_graph_array($data, $show_elements_graph)
|
|||
break;
|
||||
}
|
||||
|
||||
if (isset($show_elements_graph['labels'])
|
||||
if (isset($show_elements_graph['labels'][$value['agent_module_id']])
|
||||
&& is_array($show_elements_graph['labels'])
|
||||
&& (count($show_elements_graph['labels']) > 0)
|
||||
) {
|
||||
if ($show_elements_graph['unit']) {
|
||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$show_elements_graph['unit'].': ';
|
||||
$name_legend = $show_elements_graph['labels'][$value['agent_module_id']].' / '.__('Unit ').' '.$show_elements_graph['unit'].': ';
|
||||
$data_return['legend'][$key] = $show_elements_graph['labels'][$value['agent_module_id']].' / '.__('Unit ').' '.$show_elements_graph['unit'].': ';
|
||||
} else {
|
||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].': ';
|
||||
$name_legend = $show_elements_graph['labels'][$value['agent_module_id']].': ';
|
||||
$data_return['legend'][$key] = $show_elements_graph['labels'][$value['agent_module_id']].': ';
|
||||
}
|
||||
} else {
|
||||
if (strpos($key, 'baseline') !== false) {
|
||||
if ($show_elements_graph['unit']) {
|
||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$show_elements_graph['unit'].'Baseline ';
|
||||
if ($value['unit']) {
|
||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$value['unit'].'Baseline ';
|
||||
} else {
|
||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].'Baseline ';
|
||||
}
|
||||
} else {
|
||||
if ($show_elements_graph['unit']) {
|
||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$show_elements_graph['unit'].': ';
|
||||
if ($value['unit']) {
|
||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$value['unit'].': ';
|
||||
} else {
|
||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].': ';
|
||||
}
|
||||
|
@ -3853,9 +3855,10 @@ function pandora_xhprof_display_result($key='', $method='link')
|
|||
/**
|
||||
* From a network with a mask remove the smallest ip and the highest
|
||||
*
|
||||
* @param string address to identify the network.
|
||||
* @param string mask to identify the mask network
|
||||
* @return array or false with smallest ip and highest ip
|
||||
* @param string $address Identify the network.
|
||||
* @param string $mask Identify the mask network.
|
||||
*
|
||||
* @return array or false with smallest ip and highest ip.
|
||||
*/
|
||||
function range_ips_for_network($address, $mask)
|
||||
{
|
||||
|
@ -3863,15 +3866,15 @@ function range_ips_for_network($address, $mask)
|
|||
return false;
|
||||
}
|
||||
|
||||
// convert ip addresses to long form
|
||||
// Convert ip addresses to long form.
|
||||
$address_long = ip2long($address);
|
||||
$mask_long = ip2long($mask);
|
||||
|
||||
// caculate first usable address
|
||||
// Calculate first usable address.
|
||||
$ip_host_first = ((~$mask_long) & $address_long);
|
||||
$ip_first = (($address_long ^ $ip_host_first) + 1);
|
||||
$ip_first = (($address_long ^ $ip_host_first));
|
||||
|
||||
// caculate last usable address
|
||||
// Calculate last usable address.
|
||||
$ip_broadcast_invert = ~$mask_long;
|
||||
$ip_last = (($address_long | $ip_broadcast_invert) - 1);
|
||||
|
||||
|
@ -3887,9 +3890,10 @@ function range_ips_for_network($address, $mask)
|
|||
/**
|
||||
* from two ips find out if there is such an ip
|
||||
*
|
||||
* @param string ip ip wont validate
|
||||
* @param string ip_lower
|
||||
* @param string ip_upper
|
||||
* @param string ip ip wont validate
|
||||
* @param string ip_lower
|
||||
* @param string ip_upper
|
||||
*
|
||||
* @return boolean true or false if the ip is between the two ips
|
||||
*/
|
||||
function is_in_network($ip, $ip_lower, $ip_upper)
|
||||
|
|
|
@ -1,36 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category API
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS- http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
global $config;
|
||||
|
||||
// Set character encoding to UTF-8
|
||||
// fixes a lot of multibyte character headaches.
|
||||
// Set character encoding to UTF-8 - fixes a lot of multibyte character headaches
|
||||
require_once 'functions_agents.php';
|
||||
require_once 'functions_modules.php';
|
||||
require_once $config['homedir'].'/include/functions_profile.php';
|
||||
|
@ -254,7 +237,7 @@ function returnData($returnType, $data, $separator=';')
|
|||
case 'json':
|
||||
$data = array_apply_io_safe_output($data);
|
||||
header('Content-type: application/json');
|
||||
// Allows extra parameters to json_encode, like JSON_FORCE_OBJECT.
|
||||
// Allows extra parameters to json_encode, like JSON_FORCE_OBJECT
|
||||
if ($separator == ';') {
|
||||
$separator = null;
|
||||
}
|
||||
|
@ -559,6 +542,7 @@ $module_field_column_mampping = [
|
|||
'module_critical_inverse' => 'critical_inverse as module_critical_inverse',
|
||||
'module_warning_inverse' => 'warning_inverse as module_warning_inverse',
|
||||
];
|
||||
|
||||
// module related field mappings 2/2 (output field => column for 'tagente_estado')
|
||||
// module_id_agent_modulo is not in this list
|
||||
$estado_fields_to_columns_mapping = [
|
||||
|
@ -3030,20 +3014,21 @@ function api_get_policy_modules($thrash1, $thrash2, $other, $thrash3)
|
|||
|
||||
|
||||
/**
|
||||
* Create a network module in agent.
|
||||
* And return the id_agent_module of new module.
|
||||
* Create a network module in agent. And return the id_agent_module of new module.
|
||||
*
|
||||
* @param string $id Name of agent to add the module.
|
||||
* @param string $thrash1 Don't use.
|
||||
* @param array $other It's array, $other as param is <name_module>;<disabled>;<id_module_type>;
|
||||
* <id_module_group>;<min_warning>;<max_warning>;<str_warning>;<min_critical>;<max_critical>;<str_critical>;<ff_threshold>;
|
||||
* <history_data>;<ip_target>;<module_port>;<snmp_community>;<snmp_oid>;<module_interval>;<post_process>;
|
||||
* <min>;<max>;<custom_id>;<description>;<disabled_types_event>;<module_macros>;
|
||||
* <each_ff>;<ff_threshold_normal>;<ff_threshold_warning>;<ff_threshold_critical>; in this order
|
||||
* and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_<separator>).
|
||||
* @param string $thrash3 Don't use.
|
||||
* @example: api.php?op=set&op2=create_network_module&id=pepito&other=prueba|0|7|1|10|15|0|16|18|0|15|0|www.google.es|0||0|180|0|0|0|0|latency%20ping&other_mode=url_encode_separator_|*
|
||||
* @return mixed Return.
|
||||
* @param string $id Name of agent to add the module.
|
||||
* @param $thrash1 Don't use.
|
||||
* @param array $other it's array, $other as param is <name_module>;<disabled>;<id_module_type>;
|
||||
* <id_module_group>;<min_warning>;<max_warning>;<str_warning>;<min_critical>;<max_critical>;<str_critical>;<ff_threshold>;
|
||||
* <history_data>;<ip_target>;<module_port>;<snmp_community>;<snmp_oid>;<module_interval>;<post_process>;
|
||||
* <min>;<max>;<custom_id>;<description>;<disabled_types_event>;<module_macros>;
|
||||
* <each_ff>;<ff_threshold_normal>;<ff_threshold_warning>;<ff_threshold_critical>; in this order
|
||||
* and separator char (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_<separator>)
|
||||
* example:
|
||||
*
|
||||
* api.php?op=set&op2=create_network_module&id=pepito&other=prueba|0|7|1|10|15|0|16|18|0|15|0|www.google.es|0||0|180|0|0|0|0|latency%20ping&other_mode=url_encode_separator_|
|
||||
*
|
||||
* @param $thrash3 Don't use
|
||||
*/
|
||||
function api_set_create_network_module($id, $thrash1, $other, $thrash3)
|
||||
{
|
||||
|
@ -3105,23 +3090,22 @@ function api_set_create_network_module($id, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_critical' => $other['data'][27],
|
||||
'critical_inverse' => $other['data'][28],
|
||||
'warning_inverse' => $other['data'][29],
|
||||
'ff_type' => $other['data'][30],
|
||||
];
|
||||
|
||||
if (! $values['descripcion']) {
|
||||
$values['descripcion'] = '';
|
||||
// Column 'descripcion' cannot be null.
|
||||
// Column 'descripcion' cannot be null
|
||||
}
|
||||
|
||||
if (! $values['module_macros']) {
|
||||
$values['module_macros'] = '';
|
||||
// Column 'module_macros' cannot be null.
|
||||
// Column 'module_macros' cannot be null
|
||||
}
|
||||
|
||||
$idModule = modules_create_agent_module($idAgent, $name, $values, true);
|
||||
|
||||
if (is_error($idModule)) {
|
||||
// TODO: Improve the error returning more info.
|
||||
// TODO: Improve the error returning more info
|
||||
returnError('error_create_network_module', __('Error in creation network module.'));
|
||||
} else {
|
||||
returnData('string', ['type' => 'string', 'data' => $idModule]);
|
||||
|
@ -3238,7 +3222,6 @@ function api_set_update_network_module($id_module, $thrash1, $other, $thrash3)
|
|||
'critical_inverse',
|
||||
'warning_inverse',
|
||||
'policy_linked',
|
||||
'ff_type',
|
||||
];
|
||||
|
||||
$values = [];
|
||||
|
@ -3343,23 +3326,22 @@ function api_set_create_plugin_module($id, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_critical' => $other['data'][32],
|
||||
'critical_inverse' => $other['data'][33],
|
||||
'warning_inverse' => $other['data'][34],
|
||||
'ff_type' => $other['data'][35],
|
||||
];
|
||||
|
||||
if (! $values['descripcion']) {
|
||||
$values['descripcion'] = '';
|
||||
// Column 'descripcion' cannot be null.
|
||||
// Column 'descripcion' cannot be null
|
||||
}
|
||||
|
||||
if (! $values['module_macros']) {
|
||||
$values['module_macros'] = '';
|
||||
// Column 'module_macros' cannot be null.
|
||||
// Column 'module_macros' cannot be null
|
||||
}
|
||||
|
||||
$idModule = modules_create_agent_module($idAgent, $name, $values, true);
|
||||
|
||||
if (is_error($idModule)) {
|
||||
// TODO: Improve the error returning more info.
|
||||
// TODO: Improve the error returning more info
|
||||
returnError('error_create_plugin_module', __('Error in creation plugin module.'));
|
||||
} else {
|
||||
returnData('string', ['type' => 'string', 'data' => $idModule]);
|
||||
|
@ -3405,7 +3387,7 @@ function api_set_update_plugin_module($id_module, $thrash1, $other, $thrash3)
|
|||
return;
|
||||
}
|
||||
|
||||
// If we want to change the module to a new agent.
|
||||
// If we want to change the module to a new agent
|
||||
if ($other['data'][0] != '') {
|
||||
if (!util_api_check_agent_and_print_error($other['data'][0], 'string', 'AW')) {
|
||||
return;
|
||||
|
@ -3422,7 +3404,7 @@ function api_set_update_plugin_module($id_module, $thrash1, $other, $thrash3)
|
|||
}
|
||||
}
|
||||
|
||||
// Check if agent exists.
|
||||
// Check if agent exists
|
||||
$check_id_agent = db_get_value('id_agente', 'tagente', 'id_agente', $other['data'][0]);
|
||||
if (!$check_id_agent) {
|
||||
returnError('error_update_data_module', __('Error updating plugin module. Id_agent doesn\'t exist.'));
|
||||
|
@ -3466,7 +3448,6 @@ function api_set_update_plugin_module($id_module, $thrash1, $other, $thrash3)
|
|||
'critical_inverse',
|
||||
'warning_inverse',
|
||||
'policy_linked',
|
||||
'ff_type',
|
||||
];
|
||||
|
||||
$values = [];
|
||||
|
@ -3565,23 +3546,22 @@ function api_set_create_data_module($id, $thrash1, $other, $thrash3)
|
|||
'ff_timeout' => $other['data'][23],
|
||||
'critical_inverse' => $other['data'][24],
|
||||
'warning_inverse' => $other['data'][25],
|
||||
'ff_type' => $other['data'][26],
|
||||
];
|
||||
|
||||
if (! $values['descripcion']) {
|
||||
$values['descripcion'] = '';
|
||||
// Column 'descripcion' cannot be null.
|
||||
// Column 'descripcion' cannot be null
|
||||
}
|
||||
|
||||
if (! $values['module_macros']) {
|
||||
$values['module_macros'] = '';
|
||||
// Column 'module_macros' cannot be null.
|
||||
// Column 'module_macros' cannot be null
|
||||
}
|
||||
|
||||
$idModule = modules_create_agent_module($idAgent, $name, $values, true);
|
||||
|
||||
if (is_error($idModule)) {
|
||||
// TODO: Improve the error returning more info.
|
||||
// TODO: Improve the error returning more info
|
||||
returnError('error_create_data_module', __('Error in creation data module.'));
|
||||
} else {
|
||||
returnData('string', ['type' => 'string', 'data' => $idModule]);
|
||||
|
@ -3838,7 +3818,7 @@ function api_set_update_data_module($id_module, $thrash1, $other, $thrash3)
|
|||
return;
|
||||
}
|
||||
|
||||
// If we want to change the module to a new agent.
|
||||
// If we want to change the module to a new agent
|
||||
if ($other['data'][0] != '') {
|
||||
if (!util_api_check_agent_and_print_error($other['data'][0], 'string', 'AW')) {
|
||||
return;
|
||||
|
@ -3855,7 +3835,7 @@ function api_set_update_data_module($id_module, $thrash1, $other, $thrash3)
|
|||
}
|
||||
}
|
||||
|
||||
// Check if agent exists.
|
||||
// Check if agent exists
|
||||
$check_id_agent = db_get_value('id_agente', 'tagente', 'id_agente', $other['data'][0]);
|
||||
if (!$check_id_agent) {
|
||||
returnError('error_update_data_module', __('Error updating data module. Id_agent doesn\'t exist.'));
|
||||
|
@ -3890,7 +3870,6 @@ function api_set_update_data_module($id_module, $thrash1, $other, $thrash3)
|
|||
'critical_inverse',
|
||||
'warning_inverse',
|
||||
'policy_linked',
|
||||
'ff_type',
|
||||
];
|
||||
|
||||
$values = [];
|
||||
|
@ -3968,7 +3947,7 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3)
|
|||
$disabled_types_event[EVENTS_GOING_UNKNOWN] = (int) !$other['data'][27];
|
||||
$disabled_types_event = json_encode($disabled_types_event);
|
||||
|
||||
// SNMP version 3.
|
||||
// SNMP version 3
|
||||
if ($other['data'][14] == '3') {
|
||||
if ($other['data'][23] != 'AES' and $other['data'][23] != 'DES') {
|
||||
returnError('error_create_snmp_module', __('Error in creation SNMP module. snmp3_priv_method doesn\'t exist. Set it to \'AES\' or \'DES\'. '));
|
||||
|
@ -4021,7 +4000,6 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_normal' => $other['data'][31],
|
||||
'min_ff_event_warning' => $other['data'][32],
|
||||
'min_ff_event_critical' => $other['data'][33],
|
||||
'ff_type' => $other['data'][34],
|
||||
];
|
||||
} else {
|
||||
$values = [
|
||||
|
@ -4054,19 +4032,18 @@ function api_set_create_snmp_module($id, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_normal' => $other['data'][25],
|
||||
'min_ff_event_warning' => $other['data'][26],
|
||||
'min_ff_event_critical' => $other['data'][27],
|
||||
'ff_type' => $other['data'][28],
|
||||
];
|
||||
}
|
||||
|
||||
if (! $values['descripcion']) {
|
||||
$values['descripcion'] = '';
|
||||
// Column 'descripcion' cannot be null.
|
||||
// Column 'descripcion' cannot be null
|
||||
}
|
||||
|
||||
$idModule = modules_create_agent_module($idAgent, $name, $values, true);
|
||||
|
||||
if (is_error($idModule)) {
|
||||
// TODO: Improve the error returning more info.
|
||||
// TODO: Improve the error returning more info
|
||||
returnError('error_create_snmp_module', __('Error in creation SNMP module.'));
|
||||
} else {
|
||||
returnData('string', ['type' => 'string', 'data' => $idModule]);
|
||||
|
@ -4114,7 +4091,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
|
|||
return;
|
||||
}
|
||||
|
||||
// If we want to change the module to a new agent.
|
||||
// If we want to change the module to a new agent
|
||||
if ($other['data'][0] != '') {
|
||||
if (!util_api_check_agent_and_print_error($other['data'][0], 'string', 'AW')) {
|
||||
return;
|
||||
|
@ -4131,7 +4108,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
|
|||
}
|
||||
}
|
||||
|
||||
// Check if agent exists.
|
||||
// Check if agent exists
|
||||
$check_id_agent = db_get_value('id_agente', 'tagente', 'id_agente', $other['data'][0]);
|
||||
if (!$check_id_agent) {
|
||||
returnError('error_update_data_module', __('Error updating snmp module. Id_agent doesn\'t exist.'));
|
||||
|
@ -4139,7 +4116,7 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
|
|||
}
|
||||
}
|
||||
|
||||
// SNMP version 3.
|
||||
// SNMP version 3
|
||||
if ($other['data'][13] == '3') {
|
||||
if ($other['data'][22] != 'AES' and $other['data'][22] != 'DES') {
|
||||
returnError(
|
||||
|
@ -4203,7 +4180,6 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_warning',
|
||||
'min_ff_event_critical',
|
||||
'policy_linked',
|
||||
'ff_type',
|
||||
];
|
||||
} else {
|
||||
$snmp_module_fields = [
|
||||
|
@ -4235,7 +4211,6 @@ function api_set_update_snmp_module($id_module, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_warning',
|
||||
'min_ff_event_critical',
|
||||
'policy_linked',
|
||||
'ff_type',
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -4333,7 +4308,6 @@ function api_set_new_network_component($id, $thrash1, $other, $thrash2)
|
|||
'min_ff_event_normal' => $other['data'][20],
|
||||
'min_ff_event_warning' => $other['data'][21],
|
||||
'min_ff_event_critical' => $other['data'][22],
|
||||
'ff_type' => $other['data'][23],
|
||||
];
|
||||
|
||||
$name_check = db_get_value('name', 'tnetwork_component', 'name', $id);
|
||||
|
@ -4434,7 +4408,6 @@ function api_set_new_plugin_component($id, $thrash1, $other, $thrash2)
|
|||
'min_ff_event_normal' => $other['data'][24],
|
||||
'min_ff_event_warning' => $other['data'][25],
|
||||
'min_ff_event_critical' => $other['data'][26],
|
||||
'ff_type' => $other['data'][27],
|
||||
];
|
||||
|
||||
$name_check = db_get_value('name', 'tnetwork_component', 'name', $id);
|
||||
|
@ -4570,7 +4543,6 @@ function api_set_new_snmp_component($id, $thrash1, $other, $thrash2)
|
|||
'min_ff_event_normal' => $other['data'][29],
|
||||
'min_ff_event_warning' => $other['data'][30],
|
||||
'min_ff_event_critical' => $other['data'][31],
|
||||
'ff_type' => $other['data'][32],
|
||||
];
|
||||
} else {
|
||||
$values = [
|
||||
|
@ -4602,7 +4574,6 @@ function api_set_new_snmp_component($id, $thrash1, $other, $thrash2)
|
|||
'min_ff_event_normal' => $other['data'][25],
|
||||
'min_ff_event_warning' => $other['data'][26],
|
||||
'min_ff_event_critical' => $other['data'][27],
|
||||
'ff_type' => $other['data'][28],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -4683,7 +4654,6 @@ function api_set_new_local_component($id, $thrash1, $other, $thrash2)
|
|||
'min_ff_event_warning' => $other['data'][8],
|
||||
'min_ff_event_critical' => $other['data'][9],
|
||||
'ff_timeout' => $other['data'][10],
|
||||
'ff_type' => $other['data'][11],
|
||||
];
|
||||
|
||||
$name_check = enterprise_hook(
|
||||
|
@ -6439,7 +6409,6 @@ function api_set_add_data_module_policy($id, $thrash1, $other, $thrash3)
|
|||
$values['min_ff_event_warning'] = $other['data'][21];
|
||||
$values['min_ff_event_critical'] = $other['data'][22];
|
||||
$values['ff_timeout'] = $other['data'][23];
|
||||
$values['ff_type'] = $other['data'][24];
|
||||
|
||||
if ($name_module_policy !== false) {
|
||||
if ($name_module_policy[0]['name'] == $other['data'][0]) {
|
||||
|
@ -6681,7 +6650,6 @@ function api_set_add_network_module_policy($id, $thrash1, $other, $thrash3)
|
|||
$values['min_ff_event_normal'] = $other['data'][24];
|
||||
$values['min_ff_event_warning'] = $other['data'][25];
|
||||
$values['min_ff_event_critical'] = $other['data'][26];
|
||||
$values['ff_type'] = $other['data'][27];
|
||||
|
||||
if ($name_module_policy !== false) {
|
||||
if ($name_module_policy[0]['name'] == $other['data'][0]) {
|
||||
|
@ -6891,7 +6859,6 @@ function api_set_add_plugin_module_policy($id, $thrash1, $other, $thrash3)
|
|||
$values['min_ff_event_normal'] = $other['data'][29];
|
||||
$values['min_ff_event_warning'] = $other['data'][30];
|
||||
$values['min_ff_event_critical'] = $other['data'][31];
|
||||
$values['ff_type'] = $other['data'][32];
|
||||
|
||||
if ($name_module_policy !== false) {
|
||||
if ($name_module_policy[0]['name'] == $other['data'][0]) {
|
||||
|
@ -7309,7 +7276,6 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_normal' => $other['data'][30],
|
||||
'min_ff_event_warning' => $other['data'][31],
|
||||
'min_ff_event_critical' => $other['data'][32],
|
||||
'ff_type' => $other['data'][33],
|
||||
];
|
||||
} else {
|
||||
$values = [
|
||||
|
@ -7339,7 +7305,6 @@ function api_set_add_snmp_module_policy($id, $thrash1, $other, $thrash3)
|
|||
'min_ff_event_normal' => $other['data'][24],
|
||||
'min_ff_event_warning' => $other['data'][25],
|
||||
'min_ff_event_critical' => $other['data'][26],
|
||||
'ff_type' => $other['data'][27],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -8829,14 +8794,7 @@ function api_set_alert_actions($id, $id2, $other, $trash1)
|
|||
}
|
||||
|
||||
$firesMin = $other['data'][2];
|
||||
if (!$firesMin) {
|
||||
$firesMin = 0;
|
||||
}
|
||||
|
||||
$firesMax = $other['data'][3];
|
||||
if (!$firesMax) {
|
||||
$firesMax = 0;
|
||||
}
|
||||
|
||||
$values = [
|
||||
'id_alert_template_module' => $idAlertTemplateModule,
|
||||
|
@ -13311,7 +13269,6 @@ function api_set_apply_module_template($id_template, $id_agent, $thrash3, $thras
|
|||
'min_ff_event_normal' => $row2['min_ff_event_normal'],
|
||||
'min_ff_event_warning' => $row2['min_ff_event_warning'],
|
||||
'min_ff_event_critical' => $row2['min_ff_event_critical'],
|
||||
'ff_type' => $row2['ff_type'],
|
||||
];
|
||||
|
||||
$name = $row2['name'];
|
||||
|
|
|
@ -1349,7 +1349,7 @@ function config_update_config()
|
|||
break;
|
||||
|
||||
case 'ehorus':
|
||||
if (!config_update_value('ehorus_enabled', (int) get_parameter('ehorus_enabled', $config['ehorus_enabled']))) {
|
||||
if (!config_update_value('ehorus_enabled', (int) get_parameter('ehorus_enabled', 0))) {
|
||||
$error_update[] = __('Enable eHorus');
|
||||
}
|
||||
|
||||
|
|
|
@ -421,13 +421,13 @@ function db_get_row_sql($sql, $search_history_db=false)
|
|||
*
|
||||
* @return mixed The first row of a database query or false.
|
||||
*/
|
||||
function db_get_row($table, $field_search, $condition, $fields=false)
|
||||
function db_get_row($table, $field_search, $condition, $fields=false, $cache=true)
|
||||
{
|
||||
global $config;
|
||||
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
return mysql_db_get_row($table, $field_search, $condition, $fields);
|
||||
return mysql_db_get_row($table, $field_search, $condition, $fields, $cache);
|
||||
|
||||
break;
|
||||
case 'postgresql':
|
||||
|
|
|
@ -1987,9 +1987,9 @@ function events_page_responses($event, $childrens_ids=[])
|
|||
$table_responses->width = '100%';
|
||||
$table_responses->data = [];
|
||||
$table_responses->head = [];
|
||||
$table_responses->style[0] = 'width:35%; font-weight: bold; text-align: left; height: 23px;';
|
||||
$table_responses->style[1] = 'text-align: left; height: 23px; text-align: right;';
|
||||
$table_responses->class = 'alternate rounded_cells';
|
||||
$table_responses->style[0] = 'height:30px';
|
||||
$table_responses->style[2] = 'text-align:right;';
|
||||
$table_responses->class = 'events_show_more_table';
|
||||
|
||||
if (tags_checks_event_acl($config['id_user'], $event['id_grupo'], 'EM', $event['clean_tags'], $childrens_ids)) {
|
||||
// Owner.
|
||||
|
@ -2056,7 +2056,7 @@ function events_page_responses($event, $childrens_ids=[])
|
|||
-1,
|
||||
true
|
||||
);
|
||||
$data[1] .= html_print_button(
|
||||
$data[2] .= html_print_button(
|
||||
__('Update'),
|
||||
'owner_button',
|
||||
false,
|
||||
|
@ -2136,7 +2136,7 @@ function events_page_responses($event, $childrens_ids=[])
|
|||
);
|
||||
|
||||
if (!$status_blocked) {
|
||||
$data[1] .= html_print_button(
|
||||
$data[2] .= html_print_button(
|
||||
__('Update'),
|
||||
'status_button',
|
||||
false,
|
||||
|
@ -2151,7 +2151,8 @@ function events_page_responses($event, $childrens_ids=[])
|
|||
// Comments.
|
||||
$data = [];
|
||||
$data[0] = __('Comment');
|
||||
$data[1] = html_print_button(
|
||||
$data[1] = '';
|
||||
$data[2] = html_print_button(
|
||||
__('Add comment'),
|
||||
'comment_button',
|
||||
false,
|
||||
|
@ -2173,8 +2174,9 @@ function events_page_responses($event, $childrens_ids=[])
|
|||
// Delete.
|
||||
$data = [];
|
||||
$data[0] = __('Delete event');
|
||||
$data[1] = '<form method="post">';
|
||||
$data[1] .= html_print_button(
|
||||
$data[1] = '';
|
||||
$data[2] = '<form method="post">';
|
||||
$data[2] .= html_print_button(
|
||||
__('Delete event'),
|
||||
'delete_button',
|
||||
false,
|
||||
|
@ -2182,13 +2184,13 @@ function events_page_responses($event, $childrens_ids=[])
|
|||
'class="sub cancel"',
|
||||
true
|
||||
);
|
||||
$data[1] .= html_print_input_hidden('delete', 1, true);
|
||||
$data[1] .= html_print_input_hidden(
|
||||
$data[2] .= html_print_input_hidden('delete', 1, true);
|
||||
$data[2] .= html_print_input_hidden(
|
||||
'validate_ids',
|
||||
$event['id_evento'],
|
||||
true
|
||||
);
|
||||
$data[1] .= '</form>';
|
||||
$data[2] .= '</form>';
|
||||
|
||||
$table_responses->data[] = $data;
|
||||
}
|
||||
|
@ -2229,7 +2231,7 @@ function events_page_responses($event, $childrens_ids=[])
|
|||
$server_id = 0;
|
||||
}
|
||||
|
||||
$data[1] .= html_print_button(
|
||||
$data[2] .= html_print_button(
|
||||
__('Execute'),
|
||||
'custom_response_button',
|
||||
false,
|
||||
|
@ -2249,14 +2251,14 @@ function events_page_responses($event, $childrens_ids=[])
|
|||
$('.params_rows').remove();
|
||||
|
||||
$('#responses_table')
|
||||
.append('<tr class=\"params_rows\"><td style=\"text-align:left; font-weight: bolder;\">".__('Description')."</td><td style=\"text-align:left;\">'+description+'</td></tr>');
|
||||
.append('<tr class=\"params_rows\"><td>".__('Description')."</td><td style=\"text-align:left; height:30px;\" colspan=\"2\">'+description+'</td></tr>');
|
||||
|
||||
if (params.length == 1 && params[0] == '') {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#responses_table')
|
||||
.append('<tr class=\"params_rows\"><td style=\"text-align:left; padding-left:20px;\" colspan=\"2\">".__('Parameters')."</td></tr>');
|
||||
.append('<tr class=\"params_rows\"><td style=\"text-align:left; padding-left:20px; height:30px;\" colspan=\"3\">".__('Parameters')."</td></tr>');
|
||||
|
||||
for (i = 0; i < params.length; i++) {
|
||||
add_row_param('responses_table',params[i]);
|
||||
|
@ -2521,9 +2523,7 @@ function events_page_custom_fields($event)
|
|||
$table->width = '100%';
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
$table->style[0] = 'width:35%; font-weight: bold; text-align: left; height: 23px;';
|
||||
$table->style[1] = 'text-align: left; height: 23px;';
|
||||
$table->class = 'alternate rounded_cells';
|
||||
$table->class = 'events_show_more_table';
|
||||
|
||||
$all_customs_fields = (bool) check_acl(
|
||||
$config['id_user'],
|
||||
|
@ -2671,11 +2671,9 @@ function events_page_details($event, $server='')
|
|||
$table_details->width = '100%';
|
||||
$table_details->data = [];
|
||||
$table_details->head = [];
|
||||
$table_details->cellspacing = 2;
|
||||
$table_details->cellpadding = 2;
|
||||
$table_details->style[0] = 'width:35%; font-weight: bold; text-align: left; height: 23px;';
|
||||
$table_details->style[1] = 'text-align: left; height: 23px;';
|
||||
$table_details->class = 'alternate rounded_cells';
|
||||
$table_details->cellspacing = 0;
|
||||
$table_details->cellpadding = 0;
|
||||
$table_details->class = 'events_show_more_table';
|
||||
|
||||
/*
|
||||
* Useless switch.
|
||||
|
@ -2985,9 +2983,7 @@ function events_page_custom_data($event)
|
|||
$table->width = '100%';
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
$table->style[0] = 'width:35%; font-weight: bold; text-align: left;';
|
||||
$table->style[1] = 'text-align: left;';
|
||||
$table->class = 'alternate rounded_cells';
|
||||
$table->class = 'events_show_more_table';
|
||||
|
||||
$json_custom_data = base64_decode($event['custom_data']);
|
||||
$custom_data = json_decode($json_custom_data);
|
||||
|
@ -3137,14 +3133,12 @@ function events_page_general($event)
|
|||
|
||||
// General.
|
||||
$table_general = new stdClass;
|
||||
$table_general->cellspacing = 2;
|
||||
$table_general->cellpadding = 2;
|
||||
$table_general->cellspacing = 0;
|
||||
$table_general->cellpadding = 0;
|
||||
$table_general->width = '100%';
|
||||
$table_general->data = [];
|
||||
$table_general->head = [];
|
||||
$table_general->style[0] = 'width:35%; font-weight: bold; text-align: left; height: 23px;';
|
||||
$table_general->style[1] = 'text-align: left; height: 23px;';
|
||||
$table_general->class = 'alternate rounded_cells';
|
||||
$table_general->class = 'events_show_more_table';
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Event ID');
|
||||
|
@ -3185,10 +3179,12 @@ function events_page_general($event)
|
|||
|
||||
$data = [];
|
||||
$data[0] = __('Type');
|
||||
$data[1] = events_print_type_img(
|
||||
$data[1] = events_print_type_description($event['event_type'], true);
|
||||
$data[2] = events_print_type_img(
|
||||
$event['event_type'],
|
||||
true
|
||||
).' '.events_print_type_description($event['event_type'], true);
|
||||
);
|
||||
|
||||
$table_general->data[] = $data;
|
||||
|
||||
$data = [];
|
||||
|
@ -3208,8 +3204,8 @@ function events_page_general($event)
|
|||
$data = [];
|
||||
$data[0] = __('Severity');
|
||||
$event_criticity = get_priority_name($event['criticity']);
|
||||
|
||||
$data[1] = html_print_image(
|
||||
$data[1] = $event_criticity;
|
||||
$data[2] = html_print_image(
|
||||
$img_sev,
|
||||
true,
|
||||
[
|
||||
|
@ -3219,7 +3215,6 @@ function events_page_general($event)
|
|||
'title' => $event_criticity,
|
||||
]
|
||||
);
|
||||
$data[1] .= ' '.$event_criticity;
|
||||
$table_general->data[] = $data;
|
||||
|
||||
// Get Status.
|
||||
|
@ -3227,7 +3222,8 @@ function events_page_general($event)
|
|||
|
||||
$data = [];
|
||||
$data[0] = __('Status');
|
||||
$data[1] = html_print_image($event_st['img'], true).' '.$event_st['title'];
|
||||
$data[1] = $event_st['title'];
|
||||
$data[2] = html_print_image($event_st['img'], true);
|
||||
$table_general->data[] = $data;
|
||||
|
||||
// If event is validated, show who and when acknowleded it.
|
||||
|
@ -3250,12 +3246,23 @@ function events_page_general($event)
|
|||
|
||||
$data = [];
|
||||
$data[0] = __('Group');
|
||||
$data[1] = '';
|
||||
$data[1] = groups_get_name($event['id_grupo']);
|
||||
if (!$config['show_group_name']) {
|
||||
$data[1] = ui_print_group_icon($event['id_grupo'], true);
|
||||
$data[2] = ui_print_group_icon($event['id_grupo'], true);
|
||||
}
|
||||
|
||||
$table_general->data[] = $data;
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Contact');
|
||||
$data[1] = '';
|
||||
$contact = db_get_value('contact', 'tgrupo', 'id_grupo', $event['id_grupo']);
|
||||
if (empty($contact)) {
|
||||
$data[1] = '<i>'.__('N/A').'</i>';
|
||||
} else {
|
||||
$data[1] = $contact;
|
||||
}
|
||||
|
||||
$data[1] .= groups_get_name($event['id_grupo']);
|
||||
$table_general->data[] = $data;
|
||||
|
||||
$data = [];
|
||||
|
@ -3281,6 +3288,16 @@ function events_page_general($event)
|
|||
|
||||
$table_general->data[] = $data;
|
||||
|
||||
$table_data = $table_general->data;
|
||||
$table_data_total = count($table_data);
|
||||
|
||||
for ($i = 0; $i <= $table_data_total; $i++) {
|
||||
if (count($table_data[$i]) == 2) {
|
||||
$table_general->colspan[$i][1] = 2;
|
||||
$table_general->style[2] = 'text-align:center; width:10%;';
|
||||
}
|
||||
}
|
||||
|
||||
$general = '<div id="extended_event_general_page" class="extended_event_pages">'.html_print_table($table_general, true).'</div>';
|
||||
|
||||
return $general;
|
||||
|
@ -3304,9 +3321,7 @@ function events_page_comments($event, $childrens_ids=[])
|
|||
$table_comments->width = '100%';
|
||||
$table_comments->data = [];
|
||||
$table_comments->head = [];
|
||||
$table_comments->style[0] = 'width:35%; vertical-align: top; text-align: left;';
|
||||
$table_comments->style[1] = 'text-align: left;';
|
||||
$table_comments->class = 'alternate rounded_cells';
|
||||
$table_comments->class = 'events_show_more_table';
|
||||
|
||||
$event_comments = $event['user_comment'];
|
||||
$event_comments = str_replace(["\n", '
'], '<br>', $event_comments);
|
||||
|
@ -3411,9 +3426,9 @@ function events_page_comments($event, $childrens_ids=[])
|
|||
$childrens_ids
|
||||
))) && $config['show_events_in_local'] == false || $config['event_replication'] == false
|
||||
) {
|
||||
$comments_form = '<br><div id="comments_form" style="width:98%;">'.html_print_textarea('comment', 3, 10, '', 'style="min-height: 15px; width: 100%; disabled"', true);
|
||||
$comments_form = '<br><div id="comments_form" style="width:98%;">'.html_print_textarea('comment', 3, 10, '', 'style="min-height: 15px; padding:0; width: 100%; disabled"', true);
|
||||
|
||||
$comments_form .= '<br><div style="text-align:right;">'.html_print_button(__('Add comment'), 'comment_button', false, 'event_comment();', 'class="sub next"', true).'</div><br></div>';
|
||||
$comments_form .= '<br><div style="text-align:right; margin-top:10px;">'.html_print_button(__('Add comment'), 'comment_button', false, 'event_comment();', 'class="sub next"', true).'</div><br></div>';
|
||||
} else {
|
||||
$comments_form = ui_print_message(
|
||||
__('If event replication is ongoing, it won\'t be possible to enter comments here. This option is only to allow local pandora users to see comments, but not to operate with them. The operation, when event replication is enabled, must be done only in the Metaconsole.')
|
||||
|
|
|
@ -120,18 +120,13 @@ if (!function_exists('mime_content_type')) {
|
|||
|
||||
global $config;
|
||||
|
||||
if (isset($config['homedir_filemanager'])) {
|
||||
$homedir_filemanager = trim(io_safe_output($config['homedir_filemanager']));
|
||||
} else {
|
||||
$homedir_filemanager = trim($config['homedir']);
|
||||
}
|
||||
|
||||
$homedir_filemanager = trim($config['homedir']);
|
||||
$sec2 = get_parameter('sec2');
|
||||
if ($sec2 == 'enterprise/godmode/agentes/collections' || $sec2 == 'advanced/collections') {
|
||||
$homedir_filemanager .= '/attachment/collection/';
|
||||
}
|
||||
|
||||
|
||||
$upload_file_or_zip = (bool) get_parameter('upload_file_or_zip');
|
||||
|
||||
if ($upload_file_or_zip) {
|
||||
|
@ -738,6 +733,7 @@ function filemanager_file_explorer(
|
|||
$data[4] .= html_print_input_hidden('delete_file', 1, true);
|
||||
|
||||
$relative_dir = str_replace($homedir_filemanager, '', str_replace('\\', '/', dirname($fileinfo['realpath'])));
|
||||
|
||||
if ($relative_dir[0] == '/') {
|
||||
$relative_dir = substr($relative_dir, 1);
|
||||
}
|
||||
|
|
|
@ -256,6 +256,7 @@ function grafico_modulo_sparse_data(
|
|||
$array_data['sum'.$series_suffix]['agent_name'] = $data_module_graph['agent_name'];
|
||||
$array_data['sum'.$series_suffix]['module_name'] = $data_module_graph['module_name'];
|
||||
$array_data['sum'.$series_suffix]['agent_alias'] = $data_module_graph['agent_alias'];
|
||||
$array_data['sum'.$series_suffix]['unit'] = $data_module_graph['unit'];
|
||||
|
||||
// This is for a specific type of report that consists in passing an interval and doing the average sum and avg.
|
||||
if ($params['force_interval'] != '') {
|
||||
|
@ -759,6 +760,7 @@ function grafico_modulo_sparse($params)
|
|||
$data_module_graph['c_min'] = $module_data['min_critical'];
|
||||
$data_module_graph['c_max'] = $module_data['max_critical'];
|
||||
$data_module_graph['c_inv'] = $module_data['critical_inverse'];
|
||||
$data_module_graph['unit'] = $module_data['unit'];
|
||||
} else {
|
||||
$data_module_graph = false;
|
||||
}
|
||||
|
@ -1225,11 +1227,11 @@ function graphic_combined_module(
|
|||
foreach ($sources as $source) {
|
||||
array_push($modules, $source['id_agent_module']);
|
||||
array_push($weights, $source['weight']);
|
||||
if ($source['label'] != '') {
|
||||
if ($source['label'] != '' || $params_combined['labels']) {
|
||||
$item['type'] = 'custom_graph';
|
||||
$item['id_agent'] = agents_get_module_id($source['id_agent_module']);
|
||||
$item['id_agent_module'] = $source['id_agent_module'];
|
||||
$labels[$source['id_agent_module']] = reporting_label_macro($item, $source['label']);
|
||||
$labels[$source['id_agent_module']] = ($source['label'] != '') ? reporting_label_macro($item, $source['label']) : reporting_label_macro($item, $params_combined['labels']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1357,8 +1359,9 @@ function graphic_combined_module(
|
|||
$data_module_graph['c_max'] = $module_data['max_critical'];
|
||||
$data_module_graph['c_inv'] = $module_data['critical_inverse'];
|
||||
$data_module_graph['module_id'] = $agent_module_id;
|
||||
$data_module_graph['unit'] = $module_data['unit'];
|
||||
|
||||
// stract data
|
||||
// Stract data.
|
||||
$array_data_module = grafico_modulo_sparse_data(
|
||||
$agent_module_id,
|
||||
$date_array,
|
||||
|
@ -1369,12 +1372,14 @@ function graphic_combined_module(
|
|||
|
||||
$series_suffix = $i;
|
||||
|
||||
// convert to array graph and weight
|
||||
// Convert to array graph and weight.
|
||||
foreach ($array_data_module as $key => $value) {
|
||||
$array_data[$key] = $value;
|
||||
if ($params_combined['weight_list'][$i] > 1) {
|
||||
if ($params_combined['weight_list'][$i] != 1) {
|
||||
foreach ($value['data'] as $k => $v) {
|
||||
$array_data[$key]['data'][$k][1] = ($v[1] * $params_combined['weight_list'][$i]);
|
||||
if ($v[1] != false) {
|
||||
$array_data[$key]['data'][$k][1] = ($v[1] * $params_combined['weight_list'][$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1790,7 +1790,6 @@ function html_print_button($label='OK', $name='', $disabled=false, $script='', $
|
|||
*/
|
||||
function html_print_textarea($name, $rows, $columns, $value='', $attributes='', $return=false, $class='')
|
||||
{
|
||||
|
||||
$output = '<textarea id="textarea_'.$name.'" name="'.$name.'" cols="'.$columns.'" rows="'.$rows.'" '.$attributes.'" class="'.$class.'">';
|
||||
// $output .= io_safe_input ($value);
|
||||
$output .= ($value);
|
||||
|
|
|
@ -4439,6 +4439,9 @@ function reporting_value($report, $content, $type, $pdf=false)
|
|||
$return['description'] = $content['description'];
|
||||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
|
||||
$return['agents'] = [$content['id_agent']];
|
||||
$return['id_agent'] = $content['id_agent'];
|
||||
$return['id_agent_module'] = $content['id_agent_module'];
|
||||
|
||||
$return['agent_name'] = $agent_name;
|
||||
$return['module_name'] = $module_name;
|
||||
|
@ -7267,6 +7270,7 @@ function reporting_custom_graph(
|
|||
'modules_series' => $graphs[0]['modules_series'],
|
||||
'id_graph' => $id_graph,
|
||||
'type_report' => $type_report,
|
||||
'labels' => $content['style']['label'],
|
||||
];
|
||||
|
||||
$return['chart'] = graphic_combined_module(
|
||||
|
@ -11659,7 +11663,7 @@ function reporting_translate_sla_status_for_graph($status)
|
|||
*
|
||||
* @return html Return table of header.
|
||||
*/
|
||||
function reporting_header_table_for_pdf(string $title='', string $description='')
|
||||
function reporting_header_table_for_pdf($title='', $description='')
|
||||
{
|
||||
$result_pdf .= '<pagebreak>';
|
||||
$result_pdf .= '<table class="header_table databox">';
|
||||
|
|
|
@ -1026,11 +1026,9 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
if ($pdf) {
|
||||
$table0 = new stdClass();
|
||||
$table0->width = '99%';
|
||||
$table0->class = 'table-beauty';
|
||||
$table0->data['count_row']['count'] = 'Total events: '.$item['total_events'];
|
||||
$pdf_export = html_print_table($table0, true);
|
||||
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -1046,7 +1044,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
$table1->data[0][0] = $item['chart']['by_agent'];
|
||||
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -1064,7 +1061,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
$table1->data[0][0] = $item['chart']['by_user_validator'];
|
||||
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -1082,7 +1078,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
$table1->data[0][0] = $item['chart']['by_criticity'];
|
||||
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -1100,7 +1095,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
$table1->data[0][0] = $item['chart']['validated_vs_unvalidated'];
|
||||
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -1117,7 +1111,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||
if ($pdf) {
|
||||
$table0 = new stdClass();
|
||||
$table0->width = '99%';
|
||||
$table0->class = 'table-beauty';
|
||||
$table0->data['count_row']['count'] = 'Total events: '.$item['total_events'];
|
||||
$pdf_export = html_print_table($table0, true);
|
||||
|
||||
|
@ -1233,11 +1226,9 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
if ($pdf) {
|
||||
$table0 = new stdClass();
|
||||
$table0->width = '99%';
|
||||
$table0->class = 'table-beauty';
|
||||
$table0->data['count_row']['count'] = 'Total events: '.$item['total_events'];
|
||||
$pdf_export = html_print_table($table0, true);
|
||||
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -1253,7 +1244,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
$table1->data[0][0] = $item['chart']['by_agent'];
|
||||
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -1271,7 +1261,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
$table1->data[0][0] = $item['chart']['by_user_validator'];
|
||||
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -1289,7 +1278,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
$table1->data[0][0] = $item['chart']['by_criticity'];
|
||||
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -1307,7 +1295,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
$table1->data[0][0] = $item['chart']['validated_vs_unvalidated'];
|
||||
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -1326,7 +1313,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||
if ($pdf) {
|
||||
$table0 = new stdClass();
|
||||
$table0->width = '99%';
|
||||
$table0->class = 'table-beauty';
|
||||
$table0->data['count_row']['count'] = 'Total events: '.$item['total_events'];
|
||||
$pdf_export = html_print_table($table0, true);
|
||||
|
||||
|
@ -2021,11 +2007,9 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
if ($pdf) {
|
||||
$table0 = new stdClass();
|
||||
$table0->width = '99%';
|
||||
$table0->class = 'table-beauty';
|
||||
$table0->data['count_row']['count'] = 'Total events: '.$item['total_events'];
|
||||
$pdf_export = html_print_table($table0, true);
|
||||
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -2042,7 +2026,6 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
$table1->data[0][0] = $item['chart']['by_user_validator'];
|
||||
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -2060,7 +2043,6 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
$table1->data[0][0] = $item['chart']['by_criticity'];
|
||||
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -2078,7 +2060,6 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
$table1->data[0][0] = $item['chart']['validated_vs_unvalidated'];
|
||||
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty';
|
||||
$pdf_export .= html_print_table($table1, true);
|
||||
$pdf_export .= '<br>';
|
||||
} else {
|
||||
|
@ -2095,7 +2076,6 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||
if ($pdf) {
|
||||
$table0 = new stdClass();
|
||||
$table0->width = '99%';
|
||||
$table0->class = 'table-beauty';
|
||||
$table0->data['count_row']['count'] = 'Total events: '.$item['total_events'];
|
||||
$pdf_export = html_print_table($table0, true);
|
||||
|
||||
|
@ -2438,7 +2418,7 @@ function reporting_html_alert_report($table, $item, $pdf=0)
|
|||
|
||||
$table->data['alerts']['cell'] = html_print_table($table1, true);
|
||||
if ($pdf) {
|
||||
$table1->class = 'table-beauty pdf_alert_table';
|
||||
$table1->class = 'pdf_alert_table';
|
||||
return html_print_table($table1, true);
|
||||
}
|
||||
}
|
||||
|
@ -4937,7 +4917,7 @@ function reporting_html_planned_downtimes_table($planned_downtimes)
|
|||
|
||||
if ($for_pdf) {
|
||||
$table->titlestyle = 'background: #373737; color: #FFF; display: table-cell; font-size: 12px; border: 1px solid grey';
|
||||
$table->class = 'table_sla table_beauty';
|
||||
$table->class = 'table_sla';
|
||||
|
||||
for ($i = 0; $i < count($table->head); $i++) {
|
||||
$table->headstyle[$i] = 'background: #666; color: #FFF; display: table-cell; font-size: 11px; border: 1px solid grey';
|
||||
|
|
|
@ -2440,7 +2440,7 @@ function ui_print_status_image($type, $title='', $return=false, $options=false,
|
|||
*/
|
||||
|
||||
|
||||
function ui_toggle($code, $name, $title='', $hidden_default=true, $return=false)
|
||||
function ui_toggle($code, $name, $title='', $hidden_default=true, $return=false, $toggle_class='')
|
||||
{
|
||||
// Generate unique Id
|
||||
$uniqid = uniqid('');
|
||||
|
@ -2461,12 +2461,11 @@ function ui_toggle($code, $name, $title='', $hidden_default=true, $return=false)
|
|||
// Link to toggle
|
||||
$output = '';
|
||||
$output .= '<a href="javascript:" id="tgl_ctrl_'.$uniqid.'">'.html_print_image($original, true, ['title' => $title, 'id' => 'image_'.$uniqid]).' <b>'.$name.'</b></a>';
|
||||
$output .= '<br />';
|
||||
|
||||
// $output .= '<br />';
|
||||
// if (!defined("METACONSOLE"))
|
||||
// $output .= '<br />';
|
||||
// Code into a div
|
||||
$output .= "<div id='tgl_div_".$uniqid."' style='".$style."'>\n";
|
||||
$output .= "<div id='tgl_div_".$uniqid."' style='".$style."' class='".$toggle_class."'>\n";
|
||||
$output .= $code;
|
||||
$output .= '</div>';
|
||||
|
||||
|
|
|
@ -397,7 +397,7 @@ function update_manager_check_online_free_packages($is_ajax=true)
|
|||
<?php
|
||||
$baseurl = ui_get_full_url(false, false, false, false);
|
||||
echo '<p><b>There is a new version:</b> '.$result[0]['version'].'</p>';
|
||||
echo "<a href='javascript: update_last_package(\"".base64_encode($result[0]['file_name']).'", "'.$result[0]['version'].'", "'.$baseurl."\");'>".__('Update to the last version').'</a>';
|
||||
echo "<a class='update_manager_button' href='javascript: update_last_package(\"".base64_encode($result[0]['file_name']).'", "'.$result[0]['version'].'", "'.$baseurl."\");'>".__('Update').'</a>';
|
||||
} else {
|
||||
echo __('There is no update available.');
|
||||
}
|
||||
|
|
|
@ -4094,10 +4094,8 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0)
|
|||
);
|
||||
} else if (!empty($layout_item_data['id_agent'])) {
|
||||
// Agent.
|
||||
$agent_status = agents_get_status(
|
||||
$layout_item_data['id_agent'],
|
||||
true
|
||||
);
|
||||
$agent = db_get_row('tagente', 'id_agente', $layout_item_data['id_agent']);
|
||||
$agent_status = agents_get_status_from_counts($agent);
|
||||
$status = visual_map_translate_agent_status(
|
||||
$agent_status
|
||||
);
|
||||
|
|
|
@ -1386,6 +1386,10 @@ function visual_map_editor_print_hack_translate_strings()
|
|||
echo "<p style='text-align: center;font-weight: bold;'>".__('Could not be save.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_custom_graph' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No custom graph defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1394,6 +1398,9 @@ function visual_map_editor_print_hack_translate_strings()
|
|||
<script type="text/javascript">
|
||||
$(document).ready (function () {
|
||||
$("#map_linked").change(function () {
|
||||
$("option[value=" + this.value + "]", this)
|
||||
.attr("selected", true).siblings()
|
||||
.removeAttr("selected")
|
||||
$("#text-agent").val("");
|
||||
$("input[name=id_agent]").val(0);
|
||||
$("#module").empty();
|
||||
|
|
|
@ -365,9 +365,9 @@ function get_event_name(event_id, meta, history) {
|
|||
|
||||
function add_row_param(id_table, param) {
|
||||
$("#" + id_table).append(
|
||||
'<tr class="params_rows"><td style="text-align:left; padding-left:40px;">' +
|
||||
'<tr class="params_rows"><td style="text-align:left; padding-left:40px; font-weight: normal; font-style: italic;">' +
|
||||
param +
|
||||
'</td><td style="text-align:left"><input type="text" name="' +
|
||||
'</td><td style="text-align:left" colspan="2"><input type="text" name="' +
|
||||
param +
|
||||
'" id="' +
|
||||
param +
|
||||
|
|
|
@ -747,9 +747,11 @@ var TreeController = {
|
|||
}
|
||||
} else {
|
||||
try {
|
||||
winopeng(
|
||||
winopeng_var(
|
||||
element.moduleGraph.url,
|
||||
element.moduleGraph.handle
|
||||
element.moduleGraph.handle,
|
||||
1000,
|
||||
650
|
||||
);
|
||||
} catch (error) {
|
||||
// console.log(error);
|
||||
|
|
|
@ -326,20 +326,20 @@ function install_package(package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_accept_package_mr_fail_text =
|
||||
"<div>";
|
||||
"<div class='update_popup'>";
|
||||
dialog_accept_package_mr_fail_text =
|
||||
dialog_accept_package_mr_fail_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_info_mr.png'></div>";
|
||||
"<div class='update_text'><h3>INFO</h3>";
|
||||
dialog_accept_package_mr_fail_text =
|
||||
dialog_accept_package_mr_fail_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_accept_package_mr_fail_text =
|
||||
dialog_accept_package_mr_fail_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
mr_not_accepted_code_yes +
|
||||
"</p></div>";
|
||||
dialog_accept_package_mr_fail_text =
|
||||
dialog_accept_package_mr_fail_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_info_mr.png'></div>";
|
||||
dialog_accept_package_mr_fail_text =
|
||||
dialog_accept_package_mr_fail_text +
|
||||
"</div>";
|
||||
|
@ -397,20 +397,21 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_success_pkg_text = "<div>";
|
||||
var dialog_success_pkg_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_exito_mr.png'></div>";
|
||||
"<div class='update_text'><h3>SUCCESS</h3>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
package_success +
|
||||
"</p></div>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_success_mr.png'></div>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text + "</div>";
|
||||
|
||||
|
@ -456,20 +457,21 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
var dialog_error_pkg_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_error_mr.png'></div>";
|
||||
"<div class='update_text'><h3>ERROR</h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
package_error +
|
||||
"</p></div>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_error_mr.png'></div>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text + "</div>";
|
||||
|
||||
|
@ -533,20 +535,21 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_cancel_pkg_text = "<div>";
|
||||
var dialog_cancel_pkg_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_info_mr.png'></div>";
|
||||
"<div class='update_text'><h3>INFO</h3>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
package_cancel +
|
||||
"</p></div>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text + "</div>";
|
||||
|
||||
|
@ -571,20 +574,21 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_bad_message_text = "<div>";
|
||||
var dialog_bad_message_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_bad_message_text =
|
||||
dialog_bad_message_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_error_mr.png'></div>";
|
||||
"<div class='update_text'><h3>ERROR</h3>";
|
||||
dialog_bad_message_text =
|
||||
dialog_bad_message_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_bad_message_text =
|
||||
dialog_bad_message_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
bad_mr_file +
|
||||
"</p></div>";
|
||||
dialog_bad_message_text =
|
||||
dialog_bad_message_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_error_mr.png'></div>";
|
||||
dialog_bad_message_text =
|
||||
dialog_bad_message_text + "</div>";
|
||||
|
||||
|
@ -616,20 +620,21 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_success_mr_text = "<div>";
|
||||
var dialog_success_mr_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_success_mr_text =
|
||||
dialog_success_mr_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_exito_mr.png'></div>";
|
||||
"<div class='update_text'><h3>SUCCESS</h3>";
|
||||
dialog_success_mr_text =
|
||||
dialog_success_mr_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_mr_text =
|
||||
dialog_success_mr_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
mr_success +
|
||||
"</p></div>";
|
||||
dialog_success_mr_text =
|
||||
dialog_success_mr_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_success_mr.png'></div>";
|
||||
dialog_success_mr_text =
|
||||
dialog_success_mr_text + "</div>";
|
||||
|
||||
|
@ -684,20 +689,21 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_success_pkg_text = "<div>";
|
||||
var dialog_success_pkg_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_exito_mr.png'></div>";
|
||||
"<div class='update_text'><h3>SUCCESS</h3>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
package_success +
|
||||
"</p></div>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_success_mr.png'></div>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text + "</div>";
|
||||
|
||||
|
@ -743,20 +749,21 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
var dialog_error_pkg_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_error_mr.png'></div>";
|
||||
"<div class='update_text'><h3>ERROR</h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
package_error +
|
||||
"</p></div>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_error_mr.png'></div>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text + "</div>";
|
||||
|
||||
|
@ -814,20 +821,21 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_error_mr_text = "<div>";
|
||||
var dialog_error_mr_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_error_mr_text =
|
||||
dialog_error_mr_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_error_mr.png'></div>";
|
||||
"<div class='update_text'><h3>ERROR</h3>";
|
||||
dialog_error_mr_text =
|
||||
dialog_error_mr_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_mr_text =
|
||||
dialog_error_mr_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
mr_error +
|
||||
"</p></div>";
|
||||
dialog_error_mr_text =
|
||||
dialog_error_mr_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_error_mr.png'></div>";
|
||||
dialog_error_mr_text =
|
||||
dialog_error_mr_text + "</div>";
|
||||
|
||||
|
@ -874,20 +882,21 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_cancel_mr_text = "<div>";
|
||||
var dialog_cancel_mr_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_cancel_mr_text =
|
||||
dialog_cancel_mr_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_info_mr.png'></div>";
|
||||
"<div class='update_text'><h3>INFO</h3>";
|
||||
dialog_cancel_mr_text =
|
||||
dialog_cancel_mr_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_mr_text =
|
||||
dialog_cancel_mr_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
mr_cancel +
|
||||
"</p></div>";
|
||||
dialog_cancel_mr_text =
|
||||
dialog_cancel_mr_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_info_mr.png'></div>";
|
||||
dialog_cancel_mr_text =
|
||||
dialog_cancel_mr_text + "</div>";
|
||||
|
||||
|
@ -910,34 +919,33 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
$("button:contains(Apply MR)").attr("id", "apply_rr_button");
|
||||
$("button:contains(Apply MR)")
|
||||
.attr("id", "apply_rr_button")
|
||||
.addClass("success_button");
|
||||
$("button:contains(Cancel)").attr("id", "cancel_rr_button");
|
||||
|
||||
var dialog_have_mr_text = "<div>";
|
||||
var dialog_have_mr_text = "<div class='update_popup'>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_warning_mr.png'></div>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>" +
|
||||
"<div class='update_text'><h3>" +
|
||||
mr_available_header +
|
||||
"</strong></h3>";
|
||||
"</h3>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text + "<p>" + text1_mr_file + "</p>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
text1_mr_file +
|
||||
"</p>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
text2_mr_file +
|
||||
"<a style='font-family:Verdana bold; font-size:12pt; color:#82B92E'href=\"index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list\">" +
|
||||
'<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list">' +
|
||||
text3_mr_file +
|
||||
"</a>" +
|
||||
text4_mr_file +
|
||||
"</p></div>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_warning_db.png'></div>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "</div>";
|
||||
|
||||
$("#mr_dialog2").html(dialog_have_mr_text);
|
||||
|
@ -992,20 +1000,21 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_success_pkg_text = "<div>";
|
||||
var dialog_success_pkg_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_exito_mr.png'></div>";
|
||||
"<div class='update_text'><h3>SUCCESS</h3>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
package_success +
|
||||
"</p></div>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_success_mr.png'></div>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text + "</div>";
|
||||
|
||||
|
@ -1047,20 +1056,20 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
var dialog_error_pkg_text = "<div class='update_popup'>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_error_mr.png'></div>";
|
||||
"<div class='update_text'><h3>ERROR</h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
package_error +
|
||||
"</p></div>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "</div>";
|
||||
|
||||
$("#error_pkg").html(dialog_error_pkg_text);
|
||||
|
@ -1124,20 +1133,16 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_cancel_pkg_text = "<div>";
|
||||
var dialog_cancel_pkg_text = "<div class='update_popup'>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text + "<div class='update_text'><h3>INFO</h3>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text + "<p>" + package_cancel + "</p></div>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
package_cancel +
|
||||
"</p></div>";
|
||||
"images/icon_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "</div>";
|
||||
|
||||
$("#cancel_pkg").html(dialog_cancel_pkg_text);
|
||||
|
@ -1214,22 +1219,18 @@ function install_package(package, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_text = "<div>";
|
||||
var dialog_text = "<div class='update_popup'>";
|
||||
dialog_text =
|
||||
dialog_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_info_mr.png'></div>";
|
||||
dialog_text =
|
||||
dialog_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>" +
|
||||
"<div class='update_text'><h3>" +
|
||||
text1_package_file +
|
||||
"</strong></h3>";
|
||||
"</h3>";
|
||||
dialog_text = dialog_text + "<p>" + text2_package_file + "</p></div>";
|
||||
dialog_text =
|
||||
dialog_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
text2_package_file +
|
||||
"</p></div>";
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_info_mr.png'></div>";
|
||||
dialog_text = dialog_text + "</div>";
|
||||
|
||||
$("#pkg_apply_dialog").html(dialog_text);
|
||||
|
@ -1522,20 +1523,20 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_accept_package_mr_fail_text =
|
||||
"<div>";
|
||||
"<div class='update_popup'>";
|
||||
dialog_accept_package_mr_fail_text =
|
||||
dialog_accept_package_mr_fail_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_info_mr.png'></div>";
|
||||
"<div class='update_text'><h3>INFO</h3>";
|
||||
dialog_accept_package_mr_fail_text =
|
||||
dialog_accept_package_mr_fail_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_accept_package_mr_fail_text =
|
||||
dialog_accept_package_mr_fail_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
mr_not_accepted_code_yes +
|
||||
"</p></div>";
|
||||
dialog_accept_package_mr_fail_text =
|
||||
dialog_accept_package_mr_fail_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_info_mr.png'></div>";
|
||||
dialog_accept_package_mr_fail_text =
|
||||
dialog_accept_package_mr_fail_text +
|
||||
"</div>";
|
||||
|
@ -1616,20 +1617,21 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_cancel_pkg_text = "<div>";
|
||||
var dialog_cancel_pkg_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_info_mr.png'></div>";
|
||||
"<div class='update_text'><h3>INFO</h3>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
package_cancel +
|
||||
"</p></div>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text + "</div>";
|
||||
|
||||
|
@ -1646,20 +1648,21 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_bad_message_text = "<div>";
|
||||
var dialog_bad_message_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_bad_message_text =
|
||||
dialog_bad_message_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_error_mr.png'></div>";
|
||||
"<div class='update_text'><h3>ERROR</h3>";
|
||||
dialog_bad_message_text =
|
||||
dialog_bad_message_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_bad_message_text =
|
||||
dialog_bad_message_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
bad_mr_file +
|
||||
"</p></div>";
|
||||
dialog_bad_message_text =
|
||||
dialog_bad_message_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_error_mr.png'></div>";
|
||||
dialog_bad_message_text =
|
||||
dialog_bad_message_text + "</div>";
|
||||
|
||||
|
@ -1691,20 +1694,21 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_success_mr_text = "<div>";
|
||||
var dialog_success_mr_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_success_mr_text =
|
||||
dialog_success_mr_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_exito_mr.png'></div>";
|
||||
"<div class='update_text'><h3>SUCCESS</h3>";
|
||||
dialog_success_mr_text =
|
||||
dialog_success_mr_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_mr_text =
|
||||
dialog_success_mr_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
mr_success +
|
||||
"</p></div>";
|
||||
dialog_success_mr_text =
|
||||
dialog_success_mr_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_success_mr.png'></div>";
|
||||
dialog_success_mr_text =
|
||||
dialog_success_mr_text + "</div>";
|
||||
|
||||
|
@ -1774,20 +1778,21 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_error_mr_text = "<div>";
|
||||
var dialog_error_mr_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_error_mr_text =
|
||||
dialog_error_mr_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_error_mr.png'></div>";
|
||||
"<div class='update_text'><h3>ERROR</h3>";
|
||||
dialog_error_mr_text =
|
||||
dialog_error_mr_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_mr_text =
|
||||
dialog_error_mr_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
mr_error +
|
||||
"</p></div>";
|
||||
dialog_error_mr_text =
|
||||
dialog_error_mr_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_error_mr.png'></div>";
|
||||
dialog_error_mr_text =
|
||||
dialog_error_mr_text + "</div>";
|
||||
|
||||
|
@ -1827,20 +1832,21 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_cancel_mr_text = "<div>";
|
||||
var dialog_cancel_mr_text =
|
||||
"<div class='update_popup'>";
|
||||
dialog_cancel_mr_text =
|
||||
dialog_cancel_mr_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_info_mr.png'></div>";
|
||||
"<div class='update_text'><h3>INFO</h3>";
|
||||
dialog_cancel_mr_text =
|
||||
dialog_cancel_mr_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_mr_text =
|
||||
dialog_cancel_mr_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
mr_cancel +
|
||||
"</p></div>";
|
||||
dialog_cancel_mr_text =
|
||||
dialog_cancel_mr_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_info_mr.png'></div>";
|
||||
dialog_cancel_mr_text =
|
||||
dialog_cancel_mr_text + "</div>";
|
||||
|
||||
|
@ -1855,34 +1861,33 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
$("button:contains(Apply MR)").attr("id", "apply_rr_button");
|
||||
$("button:contains(Apply MR)")
|
||||
.attr("id", "apply_rr_button")
|
||||
.addClass("success_button");
|
||||
$("button:contains(Cancel)").attr("id", "cancel_rr_button");
|
||||
|
||||
var dialog_have_mr_text = "<div>";
|
||||
var dialog_have_mr_text = "<div class='update_popup'>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_warning_mr.png'></div>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>" +
|
||||
"<div class='update_text'><h3>" +
|
||||
mr_available_header +
|
||||
"</strong></h3>";
|
||||
"</h3>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text + "<p>" + text1_mr_file + "</p>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
text1_mr_file +
|
||||
"</p>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
"<p>" +
|
||||
text2_mr_file +
|
||||
"<a style='font-family:Verdana bold; font-size:12pt; color:#82B92E'href=\"index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list\">" +
|
||||
'<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list">' +
|
||||
text3_mr_file +
|
||||
"</a>" +
|
||||
text4_mr_file +
|
||||
"</p></div>";
|
||||
dialog_have_mr_text =
|
||||
dialog_have_mr_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_warning_db.png'></div>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "</div>";
|
||||
|
||||
$("#mr_dialog2").html(dialog_have_mr_text);
|
||||
|
@ -1950,20 +1955,16 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_cancel_pkg_text = "<div>";
|
||||
var dialog_cancel_pkg_text = "<div class='update_popup'>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text + "<div class='update_text'><h3>INFO</h3>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text + "<p>" + package_cancel + "</p></div>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_pkg_text =
|
||||
dialog_cancel_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
package_cancel +
|
||||
"</p></div>";
|
||||
"images/icon_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "</div>";
|
||||
|
||||
$("#cancel_pkg").html(dialog_cancel_pkg_text);
|
||||
|
@ -1977,22 +1978,18 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_text = "<div>";
|
||||
var dialog_text = "<div class='update_popup'>";
|
||||
dialog_text =
|
||||
dialog_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
home_url +
|
||||
"images/icono_info_mr.png'></div>";
|
||||
dialog_text =
|
||||
dialog_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>" +
|
||||
"<div class='update_text'><h3>" +
|
||||
text1_package_file +
|
||||
"</strong></h3>";
|
||||
"</h3>";
|
||||
dialog_text = dialog_text + "<p>" + text2_package_file + "</p></div>";
|
||||
dialog_text =
|
||||
dialog_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
text2_package_file +
|
||||
"</p></div>";
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icon_info_mr.png'></div>";
|
||||
dialog_text = dialog_text + "</div>";
|
||||
|
||||
$("#pkg_apply_dialog").html(dialog_text);
|
||||
|
@ -2039,20 +2036,16 @@ function install_free_package(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
var dialog_error_pkg_text = "<div class='update_popup'>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text + "<div class='update_text'><h3>ERROR</h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text + "<p>" + data["message"] + "</p></div>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
data["message"] +
|
||||
"</p></div>";
|
||||
"images/icon_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "</div>";
|
||||
|
||||
$("#error_pkg").html(dialog_error_pkg_text);
|
||||
|
@ -2092,20 +2085,17 @@ function install_free_package(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_success_pkg_text = "<div>";
|
||||
var dialog_success_pkg_text = "<div class='update_popup'>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
"<div class='update_text'><h3>SUCCESS</h3>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text + "<p>" + data["message"] + "</p></div>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icono_exito_mr.png'></div>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_pkg_text =
|
||||
dialog_success_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
data["message"] +
|
||||
"</p></div>";
|
||||
"images/icon_success_mr.png'></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "</div>";
|
||||
|
||||
$("#success_pkg").html(dialog_success_pkg_text);
|
||||
|
@ -2142,20 +2132,16 @@ function install_free_package(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
var dialog_error_pkg_text = "<div class='update_popup'>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text + "<div class='update_text'><h3>ERROR</h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text + "<p>" + data["message"] + "</p></div>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
data["message"] +
|
||||
"</p></div>";
|
||||
"images/icon_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "</div>";
|
||||
|
||||
$("#error_pkg").html(dialog_error_pkg_text);
|
||||
|
@ -2193,20 +2179,16 @@ function install_free_package(package, version, homeurl) {
|
|||
]
|
||||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
var dialog_error_pkg_text = "<div class='update_popup'>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text + "<div class='update_text'><h3>ERROR</h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text + "<p>" + data["message"] + "</p></div>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" +
|
||||
"<div class='update_icon'><img src='" +
|
||||
home_url +
|
||||
"images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text =
|
||||
dialog_error_pkg_text +
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>" +
|
||||
data["message"] +
|
||||
"</p></div>";
|
||||
"images/icon_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "</div>";
|
||||
|
||||
$("#error_pkg").html(dialog_error_pkg_text);
|
||||
|
@ -2246,13 +2228,7 @@ function apply_minor_release(n_mr, pkg, ent, off, homeurl) {
|
|||
$("#mr_dialog2").html(data);
|
||||
error["error"] = true;
|
||||
} else {
|
||||
$("#mr_dialog2").append(
|
||||
"<p style='font-family:Verdana; font-size:12pt;'>- " +
|
||||
applying_mr +
|
||||
" #" +
|
||||
mr +
|
||||
"</p>"
|
||||
);
|
||||
$("#mr_dialog2").append("<p>- " + applying_mr + " #" + mr + "</p>");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -162,7 +162,7 @@ span.breadcrumb_link {
|
|||
|
||||
.edit_discovery_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
|
@ -181,63 +181,41 @@ span.breadcrumb_link {
|
|||
|
||||
label {
|
||||
color: #343434 !important;
|
||||
font-size: 1.5em;
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-weight: bold;
|
||||
margin: 0px 0px 5px 0px;
|
||||
}
|
||||
|
||||
.discovery_full_width_input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
select {
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1.6em !important;
|
||||
color: #686868;
|
||||
li > input[type="text"],
|
||||
li > input[type="password"],
|
||||
.discovery_text_input > input[type="password"],
|
||||
.discovery_text_input > input[type="text"],
|
||||
#interval_manual > input[type="text"] {
|
||||
background-color: transparent !important;
|
||||
border: none;
|
||||
border-radius: 0 !important;
|
||||
border-bottom: 1px solid #343434;
|
||||
padding: 0px 0px 2px 0px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
select > option {
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1em !important;
|
||||
}
|
||||
|
||||
li > input[type=text], li > input[type=password], .discovery_text_input > input[type=password], .discovery_text_input > input[type=text], #interval_manual > input[type=text] {
|
||||
background-color: transparent !important;
|
||||
border: none;
|
||||
border-radius: 0 !important;
|
||||
border-bottom: 1px solid #343434;
|
||||
padding: 0px 0px 2px 0px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 4px;
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
li > input[type=text]:focus, li > input[type=password]:focus, .discovery_text_input > input[type=password]:focus, .discovery_text_input > input[type=text]:focus, #interval_manual > input[type=text]:focus {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#interval_manual > input[type=text] {
|
||||
#interval_manual > input[type="text"] {
|
||||
width: 50px;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.discovery_list_input {
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1.6em !important;
|
||||
color: #686868;
|
||||
width: 100%;
|
||||
height: 240px;
|
||||
border: 1px solid #CBCBCB;
|
||||
border: 1px solid #cbcbcb;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.discovery_list_input option {
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1.1em !important;
|
||||
padding-left: 30%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.discovery_list_input option:checked {
|
||||
|
@ -253,11 +231,9 @@ li > input[type=text]:focus, li > input[type=password]:focus, .discovery_text_in
|
|||
max-height: 100px;
|
||||
max-width: 100%;
|
||||
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
|
||||
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
||||
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
||||
box-sizing: border-box;
|
||||
resize: none;
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1.4em !important;
|
||||
}
|
||||
|
||||
a.tip {
|
||||
|
@ -270,4 +246,4 @@ a.tip {
|
|||
|
||||
.discovery_interval_select_width {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -266,6 +266,38 @@ th {
|
|||
letter-spacing: 0.3pt;
|
||||
}
|
||||
|
||||
/* Remove background when autocomplete */
|
||||
input:-webkit-autofill,
|
||||
input:-webkit-autofill:hover,
|
||||
input:-webkit-autofill:focus textarea:-webkit-autofill,
|
||||
textarea:-webkit-autofill:hover textarea:-webkit-autofill:focus,
|
||||
select:-webkit-autofill,
|
||||
select:-webkit-autofill:hover,
|
||||
select:-webkit-autofill:focus {
|
||||
-webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
|
||||
}
|
||||
|
||||
/* All select type multiple */
|
||||
select[multiple] option:checked,
|
||||
select[multiple] option:checked {
|
||||
background: #82b92e linear-gradient(0deg, #82b92e 0%, #82b92e 100%);
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
select option:checked,
|
||||
select option:checked {
|
||||
background-color: #82b92e;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
select > option:hover {
|
||||
background-color: #cbcbcb;
|
||||
}
|
||||
|
||||
select:-internal-list-box {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* --- Font ttf --- */
|
||||
@font-face {
|
||||
font-family: "DejaVuSerif-BoldFont";
|
||||
|
@ -3598,6 +3630,78 @@ div.simple_value > a > span.text p {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.events_show_more_table {
|
||||
border-spacing: 0px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* Modal window - Show More */
|
||||
table.events_show_more_table tr:nth-child(odd) td {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
table.events_show_more_table tr:nth-child(even) td {
|
||||
background-color: #f5f5f5;
|
||||
border-top: 1px solid #cacaca;
|
||||
border-bottom: 1px solid #cacaca;
|
||||
}
|
||||
|
||||
table.events_show_more_table tr td {
|
||||
height: 22px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
table.events_show_more_table tr td:first-child {
|
||||
width: 35%;
|
||||
font-weight: bold;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
ul.events_tabs {
|
||||
background: #ffffff !important;
|
||||
border: 0px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
ul.events_tabs:before,
|
||||
ul.events_tabs:after {
|
||||
content: none !important;
|
||||
}
|
||||
|
||||
ul.events_tabs > li {
|
||||
margin: 0 !important;
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
float: none !important;
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
ul.events_tabs > li.ui-state-default {
|
||||
background: #fff !important;
|
||||
border: none !important;
|
||||
border-bottom: 2px solid black !important;
|
||||
}
|
||||
|
||||
ul.events_tabs > li a {
|
||||
text-align: center;
|
||||
float: none !important;
|
||||
padding: 8px !important;
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul.events_tabs > li span {
|
||||
position: relative;
|
||||
top: -6px;
|
||||
left: 5px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
ul.events_tabs > li.ui-tabs-active {
|
||||
border-bottom: 2px solid #82b92e !important;
|
||||
border-top: 2px solid #82b92e !important;
|
||||
}
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - modal window and edit user -
|
||||
|
@ -4939,28 +5043,6 @@ input:checked + .p-slider:before {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
select#autorefresh_list_out[multiple] option:checked,
|
||||
select#autorefresh_list[multiple] option:checked {
|
||||
background: #82b92e linear-gradient(0deg, #82b92e 0%, #82b92e 100%);
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
select#autorefresh_list_out option:checked,
|
||||
select#autorefresh_list option:checked {
|
||||
background-color: #82b92e;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
select#autorefresh_list_out > option:hover,
|
||||
select#autorefresh_list > option:hover {
|
||||
background-color: #cbcbcb;
|
||||
}
|
||||
|
||||
select#autorefresh_list_out:-internal-list-box,
|
||||
select#autorefresh_list:-internal-list-box {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.autorefresh_select .autorefresh_select_list_out,
|
||||
.autorefresh_select .autorefresh_select_list {
|
||||
width: 45%;
|
||||
|
@ -5438,3 +5520,339 @@ table.info_table.policy_sub_table {
|
|||
margin-top: 0px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - Layout for the new forms
|
||||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
.first_row {
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.label_simple_one_item {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.label_simple_items {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.label_simple_items > * {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.input_label {
|
||||
color: #343434 !important;
|
||||
font-weight: bold;
|
||||
padding-right: 10px;
|
||||
margin: 0px 0px 5px 0px;
|
||||
}
|
||||
|
||||
.input_label_simple {
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.label_select_parent {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.label_select_child_left {
|
||||
width: 80%;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.label_select_child_right {
|
||||
width: 20%;
|
||||
min-width: 140px;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.label_select_child_icons {
|
||||
text-align: right;
|
||||
width: 5%;
|
||||
min-width: 30px;
|
||||
}
|
||||
|
||||
/* Inputs type text shown as a black line */
|
||||
.agent_options input[type="text"] {
|
||||
background-color: transparent !important;
|
||||
border: none;
|
||||
border-radius: 0 !important;
|
||||
border-bottom: 1px solid #343434;
|
||||
padding: 2px 5px;
|
||||
box-sizing: border-box;
|
||||
background-repeat: no-repeat;
|
||||
background-position: left bottom 2px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - Create/Update Agent - agent_manager.php
|
||||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
.agent_options {
|
||||
width: 100%;
|
||||
margin-right: 0px;
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.agent_options_update {
|
||||
width: 85%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.agent_options_column_left,
|
||||
.agent_options_column_right {
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.agent_options_column_left {
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
||||
.agent_qr {
|
||||
width: 15%;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
padding: 20px 0px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
a#qr_code_agent_view {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.first_row .agent_options_column_right select,
|
||||
.first_row .agent_options_column_right input,
|
||||
.first_row .agent_options_column_left select#grupo {
|
||||
width: 95%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.first_row .agent_options_column_left .p-switch {
|
||||
margin-right: 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.agent_options_column_left input#text-direccion,
|
||||
.agent_options_column_left select#address_list,
|
||||
.agent_options_column_left input#text-agente,
|
||||
.agent_options_column_left input#text-alias {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.agent_options_agent_name > * {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.custom_fields_table {
|
||||
border-spacing: 0px;
|
||||
}
|
||||
|
||||
.custom_fields_table tr.datos {
|
||||
background-color: #f7f7f7;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.custom_fields_table tr.datos2 {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.custom_fields_table tr td {
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.custom_fields_table tr.datos2 td div.field_title {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.custom_fields_table tr.datos2 td {
|
||||
border-radius: 4px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.custom_fields_table tr.datos td {
|
||||
padding: 15px 10px;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
.custom_fields_table .custom_field_row_opened td {
|
||||
border-bottom-left-radius: 0px !important;
|
||||
border-bottom-right-radius: 0px !important;
|
||||
}
|
||||
|
||||
.secondary_groups_select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.secondary_groups_select .secondary_groups_select_arrows input {
|
||||
display: grid;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.secondary_groups_select .secondary_groups_list_left {
|
||||
text-align: right;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.secondary_groups_select .secondary_groups_list_right {
|
||||
text-align: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.secondary_groups_select .secondary_groups_select_arrows {
|
||||
padding: 0 50px;
|
||||
}
|
||||
|
||||
.secondary_groups_select_arrows a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.agent_options_adv .agent_options_column_right .label_select select,
|
||||
.agent_options_adv .agent_options_column_right .label_select input[type="text"],
|
||||
.agent_options_adv #text-custom_id,
|
||||
.agent_options_adv #cps {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.agent_options_adv .label_select_simple.label_simple_one_item .p-switch {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - CLASSES FOR THE NEW TOGGLES -
|
||||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
.ui_toggle {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.ui_toggle > a:first-child {
|
||||
background-color: #fff;
|
||||
border: 1px solid #f3f3f3;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.white_box_opened {
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
}
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - SWITCH RADIO BUTTONS -
|
||||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
.switch_radio_button {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.switch_radio_button input {
|
||||
position: absolute !important;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
border: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.switch_radio_button label {
|
||||
background-color: #fff;
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
padding: 7px 14px;
|
||||
margin-right: -1px;
|
||||
border: 1px solid #cbcbcb;
|
||||
border-radius: 4px;
|
||||
transition: all 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
.switch_radio_button label:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.switch_radio_button input:checked + label {
|
||||
background-color: #82b92e;
|
||||
box-shadow: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.switch_radio_button label:last-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - MODULE GRAPHS
|
||||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
.module_graph_menu_dropdown {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
width: 100%;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.module_graph_menu_content,
|
||||
.module_graph_menu_header {
|
||||
width: 92%;
|
||||
border: 1px solid #e2e2e2;
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.module_graph_menu_header {
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
padding: 6px 10px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.module_graph_menu_header span > img {
|
||||
vertical-align: middle;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.module_graph_menu_content {
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
padding: 15px;
|
||||
border-top: none;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@ ul.wizard {
|
|||
}
|
||||
|
||||
ul.wizard li {
|
||||
padding: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
ul.wizard li > label:not(.p-switch) {
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.734';
|
||||
$build = '190508';
|
||||
$build = '190513';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -96,7 +96,7 @@ if ($refresh > 0) {
|
|||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body bgcolor="#ffffff" style='background:#ffffff;'>
|
||||
<body style='background:#ffffff;'>
|
||||
<?php
|
||||
// ACL
|
||||
$all_groups = agents_get_all_groups_agent($agent_id);
|
||||
|
@ -136,7 +136,8 @@ if ($date > $now) {
|
|||
|
||||
$urlImage = ui_get_full_url(false);
|
||||
|
||||
echo '<div style="margin-left: 70px; padding-top: 10px;">';
|
||||
// Graph.
|
||||
echo '<div style="padding-top:80px;">';
|
||||
|
||||
$height = 400;
|
||||
$width = '90%';
|
||||
|
@ -177,27 +178,14 @@ if ($date > $now) {
|
|||
|
||||
echo '</div>';
|
||||
|
||||
//
|
||||
// SIDE MENU
|
||||
//
|
||||
$side_layer_params = [];
|
||||
// TOP TEXT
|
||||
$side_layer_params['top_text'] = "<div style='color: white; width: 100%; text-align: center; font-weight: bold; vertical-align: top;'>".html_print_image('/images/config.disabled.png', true, ['width' => '16px'], false, false, false, true).' '.__('Graph configuration menu').'</div>';
|
||||
$side_layer_params['body_text'] = "<div class='menu_sidebar_outer'>";
|
||||
$side_layer_params['body_text'] .= __('Please, make your changes and apply with the <i>Reload</i> button');
|
||||
|
||||
// MENU
|
||||
$side_layer_params['body_text'] .= '<form method="get" action="interface_traffic_graph_win.php">';
|
||||
$side_layer_params['body_text'] .= html_print_input_hidden('params', base64_encode($params_json), true);
|
||||
|
||||
// FORM TABLE
|
||||
$table = html_get_predefined_table('transparent', 2);
|
||||
$table->width = '98%';
|
||||
$table->width = '100%';
|
||||
$table->id = 'stat_win_form_div';
|
||||
$table->style[0] = 'text-align:left; padding: 7px;';
|
||||
$table->style[0] = 'text-align:left;';
|
||||
$table->style[1] = 'text-align:left;';
|
||||
$table->styleTable = 'border-spacing: 4px;';
|
||||
$table->class = 'alternate';
|
||||
$table->styleTable = 'margin-bottom: 20px;';
|
||||
$table->class = 'events_show_more_table';
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Refresh time');
|
||||
|
@ -255,40 +243,32 @@ if ($date > $now) {
|
|||
$table->rowclass[] = '';
|
||||
|
||||
$form_table = html_print_table($table, true);
|
||||
$form_table .= '<div style="width:100%; text-align:right;">'.html_print_submit_button(
|
||||
__('Reload'),
|
||||
'submit',
|
||||
false,
|
||||
'class="sub upd"',
|
||||
true
|
||||
).'</div>';
|
||||
|
||||
unset($table);
|
||||
|
||||
$table->id = 'stat_win_form';
|
||||
$table->width = '100%';
|
||||
$table->cellspacing = 2;
|
||||
$table->cellpadding = 2;
|
||||
$table->class = 'databox';
|
||||
// Menu.
|
||||
$menu_form = "<form method='get' action='interface_traffic_graph_win.php'>".html_print_input_hidden('params', base64_encode($params_json), true);
|
||||
|
||||
$data = [];
|
||||
$data[0] = html_print_div(['content' => $form_table, 'style' => 'overflow: auto; height: 220px'], true);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
if (!empty($server_id)) {
|
||||
$menu_form .= html_print_input_hidden('server', $server_id, true);
|
||||
}
|
||||
|
||||
$data = [];
|
||||
$data[0] = '<div style="width:100%; text-align:right;">'.html_print_submit_button(__('Reload'), 'submit', false, 'class="sub upd"', true).'</div>';
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$side_layer_params['body_text'] .= html_print_table($table, true);
|
||||
$side_layer_params['body_text'] .= '</form>';
|
||||
$side_layer_params['body_text'] .= '</div>';
|
||||
// outer
|
||||
// ICONS
|
||||
$side_layer_params['icon_closed'] = '/images/graphmenu_arrow_hide.png';
|
||||
$side_layer_params['icon_open'] = '/images/graphmenu_arrow.png';
|
||||
|
||||
// SIZE
|
||||
$side_layer_params['width'] = 500;
|
||||
|
||||
// POSITION
|
||||
$side_layer_params['position'] = 'left';
|
||||
|
||||
html_print_side_layer($side_layer_params);
|
||||
echo $menu_form;
|
||||
echo '<div class="module_graph_menu_dropdown">
|
||||
<div id="module_graph_menu_header" class="module_graph_menu_header">
|
||||
'.html_print_image('images/arrow_down_green.png', true, ['class' => 'module_graph_menu_arrow', 'float' => 'left'], false, false, true).'
|
||||
<span>'.__('Graph configuration menu').ui_print_help_icon('graphs', true, $config['homeurl'], 'images/help_g.png', true).'</span>
|
||||
'.html_print_image('images/config.png', true, ['float' => 'right'], false, false, true).'
|
||||
</div>
|
||||
<div class="module_graph_menu_content module_graph_menu_content_closed" style="display:none;">'.$form_table.'</div>
|
||||
</div>';
|
||||
echo '</form>';
|
||||
|
||||
// Hidden div to forced title
|
||||
html_print_div(['id' => 'forced_title_layer', 'class' => 'forced_title_layer', 'hidden' => true]);
|
||||
|
@ -341,4 +321,22 @@ ui_include_time_picker(true);
|
|||
$.datepicker.setDefaults($.datepicker.regional["<?php echo $custom_user_language; ?>"]);
|
||||
|
||||
forced_title_callback();
|
||||
|
||||
// Menu.
|
||||
$('#module_graph_menu_header').on('click', function(){
|
||||
var arrow = $('#module_graph_menu_header .module_graph_menu_arrow');
|
||||
var arrow_up = 'arrow_up_green';
|
||||
var arrow_down = 'arrow_down_green';
|
||||
if( $('.module_graph_menu_content').hasClass('module_graph_menu_content_closed')){
|
||||
$('.module_graph_menu_content').show();
|
||||
$('.module_graph_menu_content').removeClass('module_graph_menu_content_closed');
|
||||
arrow.attr('src',arrow.attr('src').replace(arrow_down, arrow_up));
|
||||
}
|
||||
else{
|
||||
$('.module_graph_menu_content').hide();
|
||||
$('.module_graph_menu_content').addClass('module_graph_menu_content_closed');
|
||||
arrow.attr('src',arrow.attr('src').replace(arrow_up, arrow_down));
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -89,7 +89,7 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
|
|||
};
|
||||
</script>
|
||||
</head>
|
||||
<body bgcolor="#ffffff" style='background:#ffffff;'>
|
||||
<body style='background:#ffffff;'>
|
||||
|
||||
<?php
|
||||
echo "<div id='dialog' title='".__('CSV Export Information')."' style='visibility:hidden;'>";
|
||||
|
@ -175,8 +175,9 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
|
|||
|
||||
$unit = db_get_value('unit', 'tagente_modulo', 'id_agente_modulo', $id);
|
||||
|
||||
echo '<div style="margin-left: 65px; padding-top: 10px;">';
|
||||
|
||||
// Graph.
|
||||
echo '<div style="padding-top: 60px;">';
|
||||
$width = '90%';
|
||||
$height = '450';
|
||||
|
||||
|
@ -228,39 +229,16 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
|
|||
|
||||
echo '</div>';
|
||||
|
||||
//
|
||||
// SIDE MENU
|
||||
//
|
||||
$params = [];
|
||||
// TOP TEXT
|
||||
// Use the no_meta parameter because this image is only in the base console
|
||||
$params['top_text'] = "<div style='color: white; width: 100%; text-align: center; font-weight: bold; vertical-align: top;'>".html_print_image('images/wrench_blanco.png', true, ['width' => '16px'], false, false, true).' '.__('Graph configuration menu').ui_print_help_icon('graphs', true, $config['homeurl'], 'images/help_w.png', true).'</div>';
|
||||
$params['body_text'] = "<div class='menu_sidebar_outer'>";
|
||||
$params['body_text'] .= __('Please, make your changes and apply with the <i>Reload</i> button');
|
||||
|
||||
// MENU
|
||||
$params['body_text'] .= '<form method="get" action="stat_win.php">';
|
||||
$params['body_text'] .= html_print_input_hidden('id', $id, true);
|
||||
$params['body_text'] .= html_print_input_hidden('label', $label, true);
|
||||
|
||||
if (!empty($server_id)) {
|
||||
$params['body_text'] .= html_print_input_hidden('server', $server_id, true);
|
||||
}
|
||||
|
||||
if (isset($_GET['type'])) {
|
||||
$type = get_parameter_get('type');
|
||||
$params['body_text'] .= html_print_input_hidden('type', $type, true);
|
||||
}
|
||||
|
||||
// FORM TABLE
|
||||
// FORM TABLE.
|
||||
$table = html_get_predefined_table('transparent', 2);
|
||||
$table->width = '98%';
|
||||
$table->width = '100%';
|
||||
$table->id = 'stat_win_form_div';
|
||||
$table->style[0] = 'text-align:left; padding: 7px;';
|
||||
$table->style[0] = 'text-align:left;';
|
||||
$table->style[1] = 'text-align:left;';
|
||||
// $table->size[0] = '50%';
|
||||
$table->styleTable = 'border-spacing: 4px;';
|
||||
$table->class = 'alternate';
|
||||
$table->styleTable = 'margin-bottom: 20px;';
|
||||
$table->class = 'events_show_more_table';
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Refresh time');
|
||||
|
@ -407,42 +385,29 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
|
|||
true
|
||||
).'</div>';
|
||||
|
||||
unset($table);
|
||||
|
||||
$table = new stdClass();
|
||||
$table->id = 'stat_win_form';
|
||||
$table->width = '100%';
|
||||
$table->cellspacing = 2;
|
||||
$table->cellpadding = 2;
|
||||
$table->class = 'databox';
|
||||
// Menu.
|
||||
$menu_form = "<form method='get' action='stat_win.php'>".html_print_input_hidden('id', $id, true).html_print_input_hidden('label', $label, true);
|
||||
|
||||
$data = [];
|
||||
$data[0] = html_print_div(
|
||||
[
|
||||
'id' => 'field_list',
|
||||
'content' => $form_table,
|
||||
'style' => 'overflow: auto; height: 220px',
|
||||
],
|
||||
true
|
||||
);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
if (!empty($server_id)) {
|
||||
$menu_form .= html_print_input_hidden('server', $server_id, true);
|
||||
}
|
||||
|
||||
$params['body_text'] .= html_print_table($table, true);
|
||||
$params['body_text'] .= '</form>';
|
||||
$params['body_text'] .= '</div>';
|
||||
// outer
|
||||
// ICONS
|
||||
$params['icon_closed'] = '/images/graphmenu_arrow_hide.png';
|
||||
$params['icon_open'] = '/images/graphmenu_arrow.png';
|
||||
if (isset($_GET['type'])) {
|
||||
$type = get_parameter_get('type');
|
||||
$menu_form .= html_print_input_hidden('type', $type, true);
|
||||
}
|
||||
|
||||
// SIZE
|
||||
$params['width'] = 500;
|
||||
|
||||
// POSITION
|
||||
$params['position'] = 'left';
|
||||
|
||||
html_print_side_layer($params);
|
||||
echo $menu_form;
|
||||
echo '<div class="module_graph_menu_dropdown">
|
||||
<div id="module_graph_menu_header" class="module_graph_menu_header">
|
||||
'.html_print_image('images/arrow_down_green.png', true, ['class' => 'module_graph_menu_arrow', 'float' => 'left'], false, false, true).'
|
||||
<span>'.__('Graph configuration menu').ui_print_help_icon('graphs', true, $config['homeurl'], 'images/help_g.png', true).'</span>
|
||||
'.html_print_image('images/config.png', true, ['float' => 'right'], false, false, true).'
|
||||
</div>
|
||||
<div class="module_graph_menu_content module_graph_menu_content_closed" style="display:none;">'.$form_table.'</div>
|
||||
</div>';
|
||||
echo '</form>';
|
||||
|
||||
// Hidden div to forced title
|
||||
html_print_div(
|
||||
|
@ -491,11 +456,21 @@ ui_include_time_picker(true);
|
|||
|
||||
$.datepicker.setDefaults($.datepicker.regional["<?php echo $custom_user_language; ?>"]);
|
||||
|
||||
$(window).ready(function() {
|
||||
$("#field_list").css('height', ($(window).height() - 160) + 'px');
|
||||
// Menu.
|
||||
$('#module_graph_menu_header').on('click', function(){
|
||||
var arrow = $('#module_graph_menu_header .module_graph_menu_arrow');
|
||||
var arrow_up = 'arrow_up_green';
|
||||
var arrow_down = 'arrow_down_green';
|
||||
if( $('.module_graph_menu_content').hasClass('module_graph_menu_content_closed')){
|
||||
$('.module_graph_menu_content').show();
|
||||
$('.module_graph_menu_content').removeClass('module_graph_menu_content_closed');
|
||||
arrow.attr('src',arrow.attr('src').replace(arrow_down, arrow_up));
|
||||
}
|
||||
else{
|
||||
$('.module_graph_menu_content').hide();
|
||||
$('.module_graph_menu_content').addClass('module_graph_menu_content_closed');
|
||||
arrow.attr('src',arrow.attr('src').replace(arrow_up, arrow_down));
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
$("#field_list").css('height', ($(document).height() - 160) + 'px');
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -896,7 +896,7 @@ if ($group_rep == 2) {
|
|||
// Checkbox
|
||||
$data[$i] = html_print_checkbox_extended('validate_ids[]', $event['id_evento'], false, false, false, 'class="chk_val"', true);
|
||||
} else if (isset($table->header[$i]) || true) {
|
||||
$data[$i] = '';
|
||||
$data[$i] = html_print_checkbox_extended('validate_ids[]', $event['id_evento'], false, false, false, 'class="chk_val"', true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -937,11 +937,11 @@ $(document).ready( function() {
|
|||
// Remove delete link (if event is not grouped and there is more than one event)
|
||||
if ($("#group_rep").val() == 1) {
|
||||
if (parseInt($("#count_event_group_"+id).text()) <= 1) {
|
||||
$("#delete-"+id).replaceWith('<img alt="' + <?php echo "'".__('Is not allowed delete events in process')."'"; ?> + '" title="' + <?php echo "'".__('Is not allowed delete events in process')."'"; ?> + '" src="images/cross.disabled.png">');
|
||||
$("#delete-"+id).replaceWith('<img alt=" <?php echo addslashes(__('Is not allowed delete events in process')); ?>" title="<?php echo addslashes(__('Is not allowed delete events in process')); ?>" src="images/cross.disabled.png">');
|
||||
}
|
||||
}
|
||||
else { // Remove delete link (if event is not grouped)
|
||||
$("#delete-"+id).replaceWith('<img alt="' + <?php echo "'".__('Is not allowed delete events in process')."'"; ?> + '" title="' + <?php echo "'".__('Is not allowed delete events in process')."'"; ?> + '" src="images/cross.disabled.png">');
|
||||
$("#delete-"+id).replaceWith('<img alt="<?php echo addslashes(__('Is not allowed delete events in process')); ?> " title="<?php echo addslashes(__('Is not allowed delete events in process')); ?>" src="images/cross.disabled.png">');
|
||||
}
|
||||
|
||||
// Change state image
|
||||
|
@ -1142,10 +1142,10 @@ function validate_event_advanced(id, new_status) {
|
|||
$("#in-progress-"+id).remove();
|
||||
// Format the new disabled delete icon.
|
||||
$("#validate-"+id).parent().append("<img id='delete-" + id + "' src='" + cross_disabled_image + "' />");
|
||||
$("#delete-"+id).attr ("data-title", <?php echo "'".__('Is not allowed delete events in process')."'"; ?>);
|
||||
$("#delete-"+id).attr ("alt", <?php echo "'".__('Is not allowed delete events in process')."'"; ?>);
|
||||
$("#delete-"+id).attr ("data-title", "<?php echo addslashes(__('Is not allowed delete events in process')); ?>");
|
||||
$("#delete-"+id).attr ("alt"," <?php echo addslashes(__('Is not allowed delete events in process')); ?>");
|
||||
$("#delete-"+id).attr ("data-use_title_for_force_title", 1);
|
||||
$("#delete-"+id).attr ("class", "forced_title");
|
||||
$("#delete-"+id).attr ("class", "forced_title");
|
||||
|
||||
// Remove row due to new state
|
||||
if (($("#status").val() == 0)
|
||||
|
@ -1193,4 +1193,4 @@ if ($load_event) {
|
|||
}
|
||||
?>
|
||||
/* ]]> */
|
||||
</script>
|
||||
</script>
|
|
@ -108,6 +108,12 @@ if (!$modules || !$searchModules) {
|
|||
__('WARNING').': '.modules_get_last_value($module['id_agente_modulo']),
|
||||
true
|
||||
);
|
||||
} else if ($status_sql['estado'] == 3) {
|
||||
$statusCell = ui_print_status_image(
|
||||
STATUS_MODULE_UNKNOWN,
|
||||
__('UNKNOWN').': '.modules_get_last_value($module['id_agente_modulo']),
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$last_status = modules_get_agentmodule_last_status($module['id_agente_modulo']);
|
||||
switch ($last_status) {
|
||||
|
|
|
@ -69,9 +69,6 @@ $real_directory = realpath($config['homedir'].'/'.$directory);
|
|||
|
||||
ui_print_info_message(__('MIB files will be installed on the system. Please note that a MIB may depend on other MIB. To customize trap definitions use the SNMP trap editor.'));
|
||||
|
||||
// echo '<h4>' . __('Index of %s', $directory) . '</h4>';
|
||||
$homedir_filemanager = isset($config['homedir_filemanager']) ? $config['homedir_filemanager'] : false;
|
||||
|
||||
filemanager_file_explorer(
|
||||
$real_directory,
|
||||
$directory,
|
||||
|
@ -82,5 +79,5 @@ filemanager_file_explorer(
|
|||
'',
|
||||
false,
|
||||
'',
|
||||
$homedir_filemanager
|
||||
false
|
||||
);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.734
|
||||
%define release 190508
|
||||
%define release 190513
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.734
|
||||
%define release 190508
|
||||
%define release 190513
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.734
|
||||
%define release 190508
|
||||
%define release 190513
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -1158,7 +1158,7 @@ INSERT INTO `tagent_custom_fields` VALUES (1,'Serial Number',0,0,''),(2,'De
|
|||
|
||||
INSERT INTO `ttag` VALUES (1,'network','Network equipment','http://artica.es','',''),(2,'critical','Critical modules','','',''),(3,'dmz','DMZ Network Zone','','',''),(4,'performance','Performance anda capacity modules','','',''),(5,'configuration','','','','');
|
||||
|
||||
INSERT INTO `tevent_response` VALUES (1,'Ping to host','Ping to the agent host','ping -c 5 _agent_address_','command',0,620,500,0,'',0),(3,'Create incident from event','Create a incident from the event with the standard incidents system of Pandora FMS','index.php?sec=workspace&sec2=operation/incidents/incident_detail&insert_form&from_event=_event_id_','url',0,0,0,1,'',0),(4,'Create Integria IMS incident from event','Create a incident from the event with integria incidents system of Pandora FMS. 

Is necessary to enable and configure the Integria incidents in Pandora FMS setup.','index.php?sec=workspace&sec2=operation/integria_incidents/incident&tab=editor&from_event=_event_id_','url',0,0,0,1,'',0),(5,'Restart agent','Restart the agent with using UDP protocol.

To use this response is necessary to have installed Pandora FMS server and console in the same machine.','/usr/share/pandora_server/util/udp_client.pl _agent_address_ 41122 "REFRESH AGENT"','command',0,620,500,0,'',0),(6,'Ping to module agent host','Ping to the module agent host','ping -c 5 _module_address_','command',0,620,500,0,'',0);
|
||||
INSERT INTO `tevent_response` VALUES (1,'Ping to host','Ping to the agent host','ping -c 5 _agent_address_','command',0,620,500,0,'',0),(3,'Create incident from event','Create a incident from the event with the standard incidents system of Pandora FMS','index.php?sec=workspace&sec2=operation/incidents/incident_detail&insert_form&from_event=_event_id_','url',0,0,0,1,'',0),(5,'Restart agent','Restart the agent with using UDP protocol.

To use this response is necessary to have installed Pandora FMS server and console in the same machine.','/usr/share/pandora_server/util/udp_client.pl _agent_address_ 41122 "REFRESH AGENT"','command',0,620,500,0,'',0),(6,'Ping to module agent host','Ping to the module agent host','ping -c 5 _module_address_','command',0,620,500,0,'',0);
|
||||
|
||||
INSERT INTO `tupdate_settings` VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');
|
||||
|
||||
|
@ -1315,4 +1315,4 @@ INSERT INTO `tnotification_source_user`(`id_source`,`id_user`,`enabled`,`also_ma
|
|||
|
||||
INSERT INTO `tnotification_source_group` SELECT `id`,0 FROM `tnotification_source` WHERE `description`="Message";
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.734-190508
|
||||
Version: 7.0NG.734-190513
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.734-190508"
|
||||
pandora_version="7.0NG.734-190513"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -45,7 +45,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.734";
|
||||
my $pandora_build = "190508";
|
||||
my $pandora_build = "190513";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -4238,7 +4238,7 @@ sub get_module_status ($$$) {
|
|||
$critical_str = (defined ($critical_str) && valid_regex ($critical_str) == 1) ? safe_output($critical_str) : '';
|
||||
$warning_str = (defined ($warning_str) && valid_regex ($warning_str) == 1) ? safe_output($warning_str) : '';
|
||||
|
||||
if ($module_type =~ m/_proc$/ && ($critical_min eq $critical_max)) {
|
||||
if (($module_type =~ m/_proc$/ || $module_type =~ /web_analysis/) && ($critical_min eq $critical_max)) {
|
||||
($critical_min, $critical_max) = (0, 1);
|
||||
}
|
||||
elsif ($module_type =~ m/keep_alive/ && ($critical_min eq $critical_max)) {
|
||||
|
|
|
@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.734";
|
||||
my $pandora_build = "190508";
|
||||
my $pandora_build = "190513";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.734
|
||||
%define release 190508
|
||||
%define release 190513
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.734
|
||||
%define release 190508
|
||||
%define release 190513
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.734"
|
||||
PI_BUILD="190508"
|
||||
PI_BUILD="190513"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -34,7 +34,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.734 PS190508";
|
||||
my $version = "7.0NG.734 PS190513";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.734 PS190508";
|
||||
my $version = "7.0NG.734 PS190513";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|