2009-04-24 Esteban Sánchez <estebans@artica.es>
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed local components table * godmode/servers/manage_recontask_form.php: Added "any" option to operating system combo. * godmode/snmpconsole/snmp_alert.php: Changed alert templates with actions. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1653 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
aa07cc7ecd
commit
7bfeb2f6fc
|
@ -1,3 +1,12 @@
|
||||||
|
2009-04-24 Esteban Sánchez <estebans@artica.es>
|
||||||
|
|
||||||
|
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed local components table
|
||||||
|
|
||||||
|
* godmode/servers/manage_recontask_form.php: Added "any" option to
|
||||||
|
operating system combo.
|
||||||
|
|
||||||
|
* godmode/snmpconsole/snmp_alert.php: Changed alert templates with actions.
|
||||||
|
|
||||||
2009-04-23 Jorge Gonzalez <jorgegonz@artica.es>
|
2009-04-23 Jorge Gonzalez <jorgegonz@artica.es>
|
||||||
|
|
||||||
* include/functions_reporting.php,
|
* include/functions_reporting.php,
|
||||||
|
|
|
@ -261,24 +261,6 @@ CREATE TABLE IF NOT EXISTS `talert_compound_actions` (
|
||||||
ON DELETE CASCADE ON UPDATE CASCADE
|
ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `tlocal_component` (
|
|
||||||
`id` int(10) unsigned NOT NULL auto_increment,
|
|
||||||
`name` varchar(80) NOT NULL,
|
|
||||||
`data` mediumtext NOT NULL,
|
|
||||||
`description` varchar(250) default NULL,
|
|
||||||
`id_os` int(10) unsigned default '0',
|
|
||||||
`os_version` varchar(100) default '',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `tlocal_component_group` (
|
|
||||||
`id` int(10) unsigned NOT NULL auto_increment,
|
|
||||||
`name` varchar(200) NOT NULL default '',
|
|
||||||
`parent` mediumint(8) unsigned NOT NULL default '0',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
ALTER TABLE tplugin ADD `plugin_type` int(2) UNSIGNED NOT NULL default 0;
|
ALTER TABLE tplugin ADD `plugin_type` int(2) UNSIGNED NOT NULL default 0;
|
||||||
ALTER TABLE treport_content ADD `description` mediumtext;
|
ALTER TABLE treport_content ADD `description` mediumtext;
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ $table->data[4][1] = print_select_from_sql ('SELECT id_np, name FROM tnetwork_pr
|
||||||
// OS
|
// OS
|
||||||
$table->data[5][0] = __('OS');
|
$table->data[5][0] = __('OS');
|
||||||
$table->data[5][1] = print_select_from_sql ('SELECT id_os, name FROM tconfig_os ORDER BY name',
|
$table->data[5][1] = print_select_from_sql ('SELECT id_os, name FROM tconfig_os ORDER BY name',
|
||||||
"id_os", $id_os, '', '', '', true);
|
"id_os", $id_os, '', __('Any'), -1, true);
|
||||||
|
|
||||||
// Group
|
// Group
|
||||||
$table->data[6][0] = __('Group');
|
$table->data[6][0] = __('Group');
|
||||||
|
|
|
@ -145,10 +145,10 @@ if (isset ($_GET["update_alert"])) {
|
||||||
echo '<table cellpadding="4" cellspacing="4" width="650" class="databox_color">';
|
echo '<table cellpadding="4" cellspacing="4" width="650" class="databox_color">';
|
||||||
|
|
||||||
// Alert type (e-mail, event etc.)
|
// Alert type (e-mail, event etc.)
|
||||||
echo '<tr><td class="datos">'.__('Alert type').'</td><td class="datos">';
|
echo '<tr><td class="datos">'.__('Alert action').'</td><td class="datos">';
|
||||||
|
|
||||||
$fields = array ();
|
$fields = array ();
|
||||||
$result = get_db_all_rows_in_table ("talert_templates", "name");
|
$result = get_db_all_rows_in_table ('talert_actions', "name");
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
$result = array ();
|
$result = array ();
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,8 @@ if (isset ($_GET["update_alert"])) {
|
||||||
$fields[$row["id"]] = $row["name"];
|
$fields[$row["id"]] = $row["name"];
|
||||||
}
|
}
|
||||||
|
|
||||||
print_select ($fields, "alert_type", $alert_type, '', '', '0', false, false, false);
|
print_select_from_sql ('SELECT id, name FROM talert_actions ORDER BY name',
|
||||||
|
"alert_type", $alert_type, '', '', 0, false, false, false);
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
|
|
||||||
// Alert trigger (OID, custom_value)
|
// Alert trigger (OID, custom_value)
|
||||||
|
@ -251,6 +252,9 @@ if (isset ($_GET["update_alert"])) {
|
||||||
echo "</td></tr></table>";
|
echo "</td></tr></table>";
|
||||||
} else {
|
} else {
|
||||||
echo "<h2>".__('Alert Overview')."</h2>";
|
echo "<h2>".__('Alert Overview')."</h2>";
|
||||||
|
|
||||||
|
require_once ('include/functions_alerts.php');
|
||||||
|
|
||||||
//Overview
|
//Overview
|
||||||
$result = get_db_all_rows_in_table ("talert_snmp");
|
$result = get_db_all_rows_in_table ("talert_snmp");
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
|
@ -267,7 +271,7 @@ if (isset ($_GET["update_alert"])) {
|
||||||
$table->class= "databox";
|
$table->class= "databox";
|
||||||
$table->align = array ();
|
$table->align = array ();
|
||||||
|
|
||||||
$table->head[0] = __('Alert type');
|
$table->head[0] = __('Alert action');
|
||||||
|
|
||||||
$table->head[1] = __('Alert trigger');
|
$table->head[1] = __('Alert trigger');
|
||||||
$table->align[1] = 'center';
|
$table->align[1] = 'center';
|
||||||
|
@ -296,7 +300,7 @@ if (isset ($_GET["update_alert"])) {
|
||||||
|
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$data = array ();
|
$data = array ();
|
||||||
$data[0] = get_alert_type ($row["id_alert"]);
|
$data[0] = get_alert_action_name ($row["id_alert"]);
|
||||||
$data[1] = __('N/A');
|
$data[1] = __('N/A');
|
||||||
$data[2] = __('N/A');
|
$data[2] = __('N/A');
|
||||||
$data[3] = __('N/A');
|
$data[3] = __('N/A');
|
||||||
|
|
Loading…
Reference in New Issue