WIP: Upload

This commit is contained in:
José González 2021-04-29 13:28:03 +02:00
parent d87c9e0cc1
commit 9ab027b286
22 changed files with 598 additions and 203 deletions

View File

@ -1,16 +1,29 @@
<?php <?php
/** /**
* Pandora FMS - http://pandorafms.com * Agents/Modules Monitoring view.
* ================================================== *
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas * @category Operations
* Please see http://pandorafms.org for full contribution list * @package Pandora FMS
* This program is free software; you can redistribute it and/or * @subpackage Opensource
* modify it under the terms of the GNU General Public License * @version 1.0.0
* as published by the Free Software Foundation; version 2 * @license See below
* 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. * | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* 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. // Begin.
@ -435,14 +448,25 @@ function mainAgentsModules()
if ($config['pure'] == 0) { if ($config['pure'] == 0) {
// Header. // Header.
ui_print_page_header( ui_print_standard_header(
__('Agents/Modules'), __('Agents/Modules'),
'images/module.png', 'images/module.png',
false, false,
'', '',
false, false,
$updated_time (array) $updated_time,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
); );
echo '<table class="w100p">'; echo '<table class="w100p">';
echo '<tr>'; echo '<tr>';
echo "<td> <span class='float-right'>".$fullscreen['text'].'</span> </td>'; echo "<td> <span class='float-right'>".$fullscreen['text'].'</span> </td>';

View File

@ -196,7 +196,6 @@ function mainModuleGroups()
ON ta.id_agente = tam.id_agente ON ta.id_agente = tam.id_agente
WHERE ta.disabled = 0 WHERE ta.disabled = 0
AND tam.disabled = 0 AND tam.disabled = 0
AND tam.id_modulo <> 0
AND tam.delete_pending = 0 AND tam.delete_pending = 0
AND ta.id_grupo IN (%s) AND ta.id_grupo IN (%s)
GROUP BY tam.id_agente_modulo GROUP BY tam.id_agente_modulo
@ -246,13 +245,24 @@ function mainModuleGroups()
$array_data[$value['id_grupo']][$value['id_mg']] = $value; $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'), __('Combined table of agent group and module group'),
'images/module_group.png', 'images/module_group.png',
false, false,
'', '',
false, false,
'' [],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
); );
echo "<table cellpadding='4' cellspacing='4' class='databox filters bolder margin-bottom-10' width='100%'> echo "<table cellpadding='4' cellspacing='4' class='databox filters bolder margin-bottom-10' width='100%'>

View File

@ -49,13 +49,24 @@ function pandora_realtime_graphs()
$hide_header = get_parameter('hide_header', 0); $hide_header = get_parameter('hide_header', 0);
if ($hide_header === 0) { if ($hide_header === 0) {
ui_print_page_header( // Header.
ui_print_standard_header(
__('Realtime graphs'), __('Realtime graphs'),
'images/extensions.png', 'images/extensions.png',
false, false,
'real_time_view', 'real_time_view',
false, false,
$onheader $onheader,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
); );
} }

View File

@ -1096,13 +1096,8 @@ function resource_registration_extension_main()
} }
$xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA); $xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA);
if ($xml === false) {
ui_print_error_message( process_upload_xml($xml);
__('Error uploading resource. Check if the selected file is a valid resource template in .ptr format')
);
} else {
process_upload_xml($xml);
}
} }

View File

@ -24,12 +24,20 @@ if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'],
return; return;
} }
\ui_print_page_header( // Header.
__('Monitoring').' &raquo; '.__('Clusters'), ui_print_standard_header(
__('Clusters'),
'images/chart.png', 'images/chart.png',
false, false,
'', '',
false false,
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
]
); );
ui_require_css_file('first_task'); ui_require_css_file('first_task');

View File

@ -1,17 +1,32 @@
<?php <?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 // Begin.
// ==================================================
// 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
check_login(); check_login();
// Take some parameters (GET). // Take some parameters (GET).
@ -76,13 +91,23 @@ $viewtab['active'] = false;
$onheader = ['view' => $viewtab]; $onheader = ['view' => $viewtab];
// Header. // Header.
ui_print_page_header( ui_print_standard_header(
__('Agents defined in %s', get_product_name()), __('Agents defined in %s', get_product_name()),
'images/agent.png', 'images/agent.png',
false, false,
'', '',
true, true,
$onheader $onheader,
[
[
'link' => '',
'label' => __('Resources'),
],
[
'link' => '',
'label' => __('Manage agents'),
],
]
); );
if (is_central_policies_on_node()) { if (is_central_policies_on_node()) {

View File

@ -1072,7 +1072,6 @@ foreach ($modules as $module) {
[ [
'alt' => __('Enable module'), 'alt' => __('Enable module'),
'title' => __('Enable module'), 'title' => __('Enable module'),
'class' => 'invert_filter_important',
] ]
).'</a>'; ).'</a>';
} else { } else {

View File

@ -115,12 +115,7 @@ function add_component_selection($id_network_component_type)
'', '',
'---'.__('Manual setup').'---', '---'.__('Manual setup').'---',
0, 0,
true, true
false,
true,
'',
false,
'width: 460px; '
); );
$data[1] .= '</span>'; $data[1] .= '</span>';
$data[1] .= ' <span id="component_loading" class="invisible">'; $data[1] .= ' <span id="component_loading" class="invisible">';

View File

@ -1,16 +1,32 @@
<?php <?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 // Begin.
// ==================================================
// 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.
global $config; global $config;
require_once $config['homedir'].'/include/functions_visual_map.php'; require_once $config['homedir'].'/include/functions_visual_map.php';
@ -32,9 +48,7 @@ if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
exit; exit;
} }
if ($is_metaconsole === false) {
if (!$is_metaconsole) {
$url_visual_console = 'index.php?sec=network&sec2=godmode/reporting/map_builder'; $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_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'; $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) { if ($is_metaconsole === false) {
ui_print_page_header( ui_print_standard_header(
__('Reporting').' &raquo; '.__('Visual Console'), __('Visual Favourite List'),
'images/op_reporting.png', 'images/op_reporting.png',
false, false,
'', '',
false, true,
$buttons $buttons,
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('Visual console'),
],
]
); );
} else { } else {
ui_meta_print_header( ui_meta_print_header(

View File

@ -1,19 +1,38 @@
<?php <?php
// Pandora FMS - http://pandorafms.com /**
// ================================================== * Favorite visual console.
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas *
// Please see http://pandorafms.org for full contribution list * @category Topology maps
// This program is free software; you can redistribute it and/or * @package Pandora FMS
// modify it under the terms of the GNU General Public License * @subpackage Visual consoles
// as published by the Free Software Foundation for version 2. * @version 1.0.0
// This program is distributed in the hope that it will be useful, * @license See below
// 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. * | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* 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; global $config;
require_once $config['homedir'].'/include/functions_visual_map.php'; 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 // ACL for the general permission
$vconsoles_read = check_acl($config['id_user'], 0, 'VR'); $vconsoles_read = check_acl($config['id_user'], 0, 'VR');
$vconsoles_write = check_acl($config['id_user'], 0, 'VW'); $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 = '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_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'; $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) { if ($is_metaconsole === false) {
ui_print_page_header( ui_print_standard_header(
__('Reporting').' &raquo; '.__('Visual Favourite Console'), __('Favourite Visual Console'),
'images/op_reporting.png', 'images/op_reporting.png',
false, false,
'', '',
false, true,
$buttons $buttons,
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('Visual console'),
],
]
); );
} else { } else {
ui_meta_print_header( ui_meta_print_header(

View File

@ -32,15 +32,36 @@ $index_post = (int) get_parameter('index_post', 0);
// Create/update header // Create/update header
if ($edit_filter > -2) { if ($edit_filter > -2) {
if ($edit_filter > -1) { if ($edit_filter > -1) {
ui_print_page_header(__('SNMP Console').' &raquo; '.__('Update filter'), 'images/op_snmp.png', false, '', false); $activeFilterCaption = ' &raquo; '.__('Update filter');
} else { } else {
ui_print_page_header(__('SNMP Console').' &raquo; '.__('Create filter'), 'images/op_snmp.png', false, '', false); $activeFilterCaption = ' &raquo; '.__('Create filter');
} }
} else { } else {
// Overview header // Overview header
ui_print_page_header(__('SNMP Console').' &raquo; '.__('Filter overview'), 'images/op_snmp.png', false, '', false); $activeFilterCaption = ' &raquo; '.__('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 // Create/update filter
if ($update_filter > -2) { if ($update_filter > -2) {
// UPDATE // UPDATE

View File

@ -33,14 +33,27 @@ $snmp_type = (int) get_parameter('snmp_type', 0);
$snmp_value = (string) get_parameter('snmp_value', ''); $snmp_value = (string) get_parameter('snmp_value', '');
$generate_trap = (bool) get_parameter('generate_trap', 0); $generate_trap = (bool) get_parameter('generate_trap', 0);
ui_print_page_header( // Header.
ui_print_standard_header(
__('SNMP Trap generator'), __('SNMP Trap generator'),
'images/op_snmp.png', 'images/op_snmp.png',
false, false,
'snmp_trap_generator_view', 'snmp_trap_generator_view',
false false,
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('SMNP'),
],
]
); );
if ($generate_trap) { if ($generate_trap) {
$result = true; $result = true;
$error = ''; $error = '';

View File

@ -729,37 +729,24 @@ class AgentsAlerts extends HTML
public function loadHeader() public function loadHeader()
{ {
if ($this->pure == 0) { if ($this->pure == 0) {
// Breadcrums. // Header.
$this->setBreadcrum([]); ui_print_standard_header(
$this->prepareBreadcrum(
[
[
'link' => '',
'label' => __('Monitoring'),
'selected' => false,
],
[
'link' => '',
'label' => __('Views'),
'selected' => true,
],
],
true
);
ui_print_page_header(
__('Agents/Alerts'), __('Agents/Alerts'),
'', '',
false, false,
'', '',
true,
'',
false, false,
'', [],
GENERIC_SIZE_TEXT, [
'', [
$this->printHeader(true) 'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
); );
} }

View File

@ -35,6 +35,8 @@ if (isset($config['homedir'])) {
include_once $config['homedir'].'/include/functions_groups.php'; include_once $config['homedir'].'/include/functions_groups.php';
include_once $config['homedir'].'/include/functions_users.php'; include_once $config['homedir'].'/include/functions_users.php';
include_once $config['homedir'].'/include/functions_html.php'; include_once $config['homedir'].'/include/functions_html.php';
// For standard breadcrumbs.
ui_require_css_file('discovery');
} }
@ -4296,6 +4298,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) * Return a standard page header (Pandora FMS 3.1 version)
* *

View File

@ -188,12 +188,25 @@ if ($idAgent != 0) {
$print_agent = true; $print_agent = true;
if (!is_metaconsole()) { if (is_metaconsole() === false) {
ui_print_page_header( // Header.
ui_print_standard_header(
__('Alert detail'), __('Alert detail'),
'images/op_alerts.png', 'images/op_alerts.png',
false, false,
'' '',
false,
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
); );
} else { } else {
ui_meta_print_header(__('Alerts view')); ui_meta_print_header(__('Alerts view'));

View File

@ -1,17 +1,32 @@
<?php <?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 // Begin.
// ==================================================
// 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
global $config; global $config;
ob_start(); ob_start();
@ -192,13 +207,24 @@ if (check_acl($config['id_user'], 0, 'AW')) {
$onheader = ['setup' => $setuptab]; $onheader = ['setup' => $setuptab];
} }
ui_print_page_header( // Header.
ui_print_standard_header(
__('Agent detail'), __('Agent detail'),
'images/agent.png', 'images/agent.png',
false, false,
'', '',
false, false,
$onheader $onheader,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
); );
if (!$strict_user) { if (!$strict_user) {

View File

@ -1,16 +1,32 @@
<?php <?php
// Pandora FMS - http://pandorafms.com /**
// ================================================== * Group View.
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas *
// Please see http://pandorafms.org for full contribution list * @category View
// This program is free software; you can redistribute it and/or * @package Pandora FMS
// modify it under the terms of the GNU General Public License * @subpackage Monitoring.
// as published by the Free Software Foundation for version 2. * @version 1.0.0
// This program is distributed in the hope that it will be useful, * @license See below
// 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 * | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* 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/config.php';
require_once 'include/functions_reporting.php'; require_once 'include/functions_reporting.php';
require_once $config['homedir'].'/include/functions_agents.php'; require_once $config['homedir'].'/include/functions_agents.php';
@ -62,17 +78,27 @@ if ($config['realtimestats'] == 0) {
$updated_time .= '</a>'; $updated_time .= '</a>';
} else { } else {
// $updated_info = __("Updated at realtime"); // $updated_info = __("Updated at realtime");
$updated_info = ''; $updated_info = '';
} }
// Header. // Header.
ui_print_page_header( ui_print_standard_header(
__('Group view'), __('Group view'),
'images/group.png', 'images/group.png',
false, false,
'', '',
false, false,
$updated_time (array) $updated_time,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
); );
$total_agentes = 0; $total_agentes = 0;

View File

@ -1,17 +1,32 @@
<?php <?php
// This file is an example on how things must NEVER be done. /**
// Pandora FMS - http://pandorafms.com * Monitor Status View.
// ================================================== *
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas * @category View
// Please see http://pandorafms.org for full contribution list * @package Pandora FMS
// This program is free software; you can redistribute it and/or * @subpackage Monitoring.
// modify it under the terms of the GNU General Public License * @version 1.0.0
// as published by the Free Software Foundation for version 2. * @license See below
// 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 * |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* 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 $config;
check_login(); check_login();
@ -67,7 +82,7 @@ if (! defined('METACONSOLE')) {
switch ($section) { switch ($section) {
case 'fields': case 'fields':
$buttons['fields']['active'] = true; $buttons['fields']['active'] = true;
$subpage = ' - '.__('Custom fields'); $subpage = ' &raquo; '.__('Custom fields');
break; break;
default: default:
@ -75,13 +90,24 @@ if (! defined('METACONSOLE')) {
break; break;
} }
ui_print_page_header( // Header.
ui_print_standard_header(
__('Monitor detail').$subpage, __('Monitor detail').$subpage,
'', 'images/agent.png',
false, false,
'', '',
true, true,
$buttons $buttons,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
); );
if ($section == 'fields') { if ($section == 'fields') {

View File

@ -1,17 +1,32 @@
<?php <?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 // Begin.
// ==================================================
// 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
global $config; global $config;
require_once 'include/functions_events.php'; require_once 'include/functions_events.php';
@ -46,17 +61,27 @@ if ($config['realtimestats'] == 0) {
$updated_time .= '</a>'; $updated_time .= '</a>';
} else { } else {
// $updated_info = __("Updated at realtime"); // $updated_info = __("Updated at realtime");
$updated_info = ''; $updated_info = '';
} }
// Header. // Header.
ui_print_page_header( ui_print_standard_header(
__('Tactical view'), __('Tactical view'),
'', '',
false, false,
'', '',
false, false,
$updated_time (array) $updated_time,
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Views'),
],
]
); );
// Currently this function makes loading this page is impossible. Change // Currently this function makes loading this page is impossible. Change

View File

@ -1,7 +1,6 @@
<?php <?php
/** /**
* Extension to manage a list of gateways and the node address where they should * Dashboards.
* point to.
* *
* @category Dashboards * @category Dashboards
* @package Pandora FMS * @package Pandora FMS
@ -27,6 +26,7 @@
* ============================================================================ * ============================================================================
*/ */
// Begin.
global $config; global $config;
require $config['homedir'].'/vendor/autoload.php'; require $config['homedir'].'/vendor/autoload.php';

