mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Added standard headers
This commit is contained in:
parent
3f33a0ec29
commit
46a691c397
@ -26,10 +26,9 @@
|
|||||||
* ============================================================================
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Begin.
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (is_ajax()) {
|
if (is_ajax()) {
|
||||||
$search_agents = (bool) get_parameter('search_agents');
|
$search_agents = (bool) get_parameter('search_agents');
|
||||||
|
|
||||||
@ -340,37 +339,43 @@ if ($edit_graph) {
|
|||||||
|
|
||||||
$head = __('Graph builder');
|
$head = __('Graph builder');
|
||||||
|
|
||||||
if (isset($name)) {
|
if (isset($name) === true) {
|
||||||
$head .= ' - '.$name;
|
$head .= ' » '.$name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Header.
|
// Header.
|
||||||
$tab = get_parameter('tab', '');
|
$tab = get_parameter('tab');
|
||||||
switch ($tab) {
|
switch ($tab) {
|
||||||
default:
|
case 'graph_editor':
|
||||||
case 'main':
|
$headerHelp = '';
|
||||||
ui_print_page_header(
|
|
||||||
$head,
|
|
||||||
'images/chart.png',
|
|
||||||
false,
|
|
||||||
'graph_builder',
|
|
||||||
false,
|
|
||||||
$buttons
|
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'graph_editor':
|
case 'main':
|
||||||
ui_print_page_header(
|
default:
|
||||||
$head,
|
$headerHelp = 'graph_builder';
|
||||||
'images/chart.png',
|
|
||||||
false,
|
|
||||||
'',
|
|
||||||
false,
|
|
||||||
$buttons
|
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Header.
|
||||||
|
ui_print_standard_header(
|
||||||
|
$head,
|
||||||
|
'images/chart.png',
|
||||||
|
false,
|
||||||
|
$headerHelp,
|
||||||
|
false,
|
||||||
|
[$buttons],
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Reporting'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Custom graphs'),
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
if ($add_graph) {
|
if ($add_graph) {
|
||||||
ui_print_result_message(
|
ui_print_result_message(
|
||||||
$id_graph,
|
$id_graph,
|
||||||
@ -418,7 +423,8 @@ if (!$delete_module) {
|
|||||||
$chunk1 = explode('|', $chunkdata);
|
$chunk1 = explode('|', $chunkdata);
|
||||||
$modules = '';
|
$modules = '';
|
||||||
$weights = '';
|
$weights = '';
|
||||||
for ($a = 0; $a < count($chunk1); $a++) {
|
$chunkCount = count($chunk1);
|
||||||
|
for ($a = 0; $a < $chunkCount; $a++) {
|
||||||
$chunk2[$a] = [];
|
$chunk2[$a] = [];
|
||||||
$chunk2[$a] = explode(',', $chunk1[$a]);
|
$chunk2[$a] = explode(',', $chunk1[$a]);
|
||||||
if (strpos($modules, $chunk2[$a][1]) == 0) {
|
if (strpos($modules, $chunk2[$a][1]) == 0) {
|
||||||
@ -450,4 +456,8 @@ switch ($active_tab) {
|
|||||||
case 'graph_editor':
|
case 'graph_editor':
|
||||||
include_once 'godmode/reporting/graph_builder.graph_editor.php';
|
include_once 'godmode/reporting/graph_builder.graph_editor.php';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Nothing to do.
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,33 @@
|
|||||||
<?php
|
<?php
|
||||||
// Pandora FMS - http://pandorafms.com
|
/**
|
||||||
// ==================================================
|
* Extension to manage a list of gateways and the node address where they should
|
||||||
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
* point to.
|
||||||
// Please see http://pandorafms.org for full contribution list
|
*
|
||||||
// This program is free software; you can redistribute it and/or
|
* @category Extensions
|
||||||
// modify it under the terms of the GNU General Public License
|
* @package Pandora FMS
|
||||||
// as published by the Free Software Foundation for version 2.
|
* @subpackage Community
|
||||||
// This program is distributed in the hope that it will be useful,
|
* @version 1.0.0
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* @license See below
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
*
|
||||||
// GNU General Public License for more details.
|
* ______ ___ _______ _______ ________
|
||||||
// Login check
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||||
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||||
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
|
*
|
||||||
|
* ============================================================================
|
||||||
|
* 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;
|
||||||
global $statusProcessInDB;
|
global $statusProcessInDB;
|
||||||
|
|
||||||
@ -810,14 +827,25 @@ $buttons[$activeTab]['active'] = true;
|
|||||||
|
|
||||||
$tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : '';
|
$tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : '';
|
||||||
|
|
||||||
if (!defined('METACONSOLE')) {
|
if (is_metaconsole() === false) {
|
||||||
ui_print_page_header(
|
// Header.
|
||||||
|
ui_print_standard_header(
|
||||||
$visualConsoleName,
|
$visualConsoleName,
|
||||||
'images/visual_console.png',
|
'images/visual_console.png',
|
||||||
false,
|
false,
|
||||||
$tab_builder,
|
$tab_builder,
|
||||||
false,
|
false,
|
||||||
$buttons
|
$buttons,
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Topology maps'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Visual console'),
|
||||||
|
],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,8 +36,6 @@ require_once $config['homedir'].'/vendor/autoload.php';
|
|||||||
// TODO: include file functions.
|
// TODO: include file functions.
|
||||||
require_once $config['homedir'].'/include/functions_visual_map.php';
|
require_once $config['homedir'].'/include/functions_visual_map.php';
|
||||||
|
|
||||||
error_log('HOLA');
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function for return button visual console edition.
|
* Function for return button visual console edition.
|
||||||
@ -200,7 +198,7 @@ $options['view']['text'] = '<a href="index.php?sec=network&sec2=operation/visual
|
|||||||
).'</a>';
|
).'</a>';
|
||||||
$options['view']['active'] = true;
|
$options['view']['active'] = true;
|
||||||
|
|
||||||
if (!is_metaconsole()) {
|
if (is_metaconsole() === false) {
|
||||||
if (!$config['pure']) {
|
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(
|
$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',
|
'images/full_screen.png',
|
||||||
@ -210,13 +208,25 @@ if (!is_metaconsole()) {
|
|||||||
'class' => 'invert_filter',
|
'class' => 'invert_filter',
|
||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
ui_print_page_header(
|
|
||||||
|
// Header.
|
||||||
|
ui_print_standard_header(
|
||||||
$visualConsoleName,
|
$visualConsoleName,
|
||||||
'images/visual_console.png',
|
'images/visual_console.png',
|
||||||
false,
|
false,
|
||||||
'visual_console_view',
|
'visual_console_view',
|
||||||
false,
|
false,
|
||||||
$options
|
$options,
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Topology maps'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Visual console'),
|
||||||
|
],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,7 +477,7 @@ if ($pure === true) {
|
|||||||
|
|
||||||
// Check groups can access user.
|
// Check groups can access user.
|
||||||
$aclUserGroups = [];
|
$aclUserGroups = [];
|
||||||
if (!users_can_manage_group_all('AR')) {
|
if (users_can_manage_group_all('AR') === false) {
|
||||||
$aclUserGroups = array_keys(users_get_groups(false, 'AR'));
|
$aclUserGroups = array_keys(users_get_groups(false, 'AR'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user