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
/**
* 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>';

View File

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

View File

@ -49,13 +49,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'),
],
]
);
}

View File

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

View File

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

View File

@ -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()) {

View File

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

View File

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

View File

@ -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').' &raquo; '.__('Visual Console'),
if ($is_metaconsole === false) {
ui_print_standard_header(
__('Visual Favourite List'),
'images/op_reporting.png',
false,
'',
false,
$buttons
true,
$buttons,
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('Visual console'),
],
]
);
} else {
ui_meta_print_header(

View File

@ -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').' &raquo; '.__('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(

View File

@ -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').' &raquo; '.__('Update filter'), 'images/op_snmp.png', false, '', false);
$activeFilterCaption = ' &raquo; '.__('Update filter');
} else {
ui_print_page_header(__('SNMP Console').' &raquo; '.__('Create filter'), 'images/op_snmp.png', false, '', false);
$activeFilterCaption = ' &raquo; '.__('Create filter');
}
} else {
// 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
if ($update_filter > -2) {
// UPDATE

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 = ' &raquo; '.__('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') {

View File

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

View File

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

View File

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

View File

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