Merge branch 'develop' into ent-9893-nuevo-sistema-de-ha

This commit is contained in:
Daniel Maya 2023-03-13 15:08:44 +01:00
commit b446e89728
192 changed files with 5968 additions and 1191 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.769-230309
Version: 7.0NG.769-230313
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.769-230309"
pandora_version="7.0NG.769-230313"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1023,7 +1023,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.769';
use constant AGENT_BUILD => '230309';
use constant AGENT_BUILD => '230313';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.769
%define release 230309
%define release 230313
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.769
%define release 230309
%define release 230313
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.769"
PI_BUILD="230309"
PI_BUILD="230313"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230309}
{230313}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.769 Build 230309")
#define PANDORA_VERSION ("7.0NG.769 Build 230313")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.769(Build 230309))"
VALUE "ProductVersion", "(7.0NG.769(Build 230313))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.769-230309
Version: 7.0NG.769-230313
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.769-230309"
pandora_version="7.0NG.769-230313"
package_pear=0
package_pandora=1

View File

@ -195,140 +195,183 @@ function extension_api_checker()
);
}
ui_print_page_header(
__('API checker'),
// Header.
ui_print_standard_header(
__('Extensions'),
'images/extensions.png',
false,
'',
true,
''
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('API checker'),
],
]
);
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
$row = [];
$row[] = __('IP');
$row[] = html_print_input_text('ip', $ip, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('IP'),
html_print_input_text('ip', $ip, '', 50, 255, true)
);
$row[] = html_print_label_input_block(
__('%s Console URL', get_product_name()),
html_print_input_text('pandora_url', $pandora_url, '', 50, 255, true)
);
$table->data[] = $row;
$row = [];
$row[] = __('%s Console URL', get_product_name());
$row[] = html_print_input_text('pandora_url', $pandora_url, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('API Token').ui_print_help_tip(__('Use API Token instead API Pass, User and Password.'), true),
html_print_input_text('token', $token, '', 50, 255, true)
);
$row[] = html_print_label_input_block(
__('API Pass'),
html_print_input_password('apipass', $apipass, '', 50, 255, true)
);
$table->data[] = $row;
$row = [];
$row[] = __('API Token').ui_print_help_tip(__('Use API Token instead API Pass, User and Password.'), true);
$row[] = html_print_input_text('token', $token, '', 50, 255, true);
$table->data[] = $row;
$row[] = html_print_label_input_block(
__('User'),
html_print_input_text('user', $user, '', 50, 255, true)
);
$row = [];
$row[] = __('API Pass');
$row[] = html_print_input_password('apipass', $apipass, '', 50, 255, true);
$table->data[] = $row;
$row = [];
$row[] = __('User');
$row[] = html_print_input_text('user', $user, '', 50, 255, true);
$table->data[] = $row;
$row = [];
$row[] = __('Password');
$row[] = html_print_input_password('password', $password, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('Password'),
html_print_input_password('password', $password, '', 50, 255, true)
);
$table->data[] = $row;
$table2 = new stdClass();
$table2->width = '100%';
$table2->class = 'databox filters filter-table-adv';
$table2->size[0] = '50%';
$table2->size[1] = '50%';
$table2->data = [];
$row = [];
$row[] = __('Action (get or set)');
$row[] = html_print_input_text('op', $op, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('Action (get or set)'),
html_print_input_text('op', $op, '', 50, 255, true)
);
$row[] = html_print_label_input_block(
__('Operation'),
html_print_input_text('op2', $op2, '', 50, 255, true)
);
$table2->data[] = $row;
$row = [];
$row[] = __('Operation');
$row[] = html_print_input_text('op2', $op2, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('ID'),
html_print_input_text('id', $id, '', 50, 255, true)
);
$row[] = html_print_label_input_block(
__('ID 2'),
html_print_input_text('id2', $id2, '', 50, 255, true)
);
$table2->data[] = $row;
$row = [];
$row[] = __('ID');
$row[] = html_print_input_text('id', $id, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('Return Type'),
html_print_input_text('return_type', $return_type, '', 50, 255, true)
);
$row[] = html_print_label_input_block(
__('Other'),
html_print_input_text('other', $other, '', 50, 255, true)
);
$table2->data[] = $row;
$row = [];
$row[] = __('ID 2');
$row[] = html_print_input_text('id2', $id2, '', 50, 255, true);
$table2->data[] = $row;
$row = [];
$row[] = __('Return Type');
$row[] = html_print_input_text('return_type', $return_type, '', 50, 255, true);
$table2->data[] = $row;
$row = [];
$row[] = __('Other');
$row[] = html_print_input_text('other', $other, '', 50, 255, true);
$table2->data[] = $row;
$row = [];
$row[] = __('Other Mode');
$row[] = html_print_input_text('other_mode', $other_mode, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('Other Mode'),
html_print_input_text('other_mode', $other_mode, '', 50, 255, true)
);
$table2->data[] = $row;
$table3 = new stdClass();
$table3->width = '100%';
$table3->class = 'databox filters filter-table-adv';
$table3->size[0] = '50%';
$table3->size[1] = '50%';
$table3->data = [];
$row = [];
$row[] = __('Raw URL');
$row[] = html_print_input_text('url', $url, '', 50, 2048, true);
$row[] = html_print_label_input_block(
__('Raw URL'),
html_print_input_text('url', $url, '', 50, 2048, true)
);
$table3->data[] = $row;
echo "<form method='post'>";
echo '<fieldset>';
echo "<form method='post' class='max_floating_element_size'>";
echo '<fieldset class="mrgn_btn_10px">';
echo '<legend>'.__('Credentials').'</legend>';
html_print_table($table);
echo '</fieldset>';
echo '<fieldset>';
echo '<fieldset class="mrgn_btn_10px">';
echo '<legend>'.__('Call parameters').' '.ui_print_help_tip(__('Action: get Operation: module_last_value id: 63'), true).'</legend>';
html_print_table($table2);
echo '</fieldset>';
echo "<div class='right'>";
echo '</div>';
echo '<fieldset>';
echo '<fieldset class="mrgn_btn_10px">';
echo '<legend>'.__('Custom URL').'</legend>';
html_print_table($table3);
echo '</fieldset>';
html_print_input_hidden('api_execute', 1);
html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Call'),
'submit',
false,
[ 'icon' => 'next' ],
true
),
]
html_print_action_buttons(
html_print_submit_button(
__('Call'),
'submit',
false,
[ 'icon' => 'next' ],
true
)
);
echo '</form>';
if ($api_execute === true) {
echo '<fieldset>';
echo '<fieldset class="mrgn_0px mrgn_btn_10px pdd_15px" style="max-width: 1122px;">';
echo '<legend>'.__('Result').'</legend>';
echo __('URL').'<br />';
html_print_input_password('url', $return_call_api['url'], '', 150, 255, false, true);
echo "&nbsp;<a id='show_icon' title='".__('Show URL')."' href='javascript: show_url();'>";
html_print_image('images/input_zoom.png');
echo '</a>';
echo html_print_label_input_block(
__('URL'),
html_print_input_password('url', $return_call_api['url'], '', 150, 255, true, true, false, 'mrgn_top_10px'),
['label_class' => 'font-title-font']
);
echo '<br />';
echo __('Result').'<br />';
html_print_textarea('result', 30, 20, $return_call_api['result'], 'readonly="readonly"');
echo html_print_label_input_block(
__('Result'),
html_print_textarea('result', 30, 20, $return_call_api['result'], 'readonly="readonly"', true, 'w100p mrgn_top_10px'),
['label_class' => 'font-title-font']
);
echo '</fieldset>';
}
?>

View File

@ -21,13 +21,23 @@ function extension_db_status()
$db_name = get_parameter('db_name', '');
$db_status_execute = (bool) get_parameter('db_status_execute', false);
ui_print_page_header(
ui_print_standard_header(
__('DB Schema check'),
'images/extensions.png',
false,
'db_status_tab',
true,
''
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Run test'),
],
]
);
if (!is_user_admin($config['id_user'])) {
@ -46,38 +56,86 @@ function extension_db_status()
__('At the moment the checks is for MySQL/MariaDB.')
);
echo "<form method='post'>";
echo "<form method='post' class='max_floating_element_size'>";
echo '<fieldset>';
echo '<legend>'.__('DB settings').'</legend>';
$table = new stdClass();
$table->data = [];
$row = [];
$row[] = __('DB User with privileges');
$row[] = html_print_input_text('db_user', $db_user, '', 50, 255, true);
$row[] = __('DB Password for this user');
$row[] = html_print_input_password('db_password', $db_password, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('DB User with privileges'),
html_print_input_text(
'db_user',
$db_user,
'',
50,
255,
true,
false,
false,
'',
'w100p mrgn_top_10px'
)
);
$row[] = html_print_label_input_block(
__('DB Password for this user'),
html_print_input_password(
'db_password',
$db_password,
'',
50,
255,
true,
false,
false,
'w100p mrgn_top_10px'
)
);
$table->data[] = $row;
$row = [];
$row[] = __('DB Hostname');
$row[] = html_print_input_text('db_host', $db_host, '', 50, 255, true);
$row[] = __('DB Name (temporal for testing)');
$row[] = html_print_input_text('db_name', $db_name, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('DB Hostname'),
html_print_input_text(
'db_host',
$db_host,
'',
50,
255,
true,
false,
false,
'',
'w100p mrgn_top_10px'
)
);
$row[] = html_print_label_input_block(
__('DB Name (temporal for testing)'),
html_print_input_text(
'db_name',
$db_name,
'',
50,
255,
true,
false,
false,
'',
'w100p mrgn_top_10px'
)
);
$table->data[] = $row;
html_print_table($table);
echo '</fieldset>';
html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Execute Test'),
'submit',
false,
[ 'icon' => 'cog' ],
true
),
]
html_print_action_buttons(
html_print_submit_button(
__('Execute Test'),
'submit',
false,
[ 'icon' => 'cog' ],
true
)
);
html_print_input_hidden('db_status_execute', 1);

View File

@ -132,47 +132,37 @@ function dbmgr_extension_main()
echo $warning_message;
}
ui_print_warning_message(
__(
"This is an advanced extension to interface with %s database directly from WEB console
using native SQL sentences. Please note that <b>you can damage</b> your %s installation
if you don't know </b>exactly</b> what are you are doing,
this means that you can severily damage your setup using this extension.
This extension is intended to be used <b>only by experienced users</b>
with a depth knowledge of %s internals.",
get_product_name(),
get_product_name(),
get_product_name()
)
);
echo "<form method='post' action=''>";
$table = new stdClass();
$table->id = 'db_interface';
$table->class = 'databox';
$table->class = 'databox no_border filter-table-adv';
$table->width = '100%';
$table->data = [];
$table->head = [];
$table->colspan = [];
$table->rowstyle = [];
$table->style[0] = 'width: 30%;';
$table->style[1] = 'width: 70%;';
$table->colspan[0][0] = 2;
$table->colspan[1][0] = 2;
$table->rowspan[2][0] = 3;
$table->rowclass[0] = 'notify';
$table->rowclass[3] = 'pdd_5px';
$table->rowclass[3] = 'flex-content-right';
$table->rowclass[4] = 'flex-content-right';
$data[0][0] = __(
"This is an advanced extension to interface with %s database directly from WEB console
using native SQL sentences. Please note that <b>you can damage</b> your %s installation
if you don't know </b>exactly</b> what are you are doing,
this means that you can severily damage your setup using this extension.
This extension is intended to be used <b>only by experienced users</b>
with a depth knowledge of %s internals.",
get_product_name(),
get_product_name(),
get_product_name()
);
$data[1][0] = "Some samples of usage: <blockquote><em>SHOW STATUS;<br />DESCRIBE tagente<br />SELECT * FROM tserver<br />UPDATE tagente SET id_grupo = 15 WHERE nombre LIKE '%194.179%'</em></blockquote>";
$data[2][0] = html_print_textarea(
'sql',
5,
50,
html_entity_decode($sql, ENT_QUOTES),
'',
true
$data[0][0] = "<b>Some samples of usage:</b> <blockquote><em>SHOW STATUS;<br />DESCRIBE tagente<br />SELECT * FROM tserver<br />UPDATE tagente SET id_grupo = 15 WHERE nombre LIKE '%194.179%'</em></blockquote>";
$data[0][0] = html_print_label_input_block(
__('Some samples of usage:'),
"<blockquote><em>SHOW STATUS;<br />DESCRIBE tagente<br />SELECT * FROM tserver<br />UPDATE tagente SET id_grupo = 15 WHERE nombre LIKE '%194.179%'</em></blockquote>"
);
if (is_metaconsole() === true) {
@ -191,35 +181,57 @@ function dbmgr_extension_main()
$servers = [];
}
$data[3][2] = html_print_input(
[
'name' => 'node_id',
'type' => 'select',
'fields' => $servers,
'selected' => $node_id,
'nothing' => __('This metaconsole'),
'nothing_value' => -1,
'return' => true,
'label' => _('Select query target'),
]
$data[0][1] = html_print_label_input_block(
__('Select query target'),
html_print_select(
$servers,
'node_id',
$node_id,
'',
__('This metaconsole'),
-1,
true,
false,
false,
'w40p',
false,
'width: 40%;'
)
);
}
$data[4][2] = html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Execute SQL'),
'',
false,
[ 'icon' => 'cog' ],
true
),
]
$data[1][0] = html_print_textarea(
'sql',
3,
50,
html_entity_decode($sql, ENT_QUOTES),
'placeholder="'.__('Type your query here...').'"',
true,
'w100p'
);
$execute_button = html_print_submit_button(
__('Execute SQL'),
'',
false,
[ 'icon' => 'cog' ],
true
);
$table->data = $data;
html_print_table($table);
// html_print_table($table);
html_print_action_buttons($execute_button);
ui_toggle(
html_print_table($table, true),
'<span class="subsection_header_title">'.__('SQL query').'</span>',
__('SQL query'),
'query',
false,
false,
'',
'white-box-content no_border',
'box-flat white_table_graph fixed_filter_bar'
);
echo '</form>';
// Processing SQL Code.
@ -227,10 +239,6 @@ function dbmgr_extension_main()
return;
}
echo '<br />';
echo '<hr />';
echo '<br />';
try {
if (\is_metaconsole() === true && $node_id !== -1) {
$node = new Node($node_id);

View File

@ -24,7 +24,6 @@ table.dbmanager th {
}
textarea {
min-height: 50px;
height: 50px;
width: 95%;
width: 100% !important;
max-width: 100% !important;
}

View File

@ -25,13 +25,28 @@ function extension_uploader_extensions()
return;
}
ui_print_page_header(
__('Uploader extension'),
// Header.
ui_print_standard_header(
__('Extensions'),
'images/extensions.png',
false,
'',
true,
''
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('Uploader extension'),
],
]
);
$upload = (bool) get_parameter('upload', 0);
@ -77,20 +92,52 @@ function extension_uploader_extensions()
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->size[0] = '20%';
$table->size[1] = '20%';
$table->size[2] = '60%';
$table->data = [];
$table->data[0][0] = __('Upload extension');
$table->data[0][1] = html_print_input_file('extension', true).ui_print_help_tip(__('Upload the extension as a zip file.'), true);
$table->data[0][0] = html_print_label_input_block(
__('Upload extension').ui_print_help_tip(__('Upload the extension as a zip file.'), true),
html_print_input_file(
'extension',
true,
[
'required' => true,
'accept' => '.zip',
]
)
);
if (enterprise_installed()) {
$table->data[0][2] = __('Upload enterprise extension').'&nbsp;'.html_print_checkbox('upload_enterprise', 1, false, true);
$table->data[0][1] = html_print_label_input_block(
__('Upload enterprise extension'),
html_print_checkbox(
'upload_enterprise',
1,
false,
true
)
);
} else {
$table->data[0][1] = '';
}
$table->data[0][2] = '';
echo "<form method='post' enctype='multipart/form-data'>";
html_print_table($table);
echo "<div class='right' style='width: ".$table->width."'>";
html_print_input_hidden('upload', 1);
html_print_submit_button(__('Upload'), 'submit', false, 'class="sub add"');
echo '</div>';
html_print_action_buttons(
html_print_submit_button(
__('Upload'),
'submit',
false,
['icon' => 'wand'],
true
)
);
echo '</form>';
}

