add templates console visual

This commit is contained in:
daniel 2018-08-01 09:58:48 +02:00
parent 1088c5390d
commit cb77a299bb
8 changed files with 355 additions and 10 deletions

View File

@ -0,0 +1,55 @@
START TRANSACTION;
-- ---------------------------------------------------------------------
-- Table `tlayout`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tlayout_template` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`id_group` INTEGER UNSIGNED NOT NULL,
`background` varchar(200) NOT NULL,
`height` INTEGER UNSIGNED NOT NULL default 0,
`width` INTEGER UNSIGNED NOT NULL default 0,
`background_color` varchar(50) NOT NULL default '#FFF',
`is_favourite` INTEGER UNSIGNED NOT NULL default 0,
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `tlayout_data`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tlayout_template_data` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`id_layout_template` INTEGER UNSIGNED NOT NULL default 0,
`pos_x` INTEGER UNSIGNED NOT NULL default 0,
`pos_y` INTEGER UNSIGNED NOT NULL default 0,
`height` INTEGER UNSIGNED NOT NULL default 0,
`width` INTEGER UNSIGNED NOT NULL default 0,
`label` TEXT,
`image` varchar(200) DEFAULT "",
`type` tinyint(1) UNSIGNED NOT NULL default 0,
`period` INTEGER UNSIGNED NOT NULL default 3600,
`module_name` mediumint(8) unsigned NOT NULL default '0',
`agent_name` int(10) unsigned NOT NULL default 0,
`id_layout_linked` INTEGER unsigned NOT NULL default '0',
`parent_item` INTEGER UNSIGNED NOT NULL default 0,
`enable_link` tinyint(1) UNSIGNED NOT NULL default 1,
`id_metaconsole` int(10) NOT NULL default 0,
`id_group` INTEGER UNSIGNED NOT NULL default 0,
`id_custom_graph` INTEGER UNSIGNED NOT NULL default 0,
`border_width` INTEGER UNSIGNED NOT NULL default 0,
`type_graph` varchar(50) NOT NULL default 'area',
`label_position` varchar(50) NOT NULL default 'down',
`border_color` varchar(200) DEFAULT "",
`fill_color` varchar(200) DEFAULT "",
`show_statistics` tinyint(2) NOT NULL default '0',
`id_layout_linked_weight` int(10) NOT NULL default '0',
`element_group` int(10) NOT NULL default '0',
`show_on_top` tinyint(1) NOT NULL default '0',
`clock_animation` varchar(60) NOT NULL default "analogic_1",
`time_format` varchar(60) NOT NULL default "time",
`timezone` varchar(60) NOT NULL default "Europe/Madrid",
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
COMMIT;

View File

@ -1175,13 +1175,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 18);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 19);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '724');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '726');
-- ---------------------------------------------------------------------
-- Table `tconfig_os`
@ -1712,4 +1712,55 @@ CREATE TABLE IF NOT EXISTS `tautoconfig_actions` (
CONSTRAINT `tautoconfig_action_ibfk_1` FOREIGN KEY (`id_autoconfig`) REFERENCES `tautoconfig` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `tlayout`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tlayout_template` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`id_group` INTEGER UNSIGNED NOT NULL,
`background` varchar(200) NOT NULL,
`height` INTEGER UNSIGNED NOT NULL default 0,
`width` INTEGER UNSIGNED NOT NULL default 0,
`background_color` varchar(50) NOT NULL default '#FFF',
`is_favourite` INTEGER UNSIGNED NOT NULL default 0,
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `tlayout_data`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tlayout_template_data` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`id_layout_template` INTEGER UNSIGNED NOT NULL default 0,
`pos_x` INTEGER UNSIGNED NOT NULL default 0,
`pos_y` INTEGER UNSIGNED NOT NULL default 0,
`height` INTEGER UNSIGNED NOT NULL default 0,
`width` INTEGER UNSIGNED NOT NULL default 0,
`label` TEXT,
`image` varchar(200) DEFAULT "",
`type` tinyint(1) UNSIGNED NOT NULL default 0,
`period` INTEGER UNSIGNED NOT NULL default 3600,
`module_name` mediumint(8) unsigned NOT NULL default '0',
`agent_name` int(10) unsigned NOT NULL default 0,
`id_layout_linked` INTEGER unsigned NOT NULL default '0',
`parent_item` INTEGER UNSIGNED NOT NULL default 0,
`enable_link` tinyint(1) UNSIGNED NOT NULL default 1,
`id_metaconsole` int(10) NOT NULL default 0,
`id_group` INTEGER UNSIGNED NOT NULL default 0,
`id_custom_graph` INTEGER UNSIGNED NOT NULL default 0,
`border_width` INTEGER UNSIGNED NOT NULL default 0,
`type_graph` varchar(50) NOT NULL default 'area',
`label_position` varchar(50) NOT NULL default 'down',
`border_color` varchar(200) DEFAULT "",
`fill_color` varchar(200) DEFAULT "",
`show_statistics` tinyint(2) NOT NULL default '0',
`id_layout_linked_weight` int(10) NOT NULL default '0',
`element_group` int(10) NOT NULL default '0',
`show_on_top` tinyint(1) NOT NULL default '0',
`clock_animation` varchar(60) NOT NULL default "analogic_1",
`time_format` varchar(60) NOT NULL default "time",
`timezone` varchar(60) NOT NULL default "Europe/Madrid",
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;

View File

@ -34,14 +34,39 @@ $hack_metaconsole = '';
if (defined('METACONSOLE'))
$hack_metaconsole = '../../';
$buttons['visual_console_favorite'] = array('active' => false,
$buttons['visual_console'] = array(
'active' => true,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder">' .
html_print_image ("images/visual_console.png", true, array ("title" => __('Visual Console List'))) .'</a>'
);
$buttons['visual_console_favorite'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_favorite">' .
html_print_image ("images/list.png", true, array ("title" => __('Visual Favourite Console'))) .'</a>');
html_print_image ("images/list.png", true, array ("title" => __('Visual Favourite Console'))) .'</a>'
);
$buttons['visual_console_template'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_template">' .
html_print_image ("images/templates.png", true, array ("title" => __('Visual Console Template'))) .'</a>'
);
$buttons['visual_console_template_wizard'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_template_wizard">' .
html_print_image ("images/wand.png", true, array ("title" => __('Visual Console Template Wizard'))) .'</a>'
);
if (!defined('METACONSOLE')) {
ui_print_page_header(
__('Reporting') .' &raquo; ' . __('Visual Console'),
"images/op_reporting.png", false, "map_builder", false, $buttons);
"images/op_reporting.png",
false,
"map_builder",
false,
$buttons
);
}
$id_layout = (int) get_parameter ('id_layout');

