mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2012-06-27 Vanessa Gil <vanessa.gil@artica.es>
* extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql, extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql, pandoradb_data.sql, pandoradb_data.oracle.sql, pandoradb_data.postgreSQL.sql, general/header.php, godmode/setup/setup_visuals.php, include/functions_config.php: Disable autorefresh by default except some pages. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6916 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2e73d7b7a9
commit
b65d36054e
@ -1,3 +1,16 @@
|
|||||||
|
2012-06-27 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
|
* extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
|
||||||
|
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
|
||||||
|
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
|
||||||
|
pandoradb_data.sql,
|
||||||
|
pandoradb_data.oracle.sql,
|
||||||
|
pandoradb_data.postgreSQL.sql,
|
||||||
|
general/header.php,
|
||||||
|
godmode/setup/setup_visuals.php,
|
||||||
|
include/functions_config.php: Disable autorefresh by default except
|
||||||
|
some pages.
|
||||||
|
|
||||||
2012-08-27 Sergio Martin <sergio.martin@artica.es>
|
2012-08-27 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* godmode/alerts/alert_commands.php: Fixed a little bugs
|
* godmode/alerts/alert_commands.php: Fixed a little bugs
|
||||||
|
@ -221,7 +221,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||||||
('enable_pass_policy_admin', 0),
|
('enable_pass_policy_admin', 0),
|
||||||
('enable_pass_history', 0),
|
('enable_pass_history', 0),
|
||||||
('compare_pass', 3),
|
('compare_pass', 3),
|
||||||
('meta_style', 'meta_pandora');
|
('meta_style', 'meta_pandora'),
|
||||||
|
('enable_refr', 0);
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tpassword_history`
|
-- Table `tpassword_history`
|
||||||
|
@ -220,6 +220,7 @@ INSERT INTO tconfig (token, value) VALUES ('enable_pass_policy_admin', 0);
|
|||||||
INSERT INTO tconfig (token, value) VALUES ('enable_pass_history', 0);
|
INSERT INTO tconfig (token, value) VALUES ('enable_pass_history', 0);
|
||||||
INSERT INTO tconfig (token, value) VALUES ('compare_pass', 3);
|
INSERT INTO tconfig (token, value) VALUES ('compare_pass', 3);
|
||||||
INSERT INTO tconfig (token, value) VALUES ('meta_style', 'meta_pandora');
|
INSERT INTO tconfig (token, value) VALUES ('meta_style', 'meta_pandora');
|
||||||
|
INSERT INTO tconfig (token, value) VALUES ('enable_refr', 0);
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tpassword_history`
|
-- Table `tpassword_history`
|
||||||
|
@ -220,7 +220,8 @@ INSERT INTO "tconfig" ("token", "value") VALUES
|
|||||||
('enable_pass_policy_admin', 0),
|
('enable_pass_policy_admin', 0),
|
||||||
('enable_pass_history', 0),
|
('enable_pass_history', 0),
|
||||||
('compare_pass', 3),
|
('compare_pass', 3),
|
||||||
('meta_style', 'meta_pandora');
|
('meta_style', 'meta_pandora'),
|
||||||
|
('enable_refr', 0);
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tpassword_history`
|
-- Table `tpassword_history`
|
||||||
|
@ -130,11 +130,38 @@ config_check();
|
|||||||
<?php
|
<?php
|
||||||
// Autorefresh
|
// Autorefresh
|
||||||
$ignored_params = array ('agent_config' => false, 'code' => false);
|
$ignored_params = array ('agent_config' => false, 'code' => false);
|
||||||
if ($config["refr"]) {
|
if ($config["refr"]) {//autorefresh interval
|
||||||
$ignored_params['refr'] = 0;
|
$ignored_params['refr'] = 0;
|
||||||
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh');
|
if (($config['enable_refr']) || (($_GET['sec2'] == 'operation/agentes/tactical') || ($_GET['sec2'] == 'operation/agentes/estado_agente') ||
|
||||||
echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
($_GET['sec2'] == 'operation/agentes/group_view') || ($_GET['sec2'] == 'operation/events/events') ||
|
||||||
echo '</a>';
|
($_GET['sec2'] == 'enterprise/dashboard/main_dashboard'))) { //enable autorefresh to all pages or default pages
|
||||||
|
|
||||||
|
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh');
|
||||||
|
echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
||||||
|
echo '</a>';
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
$ignored_params['refr'] = '';
|
||||||
|
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh').'</a>';
|
||||||
|
$values = array (
|
||||||
|
'5' => __('5 seconds'),
|
||||||
|
'10' => __('10 seconds'),
|
||||||
|
'15' => __('15 seconds'),
|
||||||
|
'30' => __('30 seconds'),
|
||||||
|
(string)SECONDS_1MINUTE => __('1 minute'),
|
||||||
|
(string)SECONDS_2MINUTES => __('2 minutes'),
|
||||||
|
(string)SECONDS_5MINUTES => __('5 minutes'),
|
||||||
|
(string)SECONDS_15MINUTES => __('15 minutes'),
|
||||||
|
(string)SECONDS_30MINUTES => __('30 minutes'),
|
||||||
|
(string)SECONDS_1HOUR => __('1 hour'));
|
||||||
|
echo '<span id="combo_refr" style="display: none">';
|
||||||
|
html_print_select ($values, 'ref', '', '', __('Select'), '0', false, false, false);
|
||||||
|
unset ($values);
|
||||||
|
echo '</span>';
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$ignored_params['refr'] = '';
|
$ignored_params['refr'] = '';
|
||||||
@ -267,6 +294,7 @@ ui_require_jquery_file('jquery-ui-1.8.17.custom.min');
|
|||||||
$("select#ref").change (function () {
|
$("select#ref").change (function () {
|
||||||
href = $(a).attr ("href");
|
href = $(a).attr ("href");
|
||||||
$(document).attr ("location", href + this.value);
|
$(document).attr ("location", href + this.value);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -276,4 +304,4 @@ ui_require_jquery_file('jquery-ui-1.8.17.custom.min');
|
|||||||
?>
|
?>
|
||||||
});
|
});
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
</script>
|
</script>
|
||||||
|
@ -119,30 +119,34 @@ $values[SECONDS_5MINUTES] = human_time_description_raw(SECONDS_5MINUTES);
|
|||||||
$values[SECONDS_10MINUTES] = human_time_description_raw(SECONDS_10MINUTES);
|
$values[SECONDS_10MINUTES] = human_time_description_raw(SECONDS_10MINUTES);
|
||||||
$values[SECONDS_30MINUTES] = human_time_description_raw(SECONDS_30MINUTES);
|
$values[SECONDS_30MINUTES] = human_time_description_raw(SECONDS_30MINUTES);
|
||||||
|
|
||||||
$table->data[15][0] = __('Global default interval for refresh') . ui_print_help_tip(__('This interval will affect all pages'), true);
|
$table->data[15][0] = __('Enable refresh for all pages');
|
||||||
$table->data[15][1] = html_print_select ($values, 'refr', $config["refr"], '', 'N/A', 0, true, false, false);
|
$table->data[15][1] = __('Yes').' '.html_print_radio_button ('enable_refr', 1, '', $config["enable_refr"], true).' ';
|
||||||
|
$table->data[15][1] .= __('No').' '.html_print_radio_button ('enable_refr', 0, '', $config["enable_refr"], true);
|
||||||
|
|
||||||
$table->data[16][0] = __('Default interval for refresh on Visual Console') . ui_print_help_tip(__('This interval will affect to Visual Console pages'), true);
|
$table->data[16][0] = __('Global default interval for refresh') . ui_print_help_tip(__('This interval will affect all pages'), true);
|
||||||
$table->data[16][1] = html_print_select ($values, 'vc_refr', $config["vc_refr"], '', 'N/A', 0, true, false, false);
|
$table->data[16][1] = html_print_select ($values, 'refr', $config["refr"], '', 'N/A', 0, true, false, false);
|
||||||
|
|
||||||
$table->data[17][0] = __('Agent size text') . ui_print_help_tip(__('When the agent name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
$table->data[17][0] = __('Default interval for refresh on Visual Console') . ui_print_help_tip(__('This interval will affect to Visual Console pages'), true);
|
||||||
$table->data[17][1] = __('Small:') . html_print_input_text ('agent_size_text_small', $config["agent_size_text_small"], '', 3, 3, true);
|
$table->data[17][1] = html_print_select ($values, 'vc_refr', $config["vc_refr"], '', 'N/A', 0, true, false, false);
|
||||||
$table->data[17][1] .= ' ' . __('Normal:') . html_print_input_text ('agent_size_text_medium', $config["agent_size_text_medium"], '', 3, 3, true);
|
|
||||||
|
|
||||||
$table->data[18][0] = __('Module size text') . ui_print_help_tip(__('When the module name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
$table->data[18][0] = __('Agent size text') . ui_print_help_tip(__('When the agent name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||||
$table->data[18][1] = __('Small:') . html_print_input_text ('module_size_text_small', $config["module_size_text_small"], '', 3, 3, true);
|
$table->data[18][1] = __('Small:') . html_print_input_text ('agent_size_text_small', $config["agent_size_text_small"], '', 3, 3, true);
|
||||||
$table->data[18][1] .= ' ' . __('Normal:') . html_print_input_text ('module_size_text_medium', $config["module_size_text_medium"], '', 3, 3, true);
|
$table->data[18][1] .= ' ' . __('Normal:') . html_print_input_text ('agent_size_text_medium', $config["agent_size_text_medium"], '', 3, 3, true);
|
||||||
|
|
||||||
$table->data[19][0] = __('Description size text') . ui_print_help_tip(__('When the description name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
$table->data[19][0] = __('Module size text') . ui_print_help_tip(__('When the module name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||||
$table->data[19][1] = html_print_input_text ('description_size_text', $config["description_size_text"], '', 3, 3, true);
|
$table->data[19][1] = __('Small:') . html_print_input_text ('module_size_text_small', $config["module_size_text_small"], '', 3, 3, true);
|
||||||
|
$table->data[19][1] .= ' ' . __('Normal:') . html_print_input_text ('module_size_text_medium', $config["module_size_text_medium"], '', 3, 3, true);
|
||||||
|
|
||||||
$table->data[20][0] = __('Item title size text') . ui_print_help_tip(__('When the item title name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
$table->data[20][0] = __('Description size text') . ui_print_help_tip(__('When the description name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||||
$table->data[20][1] = html_print_input_text ('item_title_size_text', $config["item_title_size_text"], '', 3, 3, true);
|
$table->data[20][1] = html_print_input_text ('description_size_text', $config["description_size_text"], '', 3, 3, true);
|
||||||
|
|
||||||
|
$table->data[21][0] = __('Item title size text') . ui_print_help_tip(__('When the item title name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
|
||||||
|
$table->data[21][1] = html_print_input_text ('item_title_size_text', $config["item_title_size_text"], '', 3, 3, true);
|
||||||
|
|
||||||
|
|
||||||
$table->data[21][0] = __('GIS Labels') . ui_print_help_tip(__('This enabling this, you get a label with agent name in GIS maps. If you have lots of agents in the map, will be unreadable. Disabled by default.'), true);
|
$table->data[22][0] = __('GIS Labels') . ui_print_help_tip(__('This enabling this, you get a label with agent name in GIS maps. If you have lots of agents in the map, will be unreadable. Disabled by default.'), true);
|
||||||
$table->data[21][1] = __('Yes').' '.html_print_radio_button ('gis_label', 1, '', $config["gis_label"], true).' ';
|
$table->data[22][1] = __('Yes').' '.html_print_radio_button ('gis_label', 1, '', $config["gis_label"], true).' ';
|
||||||
$table->data[21][1] .= __('No').' '.html_print_radio_button ('gis_label', 0, '', $config["gis_label"], true);
|
$table->data[22][1] .= __('No').' '.html_print_radio_button ('gis_label', 0, '', $config["gis_label"], true);
|
||||||
|
|
||||||
|
|
||||||
$listIcons = gis_get_array_list_icons();
|
$listIcons = gis_get_array_list_icons();
|
||||||
@ -152,7 +156,7 @@ foreach ($listIcons as $index => $value) $arraySelectIcon[$index] = $index;
|
|||||||
|
|
||||||
$path = 'images/gis_map/icons/'; //TODO set better method the path
|
$path = 'images/gis_map/icons/'; //TODO set better method the path
|
||||||
|
|
||||||
$table->data[22][0] = __('Default icon in GIS') . ui_print_help_tip(__('Agent icon for GIS Maps. If set to "none", group icon will be used'), true);
|
$table->data[23][0] = __('Default icon in GIS') . ui_print_help_tip(__('Agent icon for GIS Maps. If set to "none", group icon will be used'), true);
|
||||||
|
|
||||||
$gis_default_icon = $config["gis_default_icon"];
|
$gis_default_icon = $config["gis_default_icon"];
|
||||||
|
|
||||||
@ -174,7 +178,7 @@ else {
|
|||||||
$path_warning = $path . $gis_default_icon . ".warning.png";
|
$path_warning = $path . $gis_default_icon . ".warning.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[22][1] = html_print_select($arraySelectIcon, "gis_default_icon", $gis_default_icon, "changeIcons();", __('None'), '', true) . ' ' . html_print_image($path_ok, true, array("id" => "icon_ok", "style" => "display:".$display_icons.";")) . ' ' . html_print_image($path_bad, true, array("id" => "icon_bad", "style" => "display:".$display_icons.";")) . ' ' . html_print_image($path_warning, true, array("id" => "icon_warning", "style" => "display:".$display_icons.";"));
|
$table->data[23][1] = html_print_select($arraySelectIcon, "gis_default_icon", $gis_default_icon, "changeIcons();", __('None'), '', true) . ' ' . html_print_image($path_ok, true, array("id" => "icon_ok", "style" => "display:".$display_icons.";")) . ' ' . html_print_image($path_bad, true, array("id" => "icon_bad", "style" => "display:".$display_icons.";")) . ' ' . html_print_image($path_warning, true, array("id" => "icon_warning", "style" => "display:".$display_icons.";"));
|
||||||
|
|
||||||
|
|
||||||
echo '<form id="form_setup" method="post">';
|
echo '<form id="form_setup" method="post">';
|
||||||
|
@ -224,6 +224,7 @@ function config_update_config () {
|
|||||||
config_update_value ('font_size', get_parameter('font_size'));
|
config_update_value ('font_size', get_parameter('font_size'));
|
||||||
config_update_value ('flash_charts', (bool) get_parameter ('flash_charts'));
|
config_update_value ('flash_charts', (bool) get_parameter ('flash_charts'));
|
||||||
config_update_value ('custom_logo', (string) get_parameter ('custom_logo'));
|
config_update_value ('custom_logo', (string) get_parameter ('custom_logo'));
|
||||||
|
config_update_value ('enable_refr', get_parameter('enable_refr'));
|
||||||
config_update_value ('refr', get_parameter('refr'));
|
config_update_value ('refr', get_parameter('refr'));
|
||||||
config_update_value ('vc_refr', get_parameter('vc_refr'));
|
config_update_value ('vc_refr', get_parameter('vc_refr'));
|
||||||
config_update_value ('agent_size_text_small', get_parameter('agent_size_text_small'));
|
config_update_value ('agent_size_text_small', get_parameter('agent_size_text_small'));
|
||||||
@ -675,6 +676,10 @@ function config_process_config () {
|
|||||||
config_update_value ('dbtype', 'mysql');
|
config_update_value ('dbtype', 'mysql');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset ($config['enable_refr'])) {
|
||||||
|
config_update_value ('enable_refr', 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset ($config['vc_refr'])) {
|
if (!isset ($config['vc_refr'])) {
|
||||||
config_update_value ('vc_refr', 60);
|
config_update_value ('vc_refr', 60);
|
||||||
}
|
}
|
||||||
|
@ -104,6 +104,7 @@ INSERT INTO tconfig (token, value) VALUES ('enable_pass_policy_admin', 0);
|
|||||||
INSERT INTO tconfig (token, value) VALUES ('enable_pass_history', 0);
|
INSERT INTO tconfig (token, value) VALUES ('enable_pass_history', 0);
|
||||||
INSERT INTO tconfig (token, value) VALUES ('compare_pass', 3);
|
INSERT INTO tconfig (token, value) VALUES ('compare_pass', 3);
|
||||||
INSERT INTO tconfig (token, value) VALUES ('meta_style', 'meta_pandora');
|
INSERT INTO tconfig (token, value) VALUES ('meta_style', 'meta_pandora');
|
||||||
|
INSERT INTO tconfig (token, value) VALUES ('enable_refr', 0);
|
||||||
COMMIT;
|
COMMIT;
|
||||||
END;;
|
END;;
|
||||||
|
|
||||||
|
@ -99,7 +99,8 @@ INSERT INTO "tconfig" ("token", "value") VALUES
|
|||||||
('enable_pass_policy_admin', 0),
|
('enable_pass_policy_admin', 0),
|
||||||
('enable_pass_history', 0),
|
('enable_pass_history', 0),
|
||||||
('compare_pass', 3),
|
('compare_pass', 3),
|
||||||
('meta_style', 'meta_pandora');
|
('meta_style', 'meta_pandora'),
|
||||||
|
('enable_refr', '0');
|
||||||
|
|
||||||
COMMIT WORK;
|
COMMIT WORK;
|
||||||
|
|
||||||
|
@ -98,7 +98,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||||||
('enable_pass_policy_admin', 0),
|
('enable_pass_policy_admin', 0),
|
||||||
('enable_pass_history', 0),
|
('enable_pass_history', 0),
|
||||||
('compare_pass', 3),
|
('compare_pass', 3),
|
||||||
('meta_style', 'meta_pandora');
|
('meta_style', 'meta_pandora'),
|
||||||
|
('enable_refr', 0);
|
||||||
|
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user