View File

@ -115,19 +115,41 @@ function pandora_files_repo_godmode()
}
// Header tabs.
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/setup.png', true, ['title' => __('Administration view'), 'class' => 'invert_filter']).'</a>';
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Administration view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$godmode['godmode'] = 1;
$godmode['active'] = 1;
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/eye_show.png', true, ['title' => __('Operation view'), 'class' => 'invert_filter']).'</a>';
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/see-details@svg.svg', true, ['title' => __('Operation view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$operation['operation'] = 1;
$onheader = [
'godmode' => $godmode,
'operation' => $operation,
];
// Header.
ui_print_page_header(__('Files repository manager'), 'images/extensions.png', false, '', true, $onheader);
ui_print_standard_header(
__('Extensions'),
'images/extensions.png',
false,
'',
true,
$onheader,
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('Files repository manager'),
],
]
);
$full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
include_once $full_extensions_dir.'files_repo/functions_files_repo.php';
@ -204,10 +226,10 @@ function pandora_files_repo_operation()
// Header tabs.
$onheader = [];
if (check_acl($config['id_user'], 0, 'PM')) {
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/setup.png', true, ['title' => __('Administration view'), 'class' => 'invert_filter']).'</a>';
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Administration view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$godmode['godmode'] = 1;
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/eye_show.png', true, ['title' => __('Operation view'), 'class' => 'invert_filter']).'</a>';
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/see-details@svg.svg', true, ['title' => __('Operation view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$operation['operation'] = 1;
$operation['active'] = 1;

View File

@ -32,17 +32,15 @@ if (isset($file_id) && $file_id > 0) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->style = [];
$table->style[0] = 'font-weight: bold;';
$table->style[2] = 'text-align: center;';
$table->colspan = [];
$table->class = 'databox filters filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
// GROUPS
// GROUPS.
$groups = groups_get_all();
// Add the All group to the beginning to be always the first
// Use this instead array_unshift to keep the array keys
// Add the All group to the beginning to be always the first.
// Use this instead array_unshift to keep the array keys.
$groups = ([0 => __('All')] + $groups);
$groups_selected = [];
foreach ($groups as $id => $name) {
@ -52,66 +50,110 @@ foreach ($groups as $id => $name) {
}
$row = [];
$row[0] = __('Groups');
$row[1] = '<div class="w290px">'.html_print_select_groups(
// Id_user.
false,
// Privilege.
'AR',
// ReturnAllGroup.
true,
// Name.
'groups[]',
// Selected.
$groups_selected,
// Script.
'',
// Nothing.
'',
// Nothing_value.
0,
// Return.
true,
// Multiple.
true
).'</div>';
$table->data[] = $row;
$table->colspan[][1] = 3;
$row[0] = html_print_label_input_block(
__('Groups'),
html_print_select_groups(
// Id_user.
false,
// Privilege.
'AR',
// ReturnAllGroup.
true,
// Name.
'groups[]',
// Selected.
$groups_selected,
// Script.
'',
// Nothing.
'',
// Nothing_value.
0,
// Return.
true,
// Multiple.
true
)
);
// DESCRIPTION
$row = [];
$row[0] = __('Description');
$row[0] .= ui_print_help_tip(__('Only 200 characters are permitted'), true);
$row[1] = html_print_textarea('description', 3, 20, $file['description'], 'class="file_repo_description"', true);
// DESCRIPTION.
$row[1] = html_print_label_input_block(
__('Description').ui_print_help_tip(__('Only 200 characters are permitted'), true),
html_print_textarea(
'description',
4,
20,
$file['description'],
'class="file_repo_description" style="min-height: 60px; max-height: 60px;"',
true
)
);
$table->data[] = $row;
$table->colspan[][1] = 3;
// FILE and SUBMIT BUTTON
// FILE and SUBMIT BUTTON.
$row = [];
// Public checkbox
// Public checkbox.
$checkbox = html_print_checkbox('public', 1, (bool) !empty($file['hash']), true);
$style = 'class="inline padding-2-10"';
$row[0] = __('File');
if ($file_id > 0) {
$row[1] = $file['name'];
$row[2] = "<div $style>".__('Public link')."&nbsp;$checkbox</div>";
$row[3] = html_print_submit_button(__('Update'), 'submit', false, 'class="sub upd"', true);
$row[3] .= html_print_input_hidden('update_file', 1, true);
$row[3] .= html_print_input_hidden('file_id', $file_id, true);
$submit_button = html_print_submit_button(
__('Update'),
'submit',
false,
['icon' => 'wand'],
true
);
$row[0] = html_print_label_input_block(
__('File'),
$file['name']
);
$row[1] = html_print_label_input_block(
__('Public link'),
$checkbox.html_print_input_hidden(
'file_id',
$file_id,
true
)
);
} else {
$row[1] = html_print_input_file('upfile', true);
$row[2] = "<div $style>".__('Public link')."&nbsp;$checkbox</div>";
$row[3] = html_print_submit_button(__('Add'), 'submit', false, 'class="sub add"', true);
$row[3] .= html_print_input_hidden('add_file', 1, true);
$submit_button = html_print_submit_button(
__('Add'),
'submit',
false,
['icon' => 'wand'],
true
);
$row[0] = html_print_label_input_block(
__('File'),
html_print_input_file(
'upfile',
true
)
);
$row[1] = html_print_label_input_block(
__('Public link'),
$checkbox.html_print_input_hidden(
'add_file',
1,
true
)
);
}
$table->data[] = $row;
$table->colspan[][1] = 1;
$url = ui_get_full_url('index.php?sec=godmode/extensions&sec2=extensions/files_repo');
echo "<form method='post' action='$url' enctype='multipart/form-data'>";
html_print_table($table);
html_print_action_buttons($submit_button);
echo '</form>';
?>

View File

@ -133,9 +133,12 @@ if (!empty($files)) {
);
$data[4] .= "<a href=\"$config_url\">";
$data[4] .= html_print_image(
'images/config.png',
'images/edit.svg',
true,
['title' => __('Edit')]
[
'title' => __('Edit'),
'class' => 'main_menu_icon invert_filter',
]
);
// Edit image
$data[4] .= '</a>';
@ -145,11 +148,11 @@ if (!empty($files)) {
);
$data[4] .= " <a href=\"$delete_url\" onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\">";
$data[4] .= html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
// Delete image

View File

@ -11,11 +11,12 @@
// 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.
function view_logfile($file_name)
function view_logfile($file_name, $toggle=false)
{
global $config;
$memory_limit = ini_get('memory_limit');
$code = '';
if (strstr($memory_limit, 'M') !== false) {
$memory_limit = str_replace('M', '', $memory_limit);
@ -31,21 +32,37 @@ function view_logfile($file_name)
$file_size = filesize($file_name);
if ($memory_limit < $file_size) {
echo "<h2>$file_name (".__('File is too large than PHP memory allocated in the system.').')</h2>';
echo '<h2>'.__('The preview file is imposible.').'</h2>';
$code .= '<pre><h2>'.$file_name.' ('.__('File is too large than PHP memory allocated in the system.').')</h2>';
$code .= '<h2>'.__('The preview file is imposible.').'</h2>';
} else if ($file_size > ($config['max_log_size'] * 1000)) {
$data = file_get_contents($file_name, false, null, ($file_size - ($config['max_log_size'] * 1000)));
echo "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) '.ui_print_help_tip(__('The folder /var/log/pandora must have pandora:apache and its content too.'), true).' </h2>';
echo "<textarea class='pandora_logs' name='$file_name'>";
echo '... ';
echo $data;
echo '</textarea><br><br>';
$code .= "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) '.ui_print_help_tip(__('The folder /var/log/pandora must have pandora:apache and its content too.'), true).' </h2>';
$code .= "<textarea class='pandora_logs' name='$file_name'>";
$code .= '... ';
$code .= $data;
$code .= '</textarea><br><br>';
} else {
$data = file_get_contents($file_name);
echo "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) '.ui_print_help_tip(__('The folder /var/log/pandora must have pandora:apache and its content too.'), true).' </h2>';
echo "<textarea class='pandora_logs' name='$file_name'>";
echo $data;
echo '</textarea><br><br>';
$code .= "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) '.ui_print_help_tip(__('The folder /var/log/pandora must have pandora:apache and its content too.'), true).' </h2>';
$code .= "<textarea class='pandora_logs' name='$file_name'>";
$code .= $data;
$code .= '</textarea><br><br></pre>';
}
if ($toggle === true) {
ui_toggle(
$code,
'<span class="subsection_header_title">'.$file_name.'</span>',
$file_name,
'a',
false,
false,
'',
'white-box-content no_border',
'filter-datatable-main box-flat white_table_graph'
);
} else {
echo $code;
}
}
}
@ -64,21 +81,45 @@ function pandoralogs_extension_main()
return;
}
ui_print_page_header(__('System logfile viewer'), 'images/extensions.png', false, '', true, '');
// Header.
ui_print_standard_header(
__('Extensions'),
'images/extensions.png',
false,
'',
true,
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('System logfile viewer'),
],
]
);
echo '<p>'.__('Use this tool to view your %s logfiles directly on the console', get_product_name()).'</p>';
echo '<p>'.__('You can choose the amount of information shown in general setup (Log size limit in system logs viewer extension), '.($config['max_log_size'] * 1000).'B at the moment').'</p>';
ui_print_info_message(
__('Use this tool to view your %s logfiles directly on the console', get_product_name()).'<br>
'.__('You can choose the amount of information shown in general setup (Log size limit in system logs viewer extension), '.($config['max_log_size'] * 1000).'B at the moment')
);
$logs_directory = (!empty($config['server_log_dir'])) ? io_safe_output($config['server_log_dir']) : '/var/log/pandora';
// Do not attempt to show console log if disabled.
if ($config['console_log_enabled']) {
view_logfile($config['homedir'].'/log/console.log');
view_logfile($config['homedir'].'/log/console.log', true);
}
view_logfile($logs_directory.'/pandora_server.log');
view_logfile($logs_directory.'/pandora_server.error');
view_logfile($logs_directory.'/pandora_server.log', true);
view_logfile($logs_directory.'/pandora_server.error', true);
}

View File

