2011-08-10 Ramon Novoa <rnovoa@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql: Added a new column to store extended module information. * operation/agentes/status_monitor.php, operation/agentes/estado_monitores.php: Added help tips to display extended module information. * extras/pandoradb_migrate_v3.2_to_v4.0.sql, godmode/agentes/agent_manager.php, include/styles/tip.css, include/functions_ui.php: Added support for help tips with custom images. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4711 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
534c87fca9
commit
9d616ed5dc
|
@ -1,3 +1,18 @@
|
||||||
|
2011-08-10 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql: Added
|
||||||
|
a new column to store extended module information.
|
||||||
|
|
||||||
|
* operation/agentes/status_monitor.php,
|
||||||
|
operation/agentes/estado_monitores.php: Added help tips to display
|
||||||
|
extended module information.
|
||||||
|
|
||||||
|
* extras/pandoradb_migrate_v3.2_to_v4.0.sql,
|
||||||
|
godmode/agentes/agent_manager.php,
|
||||||
|
include/styles/tip.css,
|
||||||
|
include/functions_ui.php: Added support for help tips with custom
|
||||||
|
images.
|
||||||
|
|
||||||
2011-08-10 Sancho Lerena <slerena@artica.es>
|
2011-08-10 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* pandoradb_data.sql: New sensor as agent type. Updated version.
|
* pandoradb_data.sql: New sensor as agent type. Updated version.
|
||||||
|
|
|
@ -179,6 +179,7 @@ CREATE TABLE IF NOT EXISTS `ttag_event` (
|
||||||
ALTER TABLE `tagente_modulo` ADD COLUMN (`unit` text DEFAULT '');
|
ALTER TABLE `tagente_modulo` ADD COLUMN (`unit` text DEFAULT '');
|
||||||
ALTER TABLE `tagente_modulo` ADD COLUMN (`str_warning` text DEFAULT '');
|
ALTER TABLE `tagente_modulo` ADD COLUMN (`str_warning` text DEFAULT '');
|
||||||
ALTER TABLE `tagente_modulo` ADD COLUMN (`str_critical` text DEFAULT '');
|
ALTER TABLE `tagente_modulo` ADD COLUMN (`str_critical` text DEFAULT '');
|
||||||
|
ALTER TABLE `tagente_modulo` ADD COLUMN (`extended_info` text DEFAULT '');
|
||||||
ALTER TABLE `tagente_modulo` ADD INDEX module (`id_modulo`);
|
ALTER TABLE `tagente_modulo` ADD INDEX module (`id_modulo`);
|
||||||
ALTER TABLE `tagente_modulo` ADD INDEX nombre (`nombre` (255));
|
ALTER TABLE `tagente_modulo` ADD INDEX nombre (`nombre` (255));
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ $table->data[2][0] = __('Parent');
|
||||||
$src_code = html_print_image('images/lightning.png', true, false, true);
|
$src_code = html_print_image('images/lightning.png', true, false, true);
|
||||||
$table->data[2][1] = html_print_input_text_extended ('id_parent', agents_get_name ($id_parent), 'text-id_parent', '', 30, 100, false, '',
|
$table->data[2][1] = html_print_input_text_extended ('id_parent', agents_get_name ($id_parent), 'text-id_parent', '', 30, 100, false, '',
|
||||||
array('style' => 'background: url(' . $src_code . ') no-repeat right;'), true)
|
array('style' => 'background: url(' . $src_code . ') no-repeat right;'), true)
|
||||||
. '<a href="#" class="tip"> <span>' . __("Type at least two characters to search") . '</span></a>';
|
. ui_print_help_tip (__("Type at least two characters to search"), true);
|
||||||
|
|
||||||
$table->data[2][1] .= html_print_checkbox ("cascade_protection", 1, $cascade_protection, true).__('Cascade protection'). " " . ui_print_help_icon("cascade_protection", true);
|
$table->data[2][1] .= html_print_checkbox ("cascade_protection", 1, $cascade_protection, true).__('Cascade protection'). " " . ui_print_help_icon("cascade_protection", true);
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ require_once($config['homedir'] . "/include/functions_modules.php");
|
||||||
require_once($config['homedir'] . "/include/functions.php");
|
require_once($config['homedir'] . "/include/functions.php");
|
||||||
require_once ($config['homedir'] . '/include/functions_groups.php');
|
require_once ($config['homedir'] . '/include/functions_groups.php');
|
||||||
require_once ($config['homedir'] . '/include/functions_users.php');
|
require_once ($config['homedir'] . '/include/functions_users.php');
|
||||||
|
require_once ($config['homedir'] . '/include/functions_html.php');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1203,11 +1204,12 @@ function ui_pagination ($count, $url = false, $offset = 0, $pagination = 0, $ret
|
||||||
*
|
*
|
||||||
* @param string Complete text to show in the tip
|
* @param string Complete text to show in the tip
|
||||||
* @param bool whether to return an output string or echo now
|
* @param bool whether to return an output string or echo now
|
||||||
|
* @param img displayed image
|
||||||
*
|
*
|
||||||
* @return string HTML code if return parameter is true.
|
* @return string HTML code if return parameter is true.
|
||||||
*/
|
*/
|
||||||
function ui_print_help_tip ($text, $return = false) {
|
function ui_print_help_tip ($text, $return = false, $img = 'images/tip.png') {
|
||||||
$output = '<a href="javascript:" class="tip"> <span>'.$text.'</span></a>';
|
$output = '<a href="javascript:" class="tip" >' . html_print_image ($img, true) . '<span>'.$text.'</span></a>';
|
||||||
|
|
||||||
if ($return)
|
if ($return)
|
||||||
return $output;
|
return $output;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
a.tip {
|
a.tip {
|
||||||
cursor: help;
|
cursor: help;
|
||||||
background: url(../../images/tip.png) no-repeat;
|
padding: 5px 2px 5px 2px;
|
||||||
padding: 5px 2px 5px 12px;
|
|
||||||
}
|
}
|
||||||
a.help {
|
a.help {
|
||||||
cursor: help;
|
cursor: help;
|
||||||
|
|
|
@ -318,6 +318,9 @@ foreach ($modules as $module) {
|
||||||
$data[2] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&id_agent_module='.$module["id_agente_modulo"].'&edit_module='.$module["id_modulo"].'">' . html_print_image("images/config.png", true, array("alt" => '0', "border" => "")) . '</a>';
|
$data[2] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&id_agent_module='.$module["id_agente_modulo"].'&edit_module='.$module["id_modulo"].'">' . html_print_image("images/config.png", true, array("alt" => '0', "border" => "")) . '</a>';
|
||||||
|
|
||||||
$data[3] = ui_print_string_substr ($module["nombre"], 30, true);
|
$data[3] = ui_print_string_substr ($module["nombre"], 30, true);
|
||||||
|
if ($module["extended_info"] != "") {
|
||||||
|
$data[3] .= ui_print_help_tip ($module["extended_info"], true, '/images/comments.png');
|
||||||
|
}
|
||||||
|
|
||||||
//Adds tag context information
|
//Adds tag context information
|
||||||
if (tags_get_modules_tag_count($module['id_agente_modulo']) > 0) {
|
if (tags_get_modules_tag_count($module['id_agente_modulo']) > 0) {
|
||||||
|
|
|
@ -270,6 +270,7 @@ switch ($config["dbtype"]) {
|
||||||
tagente_modulo.min_critical,
|
tagente_modulo.min_critical,
|
||||||
tagente_modulo.max_critical,
|
tagente_modulo.max_critical,
|
||||||
tagente_modulo.str_critical,
|
tagente_modulo.str_critical,
|
||||||
|
tagente_modulo.extended_info,
|
||||||
tagente_estado.utimestamp AS utimestamp".$sql." LIMIT ".$offset.",".$config["block_size"];
|
tagente_estado.utimestamp AS utimestamp".$sql." LIMIT ".$offset.",".$config["block_size"];
|
||||||
break;
|
break;
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
|
@ -292,6 +293,7 @@ switch ($config["dbtype"]) {
|
||||||
tagente_modulo.min_critical,
|
tagente_modulo.min_critical,
|
||||||
tagente_modulo.max_critical,
|
tagente_modulo.max_critical,
|
||||||
tagente_modulo.str_critical,
|
tagente_modulo.str_critical,
|
||||||
|
tagente_modulo.extended_info,
|
||||||
tagente_estado.utimestamp AS utimestamp".$sql." LIMIT " . $config["block_size"] . " OFFSET " . $offset;
|
tagente_estado.utimestamp AS utimestamp".$sql." LIMIT " . $config["block_size"] . " OFFSET " . $offset;
|
||||||
break;
|
break;
|
||||||
case "oracle":
|
case "oracle":
|
||||||
|
@ -316,6 +318,7 @@ switch ($config["dbtype"]) {
|
||||||
tagente_modulo.min_critical,
|
tagente_modulo.min_critical,
|
||||||
tagente_modulo.max_critical,
|
tagente_modulo.max_critical,
|
||||||
tagente_modulo.str_critical,
|
tagente_modulo.str_critical,
|
||||||
|
tagente_modulo.extended_info,
|
||||||
tagente_estado.utimestamp AS utimestamp".$sql;
|
tagente_estado.utimestamp AS utimestamp".$sql;
|
||||||
$sql = oracle_recode_query ($sql, $set);
|
$sql = oracle_recode_query ($sql, $set);
|
||||||
break;
|
break;
|
||||||
|
@ -432,6 +435,9 @@ foreach ($result as $row) {
|
||||||
$data[2] = html_print_image("images/" . modules_show_icon_type ($row["module_type"]), true);
|
$data[2] = html_print_image("images/" . modules_show_icon_type ($row["module_type"]), true);
|
||||||
|
|
||||||
$data[3] = ui_print_truncate_text($row["module_name"],30,false,true,false);
|
$data[3] = ui_print_truncate_text($row["module_name"],30,false,true,false);
|
||||||
|
if ($row["extended_info"] != "") {
|
||||||
|
$data[3] .= ui_print_help_tip ($row["extended_info"], true, '/images/comments.png');
|
||||||
|
}
|
||||||
|
|
||||||
$data[4] = ($row['module_interval'] == 0) ? $row['agent_interval'] : $row['module_interval'];
|
$data[4] = ($row['module_interval'] == 0) ? $row['agent_interval'] : $row['module_interval'];
|
||||||
|
|
||||||
|
|
|
@ -165,6 +165,7 @@ CREATE TABLE tagente_modulo (
|
||||||
id_agente NUMBER(10, 0) default 0 NOT NULL,
|
id_agente NUMBER(10, 0) default 0 NOT NULL,
|
||||||
id_tipo_modulo NUMBER(10, 0) default 0 NOT NULL,
|
id_tipo_modulo NUMBER(10, 0) default 0 NOT NULL,
|
||||||
descripcion CLOB default '',
|
descripcion CLOB default '',
|
||||||
|
extended_info CLOB default '',
|
||||||
nombre CLOB default '',
|
nombre CLOB default '',
|
||||||
unit VARCHAR2(100) DEFAULT '',
|
unit VARCHAR2(100) DEFAULT '',
|
||||||
id_policy_module NUMBER(10, 0) default 0 NOT NULL,
|
id_policy_module NUMBER(10, 0) default 0 NOT NULL,
|
||||||
|
|
|
@ -151,6 +151,7 @@ CREATE TABLE "tagente_modulo" (
|
||||||
"id_agente" INTEGER NOT NULL default 0,
|
"id_agente" INTEGER NOT NULL default 0,
|
||||||
"id_tipo_modulo" INTEGER NOT NULL default 0,
|
"id_tipo_modulo" INTEGER NOT NULL default 0,
|
||||||
"descripcion" TEXT NOT NULL default '',
|
"descripcion" TEXT NOT NULL default '',
|
||||||
|
"extended_info" TEXT NOT NULL default '',
|
||||||
"nombre" TEXT NOT NULL default '',
|
"nombre" TEXT NOT NULL default '',
|
||||||
"unit" TEXT default '',
|
"unit" TEXT default '',
|
||||||
"id_policy_module" INTEGER NOT NULL default 0,
|
"id_policy_module" INTEGER NOT NULL default 0,
|
||||||
|
|
|
@ -145,6 +145,7 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` (
|
||||||
`id_agente` int(10) unsigned NOT NULL default '0',
|
`id_agente` int(10) unsigned NOT NULL default '0',
|
||||||
`id_tipo_modulo` smallint(5) NOT NULL default '0',
|
`id_tipo_modulo` smallint(5) NOT NULL default '0',
|
||||||
`descripcion` TEXT NOT NULL default '',
|
`descripcion` TEXT NOT NULL default '',
|
||||||
|
`extended_info` TEXT NOT NULL default '',
|
||||||
`nombre` text NOT NULL default '',
|
`nombre` text NOT NULL default '',
|
||||||
`unit` text default '',
|
`unit` text default '',
|
||||||
`id_policy_module` INTEGER unsigned NOT NULL default '0',
|
`id_policy_module` INTEGER unsigned NOT NULL default '0',
|
||||||
|
|
Loading…
Reference in New Issue