2009-03-31 16:32:58 +02:00
|
|
|
<?php
|
|
|
|
|
2009-06-08 20:21:21 +02:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
|
|
|
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
|
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2009-03-31 16:32:58 +02:00
|
|
|
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation for version 2.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
|
|
// Load global vars
|
|
|
|
require_once ("include/config.php");
|
|
|
|
|
|
|
|
check_login ();
|
|
|
|
|
|
|
|
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
|
|
|
|
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access Visual Setup Management");
|
|
|
|
require ("general/noaccess.php");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Load enterprise extensions
|
|
|
|
enterprise_include ('godmode/setup/setup_visuals.php');
|
|
|
|
|
|
|
|
/*
|
|
|
|
NOTICE FOR DEVELOPERS:
|
|
|
|
|
|
|
|
Update operation is done in config_process.php
|
|
|
|
This is done in that way so the user can see the changes inmediatly.
|
|
|
|
If you added a new token, please check update_config() in functions_config.php
|
|
|
|
to add it there.
|
|
|
|
*/
|
|
|
|
|
|
|
|
require_once ('include/functions_themes.php');
|
|
|
|
|
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
|
|
|
echo "<h2>".__('Setup')." » ";
|
2009-03-31 16:32:58 +02:00
|
|
|
echo __('Visual configuration')."</h2>";
|
|
|
|
|
|
|
|
$table->width = '90%';
|
|
|
|
$table->data = array ();
|
|
|
|
|
|
|
|
$table->data[1][0] = __('Date format string') . print_help_icon("date_format", true);
|
|
|
|
$table->data[1][1] = '<em>'.__('Example').'</em> '.date ($config["date_format"]);
|
|
|
|
$table->data[1][1] .= print_input_text ('date_format', $config["date_format"], '', 30, 100, true);
|
|
|
|
|
|
|
|
$table->data[2][0] = __('Graph color (min)');
|
|
|
|
$table->data[2][1] = print_input_text ('graph_color1', $config["graph_color1"], '', 8, 8, true);
|
|
|
|
|
|
|
|
$table->data[3][0] = __('Graph color (avg)');
|
|
|
|
$table->data[3][1] = print_input_text ('graph_color2', $config["graph_color2"], '', 8, 8, true);
|
|
|
|
|
|
|
|
$table->data[4][0] = __('Graph color (max)');
|
|
|
|
$table->data[4][1] = print_input_text ('graph_color3', $config["graph_color3"], '', 8, 8, true);
|
|
|
|
|
|
|
|
$table->data[5][0] = __('Graphic resolution (1-low, 5-high)');
|
|
|
|
$table->data[5][1] = print_input_text ('graph_res', $config["graph_res"], '', 5, 5, true);
|
|
|
|
|
|
|
|
$table->data[6][0] = __('Style template');
|
|
|
|
$table->data[6][1] = print_select (get_css_themes (), 'style', $config["style"].'.css', '', '', '', true);
|
|
|
|
|
|
|
|
$table->data[7][0] = __('Block size for pagination');
|
|
|
|
$table->data[7][1] = print_input_text ('block_size', $config["block_size"], '', 5, 5, true);
|
|
|
|
|
|
|
|
$table->data[8][0] = __('Use round corners');
|
2009-04-13 18:13:55 +02:00
|
|
|
$table->data[8][1] = __('Yes').' '.print_radio_button ('round_corner', 1, '', $config["round_corner"], true).' ';
|
|
|
|
$table->data[8][1] .= __('No').' '.print_radio_button ('round_corner', 0, '', $config["round_corner"], true);
|
2009-03-31 16:32:58 +02:00
|
|
|
|
2009-04-20 16:00:27 +02:00
|
|
|
$table->data[9][0] = __('Status icon set');
|
|
|
|
$iconsets["default"] = __('Colors');
|
2009-04-06 13:02:05 +02:00
|
|
|
$iconsets["faces"] = __('Faces');
|
2009-04-20 16:00:27 +02:00
|
|
|
$iconsets["color_text"] = __('Colors and text');
|
2009-04-06 13:02:05 +02:00
|
|
|
$table->data[9][1] = print_select ($iconsets, 'status_images_set', $config["status_images_set"], '', '', '', true);
|
|
|
|
|
2009-04-20 16:00:27 +02:00
|
|
|
echo '<form id="form_setup" method="post">';
|
2009-03-31 16:32:58 +02:00
|
|
|
print_input_hidden ('update_config', 1);
|
|
|
|
print_table ($table);
|
|
|
|
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
|
|
|
print_submit_button (__('Update'), 'update_button', false, 'class="sub upd"');
|
|
|
|
echo '</div>';
|
|
|
|
echo '</form>';
|
|
|
|
|
|
|
|
require_css_file ("color-picker");
|
|
|
|
require_jquery_file ("colorpicker");
|
|
|
|
?>
|
|
|
|
<script language="javascript" type="text/javascript">
|
|
|
|
$(document).ready (function () {
|
|
|
|
$("#form_setup #text-graph_color1").attachColorPicker();
|
|
|
|
$("#form_setup #text-graph_color2").attachColorPicker();
|
|
|
|
$("#form_setup #text-graph_color3").attachColorPicker();
|
|
|
|
});
|
|
|
|
</script>
|