@ -96,4 +96,72 @@ CREATE INDEX idx_disabled ON talert_template_modules (disabled);
INSERT INTO `treport_custom_sql` (`name`, `sql`) VALUES ('Agent&#x20;safe&#x20;mode&#x20;not&#x20;enable', 'select&#x20;alias&#x20;from&#x20;tagente&#x20;where&#x20;safe_mode_module&#x20;=&#x20;0');
CREATE TABLE IF NOT EXISTS `twelcome_tip` (
`id` INT NOT NULL AUTO_INCREMENT,
`id_lang` VARCHAR(20) NULL,
`id_profile` INT NOT NULL,
`title` VARCHAR(255) NOT NULL,
`text` TEXT NOT NULL,
`url` VARCHAR(255) NULL,
`enable` TINYINT NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE IF NOT EXISTS `twelcome_tip_file` (
`id` INT NOT NULL AUTO_INCREMENT,
`twelcome_tip_file` INT NOT NULL,
`filename` VARCHAR(255) NOT NULL,
`path` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `twelcome_tip_file`
FOREIGN KEY (`twelcome_tip_file`)
REFERENCES `twelcome_tip` (`id`)
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
INSERT INTO `twelcome_tip` VALUES
(1,'es',0,'¿Sab&iacute;as&#x20;que&#x20;puedes&#x20;monitorizar&#x20;webs?','De&#x20;manera&#x20;sencilla&#x20;a&#x20;trav&eacute;s&#x20;de&#x20;chequeos&#x20;HTTP&#x20;est&aacute;ndar&#x20;o&#x20;transaccional&#x20;mediante&#x20;transacciones&#x20;centralizadas&#x20;WUX,&#x20;o&#x20;descentralizadas&#x20;con&#x20;el&#x20;plugin&#x20;UX&#x20;de&#x20;agente.','https://pandorafms.com/manual/es/documentation/03_monitoring/06_web_monitoring','1'),
(2,'es',0,'Monitorizaci&oacute;n&#x20;remota&#x20;de&#x20;dispositivos&#x20;SNMP','Los&#x20;dispositivos&#x20;de&#x20;red&#x20;como&#x20;switches,&#x20;AP,&#x20;routers&#x20;y&#x20;firewalls&#x20;se&#x20;pueden&#x20;monitorizar&#x20;remotamente&#x20;usando&#x20;el&#x20;protocolo&#x20;SNMP.&#x20;Basta&#x20;con&#x20;saber&#x20;su&#x20;IP,&#x20;la&#x20;comunidad&#x20;SNMP&#x20;y&#x20;lanzar&#x20;un&#x20;wizard&#x20;SNMP&#x20;desde&#x20;la&#x20;consola.','https://pandorafms.com/manual/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_snmp','1'),
(3,'es',0,'Monitorizar&#x20;rutas&#x20;desde&#x20;una&#x20;IP&#x20;a&#x20;otra','Existe&#x20;un&#x20;plugin&#x20;especial&#x20;que&#x20;sirve&#x20;para&#x20;monitorizar&#x20;visualmente&#x20;las&#x20;rutas&#x20;desde&#x20;una&#x20;IP&#x20;a&#x20;otra&#x20;de&#x20;manera&#x20;visual&#x20;y&#x20;din&aacute;mica,&#x20;seg&uacute;n&#x20;va&#x20;cambiando&#x20;con&#x20;el&#x20;tiempo.','https://pandorafms.com/manual/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_de_rutas','1'),
(4,'es',0,'¿Tu&#x20;red&#x20;pierde&#x20;paquetes?','Se&#x20;puede&#x20;medir&#x20;la&#x20;p&eacute;rdida&#x20;de&#x20;paquetes&#x20;en&#x20;tu&#x20;red&#x20;usando&#x20;un&#x20;agente&#x20;y&#x20;un&#x20;plugin&#x20;libre&#x20;llamado&#x20;&ldquo;Packet&#x20;Loss&rdquo;.&#x20;Esto&#x20;es&#x20;especialmente&#x20;&uacute;til&#x20;en&#x20;redes&#x20;Wifi&#x20;o&#x20;redes&#x20;compartidas&#x20;con&#x20;muchos&#x20;usuarios.&#x20;Escribimos&#x20;un&#x20;art&iacute;culo&#x20;en&#x20;nuestro&#x20;blog&#x20;hablando&#x20;de&#x20;ello,&#x20;echale&#x20;un&#x20;vistazo','https://pandorafms.com/blog/es/perdida-de-paquetes/','1'),
(5,'es',0,'Usar&#x20;Telegram&#x20;con&#x20;Pandora&#x20;FMS','Perfecto&#x20;para&#x20;recibir&#x20;alertas&#x20;con&#x20;gr&aacute;ficas&#x20;empotradas&#x20;y&#x20;personalizar&#x20;as&iacute;&#x20;la&#x20;recepci&oacute;n&#x20;de&#x20;avisos&#x20;de&#x20;manera&#x20;individual&#x20;o&#x20;en&#x20;un&#x20;canal&#x20;com&uacute;n&#x20;con&#x20;mas&#x20;personas.&#x20;','https://pandorafms.com/library/telegram-bot-cli/','1'),
(6,'es',0,'Monitorizar&#x20;JMX&#x20;&#40;Tomcat,&#x20;Websphere,&#x20;Weblogic,&#x20;Jboss,&#x20;Apache&#x20;Kafka,&#x20;Jetty,&#x20;GlassFish&hellip;&#41;','Existe&#x20;un&#x20;plugin&#x20;Enterprise&#x20;que&#x20;sirve&#x20;para&#x20;monitorizar&#x20;cualquier&#x20;tecnolog&iacute;a&#x20;JMX.&#x20;Se&#x20;puede&#x20;usar&#x20;de&#x20;manera&#x20;local&#x20;&#40;como&#x20;plugin&#x20;local&#41;&#x20;o&#x20;de&#x20;manera&#x20;remota&#x20;con&#x20;el&#x20;plugin&#x20;server.','https://pandorafms.com/library/jmx-monitoring/','1'),
(7,'es',0,'¿Sabes&#x20;que&#x20;cada&#x20;usuario&#x20;puede&#x20;tener&#x20;su&#x20;propia&#x20;Zona&#x20;Horaria?','Se&#x20;puede&#x20;establecer&#x20;zonas&#x20;horarias&#x20;diferentes&#x20;para&#x20;cada&#x20;usuario,&#x20;de&#x20;manera&#x20;que&#x20;interprete&#x20;los&#x20;datos&#x20;teniendo&#x20;en&#x20;cuenta&#x20;la&#x20;diferencia&#x20;horaria.&#x20;Pandora&#x20;FMS&#x20;tambi&eacute;n&#x20;puede&#x20;tener&#x20;servidores&#x20;y&#x20;agentes&#x20;en&#x20;diferentes&#x20;zonas&#x20;horarias.&#x20;¡Por&#x20;todo&#x20;el&#x20;mundo!','','1'),
(8,'es',0,'Paradas&#x20;planificadas','Se&#x20;puede&#x20;definir,&#x20;a&#x20;nivel&#x20;de&#x20;agente&#x20;y&#x20;a&#x20;nivel&#x20;de&#x20;m&oacute;dulo,&#x20;per&iacute;odos&#x20;en&#x20;los&#x20;cuales&#x20;se&#x20;ignoren&#x20;las&#x20;alertas&#x20;y/o&#x20;los&#x20;datos&#x20;recogidos.&#x20;Es&#x20;perfecto&#x20;para&#x20;planificar&#x20;paradas&#x20;de&#x20;servicio&#x20;o&#x20;desconexi&oacute;n&#x20;de&#x20;los&#x20;sistemas&#x20;monitorizados.&#x20;Tambi&eacute;n&#x20;afecta&#x20;a&#x20;los&#x20;informes&#x20;SLA,&#x20;evitando&#x20;que&#x20;se&#x20;tengan&#x20;en&#x20;cuenta&#x20;esos&#x20;intervalos&#x20;de&#x20;tiempo.&#x20;&#x20;&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/11_managing_and_administration#paradas_de_servicio_planificadas','1'),
(9,'es',0,'Personalizar&#x20;los&#x20;emails&#x20;de&#x20;alerta&#x20;','¿Sab&iacute;as&#x20;que&#x20;se&#x20;pueden&#x20;personalizar&#x20;los&#x20;mails&#x20;de&#x20;alertas&#x20;de&#x20;Pandora?&#x20;Solo&#x20;tienes&#x20;que&#x20;editar&#x20;el&#x20;c&oacute;digo&#x20;HTML&#x20;por&#x20;defecto&#x20;de&#x20;las&#x20;acciones&#x20;de&#x20;alerta&#x20;de&#x20;tipo&#x20;email.&#x20;&#x20;','https://pandorafms.com/manual/en/documentation/04_using/01_alerts#editing_an_action','1'),
(10,'es',0,'Usando&#x20;iconos&#x20;personalizados&#x20;en&#x20;consolas&#x20;visuales&#x20;','Gracias&#x20;a&#x20;los&#x20;iconos&#x20;personalizados&#x20;se&#x20;pueden&#x20;crear&#x20;vistas&#x20;muy&#x20;personalizadas,&#x20;como&#x20;la&#x20;de&#x20;la&#x20;imagen,&#x20;que&#x20;representa&#x20;racks&#x20;con&#x20;los&#x20;tipos&#x20;de&#x20;servidores&#x20;en&#x20;el&#x20;orden&#x20;que&#x20;est&aacute;n&#x20;colocados&#x20;dentro&#x20;del&#x20;rack.&#x20;Perfecto&#x20;para&#x20;que&#x20;un&#x20;t&eacute;cnico&#x20;sepa&#x20;exactamente&#x20;qu&eacute;&#x20;m&aacute;quina&#x20;esta&#x20;fallando.&#x20;M&aacute;s&#x20;visual&#x20;no&#x20;puede&#x20;ser,&#x20;de&#x20;ahi&#x20;el&#x20;nombre.&#x20;&#x20;','https://pandorafms.com/manual/start?id=es/documentation/04_using/05_data_presentation_visual_maps','1'),
(11,'es',0,'Consolas&#x20;visuales:&#x20;mapas&#x20;de&#x20;calor&#x20;','La&#x20;consola&#x20;permite&#x20;integrar&#x20;en&#x20;un&#x20;fondo&#x20;personalizado&#x20;una&#x20;serie&#x20;de&#x20;datos,&#x20;que&#x20;en&#x20;funci&oacute;n&#x20;de&#x20;su&#x20;valor&#x20;se&#x20;representen&#x20;con&#x20;unos&#x20;colores&#x20;u&#x20;otros,&#x20;en&#x20;tiempo&#x20;real.&#x20;Las&#x20;aplicaciones&#x20;son&#x20;infinitas,&#x20;solo&#x20;depende&#x20;de&#x20;tu&#x20;imaginaci&oacute;n.&#x20;&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/05_data_presentation_visual_maps#mapa_de_calor_o_nube_de_color','1'),
(12,'es',0,'Auditor&iacute;a&#x20;interna&#x20;de&#x20;la&#x20;consola&#x20;','La&#x20;consola&#x20;registra&#x20;todas&#x20;las&#x20;actividades&#x20;relevantes&#x20;de&#x20;cada&#x20;usuario&#x20;conectado&#x20;a&#x20;la&#x20;consola.&#x20;Esto&#x20;incluye&#x20;la&#x20;aplicaci&oacute;n&#x20;de&#x20;configuraciones,&#x20;validaciones&#x20;de&#x20;eventos&#x20;y&#x20;alertas,&#x20;conexi&oacute;n&#x20;y&#x20;desconexi&oacute;n&#x20;y&#x20;cientos&#x20;de&#x20;otras&#x20;operaciones.&#x20;La&#x20;seguridad&#x20;en&#x20;Pandora&#x20;FMS&#x20;ha&#x20;sido&#x20;siempre&#x20;una&#x20;de&#x20;las&#x20;caracter&iacute;sticas&#x20;del&#x20;dise&ntilde;o&#x20;de&#x20;su&#x20;arquitectura.&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/11_managing_and_administration#log_de_auditoria','1'),
(13,'es',0,'Sistema&#x20;de&#x20;provisi&oacute;n&#x20;autom&aacute;tica&#x20;de&#x20;agentes&#x20;','El&#x20;sistema&#x20;de&#x20;autoprovisi&oacute;n&#x20;de&#x20;agentes,&#x20;permite&#x20;que&#x20;un&#x20;agente&#x20;reci&eacute;n&#x20;ingresado&#x20;en&#x20;el&#x20;sistema&#x20;aplique&#x20;autom&aacute;ticamente&#x20;cambios&#x20;en&#x20;su&#x20;configuraci&oacute;n&#x20;&#40;como&#x20;moverlo&#x20;de&#x20;grupo,&#x20;asignarle&#x20;ciertos&#x20;valores&#x20;en&#x20;campos&#x20;personalizados&#41;&#x20;y&#x20;por&#x20;supuesto&#x20;aplicarle&#x20;determinadas&#x20;politicas&#x20;de&#x20;monitorizaci&oacute;n.&#x20;Es&#x20;una&#x20;de&#x20;las&#x20;funcionalidades&#x20;m&aacute;s&#x20;potentes,&#x20;orientadas&#x20;a&#x20;gestionar&#x20;parques&#x20;de&#x20;sistemas&#x20;muy&#x20;extensos.&#x20;&#x20;','https://pandorafms.com/manual/start?id=es/documentation/02_installation/05_configuration_agents#configuracion_automatica_de_agentes','1'),
(14,'es',0,'Modo&#x20;oscuro&#x20;','¿Sabes&#x20;que&#x20;existe&#x20;un&#x20;modo&#x20;oscuro&#x20;en&#x20;Pandora&#x20;FMS?&#x20;Un&#x20;administrador&#x20;lo&#x20;puede&#x20;activar&#x20;a&#x20;nivel&#x20;global&#x20;desde&#x20;las&#x20;opciones&#x20;de&#x20;configuraci&oacute;n&#x20;visuales&#x20;o&#x20;cualquier&#x20;usuario&#x20;a&#x20;nivel&#x20;individual,&#x20;en&#x20;las&#x20;opciones&#x20;de&#x20;usuario.&#x20;','','1'),
(15,'es',0,'Google&#x20;Sheet&#x20;','¿Sabes&#x20;que&#x20;se&#x20;puede&#x20;coger&#x20;el&#x20;valor&#x20;de&#x20;una&#x20;celda&#x20;de&#x20;una&#x20;hoja&#x20;de&#x20;c&aacute;lculo&#x20;de&#x20;Google&#x20;Sheet?,&#x20;utilizamos&#x20;la&#x20;API&#x20;para&#x20;pedir&#x20;el&#x20;dato&#x20;a&#x20;trav&eacute;s&#x20;de&#x20;un&#x20;plugin&#x20;remoto.&#x20;Es&#x20;perfecto&#x20;para&#x20;construir&#x20;cuadros&#x20;de&#x20;mando&#x20;de&#x20;negocio,&#x20;obtener&#x20;alertas&#x20;en&#x20;tiempo&#x20;real&#x20;y&#x20;crear&#x20;tus&#x20;propios&#x20;informes&#x20;a&#x20;medida.&#x20;&#x20;','https://pandorafms.com/library/google-sheets-plugin/','1'),
(16,'es',0,'Tablas&#x20;de&#x20;ARP','¿Sabes&#x20;que&#x20;existe&#x20;un&#x20;m&oacute;dulo&#x20;de&#x20;inventario&#x20;para&#x20;sacar&#x20;las&#x20;tablas&#x20;ARP&#x20;de&#x20;tus&#x20;servidores&#x20;windows?&#x20;Es&#x20;f&aacute;cil&#x20;de&#x20;instalar&#x20;y&#x20;puede&#x20;darte&#x20;informaci&oacute;n&#x20;muy&#x20;detallada&#x20;de&#x20;tus&#x20;equipos.','https://pandorafms.com/library/arp-table-windows-local/','1'),
(17,'es',0,'Enlaces&#x20;de&#x20;red&#x20;en&#x20;la&#x20;consola&#x20;visual&#x20;','Existe&#x20;un&#x20;elemento&#x20;de&#x20;consola&#x20;visual&#x20;llamado&#x20;&ldquo;Network&#x20;link&rdquo;&#x20;que&#x20;permite&#x20;mostrar&#x20;visualmente&#x20;la&#x20;uni&oacute;n&#x20;de&#x20;dos&#x20;interfaces&#x20;de&#x20;red,&#x20;su&#x20;estado&#x20;y&#x20;el&#x20;tr&aacute;fico&#x20;de&#x20;subida/bajada,&#x20;de&#x20;una&#x20;manera&#x20;muy&#x20;visual.&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/05_data_presentation_visual_maps#enlace_de_red','1'),
(18,'es',0,'¿Conoces&#x20;los&#x20;informes&#x20;de&#x20;disponibilidad?&#x20;','Son&#x20;muy&#x20;&uacute;tiles&#x20;ya&#x20;que&#x20;te&#x20;dicen&#x20;el&#x20;tiempo&#x20;&#40;%&#41;&#x20;que&#x20;un&#x20;chequeo&#x20;ha&#x20;estado&#x20;en&#x20;diferentes&#x20;estados&#x20;a&#x20;lo&#x20;largo&#x20;de&#x20;un&#x20;lapso&#x20;de&#x20;tiempo,&#x20;por&#x20;ejemplo,&#x20;una&#x20;semana.&#x20;Ofrece&#x20;datos&#x20;crudos&#x20;completos&#x20;de&#x20;lo&#x20;que&#x20;se&#x20;ha&#x20;hecho&#x20;con&#x20;el&#x20;detalle&#x20;suficiente&#x20;para&#x20;convencer&#x20;a&#x20;un&#x20;proveedor&#x20;o&#x20;un&#x20;cliente.&#x20;&#x20;','','1'),
(19,'es',0,'Gr&aacute;ficas&#x20;de&#x20;disponibilidad&#x20;','Parecidos&#x20;a&#x20;los&#x20;informes&#x20;de&#x20;disponibilidad,&#x20;pero&#x20;mucho&#x20;mas&#x20;visuales,&#x20;ofrecen&#x20;el&#x20;detalle&#x20;de&#x20;estado&#x20;de&#x20;un&#x20;monitor&#x20;a&#x20;lo&#x20;largo&#x20;del&#x20;tiempo.&#x20;Se&#x20;pueden&#x20;agrupar&#x20;con&#x20;otro&#x20;m&oacute;dulo&#x20;para&#x20;ofrecer&#x20;datos&#x20;finales&#x20;teniendo&#x20;en&#x20;cuenta&#x20;la&#x20;alta&#x20;disponibilidad&#x20;de&#x20;un&#x20;servicio.&#x20;Son&#x20;perfectos&#x20;para&#x20;su&#x20;uso&#x20;en&#x20;informes&#x20;a&#x20;proveedores&#x20;y/o&#x20;clientes.&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/08_data_presentation_reports#grafico_de_disponibilidad','1'),
(20,'es',0,'Zoom&#x20;en&#x20;gr&aacute;ficas&#x20;de&#x20;datos&#x20;','¿Sabes&#x20;que&#x20;Pandora&#x20;FMS&#x20;permite&#x20;hacer&#x20;zoom&#x20;en&#x20;una&#x20;parte&#x20;de&#x20;la&#x20;gr&aacute;fica.&#x20;Con&#x20;eso&#x20;ampliar&aacute;s&#x20;la&#x20;informaci&oacute;n&#x20;de&#x20;la&#x20;gr&aacute;fica.&#x20;Si&#x20;est&aacute;s&#x20;viendo&#x20;una&#x20;gr&aacute;fica&#x20;de&#x20;un&#x20;mes&#x20;y&#x20;ampl&iacute;as,&#x20;podr&aacute;s&#x20;ver&#x20;los&#x20;datos&#x20;de&#x20;ese&#x20;intervalo.&#x20;Si&#x20;utilizas&#x20;una&#x20;gr&aacute;fica&#x20;con&#x20;datos&#x20;de&#x20;resoluci&oacute;n&#x20;completa&#x20;&#40;los&#x20;llamamos&#x20;gr&aacute;ficas&#x20;TIP&#41;&#x20;podr&aacute;s&#x20;ver&#x20;el&#x20;detalle&#x20;de&#x20;cada&#x20;dato,&#x20;aunque&#x20;tu&#x20;gr&aacute;fica&#x20;tenga&#x20;miles&#x20;de&#x20;muestras.&#x20;&#x20;','','1'),
(21,'es',0,'Gr&aacute;ficas&#x20;de&#x20;resoluci&oacute;n&#x20;completa&#x20;','Pandora&#x20;FMS&#x20;y&#x20;otras&#x20;herramientas&#x20;cuando&#x20;tienen&#x20;que&#x20;mostrar&#x20;una&#x20;gr&aacute;fica&#x20;obtienen&#x20;los&#x20;datos&#x20;de&#x20;la&#x20;fuente&#x20;de&#x20;datos&#x20;y&#x20;luego&#x20;&ldquo;simplifican&rdquo;&#x20;la&#x20;gr&aacute;fica,&#x20;ya&#x20;que&#x20;si&#x20;la&#x20;serie&#x20;de&#x20;datos&#x20;tiene&#x20;10,000&#x20;elementos&#x20;y&#x20;la&#x20;gr&aacute;fica&#x20;solo&#x20;tiene&#x20;300&#x20;pixeles&#x20;de&#x20;ancho&#x20;no&#x20;pueden&#x20;caber&#x20;todos,&#x20;asi&#x20;que&#x20;se&#x20;&ldquo;simplifican&rdquo;&#x20;esos&#x20;10,000&#x20;puntos&#x20;en&#x20;solo&#x20;300.&#x20;&#x20;&#x20;Sin&#x20;embargo&#x20;al&#x20;simplificar&#x20;se&#x20;pierde&#x20;&ldquo;detalle&rdquo;&#x20;en&#x20;la&#x20;gr&aacute;fica,&#x20;y&#x20;por&#x20;supuesto&#x20;no&#x20;podemos&#x20;&ldquo;hacer&#x20;zoom&rdquo;.&#x20;Las&#x20;gr&aacute;ficas&#x20;de&#x20;Pandora&#x20;FMS&#x20;permiten&#x20;mostrar&#x20;y&#x20;usar&#x20;todos&#x20;los&#x20;datos&#x20;en&#x20;una&#x20;gr&aacute;fica,&#x20;que&#x20;llamamos&#x20;&ldquo;TIP&rdquo;&#x20;que&#x20;muestra&#x20;todos&#x20;los&#x20;puntos&#x20;superpuestos&#x20;y&#x20;adem&aacute;s&#x20;permite&#x20;que&#x20;al&#x20;hacer&#x20;zoom&#x20;no&#x20;se&#x20;pierda&#x20;resoluci&oacute;n.&#x20;&#x20;&#x20;','','1'),
(22,'es',0,'Pol&iacute;tica&#x20;de&#x20;contrase&ntilde;as','La&#x20;consola&#x20;de&#x20;Pandora&#x20;FMS&#x20;tiene&#x20;un&#x20;sistema&#x20;de&#x20;gesti&oacute;n&#x20;de&#x20;pol&iacute;tica&#x20;de&#x20;credenciales,&#x20;para&#x20;reforzar&#x20;la&#x20;seguridad&#x20;local&#x20;&#40;adem&aacute;s&#x20;de&#x20;permitir&#x20;la&#x20;autenticaci&oacute;n&#x20;externa&#x20;contra&#x20;un&#x20;LDAP,&#x20;Active&#x20;Directory&#x20;o&#x20;SAML&#41;.&#x20;A&#x20;trav&eacute;s&#x20;de&#x20;este&#x20;sistema&#x20;podemos&#x20;forzar&#x20;cambios&#x20;de&#x20;password&#x20;cada&#x20;X&#x20;d&iacute;as,&#x20;guardar&#x20;un&#x20;hist&oacute;rico&#x20;de&#x20;passwords&#x20;usadas&#x20;o&#x20;evitar&#x20;el&#x20;uso&#x20;de&#x20;ciertas&#x20;contrase&ntilde;as&#x20;entre&#x20;otras&#x20;acciones.&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/12_console_setup?s%5B%5D%3Dcontrase%25C3%25B1as#password_policy','1'),
(23,'es',0,'Autenticaci&oacute;n&#x20;de&#x20;doble&#x20;factor&#x20;','Es&#x20;posible&#x20;activar&#x20;&#40;y&#x20;forzar&#x20;su&#x20;uso&#x20;a&#x20;todos&#x20;los&#x20;usuarios&#41;&#x20;un&#x20;sistema&#x20;de&#x20;doble&#x20;autenticaci&oacute;n&#x20;&#40;usando&#x20;Google&#x20;Auth&#41;&#x20;para&#x20;que&#x20;cualquier&#x20;usuario&#x20;se&#x20;autentique&#x20;adem&aacute;s&#x20;de&#x20;con&#x20;una&#x20;contrase&ntilde;a,&#x20;con&#x20;un&#x20;sistema&#x20;de&#x20;token&#x20;de&#x20;un&#x20;solo&#x20;uso,&#x20;dando&#x20;al&#x20;sistema&#x20;mucha&#x20;m&aacute;s&#x20;seguridad.&#x20;&#x20;','https://pandorafms.com/manual/en/documentation/04_using/12_console_setup?s%5B%5D%3Dgoogle%26s%5B%5D%3Dauth#authentication','1');
INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`, `filename`, `path`) VALUES
(1, 'monitorizar_web.png', 'images/tips/'),
(2, 'monitorizar_snmp.png', 'images/tips/'),
(3, 'monitorizar_desde_ip.png', 'images/tips/'),
(4, 'tu_red_pierde_paquetes.png', 'images/tips/'),
(5, 'telegram_con_pandora.png', 'images/tips/'),
(6, 'monitorizar_con_jmx.png', 'images/tips/'),
(7, 'usuario_zona_horaria.png', 'images/tips/'),
(8, 'paradas_planificadas.png', 'images/tips/'),
(9, 'personalizar_los_emails.png', 'images/tips/'),
(10, 'iconos_personalizados.png', 'images/tips/'),
(11, 'mapa_de_calor.png', 'images/tips/'),
(12, 'auditoria.png', 'images/tips/'),
(15, 'google_sheets.png', 'images/tips/'),
(17, 'enlaces_consola_visual.png', 'images/tips/'),
(18, 'informe_disponibiliad.png', 'images/tips/'),
(19, 'graficas_disponibilidad.png', 'images/tips/'),
(20, 'zoom_en_graficas.png', 'images/tips/'),
(22, 'politica_de_pass.png', 'images/tips/');
COMMIT;

View File

@ -117,6 +117,7 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
}
}
$search_bar .= '<div id="result_order" class="result_order"></div>';
$search_bar .= '<input id="keywords" name="keywords"';
if (!isset($config['search_keywords'])) {
$search_bar .= "value='".__('Enter keywords to search')."'";
@ -126,15 +127,11 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
$search_bar .= "value='".$config['search_keywords']."'";
}
$search_bar .= 'type="search" onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
onkeyup="showinterpreter()" class="search_input"/>';
$search_bar .= 'type="search" onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');" onkeyup="showinterpreter()" class="search_input"/>';
$search_bar .= '<div id="result_order" class="result_order"></div>';
// $search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
$search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
$search_bar .= '</form>';
$header_searchbar = '<div id="header_searchbar">'.$search_bar.'</div>';
}

View File

@ -98,6 +98,7 @@ echo '</div>';
?>
<script type="text/javascript">
$(document).ready(function() {
menuActionButtonResizing();
const menuTypeClass = '<?php echo $menuTypeClass; ?>';
if (menuTypeClass === 'classic' && menuTypeClass !== localStorage.getItem('menuType')) {
localStorage.setItem('menuType', 'classic');

View File

@ -31,6 +31,7 @@ global $config;
require_once $config['homedir'].'/include/functions_register.php';
require_once $config['homedir'].'/include/class/WelcomeWindow.class.php';
require_once $config['homedir'].'/include/class/TipsWindow.class.php';
if ((bool) is_ajax() === true) {
@ -109,6 +110,16 @@ try {
$welcome = false;
}
try {
if (isset($_SESSION['showed_tips_window']) === false) {
$tips_window = new TipsWindow();
if ($tips_window !== null) {
$tips_window->run();
}
}
} catch (Exception $e) {
}
$double_auth_enabled = (bool) db_get_value('id', 'tuser_double_auth', 'id_user', $config['id_user']);
if (isset($config['2FA_all_users']) === false) {

View File

@ -462,11 +462,11 @@ if ($id_agente) {
// Inventory.
$inventorytab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'">'.html_print_image(
'images/page_white_text.png',
'images/hardware-software-component@svg.svg',
true,
[
'title' => __('Inventory'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
@ -476,11 +476,6 @@ if ($id_agente) {
$inventorytab['active'] = false;
}
$inventorytab = enterprise_hook('inventory_tab');
if ($inventorytab === ENTERPRISE_NOT_HOOK) {
$inventorytab = '';
}
$has_remote_conf = enterprise_hook(
'config_agents_has_remote_configuration',
[$id_agente]

View File

@ -174,7 +174,7 @@ foreach ($fields as $field) {
$data[1] = $field['name'];
$data[2] = html_print_image(
((bool) $field['display_on_front'] === true) ? 'images/validate.svg' : 'images/icono_stop.png',
((bool) $field['display_on_front'] === true) ? 'images/validate.svg' : 'images/fail@svg.svg',
true,
['class' => 'main_menu_icon invert_filter']
);

View File

@ -235,7 +235,7 @@ if (db_get_num_rows($sql) == 0) {
if ($id_policy) {
$policy = policies_get_policy($id_policy);
$data[0] = '<a href="index.php?sec=gmodules&sec2='.ENTERPRISE_DIR.'/godmode/policies/policies&id='.$id_policy.'">';
$data[0] .= html_print_image('images/policies_mc.png', true, ['border' => '0', 'title' => $policy['name']]);
$data[0] .= html_print_image('images/policy@svg.svg', true, ['border' => '0', 'title' => $policy['name'], 'class' => 'main_menu_icon invert_filter']);
$data[0] .= '</a>';
} else {
$data[0] = '';
@ -247,15 +247,15 @@ if (db_get_num_rows($sql) == 0) {
$data[4] = human_time_description_raw($row['interval']);
// Delete module
$data[5] = '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'&delete_inventory_module='.$row['id_agent_module_inventory'].'" onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">';
$data[5] .= html_print_image('images/cross.png', true, ['border' => '0', 'title' => __('Delete'), 'class' => 'invert_filter']);
$data[5] .= html_print_image('images/delete.svg', true, ['border' => '0', 'title' => __('Delete'), 'class' => 'main_menu_icon invert_filter']);
$data[5] .= '</b></a>&nbsp;&nbsp;';
// Update module
$data[5] .= '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'&load_inventory_module='.$row['id_module_inventory'].'">';
$data[5] .= html_print_image('images/config.png', true, ['border' => '0', 'title' => __('Update'), 'class' => 'invert_filter']);
$data[5] .= html_print_image('images/edit.svg', true, ['border' => '0', 'title' => __('Update'), 'class' => 'main_menu_icon invert_filter']);
$data[5] .= '</b></a>&nbsp;&nbsp;';
// Force refresh module
$data[5] .= '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'&force_inventory_module='.$row['id_agent_module_inventory'].'">';
$data[5] .= html_print_image('images/target.png', true, ['border' => '0', 'title' => __('Force'), 'class' => 'invert_filter']).'</b></a>';
$data[5] .= html_print_image('images/change-active.svg', true, ['border' => '0', 'title' => __('Force'), 'class' => 'main_menu_icon invert_filter']).'</b></a>';
array_push($table->data, $data);
}

View File

@ -1070,13 +1070,57 @@ if ((bool) check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === tr
);
echo '</form>';
}
$modalCreateModule = '<form name="create_module_form" method="post">';
$input_type = html_print_input_hidden('edit_module', 1, true);
$input_type .= html_print_select(
policies_type_modules_availables($sec2),
'moduletype',
'',
'',
'',
'',
true,
false,
false,
'',
false,
'max-width:300px;'
);
$modalCreateModule .= $input_type;
$modalCreateModule .= html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Create'),
'create_module',
false,
[
'icon' => 'next',
'mode' => 'mini secondary',
],
true
),
],
true
);
$modalCreateModule .= '</form>';
html_print_div(
[
'id' => 'modal',
'style' => 'display: none',
'content' => $modalCreateModule,
]
);
?>
<script type="text/javascript">
function create_module_dialog(){
$('#modal')
.dialog({
console.log('Entra');
$('#modal').dialog({
title: '<?php echo __('Create Module'); ?>',
resizable: true,
draggable: true,

View File

@ -290,7 +290,7 @@ $table_simple->rowclass['captions_module_n_type'] = 'field_half_width pdd_t_10px
$table_simple->rowclass['module_n_type'] = 'field_half_width';
$table_simple->data['captions_module_n_type'][0] = html_print_input_hidden('id_module_type_hidden', $id_module_type, true);
$table_simple->data['captions_module_n_type'][0] .= __('Module group');
$table_simple->data['captions_module_n_type'][1] = __('Type').ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help');
$table_simple->data['captions_module_n_type'][1] = __('Type').ui_print_help_icon($help_type, true, '', '', '', 'module_type_help');
// Module group and Type.
$table_simple->rowclass['module_n_type'] = 'field_half_width';
$table_simple->data['module_n_type'][0] .= html_print_select_from_sql(
@ -1437,7 +1437,7 @@ if (isset($module_macros)) {
$table_macros->data[$macro_count][2] = __('Value');
$table_macros->data[$macro_count][3] = html_print_input_text('module_macro_values[]', $macro_value, '', 50, 60, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy);
if (!$disabledBecauseInPolicy) {
$table_macros->data[$macro_count][4] = '<a href="javascript: delete_macro('.$macro_count.');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>';
$table_macros->data[$macro_count][4] = '<a href="javascript: delete_macro('.$macro_count.');">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
}
$macro_count++;
@ -1446,7 +1446,7 @@ if (isset($module_macros)) {
}
if (!$disabledBecauseInPolicy) {
$table_macros->data[$macro_count][0] = '<span>'.__('Custom macros').'</span> <a href="javascript:add_macro();">'.html_print_image('images/add.png', true, ['class' => 'invert_filter']).'</a>';
$table_macros->data[$macro_count][0] = '<span>'.__('Custom macros').'</span> <a href="javascript:add_macro();">'.html_print_image('images/fail@svg.svg', true, ['style' => 'rotate:45deg', 'class' => 'main_menu_icon invert_filter']).'</a>';
$table_macros->colspan[$macro_count][0] = 5;
}
@ -1535,14 +1535,15 @@ $table_relations->data[-1][1] = '';
$table_relations->data[-1][2] = '';
$table_relations->data[-1][3] = '<a id="disable_updates_button" class="alpha50" href="">';
$table_relations->data[-1][3] .= html_print_image(
'images/lock_mc.png',
true
'images/policy@svg.svg',
true,
['class' => 'main_menu_icon invert_filter']
).'</a>';
$table_relations->data[-1][4] = '<a id="delete_relation_button" href="">';
$table_relations->data[-1][4] .= html_print_image(
'images/cross.png',
'images/delete.svg',
true,
['class' => 'invert_filter']
['class' => 'main_menu_icon invert_filter']
).'</a>';
@ -1598,15 +1599,15 @@ if ($id_agent_module) {
$table_relations->data[$relations_count][2] = ($module_relation['type'] === 'direct') ? __('Direct') : __('Failover');
// Lock relationship updates.
$table_relations->data[$relations_count][3] = '<a id="disable_updates_button" class="'.$disabled_update_class.'"href="javascript: change_lock_relation('.$relations_count.', '.$module_relation['id'].');">'.html_print_image(
'images/lock_mc.png',
'images/policy@svg.svg',
true,
['class' => 'invert_filter']
['class' => 'main_menu_icon invert_filter']
).'</a>';
// Delete relationship.
$table_relations->data[$relations_count][4] = '<a id="delete_relation_button" href="javascript: delete_relation('.$relations_count.', '.$module_relation['id'].');">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
['class' => 'invert_filter']
['class' => 'main_menu_icon invert_filter']
).'</a>';
$relations_count++;
}
@ -2035,7 +2036,7 @@ function change_modules_autocomplete_input () {
var id_agent = parseInt($("#hidden-autocomplete_id_agent").val());
var module_autocomplete = $("#module_autocomplete");
var load_icon = '<?php html_print_image('images/spinner.gif', false); ?>';
var error_icon = '<?php html_print_image('images/error_red.png', false); ?>';
var error_icon = '<?php html_print_image('images/error-red@svg.svg', false, ['class' => 'main_menu_icon invert_filter']); ?>';
if (!module_autocomplete.hasClass('working')) {
module_autocomplete.addClass('working');
module_autocomplete.html(load_icon);
@ -2086,8 +2087,8 @@ function add_new_relation () {
var button = $("#button-add_relation");
var iconPlaceholder = $("#add_relation_status");
var load_icon = '<?php html_print_image('images/spinner.gif', false, ['style' => 'vertical-align:middle;']); ?>';
var suc_icon = '<?php html_print_image('images/ok.png', false, ['style' => 'vertical-align:middle;']); ?>';
var error_icon = '<?php html_print_image('images/error_red.png', false, ['style' => 'vertical-align:middle;']); ?>';
var suc_icon = '<?php html_print_image('images/validate.svg', false, ['class' => 'main_menu_icon invert_filter', 'style' => 'vertical-align:middle;']); ?>';
var error_icon = '<?php html_print_image('images/error-red@svg.svg', false, ['class' => 'main_menu_icon invert_filter', 'style' => 'vertical-align:middle;']); ?>';
if (!button.hasClass('working')) {
button.addClass('working');
@ -2129,12 +2130,12 @@ function add_new_relation () {
'<td id="module_relations-' + relationsCount + '-2">' + relation_type + '</td>' +
'<td id="module_relations-' + relationsCount + '-3" class="w10p center">' +
'<a id="disable_updates_button" class="alpha50" href="javascript: change_lock_relation(' + relationsCount + ', ' + data + ');">' +
'<?php echo html_print_image('images/lock_mc.png', true, ['class' => 'invert_filter']); ?>' +
'<?php echo html_print_image('images/policy@svg.svg', true, ['class' => 'main_menu_icon invert_filter']); ?>' +
'</a>' +
'</td>' +
'<td id="module_relations-' + relationsCount + '-4" class="w10p center">' +
'<a id="delete_relation_button" href="javascript: delete_relation(' + relationsCount + ', ' + data + ');">' +
'<?php echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']); ?>' +
'<?php echo html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']); ?>' +
'</a>' +
'</td>' +
'</tr>';

View File

@ -1452,7 +1452,7 @@ $table->data['module'][1] = "
<td class='cell_delete_button' style='text-align: right; width:10%;' id=''>".'<a class="link_delete"
onclick="if(!confirm(\''.__('Are you sure?').'\')) return false;"
href="">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'border' => '0',

View File

@ -809,10 +809,10 @@ foreach ($commands as $command) {
if (is_user_admin($config['id_user']) === true) {
$data['action'] = '<span class="inline_flex">';
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&amp;copy_command=1&id='.$command['id'].'&pure='.$pure.'&offset='.$offset.'"
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/copy.png', true, ['class' => 'invert_filter']).'</a>';
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/copy.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&delete_command=1&id='.$command['id'].'&pure='.$pure.'&offset='.$offset_delete.'"
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>';
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
$data['action'] .= '</span>';
}
}

View File

@ -766,7 +766,7 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '</form>';
$data[3] .= html_print_input_image(
'update_action',
'images/config.png',
'images/edit.svg',
1,
'padding:0px;',
true,
@ -1053,7 +1053,7 @@ foreach ($simple_alerts as $alert) {
$data[4] .= '<form class="view_alert_form display_in" method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_view">';
$data[4] .= html_print_input_image(
'view_alert',
'images/operation.png',
'images/details.svg',
1,
'',
true,

View File

@ -478,17 +478,17 @@ if ($standbyoff_alert) {
$searchFlag = true;
if (!is_metaconsole()) {
if (is_metaconsole() === false) {
// The tabs will be shown only with manage alerts permissions
if (check_acl($config['id_user'], 0, 'LW') || check_acl($config['id_user'], 0, 'LM')) {
$buttons = [
'list' => [
'active' => false,
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('List alerts'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list&pure='.$pure.'">'.html_print_image('images/load@svg.svg', true, ['title' => __('List alerts'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
'builder' => [
'active' => false,
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">'.html_print_image('images/pencil.png', true, ['title' => __('Builder alert'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">'.html_print_image('images/edit.svg', true, ['title' => __('Builder alert'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
];
@ -497,7 +497,7 @@ if (!is_metaconsole()) {
$buttons = '';
}
if ($tab == 'list') {
if ($tab === 'list') {
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',

View File

@ -450,7 +450,7 @@ foreach ($templates as $template) {
$data[4] .= html_print_input_hidden('source_id', $template['id'], true);
$data[4] .= html_print_input_image(
'dup',
'images/copy.png',
'images/copy.svg',
1,
'',
true,

View File

@ -778,7 +778,7 @@ $table->data[12][0] = html_print_label_input_block(
if (!is_metaconsole()) {
$table->data[12][1] = html_print_label_input_block(
__('Module search'),
'<div class="w100p">'.html_print_autocomplete_modules(
'<div class="w100p module-search">'.html_print_autocomplete_modules(
'module_search',
$text_module,
false,

View File

@ -186,7 +186,7 @@ foreach ($filters as $filter) {
) {
$table->cellclass[][6] = 'table_action_buttons';
$data[6] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'href='index.php?sec=geventos&sec2=godmode/events/events&section=filter&delete=1&id=".$filter['id_filter'].'&offset=0&pure='.$config['pure']."'>".html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete'),
@ -243,11 +243,7 @@ $submitButtons .= html_print_submit_button(
);
html_print_action_buttons(
$submitButtons,
[
'type' => 'form_action',
'id' => 'list-events-filters',
]
$submitButtons
);
?>

View File

@ -24,8 +24,29 @@ if (! check_acl($config['id_user'], 0, 'PM')) {
exit;
}
// Header
ui_print_page_header(__('Extensions').' &raquo; '.__('Defined extensions'), 'images/extensions.png', false, '', true, '');
// Header.
ui_print_standard_header(
__('Extensions'),
'images/extensions.png',
false,
'',
true,
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('Defined extensions'),
],
]
);
if (count($config['extensions']) == 0) {
$extensions = extensions_get_extension_info();
@ -132,7 +153,7 @@ if ($disabled != '') {
$extensions = extensions_get_extension_info();
$table = new StdClass;
$table->width = '98%';
$table->width = '100%';
$table->head = [];
$table->head[] = __('File');
@ -146,7 +167,7 @@ $table->head[] = __('Login Function');
$table->head[] = __('Agent operation tab');
$table->head[] = __('Agent godmode tab');
$table->head[] = __('Operation');
$table->width = '100%';
$table->class = 'info_table';
$table->align = [];
@ -254,9 +275,40 @@ foreach ($extensions as $file => $extension) {
if ($file != 'update_manager.php') {
$table->cellclass[][10] = 'table_action_buttons';
if (!$extension['enabled']) {
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.disabled.png', true, ['class' => 'filter_none']).'</a>'.' <a title="'.__('Enable').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file.'" class="mn">'.html_print_image('images/lightbulb_off.png', true, ['class' => 'filter_none']).'</a>';
$data[] = html_print_menu_button(
[
'href' => 'index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file,
'image' => 'images/cross.disabled.png',
'title' => __('Delete'),
'onClick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
],
true
).html_print_menu_button(
[
'href' => 'index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file,
'image' => 'images/lightbulb_off.png',
'title' => __('Delete'),
],
true
);
} else {
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>'.' <a title="'.__('Disable').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&disabled='.$file.'" class="mn">'.html_print_image('images/lightbulb.png', true).'</a>';
$data[] = html_print_menu_button(
[
'href' => 'index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file,
'image' => 'images/delete.svg',
'class' => 'main_menu_icon invert_filter',
'title' => __('Delete'),
'onClick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
],
true
).html_print_menu_button(
[
'href' => 'index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&disabled='.$file,
'image' => 'images/lightbulb.png',
'title' => __('Delete'),
],
true
);
}
} else {
$data[] = '';

View File

@ -698,7 +698,7 @@ echo '</form>';
<td><a id="delete_row" href="none">
<?php
html_print_image(
'images/cross.png',
'images/delete.svg',
false,
[
'alt' => '',
@ -1005,7 +1005,7 @@ function getAgentRow (layerId, agentId, agentAlias) {
var $deleteCol = $("<td />");
var $agentAlias = $("<span class=\"agent_alias\" data-agent-id=\"" + agentId + "\">" + agentAlias + "</span>");
var $removeBtn = $('<a class="delete_row" href="javascript:" <?php echo html_print_image('images/cross.png', false, ['class' => 'invert_filter']); ?> </a>');
var $removeBtn = $('<a class="delete_row" href="javascript:" <?php echo html_print_image('images/delete.svg', false, ['class' => 'invert_filter']); ?> </a>');
$removeBtn.click(function (event) {
var $layerRow = $("tr#layer_row_" + layerId);
@ -1061,7 +1061,7 @@ function getGroupRow (layerId, groupId, groupName, agentId, agentAlias) {
+ "<i>" + agentAlias + "</i>"
+ ")"
+ "</span>");
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']); ?></a>');
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']); ?></a>');
$removeBtn.click(function (event) {
var $layerRow = $("tr#layer_row_" + layerId);
@ -1139,8 +1139,8 @@ function getLayerRow (layerId, layerData) {
var $layerName = $("<span class=\"layer_name\">" + layerData.name + "</span>");
var $sortUpBtn = $("<a class=\"up_arrow\" href=\"javascript:;\" />");
var $sortDownBtn = $("<a class=\"down_arrow\" href=\"javascript:;\" />");
var $editBtn = $('<a class="edit_layer" href="javascript:;"><?php echo html_print_image('images/config.png', true, ['class' => 'invert_filter']); ?></a>');
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']); ?></a>');
var $editBtn = $('<a class="edit_layer" href="javascript:;"><?php echo html_print_image('images/edit.svg', true, ['class' => 'invert_filter']); ?></a>');
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']); ?></a>');
$sortUpBtn.click(moveLayerRowUpOnClick);
$sortDownBtn.click(moveLayerRowDownOnClick);

View File

@ -216,7 +216,7 @@ if ($option == '') {
$alertstab = [
'text' => '<a href="'.$url.'&tab=massive_alerts">'.html_print_image(
'images/bell.png',
'images/alert@svg.svg',
true,
[
'title' => __('Alerts operations'),
@ -228,7 +228,7 @@ $alertstab = [
$userstab = [
'text' => '<a href="'.$url.'&tab=massive_users">'.html_print_image(
'images/user.png',
'images/user.svg',
true,
[
'title' => __('Users operations'),
@ -240,7 +240,7 @@ $userstab = [
$agentstab = [
'text' => '<a href="'.$url.'&tab=massive_agents">'.html_print_image(
'images/agent.png',
'images/agents@svg.svg',
true,
[
'title' => __('Agents operations'),
@ -252,7 +252,7 @@ $agentstab = [
$modulestab = [
'text' => '<a href="'.$url.'&tab=massive_modules">'.html_print_image(
'images/module.png',
'images/modules@svg.svg',
true,
[
'title' => __('Modules operations'),
@ -264,7 +264,7 @@ $modulestab = [
$pluginstab = [
'text' => '<a href="'.$url.'&tab=massive_plugins">'.html_print_image(
'images/plugin.png',
'images/plugins@svg.svg',
true,
[
'title' => __('Plugins operations'),

View File

@ -383,6 +383,9 @@ if ($access_console_node === true) {
$sub2['godmode/setup/setup&section=external_tools']['text'] = __('External Tools');
$sub2['godmode/setup/setup&section=external_tools']['refr'] = 0;
$sub2['godmode/setup/setup&section=welcome_tips']['text'] = __('Welcome Tips');
$sub2['godmode/setup/setup&section=welcome_tips']['refr'] = 0;
if ((bool) $config['activate_gis'] === true) {
$sub2['godmode/setup/setup&section=gis']['text'] = __('Map conections GIS');
}

View File

@ -45,18 +45,18 @@ if (! check_acl($config['id_user'], 0, 'AR')) {
if (check_acl($config['id_user'], 0, 'PM') && enterprise_installed()) {
$buttons['setup'] = [
'active' => false,
'text' => '<a href="index.php?sec=general&sec2=godmode/setup/setup&amp;section=module_library">'.html_print_image('images/gm_setup.png', true, ['title' => __('Setup'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=general&sec2=godmode/setup/setup&amp;section=module_library">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Setup'), 'class' => 'main_menu_icon invert_filter']).'</a>',
];
}
$buttons['categories'] = [
'active' => false,
'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories">'.html_print_image('images/list.png', true, ['title' => __('Categories'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories">'.html_print_image('images/logs@svg.svg', true, ['title' => __('Categories'), 'class' => 'main_menu_icon invert_filter']).'</a>',
];
$buttons['view'] = [
'active' => false,
'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view">'.html_print_image('images/eye_show.png', true, ['title' => __('View'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view">'.html_print_image('images/see-details@svg.svg', true, ['title' => __('View'), 'class' => 'main_menu_icon invert_filter']).'</a>',
];

View File

@ -43,7 +43,7 @@ if (is_metaconsole() === true) {
ui_print_standard_header(
__('Inventory modules'),
'images/page_white_text.png',
'images/hardware-software-component@svg.svg',
false,
'',
true,
@ -293,6 +293,7 @@ $table->head[3] = __('Interpreter');
if ($management_allowed === true) {
$table->head[4] = __('Action').html_print_checkbox('all_delete', 0, false, true, false);
$table->size[4] = '80px';
}
$result = inventory_get_modules_list($offset);
@ -414,30 +415,14 @@ if (is_metaconsole() === true) {
?>
<script type="text/javascript">
$( document ).ready(function() {
$('[id^=checkbox-delete_multiple]').change(function(){
if($(this).parent().parent().hasClass('checkselected')){
$(this).parent().parent().removeClass('checkselected');
}
else{
$(this).parent().parent().addClass('checkselected');
}
});
$('[id^=checkbox-all_delete]').change(function() {
if ($("#checkbox-all_delete").prop("checked")) {
$('[id^=checkbox-delete_multiple]').parent().parent().addClass('checkselected');
$(".check_delete").prop("checked", true);
if ($("input[name=all_delete]").prop("checked")) {
$(".custom_checkbox_input").prop("checked", true);
}
else {
$('[id^=checkbox-delete_multiple]').parent().parent().removeClass('checkselected');
$(".check_delete").prop("checked", false);
$(".custom_checkbox_input").prop("checked", false);
}
});
});
</script>

View File

@ -104,7 +104,7 @@ function generateExtraFields($extra_fields, $protocol)
'class' => 'float-right',
'style' => $cntFields <= 1 ? 'opacity: 0.5;' : '',
'content' => html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Remove last macro oid'),

View File

@ -266,7 +266,7 @@ foreach ($result as $row) {
$table->cellclass[][3] = 'table_action_buttons';
$data[3] = html_print_input_image(
'delete_profile',
'images/cross.png',
'images/delete.svg',
$row['id_np'],
'',
true,
@ -286,7 +286,7 @@ foreach ($result as $row) {
'class' => 'invert_filter',
]
);
$data[3] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
$data[3] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
$data[3] .= '<a onclick="blockResubmit($(this))" href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&export_profile='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV'), 'class' => 'invert_filter']).'</a>';
array_push($table->data, $data);

View File

@ -191,7 +191,7 @@ foreach ($filters as $filter) {
if (check_acl_restricted_all($config['id_user'], $filter['id_group'], 'AW')) {
$table->cellclass[][3] = 'table_action_buttons';
$data[3] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&delete=1&id='.$filter['id_sg']."&offset=0&pure=$pure'>".html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&delete=1&id='.$filter['id_sg']."&offset=0&pure=$pure'>".html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
}
array_push($table->data, $data);

View File

@ -30,7 +30,7 @@ $buttons['report_items']['active'] = true;
$buttons['report_items']['text'] = '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$id.'">'.html_print_image('images/god6.png', true, ['title' => __('Report items')]).'</a>';
$buttons['edit_report']['active'] = false;
$buttons['edit_report']['text'] = '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_report_form&id='.$id.'">'.html_print_image('images/config.png', true, ['title' => __('Edit report')]).'</a>';
$buttons['edit_report']['text'] = '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_report_form&id='.$id.'">'.html_print_image('images/edit.svg', true, ['title' => __('Edit report')]).'</a>';
// Header
if (! defined('METACONSOLE')) {
@ -260,7 +260,7 @@ foreach ($reports_item as $item) {
}
$data[5] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&delete=1&id_rc='.$item['id_rc'].'&id='.$id."&offset=0'>".html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'.html_print_checkbox_extended('delete_multiple[]', $item['id_rc'], false, false, '', 'class="check_delete"', true);
href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&delete=1&id_rc='.$item['id_rc'].'&id='.$id."&offset=0'>".html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'.html_print_checkbox_extended('delete_multiple[]', $item['id_rc'], false, false, '', 'class="check_delete"', true);
array_push($table->data, $data);
}

View File

@ -2639,7 +2639,8 @@ $class = 'databox filters';
'render_definition',
3,
25,
$render_definition
$render_definition,
'style=width:100%'
);
?>
</td>
@ -4271,7 +4272,7 @@ function print_SLA_list($width, $action, $idItem=null)
echo '</td>';
echo '<td class="sla_list_action_col center">';
echo '<a href="javascript: deleteSLARow('.$item['id'].');">';
echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']);
echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']);
echo '</a>';
echo '</td>';
echo '</tr>';
@ -4312,7 +4313,7 @@ function print_SLA_list($width, $action, $idItem=null)
<a class="delete_button" href="javascript: deleteSLARow(0);">
<?php
html_print_image(
'images/cross.png',
'images/delete.svg',
false,
['class' => 'invert_filter']
);
@ -4738,7 +4739,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameAgentFailover).$server_name_element.'</td>
<td>'.printSmallFont($nameModuleFailover).'</td>
<td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>
</td>
</tr>';
} else {
@ -4746,7 +4747,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameAgent).$server_name_element.'</td>
<td>'.printSmallFont($nameModule).'</td>
<td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>
</td>
</tr>';
}
@ -4756,7 +4757,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameModule).'</td>
<td>'.printSmallFont($operation[$item['operation']]).'</td>
<td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>
</td>
</tr>';
}
@ -4794,7 +4795,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<a class="delete_button" href="javascript: deleteGeneralRow(0);">
<?php
html_print_image(
'images/cross.png',
'images/delete.svg',
false,
['class' => 'invert_filter']
);

View File

@ -3680,21 +3680,21 @@ $buttons = [
true,
[
'title' => __('Reports list'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
],
'main' => [
'active' => false,
'text' => '<a href="'.$urlB.'&tab=main&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/op_reporting.png', true, ['title' => __('Main data'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="'.$urlB.'&tab=main&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/op_reporting.png', true, ['title' => __('Main data'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
'list_items' => [
'active' => false,
'text' => '<a href="'.$urlB.'&tab=list_items&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('List items'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="'.$urlB.'&tab=list_items&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/logs@svg.svg', true, ['title' => __('List items'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
'item_editor' => [
'active' => false,
'text' => '<a href="'.$urlB.'&tab=item_editor&action=new&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/pencil.png', true, ['title' => __('Item editor'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="'.$urlB.'&tab=item_editor&action=new&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/edit.svg', true, ['title' => __('Item editor'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
];
@ -3708,11 +3708,11 @@ if ($enterpriseEnable) {
$buttons['view'] = [
'active' => false,
'text' => '<a href="index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$idReport.'&pure='.$pure.'">'.html_print_image(
'images/eye.png',
'images/see-details@svg.svg',
true,
[
'title' => __('View report'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
];
@ -3727,7 +3727,7 @@ if ($idReport != 0) {
$buttons = [
'main' => [
'active' => true,
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">'.html_print_image('images/report_list.png', true, ['title' => __('Reports list'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">'.html_print_image('images/report_list.png', true, ['title' => __('Reports list'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
];
$textReportName = __('Create Custom Report');

View File

@ -165,7 +165,7 @@ switch ($activeTab) {
$background_color = (string) get_parameter('background_color');
$width = (int) get_parameter('width');
$height = (int) get_parameter('height');
$visualConsoleName = io_safe_input((string) get_parameter('name'));
$visualConsoleName = (string) get_parameter('name');
$is_favourite = (int) get_parameter('is_favourite_sent');
$auto_adjust = (int) get_parameter('auto_adjust_sent');

View File

@ -80,7 +80,7 @@ if (empty($directory) === true) {
$real_directory = realpath($config['homedir'].'/'.$directory);
echo '<h4>'.__('Index of %s', io_safe_input($directory)).'</h4>';
echo '<h4 class="mrgn_0px">'.__('Index of %s', io_safe_input($directory)).'</h4>';
$upload_file = (bool) get_parameter('upload_file');
$create_text_file = (bool) get_parameter('create_text_file');

View File

@ -84,7 +84,7 @@ if ($mapsConnections !== false) {
'<a href="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2&amp;action=edit_connection_map&amp;id_connection_map='.$mapsConnection['id_tmap_connection'].'">'.$mapsConnection['conection_name'].'</a>',
ui_print_group_icon($mapsConnection['group_id'], true),
'<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=gis&amp;id_connection_map='.$mapsConnection['id_tmap_connection'].'&amp;action=delete_connection"
onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>',
onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>',
];
$table->cellclass[][2] = 'table_action_buttons';
}

View File

@ -208,7 +208,7 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
echo "<tr><td class='$tdcolor'><b><a href='index.php?sec=gsetup&sec2=godmode/setup/links&form_edit=1&id_link=".$row['id_link']."'>".$row['name'].'</a></b></td>';
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row['id_link'].'&borrar='.$row['id_link'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
['class' => 'invert_filter']
).'</a></td></tr>';

View File

@ -170,46 +170,118 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
$table->id = 'news';
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->head = [];
$table->data = [];
$table->style[0] = 'font-weight: bold;';
$table->style[1] = 'font-weight: bold;';
$table->style[2] = 'font-weight: bold;';
$table->style[3] = 'font-weight: bold;';
$table->style[4] = 'font-weight: bold;';
$table->size[0] = '33%';
$table->size[1] = '33%';
$table->colspan[2][0] = 2;
$table->rowclass[2] = 'w100p';
$data = [];
$data[0] = __('Subject').'<br>';
$data[0] .= '<input type="text" class="text_input" name="subject" size="35" value="'.$subject.'" >';
$data[0] = html_print_label_input_block(
__('Subject'),
html_print_input_text(
'subject',
$subject,
'',
35,
255,
true
)
);
$data[1] = __('Group').'<br>';
$data[1] .= '<div class="w250px">';
$data[1] .= html_print_select_groups($config['id_user'], 'ER', users_can_manage_group_all(), 'id_group', $id_group, '', '', 0, true, false, false, '');
$data[1] .= '</div>';
$data[1] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
$config['id_user'],
'ER',
users_can_manage_group_all(),
'id_group',
$id_group,
'',
'',
0,
true,
false,
false,
'w100p',
false,
'width: 100%;'
)
);
$table->data[] = $data;
$data[2] = __('Modal screen').'<br>';
$data[2] .= html_print_checkbox_extended('modal', 1, $modal, false, '', 'class="mrgn_top_5 mrg_btt_7"', true);
$data = [];
$data[0] = html_print_label_input_block(
__('Modal screen'),
html_print_checkbox_extended(
'modal',
1,
$modal,
false,
'',
'class="w100p"',
true
)
);
$data[3] = __('Expire').'<br>';
$data[3] .= html_print_checkbox_extended('expire', 1, $expire, false, '', 'class="mrgn_top_5 mrg_btt_7"', true);
$data[4] = __('Expiration').'<br>';
$data[4] .= html_print_input_text('expire_date', $expire_date, '', 12, 10, true).' ';
$data[4] .= html_print_input_text('expire_time', $expire_time, '', 10, 7, true).' ';
$data[1] = '<div style="display: inline-flex; flex-direction: row;">'.html_print_label_input_block(
__('Expire'),
html_print_checkbox_extended(
'expire',
1,
$expire,
false,
'',
'class="w100p"',
true
),
['div_class' => 'display-grid']
);
$data[1] .= html_print_label_input_block(
__('Expiration'),
'<div>'.html_print_input_text(
'expire_date',
$expire_date,
'',
12,
10,
true
).' '.html_print_input_text(
'expire_time',
$expire_time,
'',
10,
7,
true
).'</div>',
[
'div_class' => 'display-grid mrgn_lft_20px',
'div_id' => 'news-0-4',
]
).'</div>';
$table->rowclass[] = '';
$table->data[] = $data;
$data = [];
$data[0] = __('Text').'<br>';
$data[0] .= html_print_textarea('text', 25, 15, $text, '', true);
$table->rowclass[] = '';
$table->colspan[1][0] = 5;
$data[0] = html_print_label_input_block(
__('Text'),
html_print_textarea(
'text',
25,
100,
$text,
'',
true,
'w100p'
)
);
$table->data[] = $data;
echo '<form name="ilink" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/news">';
echo '<form name="ilink" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/news" class="max_floating_element_size">';
if ($creation_mode == 1) {
echo "<input type='hidden' name='create' value='1'>";
} else {
@ -228,11 +300,25 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
echo "<table width='".$table->width."'>";
echo "<tr><td align='right'>";
if (isset($_GET['form_add'])) {
echo "<input name='crtbutton' type='submit' class='sub wand' value='".__('Create')."'>";
$submit_button = html_print_submit_button(
__('Create'),
'crtbutton',
false,
['icon' => 'wand'],
true
);
} else {
echo "<input name='crtbutton' type='submit' class='sub upd' value='".__('Update')."'>";
$submit_button = html_print_submit_button(
__('Update'),
'crtbutton',
false,
['icon' => 'wand'],
true
);
}
html_print_action_buttons($submit_button);
echo '</form></td></tr></table>';
} else {
$rows = db_get_all_rows_in_table('tnews', 'timestamp');
@ -287,17 +373,23 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
echo "<td class='$tdcolor'>".__('No').'</b></td>';
}
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter']).'</a></td></tr>';
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter']).'</a></td></tr>';
}
echo '</table>';
}
echo "<table width='100%'>";
echo "<tr><td align='right'>";
echo "<form method='post' action='index.php?sec=gsetup&sec2=godmode/setup/news&form_add=1'>";
echo "<input type='submit' class='sub next' name='form_add' value='".__('Add')."'>";
echo '</form></table>';
html_print_action_buttons(
html_print_submit_button(
__('Add'),
'form_add',
false,
['icon' => 'wand'],
true
)
);
echo '</form>';
}
/*

View File

@ -224,6 +224,11 @@ $buttons['external_tools'] = [
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=external_tools').'">'.html_print_image('images/nettool.png', true, ['title' => __('External Tools'), 'class' => 'invert_filter']).'</a>',
];
$buttons['welcome_tips'] = [
'active' => false,
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips').'">'.html_print_image('images/inventory.png', true, ['title' => __('Welcome tips'), 'class' => 'invert_filter']).'</a>',
];
if ($config['activate_gis']) {
$buttons['gis'] = [
'active' => false,
@ -312,6 +317,20 @@ switch ($section) {
$help_header = '';
break;
case 'welcome_tips':
$view = get_parameter('view', '');
$title = __('Welcome tips');
if ($view === 'create') {
$title = __('Create tip');
} else if ($view === 'edit') {
$title = __('Edit tip');
}
$buttons['welcome_tips']['active'] = true;
$subpage = ' &raquo '.$title;
$help_header = '';
break;
case 'enterprise':
$buttons['enterprise']['active'] = true;
$subpage = ' &raquo '.__('Enterprise');
@ -409,6 +428,10 @@ switch ($section) {
include_once $config['homedir'].'/godmode/setup/setup_external_tools.php';
break;
case 'welcome_tips':
include_once $config['homedir'].'/godmode/setup/welcome_tips.php';
break;
default:
enterprise_hook('setup_enterprise_select_tab', [$section]);
break;

View File

@ -292,11 +292,11 @@ $table->data[$i][1] = html_print_input_text_extended(
true
);
$table->data[$i][1] .= '<a id="change_timezone">'.html_print_image(
'images/pencil.png',
'images/edit.svg',
true,
[
'title' => __('Change timezone'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
$table->data[$i][1] .= '&nbsp;&nbsp;'.html_print_select(
@ -423,9 +423,9 @@ $table_ichanges = '<table>
<tr>
<td>'.$select_out.'</td>
<td>
<a href="javascript:">'.html_print_image('images/darrowright.png', true, ['id' => 'right_iblacklist', 'alt' => __('Push selected modules into blacklist'), 'title' => __('Push selected modules into blacklist'), 'class' => 'invert_filter']).'</a>
<a href="javascript:">'.html_print_image('images/arrow@svg.svg', true, ['style' => 'rotate: 180deg;', 'id' => 'right_iblacklist', 'alt' => __('Push selected modules into blacklist'), 'title' => __('Push selected modules into blacklist'), 'class' => 'main_menu_icon invert_filter']).'</a>
<br><br>
<a href="javascript:">'.html_print_image('images/darrowleft.png', true, ['id' => 'left_iblacklist', 'alt' => __('Pop selected modules out of blacklist'), 'title' => __('Pop selected modules out of blacklist'), 'class' => 'invert_filter']).'</a>
<a href="javascript:">'.html_print_image('images/arrow@svg.svg', true, ['style' => 'rotate: 0', 'id' => 'left_iblacklist', 'alt' => __('Pop selected modules out of blacklist'), 'title' => __('Pop selected modules out of blacklist'), 'class' => 'main_menu_icon invert_filter']).'</a>
</td>
<td>'.$select_in.'</td>
</tr>

View File

@ -1626,11 +1626,11 @@ if ($config['csv_divider'] != ';' && $config['csv_divider'] != ',' && $config['c
true
);
$table_other->data[$row][1] .= '<a id="csv_divider_custom" onclick="javascript: edit_csv_divider();">'.html_print_image(
'images/list.png',
'images/logs@svg.svg',
true,
[
'id' => 'select',
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
} else {
@ -1646,11 +1646,11 @@ if ($config['csv_divider'] != ';' && $config['csv_divider'] != ',' && $config['c
false
);
$table_other->data[$row][1] .= '<a id="csv_divider_custom" onclick="javascript: edit_csv_divider();">'.html_print_image(
'images/pencil.png',
'images/edit.svg',
true,
[
'id' => 'pencil',
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
}
@ -1777,7 +1777,7 @@ function edit_csv_divider () {
$("#text-csv_divider").val(value);
}
else {
$("#csv_divider_custom img").attr("src", "images/pencil.png");
$("#csv_divider_custom img").attr("src", "images/edit.svg");
$("#csv_divider_custom img").attr("id", "pencil");
$("#text-csv_divider").replaceWith("<select id='csv_divider' name='csv_divider'>");
var o = new Option(";", ";");

View File

@ -107,7 +107,7 @@ html_print_table($table);
function cell_op($oid='')
{
return '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_edit_snmp" href="javascript: edit_snmp(\''.$oid.'\');">'.html_print_image('images/cog.png', true, ['class' => 'invert_filter', 'title' => __('Edit')]).'</a>'.'<a class="delete_button_snmp" href="javascript: delete_snmp(\''.$oid.'\');">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
return '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_edit_snmp" href="javascript: edit_snmp(\''.$oid.'\');">'.html_print_image('images/cog.png', true, ['class' => 'invert_filter', 'title' => __('Edit')]).'</a>'.'<a class="delete_button_snmp" href="javascript: delete_snmp(\''.$oid.'\');">'.html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
}

View File

@ -0,0 +1,161 @@
<?php
/**
* Controller View tips in setup
*
* @category Console Class
* @package Pandora FMS
* @subpackage Dashboards
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 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.
* ============================================================================
*/
// Begin.
global $config;
require_once $config['homedir'].'/include/class/TipsWindow.class.php';
$view = get_parameter('view', '');
$action = get_parameter('action', '');
try {
$tipsWindow = new TipsWindow();
} catch (Exception $e) {
echo '[TipsWindow]'.$e->getMessage();
return;
}
if ($view === 'create' || $view === 'edit') {
// IF exists actions
if ($action === 'create' || $action === 'edit') {
$files = $_FILES;
$id_lang = get_parameter('id_lang', '');
$id_profile = get_parameter('id_profile', '');
$title = get_parameter('title', '');
$text = get_parameter('text', '');
$url = get_parameter('url', '');
$enable = get_parameter_switch('enable', '');
$errors = [];
if (count($files) > 0) {
$e = $tipsWindow->validateImages($files);
if ($e !== false) {
$errors = $e;
}
}
if (empty($id_lang) === true) {
$errors[] = __('Language is empty');
}
if (empty($title) === true) {
$errors[] = __('Title is empty');
}
if (empty($text) === true) {
$errors[] = __('Text is empty');
}
switch ($action) {
case 'create':
if (count($errors) === 0) {
if (count($files) > 0) {
$uploadImages = $tipsWindow->uploadImages($files);
}
$response = $tipsWindow->createTip($id_lang, $id_profile, $title, $text, $url, $enable, $uploadImages);
if ($response === 0) {
$errors[] = __('Error in insert tip');
}
}
$tipsWindow->viewCreate($errors);
return;
case 'edit':
$idTip = get_parameter('idTip', '');
$imagesToDelete = get_parameter('images_to_delete', '');
if (empty($idTip) === false) {
if (count($errors) === 0) {
if (empty($imagesToDelete) === false) {
$imagesToDelete = json_decode(io_safe_output($imagesToDelete), true);
$tipsWindow->deleteImagesFromTip($idTip, $imagesToDelete);
}
if (count($files) > 0) {
$uploadImages = $tipsWindow->uploadImages($files);
}
$response = $tipsWindow->updateTip($idTip, $id_profile, $id_lang, $title, $text, $url, $enable, $uploadImages);
if ($response === 0) {
$errors[] = __('Error in update tip');
}
}
$tipsWindow->viewEdit($idTip, $errors);
}
return;
default:
$tipsWindow->draw();
return;
}
return;
}
// If not exists actions
switch ($view) {
case 'create':
$tipsWindow->viewCreate();
return;
case 'edit':
$idTip = get_parameter('idTip', '');
if (empty($idTip) === false) {
$tipsWindow->viewEdit($idTip);
}
return;
default:
$tipsWindow->draw();
return;
}
}
if ($action === 'delete') {
$idTip = get_parameter('idTip', '');
$errors = [];
if (empty($idTip) === true) {
$errors[] = __('Tip required');
}
if (count($errors) === 0) {
$response = $tipsWindow->deleteTip($idTip);
if ($response === 0) {
$errors[] = __('Error in delete tip');
}
}
$tipsWindow->draw($errors);
return;
}
$tipsWindow->draw();

View File

@ -1943,7 +1943,7 @@ if ($create_alert || $update_alert) {
$data[1] .= '<tr>';
$data[1] .= '<td>'.alerts_get_alert_action_name($action['alert_type']).'</td>';
$data[1] .= '<td> <a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&delete_action=1&action_id='.$action['id'].'" onClick="javascript:return confirm(\''.__('Are you sure?').'\')">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'border' => '0',
@ -1978,11 +1978,12 @@ if ($create_alert || $update_alert) {
$row['id_as']
),
'content' => html_print_image(
'images/copy.png',
'images/copy.svg',
true,
[
'alt' => __('Duplicate'),
'title' => __('Duplicate'),
'class' => 'main_menu_icon invert_filter',
]
),
],
@ -1995,11 +1996,12 @@ if ($create_alert || $update_alert) {
$row['id_as']
),
'content' => html_print_image(
'images/config.png',
'images/edit.svg',
true,
[
'alt' => __('Update'),
'border' => 0,
'class' => 'main_menu_icon invert_filter',
]
),
],
@ -2025,7 +2027,7 @@ if ($create_alert || $update_alert) {
[
'href' => 'javascript: ',
'content' => html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete action'),

View File

@ -653,6 +653,7 @@ if ($update_user) {
$values['timezone'] = (string) get_parameter('timezone');
$values['default_event_filter'] = (int) get_parameter('default_event_filter');
$values['default_custom_view'] = (int) get_parameter('default_custom_view');
$values['show_tips_startup'] = (int) get_parameter_switch('show_tips_startup');
// API Token information.
$apiTokenRenewed = (bool) get_parameter('renewAPIToken');
$values['api_token'] = ($apiTokenRenewed === true) ? api_token_generate() : users_get_API_token($values['id_user']);
@ -1887,7 +1888,7 @@ echo '</div>';
// This is an image generated for JS.
$delete_image = html_print_input_image(
'del',
'images/cross.png',
'images/delete.svg',
1,
'',
true,

View File

@ -372,6 +372,8 @@ $userManagementTable->data['captions_loginErrorUser'][1] .= ui_print_input_place
__('The user with local authentication enabled will always use local authentication.'),
true
);
$userManagementTable->data['show_tips_startup'][0] = html_print_checkbox_switch('show_tips_startup', 1, ($user_info['show_tips_startup'] === null) ? true : $user_info['show_tips_startup'], true);
$userManagementTable->data['show_tips_startup'][1] = '<span>'.__('Show usage tips at startup').'</span>';
// Session time input.
$userManagementTable->rowclass['captions_userSessionTime'] = 'field_half_width';

View File

@ -673,11 +673,11 @@ class DiscoveryTaskList extends HTML
$data[0] .= ');" >';
$data[0] .= html_print_image(
'images/target.png',
'images/change-active.svg',
true,
[
'title' => __('Force'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[0] .= '</span>';
@ -731,11 +731,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_CLOUD_AZURE_COMPUTE:
// Discovery Applications MySQL.
$data[6] = html_print_image(
'images/plugin.png',
'images/plugin@svg.svg',
true,
[
'title' => __('Discovery Cloud Azure Compute'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Cloud.Azure.Compute');
@ -744,11 +744,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_CLOUD_AWS_EC2:
// Discovery Applications MySQL.
$data[6] = html_print_image(
'images/plugin.png',
'images/plugin@svg.svg',
true,
[
'title' => __('Discovery Cloud AWS EC2'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Cloud.AWS.EC2');
@ -757,11 +757,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_CLOUD_AWS_RDS:
// Discovery Cloud RDS.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery Cloud RDS'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.Cloud.Aws.RDS');
@ -770,11 +770,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_CLOUD_AWS_S3:
// Discovery Cloud S3.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery Cloud S3'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.Cloud.Aws.S3');
@ -783,11 +783,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_APP_MYSQL:
// Discovery Applications MySQL.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery Applications MySQL'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.App.MySQL');
@ -796,11 +796,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_APP_ORACLE:
// Discovery Applications Oracle.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery Applications Oracle'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.App.Oracle');
@ -809,11 +809,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_APP_DB2:
// Discovery Applications DB2.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery Applications DB2'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.App.DB2');
@ -823,7 +823,7 @@ class DiscoveryTaskList extends HTML
// Internal deployment task.
$no_operations = true;
$data[6] = html_print_image(
'images/deploy.png',
'images/osx-terminal@groups.svg',
true,
['title' => __('Agent deployment')]
).'&nbsp;&nbsp;';
@ -833,7 +833,7 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_APP_MICROSOFT_SQL_SERVER:
// Discovery Applications Oracle.
$data[6] = html_print_image(
'images/network.png',
'images/cluster@os.svg',
true,
['title' => __('Discovery Applications Microsoft SQL Server')]
).'&nbsp;&nbsp;';
@ -845,20 +845,20 @@ class DiscoveryTaskList extends HTML
if ($task['id_recon_script'] == 0) {
// Discovery NetScan.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery NetScan'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.NetScan');
} else {
// APP or external script recon task.
$data[6] = html_print_image(
'images/plugin.png',
'images/plugin@svg.svg',
true,
['class' => 'invert_filter']
['class' => 'main_menu_icon invert_filter']
).'&nbsp;&nbsp;';
$data[6] .= $recon_script_name;
}
@ -911,7 +911,7 @@ class DiscoveryTaskList extends HTML
true,
[
'title' => __('Review results'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[9] .= '</a>';
@ -919,11 +919,11 @@ class DiscoveryTaskList extends HTML
$data[9] .= '<a href="#" onclick="progress_task_list('.$task['id_rt'].',\''.$task['name'].'\')">';
$data[9] .= html_print_image(
'images/operation.png',
'images/details.svg',
true,
[
'title' => __('View summary'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[9] .= '</a>';
@ -940,11 +940,11 @@ class DiscoveryTaskList extends HTML
if (check_acl($config['id_user'], 0, 'MR')) {
$data[9] .= '<a href="#" onclick="show_map('.$task['id_rt'].',\''.$task['name'].'\')">';
$data[9] .= html_print_image(
'images/dynamic_network_icon.png',
'images/web@groups.svg',
true,
[
'title' => __('View map'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[9] .= '</a>';
@ -965,32 +965,32 @@ class DiscoveryTaskList extends HTML
$tipam_task_id
)
).'">'.html_print_image(
'images/config.png',
'images/edit.svg',
true,
[
'title' => __('Edit task'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
$data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=gextensions&sec2=enterprise/tools/ipam/ipam&action=delete&id='.$tipam_task_id
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete task'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
} else {
$data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&delete=1&task='.$task['id_rt']
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete task'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
}
@ -1003,21 +1003,21 @@ class DiscoveryTaskList extends HTML
$task['id_rt']
)
).'">'.html_print_image(
'images/config.png',
'images/edit.svg',
true,
[
'title' => __('Edit task'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
$data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&delete=1&task='.$task['id_rt']
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete task'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>Dark / 14 / info@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-14-/-info" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Icons/Elements/Help-mini" fill="#e63c52">
<path d="M7,0 C10.8659932,0 14,3.13400675 14,7 C14,10.8659932 10.8659932,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 Z M7,6 C6.44771525,6 6,6.44771525 6,7 L6,7 L6,10 C6,10.5522847 6.44771525,11 7,11 C7.55228475,11 8,10.5522847 8,10 L8,10 L8,7 C8,6.44771525 7.55228475,6 7,6 Z M7,3 C6.44771525,3 6,3.44771525 6,4 C6,4.55228475 6.44771525,5 7,5 C7.55228475,5 8,4.55228475 8,4 C8,3.44771525 7.55228475,3 7,3 Z" id="Elements-/-Help-mini"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 959 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>Dark / 20 / file-csv@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-file-csv" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group" fill="#14524f">
<path d="M14,0 L20,6 L20,18 C20,19.1045695 19.1045695,20 18,20 L18,20 L2,20 C0.8954305,20 0,19.1045695 0,18 L0,18 L0,2 C0,0.8954305 0.8954305,0 2,0 L2,0 L14,0 Z M3.51944167,13 C2.19341974,13 1,13.9742896 1,15.5033829 C1,17.0324763 2.15154536,18 3.5333998,18 C4.9222333,18 5.63409771,17.1069012 5.8225324,16.3694181 L4.9222333,16.105548 C4.78963111,16.5520974 4.3778664,17.0866035 3.5333998,17.0866035 C2.73778664,17.0866035 1.99800598,16.5250338 1.99800598,15.5033829 C1.99800598,14.4140731 2.77966102,13.8998647 3.51944167,13.8998647 C4.3778664,13.8998647 4.76171486,14.4073072 4.88035892,14.8673884 L5.78763709,14.5899865 C5.59222333,13.811908 4.88733799,13 3.51944167,13 Z M8.18145563,13 C7.24626122,13 6.45762712,13.6495264 6.45762712,14.5020298 C6.45762712,15.2259811 6.9670987,15.7198917 7.7557328,15.8755074 L8.44666002,16.0108254 C8.83050847,16.0852503 9.04685942,16.3017591 9.04685942,16.579161 C9.04685942,16.917456 8.76071785,17.1677943 8.2442672,17.1677943 C7.54636092,17.1677943 7.20438684,16.7415426 7.16251246,16.2679296 L6.26919242,16.4979702 C6.34596211,17.1813261 6.92522433,18 8.23728814,18 C9.3888335,18 10.0239282,17.255751 10.0239282,16.5182679 C10.0239282,15.8416779 9.54237288,15.2733424 8.64207378,15.1041949 L7.95114656,14.9756428 C7.58823529,14.9079838 7.41375872,14.6982409 7.41375872,14.4343708 C7.41375872,14.1163735 7.72083749,13.8254398 8.1884347,13.8254398 C8.81655035,13.8254398 9.03988036,14.2381597 9.0887338,14.5020298 L9.95413759,14.2449256 C9.84247258,13.7036536 9.38185444,13 8.18145563,13 Z M11.3988036,13.1014885 L10.3449651,13.1014885 L12.1734796,17.8985115 L13.1645065,17.8985115 L15,13.1014885 L13.9810568,13.1014885 L12.6899302,16.6671177 L11.3988036,13.1014885 Z M14,2 L14,7 L19,7 L14,2 Z" id="Shape"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
<title>A4F45784-4263-40A4-A100-0ADD2A4AF526@svg</title>
<desc>Created with sketchtool.</desc>
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Mockup---Inventory-v2" transform="translate(-330.000000, -482.000000)">
<g id="Base-operations" transform="translate(310.000000, 462.000000)">
<g id="Contenido" transform="translate(20.000000, 20.000000)">
<g id="Title">
<g id="Node" transform="translate(0.000000, 1.000000)">
<path d="M11.0005809,0.577602729 L17.0215369,4.05330429 C17.6403998,4.41055362 18.0216446,5.07084166 18.0216446,5.78541725 L18.0216446,12.2084379 C18.0216446,12.9225447 17.6408956,13.5824738 17.0226732,13.9398945 L10.9867915,17.429494 C10.3751132,17.7831311 9.62223302,17.7877875 9.00622741,17.4417433 L3.00985488,14.073251 C2.37954726,13.7191726 1.98939037,13.0524969 1.98939037,12.3295452 L1.98939037,5.78462237 C1.98939037,5.07047279 2.37018458,4.41051094 2.98846546,4.05310589 L8.99976366,0.578199219 C9.61866686,0.220434425 10.3814645,0.220207018 11.0005809,0.577602729 Z" id="Polygon" stroke="#3F3F3F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
<polyline id="Path-28" stroke="#3F3F3F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" points="3 4 10 9 10 17.6651764"></polyline>
<circle id="Oval" fill="#3F3F3F" cx="10" cy="9" r="3"></circle>
<circle id="Oval" fill="#3F3F3F" cx="3" cy="4" r="3"></circle>
<circle id="Oval" fill="#3F3F3F" cx="17" cy="4" r="3"></circle>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
<title>312C8F68-5915-4989-BCE0-E39966548B2E@svg</title>
<desc>Created with sketchtool.</desc>
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
<g id="Mockup---Module-2-default-open" transform="translate(-1857.000000, -3735.000000)" stroke="#3F3F3F" stroke-width="2">
<g id="Barra-inferior" transform="translate(0.000000, 3710.000000)">
<g id="Acciones" transform="translate(1507.000000, 10.000000)">
<g id="Principal-por-defecto" transform="translate(269.000000, 0.000000)">
<g id="Icons/Elements/update-white" transform="translate(82.000000, 16.000000)">
<polyline id="Path-10" points="10.0005064 0 10.0005064 2.98289013 7 2.98289013"></polyline>
<path d="M0.000657169914,8.00835862 C0.790778884,9.26397417 2.12630154,9.92782378 4.00722512,9.99990745 C6.76864887,9.99990745 9.00722512,7.76136573 9.00722512,4.99998457 C9.00722512,2.23860342 6.76864887,6.16977954e-05 4.00722512,6.16977954e-05 C2.36730125,6.16977954e-05 0.911775413,0.789551382 0,2.00918391" id="Oval" transform="translate(4.503613, 4.999985) scale(-1, -1) translate(-4.503613, -4.999985) "></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -791,6 +791,10 @@ if ($save_filter_modal) {
$table->rowid[1] = 'save_filter_row1';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->rowclass[1] = 'flex';
$table->rowclass[2] = 'flex';
$table->rowclass[3] = 'flex';
$table->rowclass[4] = 'flex';
$data[0] = '<b>'.__('Filter name').'</b>'.$jump;
$data[0] .= html_print_input_text('id_name', '', '', 15, 255, true);
if (is_metaconsole()) {

View File

@ -68,6 +68,11 @@ if (check_login()) {
0
);
$get_data_ModulesByStatus = (bool) get_parameter(
'get_data_ModulesByStatus',
0
);
$load_filter_modal = get_parameter('load_filter_modal', 0);
$save_filter_modal = get_parameter('save_filter_modal', 0);
$get_monitor_filters = get_parameter('get_monitor_filters', 0);
@ -248,7 +253,7 @@ if (check_login()) {
false,
false
);
$formtable->data[0][3] = "<a href='javascript: show_module_detail_dialog(".$module_id.', '.$agentId.', "'.$server_name.'", 0, -1,"'.modules_get_agentmodule_name($module_id)."\")'>".html_print_image('images/refresh.png', true, ['style' => 'vertical-align: middle;', 'border' => '0', 'class' => 'invert_filter' ]).'</a>';
$formtable->data[0][3] = "<a href='javascript: show_module_detail_dialog(".$module_id.', '.$agentId.', "'.$server_name.'", 0, -1,"'.modules_get_agentmodule_name($module_id)."\")'>".html_print_image('images/refresh@svg.svg', true, ['style' => 'vertical-align: middle;', 'border' => '0', 'class' => 'main_menu_icon invert_filter' ]).'</a>';
$formtable->rowspan[0][3] = 2;
$formtable->cellstyle[0][3] = 'vertical-align: middle;';
@ -1279,14 +1284,14 @@ if (check_login()) {
$linkCaption = __('Refresh');
}
$moduleActionButtons[] = html_print_button(
$linkCaption,
'additional_action_for_'.$idAgenteModulo,
false,
'window.location.assign("index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'&amp;id_agente_modulo='.$module['id_agente_modulo'].'&amp;refr=60'.$addedLinkParams.'")',
$moduleActionButtons[] = html_print_anchor(
[
'mode' => 'link',
'style' => 'justify-content: flex-end;',
'href' => 'index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'&amp;id_agente_modulo='.$module['id_agente_modulo'].'&amp;refr=60'.$addedLinkParams.'"',
'content' => html_print_image(
'images/go-back@svg.svg',
true,
[ 'class' => 'main_menu_icon' ]
),
],
true
);
@ -1296,14 +1301,14 @@ if (check_login()) {
if ((bool) check_acl($config['id_user'], $id_grupo, 'AW') === true
&& $cluster_view === false
) {
$moduleActionButtons[] = html_print_button(
__('Edit'),
'edit_module_'.$idAgenteModulo,
false,
'window.location.assign("index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente='.$id_agente.'&amp;tab=module&amp;id_agent_module='.$module['id_agente_modulo'].'&amp;edit_module='.$module['id_modulo'].'")',
$moduleActionButtons[] = html_print_anchor(
[
'mode' => 'link',
'style' => 'justify-content: flex-end;',
'href' => 'index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente='.$id_agente.'&amp;tab=module&amp;id_agent_module='.$module['id_agente_modulo'].'&amp;edit_module='.$module['id_modulo'].'"',
'content' => html_print_image(
'images/edit.svg',
true,
[ 'class' => 'main_menu_icon' ]
),
],
true
);
@ -1665,6 +1670,259 @@ if (check_login()) {
return;
}
if ($get_data_ModulesByStatus === true) {
global $config;
$data = [];
$table_id = get_parameter('table_id', '');
$search = get_parameter('search', '');
$status = get_parameter('status', '');
$start = get_parameter('start', 0);
$length = get_parameter('length', $config['block_size']);
// There is a limit of (2^32)^2 (18446744073709551615) rows in a MyISAM table, show for show all use max nrows.
$length = ($length != '-1') ? $length : '18446744073709551615';
$order = get_datatable_order(true);
$nodes = get_parameter('nodes', 0);
$where = '';
$recordsTotal = 0;
if (empty($search) === false) {
$where = 'tagente_modulo.nombre LIKE "%%'.$search.'%%" AND ';
}
$where .= sprintf(
'tagente_estado.estado IN (%s)
AND tagente_modulo.delete_pending = 0',
$status
);
if (is_metaconsole() === false) {
$order_by = '';
switch ($order['field']) {
case 'nombre':
$order_by = 'tagente_modulo.'.$order['field'].' '.$order['direction'];
break;
case 'alias':
$order_by = 'tagente.'.$order['field'].' '.$order['direction'];
break;
case 'last_status_change':
$order_by = 'tagente_estado.'.$order['field'].' '.$order['direction'];
break;
case 'estado':
$order_by = 'tagente_estado.'.$order['field'].' '.$order['direction'];
break;
default:
$order_by = 'tagente_estado.last_status_change desc';
break;
}
$sql = sprintf(
'SELECT
tagente_modulo.nombre,
tagente.alias,
tagente.id_agente,
tagente_estado.last_status_change,
tagente_estado.estado
FROM tagente_modulo
INNER JOIN tagente
ON tagente_modulo.id_agente = tagente.id_agente
INNER JOIN tagente_estado
ON tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
WHERE %s
ORDER BY %s
LIMIT %d, %d',
$where,
$order_by,
$start,
$length
);
$data = db_get_all_rows_sql($sql);
$sql_count = sprintf(
'SELECT COUNT(*) AS "total"
FROM tagente_modulo
INNER JOIN tagente
ON tagente_modulo.id_agente = tagente.id_agente
INNER JOIN tagente_estado
ON tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo'
);
$recordsTotal = db_get_value_sql($sql_count);
// Metaconsole.
} else {
// $servers_ids = array_column(metaconsole_get_servers(), 'id');
$servers_ids = explode(',', $nodes);
foreach ($servers_ids as $server_id) {
try {
$node = new Node((int) $server_id);
$node->connect();
$sql = sprintf(
'SELECT
tagente_modulo.nombre,
tagente.alias,
tagente.id_agente,
tagente_estado.last_status_change,
tagente_estado.estado
FROM tagente_modulo
INNER JOIN tagente
ON tagente_modulo.id_agente = tagente.id_agente
INNER JOIN tagente_estado
ON tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
WHERE %s',
$where
);
$res_sql = db_get_all_rows_sql($sql);
foreach ($res_sql as $row_sql) {
$row_sql['server_name'] = $node->server_name();
$row_sql['server_url'] = $node->server_url();
array_push($data, $row_sql);
}
$node->disconnect();
} catch (\Exception $e) {
// Unexistent modules.
$node->disconnect();
}
}
// Drop temporary table if exist.
db_process_sql('DROP TEMPORARY TABLE IF EXISTS temp_modules_status;');
$table_temporary = 'CREATE TEMPORARY TABLE IF NOT EXISTS temp_modules_status (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
nombre VARCHAR(600),
alias VARCHAR(600),
id_agente INT,
last_status_change INT,
estado INT,
server_name VARCHAR(100),
server_url VARCHAR(200),
PRIMARY KEY (`id`),
KEY `nombre` (`nombre`(600))
)';
db_process_sql($table_temporary);
$result = db_process_sql_insert_multiple('temp_modules_status', $data);
if (empty($result) === false) {
$data = [];
$sql = '';
$where = '';
if (empty($search) === false) {
$where = 'nombre LIKE "%%'.$search.'%%" AND ';
}
$where .= sprintf(
'estado IN (%s)',
$status
);
$order_by = $order['field'].' '.$order['direction'];
$sql = sprintf(
'SELECT
nombre,
alias,
id_agente,
last_status_change,
estado,
server_name,
server_url
FROM temp_modules_status
WHERE %s
ORDER BY %s
LIMIT %d, %d',
$where,
$order_by,
$start,
$length
);
$data = db_get_all_rows_sql($sql);
$sql_count = sprintf(
'SELECT COUNT(*) AS "total"
FROM temp_modules_status'
);
$recordsTotal = db_get_value_sql($sql_count);
}
}
if ($data === false) {
$data = [];
}
foreach ($data as $key => $row) {
$data[$key]['nombre'] = html_ellipsis_characters($row['nombre'], 35, true);
if (is_metaconsole() === false) {
$name_link = '<a href="index.php?sec=estado&sec2=';
} else {
$name_link = '<a href="'.$row['server_url'].'index.php?sec=estado&sec2=';
}
$name_link .= 'operation/agentes/ver_agente&id_agente='.$row['id_agente'];
$name_link .= '"><b>';
$name_link .= '<span class="ellipsis-35ch">'.html_ellipsis_characters($row['alias'], 35, true).'</span>';
$name_link .= '</b></a>';
$data[$key]['alias'] = $name_link;
$data[$key]['last_status_change'] = ui_print_timestamp(
$row['last_status_change'],
true
);
switch ((int) $row['estado']) {
case 0:
$status_img = ui_print_status_image(STATUS_MODULE_OK, __('Normal'), true);
break;
case 1:
case 6:
$status_img = ui_print_status_image(STATUS_MODULE_CRITICAL, __('Critical'), true);
break;
case 2:
$status_img = ui_print_status_image(STATUS_MODULE_WARNING, __('Warning'), true);
break;
case 3:
$status_img = ui_print_status_image(STATUS_MODULE_UNKNOWN, __('Unknown'), true);
break;
case 5:
$status_img = ui_print_status_image(STATUS_MODULE_NO_DATA, __('Not init'), true);
break;
default:
$status_img = '';
break;
}
$data[$key]['estado'] = $status_img;
}
echo json_encode(
[
'data' => $data,
'recordsTotal' => $recordsTotal,
'recordsFiltered' => $recordsTotal,
]
);
}
if ($get_children_modules === true) {
$parent_modules = get_parameter('parent_modulues', false);
$children_selected = [];

View File

@ -0,0 +1,60 @@
<?php
/**
* Tips pandora
*
* @category Ajax library.
* @package Pandora FMS
* @subpackage Modules.
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 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.
* ============================================================================
*/
// Begin.
global $config;
require_once $config['homedir'].'/include/class/TipsWindow.class.php';
if (is_ajax() === false) {
exit;
}
// Control call flow.
try {
// User access and validation is being processed on class constructor.
$actions = new TipsWindow();
} catch (Exception $e) {
exit;
}
// Ajax controller.
$method = get_parameter('method', '');
if (method_exists($actions, $method) === true) {
if ($actions->ajaxMethod($method) === true) {
$actions->{$method}();
} else {
$actions->error('Unavailable method.');
}
} else {
$actions->error('Method not found. ['.$method.']');
}
// Stop any execution.
exit;

View File

@ -47,6 +47,7 @@ if (json_last_error() === JSON_ERROR_NONE) {
$data = $data_decoded['data'];
$session_id = $data_decoded['session_id'];
$type_graph_pdf = $data_decoded['type_graph_pdf'];
$id_user = $data_decoded['id_user'];
$data_combined = [];
if (isset($data_decoded['data_combined']) === true) {
@ -62,6 +63,10 @@ if (json_last_error() === JSON_ERROR_NONE) {
// Initialize session.
global $config;
// Care whit this!!! check_login not working if you remove this.
$config['id_user'] = $id_user;
$_SESSION['id_usuario'] = $id_user;
// Try to initialize session using existing php session id.
$user = new PandoraFMS\User(['phpsessionid' => $session_id]);
if (check_login(false) === false) {
@ -82,6 +87,7 @@ if (check_login(false) === false) {
</head>
<body>
<h1>Access is not granted</h1>
<div id="container-chart-generator-item" style="display:none; margin:0px;">
</body>
</html>

View File

@ -155,11 +155,11 @@ class CalendarManager
'text' => '<a href="'.ui_get_full_url(
$this->url.'&tab_calendar=list'
).'&pure='.(int) $config['pure'].'">'.html_print_image(
'images/list.png',
'images/logs@svg.svg',
true,
[
'title' => __('Alert calendar list'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
];
@ -177,11 +177,11 @@ class CalendarManager
'text' => '<a href="'.ui_get_full_url(
$this->url.'&tab_calendar=list&op=edit&id='.$id
).'&pure='.(int) $config['pure'].'">'.html_print_image(
'images/pencil.png',
'images/edit.svg',
true,
[
'title' => __('Edit calendar'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
];
@ -195,7 +195,7 @@ class CalendarManager
true,
[
'title' => __('Alert special days'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
];
@ -697,7 +697,7 @@ class CalendarManager
);
$tmp->options .= '">';
$tmp->options .= html_print_image(
'images/config.png',
'images/edit.svg',
true,
[
'title' => __('Edit'),
@ -731,7 +731,7 @@ class CalendarManager
);
$tmp->options .= '">';
$tmp->options .= html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete'),

View File

@ -2862,7 +2862,7 @@ class ConsoleSupervisor
return;
}
$sync = new PandoraFMS\Enterprise\Metaconsole\Synchronizer();
$sync = new PandoraFMS\Enterprise\Metaconsole\Synchronizer(true);
$counts = $sync->getQueues(true);
if (count($counts) === 0) {
@ -2919,7 +2919,7 @@ class ConsoleSupervisor
return;
}
$sync = new PandoraFMS\Enterprise\Metaconsole\Synchronizer();
$sync = new PandoraFMS\Enterprise\Metaconsole\Synchronizer(true);
$queues = $sync->getQueues();
if (count($queues) === 0) {
// Clean all.

View File

@ -139,11 +139,11 @@ class Diagnostics extends Wizard
$pdf_url = $this->url.'&pdf=true';
$pdf_img = html_print_image(
'images/pdf.png',
'images/file-pdf.svg',
true,
[
'title' => __('Export to PDF'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
'onclick' => 'blockResubmit($(this))',
]
);

View File

@ -182,22 +182,22 @@ class EventSound extends HTML
$tabs = [
'list' => [
'text' => '<a href="'.$base_url.'">'.html_print_image(
'images/eye_show.png',
'images/see-details@svg.svg',
true,
[
'title' => __('Sounds'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
'active' => (bool) ($tab != 'add'),
],
'options' => [
'text' => '<a href="'.$setup_url.'">'.html_print_image(
'images/pen.png',
'images/edit.svg',
true,
[
'title' => __('Create'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
'active' => (bool) ($tab == 'add'),
@ -239,38 +239,53 @@ class EventSound extends HTML
ui_require_css_file('discovery');
if ($tab === 'add') {
echo '<form method="post" enctype="multipart/form-data" action="index.php?sec=eventos&sec2=godmode/events/configuration_sounds&tab=add&action=create">';
echo '<form method="post" enctype="multipart/form-data" action="index.php?sec=eventos&sec2=godmode/events/configuration_sounds&tab=add&action=create"
class="max_floating_element_size">';
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->data = [];
$table->data[0][0] = __('Name:');
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data[0][1] = html_print_input_text(
'name',
'',
'',
80,
100,
true,
false,
true
$table->data[0][0] = html_print_label_input_block(
__('Name:'),
html_print_input_text(
'name',
'',
'',
80,
100,
true,
false,
true
)
);
$table->data[1][0] = __('WAV Sound');
$table->data[1][1] = html_print_input_file('file', true, ['required' => true]);
$table->data[0][1] = html_print_label_input_block(
__('WAV Sound'),
html_print_input_file(
'file',
true,
[
'required' => true,
'accept' => 'audio/*',
]
)
);
html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button(
__('Create'),
'save_sound',
false,
'class="sub wand"'
html_print_action_buttons(
html_print_submit_button(
__('Create'),
'save_sound',
false,
['icon' => 'wand'],
true
)
);
echo '</div>';
echo '</form>';
// Load own javascript file.
@ -305,7 +320,7 @@ class EventSound extends HTML
[
'id' => $this->tableId,
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $this->ajaxController,
@ -321,7 +336,7 @@ class EventSound extends HTML
[
'label' => __('Free search').ui_print_help_tip(__('Search filter by Name or Sound fields content'), true),
'type' => 'text',
'class' => 'w200px',
'class' => 'w70p',
'id' => 'filter_text',
'name' => 'filter_text',
],
@ -333,12 +348,13 @@ class EventSound extends HTML
'0' => __('No'),
'1' => __('Yes'),
],
'class' => 'w100px',
'class' => 'w100p',
'id' => 'active',
'name' => 'active',
],
],
],
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar ',
]
);
} catch (Exception $e) {
@ -350,6 +366,7 @@ class EventSound extends HTML
close_meta_frame();
}
html_print_action_buttons('');
// Load own javascript file.
echo $this->loadJS();
}
@ -428,7 +445,7 @@ class EventSound extends HTML
true,
[
'title' => $action,
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$options .= '</a>';

View File

@ -3246,7 +3246,7 @@ class NetworkMap
$table->data['template_row']['edit'] = '';
$table->data['template_row']['edit'] .= '<span class="edit_icon_correct" style="display: none">'.html_print_image('images/pixel_green.png', true, ['class' => 'main_menu_icon']).'</span><span class="edit_icon_fail" style="display: none" >'.html_print_image('images/dot_red.png', true).'</span><span class="edit_icon_progress" style="display: none">'.html_print_image('images/spinner.gif', true).'</span>';
// <span class="edit_icon"><a class="edit_icon_link" title="'.__('Update').'" href="#">'.html_print_image('images/config.png', true, ['class' => 'invert_filter']).'</a></span>';
// <span class="edit_icon"><a class="edit_icon_link" title="'.__('Update').'" href="#">'.html_print_image('images/edit.svg', true, ['class' => 'invert_filter']).'</a></span>';
$table->data['template_row']['edit'] .= '<a class="delete_icon" href="#">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter', 'style' => 'padding: 10px']).'</a>';
$table->colspan['no_relations']['0'] = 5;

View File

@ -401,7 +401,7 @@ class SatelliteAgent extends HTML
if ($disable === false) {
$tmp->actions .= html_print_image(
($delete === true) ? 'images/add.png' : 'images/cross.png',
($delete === true) ? 'images/add.png' : 'images/delete.svg',
true,
[
'border' => '0',

Some files were not shown because too many files have changed in this diff Show More