2013-01-23 Sergio Martin <sergio.martin@artica.es>

* pandoradb_data.sql
	pandoradb.sql
	pandoradb.postgreSQL.sql
	pandoradb.oracle.sql
	pandoradb.data.postgreSQL.sql
	pandoradb.data.oracle.sql
	extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql
	extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql
	extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql: Updated
	the user, module and components tables to have nowizard value 
	by default (to normal console) and basic in default elements
	creation (to metaconsole)

	* godmode/users/configure_user.php: Updated the metaconsole
	access control in user form to be showed only in metaconsole
	and with only basic/advanced options for the new meta concept

	* include/config_process.php: Store the metaconsole access 
	of the current user in $config
	
	* operation/tree.php: Fixed pandora instances links from
	tree in metaconsole mode



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7521 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-01-23 14:20:54 +00:00
parent e4af918174
commit c2f92943a2
12 changed files with 3590 additions and 3583 deletions

File diff suppressed because it is too large Load Diff

View File

@ -455,17 +455,14 @@ if ($id == $config['id_user']) {
$table->data[12][1] .= html_print_input_hidden('quick_language_change', 1, true); $table->data[12][1] .= html_print_input_hidden('quick_language_change', 1, true);
} }
if (enterprise_installed()) { if (enterprise_installed() && defined('METACONSOLE')) {
$user_info_metaconsole_access = 'only_console'; $user_info_metaconsole_access = 'only_console';
if (isset($user_info["metaconsole_access"])) { if (isset($user_info["metaconsole_access"])) {
$user_info_metaconsole_access = $user_info["metaconsole_access"]; $user_info_metaconsole_access = $user_info["metaconsole_access"];
} }
$table->data[12][0] = __('Metaconsole access'); $table->data[12][0] = __('Metaconsole access');
$metaconsole_accesses = array('only_console' => __('No access'), $metaconsole_accesses = array('basic' => __('Basic'),
'basic' => __('Basic (Only Metaconsole)'), 'advanced' => __('Advanced'));
'advanced' => __('Advanced (Only Metaconsole)'),
//'custom' => __('Custom access (Only Metaconsole)'),
'all' => __('Full (Metaconsole and normal console)'));
$table->data[12][1] = html_print_select($metaconsole_accesses, $table->data[12][1] = html_print_select($metaconsole_accesses,
'metaconsole_access', $user_info_metaconsole_access, 'metaconsole_access', $user_info_metaconsole_access,
'','',-1,true, false, false); '','',-1,true, false, false);

View File

@ -155,6 +155,10 @@ if (isset ($config['id_user'])) {
date_default_timezone_set($userinfo["timezone"]); date_default_timezone_set($userinfo["timezone"]);
} }
} }
if (defined('METACONSOLE')) {
$config['metaconsole_access'] = $userinfo["metaconsole_access"];
}
} }
// Check if inventory_changes_blacklist is setted, if not create it // Check if inventory_changes_blacklist is setted, if not create it

View File

