2014-03-14 Vanessa Gil <vanessa.gil@artica.es>

* pandoradb.data.oracle.sql
	  pandoradb.data.postgreSQL.sql
	  pandoradb.sql
	  pandoradb_data.sql
	  extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql
	  extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql
	  extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql
	  godmode/reporting/graph_builder.graph_editor.php
	  godmode/setup/setup_visuals.php
	  include/functions_config.php
	  include/functions_graph.php: Changed weight and colors in
	combine graphs.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9592 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2014-03-14 08:33:13 +00:00
parent 5f55bd2e78
commit 83b9888006
12 changed files with 161 additions and 20 deletions

View File

@ -1,3 +1,18 @@
2014-03-14 Vanessa Gil <vanessa.gil@artica.es>
* pandoradb.data.oracle.sql
pandoradb.data.postgreSQL.sql
pandoradb.sql
pandoradb_data.sql
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql
godmode/reporting/graph_builder.graph_editor.php
godmode/setup/setup_visuals.php
include/functions_config.php
include/functions_graph.php: Changed weight and colors in
combine graphs.
2014-03-13 Sergio Martin <sergio.martin@artica.es>
* include/functions_visual_map.php

View File

@ -16,3 +16,23 @@ ALTER TABLE `talert_actions` ADD COLUMN `field7_recovery` text NOT NULL;
ALTER TABLE `talert_actions` ADD COLUMN `field8_recovery` text NOT NULL;
ALTER TABLE `talert_actions` ADD COLUMN `field9_recovery` text NOT NULL;
ALTER TABLE `talert_actions` ADD COLUMN `field10_recovery` text NOT NULL;
-- ---------------------------------------------------------------------
-- Table `tconfig`
-- ---------------------------------------------------------------------
INSERT INTO `tconfig` (`token`, `value`) VALUES
('graph_color4', '#FF66CC'),
('graph_color5', '#CC0000'),
('graph_color6', '#0033FF'),
('graph_color7', '#99FF99'),
('graph_color8', '#330066'),
('graph_color9', '#66FFFF'),
('graph_color10', '#6666FF');
UPDATE tconfig SET `value`='#FFFF00' WHERE `token`='graph_color2';
UPDATE tconfig SET `value`='#FF6600' WHERE `token`='graph_color3';
-- ---------------------------------------------------------------------
-- Table `tconfig`
-- ---------------------------------------------------------------------
ALTER TABLE tgraph_source MODIFY COLUMN `weight` float(8,3) NOT NULL DEFAULT 0;

View File

@ -16,3 +16,17 @@ ALTER TABLE talert_actions ADD (field7_recovery CLOB default '' NULL);
ALTER TABLE talert_actions ADD (field8_recovery CLOB default '' NULL);
ALTER TABLE talert_actions ADD (field9_recovery CLOB default '' NULL);
ALTER TABLE talert_actions ADD (field10_recovery CLOB default '' NULL);
-- ---------------------------------------------------------------------
-- Table `tconfig`
-- ---------------------------------------------------------------------
INSERT INTO tconfig (token, value) VALUES ('graph_color4', '#FF66CC');
INSERT INTO tconfig (token, value) VALUES ('graph_color5', '#CC0000');
INSERT INTO tconfig (token, value) VALUES ('graph_color6', '#0033FF');
INSERT INTO tconfig (token, value) VALUES ('graph_color7', '#99FF99');
INSERT INTO tconfig (token, value) VALUES ('graph_color8', '#330066');
INSERT INTO tconfig (token, value) VALUES ('graph_color9', '#66FFFF');
INSERT INTO tconfig (token, value) VALUES ('graph_color10', '#6666FF');
UPDATE tconfig SET value='#FFFF00' WHERE token='graph_color2';
UPDATE tconfig SET value='#FF6600' WHERE token='graph_color3';

View File

@ -16,3 +16,18 @@ ALTER TABLE "talert_actions" ADD COLUMN "field7_recovery" text NULL default '';
ALTER TABLE "talert_actions" ADD COLUMN "field8_recovery" text NULL default '';
ALTER TABLE "talert_actions" ADD COLUMN "field9_recovery" text NULL default '';
ALTER TABLE "talert_actions" ADD COLUMN "field10_recovery" text NULL default '';
-- ---------------------------------------------------------------------
-- Table "tconfig"
-- ---------------------------------------------------------------------
INSERT INTO "tconfig" ("token", "value") VALUES
('graph_color4', '#FF66CC'),
('graph_color5', '#CC0000'),
('graph_color6', '#0033FF'),
('graph_color7', '#99FF99'),
('graph_color8', '#330066'),
('graph_color9', '#66FFFF'),
('graph_color10', '#6666FF');
UPDATE "tconfig" SET "value"='#FFFF00' WHERE "token"='graph_color2';
UPDATE "tconfig" SET "value"='#FF6600' WHERE "token"='graph_color3';

View File