View File

@ -1,9 +1,8 @@
<?php <?php
/** /**
* Extension to manage a list of gateways and the node address where they should * SMNP Browser view
* point to.
* *
* @category Extensions * @category Monitoring
* @package Pandora FMS * @package Pandora FMS
* @subpackage Community * @subpackage Community
* @version 1.0.0 * @version 1.0.0
@ -27,6 +26,7 @@
* ============================================================================ * ============================================================================
*/ */
// Begin.
global $config; global $config;
require_once $config['homedir'].'/include/functions_snmp_browser.php'; require_once $config['homedir'].'/include/functions_snmp_browser.php';
ui_require_javascript_file('pandora_snmp_browser'); 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']; $url = 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_browser&pure='.$config['pure'];
if ($config['pure']) { if ($config['pure']) {
// Windowed. // Windowed.
@ -70,13 +69,24 @@ if ($config['pure']) {
$link['text'] .= '</a>'; $link['text'] .= '</a>';
} }
ui_print_page_header( // Header.
ui_print_standard_header(
__('SNMP Browser'), __('SNMP Browser'),
'images/op_snmp.png', 'images/op_snmp.png',
false, false,
'snmp_browser_view', 'snmp_browser_view',
false, false,
[$link] [$link],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('SMNP'),
],
]
); );
// SNMP tree container. // SNMP tree container.

View File

@ -1,17 +1,32 @@
<?php <?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 // Begin.
// ==================================================
// 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
global $config; global $config;
check_login(); check_login();
@ -24,8 +39,26 @@ if (! check_acl($config['id_user'], 0, 'PM')) {
require_once 'include/functions_filemanager.php'; require_once 'include/functions_filemanager.php';
// Header // Header.
ui_print_page_header(__('MIB uploader'), 'images/op_snmp.png', false, '', false); ui_print_standard_header(
__('MIB uploader'),
'images/op_snmp.png',
false,
'',
false,
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('SMNP'),
],
]
);
if (isset($config['filemanager']['message'])) { if (isset($config['filemanager']['message'])) {
echo $config['filemanager']['message']; echo $config['filemanager']['message'];