mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Merge branch 'ent-7002-Revision-cabeceras-tabs' into 'develop'
Ent 7002 revision cabeceras tabs Closes pandora_enterprise#7002 See merge request artica/pandorafms!4094
This commit is contained in:
commit
3f8d3a883f
@ -1,16 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Pandora FMS - http://pandorafms.com
|
||||
* ==================================================
|
||||
* 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; 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.
|
||||
* Agents/Modules Monitoring view.
|
||||
*
|
||||
* @category Operations
|
||||
* @package Pandora FMS
|
||||
* @subpackage Opensource
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
@ -435,14 +448,25 @@ function mainAgentsModules()
|
||||
|
||||
if ($config['pure'] == 0) {
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
ui_print_standard_header(
|
||||
__('Agents/Modules'),
|
||||
'images/module.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$updated_time
|
||||
(array) $updated_time,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Views'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
echo '<table class="w100p">';
|
||||
echo '<tr>';
|
||||
echo "<td> <span class='float-right'>".$fullscreen['text'].'</span> </td>';
|
||||
|
@ -196,7 +196,6 @@ function mainModuleGroups()
|
||||
ON ta.id_agente = tam.id_agente
|
||||
WHERE ta.disabled = 0
|
||||
AND tam.disabled = 0
|
||||
AND tam.id_modulo <> 0
|
||||
AND tam.delete_pending = 0
|
||||
AND ta.id_grupo IN (%s)
|
||||
GROUP BY tam.id_agente_modulo
|
||||
@ -246,13 +245,24 @@ function mainModuleGroups()
|
||||
$array_data[$value['id_grupo']][$value['id_mg']] = $value;
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Combined table of agent group and module group'),
|
||||
'images/module_group.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
''
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Views'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
echo "<table cellpadding='4' cellspacing='4' class='databox filters bolder margin-bottom-10' width='100%'>
|
||||
|
@ -53,13 +53,24 @@ function pandora_realtime_graphs()
|
||||
|
||||
$hide_header = get_parameter('hide_header', 0);
|
||||
if ($hide_header === 0) {
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Realtime graphs'),
|
||||
'images/extensions.png',
|
||||
false,
|
||||
'real_time_view',
|
||||
false,
|
||||
$onheader
|
||||
$onheader,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Views'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1096,13 +1096,8 @@ function resource_registration_extension_main()
|
||||
}
|
||||
|
||||
$xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA);
|
||||
if ($xml === false) {
|
||||
ui_print_error_message(
|
||||
__('Error uploading resource. Check if the selected file is a valid resource template in .ptr format')
|
||||
);
|
||||
} else {
|
||||
process_upload_xml($xml);
|
||||
}
|
||||
|
||||
process_upload_xml($xml);
|
||||
}
|
||||
|
||||
|
||||
|
@ -24,12 +24,20 @@ if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'],
|
||||
return;
|
||||
}
|
||||
|
||||
\ui_print_page_header(
|
||||
__('Monitoring').' » '.__('Clusters'),
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Clusters'),
|
||||
'images/chart.png',
|
||||
false,
|
||||
'',
|
||||
false
|
||||
false,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
ui_require_css_file('first_task');
|
||||
|
@ -1,17 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Agents defined view.
|
||||
*
|
||||
* @category Manage Agents.
|
||||
* @package Pandora FMS
|
||||
* @subpackage Resources.
|
||||
* @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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// 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.
|
||||
// Load global vars
|
||||
// Begin.
|
||||
check_login();
|
||||
|
||||
// Take some parameters (GET).
|
||||
@ -76,13 +91,23 @@ $viewtab['active'] = false;
|
||||
$onheader = ['view' => $viewtab];
|
||||
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
ui_print_standard_header(
|
||||
__('Agents defined in %s', get_product_name()),
|
||||
'images/agent.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$onheader
|
||||
$onheader,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Resources'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage agents'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
if (is_central_policies_on_node()) {
|
||||
|
@ -1130,7 +1130,6 @@ foreach ($modules as $module) {
|
||||
[
|
||||
'alt' => __('Enable module'),
|
||||
'title' => __('Enable module'),
|
||||
'class' => 'invert_filter_important',
|
||||
]
|
||||
).'</a>';
|
||||
} else {
|
||||
|
@ -115,12 +115,7 @@ function add_component_selection($id_network_component_type)
|
||||
'',
|
||||
'---'.__('Manual setup').'---',
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'width: 460px; '
|
||||
true
|
||||
);
|
||||
$data[1] .= '</span>';
|
||||
$data[1] .= ' <span id="component_loading" class="invisible">';
|
||||
|
@ -95,7 +95,7 @@ if ($id_group) {
|
||||
}
|
||||
|
||||
// Header
|
||||
if (defined('METACONSOLE')) {
|
||||
if (is_metaconsole() === true) {
|
||||
agents_meta_print_header();
|
||||
$sec = 'advanced';
|
||||
} else {
|
||||
@ -105,13 +105,24 @@ if (defined('METACONSOLE')) {
|
||||
$title_in_header = __('Create group');
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$title_in_header,
|
||||
'images/group.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
''
|
||||
false,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Profiles'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage agents group'),
|
||||
],
|
||||
]
|
||||
);
|
||||
$sec = 'gagente';
|
||||
}
|
||||
|
@ -333,6 +333,7 @@ $title = __('Groups defined in %s', get_product_name());
|
||||
switch ($tab) {
|
||||
case 'tree':
|
||||
$buttons['tree']['active'] = true;
|
||||
$title .= sprintf(' » %s', __('Tree view'));
|
||||
break;
|
||||
|
||||
case 'credbox':
|
||||
@ -343,23 +344,38 @@ switch ($tab) {
|
||||
case 'groups':
|
||||
default:
|
||||
$buttons['groups']['active'] = true;
|
||||
$title .= sprintf(' » %s', __('Table view'));
|
||||
break;
|
||||
}
|
||||
|
||||
// Header.
|
||||
if (is_metaconsole() === true) {
|
||||
agents_meta_print_header();
|
||||
echo '<div class="notify">';
|
||||
echo __('Edit or delete groups can cause problems with synchronization');
|
||||
echo '</div>';
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'notify',
|
||||
'content' => __('Edit or delete groups can cause problems with synchronization'),
|
||||
]
|
||||
);
|
||||
} else {
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$title,
|
||||
'images/group.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons
|
||||
false,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Profiles'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Manage agents group'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@ -471,7 +487,7 @@ if ($update_group) {
|
||||
$values = [
|
||||
'nombre' => $name,
|
||||
'icon' => empty($icon) ? '' : substr($icon, 0, -4),
|
||||
'parent' => $id_parent == -1 ? 0 : $id_parent,
|
||||
'parent' => ($id_parent == -1) ? 0 : $id_parent,
|
||||
'disabled' => !$alerts_enabled,
|
||||
'custom_id' => $custom_id,
|
||||
'id_skin' => $skin,
|
||||
|
@ -58,12 +58,27 @@ $buttons['view'] = [
|
||||
|
||||
|
||||
$tab = get_parameter('tab', 'view');
|
||||
if ($tab != 'search_module') {
|
||||
if ($tab !== 'search_module') {
|
||||
$buttons[$tab]['active'] = true;
|
||||
}
|
||||
|
||||
ui_print_page_header(__('Module Library').' » '.__('View'), '', false, 'module_library', true, $buttons);
|
||||
$headerTitle = ($tab === 'categories') ? __('Categories') : __('Main view');
|
||||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$headerTitle,
|
||||
'',
|
||||
false,
|
||||
'module_library',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Module library'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Styles.
|
||||
ui_require_css_file('module_library');
|
||||
|
@ -26,10 +26,9 @@
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
|
||||
|
||||
if (is_ajax()) {
|
||||
$search_agents = (bool) get_parameter('search_agents');
|
||||
|
||||
@ -340,37 +339,43 @@ if ($edit_graph) {
|
||||
|
||||
$head = __('Graph builder');
|
||||
|
||||
if (isset($name)) {
|
||||
$head .= ' - '.$name;
|
||||
if (isset($name) === true) {
|
||||
$head .= ' » '.$name;
|
||||
}
|
||||
|
||||
// Header.
|
||||
$tab = get_parameter('tab', '');
|
||||
$tab = get_parameter('tab');
|
||||
switch ($tab) {
|
||||
default:
|
||||
case 'main':
|
||||
ui_print_page_header(
|
||||
$head,
|
||||
'images/chart.png',
|
||||
false,
|
||||
'graph_builder',
|
||||
false,
|
||||
$buttons
|
||||
);
|
||||
case 'graph_editor':
|
||||
$headerHelp = '';
|
||||
break;
|
||||
|
||||
case 'graph_editor':
|
||||
ui_print_page_header(
|
||||
$head,
|
||||
'images/chart.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$buttons
|
||||
);
|
||||
case 'main':
|
||||
default:
|
||||
$headerHelp = 'graph_builder';
|
||||
break;
|
||||
}
|
||||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$head,
|
||||
'images/chart.png',
|
||||
false,
|
||||
$headerHelp,
|
||||
false,
|
||||
[$buttons],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Reporting'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Custom graphs'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
if ($add_graph) {
|
||||
ui_print_result_message(
|
||||
$id_graph,
|
||||
@ -418,7 +423,8 @@ if (!$delete_module) {
|
||||
$chunk1 = explode('|', $chunkdata);
|
||||
$modules = '';
|
||||
$weights = '';
|
||||
for ($a = 0; $a < count($chunk1); $a++) {
|
||||
$chunkCount = count($chunk1);
|
||||
for ($a = 0; $a < $chunkCount; $a++) {
|
||||
$chunk2[$a] = [];
|
||||
$chunk2[$a] = explode(',', $chunk1[$a]);
|
||||
if (strpos($modules, $chunk2[$a][1]) == 0) {
|
||||
@ -450,4 +456,8 @@ switch ($active_tab) {
|
||||
case 'graph_editor':
|
||||
include_once 'godmode/reporting/graph_builder.graph_editor.php';
|
||||
break;
|
||||
|
||||
default:
|
||||
// Nothing to do.
|
||||
break;
|
||||
}
|
||||
|
@ -1,19 +1,35 @@
|
||||
<?php
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// 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.
|
||||
// Load global variables
|
||||
/**
|
||||
* Custom graph containers
|
||||
*
|
||||
* @category Reporting
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2007-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
// Check user credentials
|
||||
// Check user credentials.
|
||||
check_login();
|
||||
|
||||
if (! check_acl($config['id_user'], 0, 'RR') || enterprise_installed() === false) {
|
||||
@ -87,8 +103,26 @@ $buttons['graph_container'] = [
|
||||
]
|
||||
).'</a>',
|
||||
];
|
||||
// Header
|
||||
ui_print_page_header(__('Graph container'), '', false, '', false, $buttons);
|
||||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Graph container'),
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Reporting'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Custom graphs'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$container = folder_get_folders();
|
||||
|
||||
|
@ -1,16 +1,32 @@
|
||||
<?php
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// 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.
|
||||
// Load global variables
|
||||
/**
|
||||
* Reporting graphs.
|
||||
*
|
||||
* @category Reporting
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
require_once 'include/functions_custom_graphs.php';
|
||||
@ -99,8 +115,25 @@ $view_graph = (bool) get_parameter('view_graph');
|
||||
$id = (int) get_parameter('id');
|
||||
$multiple_delete = (bool) get_parameter('multiple_delete', 0);
|
||||
|
||||
// Header
|
||||
ui_print_page_header(__('Reporting').' » '.__('Custom graphs'), 'images/chart.png', false, '', false, $buttons);
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('List of custom graphs'),
|
||||
'images/chart.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Reporting'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Custom graphs'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Delete module SQL code
|
||||
if ($delete_graph) {
|
||||
|
@ -1,16 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Map builder console.
|
||||
*
|
||||
* @category Topology maps
|
||||
* @package Pandora FMS
|
||||
* @subpackage Visual consoles
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2007-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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
require_once $config['homedir'].'/include/functions_visual_map.php';
|
||||
@ -32,9 +48,7 @@ if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!$is_metaconsole) {
|
||||
if ($is_metaconsole === false) {
|
||||
$url_visual_console = 'index.php?sec=network&sec2=godmode/reporting/map_builder';
|
||||
$url_visual_console_favorite = 'index.php?sec=network&sec2=godmode/reporting/visual_console_favorite';
|
||||
$url_visual_console_template = 'index.php?sec=network&sec2=enterprise/godmode/reporting/visual_console_template';
|
||||
@ -102,14 +116,24 @@ if ($is_enterprise !== ENTERPRISE_NOT_HOOK && $vconsoles_manage) {
|
||||
];
|
||||
}
|
||||
|
||||
if (!$is_metaconsole) {
|
||||
ui_print_page_header(
|
||||
__('Reporting').' » '.__('Visual Console'),
|
||||
if ($is_metaconsole === false) {
|
||||
ui_print_standard_header(
|
||||
__('Visual Console List'),
|
||||
'images/op_reporting.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$buttons
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Visual console'),
|
||||
],
|
||||
]
|
||||
);
|
||||
} else {
|
||||
ui_meta_print_header(
|
||||
|
@ -567,17 +567,24 @@ switch ($action) {
|
||||
// Print header.
|
||||
ui_meta_print_header(__('Reporting'), '', $buttons);
|
||||
} else {
|
||||
// Page header for normal console.
|
||||
ui_print_page_header(
|
||||
__('Custom reporting'),
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('List of reports'),
|
||||
'images/op_reporting.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$buttons,
|
||||
false,
|
||||
'',
|
||||
60
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Reporting'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Custom reports'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@ -3145,17 +3152,24 @@ switch ($action) {
|
||||
// Print header.
|
||||
ui_meta_print_header(__('Reporting'), '', $buttons);
|
||||
} else {
|
||||
// Page header for normal console.
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$subsection,
|
||||
'images/op_reporting.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$buttons,
|
||||
false,
|
||||
'',
|
||||
60
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Reporting'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Custom reports'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@ -3251,17 +3265,25 @@ if ($enterpriseEnable && defined('METACONSOLE')) {
|
||||
} else {
|
||||
$tab_builder = ($activeTab === 'item_editor') ? 'reporting_item_editor_tab' : '';
|
||||
|
||||
if ($action !== 'update' && !is_metaconsole()) {
|
||||
ui_print_page_header(
|
||||
if ($action !== 'update' && is_metaconsole() === false) {
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$textReportName,
|
||||
'images/op_reporting.png',
|
||||
false,
|
||||
$tab_builder,
|
||||
false,
|
||||
$buttons,
|
||||
false,
|
||||
'',
|
||||
60
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Reporting'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Custom reports'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -3291,17 +3313,25 @@ if ($resultOperationDB !== null) {
|
||||
$activeTab = 'list_items';
|
||||
$buttons[$activeTab]['active'] = true;
|
||||
|
||||
if (!is_metaconsole()) {
|
||||
ui_print_page_header(
|
||||
if (is_metaconsole() === false) {
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$textReportName,
|
||||
'images/op_reporting.png',
|
||||
false,
|
||||
$helpers,
|
||||
false,
|
||||
$buttons,
|
||||
false,
|
||||
'',
|
||||
60
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Reporting'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Custom reports'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,33 @@
|
||||
<?php
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// 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.
|
||||
// Login check
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
global $statusProcessInDB;
|
||||
|
||||
@ -812,14 +829,25 @@ $buttons[$activeTab]['active'] = true;
|
||||
|
||||
$tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : '';
|
||||
|
||||
if (!defined('METACONSOLE')) {
|
||||
ui_print_page_header(
|
||||
if (is_metaconsole() === false) {
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$visualConsoleName,
|
||||
'images/visual_console.png',
|
||||
false,
|
||||
$tab_builder,
|
||||
false,
|
||||
$buttons
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Visual console'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,38 @@
|
||||
<?php
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// 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.
|
||||
/**
|
||||
* Favorite visual console.
|
||||
*
|
||||
* @category Topology maps
|
||||
* @package Pandora FMS
|
||||
* @subpackage Visual consoles
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2007-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
require_once $config['homedir'].'/include/functions_visual_map.php';
|
||||
|
||||
// Breadcrumb.
|
||||
require_once $config['homedir'].'/include/class/HTML.class.php';
|
||||
ui_require_css_file('discovery');
|
||||
// ACL for the general permission
|
||||
$vconsoles_read = check_acl($config['id_user'], 0, 'VR');
|
||||
$vconsoles_write = check_acl($config['id_user'], 0, 'VW');
|
||||
@ -32,7 +51,7 @@ if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
|
||||
}
|
||||
|
||||
|
||||
if (!$is_metaconsole) {
|
||||
if ($is_metaconsole === false) {
|
||||
$url_visual_console = 'index.php?sec=network&sec2=godmode/reporting/map_builder';
|
||||
$url_visual_console_favorite = 'index.php?sec=network&sec2=godmode/reporting/visual_console_favorite';
|
||||
$url_visual_console_template = 'index.php?sec=network&sec2=enterprise/godmode/reporting/visual_console_template';
|
||||
@ -94,14 +113,24 @@ if ($is_enterprise !== ENTERPRISE_NOT_HOOK && $vconsoles_manage) {
|
||||
];
|
||||
}
|
||||
|
||||
if (!$is_metaconsole) {
|
||||
ui_print_page_header(
|
||||
__('Reporting').' » '.__('Visual Favourite Console'),
|
||||
if ($is_metaconsole === false) {
|
||||
ui_print_standard_header(
|
||||
__('Favourite Visual Console'),
|
||||
'images/op_reporting.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$buttons
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Visual console'),
|
||||
],
|
||||
]
|
||||
);
|
||||
} else {
|
||||
ui_meta_print_header(
|
||||
|
@ -1,17 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* OS Edition
|
||||
*
|
||||
* @category Server
|
||||
* @package Pandora FMS
|
||||
* @subpackage Godmode
|
||||
* @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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// 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.
|
||||
// Load global vars
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
@ -45,8 +60,8 @@ if ($idOS) {
|
||||
$message = '';
|
||||
|
||||
switch ($action) {
|
||||
default:
|
||||
case 'new':
|
||||
default:
|
||||
$actionHidden = 'save';
|
||||
$textButton = __('Create');
|
||||
$classButton = 'class="sub next"';
|
||||
@ -183,12 +198,31 @@ $buttons = [
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
if (!is_metaconsole()) {
|
||||
$headerTitle = ($tab === 'builder') ? __('Edit OS') : __('List of OS');
|
||||
|
||||
if (is_metaconsole() === false) {
|
||||
// Header.
|
||||
ui_print_page_header(__('Edit OS'), '', false, '', true, $buttons);
|
||||
ui_print_standard_header(
|
||||
$headerTitle,
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Servers'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Edit OS'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
if (!empty($id_message)) {
|
||||
if (empty($id_message) === false) {
|
||||
switch ($id_message) {
|
||||
case 1:
|
||||
echo ui_print_success_message(__('Success creating OS'), '', true);
|
||||
@ -226,13 +260,11 @@ if (!empty($id_message)) {
|
||||
|
||||
switch ($tab) {
|
||||
case 'list':
|
||||
default:
|
||||
include_once $config['homedir'].'/godmode/setup/os.list.php';
|
||||
return;
|
||||
break;
|
||||
|
||||
break;
|
||||
case 'builder':
|
||||
include_once $config['homedir'].'/godmode/setup/os.builder.php';
|
||||
return;
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
@ -32,15 +32,36 @@ $index_post = (int) get_parameter('index_post', 0);
|
||||
// Create/update header
|
||||
if ($edit_filter > -2) {
|
||||
if ($edit_filter > -1) {
|
||||
ui_print_page_header(__('SNMP Console').' » '.__('Update filter'), 'images/op_snmp.png', false, '', false);
|
||||
$activeFilterCaption = ' » '.__('Update filter');
|
||||
} else {
|
||||
ui_print_page_header(__('SNMP Console').' » '.__('Create filter'), 'images/op_snmp.png', false, '', false);
|
||||
$activeFilterCaption = ' » '.__('Create filter');
|
||||
}
|
||||
} else {
|
||||
// Overview header
|
||||
ui_print_page_header(__('SNMP Console').' » '.__('Filter overview'), 'images/op_snmp.png', false, '', false);
|
||||
$activeFilterCaption = ' » '.__('Filter overview');
|
||||
}
|
||||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('SNMP Console').$activeFilterCaption,
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('SMNP'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
// Create/update filter
|
||||
if ($update_filter > -2) {
|
||||
// UPDATE
|
||||
|
@ -33,14 +33,27 @@ $snmp_type = (int) get_parameter('snmp_type', 0);
|
||||
$snmp_value = (string) get_parameter('snmp_value', '');
|
||||
$generate_trap = (bool) get_parameter('generate_trap', 0);
|
||||
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('SNMP Trap generator'),
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
'snmp_trap_generator_view',
|
||||
false
|
||||
false,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('SMNP'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
if ($generate_trap) {
|
||||
$result = true;
|
||||
$error = '';
|
||||
|
@ -729,37 +729,24 @@ class AgentsAlerts extends HTML
|
||||
public function loadHeader()
|
||||
{
|
||||
if ($this->pure == 0) {
|
||||
// Breadcrums.
|
||||
$this->setBreadcrum([]);
|
||||
|
||||
$this->prepareBreadcrum(
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
'selected' => false,
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Views'),
|
||||
'selected' => true,
|
||||
],
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Agents/Alerts'),
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
GENERIC_SIZE_TEXT,
|
||||
'',
|
||||
$this->printHeader(true)
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Views'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,8 @@ if (isset($config['homedir'])) {
|
||||
include_once $config['homedir'].'/include/functions_groups.php';
|
||||
include_once $config['homedir'].'/include/functions_users.php';
|
||||
include_once $config['homedir'].'/include/functions_html.php';
|
||||
// For standard breadcrumbs.
|
||||
ui_require_css_file('discovery');
|
||||
}
|
||||
|
||||
|
||||
@ -4302,6 +4304,99 @@ function ui_get_full_url($url='', $no_proxy=false, $add_name_php_file=false, $me
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates the Pandora 75x Standard views header.
|
||||
* This function should be the standard for
|
||||
* generating the headers of all PFMS views.
|
||||
*
|
||||
* @param string $title The title of this view.
|
||||
* @param string $icon Icon for show.
|
||||
* @param boolean $return If true, the string with the formed header is returned.
|
||||
* @param string $help String for attach at end a link for help.
|
||||
* @param boolean $godmode If false, it will created like operation mode.
|
||||
* @param array $options Tabs allowed
|
||||
* @param array $breadcrumbs Breadcrumbs with the walk.
|
||||
*
|
||||
* EXAMPLE:
|
||||
* ```
|
||||
* $buttons['option_1'] = [
|
||||
* 'active' => false,
|
||||
* 'text' => '<a href="'.$url.'">'.html_print_image(
|
||||
* 'images/wand.png',
|
||||
* true,
|
||||
* [ 'title' => __('Option 1 for show'), 'class' => 'invert_filter' ]
|
||||
* ).'</a>',
|
||||
* ];
|
||||
*
|
||||
* ui_print_standard_header(
|
||||
* __('Favorites'),
|
||||
* 'images/op_reporting.png',
|
||||
* false,
|
||||
* '',
|
||||
* true,
|
||||
* $buttons,
|
||||
* [
|
||||
* [ 'link' => '', 'label' => __('Topology maps') ],
|
||||
* [ 'link' => '', 'label' => __('Visual console') ],
|
||||
* ]
|
||||
* );
|
||||
* ```
|
||||
*
|
||||
* @return string If apply
|
||||
*/
|
||||
function ui_print_standard_header(
|
||||
string $title,
|
||||
string $icon='',
|
||||
bool $return=false,
|
||||
string $help='',
|
||||
bool $godmode=false,
|
||||
array $options=[],
|
||||
array $breadcrumbs=[]
|
||||
) {
|
||||
// Create the breadcrumb.
|
||||
$headerInformation = new HTML();
|
||||
$headerInformation->setBreadcrum([]);
|
||||
// Prepare the breadcrumbs.
|
||||
$countBreadcrumbs = count($breadcrumbs);
|
||||
$countUnitBreadcrumb = 0;
|
||||
$applyBreadcrumbs = [];
|
||||
foreach ($breadcrumbs as $unitBreadcrumb) {
|
||||
// Count new breadcrumb.
|
||||
$countUnitBreadcrumb++;
|
||||
// Apply selected if is the last.
|
||||
$unitBreadcrumb['selected'] = ($countBreadcrumbs === $countUnitBreadcrumb);
|
||||
// Apply for another breadcrumb.
|
||||
$applyBreadcrumbs[] = $unitBreadcrumb;
|
||||
}
|
||||
|
||||
// Attach breadcrumbs.
|
||||
$headerInformation->prepareBreadcrum(
|
||||
$applyBreadcrumbs,
|
||||
true
|
||||
);
|
||||
// Create the header.
|
||||
$output = ui_print_page_header(
|
||||
$title,
|
||||
$icon,
|
||||
true,
|
||||
$help,
|
||||
$godmode,
|
||||
$options,
|
||||
false,
|
||||
'',
|
||||
GENERIC_SIZE_TEXT,
|
||||
'',
|
||||
$headerInformation->printHeader(true)
|
||||
);
|
||||
|
||||
if ($return !== true) {
|
||||
echo $output;
|
||||
} else {
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a standard page header (Pandora FMS 3.1 version)
|
||||
*
|
||||
|
@ -188,12 +188,25 @@ if ($idAgent != 0) {
|
||||
|
||||
$print_agent = true;
|
||||
|
||||
if (!is_metaconsole()) {
|
||||
ui_print_page_header(
|
||||
if (is_metaconsole() === false) {
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Alert detail'),
|
||||
'images/op_alerts.png',
|
||||
false,
|
||||
''
|
||||
'',
|
||||
false,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Views'),
|
||||
],
|
||||
]
|
||||
);
|
||||
} else {
|
||||
ui_meta_print_header(__('Alerts view'));
|
||||
|
@ -1,17 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Agent Status View.
|
||||
*
|
||||
* @category View
|
||||
* @package Pandora FMS
|
||||
* @subpackage Monitoring.
|
||||
* @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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// 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.
|
||||
// Load global vars
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
ob_start();
|
||||
@ -192,13 +207,24 @@ if (check_acl($config['id_user'], 0, 'AW')) {
|
||||
$onheader = ['setup' => $setuptab];
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Agent detail'),
|
||||
'images/agent.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$onheader
|
||||
$onheader,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Views'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
if (!$strict_user) {
|
||||
|
@ -1,16 +1,32 @@
|
||||
<?php
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// 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.
|
||||
// Load global vars
|
||||
/**
|
||||
* Group View.
|
||||
*
|
||||
* @category View
|
||||
* @package Pandora FMS
|
||||
* @subpackage Monitoring.
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
require_once 'include/config.php';
|
||||
require_once 'include/functions_reporting.php';
|
||||
require_once $config['homedir'].'/include/functions_agents.php';
|
||||
@ -62,17 +78,27 @@ if ($config['realtimestats'] == 0) {
|
||||
$updated_time .= '</a>';
|
||||
} else {
|
||||
// $updated_info = __("Updated at realtime");
|
||||
$updated_info = '';
|
||||
$updated_info = '';
|
||||
}
|
||||
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
ui_print_standard_header(
|
||||
__('Group view'),
|
||||
'images/group.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$updated_time
|
||||
(array) $updated_time,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Views'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$total_agentes = 0;
|
||||
|
@ -1,18 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Pandora FMS - http://pandorafms.com
|
||||
* ==================================================
|
||||
* 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; 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.
|
||||
* Interfaces view.
|
||||
*
|
||||
* @category Monitoring
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2007-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
@ -45,12 +59,23 @@ $sec = (string) get_parameter('sec', 'view');
|
||||
$agent_id = (int) get_parameter('id_agente', 0);
|
||||
|
||||
if ($sec === 'view') {
|
||||
ui_print_page_header(
|
||||
ui_print_standard_header(
|
||||
__('Interface view').$subpage,
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
true
|
||||
true,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Views'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
* Empty Network editor.
|
||||
*
|
||||
* @category Extensions
|
||||
* @category View
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
@ -27,6 +26,7 @@
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
// Check user credentials.
|
||||
@ -203,12 +203,24 @@ if ($edit_networkmap) {
|
||||
}
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
__('Networkmap'),
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Network maps editor'),
|
||||
'images/bricks.png',
|
||||
false,
|
||||
'network_map_enterprise_edit',
|
||||
false
|
||||
false,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Networkmap'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$id_snmp_l2_recon = db_get_value(
|
||||
|
@ -1,15 +1,32 @@
|
||||
<?php
|
||||
// ______ __ _______ _______ _______
|
||||
// | __ \.---.-.-----.--| |.-----.----.---.-. | ___| | | __|
|
||||
// | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
// |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
//
|
||||
// ============================================================================
|
||||
// Copyright (c) 2007-2021 Artica Soluciones Tecnologicas, http://www.artica.es
|
||||
// This code is NOT free software. This code is NOT licenced under GPL2 licence
|
||||
// You cannnot redistribute it without written permission of copyright holder.
|
||||
// ============================================================================
|
||||
// Load global variables
|
||||
/**
|
||||
* Network map.
|
||||
*
|
||||
* @category View
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
// Check user credentials.
|
||||
@ -645,12 +662,24 @@ switch ($tab) {
|
||||
<?php
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
__('Networkmap'),
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('List of network maps'),
|
||||
'images/op_network.png',
|
||||
false,
|
||||
'',
|
||||
false
|
||||
false,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Networkmap'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
echo $result_txt;
|
||||
|
@ -1,17 +1,32 @@
|
||||
<?php
|
||||
// This file is an example on how things must NEVER be done.
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// 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.
|
||||
// Load global vars
|
||||
/**
|
||||
* Monitor Status View.
|
||||
*
|
||||
* @category View
|
||||
* @package Pandora FMS
|
||||
* @subpackage Monitoring.
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
@ -67,7 +82,7 @@ if (! defined('METACONSOLE')) {
|
||||
switch ($section) {
|
||||
case 'fields':
|
||||
$buttons['fields']['active'] = true;
|
||||
$subpage = ' - '.__('Custom fields');
|
||||
$subpage = ' » '.__('Custom fields');
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -75,13 +90,24 @@ if (! defined('METACONSOLE')) {
|
||||
break;
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('Monitor detail').$subpage,
|
||||
'',
|
||||
'images/agent.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
$buttons
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Views'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
if ($section == 'fields') {
|
||||
|
@ -1,17 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Tactical View.
|
||||
*
|
||||
* @category View
|
||||
* @package Pandora FMS
|
||||
* @subpackage Monitoring.
|
||||
* @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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// 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.
|
||||
// Load global vars
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
require_once 'include/functions_events.php';
|
||||
@ -46,17 +61,27 @@ if ($config['realtimestats'] == 0) {
|
||||
$updated_time .= '</a>';
|
||||
} else {
|
||||
// $updated_info = __("Updated at realtime");
|
||||
$updated_info = '';
|
||||
$updated_info = '';
|
||||
}
|
||||
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
ui_print_standard_header(
|
||||
__('Tactical view'),
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$updated_time
|
||||
(array) $updated_time,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Views'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Currently this function makes loading this page is impossible. Change
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
* Dashboards.
|
||||
*
|
||||
* @category Dashboards
|
||||
* @package Pandora FMS
|
||||
@ -27,6 +26,7 @@
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
require $config['homedir'].'/vendor/autoload.php';
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Message Edition.
|
||||
* Compose message view
|
||||
*
|
||||
* @category Workspace
|
||||
* @package Pandora FMS
|
||||
@ -82,13 +82,23 @@ $buttons['create_message'] = [
|
||||
];
|
||||
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
__('Messages'),
|
||||
ui_print_standard_header(
|
||||
__('Compose message'),
|
||||
'images/email_mc.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$buttons
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Workspace'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Messages'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Read a message.
|
||||
@ -381,4 +391,4 @@ html_print_div(
|
||||
);
|
||||
|
||||
echo '</form>';
|
||||
echo $jsOutput;
|
||||
echo $jsOutput;
|
||||
|
@ -1,9 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
* Sent / Received messages view.
|
||||
*
|
||||
* @category Extensions
|
||||
* @category Workspace
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
@ -27,23 +26,24 @@
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
require_once 'include/functions_messages.php';
|
||||
|
||||
global $config;
|
||||
|
||||
$delete_msg = get_parameter('delete_message', 0);
|
||||
$multiple_delete = get_parameter('multiple_delete', 0);
|
||||
$show_sent = get_parameter('show_sent', 0);
|
||||
$show_sent = (bool) get_parameter('show_sent', false);
|
||||
$mark_unread = get_parameter('mark_unread', 0);
|
||||
|
||||
$active_list = true;
|
||||
$active_sent = false;
|
||||
if ($show_sent !== 0) {
|
||||
if ($show_sent === true) {
|
||||
$active_list = false;
|
||||
$active_sent = true;
|
||||
}
|
||||
|
||||
|
||||
$tabSelectedMessage = ($show_sent === true) ? __('Sent messages') : __('Received messages');
|
||||
|
||||
$buttons['message_list'] = [
|
||||
'active' => $active_list,
|
||||
@ -67,14 +67,25 @@ $buttons['create_message'] = [
|
||||
).'</a>',
|
||||
];
|
||||
|
||||
if (!is_ajax()) {
|
||||
ui_print_page_header(
|
||||
__('Messages'),
|
||||
if (is_ajax() === false) {
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$tabSelectedMessage,
|
||||
'images/email_mc.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$buttons
|
||||
$buttons,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Workspace'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Messages'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@ -86,7 +97,7 @@ if ($mark_unread) {
|
||||
if ($delete_msg) {
|
||||
$id = (int) get_parameter('id');
|
||||
|
||||
if ($show_sent) {
|
||||
if ($show_sent === true) {
|
||||
$result = messages_delete_message_sent($id);
|
||||
} else {
|
||||
$result = messages_delete_message($id);
|
||||
@ -104,7 +115,7 @@ if ($multiple_delete) {
|
||||
$ids = (array) get_parameter('delete_multiple_messages', []);
|
||||
|
||||
foreach ($ids as $id) {
|
||||
if ($show_sent) {
|
||||
if ($show_sent === true) {
|
||||
$result = messages_delete_message_sent($id);
|
||||
} else {
|
||||
$result = messages_delete_message($id);
|
||||
@ -122,7 +133,7 @@ if ($multiple_delete) {
|
||||
);
|
||||
}
|
||||
|
||||
if ($show_sent) {
|
||||
if ($show_sent === true) {
|
||||
// Sent view.
|
||||
$num_messages = messages_get_count_sent($config['id_user']);
|
||||
if ($num_messages > 0 && !is_ajax()) {
|
||||
@ -142,7 +153,7 @@ if ($show_sent) {
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($messages)) {
|
||||
if (empty($messages) === true) {
|
||||
ui_print_info_message(
|
||||
[
|
||||
'no_close' => true,
|
||||
@ -175,7 +186,7 @@ if (empty($messages)) {
|
||||
|
||||
$table->head[5] = html_print_checkbox('all_delete_messages', 0, false, true, false);
|
||||
$table->head[0] = __('Status');
|
||||
if ($show_sent) {
|
||||
if ($show_sent === true) {
|
||||
$table->head[1] = __('Destination');
|
||||
} else {
|
||||
$table->head[1] = __('Sender');
|
||||
@ -194,7 +205,7 @@ if (empty($messages)) {
|
||||
|
||||
$data[0] = '';
|
||||
if ($message['read'] == 1) {
|
||||
if ($show_sent) {
|
||||
if ($show_sent === true) {
|
||||
$data[0] .= '<a href="index.php?sec=message_list&sec2=operation/messages/message_edit&read_message=1&show_sent=1&id_message='.$message_id.'">';
|
||||
$data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Click to read'), 'class' => 'invert_filter']);
|
||||
$data[0] .= '</a>';
|
||||
@ -204,7 +215,7 @@ if (empty($messages)) {
|
||||
$data[0] .= '</a>';
|
||||
}
|
||||
} else {
|
||||
if ($show_sent) {
|
||||
if ($show_sent === true) {
|
||||
$data[0] .= '<a href="index.php?sec=message_list&sec2=operation/messages/message_edit&read_message=1&show_sent=1&id_message='.$message_id.'">';
|
||||
$data[0] .= html_print_image('images/email_inbox.png', true, ['border' => 0, 'title' => __('Message unread - click to read'), 'class' => 'invert_filter']);
|
||||
$data[0] .= '</a>';
|
||||
@ -215,7 +226,7 @@ if (empty($messages)) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($show_sent) {
|
||||
if ($show_sent === true) {
|
||||
$dest_user = get_user_fullname($message['dest']);
|
||||
if (!$dest_user) {
|
||||
$dest_user = $message['dest'];
|
||||
@ -231,7 +242,7 @@ if (empty($messages)) {
|
||||
$data[1] = $orig_user;
|
||||
}
|
||||
|
||||
if ($show_sent) {
|
||||
if ($show_sent === true) {
|
||||
$data[2] = '<a href="index.php?sec=message_list&sec2=operation/messages/message_edit&read_message=1&show_sent=1&id_message='.$message_id.'">';
|
||||
} else {
|
||||
$data[2] = '<a href="index.php?sec=message_list&sec2=operation/messages/message_edit&read_message=1&id_message='.$message_id.'">';
|
||||
@ -252,7 +263,7 @@ if (empty($messages)) {
|
||||
);
|
||||
|
||||
$table->cellclass[][4] = 'action_buttons';
|
||||
if ($show_sent) {
|
||||
if ($show_sent === true) {
|
||||
$data[4] = '<a href="index.php?sec=message_list&sec2=operation/messages/message_list&show_sent=1&delete_message=1&id='.$message_id.'"
|
||||
onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
|
||||
} else {
|
||||
@ -264,8 +275,8 @@ if (empty($messages)) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($messages)) {
|
||||
if ($show_sent) {
|
||||
if (empty($messages) === false) {
|
||||
if ($show_sent === true) {
|
||||
echo '<form method="post" action="index.php?sec=message_list&sec2=operation/messages/message_list&show_sent=1">';
|
||||
} else {
|
||||
echo '<form method="post" action="index.php?sec=message_list&sec2=operation/messages/message_list">';
|
||||
|
@ -173,16 +173,24 @@ if (is_metaconsole()) {
|
||||
// Print header
|
||||
ui_meta_print_header(__('Reporting'), '', $options);
|
||||
} else {
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
reporting_get_name($id_report),
|
||||
'images/op_reporting.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$options,
|
||||
false,
|
||||
'',
|
||||
55
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Reporting'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Custom reports'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
* SMNP Browser view
|
||||
*
|
||||
* @category Extensions
|
||||
* @category Monitoring
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
@ -27,6 +26,7 @@
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
global $config;
|
||||
require_once $config['homedir'].'/include/functions_snmp_browser.php';
|
||||
ui_require_javascript_file('pandora_snmp_browser');
|
||||
@ -42,7 +42,6 @@ if (!check_acl($config['id_user'], 0, 'AR')) {
|
||||
|
||||
|
||||
|
||||
// Header.
|
||||
$url = 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_browser&pure='.$config['pure'];
|
||||
if ($config['pure']) {
|
||||
// Windowed.
|
||||
@ -70,13 +69,24 @@ if ($config['pure']) {
|
||||
$link['text'] .= '</a>';
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('SNMP Browser'),
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
'snmp_browser_view',
|
||||
false,
|
||||
[$link]
|
||||
[$link],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('SMNP'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// SNMP tree container.
|
||||
|
@ -1,17 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* MIB Uploader view
|
||||
*
|
||||
* @category Monitoring
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @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.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2013-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.
|
||||
// Load global vars
|
||||
// Begin.
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
@ -24,8 +39,26 @@ if (! check_acl($config['id_user'], 0, 'PM')) {
|
||||
|
||||
require_once 'include/functions_filemanager.php';
|
||||
|
||||
// Header
|
||||
ui_print_page_header(__('MIB uploader'), 'images/op_snmp.png', false, '', false);
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('MIB uploader'),
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('SMNP'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
if (isset($config['filemanager']['message'])) {
|
||||
echo $config['filemanager']['message'];
|
||||
|
@ -81,8 +81,8 @@ $statistics['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/
|
||||
).'</a>';
|
||||
|
||||
// Header
|
||||
ui_print_page_header(
|
||||
__('SNMP Console'),
|
||||
ui_print_standard_header(
|
||||
__('SNMP Statistics'),
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
'',
|
||||
@ -91,6 +91,16 @@ ui_print_page_header(
|
||||
$fullscreen,
|
||||
$list,
|
||||
$statistics,
|
||||
],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('SNMP'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -676,8 +676,8 @@ $trapcount = (int) db_get_value_sql($sql_count);
|
||||
|
||||
// No traps.
|
||||
if (empty($traps)) {
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
// Header
|
||||
ui_print_standard_header(
|
||||
__('SNMP Console'),
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
@ -686,6 +686,16 @@ if (empty($traps)) {
|
||||
[
|
||||
$list,
|
||||
$statistics,
|
||||
],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('SNMP'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
@ -774,8 +784,8 @@ if (empty($traps)) {
|
||||
ui_require_javascript_file('wz_jsgraphics');
|
||||
ui_require_javascript_file('pandora_visual_console');
|
||||
} else {
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
// Header
|
||||
ui_print_standard_header(
|
||||
__('SNMP Console'),
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
@ -785,6 +795,16 @@ if (empty($traps)) {
|
||||
$fullscreen,
|
||||
$list,
|
||||
$statistics,
|
||||
],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('SNMP'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -147,12 +147,29 @@ switch ($tab) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!is_metaconsole()) {
|
||||
if (is_metaconsole() === false) {
|
||||
if (!$strict_acl) {
|
||||
$header_title = $header_title.' - '.$header_sub_title;
|
||||
$header_title = $header_title.' » '.$header_sub_title;
|
||||
}
|
||||
|
||||
ui_print_page_header($header_title, 'images/extensions.png', false, 'tree_view', false, $tabs);
|
||||
ui_print_standard_header(
|
||||
$header_title,
|
||||
'images/extensions.png',
|
||||
false,
|
||||
'tree_view',
|
||||
false,
|
||||
$tabs,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('View'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// ---------------------Tabs -------------------------------------------
|
||||
|
@ -1,9 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
* User edition.
|
||||
*
|
||||
* @category Extensions
|
||||
* @category Operation
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
@ -29,6 +28,7 @@
|
||||
|
||||
global $config;
|
||||
|
||||
$headerTitle = __('User detail editor');
|
||||
// Load the header.
|
||||
require $config['homedir'].'/operation/users/user_edit_header.php';
|
||||
|
||||
|
@ -113,17 +113,23 @@ if (is_metaconsole()) {
|
||||
$tab_name = 'User Notifications';
|
||||
}
|
||||
|
||||
ui_print_page_header(
|
||||
__('User detail editor'),
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$headerTitle,
|
||||
'images/user.png',
|
||||
false,
|
||||
$helpers,
|
||||
false,
|
||||
$buttons,
|
||||
false,
|
||||
'',
|
||||
GENERIC_SIZE_TEXT,
|
||||
'',
|
||||
__('Workspace').ui_print_breadcrums($tab_name)
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Workspace'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Edit user'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ global $config;
|
||||
require_once $config['homedir'].'/include/functions_notifications.php';
|
||||
|
||||
// Load the header.
|
||||
$headerTitle = __('User notifications');
|
||||
require $config['homedir'].'/operation/users/user_edit_header.php';
|
||||
|
||||
if (get_parameter('change_label', 0)) {
|
||||
|
@ -198,7 +198,7 @@ $options['view']['text'] = '<a href="index.php?sec=network&sec2=operation/visual
|
||||
).'</a>';
|
||||
$options['view']['active'] = true;
|
||||
|
||||
if (!is_metaconsole()) {
|
||||
if (is_metaconsole() === false) {
|
||||
if (!$config['pure']) {
|
||||
$options['pure']['text'] = '<a href="index.php?sec=network&sec2=operation/visual_console/render_view&id='.$visualConsoleId.'&pure=1&refr='.$refr.'">'.html_print_image(
|
||||
'images/full_screen.png',
|
||||
@ -208,13 +208,25 @@ if (!is_metaconsole()) {
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
ui_print_page_header(
|
||||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$visualConsoleName,
|
||||
'images/visual_console.png',
|
||||
false,
|
||||
'visual_console_view',
|
||||
false,
|
||||
$options
|
||||
$options,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Topology maps'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Visual console'),
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@ -465,7 +477,7 @@ if ($pure === true) {
|
||||
|
||||
// Check groups can access user.
|
||||
$aclUserGroups = [];
|
||||
if (!users_can_manage_group_all('AR')) {
|
||||
if (users_can_manage_group_all('AR') === false) {
|
||||
$aclUserGroups = array_keys(users_get_groups(false, 'AR'));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user