View File

@ -28,9 +28,29 @@ if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
exit;
}
$buttons['map_builder'] = array('active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder">' .
html_print_image ("images/visual_console.png", true, array ("title" => __('Visual Console'))) .'</a>');
$buttons['visual_console'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder">' .
html_print_image ("images/visual_console.png", true, array ("title" => __('Visual Console List'))) .'</a>'
);
$buttons['visual_console_favorite'] = array(
'active' => true,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_favorite">' .
html_print_image ("images/list.png", true, array ("title" => __('Visual Favourite Console'))) .'</a>'
);
$buttons['visual_console_template'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_template">' .
html_print_image ("images/templates.png", true, array ("title" => __('Visual Console Template'))) .'</a>'
);
$buttons['visual_console_template_wizard'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_template_wizard">' .
html_print_image ("images/wand.png", true, array ("title" => __('Visual Console Template Wizard'))) .'</a>'
);
if (!defined('METACONSOLE')) {
ui_print_page_header(

View File

@ -0,0 +1,73 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 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;
require_once ($config['homedir'] . '/include/functions_visual_map.php');
// ACL for the general permission
$vconsoles_read = check_acl ($config['id_user'], 0, "VR");
$vconsoles_write = check_acl ($config['id_user'], 0, "VW");
$vconsoles_manage = check_acl ($config['id_user'], 0, "VM");
if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
db_pandora_audit("ACL Violation",
"Trying to access map builder");
require ("general/noaccess.php");
exit;
}
$pure = (int)get_parameter('pure', 0);
$hack_metaconsole = '';
if (defined('METACONSOLE'))
$hack_metaconsole = '../../';
$buttons['visual_console'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder">' .
html_print_image ("images/visual_console.png", true, array ("title" => __('Visual Console List'))) .'</a>'
);
$buttons['visual_console_favorite'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_favorite">' .
html_print_image ("images/list.png", true, array ("title" => __('Visual Favourite Console'))) .'</a>'
);
$buttons['visual_console_template'] = array(
'active' => true,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_template">' .
html_print_image ("images/templates.png", true, array ("title" => __('Visual Console Template'))) .'</a>'
);
$buttons['visual_console_template_wizard'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_template_wizard">' .
html_print_image ("images/wand.png", true, array ("title" => __('Visual Console Template Wizard'))) .'</a>'
);
if (!defined('METACONSOLE')) {
ui_print_page_header(
__('Reporting') .' &raquo; ' . __('Visual Console'),
"images/op_reporting.png",
false,
"map_builder",
false,
$buttons
);
}
?>

View File

@ -0,0 +1,71 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 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;
require_once ($config['homedir'] . '/include/functions_visual_map.php');
// ACL for the general permission
$vconsoles_read = check_acl ($config['id_user'], 0, "VR");
$vconsoles_write = check_acl ($config['id_user'], 0, "VW");
$vconsoles_manage = check_acl ($config['id_user'], 0, "VM");
if (!$vconsoles_read && !$vconsoles_write && !$vconsoles_manage) {
db_pandora_audit("ACL Violation",
"Trying to access map builder");
require ("general/noaccess.php");
exit;
}
$pure = (int)get_parameter('pure', 0);
$hack_metaconsole = '';
if (defined('METACONSOLE'))
$hack_metaconsole = '../../';
$buttons['visual_console'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder">' .
html_print_image ("images/visual_console.png", true, array ("title" => __('Visual Console List'))) .'</a>'
);
$buttons['visual_console_favorite'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_favorite">' .
html_print_image ("images/list.png", true, array ("title" => __('Visual Favourite Console'))) .'</a>'
);
$buttons['visual_console_template'] = array(
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_template">' .
html_print_image ("images/templates.png", true, array ("title" => __('Visual Console Template'))) .'</a>'
);
$buttons['visual_console_template_wizard'] = array(
'active' => true,
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/visual_console_template_wizard">' .
html_print_image ("images/wand.png", true, array ("title" => __('Visual Console Template Wizard'))) .'</a>'
);
if (!defined('METACONSOLE')) {
ui_print_page_header(
__('Reporting') .' &raquo; ' . __('Visual Console'),
"images/op_reporting.png",
false,
"map_builder",
false,
$buttons
);
}
?>

View File

@ -3246,4 +3246,54 @@ CREATE TABLE IF NOT EXISTS `tautoconfig_actions` (
CONSTRAINT `tautoconfig_action_ibfk_1` FOREIGN KEY (`id_autoconfig`) REFERENCES `tautoconfig` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `tlayout`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tlayout_template` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`id_group` INTEGER UNSIGNED NOT NULL,
`background` varchar(200) NOT NULL,
`height` INTEGER UNSIGNED NOT NULL default 0,
`width` INTEGER UNSIGNED NOT NULL default 0,
`background_color` varchar(50) NOT NULL default '#FFF',
`is_favourite` INTEGER UNSIGNED NOT NULL default 0,
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `tlayout_data`
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tlayout_template_data` (
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`id_layout_template` INTEGER UNSIGNED NOT NULL default 0,
`pos_x` INTEGER UNSIGNED NOT NULL default 0,
`pos_y` INTEGER UNSIGNED NOT NULL default 0,
`height` INTEGER UNSIGNED NOT NULL default 0,
`width` INTEGER UNSIGNED NOT NULL default 0,
`label` TEXT,
`image` varchar(200) DEFAULT "",
`type` tinyint(1) UNSIGNED NOT NULL default 0,
`period` INTEGER UNSIGNED NOT NULL default 3600,
`module_name` mediumint(8) unsigned NOT NULL default '0',
`agent_name` int(10) unsigned NOT NULL default 0,
`id_layout_linked` INTEGER unsigned NOT NULL default '0',
`parent_item` INTEGER UNSIGNED NOT NULL default 0,
`enable_link` tinyint(1) UNSIGNED NOT NULL default 1,
`id_metaconsole` int(10) NOT NULL default 0,
`id_group` INTEGER UNSIGNED NOT NULL default 0,
`id_custom_graph` INTEGER UNSIGNED NOT NULL default 0,
`border_width` INTEGER UNSIGNED NOT NULL default 0,
`type_graph` varchar(50) NOT NULL default 'area',
`label_position` varchar(50) NOT NULL default 'down',
`border_color` varchar(200) DEFAULT "",
`fill_color` varchar(200) DEFAULT "",
`show_statistics` tinyint(2) NOT NULL default '0',
`id_layout_linked_weight` int(10) NOT NULL default '0',
`element_group` int(10) NOT NULL default '0',
`show_on_top` tinyint(1) NOT NULL default '0',
`clock_animation` varchar(60) NOT NULL default "analogic_1",
`time_format` varchar(60) NOT NULL default "time",
`timezone` varchar(60) NOT NULL default "Europe/Madrid",
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;

View File

@ -109,10 +109,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
('custom_report_front_header', ''),
('custom_report_front_footer', ''),
('MR', 18),
('MR', 19),
('identification_reminder', 1),
('identification_reminder_timestamp', 0),
('current_package_enterprise', '725'),
('current_package_enterprise', '726'),
('post_process_custom_values', '{"0.00000038580247":"Seconds&#x20;to&#x20;months","0.00000165343915":"Seconds&#x20;to&#x20;weeks","0.00001157407407":"Seconds&#x20;to&#x20;days","0.01666666666667":"Seconds&#x20;to&#x20;minutes","0.00000000093132":"Bytes&#x20;to&#x20;Gigabytes","0.00000095367432":"Bytes&#x20;to&#x20;Megabytes","0.0009765625":"Bytes&#x20;to&#x20;Kilobytes","0.00000001653439":"Timeticks&#x20;to&#x20;weeks","0.00000011574074":"Timeticks&#x20;to&#x20;days"}'),
('custom_docs_logo', 'default_docs.png'),
('custom_support_logo', 'default_support.png'),