diff --git a/pandora_console/extras/mr/8.sql b/pandora_console/extras/mr/8.sql new file mode 100644 index 0000000000..977f7989fd --- /dev/null +++ b/pandora_console/extras/mr/8.sql @@ -0,0 +1,3 @@ +START TRANSACTION; +ALTER TABLE tusuario ADD COLUMN `time_autorefresh` int(5) unsigned NOT NULL default '30'; +COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 22bcc52766..2b9d8c5a5a 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1183,6 +1183,7 @@ ALTER TABLE tusuario ADD COLUMN `id_filter` int(10) UNSIGNED NULL DEFAULT NULL; ALTER TABLE tusuario ADD CONSTRAINT `fk_id_filter` FOREIGN KEY (`id_filter`) REFERENCES tevent_filter(`id_filter`) ON DELETE SET NULL; ALTER TABLE tusuario ADD COLUMN `session_time` int(10) signed NOT NULL default '0'; alter table tusuario add autorefresh_white_list text not null default ''; +ALTER TABLE tusuario ADD COLUMN `time_autorefresh` int(5) unsigned NOT NULL default '30'; -- --------------------------------------------------------------------- -- Table `tagente_modulo` diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 46e95a7026..49ef936515 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -191,7 +191,7 @@ config_check(); $_GET['refr'] = null; } - $select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '" . $config['id_user'] . "'"); + $select = db_process_sql("SELECT autorefresh_white_list,time_autorefresh FROM tusuario WHERE id_user = '" . $config['id_user'] . "'"); $autorefresh_list = json_decode($select[0]['autorefresh_white_list']); if ($autorefresh_list !== null && array_search($_GET['sec2'], $autorefresh_list) !== false) { @@ -389,7 +389,15 @@ config_check(); $("#combo_refr").toggle (); $("#combo_refr").css('padding-right', '9px'); href = $("a.autorefresh").attr ("href"); - $(document).attr ("location", href + "30"); + + var refresh = ''; + $(document).attr ("location", href + refresh); + + '; $data[0] .= $table_ichanges; +//time autorefresh +$times = get_refresh_time_array(); +$data[1] = ''.__('Time autorefresh').''; +$data[1] .= $jump . ''. html_print_select ($times, 'time_autorefresh', $user_info["time_autorefresh"], '', '', '', true,false,false).''; $table->rowclass[] = ''; -$table->colspan[count($table->data)][0] = 3; -$table->rowstyle[] = 'font-weight: bold;'; +$table->rowstyle[] = 'font-weight: bold;vertical-align: top'; $table->data[] = $data; $data = array(); diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 95e93774a4..3004f0ed1e 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1114,6 +1114,7 @@ CREATE TABLE IF NOT EXISTS `tusuario` ( `session_time` int(10) signed NOT NULL default 0, `default_event_filter` int(10) unsigned NOT NULL default 0, `autorefresh_white_list` text not null default '', + `time_autorefresh` int(5) unsigned NOT NULL default '30', CONSTRAINT `fk_filter_id` FOREIGN KEY (`id_filter`) REFERENCES tevent_filter (`id_filter`) ON DELETE SET NULL, UNIQUE KEY `id_user` (`id_user`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;