Merge branch 'develop' into ent-8642-nuevo-widget-heatmap

This commit is contained in:
Daniel Maya 2023-03-13 15:17:18 +01:00
commit 0e4d423825
127 changed files with 2298 additions and 515 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.769-230310
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-230310"
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 => '230310';
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 230310
%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 230310
%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="230310"
PI_BUILD="230313"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230310}
{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 230310")
#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 230310))"
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-230310
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-230310"
pandora_version="7.0NG.769-230313"
package_pear=0
package_pandora=1

View File

@ -115,11 +115,11 @@ 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 = [
@ -226,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

@ -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

@ -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

@ -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

@ -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'),

View File

@ -295,7 +295,8 @@ foreach ($extensions as $file => $extension) {
$data[] = html_print_menu_button(
[
'href' => 'index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file,
'image' => 'images/cross.png',
'image' => 'images/delete.svg',
'class' => 'main_menu_icon invert_filter',
'title' => __('Delete'),
'onClick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
],

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

@ -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

@ -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

@ -4272,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>';
@ -4313,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']
);
@ -4739,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 {
@ -4747,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>';
}
@ -4757,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>';
}
@ -4795,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

@ -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

@ -373,7 +373,7 @@ 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>';

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

@ -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

@ -1888,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

@ -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>';
}

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: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

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

@ -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

@ -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'),
@ -445,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',

View File

@ -236,7 +236,7 @@ class SatelliteCollection extends HTML
$tmp->actions = '';
$tmp->actions .= html_print_image(
($delete === 0) ? 'images/add.png' : 'images/cross.png',
($delete === 0) ? 'images/add.png' : 'images/delete.svg',
true,
[
'border' => '0',

View File

@ -424,21 +424,21 @@ class TreeService extends Tree
switch ($item->agent()->lastStatus()) {
case AGENT_STATUS_NORMAL:
$tmp['statusImageHTML'] = '<img src="'.ui_get_full_url('images/status_sets/default/agent_ok_ball.png').'" data-title="NORMAL status." data-use_title_for_force_title="1" class="forced_title" alt="NORMAL status." />';
$tmp['statusImageHTML'] = html_print_div(['class' => 'tree-service-status', 'style' => 'background-color: #82b92e', 'title' => __('Normal status') ], true);
break;
case AGENT_STATUS_CRITICAL:
case AGENT_STATUS_ALERT_FIRED:
$tmp['statusImageHTML'] = '<img src="'.ui_get_full_url('images/status_sets/default/agent_critical_ball.png').'" data-title="CRITICAL status." data-use_title_for_force_title="1" class="forced_title" alt="CRITICAL status." />';
$tmp['statusImageHTML'] = html_print_div(['class' => 'tree-service-status', 'style' => 'background-color: #e63c52', 'title' => __('Critical status') ], true);
break;
case AGENT_STATUS_WARNING:
$tmp['statusImageHTML'] = '<img src="'.ui_get_full_url('images/status_sets/default/agent_warning_ball.png').'" data-title="WARNING status." data-use_title_for_force_title="1" class="forced_title" alt="WARNING status." />';
$tmp['statusImageHTML'] = html_print_div(['class' => 'tree-service-status', 'style' => 'background-color: #f3b200', 'title' => __('Warning status') ], true);
break;
case AGENT_STATUS_UNKNOWN:
default:
$tmp['statusImageHTML'] = '<img src="'.ui_get_full_url('images/status_sets/default/agent_no_data_ball.png').'" data-title="UNKNOWN status." data-use_title_for_force_title="1" class="forced_title" alt="UNKNOWN status." />';
$tmp['statusImageHTML'] = html_print_div(['class' => 'tree-service-status', 'style' => 'background-color: #B2B2B2', 'title' => __('Unknown status') ], true);
break;
}
@ -634,36 +634,20 @@ class TreeService extends Tree
$tmp['rootID'] = $this->rootID;
switch ($item->service()->lastStatus()) {
case SERVICE_STATUS_NORMAL:
$tmp['statusImageHTML'] = '<img src="';
$tmp['statusImageHTML'] .= ui_get_full_url(
'images/status_sets/default/agent_ok_ball.png'
);
$tmp['statusImageHTML'] .= '" data-title="NORMAL status." data-use_title_for_force_title="1" class="forced_title" alt="NORMAL status." />';
$tmp['statusImageHTML'] = html_print_div(['class' => 'tree-service-status', 'style' => 'background-color: #82b92e', 'title' => __('Normal status') ], true);
break;
case SERVICE_STATUS_CRITICAL:
$tmp['statusImageHTML'] = '<img src="';
$tmp['statusImageHTML'] .= ui_get_full_url(
'images/status_sets/default/agent_critical_ball.png'
);
$tmp['statusImageHTML'] .= '" data-title="CRITICAL status." data-use_title_for_force_title="1" class="forced_title" alt="CRITICAL status." />';
$tmp['statusImageHTML'] = html_print_div(['class' => 'tree-service-status', 'style' => 'background-color: #e63c52', 'title' => __('Critical status') ], true);
break;
case SERVICE_STATUS_WARNING:
$tmp['statusImageHTML'] = '<img src="';
$tmp['statusImageHTML'] .= ui_get_full_url(
'images/status_sets/default/agent_warning_ball.png'
);
$tmp['statusImageHTML'] .= '" data-title="WARNING status." data-use_title_for_force_title="1" class="forced_title" alt="WARNING status." />';
$tmp['statusImageHTML'] = html_print_div(['class' => 'tree-service-status', 'style' => 'background-color: #f3b200', 'title' => __('Warning status') ], true);
break;
case SERVICE_STATUS_UNKNOWN:
default:
$tmp['statusImageHTML'] = '<img src="';
$tmp['statusImageHTML'] .= ui_get_full_url(
'images/status_sets/default/agent_no_data_ball.png'
);
$tmp['statusImageHTML'] .= '" data-title="UNKNOWN status." data-use_title_for_force_title="1" class="forced_title" alt="UNKNOWN status." />';
$tmp['statusImageHTML'] = html_print_div(['class' => 'tree-service-status', 'style' => 'background-color: #B2B2B2', 'title' => __('Unknown status') ], true);
break;
}
break;

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC230310';
$build_version = 'PC230313';
$pandora_version = 'v7.0NG.769';
// Do not overwrite default timezone set if defined.

View File

@ -180,7 +180,7 @@ function folder_table($graphs)
if (($report_w || $report_m) && users_can_manage_group_all($access)) {
$data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.$graph['id_graph'].'">'.html_print_image(
'images/config.png',
'images/edit.svg',
true,
['class' => 'invert_filter']
).'</a>';
@ -188,7 +188,7 @@ function folder_table($graphs)
$data[4] .= '&nbsp;';
$data[4] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs&delete_graph=1&id='.$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\'))
return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'class' => 'invert_filter']).'</a>'.html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete mrgn_lft_2px"', true);
return false;">'.html_print_image('images/delete.svg', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'class' => 'invert_filter']).'</a>'.html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete mrgn_lft_2px"', true);
}
array_push($table->data, $data);

View File

@ -532,11 +532,11 @@ function cron_list_table()
$task['id']
),
'content' => html_print_image(
'images/target.png',
'images/change-active.svg',
true,
[
'title' => __('Force run'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
],
@ -570,11 +570,11 @@ function cron_list_table()
$task['id']
),
'content' => html_print_image(
'images/target.png',
'images/change-active.svg',
true,
[
'title' => __('Force run'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
],
@ -625,11 +625,11 @@ function cron_list_table()
$task['id']
),
'content' => html_print_image(
'images/target.png',
'images/change-active.svg',
true,
[
'title' => __('Force run'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
],
@ -717,11 +717,11 @@ function cron_list_table()
$task['id']
),
'content' => html_print_image(
'images/target.png',
'images/change-active.svg',
true,
[
'title' => __('Force run'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
],
@ -753,11 +753,11 @@ function cron_list_table()
$task['id']
),
'content' => html_print_image(
'images/target.png',
'images/change-active.svg',
true,
[
'title' => __('Force run'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
],
@ -799,11 +799,11 @@ function cron_list_table()
$task['id']
),
'content' => html_print_image(
'images/target.png',
'images/change-active.svg',
true,
[
'title' => __('Force run'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
],
@ -841,11 +841,11 @@ function cron_list_table()
$task['id']
),
'content' => html_print_image(
'images/target.png',
'images/change-active.svg',
true,
[
'title' => __('Force run'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
],
@ -875,11 +875,11 @@ function cron_list_table()
$task['id']
),
'content' => html_print_image(
'images/target.png',
'images/change-active.svg',
true,
[
'title' => __('Force run'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
],
@ -915,11 +915,11 @@ function cron_list_table()
$data[7] = '<a href="'.$url;
$data[7] .= 'edit_task=1&id='.$task['id'].'">';
$data[7] .= html_print_image(
'images/config.png',
'images/edit.svg',
true,
[
'title' => __('Edit'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[7] .= '</a>';
@ -929,11 +929,11 @@ function cron_list_table()
$data[7] .= '<a href="'.$url;
$data[7] .= 'delete_task=1&id_user_task='.$task['id'].'">';
$data[7] .= html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[7] .= '</a>';
@ -943,11 +943,11 @@ function cron_list_table()
$data[7] = '<a href="'.$url;
$data[7] .= 'edit_task=1&id='.$task['id'].'">';
$data[7] .= html_print_image(
'images/config.png',
'images/edit.svg',
true,
[
'title' => __('Edit'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[7] .= '</a>';
@ -957,11 +957,11 @@ function cron_list_table()
$data[7] .= '<a href="'.$url;
$data[7] .= 'delete_task=1&id_user_task='.$task['id'].'">';
$data[7] .= html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[7] .= '</a>';
@ -982,7 +982,7 @@ function cron_list_table()
true,
[
'title' => ((bool) $task['enabled'] === true) ? __('Disable task') : __('Enable task'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
],

View File

@ -3453,7 +3453,7 @@ function events_page_responses($event)
__('Update'),
'status_button',
false,
'event_change_status(\''.$event['similar_ids'].'\','.$event['server_id'].');',
'event_change_status("'.$event['similar_ids'].'",'.$event['server_id'].');',
[
'icon' => 'next',
'mode' => 'link',
@ -3484,7 +3484,7 @@ function events_page_responses($event)
__('Add comment'),
'comment_button',
false,
'$(\'#link_comments\').trigger(\'click\');',
'$("#link_comments").trigger("click");',
[
'icon' => 'next',
'mode' => 'link',
@ -3511,7 +3511,7 @@ function events_page_responses($event)
__('Delete event'),
'delete_button',
false,
'if(!confirm(\''.__('Are you sure?').'\')) { return false; } this.form.submit();',
'if(!confirm("'.__('Are you sure?').'")) { return false; } this.form.submit();',
[
'icon' => 'cancel',
'mode' => 'link',
@ -4260,7 +4260,7 @@ function events_page_details($event, $server_id=0)
__('View custom fields'),
'custom_button',
false,
'$(\'#link_custom_fields\').trigger(\'click\');',
'$("#link_custom_fields").trigger("click");',
[ 'mode' => 'link' ],
true
);
@ -5172,7 +5172,7 @@ function events_page_comments($event, $ajax=false, $groupedComments=[])
__('Add comment'),
'comment_button',
false,
'event_comment(\''.base64_encode(json_encode($event)).'\');',
'event_comment("'.base64_encode(json_encode($event)).'");',
[
'icon' => 'next',
'mode' => 'mini secondary',
@ -5779,7 +5779,7 @@ function get_row_response_action(
__('Execute again'),
'btn_str',
false,
'perform_response(\''.base64_encode(json_encode($event_response)).'\','.$response_id.',\''.trim($index).'\')',
'perform_response("'.base64_encode(json_encode($event_response)).'",'.$response_id.',"'.trim($index).'")',
[
'icon' => 'next',
'mode' => 'mini secondary',

View File

@ -1585,7 +1585,7 @@ function gis_add_conection_maps_in_form($map_connection_list)
<tr class="row_0">
<td>'.html_print_input_text('map_connection_name_'.$mapConnection['id_conection'], $mapConnectionRowDB['conection_name'], '', 20, 40, true, true).'</td>
<td>'.$radioButton.'</td>
<td><a id="delete_row" href="javascript: deleteConnectionMap(\''.$mapConnection['id_conection'].'\')">'.html_print_image('images/cross.png', true, ['alt' => '', 'class' => 'invert_filter']).'</a></td>
<td><a id="delete_row" href="javascript: deleteConnectionMap(\''.$mapConnection['id_conection'].'\')">'.html_print_image('images/delete.svg', true, ['alt' => '', 'class' => 'invert_filter']).'</a></td>
</tr>
</tbody>
<script type="text/javascript">

View File

@ -4565,6 +4565,12 @@ function html_print_image(
// Dont use safe_input here or the performance will dead.
$style = '';
if (empty($options) === false && isset($options['class']) === true) {
$options['class'] .= ' main_menu_icon';
} else {
$options['class'] = 'main_menu_icon invert_filter';
}
if (!empty($options)) {
// Deprecated or value-less attributes.
if (isset($options['align'])) {
@ -6734,6 +6740,32 @@ function html_print_extended_select_for_downtime_cron(
}
/**
* Ellipse string to x characters.
*
* @param string $string String to ellipsis.
* @param integer $characters Characters size to show.
* @return string String ellipsed.
*/
function html_ellipsis_characters(
string $string,
int $characters,
bool $return=false
) {
$out = $string;
if (strlen($string) > $characters) {
$out = substr($string, 0, $characters).'...';
}
if ($return === true) {
return $out;
} else {
echo $out;
}
}
/**
* Return formed subtitle with the new Pandora's style.
*

View File

@ -39,9 +39,9 @@ function integriaims_tabs($active_tab, $view=false)
$url_tabs = ui_get_full_url('index.php?sec=incident&sec2=operation/incidents/');
$setup_tab['text'] = '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup&section=integria').'">'.html_print_image('images/setup.png', true, ['title' => __('Configure Integria IMS'), 'class' => 'invert_filter']).'</a>';
$list_tab['text'] = '<a href="'.$url_tabs.'list_integriaims_incidents">'.html_print_image('images/list.png', true, ['title' => __('Ticket list'), 'class' => 'invert_filter']).'</a>';
$create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident">'.html_print_image('images/pencil.png', true, ['title' => __('New ticket'), 'class' => 'invert_filter']).'</a>';
$setup_tab['text'] = '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup&section=integria').'">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Configure Integria IMS'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$list_tab['text'] = '<a href="'.$url_tabs.'list_integriaims_incidents">'.html_print_image('images/logs@svg.svg', true, ['title' => __('Ticket list'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident">'.html_print_image('images/edit.svg', true, ['title' => __('New ticket'), 'class' => 'main_menu_icon invert_filter']).'</a>';
switch ($active_tab) {
case 'setup_tab':
@ -70,8 +70,8 @@ function integriaims_tabs($active_tab, $view=false)
}
if ($view) {
$create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/pencil.png', true, ['title' => __('Edit ticket'), 'class' => 'invert_filter']).'</a>';
$view_tab['text'] = '<a href="'.$url_tabs.'dashboard_detail_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/operation.png', true, ['title' => __('View ticket'), 'class' => 'invert_filter']).'</a>';
$create_tab['text'] = '<a href="'.$url_tabs.'configure_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/edit.svg', true, ['title' => __('Edit ticket'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$view_tab['text'] = '<a href="'.$url_tabs.'dashboard_detail_integriaims_incident&incident_id='.$view.'">'.html_print_image('images/details.svg', true, ['title' => __('View ticket'), 'class' => 'main_menu_icon invert_filter']).'</a>';
// When the current page is the View page.
if (!$active_tab) {
$view_tab['active'] = true;

View File

@ -1019,7 +1019,7 @@ function modules_format_delete($id)
$txt = '';
if (check_acl($config['id_user'], $group, 'AW') == 1) {
$txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete='.$id.'">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter']).'</a>';
$txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete='.$id.'">'.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter']).'</a>';
}
return $txt;
@ -1040,7 +1040,7 @@ function modules_format_delete_string($id)
$txt = '';
if (check_acl($config['id_user'], $group, 'AW') == 1) {
$txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete_string='.$id.'">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter']).'</a>';
$txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete_string='.$id.'">'.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter']).'</a>';
}
return $txt;
@ -1061,7 +1061,7 @@ function modules_format_delete_log4x($id)
$txt = '';
if (check_acl($config['id_user'], $group, 'AW') == 1) {
$txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete_log4x='.$id.'">'.html_print_image('images/cross.png', true, ['border' => '0', 'class' => 'invert_filter']).'</a>';
$txt = '<a href="index.php?sec=estado&sec2=operation/agentes/datos_agente&period='.$period.'&id='.$module_id.'&delete_log4x='.$id.'">'.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter']).'</a>';
}
return $txt;

View File

@ -863,18 +863,22 @@ function notifications_print_source_select_box($info_selec, $id, $source_id)
true
),
html_print_image(
'images/input_add.png',
'images/fail@svg.svg',
true,
[
'style' => 'width: 14px;rotate: 45deg',
'title' => $add_title,
'class' => 'main_menu_icon invert_filter',
'onclick' => sprintf("add_source_dialog('%s', '%s')", $id, $source_id),
]
),
html_print_image(
'images/input_delete.png',
'images/delete.svg',
true,
[
'style' => 'width: 14px',
'title' => $delete_title,
'class' => 'main_menu_icon invert_filter',
'onclick' => sprintf(
"remove_source_elements('%s', '%s')",
$id,
@ -923,29 +927,31 @@ function notifications_print_two_ways_select($info_selec, $users, $source_id)
''
),
html_print_image(
'images/darrowright.png',
'images/arrow@svg.svg',
true,
[
'title' => __('Add elements'),
'style' => 'rotate: 90deg',
'onclick' => sprintf(
"notifications_modify_two_ways_element('%s', '%s', 'add')",
$users,
$source_id
),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
html_print_image(
'images/darrowleft.png',
'images/arrow@svg.svg',
true,
[
'title' => __('Remove elements'),
'style' => 'rotate: 0',
'onclick' => sprintf(
"notifications_modify_two_ways_element('%s', '%s', 'remove')",
$users,
$source_id
),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
),
html_print_select(

View File

@ -12169,24 +12169,11 @@ function reporting_get_stats_alerts($data, $links=false)
$tdata[3] = html_print_div(
[
'title' => __('Fired alerts'),
'style' => 'background-color: '.COL_CRITICAL,
'class' => 'alert_background_state main_menu_icon invert_filter',
'style' => 'background-color: '.COL_ALERTFIRED,
'class' => 'alert_background_state main_menu_icon',
],
true
);
/*
html_print_image(
'images/bell_error.png',
true,
[
'title' => __('Fired alerts'),
'class' => 'invert_filter',
],
false,
false,
false,
true
);*/
$tdata[4] = $data['monitor_alerts_fired'] <= 0 ? '-' : $data['monitor_alerts_fired'];
$tdata[4] = '<a style="color: '.COL_ALERTFIRED.';" class="big_data" href="'.$urls['monitor_alerts_fired'].'">'.$tdata[4].'</a>';
$table_al->rowclass[] = '';

View File

@ -1017,40 +1017,58 @@ function servers_get_info($id_server=-1)
// Remote servers LAG Calculation (server_type != 0).
if ($server['server_type'] != 0) {
// MySQL 8.0 has function lag(). So, lag must be enclosed in quotations.
$result = db_get_row_sql(
'SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag,
AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS "lag"
FROM tagente_estado, tagente_modulo, tagente
WHERE utimestamp > 0
AND tagente.disabled = 0
AND tagente.id_agente = tagente_estado.id_agente
$sql = sprintf(
'SELECT COUNT(tam.id_agente_modulo) AS module_lag,
AVG(UNIX_TIMESTAMP() - tae.last_execution_try - tae.current_interval) AS "lag"
FROM (
SELECT tagente_estado.last_execution_try, tagente_estado.current_interval, tagente_estado.id_agente_modulo
FROM tagente_estado
WHERE tagente_estado.current_interval > 0
AND tagente_estado.last_execution_try > 0
AND tagente_estado.running_by = %d
) tae
JOIN (
SELECT tagente_modulo.id_agente_modulo
FROM tagente_modulo LEFT JOIN tagente
ON tagente_modulo.id_agente = tagente.id_agente
WHERE tagente.disabled = 0
AND tagente_modulo.disabled = 0
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
AND current_interval > 0
AND running_by = '.$server['id_server'].'
AND (UNIX_TIMESTAMP() - utimestamp) < ( current_interval * 10)
AND (UNIX_TIMESTAMP() - utimestamp) > current_interval'
) tam
ON tae.id_agente_modulo = tam.id_agente_modulo
WHERE (UNIX_TIMESTAMP() - tae.last_execution_try) > (tae.current_interval)
AND (UNIX_TIMESTAMP() - tae.last_execution_try) < ( tae.current_interval * 10)',
$server['id_server']
);
} else {
// Local/Dataserver server LAG calculation.
// MySQL 8.0 has function lag(). So, lag must be enclosed in quotations.
$result = db_get_row_sql(
'SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag,
AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS "lag"
FROM tagente_estado, tagente_modulo, tagente
WHERE utimestamp > 0
AND tagente.disabled = 0
AND tagente.id_agente = tagente_estado.id_agente
$sql = sprintf(
'SELECT COUNT(tam.id_agente_modulo) AS module_lag,
AVG(UNIX_TIMESTAMP() - tae.last_execution_try - tae.current_interval) AS "lag"
FROM (
SELECT tagente_estado.last_execution_try, tagente_estado.current_interval, tagente_estado.id_agente_modulo
FROM tagente_estado
WHERE tagente_estado.current_interval > 0
AND tagente_estado.last_execution_try > 0
AND tagente_estado.running_by = %d
) tae
JOIN (
SELECT tagente_modulo.id_agente_modulo
FROM tagente_modulo LEFT JOIN tagente
ON tagente_modulo.id_agente = tagente.id_agente
WHERE tagente.disabled = 0
AND tagente_modulo.disabled = 0
AND tagente_modulo.id_tipo_modulo < 5
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
AND current_interval > 0
AND (UNIX_TIMESTAMP() - utimestamp) < ( current_interval * 10)
AND running_by = '.$server['id_server'].'
AND (UNIX_TIMESTAMP() - utimestamp) > (current_interval * 1.1)'
) tam
ON tae.id_agente_modulo = tam.id_agente_modulo
WHERE (UNIX_TIMESTAMP() - tae.last_execution_try) > (tae.current_interval * 1.1)
AND (UNIX_TIMESTAMP() - tae.last_execution_try) < ( tae.current_interval * 10)',
$server['id_server']
);
}
$result = db_get_row_sql($sql);
// Lag over current_interval * 2 is not lag,
// it's a timed out module.
if (!empty($result['lag'])) {

View File

@ -144,7 +144,7 @@ function snmp_browser_get_html_tree(
// Branch or leave with branches!
if (isset($sub_level['__OID__'])) {
$output .= "<a onfocus='javascript: this.blur();' href='javascript: snmpGet(\"".addslashes($sub_level['__OID__'])."\");'>";
$output .= '<img src="'.$url.'/../../images/operation.png" class="vertical_middle">';
$output .= '<img src="'.$url.'/../../images/details.svg" class="main_menu_icon invert_filter vertical_middle">';
$output .= '</a>';
}

View File

@ -708,7 +708,7 @@ function ui_print_group_icon($id_group, $return=false, $path='', $style='', $lin
if ($link === true) {
if ($tactical_view === true) {
$output = '<a href="'.$config['homeurl'].'index.php?sec=gagente&sec2=godmode/groups/tactical&id_group='.$id_group.'">';
$output = '<a href="'.$config['homeurl'].'index.php?sec=gagent&sec2=godmode/groups/tactical&id_group='.$id_group.'">';
} else {
$output = '<a href="'.$config['homeurl'].'index.php?sec=estado&amp;sec2=operation/agentes/estado_agente&amp;refr=60&amp;group_id='.$id_group.'">';
}
@ -728,12 +728,13 @@ function ui_print_group_icon($id_group, $return=false, $path='', $style='', $lin
}
$icon = (str_contains($icon, '.svg') === true) ? $icon : $icon.'.svg';
$output .= html_print_image(
'images/'.$icon,
true,
[
'style' => $style,
'class' => $class,
'class' => 'main_menu_icon '.$class,
'alt' => groups_get_name($id_group, true),
'title' => groups_get_name($id_group, true),
],
@ -839,6 +840,10 @@ function ui_print_os_icon(
$subfolder .= '/so_big_icons';
}
if (isset($options['class']) === false) {
$options['class'] = 'main_menu_icon';
}
$no_in_meta = (is_metaconsole() === false);
$icon = (string) db_get_value('icon_name', 'tconfig_os', 'id_os', (int) $id_os);
@ -859,13 +864,29 @@ function ui_print_os_icon(
}
} else if ($apply_skin) {
if ($only_src) {
$output = html_print_image('images/'.$subfolder.'/'.$icon, true, $options, true, $relative, $no_in_meta, true);
$output = html_print_image(
'images/'.$subfolder.'/'.$icon,
true,
$options,
true,
$relative,
$no_in_meta,
true
);
} else {
if (!isset($options['title'])) {
$options['title'] = $os_name;
}
$output = html_print_image('images/'.$subfolder.'/'.$icon, true, $options, false, $relative, $no_in_meta, true);
$output = html_print_image(
'images/'.$subfolder.'/'.$icon,
true,
$options,
false,
$relative,
$no_in_meta,
true
);
}
} else {
// $output = "<img src='images/os_icons/" . $icon . "' alt='" . $os_name . "' title='" . $os_name . "'>";
@ -4457,7 +4478,6 @@ function ui_toggle(
$output .= " }\n";
$output .= " });\n";
$output .= " $('#tgl_ctrl_".$uniqid."').click(function() {\n";
$output .= " console.log('#image_".$uniqid."');";
$output .= ' if (hide_tgl_ctrl_'.$uniqid.") {\n";
$output .= ' hide_tgl_ctrl_'.$uniqid." = 0;\n";
$output .= " $('#tgl_div_".$uniqid."').css('height', 'auto');\n";
@ -7331,7 +7351,7 @@ function ui_get_inventory_module_add_form(
$row['hidden-input'] .= html_print_input_text('hidden-custom-field-input', '', '', 25, 40, true);
$row['hidden-input'] .= '<span>&nbsp;</span>';
$row['hidden-input'] .= html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'border' => '0',
@ -7379,7 +7399,7 @@ function ui_get_inventory_module_add_form(
$row['input'] .= '<span>&nbsp;</span>';
$row['input'] .= html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'border' => '0',

View File

@ -49,7 +49,7 @@ Once the selection of the connection (or connections) is done, there is a posibi
Each map has one or more layers<sup><span class="font_75p">1</span></sup> to show the agents. Each layer can have show the agents of a <strong>group</strong> and/or a <strong>list of agents</strong>. This way it's easy to set up the agents that will be shown on each Layer.
</p>
<p>
The layers can be set as <strong>visible</strong> or <strong>hidden</strong>, and select the <strong>group</strong> with the selector or add <strong>agents</strong> with the box. Once the layer is defined (it will not be completely saved until the whole map is saved) it will be moved to the left column of defined layers, where it is possible to <strong>order</strong> (<?php html_print_image('images/up.png', false, ['alt' => 'move up icon']); ?> and <?php html_print_image('images/down.png', false, ['alt' => 'move down icon']); ?>) them, <strong>delete</strong> (<?php html_print_image('images/cross.png', false, ['alt' => 'delete icon']); ?>), or <strong>edited</strong> (<?php html_print_image('images/config.png', false, ['alt' => 'edit icon']); ?>) again.
The layers can be set as <strong>visible</strong> or <strong>hidden</strong>, and select the <strong>group</strong> with the selector or add <strong>agents</strong> with the box. Once the layer is defined (it will not be completely saved until the whole map is saved) it will be moved to the left column of defined layers, where it is possible to <strong>order</strong> (<?php html_print_image('images/up.png', false, ['alt' => 'move up icon']); ?> and <?php html_print_image('images/down.png', false, ['alt' => 'move down icon']); ?>) them, <strong>delete</strong> (<?php html_print_image('images/delete.svg', false, ['alt' => 'delete icon']); ?>), or <strong>edited</strong> (<?php html_print_image('images/edit.svg', false, ['alt' => 'edit icon']); ?>) again.
</p>
<hr/>
<sup><span class="font_75p">1</span></sup> <span class="font_85p">The default map can have 0 layers as is the one used in the agent GIS view and only uses one layer with the agent name.</span>

View File

@ -26,7 +26,7 @@
<div class="pdd_l_30px w150px float-left line_17px">
<h3>Actions</h3>
<?php html_print_image('images/ok.png', false, ['title' => 'Validate event', 'alt' => 'Validate event']); ?> - Validate event<br>
<?php html_print_image('images/cross.png', false, ['title' => 'Delete event', 'alt' => 'Delete event']); ?> - Delete event<br>
<?php html_print_image('images/delete.svg', false, ['title' => 'Delete event', 'alt' => 'Delete event']); ?> - Delete event<br>
<?php html_print_image('images/eye.png', false, ['title' => 'Show more', 'alt' => 'Show more']); ?> - Show more<br>
<?php html_print_image('images/hourglass.png', false, ['title' => 'In progress', 'alt' => 'In progress']); ?> - In progress
</div>

View File

@ -22,7 +22,7 @@ Options:
<dd>Click on the view icon to <strong>view</strong> the map.</dd>
<dt>Default radio button</dt>
<dd>Click on the <strong>radio button</strong> corresponding to the map you want to make the default to set the <strong>default map</strong> </dd>
<dt><?php html_print_image('images/cross.png', false, ['alt' => 'Delete']); ?> Delete</dt>
<dt><?php html_print_image('images/delete.svg', false, ['alt' => 'Delete']); ?> Delete</dt>
<dd>Click on the delete icon to <strong>delete</strong> the map.</dd>
<dt>Create Button</dt>
<dd>Click on Create button to <strong>create</strong> a new map.</dd>

View File

@ -9,5 +9,5 @@
This page is the place where the admin can configure <strong>connections to GIS Map Servers</strong>.
</p>
<p>
Here it is possible to see the list of defined connections, <strong>edit</strong> any one of them by clicking on their name, <strong>delete</strong> any connection by clicking on the delete icon (<?php html_print_image('images/cross.png', false, ['alt' => 'delete icon']); ?>) or <strong>create</strong> new connections using the create button.
Here it is possible to see the list of defined connections, <strong>edit</strong> any one of them by clicking on their name, <strong>delete</strong> any connection by clicking on the delete icon (<?php html_print_image('images/delete.svg', false, ['alt' => 'delete icon']); ?>) or <strong>create</strong> new connections using the create button.
</p>

View File

@ -26,7 +26,7 @@
<div class="pdd_l_30px w150px float-left line_17px">
<h3>Acciones</h3>
<?php html_print_image('images/ok.png', false, ['title' => 'Validate event', 'alt' => 'Validate event']); ?> - Validar evento<br>
<?php html_print_image('images/cross.png', false, ['title' => 'Delete event', 'alt' => 'Delete event']); ?> - Borrar evento<br>
<?php html_print_image('images/delete.svg', false, ['title' => 'Delete event', 'alt' => 'Delete event']); ?> - Borrar evento<br>
<?php html_print_image('images/eye.png', false, ['title' => 'Mostrar más', 'alt' => 'Mostrar más']); ?> - Mostrar más<br>
<?php html_print_image('images/hourglass.png', false, ['title' => 'En progreso', 'alt' => 'En progreso']); ?> - En progreso
</div>

View File

@ -26,7 +26,7 @@ Opciones:
<dd>Haga click en icono de visualizar para <strong>visualizar</strong> el mapa.</dd>
<dt>Botón radio por defecto</dt>
<dd>Haga click en el <strong> botón radio </strong> que se corresponda con el mapa que quiere por defecto para instalar <strong>mapa por defecto</strong> </dd>
<dt><?php html_print_image('images/cross.png', false, ['alt' => 'Delete']); ?> Eliminar</dt>
<dt><?php html_print_image('images/delete.svg', false, ['alt' => 'Delete']); ?> Eliminar</dt>
<dd>Haga click en el botón de eliminar para <strong>eliminar</strong> el mapa</dd>
<dt>Crear botón </dt>
<dd>Haga click en el Botón de Crear para <strong>crear</strong> un mapa nuevo</dd>

View File

@ -57,7 +57,7 @@ GIS マップを設定するためには、少なくとも一つ選択されて
<p>
レイヤは、<strong>表示</strong><strong>非表示</strong>の設定ができ、<strong>グループ</strong>を選択や<strong>エージェント</strong>の追加ができます。
一度レイヤが定義されると、左側の定義済レイヤに移ります。(定義は、マップ全体が保存されるまでは保存されません。)
ここでは、再度、<strong>順番の変更</strong> (<?php html_print_image('images/up.png', false, ['alt' => 'move up icon']); ?>、<?php html_print_image('images/down.png', false, ['alt' => 'move down icon']); ?>)、<strong>削除</strong> (<?php html_print_image('images/cross.png', false, ['alt' => 'delete icon']); ?>)、<strong>編集</strong> (<?php html_print_image('images/config.png', false, ['alt' => 'edit icon']); ?>) ができます。
ここでは、再度、<strong>順番の変更</strong> (<?php html_print_image('images/up.png', false, ['alt' => 'move up icon']); ?>、<?php html_print_image('images/down.png', false, ['alt' => 'move down icon']); ?>)、<strong>削除</strong> (<?php html_print_image('images/delete.svg', false, ['alt' => 'delete icon']); ?>)、<strong>編集</strong> (<?php html_print_image('images/edit.svg', false, ['alt' => 'edit icon']); ?>) ができます。
</p>
<hr/>
<sup><span class="font_75p">1</span></sup> <span class="font_85p">デフォルトマップでは、エージェント名で一つのレイヤしか表示しない場合は、レイヤを持たない設定も可能です。</span>

View File

@ -26,7 +26,7 @@
<div class="pdd_l_30px w150px float-left line_17px">
<h3>アクション</h3>
<?php html_print_image('images/ok.png', false, ['title' => '承諾する', 'alt' => '承諾する']); ?> - 承諾する<br>
<?php html_print_image('images/cross.png', false, ['title' => '削除する', 'alt' => '削除する']); ?> - 削除する<br>
<?php html_print_image('images/delete.svg', false, ['title' => '削除する', 'alt' => '削除する']); ?> - 削除する<br>
<?php html_print_image('images/page_lightning.png', false, ['title' => 'インシデントを作成する', 'alt' => 'インシデントを作成する']); ?> - インシデントを作成する
</div>

View File

@ -25,7 +25,7 @@
<dd>表示アイコンをクリックすると、マップを<strong>参照</strong>できます。</dd>
<dt>デフォルトラジオボタン</dt>
<dd><strong>ラジオボタン</strong>をクリックすると、そのマップが<strong>デフォルトマップ</strong>に設定されます。</dd>
<dt><?php html_print_image('images/cross.png', false, ['alt' => 'Delete']); ?> 削除</dt>
<dt><?php html_print_image('images/delete.svg', false, ['alt' => 'Delete']); ?> 削除</dt>
<dd>削除アイコンをクリックすると、そのマップを<strong>削除</strong>します。</dd>
<dt>作成ボタン</dt>
<dd>作成ボタンをクリックすると、新しいマップを<strong>作成</strong>できます。</dd>

View File

@ -11,6 +11,6 @@
<p>
設定済の利用マップ定義一覧の参照できます。
<strong>編集</strong>するにはマップ名をクリックします。
<strong>削除</strong>するには削除アイコン(<?php html_print_image('images/cross.png', false, ['alt' => 'delete icon']); ?> )をクリックします。
<strong>削除</strong>するには削除アイコン(<?php html_print_image('images/delete.svg', false, ['alt' => 'delete icon']); ?> )をクリックします。
また、新たな設定を<strong>作成</strong>するには、「作成」ボタンをクリックします。
</p>

View File

@ -67,7 +67,7 @@ function show_event_dialog(event, dialog_page) {
background: "black"
},
width: 710,
height: 600,
height: 650,
autoOpen: true,
open: function() {
if (
@ -628,7 +628,7 @@ function delete_event(table, id_evento, event_rep, row, server_id) {
},
onDeny: function() {
button.children[0];
button.children[0].src = "images/cross.png";
button.children[0].src = "images/delete.svg";
return;
}
});

View File

@ -1216,7 +1216,7 @@ function delete_macro_local_component(prefix) {
//Add a new module macro
function add_macro() {
var macro_count = parseInt($("#hidden-module_macro_count").val());
var delete_icon = '<?php html_print_image ("images/cross.png", false) ?>';
var delete_icon = '<?php html_print_image ("images/delete.svg", false) ?>';
// Add inputs for the new macro
$("#module_macros").append(

View File

@ -637,7 +637,7 @@ var TreeController = {
var $content = $("<div></div>");
// Leaf icon
$leafIcon.addClass("leaf-icon invert_filter");
$leafIcon.addClass("leaf-icon");
// Content
$content.addClass("node-content");
@ -657,7 +657,7 @@ var TreeController = {
(controller.baseURL.length > 0 ? controller.baseURL : "") +
"images/" +
element.icon +
'" /></div></div>'
'" class="invert_filter"/></div></div>'
);
} else if (
typeof element.iconHTML != "undefined" &&
@ -759,7 +759,7 @@ var TreeController = {
: "") +
'images/event.svg" /> '
);
$eventImage.addClass("agent-alerts-fired");
$eventImage.addClass("agent-alerts-fired invert_filter");
$eventImage
.click(function(e) {
e.preventDefault();
@ -875,7 +875,7 @@ var TreeController = {
$content.append($statusImage);
}
var image_tooltip =
'<span><img class="invert_filter forced_title" data-title="' +
'<span class="reinvert_filter"><img class="invert_filter forced_title" data-title="' +
(element.title ? element.title : element.name) +
'" data-use_title_for_force_title="1" src="' +
(controller.baseURL.length > 0 ? controller.baseURL : "") +

View File

@ -666,7 +666,7 @@ var TreeController = {
var $updateicon = $(
'<img src="' +
(controller.baseURL.length > 0 ? controller.baseURL : "") +
'images/config.png" class="invert_filter" style="width:18px; vertical-align: middle;"/>'
'images/edit.svg" class="invert_filter" style="width:18px; vertical-align: middle;"/>'
);
var $updatebtn = $('<a href = "' + url_edit + '"></a>').append(
$updateicon
@ -682,7 +682,7 @@ var TreeController = {
var $deleteBtn = $(
'<a><img src="' +
(controller.baseURL.length > 0 ? controller.baseURL : "") +
'images/cross.png" class="invert_filter" style="width:18px; vertical-align: middle; cursor: pointer;"/></a>'
'images/delete.svg" class="invert_filter" style="width:18px; vertical-align: middle; cursor: pointer;"/></a>'
);
$deleteBtn.click(function(event) {
var ok_function = function() {

View File

@ -595,11 +595,11 @@ class ClusterManager
);
$tmp->options .= '">';
$tmp->options .= html_print_image(
'images/operation.png',
'images/details.svg',
true,
[
'title' => __('View'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$tmp->options .= '</a>';
@ -612,11 +612,11 @@ class ClusterManager
);
$tmp->options .= '">';
$tmp->options .= html_print_image(
'images/config.png',
'images/edit.svg',
true,
[
'title' => __('Edit'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$tmp->options .= '</a>';
@ -628,11 +628,11 @@ class ClusterManager
);
$tmp->options .= '">';
$tmp->options .= html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$tmp->options .= '</a>';

View File

@ -421,6 +421,8 @@ class Widget
case 'BlockHistogram':
case 'DataMatrix':
case 'EventCardboard':
case 'ModulesByStatus':
case 'AvgSumMaxMinModule':
$className .= '\\'.$name;
break;

View File

@ -0,0 +1,701 @@
<?php
/**
* Widget Avg|Sum|Max|Min Module Data Pandora FMS Console
*
* @category Console Class
* @package Pandora FMS
* @subpackage Widget Avg|Sum|Max|Min Module Data
* @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.
* ============================================================================
*/
namespace PandoraFMS\Dashboard;
use PandoraFMS\Enterprise\Metaconsole\Node;
global $config;
require_once $config['homedir'].'/include/functions_agents.php';
require_once $config['homedir'].'/include/functions_modules.php';
/**
* Avg|Sum|Max|Min Module Widgets.
*/
class AvgSumMaxMinModule extends Widget
{
/**
* Name widget.
*
* @var string
*/
protected $name;
/**
* Title widget.
*
* @var string
*/
protected $title;
/**
* Page widget;
*
* @var string
*/
protected $page;
/**
* Class name widget.
*
* @var [type]
*/
protected $className;
/**
* Values options for each widget.
*
* @var [type]
*/
protected $values;
/**
* Configuration required.
*
* @var boolean
*/
protected $configurationRequired;
/**
* Error load widget.
*
* @var boolean
*/
protected $loadError;
/**
* Width.
*
* @var integer
*/
protected $width;
/**
* Heigth.
*
* @var integer
*/
protected $height;
/**
* Grid Width.
*
* @var integer
*/
protected $gridWidth;
/**
* Cell ID.
*
* @var integer
*/
protected $cellId;
/**
* Construct.
*
* @param integer $cellId Cell ID.
* @param integer $dashboardId Dashboard ID.
* @param integer $widgetId Widget ID.
* @param integer|null $width New width.
* @param integer|null $height New height.
* @param integer|null $gridWidth Grid width.
*/
public function __construct(
int $cellId,
int $dashboardId=0,
int $widgetId=0,
?int $width=0,
?int $height=0,
?int $gridWidth=0
) {
global $config;
// WARNING: Do not edit. This chunk must be in the constructor.
parent::__construct(
$cellId,
$dashboardId,
$widgetId
);
// Width.
$this->width = $width;
// Height.
$this->height = $height;
// Grid Width.
$this->gridWidth = $gridWidth;
// Cell Id.
$this->cellId = $cellId;
// Options.
$this->values = $this->decoders($this->getOptionsWidget());
// Positions.
$this->position = $this->getPositionWidget();
// Page.
$this->page = basename(__FILE__);
// ClassName.
$class = new \ReflectionClass($this);
$this->className = $class->getShortName();
// Title.
$this->title = __('Avg|Sum|Max|Min Module Data');
// Name.
if (empty($this->name) === true) {
$this->name = 'AvgSumMaxMinModule';
}
// This forces at least a first configuration.
$this->configurationRequired = false;
if (empty($this->values['moduleId']) === true) {
$this->configurationRequired = true;
} else {
try {
if (is_metaconsole() === true
&& $this->values['metaconsoleId'] > 0
) {
$node = new Node($this->values['metaconsoleId']);
$node->connect();
}
$check_exist = db_get_sql(
sprintf(
'SELECT id_agente_modulo
FROM tagente_modulo
WHERE id_agente_modulo = %s
AND delete_pending = 0',
$this->values['moduleId']
)
);
} catch (\Exception $e) {
// Unexistent agent.
if (is_metaconsole() === true
&& $this->values['metaconsoleId'] > 0
) {
$node->disconnect();
}
$check_exist = false;
} finally {
if (is_metaconsole() === true
&& $this->values['metaconsoleId'] > 0
) {
$node->disconnect();
}
}
if ($check_exist === false) {
$this->loadError = true;
}
}
$this->overflow_scrollbars = false;
}
/**
* Decoders hack for retrocompability.
*
* @param array $decoder Values.
*
* @return array Returns the values with the correct key.
*/
public function decoders(array $decoder): array
{
$values = [];
// Retrieve global - common inputs.
$values = parent::decoders($decoder);
if (isset($decoder['label_'.$this->cellId]) === true) {
$values['label'] = $decoder['label_'.$this->cellId];
}
if (isset($decoder['label']) === true) {
$values['label'] = $decoder['label'];
}
if (isset($decoder['id_agent_'.$this->cellId]) === true) {
$values['agentId'] = $decoder['id_agent_'.$this->cellId];
}
if (isset($decoder['type_'.$this->cellId]) === true) {
$values['type'] = $decoder['type_'.$this->cellId];
}
if (isset($decoder['type']) === true) {
$values['type'] = $decoder['type'];
}
if (isset($decoder['period_'.$this->cellId]) === true) {
$values['period'] = $decoder['period_'.$this->cellId];
}
if (isset($decoder['period']) === true) {
$values['period'] = $decoder['period'];
}
if (isset($decoder['agentId']) === true) {
$values['agentId'] = $decoder['agentId'];
}
if (isset($decoder['metaconsoleId']) === true) {
$values['metaconsoleId'] = $decoder['metaconsoleId'];
}
if (isset($decoder['id_module_'.$this->cellId]) === true) {
$values['moduleId'] = $decoder['id_module_'.$this->cellId];
}
if (isset($decoder['moduleId']) === true) {
$values['moduleId'] = $decoder['moduleId'];
}
if (isset($decoder['size_value_'.$this->cellId]) === true) {
$values['sizeValue'] = $decoder['size_value_'.$this->cellId];
}
if (isset($decoder['sizeValue']) === true) {
$values['sizeValue'] = $decoder['sizeValue'];
}
if (isset($decoder['size_label_'.$this->cellId]) === true) {
$values['sizeLabel'] = $decoder['size_label_'.$this->cellId];
}
if (isset($decoder['sizeLabel']) === true) {
$values['sizeLabel'] = $decoder['sizeLabel'];
}
if (isset($decoder['text_color_'.$this->cellId]) === true) {
$values['text_color'] = $decoder['text_color_'.$this->cellId];
}
if (isset($decoder['text_color']) === true) {
$values['text_color'] = $decoder['text_color'];
}
if (isset($decoder['unit_'.$this->cellId]) === true) {
$values['unit'] = $decoder['unit_'.$this->cellId];
}
if (isset($decoder['unit']) === true) {
$values['unit'] = $decoder['unit'];
}
return $values;
}
/**
* Generates inputs for form (specific).
*
* @return array Of inputs.
*
* @throws Exception On error.
*/
public function getFormInputs(): array
{
global $config;
$values = $this->values;
// Default values.
if (isset($values['sizeLabel']) === false) {
$values['sizeLabel'] = 20;
}
if (isset($values['sizeValue']) === false) {
$values['sizeValue'] = 20;
}
// Retrieve global - common inputs.
$inputs = parent::getFormInputs();
// Label.
$inputs[] = [
'label' => __('Label'),
'arguments' => [
'name' => 'label',
'type' => 'text',
'value' => $values['label'],
'return' => true,
'size' => 0,
],
];
// Type.
$type_fields = [];
$type_fields[0] = 'AVG';
$type_fields[1] = 'SUM';
$type_fields[2] = 'MAX';
$type_fields[3] = 'MIN';
$type_selected = explode(',', $values['type']);
(isset($values['type']) === false) ? $type_selected = 0 : '';
$inputs[] = [
'label' => __('Type'),
'arguments' => [
'name' => 'type',
'type' => 'select',
'fields' => $type_fields,
'selected' => $type_selected,
'return' => true,
'required' => true,
'select2_enable' => false,
'sort' => false,
],
];
// Period.
$period_fields = [];
$period_fields[0] = __('Last 30 days');
$period_fields[1] = __('This month');
$period_fields[2] = __('Last 7 days');
$period_fields[3] = __('This week');
$period_fields[4] = __('Last 24 hrs');
$period_fields[5] = __('Today');
$period_selected = explode(',', $values['period']);
(isset($values['period']) === false) ? $period_selected = 0 : '';
$inputs[] = [
'label' => __('Time period'),
'arguments' => [
'name' => 'period',
'type' => 'select',
'fields' => $period_fields,
'selected' => $period_selected,
'return' => true,
'required' => true,
'select2_enable' => false,
'sort' => false,
],
];
// Autocomplete agents.
$inputs[] = [
'label' => __('Agent'),
'arguments' => [
'type' => 'autocomplete_agent',
'name' => 'agentAlias',
'id_agent_hidden' => $values['agentId'],
'name_agent_hidden' => 'agentId',
'server_id_hidden' => $values['metaconsoleId'],
'name_server_hidden' => 'metaconsoleId',
'return' => true,
'module_input' => true,
'module_name' => 'moduleId',
'module_none' => false,
'size' => 0,
],
];
// Autocomplete module.
$inputs[] = [
'label' => __('Module'),
'arguments' => [
'type' => 'autocomplete_module',
'name' => 'moduleId',
'selected' => $values['moduleId'],
'return' => true,
'sort' => false,
'agent_id' => $values['agentId'],
'metaconsole_id' => $values['metaconsoleId'],
'style' => 'width: inherit;',
'filter_modules' => (users_access_to_agent($values['agentId']) === false) ? [$values['moduleId']] : [],
'nothing' => __('None'),
'nothing_value' => 0,
],
];
// Text size of value in px.
$inputs[] = [
'label' => __('Text size of value in px'),
'arguments' => [
'name' => 'sizeValue',
'type' => 'number',
'value' => $values['sizeValue'],
'return' => true,
'min' => 0,
],
];
// Text size of label in px.
$inputs[] = [
'label' => __('Text size of label in px'),
'arguments' => [
'name' => 'sizeLabel',
'type' => 'number',
'value' => $values['sizeLabel'],
'return' => true,
'min' => 0,
],
];
// Text color.
if (empty($values['text_color']) === true) {
$values['text_color'] = '#000000';
if ($config['style'] === 'pandora_black'
&& is_metaconsole() === false
) {
$values['text_color'] = '#eeeeee';
}
}
$inputs[] = [
'label' => __('Text color'),
'arguments' => [
'wrapper' => 'div',
'name' => 'text_color',
'type' => 'color',
'value' => $values['text_color'],
'return' => true,
],
];
// Unit.
$inputs[] = [
'label' => __('Unit'),
'arguments' => [
'wrapper' => 'div',
'name' => 'unit',
'type' => 'switch',
'value' => $values['unit'],
'return' => true,
],
];
return $inputs;
}
/**
* Get Post for widget.
*
* @return array
*/
public function getPost():array
{
// Retrieve global - common inputs.
$values = parent::getPost();
$values['label'] = \get_parameter('label', '');
$values['type'] = \get_parameter('type', 0);
$values['period'] = \get_parameter('period', 0);
$values['agentId'] = \get_parameter('agentId', 0);
$values['metaconsoleId'] = \get_parameter('metaconsoleId', 0);
$values['moduleId'] = \get_parameter('moduleId', 0);
$values['sizeValue'] = \get_parameter('sizeValue', 0);
$values['sizeLabel'] = \get_parameter_switch('sizeLabel');
$values['text_color'] = \get_parameter('text_color', 0);
$values['unit'] = \get_parameter_switch('unit');
return $values;
}
/**
* Draw widget.
*
* @return string;
*/
public function load()
{
global $config;
$output = '';
$text_color = 'color:'.$this->values['text_color'].' !important;';
$id_module = $this->values['moduleId'];
$to = 0;
$now = time();
switch ((int) $this->values['period']) {
case 0:
$to = strtotime('-30 days');
break;
case 1:
$to = strtotime(date('Y-m-01 00:00:00'));
break;
case 2:
$to = strtotime('-7 days');
break;
case 3:
$to = strtotime('last Monday');
break;
case 4:
$to = strtotime('-1 days');
break;
case 5:
$to = strtotime(date('Y-m-d 00:00:00'));
break;
default:
$to = 0;
break;
}
$data = 0;
switch ((int) $this->values['type']) {
case 0:
$rows = modules_get_raw_data($id_module, $to, $now);
$count = (int) count($rows);
$sum = 0;
foreach ($rows as $row) {
$sum += (int) $row['datos'];
}
$data = ($sum / $count);
break;
case 1:
$rows = modules_get_raw_data($id_module, $to, $now);
$sum = 0;
foreach ($rows as $row) {
$sum += (int) $row['datos'];
}
$data = $sum;
break;
case 2:
$rows = modules_get_min_max_data($id_module, $to);
$data = $rows[0]['max'];
break;
case 3:
$rows = modules_get_min_max_data($id_module, $to);
$data = $rows[0]['min'];
break;
default:
$data = 0;
break;
}
$label = $this->values['label'];
$sizeLabel = (isset($this->values['sizeLabel']) === true) ? $this->values['sizeLabel'] : 40;
$sizeValue = (isset($this->values['sizeValue']) === true) ? $this->values['sizeValue'] : 40;
$output .= '<div class="container-center">';
// General div.
$output .= '<div class="container-icon">';
// Div value.
$output .= '<div style="flex: 0 1 '.$sizeValue.'px; font-size:'.$sizeValue.'px;'.$text_color.'">';
if (is_numeric($data) === true) {
$dataDatos = remove_right_zeros(
number_format(
$data,
$config['graph_precision'],
$config['decimal_separator'],
$config['thousand_separator']
)
);
} else {
$dataDatos = trim($data);
}
$unit = '';
if (empty($this->values['unit']) === false) {
$unit = modules_get_unit($id_module);
}
$output .= $dataDatos.'&nbsp;'.$unit;
$output .= '</div>';
if (empty($label) === false) {
// Div Label.
$output .= '<div style="flex: 1 1 '.$sizeLabel.'px; font-size:'.$sizeLabel.'px;'.$text_color.'">'.$label.'</div>';
}
$output .= '</div>';
$output .= '</div>';
return $output;
}
/**
* Get description.
*
* @return string.
*/
public static function getDescription()
{
return __('Avg|Sum|Max|Min Module Data');
}
/**
* Get Name.
*
* @return string.
*/
public static function getName()
{
return 'AvgSumMaxMinModule';
}
/**
* Get size Modal Configuration.
*
* @return array
*/
public function getSizeModalConfiguration(): array
{
$size = [
'width' => 550,
'height' => 710,
];
return $size;
}
}

View File

@ -0,0 +1,595 @@
<?php
/**
* Widget Module status Pandora FMS Console
*
* @category Console Class
* @package Pandora FMS
* @subpackage Widget Module status
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2023 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.
* ============================================================================
*/
namespace PandoraFMS\Dashboard;
use PandoraFMS\Enterprise\Metaconsole\Node;
global $config;
/**
* Module status Widgets.
*/
class ModulesByStatus extends Widget
{
/**
* Name widget.
*
* @var string
*/
protected $name;
/**
* Title widget.
*
* @var string
*/
protected $title;
/**
* Page widget;
*
* @var string
*/
protected $page;
/**
* Class name widget.
*
* @var [type]
*/
protected $className;
/**
* Values options for each widget.
*
* @var [type]
*/
protected $values;
/**
* Configuration required.
*
* @var boolean
*/
protected $configurationRequired;
/**
* Error load widget.
*
* @var boolean
*/
protected $loadError;
/**
* Width.
*
* @var integer
*/
protected $width;
/**
* Heigth.
*
* @var integer
*/
protected $height;
/**
* Grid Width.
*
* @var integer
*/
protected $gridWidth;
/**
* Cell ID.
*
* @var integer
*/
protected $cellId;
/**
* Construct.
*
* @param integer $cellId Cell ID.
* @param integer $dashboardId Dashboard ID.
* @param integer $widgetId Widget ID.
* @param integer|null $width New width.
* @param integer|null $height New height.
* @param integer|null $gridWidth Grid width.
*/
public function __construct(
int $cellId,
int $dashboardId=0,
int $widgetId=0,
?int $width=0,
?int $height=0,
?int $gridWidth=0
) {
global $config;
// WARNING: Do not edit. This chunk must be in the constructor.
parent::__construct(
$cellId,
$dashboardId,
$widgetId
);
// Width.
$this->width = $width;
// Height.
$this->height = $height;
// Grid Width.
$this->gridWidth = $gridWidth;
// Cell Id.
$this->cellId = $cellId;
// Options.
$this->values = $this->decoders($this->getOptionsWidget());
// Positions.
$this->position = $this->getPositionWidget();
// Page.
$this->page = basename(__FILE__);
// ClassName.
$class = new \ReflectionClass($this);
$this->className = $class->getShortName();
// Title.
$this->title = __('Module status');
// Name.
if (empty($this->name) === true) {
$this->name = 'ModulesByStatus';
}
// This forces at least a first configuration.
// This forces at least a first configuration.
$this->configurationRequired = false;
if (empty($this->values['status']) === true) {
$this->configurationRequired = true;
}
$this->overflow_scrollbars = false;
}
/**
* Decoders hack for retrocompability.
*
* @param array $decoder Values.
*
* @return array Returns the values with the correct key.
*/
public function decoders(array $decoder): array
{
$values = [];
// Retrieve global - common inputs.
$values = parent::decoders($decoder);
if (isset($decoder['search']) === true) {
$values['search'] = $decoder['search'];
}
if (isset($decoder['status']) === true) {
$values['status'] = $decoder['status'];
}
if (isset($decoder['limit']) === true) {
$values['limit'] = $decoder['limit'];
}
if (isset($decoder['nodes']) === true) {
$values['nodes'] = $decoder['nodes'];
}
return $values;
}
/**
* Generates inputs for form (specific).
*
* @return array Of inputs.
*
* @throws Exception On error.
*/
public function getFormInputs(): array
{
global $config;
$values = $this->values;
// Retrieve global - common inputs.
$inputs = parent::getFormInputs();
// Search.
$inputs[] = [
'label' => __('Free search').ui_print_help_tip(__('Search filter by Module name field content'), true),
'arguments' => [
'name' => 'search',
'type' => 'text',
'value' => $values['search'],
'return' => true,
'size' => 0,
],
];
// Status fields.
$status_fields = [];
$status_fields[AGENT_MODULE_STATUS_NORMAL] = __('Normal');
$status_fields[AGENT_MODULE_STATUS_CRITICAL_BAD] = __('Critical');
$status_fields[AGENT_MODULE_STATUS_WARNING] = __('Warning');
$status_fields[AGENT_MODULE_STATUS_UNKNOWN] = __('Unknown');
$status_fields[AGENT_MODULE_STATUS_NOT_INIT] = __('Not init');
$status_fields[AGENT_MODULE_STATUS_NOT_NORMAL] = __('Not normal');
$status_selected = explode(',', $values['status']);
(isset($values['status']) === false) ? $status_selected = AGENT_MODULE_STATUS_CRITICAL_BAD : '';
$inputs[] = [
'label' => __('Status'),
'arguments' => [
'name' => 'status',
'type' => 'select',
'fields' => $status_fields,
'selected' => $status_selected,
'return' => true,
'multiple' => true,
'class' => 'overflow-hidden',
'size' => count($status_fields),
'select_all' => false,
'required' => true,
],
];
// Limit fields.
$limit_fields = [];
$limit_fields[5] = 5;
$limit_fields[10] = 10;
$limit_fields[25] = 25;
$limit_fields[100] = 100;
$limit_fields[200] = 200;
$limit_fields[500] = 500;
$limit_fields[1000] = 1000;
$limit_selected = explode(',', $values['limit']);
(isset($values['limit']) === false) ? $limit_selected = 5 : '';
$inputs[] = [
'label' => __('Limit'),
'arguments' => [
'name' => 'limit',
'type' => 'select',
'fields' => $limit_fields,
'selected' => $limit_selected,
'return' => true,
'required' => true,
'select2_enable' => false,
],
];
// Nodes.
if (is_metaconsole() === true) {
$nodes_fields = [];
$servers_ids = metaconsole_get_servers();
foreach ($servers_ids as $server) {
$nodes_fields[$server['id']] = $server['server_name'];
}
$nodes_selected = explode(',', $values['nodes']);
(isset($values['nodes']) === false) ? $nodes_selected = $servers_ids : '';
$nodes_height = count($nodes_fields);
if (count($nodes_fields) > 5) {
$nodes_height = 5;
}
$inputs[] = [
'label' => __('Nodes'),
'arguments' => [
'name' => 'nodes',
'type' => 'select',
'fields' => $nodes_fields,
'selected' => $nodes_selected,
'return' => true,
'multiple' => true,
'class' => 'overflow-hidden',
'size' => $nodes_height,
'select_all' => false,
'required' => true,
],
];
}
return $inputs;
}
/**
* Get Post for widget.
*
* @return array
*/
public function getPost():array
{
// Retrieve global - common inputs.
$values = parent::getPost();
$values['search'] = \get_parameter('search', '');
$values['status'] = \get_parameter('status', '');
$values['limit'] = \get_parameter('limit', '');
$values['nodes'] = \get_parameter('nodes', '');
return $values;
}
/**
* Draw widget.
*
* @return string;
*/
public function load()
{
$this->size = parent::getSize();
$output = '';
if (is_metaconsole() === true) {
$modules = [];
$servers_ids = array_column(metaconsole_get_servers(), 'id');
foreach ($servers_ids as $server_id) {
try {
$node = new Node((int) $server_id);
$node->connect();
$modules_tmp = $this->getInfoModules(
$this->values['search'],
$this->values['status'],
$this->values['nodes']
);
$modules[$node->id()] = $modules_tmp[0];
$node->disconnect();
} catch (\Exception $e) {
// Unexistent modules.
$node->disconnect();
}
}
} else {
$modules = $this->getInfoModules(
$this->values['search'],
$this->values['status']
);
}
if ($modules !== false && empty($modules) === false) {
// Datatables list.
try {
$info_columns = $this->columns();
$column_names = $info_columns['column_names'];
$columns = $info_columns['columns'];
$tableId = 'ModuleByStatus_'.$this->dashboardId.'_'.$this->cellId;
// Load datatables user interface.
ui_print_datatable(
[
'id' => $tableId,
'class' => 'info_table align-left-important',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'include/ajax/module',
'ajax_data' => [
'get_data_ModulesByStatus' => 1,
'table_id' => $tableId,
'search' => $this->values['search'],
'status' => $this->values['status'],
'nodes' => $this->values['nodes'],
],
'default_pagination' => $this->values['limit'],
'order' => [
'field' => 'last_status_change',
'direction' => 'desc',
],
'csv' => 0,
]
);
} catch (\Exception $e) {
echo $e->getMessage();
}
} else {
$output = '';
$output .= '<div class="container-center">';
$output .= \ui_print_info_message(
__('Not found modules'),
'',
true
);
$output .= '</div>';
return $output;
}
}
/**
* Get info modules.
*
* @param string $search Free search.
* @param string $status Modules status.
*
* @return array Data.
*/
private function getInfoModules(string $search, string $status): array
{
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
);
$sql = sprintf(
'SELECT
COUNT(*) AS "modules"
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
);
$modules = db_get_all_rows_sql($sql);
if ($modules === false) {
$modules = [];
}
return $modules;
}
/**
* Get columns.
*
* @return array
*/
private function columns()
{
$columns = [];
$column_names = [];
if (is_metaconsole() === true) {
$column_names = [
__('Module name'),
__('Agent'),
__('Node'),
__('Last status change'),
__('Status'),
];
$columns = [
'nombre',
'alias',
'server_name',
'last_status_change',
'estado',
];
} else {
$column_names = [
__('Module name'),
__('Agent'),
__('Last status change'),
__('Status'),
];
$columns = [
'nombre',
'alias',
'last_status_change',
'estado',
];
}
$data = [
'columns' => $columns,
'column_names' => $column_names,
];
return $data;
}
/**
* Get description.
*
* @return string.
*/
public static function getDescription()
{
return __('Modules by status');
}
/**
* Get Name.
*
* @return string.
*/
public static function getName()
{
return 'ModulesByStatus';
}
/**
* Get size Modal Configuration.
*
* @return array
*/
public function getSizeModalConfiguration(): array
{
if (is_metaconsole() === true) {
$nodes_fields = array_column(metaconsole_get_servers(), 'id');
$height_counter = (((int) count($nodes_fields)) * 20);
$size = [
'width' => 450,
'height' => (520 + $height_counter),
];
} else {
$size = [
'width' => 450,
'height' => 480,
];
}
return $size;
}
}

View File

@ -63,22 +63,25 @@ class View extends \HTML
$tabs = [
[
'name' => __('Label settings'),
'id' => 'tab-label',
'href' => $url.'&tabSelected=label',
'img' => 'label-settings.png',
'name' => __('Label settings'),
'id' => 'tab-label',
'href' => $url.'&tabSelected=label',
'img' => 'tag@svg.svg',
'class' => 'main_menu_icon invert_filter',
],
[
'name' => __('General settings'),
'id' => 'tab-general',
'href' => $url.'&tabSelected=general',
'img' => 'general-settings.png',
'name' => __('General settings'),
'id' => 'tab-general',
'href' => $url.'&tabSelected=general',
'img' => 'configuration@svg.svg',
'class' => 'main_menu_icon invert_filter',
],
[
'name' => __('Specific settings'),
'id' => 'tab-specific',
'href' => $url.'&tabSelected=specific',
'img' => 'specific-settings.png',
'name' => __('Specific settings'),
'id' => 'tab-specific',
'href' => $url.'&tabSelected=specific',
'img' => 'incremental-data@svg.svg',
'class' => 'main_menu_icon invert_filter',
],
];
@ -91,26 +94,29 @@ class View extends \HTML
$activetabs = 0;
$tabs = [
[
'name' => __('Specific settings'),
'id' => 'tab-specific',
'href' => $url.'&tabSelected=specific',
'img' => 'event_responses_col.png',
'name' => __('Specific settings'),
'id' => 'tab-specific',
'href' => $url.'&tabSelected=specific',
'img' => 'responses.svg',
'class' => 'main_menu_icon invert_filter',
],
];
} else if ($type === BOX_ITEM || $type === COLOR_CLOUD || $type === ODOMETER) {
$activetabs = 1;
$tabs = [
[
'name' => __('General settings'),
'id' => 'tab-general',
'href' => $url.'&tabSelected=general',
'img' => 'pencil.png',
'name' => __('General settings'),
'id' => 'tab-general',
'href' => $url.'&tabSelected=general',
'img' => 'edit.svg',
'class' => 'main_menu_icon invert_filter',
],
[
'name' => __('Specific settings'),
'id' => 'tab-specific',
'href' => $url.'&tabSelected=specific',
'img' => 'event_responses_col.png',
'name' => __('Specific settings'),
'id' => 'tab-specific',
'href' => $url.'&tabSelected=specific',
'img' => 'responses.svg',
'class' => 'main_menu_icon invert_filter',
],
];
}

View File

@ -173,10 +173,6 @@ fieldset {
max-width: 10px;
}
.fixed_filter_bar:has(div > div.filter-datatable-submain > form#events_form) {
margin-bottom: 0px;
}
.fixed_filter_bar > div.white_table_graph_header:has(div.filter_summary) {
padding: 5px 20px;
}
@ -524,3 +520,7 @@ td#save_filter_form-0-0 > input[type="radio"],
td#save_filter_form-0-1 > input[type="radio"] {
height: 14px;
}
.module-search > input[type="text"] {
margin-bottom: 6px;
}

View File

@ -695,3 +695,8 @@ ul li {
.head_tab_unselected span {
color: #95a3bf;
}
.logo_full {
width: 215px !important;
height: auto !important;
}

View File

@ -11,6 +11,7 @@ div.show_result_interpreter {
position: absolute;
z-index: 1;
width: 300px;
top: 45px;
}
.more_results {

View File

@ -1135,6 +1135,11 @@ div#main {
flex-direction: column;
height: 100%;
margin: 25px;
margin-bottom: 70px;
}
div#main:has(.networkconsole) {
margin-bottom: 0px;
}
textarea.conf_editor {
@ -1430,7 +1435,7 @@ div#head {
min-width: 882px;
background-color: #fff;
color: #000;
z-index: 1;
z-index: 2;
}
.fixed_header {
@ -8133,11 +8138,11 @@ div.graph div.legend table {
.networkconsole {
width: 100%;
height: 100%;
min-height: 460px;
position: relative;
overflow: hidden;
background-color: var(--secondary-color);
min-height: calc(100vh - 220px);
min-height: calc(100vh - 200px);
border: 1px solid #cacaca;
}
/*
@ -10072,7 +10077,11 @@ select:focus {
}
.dataTables_length > label > select {
min-height: 3em;
min-height: 42px;
}
.dataTables_length > label {
font-size: 0px;
}
input[type="button"],
@ -10873,7 +10882,6 @@ tr.bring_next_field {
.dataTables_wrapper {
overflow: auto;
width: 100%;
margin-bottom: 25px;
}
.dataTables_wrapper .dataTables_processing {
@ -11219,11 +11227,17 @@ table.table_modal_alternate
border-left: 0;
}
.main_menu_icon {
div.main_menu_icon,
img.main_menu_icon[src$=".svg"] {
width: 20px;
height: 20px;
}
input.main_menu_icon[src$=".svg"] {
width: 22px;
height: 22px;
}
.header_help_icon {
width: 16px;
height: 16px;

View File

@ -74,7 +74,6 @@ div#head {
.menu_full_classic #menu_tabs {
height: 49px;
border-bottom: 1px solid #82b92e;
padding-bottom: 2px;
}
.menu_full_collapsed #menu_tabs {
@ -426,6 +425,9 @@ a.pandora_pagination {
color: #fff;
}
span.reinvert_filter {
filter: invert(1);
}
/* firts_task.css */
.new_task,
div.new_task,
@ -449,7 +451,11 @@ div.new_task > div {
}
/* tree.css */
.node-content:hover {
.tree-node div.node-content {
background-color: #444;
}
.tree-node div.node-content:hover {
background-color: #222;
}
@ -768,6 +774,11 @@ form ul.form_flex {
filter: invert(100%);
}
.info_table .invert_filter,
.info_table .labels {
filter: invert(100%);
}
.graph_conteiner_inside,
.container_table,
.second_background,
@ -1063,10 +1074,6 @@ div.integria_details_description textarea {
}
.networkconsole {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
background-color: #111;
}
@ -1406,11 +1413,6 @@ p.trademark-copyright {
overflow: auto;
}
.action_buttons_background_mask {
background-color: #222;
border-top: 1px solid #82b92e;
}
button.buttonButton,
button.submitButton {
box-shadow: 0px 3px 6px #111;
@ -1501,3 +1503,7 @@ div.white_box.white_box_opened.no_border {
table.filter-table-adv td > div label {
color: white !important;
}
#principal_action_buttons {
background: #111111;
}

View File

@ -138,7 +138,7 @@
.info_table > thead > tr > th,
.info_table > thead > tr > th * {
/*border-bottom: 1px solid #e2e2e2;*/
font-family: "lato-bolder";
font-family: "lato-bold";
font-style: normal;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
@ -353,23 +353,40 @@ a.pandora_pagination.current:hover {
/* CSV button datatables */
.dt-button.buttons-csv.buttons-html5 {
background-image: url(../../images/file-csv.svg);
background-position: center center;
background-image: url(../../images/file-csv-primary-color.svg);
background-size: 22px;
background-position: 48px center;
background-repeat: no-repeat;
color: #000;
border: none;
cursor: pointer;
display: inline;
padding: 7pt;
margin-left: 10px;
background-color: transparent;
}
.dt-button.buttons-csv.buttons-html5 span {
font-size: 0;
color: var(--primary-color);
font-size: 20px;
height: 42px;
/* height: 32px; */
width: 80px;
margin-left: 10px;
display: flex;
justify-content: space-between;
flex-direction: row;
align-items: center;
box-shadow: 0px 3px 6px #c7c7c7;
border: 2px solid var(--primary-color);
border-radius: 8px;
padding: 0 10px;
cursor: pointer;
}
.dt-buttons {
margin-top: 3pt;
.dt-button.buttons-csv.buttons-html5:hover {
color: #1d7873 !important;
border: 2px solid #1d7873 !important;
}
.dt-button.buttons-csv.buttons-html5:before {
content: "csv";
}
.dt-button.buttons-csv.buttons-html5 span {
font-size: 0;
}
.dt-button.buttons-csv.buttons-html5:active,
@ -688,7 +705,7 @@ table.events-filters-create
> div
> div
> .ui-autocomplete-input {
width: 94%;
width: 100%;
}
table.events-filters-create > tbody > tr > td > div.flex-row > div {

View File

@ -1,6 +1,6 @@
.tree-root {
margin-top: 0px;
margin-bottom: 0px;
margin-bottom: 40px;
}
.tree-node.tree-node-header {
@ -8,12 +8,6 @@
flex-direction: row;
flex-wrap: wrap;
align-items: center;
/*
width: calc(100% - 24px);
border: 1px solid #eaeaea;
border-radius: 4px;
background-color: #fff;
*/
margin-bottom: 8px;
}
@ -392,6 +386,24 @@ div#tree-controller-recipient {
.tree-node > .node-content > .agent-alerts-fired {
float: left;
position: relative;
left: 26px;
left: 13px;
top: -5px;
}
.tree-node > .node-content > div.tree-service-status {
width: 7px;
height: 20px;
margin-left: 0;
border-radius: 5px;
}
.tree-node > .node-content.node-service > div.tree-service-status {
width: 7px;
height: 20px;
margin-left: 5px;
border-radius: 5px;
}
.tree-node .node-icon.node-status {
border: 0;
}

View File

@ -142,7 +142,7 @@ div#edit-controls input.sub[disabled] {
input.delete_min,
button.delete_min {
background: url(../../images/cross.png) no-repeat center;
background: url(../../images/delete.svg) no-repeat center;
}
input.delete_min[disabled],
button.delete_min[disabled] {
@ -154,7 +154,7 @@ button.delete_min_white {
}
input.delete_min_white[disabled],
button.delete_min_white[disabled] {
background: url(../../images/cross.png) no-repeat center;
background: url(../../images/delete.svg) no-repeat center;
}
input.graph_min,
@ -297,7 +297,7 @@ button.camera_min_white[disabled] {
input.config_min,
button.config_min {
background: url(../../images/config.png) no-repeat center;
background: url(../../images/edit.svg) no-repeat center;
}
input.config_min[disabled],
button.config_min[disabled] {
@ -309,7 +309,7 @@ button.config_min_white {
}
input.config_min_white[disabled],
button.config_min_white[disabled] {
background: url(../../images/config.png) no-repeat center;
background: url(../../images/edit.svg) no-repeat center;
}
input.label_min,

View File

@ -422,6 +422,7 @@ if (isset($config['id_user']) === false) {
unset($_POST['auth_code'], $code);
if (!$double_auth_success) {
$config['auth_error'] = __('Double auth error');
$login_failed = true;
include_once 'general/login_page.php';
db_pandora_audit(
@ -447,6 +448,7 @@ if (isset($config['id_user']) === false) {
} else if (($config['auth'] === 'saml') && ($login_button_saml)) {
$saml_user_id = enterprise_hook('saml_process_user_login');
if (!$saml_user_id) {
$config['auth_error'] = __('saml error');
$login_failed = true;
include_once 'general/login_page.php';
while (ob_get_length() > 0) {
@ -709,6 +711,7 @@ if (isset($config['id_user']) === false) {
login_check_failed($nick);
}
$config['auth_error'] = __('User is blocked');
$login_failed = true;
}

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.769';
$build = '230310';
$build = '230313';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -371,11 +371,12 @@ if ($agent_view_page === true) {
[
'id' => 'alerts_status_datatable',
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'no_sortable_columns' => $no_sortable_columns,
'ajax_url' => 'include/ajax/alert_list.ajax',
'dom_elements' => 'pfrti',
'ajax_data' => [
'get_agent_alerts_datatable' => 1,
'id_agent' => $idAgent,
@ -406,6 +407,7 @@ if ($agent_view_page === true) {
],
],
'no_toggle' => true,
'class' => 'flex',
],
]
);
@ -545,7 +547,7 @@ function alerts_table_controls() {
$(document).ready ( function () {
alerts_table_controls();
$('#submit-alert_validate').on('click', function () {
$('#button-alert_validate').on('click', function () {
validateAlerts();
});
});

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