@ -98,11 +98,12 @@ if(count($module_array) > 0){
echo modules_get_agentmodule_name ($module_array[$a])."</td>";
echo "<td class='$tdcolor' align='center'>";
echo "<table><tr>";
$new_weight = $weight_array[$a]-0.125;
echo "<td align='center'><a href='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&weight=".$new_weight."&id=". $id ."&graph=" . $idgs_array[$a] . "'>".html_print_image('images/down.png', true, array ('title' => __('Decrease Weight')))."</a></td>";
echo "<td align='center'>$weight_array[$a]</td>";
$new_weight = $weight_array[$a]+0.125;
echo "<td align='center'><a href='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&weight=".$new_weight."&id=". $id ."&graph=" . $idgs_array[$a] . "'>".html_print_image('images/up.png', true, array ('title' => __('Increase Weight')))."</a></td>";
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&id=". $id ."&graph=" . $idgs_array[$a] . "'>";
html_print_input_text ('weight', $weight_array[$a], '', 20, 10, false, false);
html_print_submit_button ('Ok', 'btn', false, '', false);
echo "</form>";
echo "</tr></table>";
echo "</td>";
echo "<td class='$tdcolor' align='center'>";

View File

@ -82,6 +82,41 @@ $table->data[$row][1] = html_print_input_text ('graph_color3', $config["graph_co
$row++;
$table->data[$row][0] = __('Graph color #4');
$table->data[$row][1] = html_print_input_text ('graph_color4', $config["graph_color4"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #5');
$table->data[$row][1] = html_print_input_text ('graph_color5', $config["graph_color5"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #6');
$table->data[$row][1] = html_print_input_text ('graph_color6', $config["graph_color6"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #7');
$table->data[$row][1] = html_print_input_text ('graph_color7', $config["graph_color7"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #8');
$table->data[$row][1] = html_print_input_text ('graph_color8', $config["graph_color8"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #9');
$table->data[$row][1] = html_print_input_text ('graph_color9', $config["graph_color9"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #10');
$table->data[$row][1] = html_print_input_text ('graph_color10', $config["graph_color10"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graphic resolution (1-low, 5-high)');
$table->data[$row][1] = html_print_input_text ('graph_res', $config["graph_res"], '', 5, 5, true);
@ -284,6 +319,13 @@ $(document).ready (function () {
$("#form_setup #text-graph_color1").attachColorPicker();
$("#form_setup #text-graph_color2").attachColorPicker();
$("#form_setup #text-graph_color3").attachColorPicker();
$("#form_setup #text-graph_color4").attachColorPicker();
$("#form_setup #text-graph_color5").attachColorPicker();
$("#form_setup #text-graph_color6").attachColorPicker();
$("#form_setup #text-graph_color7").attachColorPicker();
$("#form_setup #text-graph_color8").attachColorPicker();
$("#form_setup #text-graph_color9").attachColorPicker();
$("#form_setup #text-graph_color10").attachColorPicker();
$("#button-interval_del_btn").click( function() {
var interval_selected = $('#intervals option:selected').val();

View File

@ -367,6 +367,20 @@ function config_update_config () {
$error_update[] = __('Graph color (avg)');
if (!config_update_value ('graph_color3', (string) get_parameter ('graph_color3')))
$error_update[] = __('Graph color (max)');
if (!config_update_value ('graph_color4', (string) get_parameter ('graph_color4')))
$error_update[] = __('Graph color #4');
if (!config_update_value ('graph_color5', (string) get_parameter ('graph_color5')))
$error_update[] = __('Graph color #5');
if (!config_update_value ('graph_color6', (string) get_parameter ('graph_color6')))
$error_update[] = __('Graph color #6');
if (!config_update_value ('graph_color7', (string) get_parameter ('graph_color7')))
$error_update[] = __('Graph color #7');
if (!config_update_value ('graph_color8', (string) get_parameter ('graph_color8')))
$error_update[] = __('Graph color #8');
if (!config_update_value ('graph_color9', (string) get_parameter ('graph_color9')))
$error_update[] = __('Graph color #9');
if (!config_update_value ('graph_color10', (string) get_parameter ('graph_color10')))
$error_update[] = __('Graph color #10');
if (!config_update_value ('graph_res', (int) get_parameter ('graph_res')))
$error_update[] = __('Graphic resolution (1-low, 5-high)');
$style = (string) get_parameter ('style');

View File

@ -1237,14 +1237,13 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $
$color[0] = array('border' => '#000000', 'color' => $config['graph_color1'], 'alpha' => 50);
$color[1] = array('border' => '#000000', 'color' => $config['graph_color2'], 'alpha' => 50);
$color[2] = array('border' => '#000000', 'color' => $config['graph_color3'], 'alpha' => 50);
$color[3] = array('border' => '#000000', 'color' => COL_GRAPH1, 'alpha' => 50);
$color[4] = array('border' => '#000000', 'color' => COL_GRAPH2, 'alpha' => 50);
$color[5] = array('border' => '#000000', 'color' => COL_GRAPH3, 'alpha' => 50);
$color[6] = array('border' => '#000000', 'color' => COL_GRAPH4, 'alpha' => 50);
$color[7] = array('border' => '#000000', 'color' => COL_GRAPH5, 'alpha' => 50);
$color[8] = array('border' => '#000000', 'color' => COL_GRAPH6, 'alpha' => 50);
$color[9] = array('border' => '#000000', 'color' => COL_GRAPH7, 'alpha' => 50);
$color[10] = array('border' => '#000000', 'color' => COL_GRAPH8, 'alpha' => 50);
$color[3] = array('border' => '#000000', 'color' => $config['graph_color4'], 'alpha' => 50);
$color[4] = array('border' => '#000000', 'color' => $config['graph_color5'], 'alpha' => 50);
$color[5] = array('border' => '#000000', 'color' => $config['graph_color6'], 'alpha' => 50);
$color[6] = array('border' => '#000000', 'color' => $config['graph_color7'], 'alpha' => 50);
$color[7] = array('border' => '#000000', 'color' => $config['graph_color8'], 'alpha' => 50);
$color[8] = array('border' => '#000000', 'color' => $config['graph_color9'], 'alpha' => 50);
$color[9] = array('border' => '#000000', 'color' => $config['graph_color10'], 'alpha' => 50);
$color[11] = array('border' => '#000000', 'color' => COL_GRAPH9, 'alpha' => 50);
$color[12] = array('border' => '#000000', 'color' => COL_GRAPH10, 'alpha' => 50);
$color[13] = array('border' => '#000000', 'color' => COL_GRAPH11, 'alpha' => 50);

View File

@ -60,8 +60,15 @@ INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
INSERT INTO tconfig (token, value) VALUES ('style','pandora');
INSERT INTO tconfig (token, value) VALUES ('remote_config', '/var/spool/pandora/data_in');
INSERT INTO tconfig (token, value) VALUES ('graph_color1', '#38B800');
INSERT INTO tconfig (token, value) VALUES ('graph_color2', '#42D100');
INSERT INTO tconfig (token, value) VALUES ('graph_color3', '#89FF09');
INSERT INTO tconfig (token, value) VALUES ('graph_color2', '#FFFF00');
INSERT INTO tconfig (token, value) VALUES ('graph_color3', '#FF6600');
INSERT INTO tconfig (token, value) VALUES ('graph_color4', '#FF66CC');
INSERT INTO tconfig (token, value) VALUES ('graph_color5', '#CC0000');
INSERT INTO tconfig (token, value) VALUES ('graph_color6', '#0033FF');
INSERT INTO tconfig (token, value) VALUES ('graph_color7', '#99FF99');
INSERT INTO tconfig (token, value) VALUES ('graph_color8', '#330066');
INSERT INTO tconfig (token, value) VALUES ('graph_color9', '#66FFFF');
INSERT INTO tconfig (token, value) VALUES ('graph_color10', '#6666FF');
INSERT INTO tconfig (token, value) VALUES ('sla_period', '604800');
INSERT INTO tconfig (token, value) VALUES ('trap2agent', '0');
INSERT INTO tconfig (token, value) VALUES ('date_format', 'F j, Y, g:i a');

View File

@ -56,8 +56,15 @@ INSERT INTO "tconfig" ("token", "value") VALUES
('style','pandora'),
('remote_config', '/var/spool/pandora/data_in'),
('graph_color1', '#38B800'),
('graph_color2', '#42D100'),
('graph_color3', '#89FF09'),
('graph_color2', '#FFFF00'),
('graph_color3', '#FF6600'),
('graph_color4', '#FF66CC'),
('graph_color5', '#CC0000'),
('graph_color6', '#0033FF'),
('graph_color7', '#99FF99'),
('graph_color8', '#330066'),
('graph_color9', '#66FFFF'),
('graph_color10', '#6666FF'),
('sla_period', '604800'),
('trap2agent', '0'),
('date_format', 'F j, Y, g:i a'),

View File

@ -978,7 +978,7 @@ CREATE TABLE IF NOT EXISTS `tgraph_source` (
`id_gs` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`id_graph` int(11) NOT NULL default 0,
`id_agent_module` int(11) NOT NULL default 0,
`weight` float(5,3) NOT NULL DEFAULT 0,
`weight` float(8,3) NOT NULL DEFAULT 0,
PRIMARY KEY(`id_gs`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8;

View File

@ -43,8 +43,15 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('style','pandora'),
('remote_config', '/var/spool/pandora/data_in'),
('graph_color1', '#38B800'),
('graph_color2', '#42D100'),
('graph_color3', '#89FF09'),
('graph_color2', '#FFFF00'),
('graph_color3', '#FF6600'),
('graph_color4', '#FF66CC'),
('graph_color5', '#CC0000'),
('graph_color6', '#0033FF'),
('graph_color7', '#99FF99'),
('graph_color8', '#330066'),
('graph_color9', '#66FFFF'),
('graph_color10', '#6666FF'),
('sla_period', '604800'),
('trap2agent', '0'),
('date_format', 'F j, Y, g:i a'),