@ -383,7 +383,7 @@ if (is_ajax ())
//Icon and link to the Module graph. //Icon and link to the Module graph.
if (defined('METACONSOLE')) { if (defined('METACONSOLE')) {
$url_module_graph = ui_meta_get_url_console_child( $url_module_graph = ui_meta_get_url_console_child(
$server['id'], null, null, null, null, $server, null, null, null, null,
"operation/agentes/stat_win.php?" . "operation/agentes/stat_win.php?" .
"type=$graph_type&" . "type=$graph_type&" .
"period=86400&" . "period=86400&" .
@ -411,7 +411,7 @@ if (is_ajax ())
if (defined('METACONSOLE')) { if (defined('METACONSOLE')) {
$url_module_data = ui_meta_get_url_console_child( $url_module_data = ui_meta_get_url_console_child(
$server['id'], $server,
"estado", "operation/agentes/ver_agente", "estado", "operation/agentes/ver_agente",
"id_agente=" . $row['id_agente'] . "&" . "id_agente=" . $row['id_agente'] . "&" .
"tab=data_view&" . "tab=data_view&" .

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -246,7 +246,7 @@ CREATE TABLE tagente_modulo (
critical_inverse NUMBER(1, 0) default 0 NOT NULL, critical_inverse NUMBER(1, 0) default 0 NOT NULL,
warning_inverse NUMBER(1, 0) default 0 NOT NULL, warning_inverse NUMBER(1, 0) default 0 NOT NULL,
id_category NUMBER(10, 0) default 0 NOT NULL, id_category NUMBER(10, 0) default 0 NOT NULL,
CONSTRAINT t_agente_modulo_wizard_level_cons CHECK (wizard_level IN ('basic','advanced','custom','nowizard')) CONSTRAINT t_agente_modulo_wizard_level_cons CHECK (wizard_level IN ('basic','advanced','nowizard'))
); );
CREATE INDEX tagente_modulo_id_agente_idx ON tagente_modulo(id_agente); CREATE INDEX tagente_modulo_id_agente_idx ON tagente_modulo(id_agente);
CREATE INDEX tagente_modulo_id_t_mod_idx ON tagente_modulo(id_tipo_modulo); CREATE INDEX tagente_modulo_id_t_mod_idx ON tagente_modulo(id_tipo_modulo);
@ -385,7 +385,7 @@ CREATE TABLE talert_templates (
special_day NUMBER(5, 0) default 0, special_day NUMBER(5, 0) default 0,
wizard_level VARCHAR2(100) default 'nowizard' NOT NULL, wizard_level VARCHAR2(100) default 'nowizard' NOT NULL,
CONSTRAINT t_alert_templates_type_cons CHECK (type IN ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown', 'always')), CONSTRAINT t_alert_templates_type_cons CHECK (type IN ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown', 'always')),
CONSTRAINT t_alert_templates_wizard_level_cons CHECK (wizard_level IN ('basic','advanced','custom','nowizard')) CONSTRAINT t_alert_templates_wizard_level_cons CHECK (wizard_level IN ('basic','advanced','nowizard'))
); );
CREATE INDEX talert_templates_id_al_act_idx ON talert_templates(id_alert_action); CREATE INDEX talert_templates_id_al_act_idx ON talert_templates(id_alert_action);
@ -676,7 +676,7 @@ CREATE TABLE tnetwork_component (
custom_integer_2 INTEGER default 0, custom_integer_2 INTEGER default 0,
post_process BINARY_DOUBLE default 0. post_process BINARY_DOUBLE default 0.
unit CLOB default '', unit CLOB default '',
wizard_level VARCHAR2(100) default 'basic' NOT NULL, wizard_level VARCHAR2(100) default 'nowizard' NOT NULL,
macros CLOB default '', macros CLOB default '',
critical_instructions VARCHAR2(255) default '', critical_instructions VARCHAR2(255) default '',
warning_instructions VARCHAR2(255) default '', warning_instructions VARCHAR2(255) default '',
@ -685,7 +685,7 @@ CREATE TABLE tnetwork_component (
warning_inverse NUMBER(1, 0) default 0 NOT NULL, warning_inverse NUMBER(1, 0) default 0 NOT NULL,
id_category NUMBER(10, 0) default 0 NOT NULL, id_category NUMBER(10, 0) default 0 NOT NULL,
tags CLOB, tags CLOB,
CONSTRAINT t_network_component_wizard_level_cons CHECK (wizard_level IN ('basic','advanced')) CONSTRAINT t_network_component_wizard_level_cons CHECK (wizard_level IN ('basic','advanced','nowizard'))
); );
CREATE SEQUENCE tnetwork_component_s INCREMENT BY 1 START WITH 1; CREATE SEQUENCE tnetwork_component_s INCREMENT BY 1 START WITH 1;
@ -930,9 +930,9 @@ CREATE TABLE tusuario (
last_failed_login TIMESTAMP default 0, last_failed_login TIMESTAMP default 0,
failed_attempt NUMBER(5,0) default 0 NOT NULL, failed_attempt NUMBER(5,0) default 0 NOT NULL,
login_blocked NUMBER(5,0) default 0 NOT NULL, login_blocked NUMBER(5,0) default 0 NOT NULL,
metaconsole_access VARCHAR2(100) default 'only_console' NOT NULL, metaconsole_access VARCHAR2(100) default 'basic' NOT NULL,
not_login NUMBER(5,0) default 0 NOT NULL, not_login NUMBER(5,0) default 0 NOT NULL,
CONSTRAINT t_usuario_metaconsole_access_cons CHECK (metaconsole_access IN ('basic','advanced','custom','all','only_console')) CONSTRAINT t_usuario_metaconsole_access_cons CHECK (metaconsole_access IN ('basic','advanced'))
); );
-- ----------------------------------------------------- -- -----------------------------------------------------

View File

@ -175,7 +175,7 @@ CREATE INDEX "tagente_estado_last_execution_try_idx" ON "tagente_estado"("last_e
-- 6 - WMI server -- 6 - WMI server
-- 7 - WEB Server (enteprise) -- 7 - WEB Server (enteprise)
CREATE TYPE type_tagente_modulo_wizard_level AS ENUM ('basic','advanced','custom','nowizard'); CREATE TYPE type_tagente_modulo_wizard_level AS ENUM ('basic','advanced','nowizard');
CREATE TABLE "tagente_modulo" ( CREATE TABLE "tagente_modulo" (
"id_agente_modulo" SERIAL NOT NULL PRIMARY KEY, "id_agente_modulo" SERIAL NOT NULL PRIMARY KEY,
"id_agente" INTEGER NOT NULL default 0, "id_agente" INTEGER NOT NULL default 0,
@ -306,7 +306,7 @@ CREATE TABLE "talert_actions" (
); );
CREATE TYPE type_talert_templates_alert_template AS ENUM ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown', 'always'); CREATE TYPE type_talert_templates_alert_template AS ENUM ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown', 'always');
CREATE TYPE type_talert_templates_wizard_level AS ENUM ('basic','advanced','custom','nowizard'); CREATE TYPE type_talert_templates_wizard_level AS ENUM ('basic','advanced','nowizard');
CREATE TABLE "talert_templates" ( CREATE TABLE "talert_templates" (
"id" SERIAL NOT NULL PRIMARY KEY, "id" SERIAL NOT NULL PRIMARY KEY,
"name" text default '', "name" text default '',
@ -537,7 +537,7 @@ CREATE TABLE "tmodule_group" (
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tnetwork_component` -- Table `tnetwork_component`
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TYPE type_tlocal_component_wizard_level AS ENUM ('basic','advanced'); CREATE TYPE type_tlocal_component_wizard_level AS ENUM ('basic','advanced','nowizard');
CREATE TABLE "tnetwork_component" ( CREATE TABLE "tnetwork_component" (
"id_nc" SERIAL NOT NULL PRIMARY KEY, "id_nc" SERIAL NOT NULL PRIMARY KEY,
"name" varchar(80) NOT NULL, "name" varchar(80) NOT NULL,
@ -575,7 +575,7 @@ CREATE TABLE "tnetwork_component" (
"custom_integer_2" INTEGER default 0, "custom_integer_2" INTEGER default 0,
"post_process" DOUBLE PRECISION default 0, "post_process" DOUBLE PRECISION default 0,
"unit" TEXT default '', "unit" TEXT default '',
"wizard_level" type_tlocal_component_wizard_level default 'basic', "wizard_level" type_tlocal_component_wizard_level default 'nowizard',
"macros" TEXT default '', "macros" TEXT default '',
"critical_instructions" TEXT default '', "critical_instructions" TEXT default '',
"warning_instructions" TEXT default '', "warning_instructions" TEXT default '',
@ -791,7 +791,7 @@ CREATE TABLE "ttrap" (
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `tusuario` -- Table `tusuario`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TYPE type_tusuario_metaconsole_access AS ENUM ('basic','advanced','custom','all','only_console'); CREATE TYPE type_tusuario_metaconsole_access AS ENUM ('basic','advanced');
CREATE TABLE "tusuario" ( CREATE TABLE "tusuario" (
"id_user" varchar(60) NOT NULL PRIMARY KEY, "id_user" varchar(60) NOT NULL PRIMARY KEY,
"fullname" varchar(255) NOT NULL, "fullname" varchar(255) NOT NULL,
@ -821,7 +821,7 @@ CREATE TABLE "tusuario" (
"failed_attempt" INTEGER NOT NULL DEFAULT 0, "failed_attempt" INTEGER NOT NULL DEFAULT 0,
"login_blocked" SMALLINT NOT NULL default 0, "login_blocked" SMALLINT NOT NULL default 0,
"not_login" SMALLINT NOT NULL default 0, "not_login" SMALLINT NOT NULL default 0,
"metaconsole_access" type_tusuario_metaconsole_access default 'only_console' "metaconsole_access" type_tusuario_metaconsole_access default 'basic'
); );
-- ----------------------------------------------------- -- -----------------------------------------------------

View File

@ -226,7 +226,7 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` (
`custom_string_3` text, `custom_string_3` text,
`custom_integer_1` int(10) default 0, `custom_integer_1` int(10) default 0,
`custom_integer_2` int(10) default 0, `custom_integer_2` int(10) default 0,
`wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard', `wizard_level` enum('basic','advanced','nowizard') default 'nowizard',
`macros` text, `macros` text,
`critical_instructions` text NOT NULL default '', `critical_instructions` text NOT NULL default '',
`warning_instructions` text NOT NULL default '', `warning_instructions` text NOT NULL default '',
@ -374,7 +374,7 @@ CREATE TABLE IF NOT EXISTS `talert_templates` (
`priority` tinyint(4) default '0', `priority` tinyint(4) default '0',
`id_group` mediumint(8) unsigned NULL default 0, `id_group` mediumint(8) unsigned NULL default 0,
`special_day` tinyint(1) default 0, `special_day` tinyint(1) default 0,
`wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard', `wizard_level` enum('basic','advanced','nowizard') default 'nowizard',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `idx_template_action` (`id_alert_action`), KEY `idx_template_action` (`id_alert_action`),
FOREIGN KEY (`id_alert_action`) REFERENCES talert_actions(`id`) FOREIGN KEY (`id_alert_action`) REFERENCES talert_actions(`id`)
@ -632,7 +632,7 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component` (
`custom_integer_2` int(10) default 0, `custom_integer_2` int(10) default 0,
`post_process` double(18,5) default 0, `post_process` double(18,5) default 0,
`unit` text, `unit` text,
`wizard_level` enum('basic','advanced') default 'basic', `wizard_level` enum('basic','advanced','nowizard') default 'nowizard',
`macros` text, `macros` text,
`critical_instructions` text NOT NULL default '', `critical_instructions` text NOT NULL default '',
`warning_instructions` text NOT NULL default '', `warning_instructions` text NOT NULL default '',
@ -893,7 +893,7 @@ CREATE TABLE IF NOT EXISTS `tusuario` (
`last_failed_login` DATETIME NOT NULL DEFAULT 0, `last_failed_login` DATETIME NOT NULL DEFAULT 0,
`failed_attempt` int(4) NOT NULL DEFAULT 0, `failed_attempt` int(4) NOT NULL DEFAULT 0,
`login_blocked` tinyint(1) unsigned NOT NULL default 0, `login_blocked` tinyint(1) unsigned NOT NULL default 0,
`metaconsole_access` enum('basic','advanced','custom','all','only_console') default 'only_console', `metaconsole_access` enum('basic','advanced') default 'basic',
`not_login` tinyint(1) unsigned NOT NULL DEFAULT 0, `not_login` tinyint(1) unsigned NOT NULL DEFAULT 0,
UNIQUE KEY `id_user` (`id_user`) UNIQUE KEY `id_user` (`id_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

File diff suppressed because it is too large Load Diff