mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Drop cacti
This package was discontinued upstream and seems to be a bit more lively again. However, nobody of the team wants to maintain cacti. Therefore this is being dropped for now. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -1 +0,0 @@
|
||||
/var/cacti/
|
||||
@@ -1,16 +0,0 @@
|
||||
Listen 1009
|
||||
|
||||
<VirtualHost *:1009>
|
||||
DocumentRoot /usr/share/cacti
|
||||
|
||||
Include /etc/httpd/conf/conf.d/php*.conf
|
||||
|
||||
Alias /cacti /usr/share/cacti
|
||||
<Directory /usr/share/cacti>
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
||||
RewriteEngine on
|
||||
RewriteRule ^/$ /cacti/ [R]
|
||||
</VirtualHost>
|
||||
@@ -1 +0,0 @@
|
||||
php /usr/share/cacti/poller.php > /dev/null 2>&1
|
||||
@@ -1,6 +0,0 @@
|
||||
/var/log/cacti/cacti.log {
|
||||
missingok
|
||||
monthly
|
||||
notifempty
|
||||
compress
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
@@ -1,533 +0,0 @@
|
||||
etc/fcron.cyclic/cacti.cron
|
||||
etc/httpd/conf/vhosts.d/cacti.conf
|
||||
#etc/logrotate.d
|
||||
etc/logrotate.d/cacti
|
||||
#usr/share/cacti
|
||||
#usr/share/cacti/LICENSE
|
||||
#usr/share/cacti/README
|
||||
usr/share/cacti/about.php
|
||||
usr/share/cacti/auth_changepassword.php
|
||||
usr/share/cacti/auth_login.php
|
||||
usr/share/cacti/cacti.sql
|
||||
usr/share/cacti/cdef.php
|
||||
#usr/share/cacti/cli
|
||||
usr/share/cacti/cli/.htaccess
|
||||
usr/share/cacti/cli/add_data_query.php
|
||||
usr/share/cacti/cli/add_device.php
|
||||
usr/share/cacti/cli/add_graph_template.php
|
||||
usr/share/cacti/cli/add_graphs.php
|
||||
usr/share/cacti/cli/add_perms.php
|
||||
usr/share/cacti/cli/add_tree.php
|
||||
usr/share/cacti/cli/analyze_database.php
|
||||
usr/share/cacti/cli/convert_innodb.php
|
||||
usr/share/cacti/cli/copy_user.php
|
||||
usr/share/cacti/cli/data_template_associate_rra.php
|
||||
usr/share/cacti/cli/host_update_template.php
|
||||
usr/share/cacti/cli/import_template.php
|
||||
usr/share/cacti/cli/poller_data_sources_reapply_names.php
|
||||
usr/share/cacti/cli/poller_graphs_reapply_names.php
|
||||
usr/share/cacti/cli/poller_output_empty.php
|
||||
usr/share/cacti/cli/poller_reindex_hosts.php
|
||||
usr/share/cacti/cli/rebuild_poller_cache.php
|
||||
usr/share/cacti/cli/reorder_data_query.php
|
||||
usr/share/cacti/cli/repair_database.php
|
||||
usr/share/cacti/cli/repair_templates.php
|
||||
usr/share/cacti/cli/structure_rra_paths.php
|
||||
usr/share/cacti/cli/upgrade_database.php
|
||||
usr/share/cacti/cmd.php
|
||||
usr/share/cacti/color.php
|
||||
usr/share/cacti/data_input.php
|
||||
usr/share/cacti/data_queries.php
|
||||
usr/share/cacti/data_sources.php
|
||||
usr/share/cacti/data_templates.php
|
||||
#usr/share/cacti/docs
|
||||
#usr/share/cacti/docs/CHANGELOG
|
||||
#usr/share/cacti/docs/CONTRIB
|
||||
#usr/share/cacti/docs/README
|
||||
#usr/share/cacti/docs/html
|
||||
#usr/share/cacti/docs/html/LICENSE.html
|
||||
#usr/share/cacti/docs/html/advanced_topics.html
|
||||
#usr/share/cacti/docs/html/basics.html
|
||||
#usr/share/cacti/docs/html/batch_copy_users.html
|
||||
#usr/share/cacti/docs/html/bsd_ports.html
|
||||
#usr/share/cacti/docs/html/cacti_help.html
|
||||
#usr/share/cacti/docs/html/cdefs.html
|
||||
#usr/share/cacti/docs/html/check_cacti_poller.html
|
||||
#usr/share/cacti/docs/html/check_data_gathering.html
|
||||
#usr/share/cacti/docs/html/check_mysql_updating.html
|
||||
#usr/share/cacti/docs/html/check_rrd_graph.html
|
||||
#usr/share/cacti/docs/html/check_rrd_numbers.html
|
||||
#usr/share/cacti/docs/html/check_rrd_owner.html
|
||||
#usr/share/cacti/docs/html/check_rrd_updating.html
|
||||
#usr/share/cacti/docs/html/check_zero_values.html
|
||||
#usr/share/cacti/docs/html/cli_add_data_query.html
|
||||
#usr/share/cacti/docs/html/cli_add_device.html
|
||||
#usr/share/cacti/docs/html/cli_add_graph_template.html
|
||||
#usr/share/cacti/docs/html/cli_add_graphs.html
|
||||
#usr/share/cacti/docs/html/cli_add_perms.html
|
||||
#usr/share/cacti/docs/html/cli_add_tree.html
|
||||
#usr/share/cacti/docs/html/cli_copy_user.html
|
||||
#usr/share/cacti/docs/html/cli_poller_graphs_reapply_names.html
|
||||
#usr/share/cacti/docs/html/cli_poller_output_empty.html
|
||||
#usr/share/cacti/docs/html/cli_poller_reindex_hosts.html
|
||||
#usr/share/cacti/docs/html/copying_user.html
|
||||
#usr/share/cacti/docs/html/create_new_user.html
|
||||
#usr/share/cacti/docs/html/data_input_methods.html
|
||||
#usr/share/cacti/docs/html/data_presentation.html
|
||||
#usr/share/cacti/docs/html/data_queries.html
|
||||
#usr/share/cacti/docs/html/data_storage.html
|
||||
#usr/share/cacti/docs/html/debug_miscellaneous.html
|
||||
#usr/share/cacti/docs/html/debug_rpm_installation.html
|
||||
#usr/share/cacti/docs/html/debugging.html
|
||||
#usr/share/cacti/docs/html/delete_users.html
|
||||
#usr/share/cacti/docs/html/enable_disable_users.html
|
||||
#usr/share/cacti/docs/html/faq.html
|
||||
#usr/share/cacti/docs/html/graph_howto.html
|
||||
#usr/share/cacti/docs/html/graph_overview.html
|
||||
#usr/share/cacti/docs/html/graph_snmp_oid.html
|
||||
#usr/share/cacti/docs/html/graph_templates.html
|
||||
#usr/share/cacti/docs/html/graph_viewing.html
|
||||
#usr/share/cacti/docs/html/guest_access.html
|
||||
#usr/share/cacti/docs/html/host_templates.html
|
||||
#usr/share/cacti/docs/html/host_variables.html
|
||||
#usr/share/cacti/docs/html/how_to.html
|
||||
#usr/share/cacti/docs/html/images
|
||||
#usr/share/cacti/docs/html/images/data_source_title_example1.png
|
||||
#usr/share/cacti/docs/html/images/data_source_title_example2.png
|
||||
#usr/share/cacti/docs/html/images/data_source_title_template.png
|
||||
#usr/share/cacti/docs/html/images/data_template.png
|
||||
#usr/share/cacti/docs/html/images/export_template.png
|
||||
#usr/share/cacti/docs/html/images/graph_template.png
|
||||
#usr/share/cacti/docs/html/images/graph_tree.png
|
||||
#usr/share/cacti/docs/html/images/host_template.png
|
||||
#usr/share/cacti/docs/html/images/import_template.png
|
||||
#usr/share/cacti/docs/html/images/new_device.png
|
||||
#usr/share/cacti/docs/html/images/new_graphs.png
|
||||
#usr/share/cacti/docs/html/images/principles_of_operation.png
|
||||
#usr/share/cacti/docs/html/images/user_management_batch_copy_1.png
|
||||
#usr/share/cacti/docs/html/images/user_management_batch_copy_2.png
|
||||
#usr/share/cacti/docs/html/images/user_management_copy_1.png
|
||||
#usr/share/cacti/docs/html/images/user_management_copy_2.png
|
||||
#usr/share/cacti/docs/html/images/user_management_delete_1.png
|
||||
#usr/share/cacti/docs/html/images/user_management_delete_2.png
|
||||
#usr/share/cacti/docs/html/images/user_management_edit.png
|
||||
#usr/share/cacti/docs/html/images/user_management_enable_disable_1.png
|
||||
#usr/share/cacti/docs/html/images/user_management_enable_disable_2.png
|
||||
#usr/share/cacti/docs/html/images/user_management_list.png
|
||||
#usr/share/cacti/docs/html/images/user_management_new.png
|
||||
#usr/share/cacti/docs/html/index.html
|
||||
#usr/share/cacti/docs/html/install_unix.html
|
||||
#usr/share/cacti/docs/html/install_windows.html
|
||||
#usr/share/cacti/docs/html/installation.html
|
||||
#usr/share/cacti/docs/html/making_scripts_work_with_cacti.html
|
||||
#usr/share/cacti/docs/html/migration_php_scripts_to_script_server.html
|
||||
#usr/share/cacti/docs/html/new_graphs.html
|
||||
#usr/share/cacti/docs/html/operating_principles.html
|
||||
#usr/share/cacti/docs/html/php_script_server.html
|
||||
#usr/share/cacti/docs/html/reference.html
|
||||
#usr/share/cacti/docs/html/requirements.html
|
||||
#usr/share/cacti/docs/html/rrdtool_features.html
|
||||
#usr/share/cacti/docs/html/script_query_xml.html
|
||||
#usr/share/cacti/docs/html/scripts.html
|
||||
#usr/share/cacti/docs/html/snmp_query_xml.html
|
||||
#usr/share/cacti/docs/html/template_export.html
|
||||
#usr/share/cacti/docs/html/template_import.html
|
||||
#usr/share/cacti/docs/html/templates.html
|
||||
#usr/share/cacti/docs/html/testing_script_in_script_server.html
|
||||
#usr/share/cacti/docs/html/unix_apply_patches.html
|
||||
#usr/share/cacti/docs/html/unix_configure_cacti.html
|
||||
#usr/share/cacti/docs/html/unix_configure_httpd.html
|
||||
#usr/share/cacti/docs/html/unix_configure_mysql.html
|
||||
#usr/share/cacti/docs/html/unix_configure_php.html
|
||||
#usr/share/cacti/docs/html/unix_configure_spine.html
|
||||
#usr/share/cacti/docs/html/upgrade.html
|
||||
#usr/share/cacti/docs/html/upgrade_using_hostmib_data_queries.html
|
||||
#usr/share/cacti/docs/html/user_management.html
|
||||
#usr/share/cacti/docs/html/using_spine.html
|
||||
#usr/share/cacti/docs/html/variables.html
|
||||
#usr/share/cacti/docs/pdf
|
||||
#usr/share/cacti/docs/pdf/README
|
||||
#usr/share/cacti/docs/txt
|
||||
#usr/share/cacti/docs/txt/manual.txt
|
||||
usr/share/cacti/gprint_presets.php
|
||||
usr/share/cacti/graph.php
|
||||
usr/share/cacti/graph_image.php
|
||||
usr/share/cacti/graph_settings.php
|
||||
usr/share/cacti/graph_templates.php
|
||||
usr/share/cacti/graph_templates_inputs.php
|
||||
usr/share/cacti/graph_templates_items.php
|
||||
usr/share/cacti/graph_view.php
|
||||
usr/share/cacti/graph_xport.php
|
||||
usr/share/cacti/graphs.php
|
||||
usr/share/cacti/graphs_items.php
|
||||
usr/share/cacti/graphs_new.php
|
||||
usr/share/cacti/host.php
|
||||
usr/share/cacti/host_templates.php
|
||||
#usr/share/cacti/images
|
||||
usr/share/cacti/images/arrow.gif
|
||||
usr/share/cacti/images/auth_deny.gif
|
||||
usr/share/cacti/images/auth_login.gif
|
||||
usr/share/cacti/images/auth_logout.gif
|
||||
usr/share/cacti/images/button_add.gif
|
||||
usr/share/cacti/images/button_cancel.gif
|
||||
usr/share/cacti/images/button_cancel2.gif
|
||||
usr/share/cacti/images/button_clear.gif
|
||||
usr/share/cacti/images/button_colapse_all.gif
|
||||
usr/share/cacti/images/button_create.gif
|
||||
usr/share/cacti/images/button_default.gif
|
||||
usr/share/cacti/images/button_delete.gif
|
||||
usr/share/cacti/images/button_expand_all.gif
|
||||
usr/share/cacti/images/button_export.gif
|
||||
usr/share/cacti/images/button_go.gif
|
||||
usr/share/cacti/images/button_help.gif
|
||||
usr/share/cacti/images/button_import.gif
|
||||
usr/share/cacti/images/button_no.gif
|
||||
usr/share/cacti/images/button_purge.gif
|
||||
usr/share/cacti/images/button_refresh.gif
|
||||
usr/share/cacti/images/button_save.gif
|
||||
usr/share/cacti/images/button_view.gif
|
||||
usr/share/cacti/images/button_yes.gif
|
||||
usr/share/cacti/images/cacti_about_logo.gif
|
||||
usr/share/cacti/images/cacti_backdrop.gif
|
||||
usr/share/cacti/images/cacti_backdrop2.gif
|
||||
usr/share/cacti/images/cacti_logo.gif
|
||||
usr/share/cacti/images/calendar.gif
|
||||
usr/share/cacti/images/delete_icon.gif
|
||||
usr/share/cacti/images/delete_icon_large.gif
|
||||
usr/share/cacti/images/disable_icon.png
|
||||
usr/share/cacti/images/enable_icon.png
|
||||
usr/share/cacti/images/enable_icon_disabled.png
|
||||
usr/share/cacti/images/favicon.ico
|
||||
usr/share/cacti/images/graph_page_top.gif
|
||||
usr/share/cacti/images/graph_properties.gif
|
||||
usr/share/cacti/images/graph_query.png
|
||||
usr/share/cacti/images/graph_zoom.gif
|
||||
usr/share/cacti/images/hide.gif
|
||||
usr/share/cacti/images/install_icon.png
|
||||
usr/share/cacti/images/install_icon_disabled.png
|
||||
usr/share/cacti/images/left_border.gif
|
||||
usr/share/cacti/images/menu_line.gif
|
||||
usr/share/cacti/images/menuarrow.gif
|
||||
usr/share/cacti/images/move_down.gif
|
||||
usr/share/cacti/images/move_left.gif
|
||||
usr/share/cacti/images/move_right.gif
|
||||
usr/share/cacti/images/move_up.gif
|
||||
usr/share/cacti/images/reload_icon_small.gif
|
||||
usr/share/cacti/images/shadow.gif
|
||||
usr/share/cacti/images/shadow_gray.gif
|
||||
usr/share/cacti/images/show.gif
|
||||
usr/share/cacti/images/tab_cacti.gif
|
||||
usr/share/cacti/images/tab_console.gif
|
||||
usr/share/cacti/images/tab_console_down.gif
|
||||
usr/share/cacti/images/tab_graphs.gif
|
||||
usr/share/cacti/images/tab_graphs_down.gif
|
||||
usr/share/cacti/images/tab_mode_list.gif
|
||||
usr/share/cacti/images/tab_mode_list_down.gif
|
||||
usr/share/cacti/images/tab_mode_preview.gif
|
||||
usr/share/cacti/images/tab_mode_preview_down.gif
|
||||
usr/share/cacti/images/tab_mode_tree.gif
|
||||
usr/share/cacti/images/tab_mode_tree_down.gif
|
||||
usr/share/cacti/images/tab_settings.gif
|
||||
usr/share/cacti/images/tab_settings_down.gif
|
||||
usr/share/cacti/images/transparent_line.gif
|
||||
usr/share/cacti/images/uninstall_icon.gif
|
||||
usr/share/cacti/images/view_none.gif
|
||||
#usr/share/cacti/include
|
||||
usr/share/cacti/include/auth.php
|
||||
usr/share/cacti/include/bottom_footer.php
|
||||
usr/share/cacti/include/config.php
|
||||
usr/share/cacti/include/global.php
|
||||
usr/share/cacti/include/global_arrays.php
|
||||
usr/share/cacti/include/global_constants.php
|
||||
usr/share/cacti/include/global_form.php
|
||||
usr/share/cacti/include/global_settings.php
|
||||
usr/share/cacti/include/js
|
||||
usr/share/cacti/include/js/jquery
|
||||
usr/share/cacti/include/js/jquery/colorpicker.js
|
||||
usr/share/cacti/include/js/jquery/jquery-ui.js
|
||||
usr/share/cacti/include/js/jquery/jquery.cookie.js
|
||||
usr/share/cacti/include/js/jquery/jquery.dd.js
|
||||
usr/share/cacti/include/js/jquery/jquery.dropdown.js
|
||||
usr/share/cacti/include/js/jquery/jquery.js
|
||||
usr/share/cacti/include/js/jquery/jquery.jstree.js
|
||||
usr/share/cacti/include/js/jquery/jquery.tablednd.js
|
||||
usr/share/cacti/include/js/jquery/jquery.timepicker.js
|
||||
usr/share/cacti/include/js/jquery/jquery.zoom.js
|
||||
usr/share/cacti/include/js/jquery/themes
|
||||
usr/share/cacti/include/js/jquery/themes/default
|
||||
usr/share/cacti/include/js/jquery/themes/default/d.gif
|
||||
usr/share/cacti/include/js/jquery/themes/default/d.png
|
||||
usr/share/cacti/include/js/jquery/themes/default/style.css
|
||||
usr/share/cacti/include/js/jquery/themes/default/throbber.gif
|
||||
usr/share/cacti/include/jscalendar
|
||||
usr/share/cacti/include/jscalendar/calendar-setup.js
|
||||
usr/share/cacti/include/jscalendar/calendar.js
|
||||
usr/share/cacti/include/jscalendar/lang
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-af.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-al.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-bg.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-big5-utf8.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-big5.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-br.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-ca.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-cs-utf8.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-cs-win.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-da.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-de.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-du.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-el.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-en.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-es.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-fi.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-fr.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-he-utf8.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-hr-utf8.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-hr.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-hu.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-it.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-jp.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-ko-utf8.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-ko.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-lt-utf8.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-lt.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-lv.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-nl.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-no.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-pl-utf8.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-pl.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-pt.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-ro.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-ru.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-ru_win_.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-si.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-sk.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-sp.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-sv.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-tr.js
|
||||
usr/share/cacti/include/jscalendar/lang/calendar-zh.js
|
||||
usr/share/cacti/include/jscalendar/lang/cn_utf8.js
|
||||
usr/share/cacti/include/layout.js
|
||||
usr/share/cacti/include/main.css
|
||||
usr/share/cacti/include/plugins.php
|
||||
usr/share/cacti/include/top_graph_header.php
|
||||
usr/share/cacti/include/top_header.php
|
||||
usr/share/cacti/include/zoom.js
|
||||
usr/share/cacti/index.php
|
||||
#usr/share/cacti/install
|
||||
usr/share/cacti/install/0_8_1_to_0_8_2.php
|
||||
usr/share/cacti/install/0_8_2_to_0_8_2a.php
|
||||
usr/share/cacti/install/0_8_2a_to_0_8_3.php
|
||||
usr/share/cacti/install/0_8_3_to_0_8_4.php
|
||||
usr/share/cacti/install/0_8_4_to_0_8_5.php
|
||||
usr/share/cacti/install/0_8_5a_to_0_8_6.php
|
||||
usr/share/cacti/install/0_8_6_to_0_8_6a.php
|
||||
usr/share/cacti/install/0_8_6c_to_0_8_6d.php
|
||||
usr/share/cacti/install/0_8_6d_to_0_8_6e.php
|
||||
usr/share/cacti/install/0_8_6f_to_0_8_6g.php
|
||||
usr/share/cacti/install/0_8_6g_to_0_8_6h.php
|
||||
usr/share/cacti/install/0_8_6h_to_0_8_6i.php
|
||||
usr/share/cacti/install/0_8_6j_to_0_8_7.php
|
||||
usr/share/cacti/install/0_8_7_to_0_8_7a.php
|
||||
usr/share/cacti/install/0_8_7a_to_0_8_7b.php
|
||||
usr/share/cacti/install/0_8_7b_to_0_8_7c.php
|
||||
usr/share/cacti/install/0_8_7c_to_0_8_7d.php
|
||||
usr/share/cacti/install/0_8_7d_to_0_8_7e.php
|
||||
usr/share/cacti/install/0_8_7e_to_0_8_7f.php
|
||||
usr/share/cacti/install/0_8_7f_to_0_8_7g.php
|
||||
usr/share/cacti/install/0_8_7g_to_0_8_7h.php
|
||||
usr/share/cacti/install/0_8_7h_to_0_8_7i.php
|
||||
usr/share/cacti/install/0_8_7i_to_0_8_8.php
|
||||
usr/share/cacti/install/0_8_8_to_0_8_8a.php
|
||||
usr/share/cacti/install/0_8_8_to_0_8_8b.php
|
||||
usr/share/cacti/install/0_8_to_0_8_1.php
|
||||
usr/share/cacti/install/index.php
|
||||
usr/share/cacti/install/install_finish.gif
|
||||
usr/share/cacti/install/install_next.gif
|
||||
#usr/share/cacti/lib
|
||||
#usr/share/cacti/lib/adodb
|
||||
usr/share/cacti/lib/adodb/adodb-csvlib.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-datadict.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-error.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-errorhandler.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-errorpear.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-exceptions.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-iterator.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-lib.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-pear.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-perf.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-php4.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-time.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb-xmlschema.inc.php
|
||||
usr/share/cacti/lib/adodb/adodb.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-access.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-db2.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-firebird.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-generic.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-ibase.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-informix.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-mssql.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-mysql.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-oci8.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-postgres.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-sapdb.inc.php
|
||||
usr/share/cacti/lib/adodb/datadict/datadict-sybase.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-access.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-ado.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-ado5.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-ado_access.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-ado_mssql.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-borland_ibase.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-csv.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-db2.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-fbsql.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-firebird.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-ibase.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-informix.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-informix72.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-ldap.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-mssql.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-mssqlpo.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-mysqli.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-mysqlt.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-netezza.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-oci8.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-oci805.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-oci8po.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-odbc.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-odbc_mssql.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-odbc_oracle.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-odbtp.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-odbtp_unicode.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-oracle.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-pdo.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-postgres.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-postgres64.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-postgres7.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-proxy.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-sapdb.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-sqlanywhere.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-sqlite.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-sqlitepo.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-sybase.inc.php
|
||||
usr/share/cacti/lib/adodb/drivers/adodb-vfp.inc.php
|
||||
usr/share/cacti/lib/adodb/lang
|
||||
usr/share/cacti/lib/adodb/lang/adodb-ar.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-bg.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-bgutf8.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-ca.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-cn.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-cz.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-de.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-en.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-es.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-fr.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-hu.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-it.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-nl.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-pl.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-pt-br.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-ro.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-ru1251.inc.php
|
||||
usr/share/cacti/lib/adodb/lang/adodb-sv.inc.php
|
||||
usr/share/cacti/lib/adodb/license.txt
|
||||
usr/share/cacti/lib/adodb/toexport.inc.php
|
||||
usr/share/cacti/lib/adodb/tohtml.inc.php
|
||||
usr/share/cacti/lib/api_automation_tools.php
|
||||
usr/share/cacti/lib/api_data_source.php
|
||||
usr/share/cacti/lib/api_device.php
|
||||
usr/share/cacti/lib/api_graph.php
|
||||
usr/share/cacti/lib/api_poller.php
|
||||
usr/share/cacti/lib/api_tree.php
|
||||
usr/share/cacti/lib/auth.php
|
||||
usr/share/cacti/lib/cdef.php
|
||||
usr/share/cacti/lib/data_query.php
|
||||
usr/share/cacti/lib/database.php
|
||||
usr/share/cacti/lib/export.php
|
||||
usr/share/cacti/lib/functions.php
|
||||
usr/share/cacti/lib/graph_export.php
|
||||
usr/share/cacti/lib/graph_variables.php
|
||||
usr/share/cacti/lib/html.php
|
||||
usr/share/cacti/lib/html_form.php
|
||||
usr/share/cacti/lib/html_form_template.php
|
||||
usr/share/cacti/lib/html_tree.php
|
||||
usr/share/cacti/lib/html_utility.php
|
||||
usr/share/cacti/lib/html_validate.php
|
||||
usr/share/cacti/lib/import.php
|
||||
usr/share/cacti/lib/ldap.php
|
||||
usr/share/cacti/lib/ping.php
|
||||
usr/share/cacti/lib/plugins.php
|
||||
usr/share/cacti/lib/poller.php
|
||||
usr/share/cacti/lib/rrd.php
|
||||
usr/share/cacti/lib/snmp.php
|
||||
usr/share/cacti/lib/sort.php
|
||||
usr/share/cacti/lib/template.php
|
||||
usr/share/cacti/lib/time.php
|
||||
usr/share/cacti/lib/timespan_settings.php
|
||||
usr/share/cacti/lib/tree.php
|
||||
usr/share/cacti/lib/utility.php
|
||||
usr/share/cacti/lib/variables.php
|
||||
usr/share/cacti/lib/xml.php
|
||||
usr/share/cacti/log
|
||||
usr/share/cacti/logout.php
|
||||
usr/share/cacti/plugins
|
||||
usr/share/cacti/plugins.php
|
||||
usr/share/cacti/plugins/index.php
|
||||
usr/share/cacti/poller.php
|
||||
usr/share/cacti/poller_commands.php
|
||||
usr/share/cacti/poller_export.php
|
||||
#usr/share/cacti/resource
|
||||
#usr/share/cacti/resource/script_queries
|
||||
usr/share/cacti/resource/script_queries/host_cpu.xml
|
||||
usr/share/cacti/resource/script_queries/host_disk.xml
|
||||
usr/share/cacti/resource/script_queries/unix_disk.xml
|
||||
usr/share/cacti/resource/script_server
|
||||
usr/share/cacti/resource/script_server/host_cpu.xml
|
||||
usr/share/cacti/resource/script_server/host_disk.xml
|
||||
#usr/share/cacti/resource/snmp_queries
|
||||
usr/share/cacti/resource/snmp_queries/host_disk.xml
|
||||
usr/share/cacti/resource/snmp_queries/interface.xml
|
||||
usr/share/cacti/resource/snmp_queries/kbridge.xml
|
||||
usr/share/cacti/resource/snmp_queries/net-snmp_disk.xml
|
||||
usr/share/cacti/resource/snmp_queries/netware_cpu.xml
|
||||
usr/share/cacti/resource/snmp_queries/netware_disk.xml
|
||||
usr/share/cacti/rra
|
||||
usr/share/cacti/rra.php
|
||||
usr/share/cacti/script_server.php
|
||||
usr/share/cacti/script_server.pl
|
||||
#usr/share/cacti/scripts
|
||||
usr/share/cacti/scripts/3com_cable_modem.pl
|
||||
usr/share/cacti/scripts/diskfree.pl
|
||||
usr/share/cacti/scripts/diskfree.sh
|
||||
usr/share/cacti/scripts/linux_memory.pl
|
||||
usr/share/cacti/scripts/loadavg.pl
|
||||
usr/share/cacti/scripts/loadavg_multi.pl
|
||||
usr/share/cacti/scripts/ping.pl
|
||||
usr/share/cacti/scripts/query_host_cpu.php
|
||||
usr/share/cacti/scripts/query_host_partitions.php
|
||||
usr/share/cacti/scripts/query_unix_partitions.pl
|
||||
usr/share/cacti/scripts/sql.php
|
||||
usr/share/cacti/scripts/ss_fping.php
|
||||
usr/share/cacti/scripts/ss_host_cpu.php
|
||||
usr/share/cacti/scripts/ss_host_disk.php
|
||||
usr/share/cacti/scripts/ss_sql.php
|
||||
usr/share/cacti/scripts/unix_processes.pl
|
||||
usr/share/cacti/scripts/unix_tcp_connections.pl
|
||||
usr/share/cacti/scripts/unix_users.pl
|
||||
usr/share/cacti/scripts/weatherbug.pl
|
||||
usr/share/cacti/scripts/webhits.pl
|
||||
usr/share/cacti/settings.php
|
||||
usr/share/cacti/templates_export.php
|
||||
usr/share/cacti/templates_import.php
|
||||
usr/share/cacti/tree.php
|
||||
usr/share/cacti/user_admin.php
|
||||
usr/share/cacti/utilities.php
|
||||
#var/cacti
|
||||
#var/cacti/log
|
||||
var/cacti/log/.htaccess
|
||||
#var/cacti/log/cacti.log
|
||||
#var/cacti/rra
|
||||
var/cacti/rra/.htaccess
|
||||
var/ipfire/backup/addons/includes/cacti
|
||||
114
lfs/cacti
114
lfs/cacti
@@ -1,114 +0,0 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
|
||||
# #
|
||||
# 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, either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# 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. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 0.8.8b
|
||||
|
||||
THISAPP = cacti-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
PROG = cacti
|
||||
PAK_VER = 6
|
||||
|
||||
DEPS = "netsnmpd mysql"
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
objects = $(DL_FILE)
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
|
||||
$(DL_FILE)_MD5 = acb40deae073ca22e5c01a8e3ba389fb
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
||||
|
||||
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
md5 : $(subst %,%_MD5,$(objects))
|
||||
|
||||
dist:
|
||||
@$(PAK)
|
||||
|
||||
###############################################################################
|
||||
# Downloading, checking, md5sum
|
||||
###############################################################################
|
||||
|
||||
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
||||
@$(CHECK)
|
||||
|
||||
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
||||
@$(LOAD)
|
||||
|
||||
$(subst %,%_MD5,$(objects)) :
|
||||
@$(MD5)
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
|
||||
cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8a-legal.patch
|
||||
cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8a-replace_treeview_by_jquery.jstree.patch
|
||||
cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-html-injection.patch
|
||||
cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-remote-command-execution.patch
|
||||
cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-rra-comments.patch
|
||||
cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-sanitize-variables.patch
|
||||
cd $(DIR_APP) && patch -p2 -i $(DIR_SRC)/src/patches/cacti/cacti-0.8.8b-sql-injection-shell-escaping.patch
|
||||
cp -vf \
|
||||
$(DIR_SRC)/config/cacti/d.gif \
|
||||
$(DIR_SRC)/config/cacti/d.png \
|
||||
$(DIR_SRC)/config/cacti/throbber.gif \
|
||||
$(DIR_APP)/include/js/jquery/themes/default/
|
||||
cd $(DIR_APP) && rm -rf include/treeview
|
||||
|
||||
@rm -rf /var/cacti /usr/share/cacti
|
||||
mkdir -pv /var/cacti /usr/share/cacti
|
||||
|
||||
cd $(DIR_APP) && mv -vf * /usr/share/cacti
|
||||
cp -vf $(DIR_SRC)/config/cacti/cacti.conf /etc/httpd/conf/vhosts.d/
|
||||
install -v -m 755 $(DIR_SRC)/config/cacti/cacti.cron /etc/fcron.cyclic/cacti.cron
|
||||
install -v -m 644 $(DIR_SRC)/config/backup/includes/cacti \
|
||||
/var/ipfire/backup/addons/includes/cacti
|
||||
|
||||
mv -vf /usr/share/cacti/log /var/cacti
|
||||
mv -vf /usr/share/cacti/rra /var/cacti
|
||||
ln -s /var/cacti/log /usr/share/cacti/log
|
||||
ln -s /var/cacti/rra /usr/share/cacti/rra
|
||||
|
||||
-mkdir -pv /etc/logrotate.d
|
||||
install -v -m 644 $(DIR_SRC)/config/cacti/cacti.logrotate /etc/logrotate.d/cacti
|
||||
|
||||
chown -R nobody:nobody /var/cacti/rra /var/cacti/log
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
1
make.sh
1
make.sh
@@ -1422,7 +1422,6 @@ buildipfire() {
|
||||
lfsmake2 perl-DBD-mysql
|
||||
lfsmake2 perl-DBD-SQLite
|
||||
lfsmake2 perl-File-ReadBackwards
|
||||
lfsmake2 cacti
|
||||
lfsmake2 openvmtools
|
||||
lfsmake2 motion
|
||||
lfsmake2 joe
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire 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; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire 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. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
extract_files
|
||||
/etc/init.d/apache restart
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire 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; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire 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. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
stop_service ${NAME}
|
||||
make_backup ${NAME}
|
||||
remove_files
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire 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; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire 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. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
./uninstall.sh
|
||||
./install.sh
|
||||
File diff suppressed because one or more lines are too long
@@ -1,607 +0,0 @@
|
||||
Description: treeview has a license issue, cacti upstream is going to replace it
|
||||
with functionality from jquery.jstree.
|
||||
.
|
||||
This patch implements the changes needed for an upstream layout where the
|
||||
necessary code is in cacti/include/js/jquery/ but the code in that path is
|
||||
not included in this patch.
|
||||
.
|
||||
The necessary jquery scripts and theme info can come from cacti upstream and from
|
||||
debian packages (libjs-jquery and libjs-jquery-cookie) The version used when
|
||||
creating this patch can be found here:
|
||||
http://svn.cacti.net/viewvc/cacti/branches/0.8.9/include/js/jquery/jquery.js?pathrev=7324
|
||||
http://svn.cacti.net/viewvc/cacti/branches/0.8.9/include/js/jquery/jquery.jstree.js?pathrev=7324
|
||||
http://svn.cacti.net/viewvc/cacti/branches/main/include/js/jquery/themes/default/?pathrev=7324
|
||||
http://anonscm.debian.org/gitweb/?p=pkg-javascript/jquery-goodies.git;a=blob;f=cookie/jquery.cookie.js;hb=c50e1a2d599cb48893e8d77470e71e83e44dfdb5
|
||||
.
|
||||
This patch does NOT implement the changes needed for the Debian package of
|
||||
cacti.
|
||||
.
|
||||
This patch was updated with the patch from Jan Zalesak <zalesak@jaw.cz> in
|
||||
http://bugs.debian.org/702690 which was further improved to also cover
|
||||
lib/graph_export.php and to keep tag alignment consistent.
|
||||
Bug: http://bugs.cacti.net/view.php?id=2228
|
||||
Bug-Debian: http://bugs.debian.org/679980
|
||||
Author: Paul Gevers <elbrus@debian.org>
|
||||
Date: Sun, 31 Mar 2013 11:59:05 +0200
|
||||
|
||||
--- a/include/top_graph_header.php
|
||||
+++ b/include/top_graph_header.php
|
||||
@@ -84,8 +84,9 @@
|
||||
<link href="<?php echo $config['url_path']; ?>include/main.css" type="text/css" rel="stylesheet">
|
||||
<link href="<?php echo $config['url_path']; ?>images/favicon.ico" rel="shortcut icon"/>
|
||||
<script type="text/javascript" src="<?php echo $config['url_path']; ?>include/layout.js"></script>
|
||||
- <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/treeview/ua.js"></script>
|
||||
- <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/treeview/ftiens4.js"></script>
|
||||
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/js/jquery/jquery.js" language="javascript"></script>
|
||||
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/js/jquery/jquery.cookie.js" language="javascript"></script>
|
||||
+ <script type="text/javascript" src="<?php echo $config['url_path']; ?>include/js/jquery/jquery.jstree.js"></script>
|
||||
<script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/calendar.js"></script>
|
||||
<script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/lang/calendar-en.js"></script>
|
||||
<script type="text/javascript" src="<?php echo $config['url_path']; ?>include/jscalendar/calendar-setup.js"></script>
|
||||
@@ -178,7 +179,6 @@
|
||||
<td valign="top" style="padding: 5px; border-right: #aaaaaa 1px solid;background-repeat:repeat-y;background-color:#efefef;" bgcolor='#efefef' width='<?php print htmlspecialchars(read_graph_config_option("default_dual_pane_width"));?>' class='noprint'>
|
||||
<table border=0 cellpadding=0 cellspacing=0><tr><td><a style="font-size:7pt;text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank></a></td></tr></table>
|
||||
<?php grow_dhtml_trees(); ?>
|
||||
- <script type="text/javascript">initializeDocument();</script>
|
||||
|
||||
<?php if (isset($_GET["select_first"])) { ?>
|
||||
<script type="text/javascript">
|
||||
--- a/lib/graph_export.php
|
||||
+++ b/lib/graph_export.php
|
||||
@@ -1365,15 +1365,6 @@
|
||||
/* create the treeview representation for the html data */
|
||||
grow_dhtml_trees_export($fp,$tree_id);
|
||||
|
||||
- fwrite($fp,"<script type='text/javascript'>initializeDocument();</script>\n");
|
||||
- fwrite($fp,"<script type='text/javascript'>\n");
|
||||
- fwrite($fp,"var obj;\n");
|
||||
- fwrite($fp,"obj = findObj(1);\n");
|
||||
- fwrite($fp,"if (!obj.isOpen) {\n");
|
||||
- fwrite($fp,"clickOnNode(1);\n");
|
||||
- fwrite($fp,"}\n");
|
||||
- fwrite($fp,"clickOnLink(2,'','main');\n");
|
||||
- fwrite($fp,"</script>\n");
|
||||
fwrite($fp,"</td>\n");
|
||||
fwrite($fp,"<td valign='top'>\n");
|
||||
}
|
||||
@@ -1383,16 +1374,7 @@
|
||||
include_once($config["library_path"] . "/tree.php");
|
||||
include_once($config["library_path"] . "/data_query.php");
|
||||
|
||||
- fwrite($fp, "<script type='text/javascript'>\n");
|
||||
- fwrite($fp, "<!--
|
||||
- USETEXTLINKS = 1
|
||||
- STARTALLOPEN = 0
|
||||
- USEFRAMES = 0
|
||||
- USEICONS = 0
|
||||
- WRAPTEXT = 1
|
||||
- ICONPATH = 'treeview/'
|
||||
- PERSERVESTATE = 1
|
||||
- HIGHLIGHT = 1\n");
|
||||
+ fwrite($fp, "<div id=\"jtree\">\n");
|
||||
|
||||
if (read_config_option("export_tree_isolation") == "off") {
|
||||
$dhtml_tree_base = 0;
|
||||
@@ -1413,9 +1395,34 @@
|
||||
}
|
||||
}
|
||||
|
||||
- fwrite($fp,"foldersTree.treeID = \"t2\"
|
||||
- //-->\n
|
||||
- </script>\n");
|
||||
+ fwrite($fp, "</div>\n");
|
||||
+ fwrite($fp, "<script type=\"text/javascript\">\n");
|
||||
+ fwrite($fp, "$(function () {
|
||||
+ $(\"#jtree\")
|
||||
+ .jstree({
|
||||
+ \"plugins\" : [\"ui\",\"themes\",\"html_data\",\"cookies\"],
|
||||
+ \"themes\" : {\"icons\" : false,
|
||||
+ \"url\" : \"./js/style.css\"},
|
||||
+ \"cookies\" : {
|
||||
+ \"save_opened\" : \"Cacti_jstree_open\",
|
||||
+ \"save_selected\" : \"Cacti_jstree_select\"
|
||||
+ }
|
||||
+
|
||||
+ })
|
||||
+
|
||||
+ // Make sure that the nodes are actually used as links
|
||||
+ // We need reselect to prevent endless loops
|
||||
+ // https://groups.google.com/d/topic/jstree/j6XNq9hQdeA/discussion
|
||||
+ .bind(\"reselect.jstree\", function (e, data) {
|
||||
+ data.inst.get_container().bind(\"select_node.jstree\", function (e, data) {
|
||||
+ // data.rstl.obj is the object that was selected.
|
||||
+ document.location.href = data.rslt.obj.children(\"a\").attr(\"href\");
|
||||
+ });
|
||||
+ });
|
||||
+
|
||||
+});\n");
|
||||
+ fwrite($fp, "</script>\n");
|
||||
+
|
||||
}
|
||||
|
||||
/* get_graph_tree_array_export - returns a list of graph trees taking permissions into account if
|
||||
@@ -1478,8 +1485,7 @@
|
||||
$dhtml_tree = array();
|
||||
$dhtml_tree[0] = $start;
|
||||
$dhtml_tree[1] = read_graph_config_option("expand_hosts");
|
||||
- $dhtml_tree[2] = "foldersTree = gFld(\"\", \"\")\n";
|
||||
- $i = 2;
|
||||
+ $i = 1;
|
||||
|
||||
$tree_list = get_graph_tree_array_export();
|
||||
|
||||
@@ -1499,7 +1505,6 @@
|
||||
if (((read_config_option("export_tree_isolation") == "on") && ($tree_id == $tree["id"])) ||
|
||||
(read_config_option("export_tree_isolation") == "off")) {
|
||||
|
||||
- $i++;
|
||||
|
||||
$hier_sql = "SELECT DISTINCT
|
||||
graph_tree_items.id,
|
||||
@@ -1522,19 +1527,53 @@
|
||||
$dhtml_tree_id = 0;
|
||||
|
||||
if (sizeof($hierarchy) > 0) {
|
||||
+ $last_tier = 1;
|
||||
+ $openli = false;
|
||||
+ $lasthost = false;
|
||||
+ $opentree = false;
|
||||
foreach ($hierarchy as $leaf) {
|
||||
if ($dhtml_tree_id <> $tree["id"]) {
|
||||
- $dhtml_tree[$i] = "ou0 = insFld(foldersTree, gFld(\"" . get_tree_name($tree["id"]) . "\", \"" . clean_up_export_name(get_tree_name($tree["id"])) . "_leaf.html\"))\n";
|
||||
+ if ($opentree) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t</ul>\n\t\t</li>\n\t</ul>\n";
|
||||
+ }
|
||||
+ $i++;
|
||||
+ $clean_id = clean_up_export_name(get_tree_name($tree["id"]));
|
||||
+ $dhtml_tree[$i] = "\t<ul>\n\t\t<li id=\"" . $clean_id . "\"><a href=\"" . $clean_id . "_leaf.html\">" . get_tree_name($tree["id"]) . "</a>\n\t\t\t<ul>\n";
|
||||
+ $opentree = true;
|
||||
}
|
||||
$dhtml_tree_id = $tree["id"];
|
||||
|
||||
- $i++;
|
||||
$tier = tree_tier($leaf["order_key"]);
|
||||
|
||||
if ($leaf["host_id"] > 0) { //It's a host
|
||||
- $dhtml_tree[$i] = "ou" . ($tier) . " = insFld(ou" . ($tier-1) . ", gFld(\"Host: " . $leaf["hostname"] . "\", \"" . clean_up_export_name($leaf["hostname"] . "_" . $leaf["id"]) . ".html\"))\n";
|
||||
+ if ($tier > $last_tier) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t<ul>\n";
|
||||
+ } elseif ($tier < $last_tier) {
|
||||
+ if (!$lasthost) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t</li>\n";
|
||||
+ }
|
||||
+ for ($x = $tier; $x < $last_tier; $x++) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t</ul>\n\t\t\t\t</li>\n";
|
||||
+ $openli = false;
|
||||
+ }
|
||||
+ } elseif ($openli && !$lasthost) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t</li>\n";
|
||||
+ $openli = false;
|
||||
+ }
|
||||
+ $last_tier = $tier;
|
||||
+ $lasthost = true;
|
||||
+ $i++;
|
||||
+ $clean_id = clean_up_export_name($leaf["hostname"] . "_" . $leaf["id"]);
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t<li id=\"" . $clean_id . "\"><a href=\"" . $clean_id . ".html\">Host: " . htmlspecialchars($leaf["hostname"]) . "</a>\n";
|
||||
|
||||
if (read_config_option("export_tree_expand_hosts") == "on") {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t<ul>\n";
|
||||
if ($leaf["host_grouping_type"] == HOST_GROUPING_GRAPH_TEMPLATE) {
|
||||
$graph_templates = db_fetch_assoc("SELECT
|
||||
graph_templates.id,
|
||||
@@ -1552,7 +1591,8 @@
|
||||
if (sizeof($graph_templates) > 0) {
|
||||
foreach ($graph_templates as $graph_template) {
|
||||
$i++;
|
||||
- $dhtml_tree[$i] = "ou" . ($tier+1) . " = insFld(ou" . ($tier) . ", gFld(\" " . $graph_template["name"] . "\", \"" . clean_up_export_name($leaf["hostname"] . "_gt_" . $leaf["id"]) . "_" . $graph_template["id"] . ".html\"))\n";
|
||||
+ $clean_id = clean_up_export_name($leaf["hostname"] . "_gt_" . $leaf["id"] . "_" . $graph_template["id"]);
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t<li id=\"" . $clean_id . "\"><a href=\"" . $clean_id . ".html\">" . htmlspecialchars($graph_template["name"]) . "</a></li>\n";
|
||||
}
|
||||
}
|
||||
}else if ($leaf["host_grouping_type"] == HOST_GROUPING_DATA_QUERY_INDEX) {
|
||||
@@ -1567,36 +1607,77 @@
|
||||
|
||||
array_push($data_queries, array(
|
||||
"id" => "0",
|
||||
- "name" => "Graph Template Based"
|
||||
+ "name" => "Non Query Based"
|
||||
));
|
||||
|
||||
if (sizeof($data_queries) > 0) {
|
||||
- foreach ($data_queries as $data_query) {
|
||||
- $i++;
|
||||
-
|
||||
- $dhtml_tree[$i] = "ou" . ($tier+1) . " = insFld(ou" . ($tier) . ", gFld(\" " . $data_query["name"] . "\", \"" . clean_up_export_name($leaf["hostname"] . "_dq_" . $leaf["title"] . "_" . $leaf["id"]) . "_" . $data_query["id"] . ".html\"))\n";
|
||||
+ foreach ($data_queries as $data_query) {
|
||||
+ $i++;
|
||||
+ $clean_id = clean_up_export_name($leaf["hostname"] . "_dq_" . $leaf["title"] . "_" . $leaf["id"] . "_" . $data_query["id"]);
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t<li id=\"" . $clean_id . "\"><a href=\"" . $clean_id . ".html\">" . htmlspecialchars($data_query["name"]) . "</a>\n";
|
||||
|
||||
- /* fetch a list of field names that are sorted by the preferred sort field */
|
||||
- $sort_field_data = get_formatted_data_query_indexes($leaf["host_id"], $data_query["id"]);
|
||||
+ /* fetch a list of field names that are sorted by the preferred sort field */
|
||||
+ $sort_field_data = get_formatted_data_query_indexes($leaf["host_id"], $data_query["id"]);
|
||||
|
||||
- if ($data_query["id"] > 0) {
|
||||
- while (list($snmp_index, $sort_field_value) = each($sort_field_data)) {
|
||||
+ if ($data_query["id"] > 0) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t<ul>\n";
|
||||
+ while (list($snmp_index, $sort_field_value) = each($sort_field_data)) {
|
||||
+ $i++;
|
||||
+ $clean_id = clean_up_export_name($leaf["hostname"] . "_dqi_" . $leaf["id"] . "_" . $data_query["id"] . "_" . $snmp_index);
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t\t<li id=\"" . $clean_id . "\"><a href=\"" . $clean_id . ".html\">" . htmlspecialchars($sort_field_value) . "</a></li>\n";
|
||||
+ }
|
||||
$i++;
|
||||
- $dhtml_tree[$i] = "ou" . ($tier+2) . " = insFld(ou" . ($tier+1) . ", gFld(\" " . $sort_field_value . "\", \"" . clean_up_export_name($leaf["hostname"] . "_dqi_" . $leaf["title"] . "_" . $leaf["id"]) . "_" . $data_query["id"] . "_" . $snmp_index . ".html\"))\n";
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t</ul>\n";
|
||||
}
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t</li>\n";
|
||||
}
|
||||
}
|
||||
- }
|
||||
}
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t</ul>\n";
|
||||
}
|
||||
- }else {
|
||||
- $dhtml_tree[$i] = "ou" . ($tier) . " = insFld(ou" . ($tier-1) . ", gFld(\"" . $leaf["title"] . "\", \"" . clean_up_export_name(get_tree_name($tree["id"]) . "_" . $leaf["title"] . "_" . $leaf["id"]) . "_leaf.html\"))\n";
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t</li>\n";
|
||||
+ }else { //It's not a host
|
||||
+ if ($tier > $last_tier) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t<ul>\n";
|
||||
+ } elseif ($tier < $last_tier) {
|
||||
+ if (!$lasthost) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "</li>\n";
|
||||
+ }
|
||||
+ for ($x = $tier; $x < $last_tier; $x++) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t</ul>\n\t\t\t\t</li>\n";
|
||||
+ $openli = false;
|
||||
+ }
|
||||
+ } elseif ($openli && !$lasthost) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "</li>\n";
|
||||
+ $openli = false;
|
||||
+ }
|
||||
+ $last_tier = $tier;
|
||||
+ $i++;
|
||||
+ $clean_id = clean_up_export_name(get_tree_name($tree["id"]) . "_" . $leaf["title"] . "_" . $leaf["id"]);
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t<li id=\"" . $clean_id . "\"><a href=\"" . $clean_id . "_leaf.html\">" . htmlspecialchars($leaf["title"]) . "</a>\n";
|
||||
+ $openli = true;
|
||||
+ $lasthost = false;
|
||||
}
|
||||
}
|
||||
+ for ($x = $last_tier; $x > 1; $x--) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t</ul>\n\t\t\t\t</li>\n";
|
||||
+ }
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t</ul>\n\t\t</li>\n\t</ul>\n";
|
||||
}else{
|
||||
if ($dhtml_tree_id <> $tree["id"]) {
|
||||
- $dhtml_tree[$i] = "ou0 = insFld(foldersTree, gFld(\"" . get_tree_name($tree["id"]) . "\", \"" . clean_up_export_name(get_tree_name($tree["id"])) . "_leaf.html\"))\n";
|
||||
$i++;
|
||||
+ $clean_id = clean_up_export_name(get_tree_name($tree["id"]));
|
||||
+ $dhtml_tree[$i] = "\t<ul>\n\t\t<li id=\"" . $clean_id . "_leaf\"><a href=\"" . $clean_id . "_leaf.html\">" . get_tree_name($tree["id"]) . "</a></li>\n\t</ul>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1612,10 +1693,10 @@
|
||||
$dir - the export directory where graphs will either be staged or located.
|
||||
*/
|
||||
function create_export_directory_structure($cacti_root_path, $dir) {
|
||||
- /* create the treeview sub-directory */
|
||||
- if (!is_dir("$dir/treeview")) {
|
||||
- if (!mkdir("$dir/treeview", 0755)) {
|
||||
- export_fatal("Create directory '" . $dir . "/treeview' failed. Can not continue");
|
||||
+ /* create the jquery sub-directory */
|
||||
+ if (!is_dir("$dir/js")) {
|
||||
+ if (!mkdir("$dir/js", 0755)) {
|
||||
+ export_fatal("Create directory '" . $dir . "/js' failed. Can not continue");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1626,8 +1707,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- $treeview_dir = $dir . "/treeview";
|
||||
-
|
||||
/* css */
|
||||
copy("$cacti_root_path/include/main.css", "$dir/main.css");
|
||||
|
||||
@@ -1639,18 +1718,15 @@
|
||||
copy("$cacti_root_path/images/shadow_gray.gif", "$dir/shadow_gray.gif");
|
||||
|
||||
/* java scripts for the tree */
|
||||
- copy("$cacti_root_path/include/treeview/ftiens4_export.js", "$treeview_dir/ftiens4.js");
|
||||
- copy("$cacti_root_path/include/treeview/ua.js", "$treeview_dir/ua.js");
|
||||
-
|
||||
- /* images for the tree */
|
||||
- copy("$cacti_root_path/include/treeview/ftv2blank.gif", "$treeview_dir/ftv2blank.gif");
|
||||
- copy("$cacti_root_path/include/treeview/ftv2lastnode.gif", "$treeview_dir/ftv2lastnode.gif");
|
||||
- copy("$cacti_root_path/include/treeview/ftv2mlastnode.gif", "$treeview_dir/ftv2mlastnode.gif");
|
||||
- copy("$cacti_root_path/include/treeview/ftv2mnode.gif", "$treeview_dir/ftv2mnode.gif");
|
||||
- copy("$cacti_root_path/include/treeview/ftv2node.gif", "$treeview_dir/ftv2node.gif");
|
||||
- copy("$cacti_root_path/include/treeview/ftv2plastnode.gif", "$treeview_dir/ftv2plastnode.gif");
|
||||
- copy("$cacti_root_path/include/treeview/ftv2pnode.gif", "$treeview_dir/ftv2pnode.gif");
|
||||
- copy("$cacti_root_path/include/treeview/ftv2vertline.gif", "$treeview_dir/ftv2vertline.gif");
|
||||
+ copy("$cacti_root_path/include/js/jquery/jquery.js", "$dir/js/jquery.js");
|
||||
+ copy("$cacti_root_path/include/js/jquery/jquery.jstree.js", "$dir/js/jquery.jstree.js");
|
||||
+ copy("$cacti_root_path/include/js/jquery/jquery.cookie.js", "$dir/js/jquery.cookie.js");
|
||||
+
|
||||
+ /* theme info for java scripts */
|
||||
+ copy("$cacti_root_path/include/js/jquery/themes/default/style.css", "$dir/js/style.css");
|
||||
+ copy("$cacti_root_path/include/js/jquery/themes/default/d.png", "$dir/js/d.png");
|
||||
+ copy("$cacti_root_path/include/js/jquery/themes/default/d.gif", "$dir/js/d.gif");
|
||||
+ copy("$cacti_root_path/include/js/jquery/themes/default/throbber.gif", "$dir/js/throbber.gif");
|
||||
}
|
||||
|
||||
function get_host_description($host_id) {
|
||||
@@ -1738,8 +1814,9 @@
|
||||
<meta http-equiv=refresh content='300'; url='index.html'>
|
||||
<meta http-equiv=Pragma content=no-cache>
|
||||
<meta http-equiv=cache-control content=no-cache>
|
||||
- <script type=\"text/javascript\" src=\"./treeview/ua.js\"></script>
|
||||
- <script type=\"text/javascript\" src=\"./treeview/ftiens4.js\"></script>
|
||||
+ <script type=\"text/javascript\" src=\"./js/jquery.js\" language=\"javascript\"></script>
|
||||
+ <script type=\"text/javascript\" src=\"./js/jquery.cookie.js\" language=\"javascript\"></script>
|
||||
+ <script type=\"text/javascript\" src=\"./js/jquery.jstree.js\" language=\"javascript\"></script>
|
||||
</head>
|
||||
<body>
|
||||
<table style='width:100%;height:100%;' cellspacing='0' cellpadding='0'>
|
||||
--- a/lib/html_tree.php
|
||||
+++ b/lib/html_tree.php
|
||||
@@ -495,17 +495,9 @@
|
||||
include_once($config["library_path"] . "/data_query.php");
|
||||
|
||||
?>
|
||||
- <script type="text/javascript">
|
||||
- <!--
|
||||
- USETEXTLINKS = 1
|
||||
- STARTALLOPEN = 0
|
||||
- USEFRAMES = 0
|
||||
- USEICONS = 0
|
||||
- WRAPTEXT = 1
|
||||
- PERSERVESTATE = 1
|
||||
- HIGHLIGHT = 1
|
||||
<?php
|
||||
/* get current time */
|
||||
+/* Probably not needed anymore as jstree uses jquery.cookies
|
||||
list($micro,$seconds) = explode(" ", microtime());
|
||||
$current_time = $seconds + $micro;
|
||||
$expand_hosts = read_graph_config_option("expand_hosts");
|
||||
@@ -522,6 +514,8 @@
|
||||
$dhtml_tree = $_SESSION['dhtml_tree'];
|
||||
}
|
||||
}
|
||||
+*/
|
||||
+ $dhtml_tree = create_dhtml_tree();
|
||||
|
||||
$total_tree_items = sizeof($dhtml_tree) - 1;
|
||||
|
||||
@@ -529,8 +523,31 @@
|
||||
print $dhtml_tree[$i];
|
||||
}
|
||||
?>
|
||||
- //-->
|
||||
- </script>
|
||||
+<script type="text/javascript">
|
||||
+$(function () {
|
||||
+ $("#jtree")
|
||||
+ .jstree({
|
||||
+ "plugins" : ["ui","themes","html_data","cookies"],
|
||||
+ "themes" : {"icons" : false,
|
||||
+ "url" : "<?php echo $config['url_path']; ?>include/js/jquery/themes/default/style.css"},
|
||||
+ "cookies" : {
|
||||
+ "save_opened" : "Cacti_jstree_open",
|
||||
+ "save_selected" : "Cacti_jstree_select"
|
||||
+ }
|
||||
+ })
|
||||
+
|
||||
+ // Make sure that the nodes are actually used as links
|
||||
+ // We need reselect to prevent endless loops
|
||||
+ // https://groups.google.com/d/topic/jstree/j6XNq9hQdeA/discussion
|
||||
+ .bind("reselect.jstree", function (e, data) {
|
||||
+ data.inst.get_container().bind("select_node.jstree", function (e, data) {
|
||||
+ // data.rstl.obj is the object that was selected.
|
||||
+ document.location.href = data.rslt.obj.children("a").attr("href");
|
||||
+ });
|
||||
+ });
|
||||
+
|
||||
+});
|
||||
+</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -543,9 +560,8 @@
|
||||
|
||||
$dhtml_tree[0] = $start;
|
||||
$dhtml_tree[1] = read_graph_config_option("expand_hosts");
|
||||
- $dhtml_tree[2] = "foldersTree = gFld(\"\", \"\")\n";
|
||||
- $dhtml_tree[3] = "foldersTree.xID = \"root\"\n";
|
||||
- $i = 3;
|
||||
+ $dhtml_tree[2] = "\n<div id=\"jtree\">\n";
|
||||
+ $i = 2;
|
||||
|
||||
$tree_list = get_graph_tree_array();
|
||||
|
||||
@@ -567,7 +583,6 @@
|
||||
|
||||
if (sizeof($tree_list) > 0) {
|
||||
foreach ($tree_list as $tree) {
|
||||
- $i++;
|
||||
$hierarchy = db_fetch_assoc("select
|
||||
graph_tree_items.id,
|
||||
graph_tree_items.title,
|
||||
@@ -583,21 +598,45 @@
|
||||
and graph_tree_items.local_graph_id = 0
|
||||
order by graph_tree_items.order_key");
|
||||
|
||||
- $dhtml_tree[$i] = "ou0 = insFld(foldersTree, gFld(\"" . htmlspecialchars($tree["name"]) . "\", \"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"]) . "\"))\n";
|
||||
$i++;
|
||||
- $dhtml_tree[$i] = "ou0.xID = \"tree_" . $tree["id"] . "\"\n";
|
||||
+ $dhtml_tree[$i] = "\t<ul>\n\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"]) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"]) . "\">" . htmlspecialchars($tree["name"]) . "</a>\n";
|
||||
|
||||
if (sizeof($hierarchy) > 0) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t<ul>\n";
|
||||
+ $last_tier = 1;
|
||||
+ $openli = false;
|
||||
+ $lasthost = false;
|
||||
foreach ($hierarchy as $leaf) {
|
||||
- $i++;
|
||||
$tier = tree_tier($leaf["order_key"]);
|
||||
|
||||
- if ($leaf["host_id"] > 0) {
|
||||
- $dhtml_tree[$i] = "ou" . ($tier) . " = insFld(ou" . abs(($tier-1)) . ", gFld(\"" . "Host: " . htmlspecialchars($leaf["hostname"]) . "\", \"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"]) . "\"))\n";
|
||||
+ if ($leaf["host_id"] > 0) { //It's a host
|
||||
+ if ($tier > $last_tier) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t<ul>\n";
|
||||
+ } elseif ($tier < $last_tier) {
|
||||
+ if (!$lasthost) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t</li>\n";
|
||||
+ }
|
||||
+ for ($x = $tier; $x < $last_tier; $x++) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t</ul>\n\t\t\t\t</li>\n";
|
||||
+ $openli = false;
|
||||
+ }
|
||||
+ } elseif ($openli && !$lasthost) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t</li>\n";
|
||||
+ $openli = false;
|
||||
+ }
|
||||
+ $last_tier = $tier;
|
||||
+ $lasthost = true;
|
||||
$i++;
|
||||
- $dhtml_tree[$i] = "ou" . ($tier) . ".xID = \"tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "\"\n";
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"] . "_leaf_" . $leaf["id"]) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"]) . "\">Host: " . htmlspecialchars($leaf["hostname"]) . "</a>\n";
|
||||
|
||||
if (read_graph_config_option("expand_hosts") == "on") {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t<ul>\n";
|
||||
if ($leaf["host_grouping_type"] == HOST_GROUPING_GRAPH_TEMPLATE) {
|
||||
$graph_templates = db_fetch_assoc("select
|
||||
graph_templates.id,
|
||||
@@ -612,9 +651,7 @@
|
||||
if (sizeof($graph_templates) > 0) {
|
||||
foreach ($graph_templates as $graph_template) {
|
||||
$i++;
|
||||
- $dhtml_tree[$i] = "ou" . ($tier+1) . " = insFld(ou" . ($tier) . ", gFld(\" " . htmlspecialchars($graph_template["name"]) . "\", \"graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=graph_template:" . $graph_template["id"] . "\"))\n";
|
||||
- $i++;
|
||||
- $dhtml_tree[$i] = "ou" . ($tier+1) . ".xID = \"tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_gt_" . $graph_template["id"] . "\"\n";
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_gt_" . $graph_template["id"]) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=graph_template:" . $graph_template["id"]) . "\">" . htmlspecialchars($graph_template["name"]) . "</a></li>\n";
|
||||
}
|
||||
}
|
||||
}else if ($leaf["host_grouping_type"] == HOST_GROUPING_DATA_QUERY_INDEX) {
|
||||
@@ -645,33 +682,71 @@
|
||||
if ((($data_query["id"] == 0) && ($non_template_graphs > 0)) ||
|
||||
(($data_query["id"] > 0) && (sizeof($sort_field_data) > 0))) {
|
||||
$i++;
|
||||
- $dhtml_tree[$i] = "ou" . ($tier+1) . " = insFld(ou" . ($tier) . ", gFld(\" " . htmlspecialchars($data_query["name"]) . "\", \"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=data_query:" . $data_query["id"]) . "\"))\n";
|
||||
- $i++;
|
||||
- $dhtml_tree[$i] = "ou" . ($tier+1) . ".xID = \"tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_dq_" . $data_query["id"] . "\"\n";
|
||||
-
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_dq_" . $data_query["id"]) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=data_query:" . $data_query["id"]) . "\">" . htmlspecialchars($data_query["name"]) . "</a>\n";
|
||||
if ($data_query["id"] > 0) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t<ul>\n";
|
||||
while (list($snmp_index, $sort_field_value) = each($sort_field_data)) {
|
||||
$i++;
|
||||
- $dhtml_tree[$i] = "ou" . ($tier+2) . " = insFld(ou" . ($tier+1) . ", gFld(\" " . htmlspecialchars($sort_field_value) . "\", \"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=data_query_index:" . $data_query["id"] . ":" . urlencode($snmp_index)) . "\"))\n";
|
||||
- $i++;
|
||||
- $dhtml_tree[$i] = "ou" . ($tier+2) . ".xID = \"tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_dqi" . $data_query["id"] . "_" . urlencode($snmp_index) . "\"\n";
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "_hgd_dqi" . $data_query["id"]) . "_" . urlencode($snmp_index) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"] . "&host_group_data=data_query_index:" . $data_query["id"] . ":" . urlencode($snmp_index)) . "\">" . htmlspecialchars($sort_field_value) . "</a></li>\n";
|
||||
}
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t\t</ul>\n";
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t</li>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t\t</li>\n";
|
||||
+ }
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t</ul>\n";
|
||||
+ }
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t</li>\n";
|
||||
+ }else{ //It's not a host
|
||||
+ if ($tier > $last_tier) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t<ul>\n";
|
||||
+ } elseif ($tier < $last_tier) {
|
||||
+ if (!$lasthost) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "</li>\n";
|
||||
}
|
||||
+ for ($x = $tier; $x < $last_tier; $x++) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t</ul>\n\t\t\t\t</li>\n";
|
||||
+ $openli = false;
|
||||
+ }
|
||||
+ } elseif ($openli && !$lasthost) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "</li>\n";
|
||||
+ $openli = false;
|
||||
}
|
||||
- }else{
|
||||
- $dhtml_tree[$i] = "ou" . ($tier) . " = insFld(ou" . abs(($tier-1)) . ", gFld(\"" . htmlspecialchars($leaf["title"]) . "\", \"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"]) . "\"))\n";
|
||||
+ $last_tier = $tier;
|
||||
$i++;
|
||||
- $dhtml_tree[$i] = "ou" . ($tier) . ".xID = \"tree_" . $tree["id"] . "_leaf_" . $leaf["id"] . "\"\n";
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t<li id=\"" . htmlspecialchars("tree_" . $tree["id"] . "_leaf_" . $leaf["id"]) . "\"><a href=\"" . htmlspecialchars("graph_view.php?action=tree&tree_id=" . $tree["id"] . "&leaf_id=" . $leaf["id"]) . "\">" . htmlspecialchars($leaf["title"]) . "</a>\n";
|
||||
+ $openli = true;
|
||||
+ $lasthost = false;
|
||||
}
|
||||
}
|
||||
+ for ($x = $last_tier; $x > 1; $x--) {
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t\t\t</ul>\n\t\t\t\t</li>\n";
|
||||
+ }
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t\t</ul>\n";
|
||||
}
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "\t\t</li>\n\t</ul>\n";
|
||||
}
|
||||
}
|
||||
|
||||
+ $i++;
|
||||
+ $dhtml_tree[$i] = "</div>\n";
|
||||
+
|
||||
return $dhtml_tree;
|
||||
}
|
||||
|
||||
@@ -758,14 +833,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- print "<script type=\"text/javascript\">\n";
|
||||
- print "<!--\n";
|
||||
- print "myNode = findObj(\"$nodeid\")\n";
|
||||
- print "myNode.forceOpeningOfAncestorFolders();\n";
|
||||
- print "highlightObjLink(myNode)\n";
|
||||
- print "//-->\n";
|
||||
- print "</script>";
|
||||
-
|
||||
/* ================= input validation ================= */
|
||||
input_validate_input_number(get_request_var_post("graphs"));
|
||||
input_validate_input_number(get_request_var_post("page"));
|
||||
@@ -1,19 +0,0 @@
|
||||
------------------------------------------------------------------------
|
||||
r7443 | rony | 2014-03-30 18:43:28 -0500 (Sun, 30 Mar 2014) | 2 lines
|
||||
|
||||
bug#0002431: CVE-2014-2326 Unspecified HTML Injection Vulnerability
|
||||
|
||||
------------------------------------------------------------------------
|
||||
Index: branches/0.8.8/cdef.php
|
||||
===================================================================
|
||||
--- branches/0.8.8/cdef.php (revision 7442)
|
||||
+++ branches/0.8.8/cdef.php (revision 7443)
|
||||
@@ -431,7 +431,7 @@
|
||||
<a class="linkEditMain" href="<?php print htmlspecialchars("cdef.php?action=item_edit&id=" . $cdef_item["id"] . "&cdef_id=" . $cdef["id"]);?>">Item #<?php print htmlspecialchars($i);?></a>
|
||||
</td>
|
||||
<td>
|
||||
- <em><?php $cdef_item_type = $cdef_item["type"]; print $cdef_item_types[$cdef_item_type];?></em>: <strong><?php print get_cdef_item_name($cdef_item["id"]);?></strong>
|
||||
+ <em><?php $cdef_item_type = $cdef_item["type"]; print $cdef_item_types[$cdef_item_type];?></em>: <strong><?php print htmlspecialchars(get_cdef_item_name($cdef_item["id"]));?></strong>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php print htmlspecialchars("cdef.php?action=item_movedown&id=" . $cdef_item["id"] . "&cdef_id=" . $cdef["id"]);?>"><img src="images/move_down.gif" border="0" alt="Move Down"></a>
|
||||
@@ -1,28 +0,0 @@
|
||||
------------------------------------------------------------------------
|
||||
r7442 | rony | 2014-03-30 18:41:56 -0500 (Sun, 30 Mar 2014) | 2 lines
|
||||
|
||||
bug#0002433: CVE-2014-2328 Unspecified Remote Command Execution Vulnerability
|
||||
|
||||
------------------------------------------------------------------------
|
||||
Index: branches/0.8.8/lib/graph_export.php
|
||||
===================================================================
|
||||
--- branches/0.8.8/lib/graph_export.php (revision 7441)
|
||||
+++ branches/0.8.8/lib/graph_export.php (revision 7442)
|
||||
@@ -339,7 +339,7 @@
|
||||
chdir($stExportDir);
|
||||
|
||||
/* set the initial command structure */
|
||||
- $stExecute = 'ncftpput -R -V -r 1 -u '.$aFtpExport['username'].' -p '.$aFtpExport['password'];
|
||||
+ $stExecute = 'ncftpput -R -V -r 1 -u ' . cacti_escapeshellarg($aFtpExport['username']) . ' -p ' . cacti_escapeshellarg($aFtpExport['password']);
|
||||
|
||||
/* if the user requested passive mode, use it */
|
||||
if ($aFtpExport['passive']) {
|
||||
@@ -347,7 +347,7 @@
|
||||
}
|
||||
|
||||
/* setup the port, server, remote directory and all files */
|
||||
- $stExecute .= ' -P ' . $aFtpExport['port'] . ' ' . $aFtpExport['server'] . ' ' . $aFtpExport['remotedir'] . ".";
|
||||
+ $stExecute .= ' -P ' . cacti_escapeshellarg($aFtpExport['port']) . ' ' . cacti_escapeshellarg($aFtpExport['server']) . ' ' . cacti_escapeshellarg($aFtpExport['remotedir']) . ".";
|
||||
|
||||
/* run the command */
|
||||
$iExecuteReturns = 0;
|
||||
@@ -1,42 +0,0 @@
|
||||
------------------------------------------------------------------------
|
||||
r7418 | gandalf | 2013-08-13 13:32:49 -0600 (Tue, 13 Aug 2013) | 1 line
|
||||
|
||||
fix COMMENT handling, even in case COMMENT is empty, with or without HR and with variable substitution
|
||||
------------------------------------------------------------------------
|
||||
Index: branches/0.8.8/lib/rrd.php
|
||||
===================================================================
|
||||
--- branches/0.8.8/lib/rrd.php (revision 7417)
|
||||
+++ branches/0.8.8/lib/rrd.php (revision 7418)
|
||||
@@ -1343,20 +1343,20 @@
|
||||
$need_rrd_nl = TRUE;
|
||||
|
||||
if ($graph_item_types{$graph_item["graph_type_id"]} == "COMMENT") {
|
||||
+ # perform variable substitution first (in case this will yield an empty results or brings command injection problems)
|
||||
+ $comment_arg = rrd_substitute_host_query_data($graph_variables["text_format"][$graph_item_id], $graph, $graph_item);
|
||||
+ # next, compute the argument of the COMMENT statement and perform injection counter measures
|
||||
+ if (trim($comment_arg) == '') { # an empty COMMENT must be treated with care
|
||||
+ $comment_arg = cacti_escapeshellarg(' ' . $hardreturn[$graph_item_id]);
|
||||
+ } else {
|
||||
+ $comment_arg = cacti_escapeshellarg($comment_arg . $hardreturn[$graph_item_id]);
|
||||
+ }
|
||||
+
|
||||
+ # create rrdtool specific command line
|
||||
if (read_config_option("rrdtool_version") != "rrd-1.0.x") {
|
||||
- $comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":" . str_replace(":", "\:", cacti_escapeshellarg($graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id])) . " ";
|
||||
- if (trim($comment_string) == 'COMMENT:"\n"') {
|
||||
- $txt_graph_items .= 'COMMENT:" \n"'; # rrdtool will skip a COMMENT that holds a NL only; so add a blank to make NL work
|
||||
- } else if (trim($comment_string) != "COMMENT:\"\"") {
|
||||
- $txt_graph_items .= rrd_substitute_host_query_data($comment_string, $graph, $graph_item);
|
||||
- }
|
||||
+ $txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":" . str_replace(":", "\:", $comment_arg) . " ";
|
||||
}else {
|
||||
- $comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":" . cacti_escapeshellarg($graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id]) . " ";
|
||||
- if (trim($comment_string) == 'COMMENT:"\n"') {
|
||||
- $txt_graph_items .= 'COMMENT:" \n"'; # rrdtool will skip a COMMENT that holds a NL only; so add a blank to make NL work
|
||||
- } else if (trim($comment_string) != "COMMENT:\"\"") {
|
||||
- $txt_graph_items .= rrd_substitute_host_query_data($comment_string, $graph, $graph_item);
|
||||
- }
|
||||
+ $txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":" . $comment_arg . " ";
|
||||
}
|
||||
}elseif (($graph_item_types{$graph_item["graph_type_id"]} == "GPRINT") && (!isset($graph_data_array["graph_nolegend"]))) {
|
||||
$graph_variables["text_format"][$graph_item_id] = str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]); /* escape colons */
|
||||
@@ -1,155 +0,0 @@
|
||||
------------------------------------------------------------------------
|
||||
r7420 | cigamit | 2013-08-17 21:41:24 -0600 (Sat, 17 Aug 2013) | 1 line
|
||||
|
||||
Bug #0002383 : Sanitize the step and id variables
|
||||
------------------------------------------------------------------------
|
||||
Index: branches/0.8.8/host.php
|
||||
===================================================================
|
||||
--- branches/0.8.8/host.php (revision 7419)
|
||||
+++ branches/0.8.8/host.php (revision 7420)
|
||||
@@ -149,6 +149,9 @@
|
||||
if ($_POST["snmp_version"] == 3 && ($_POST["snmp_password"] != $_POST["snmp_password_confirm"])) {
|
||||
raise_message(4);
|
||||
}else{
|
||||
+ input_validate_input_number(get_request_var_post("id"));
|
||||
+ input_validate_input_number(get_request_var_post("host_template_id"));
|
||||
+
|
||||
$host_id = api_device_save($_POST["id"], $_POST["host_template_id"], $_POST["description"],
|
||||
trim($_POST["hostname"]), $_POST["snmp_community"], $_POST["snmp_version"],
|
||||
$_POST["snmp_username"], $_POST["snmp_password"],
|
||||
Index: branches/0.8.8/lib/api_device.php
|
||||
===================================================================
|
||||
--- branches/0.8.8/lib/api_device.php (revision 7419)
|
||||
+++ branches/0.8.8/lib/api_device.php (revision 7420)
|
||||
@@ -107,7 +107,7 @@
|
||||
$_host_template_id = db_fetch_cell("select host_template_id from host where id=$id");
|
||||
}
|
||||
|
||||
- $save["id"] = $id;
|
||||
+ $save["id"] = form_input_validate($id, "id", "^[0-9]+$", false, 3);
|
||||
$save["host_template_id"] = form_input_validate($host_template_id, "host_template_id", "^[0-9]+$", false, 3);
|
||||
$save["description"] = form_input_validate($description, "description", "", false, 3);
|
||||
$save["hostname"] = form_input_validate(trim($hostname), "hostname", "", false, 3);
|
||||
Index: branches/0.8.8/install/index.php
|
||||
===================================================================
|
||||
--- branches/0.8.8/install/index.php (revision 7419)
|
||||
+++ branches/0.8.8/install/index.php (revision 7420)
|
||||
@@ -310,27 +310,28 @@
|
||||
}
|
||||
|
||||
/* pre-processing that needs to be done for each step */
|
||||
-if (empty($_REQUEST["step"])) {
|
||||
- $_REQUEST["step"] = 1;
|
||||
-}else{
|
||||
- if ($_REQUEST["step"] == "1") {
|
||||
- $_REQUEST["step"] = "2";
|
||||
- }elseif (($_REQUEST["step"] == "2") && ($_REQUEST["install_type"] == "1")) {
|
||||
- $_REQUEST["step"] = "3";
|
||||
- }elseif (($_REQUEST["step"] == "2") && ($_REQUEST["install_type"] == "3")) {
|
||||
- $_REQUEST["step"] = "8";
|
||||
- }elseif (($_REQUEST["step"] == "8") && ($old_version_index <= array_search("0.8.5a", $cacti_versions))) {
|
||||
- $_REQUEST["step"] = "9";
|
||||
- }elseif ($_REQUEST["step"] == "8") {
|
||||
- $_REQUEST["step"] = "3";
|
||||
- }elseif ($_REQUEST["step"] == "9") {
|
||||
- $_REQUEST["step"] = "3";
|
||||
- }elseif ($_REQUEST["step"] == "3") {
|
||||
- $_REQUEST["step"] = "4";
|
||||
+if (isset($_REQUEST["step"]) && $_REQUEST["step"] > 0) {
|
||||
+ $step = intval($_REQUEST["step"]);
|
||||
+ if ($step == "1") {
|
||||
+ $step = "2";
|
||||
+ } elseif (($step == "2") && ($_REQUEST["install_type"] == "1")) {
|
||||
+ $step = "3";
|
||||
+ } elseif (($step == "2") && ($_REQUEST["install_type"] == "3")) {
|
||||
+ $step = "8";
|
||||
+ } elseif (($step == "8") && ($old_version_index <= array_search("0.8.5a", $cacti_versions))) {
|
||||
+ $step = "9";
|
||||
+ } elseif ($step == "8") {
|
||||
+ $step = "3";
|
||||
+ } elseif ($step == "9") {
|
||||
+ $step = "3";
|
||||
+ } elseif ($step == "3") {
|
||||
+ $step = "4";
|
||||
}
|
||||
+} else {
|
||||
+ $step = 1;
|
||||
}
|
||||
|
||||
-if ($_REQUEST["step"] == "4") {
|
||||
+if ($step == "4") {
|
||||
include_once("../lib/data_query.php");
|
||||
include_once("../lib/utility.php");
|
||||
|
||||
@@ -366,7 +367,7 @@
|
||||
|
||||
header ("Location: ../index.php");
|
||||
exit;
|
||||
-}elseif (($_REQUEST["step"] == "8") && ($_REQUEST["install_type"] == "3")) {
|
||||
+}elseif (($step == "8") && ($_REQUEST["install_type"] == "3")) {
|
||||
/* if the version is not found, die */
|
||||
if (!is_int($old_version_index)) {
|
||||
print " <p style='font-family: Verdana, Arial; font-size: 16px; font-weight: bold; color: red;'>Error</p>
|
||||
@@ -505,7 +506,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%" style="font-size: 12px;">
|
||||
- <?php if ($_REQUEST["step"] == "1") { ?>
|
||||
+ <?php if ($step == "1") { ?>
|
||||
|
||||
<p>Thanks for taking the time to download and install cacti, the complete graphing
|
||||
solution for your network. Before you can start making cool graphs, there are a few
|
||||
@@ -530,7 +531,7 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.</p>
|
||||
|
||||
- <?php }elseif ($_REQUEST["step"] == "2") { ?>
|
||||
+ <?php }elseif ($step == "2") { ?>
|
||||
|
||||
<p>Please select the type of installation</p>
|
||||
|
||||
@@ -551,7 +552,7 @@
|
||||
print "Server Operating System Type: " . $config["cacti_server_os"] . "<br>"; ?>
|
||||
</p>
|
||||
|
||||
- <?php }elseif ($_REQUEST["step"] == "3") { ?>
|
||||
+ <?php }elseif ($step == "3") { ?>
|
||||
|
||||
<p>Make sure all of these values are correct before continuing.</p>
|
||||
<?php
|
||||
@@ -609,7 +610,7 @@
|
||||
is an upgrade. You can change any of the settings on this screen at a later
|
||||
time by going to "Cacti Settings" from within Cacti.</p>
|
||||
|
||||
- <?php }elseif ($_REQUEST["step"] == "8") { ?>
|
||||
+ <?php }elseif ($step == "8") { ?>
|
||||
|
||||
<p>Upgrade results:</p>
|
||||
|
||||
@@ -659,7 +660,7 @@
|
||||
print $upgrade_results;
|
||||
?>
|
||||
|
||||
- <?php }elseif ($_REQUEST["step"] == "9") { ?>
|
||||
+ <?php }elseif ($step == "9") { ?>
|
||||
|
||||
<p style='font-size: 16px; font-weight: bold; color: red;'>Important Upgrade Notice</p>
|
||||
|
||||
@@ -673,7 +674,7 @@
|
||||
|
||||
<?php }?>
|
||||
|
||||
- <p align="right"><input type="image" src="install_<?php if ($_REQUEST["step"] == "3") {?>finish<?php }else{?>next<?php }?>.gif" alt="<?php if ($_REQUEST["step"] == "3"){?>Finish<?php }else{?>Next<?php }?>"></p>
|
||||
+ <p align="right"><input type="image" src="install_<?php if ($step == "3") {?>finish<?php }else{?>next<?php }?>.gif" alt="<?php if ($step == "3"){?>Finish<?php }else{?>Next<?php }?>"></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -681,7 +682,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
-<input type="hidden" name="step" value="<?php print $_REQUEST["step"];?>">
|
||||
+<input type="hidden" name="step" value="<?php print $step;?>">
|
||||
|
||||
</form>
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
------------------------------------------------------------------------
|
||||
r7439 | rony | 2014-03-30 17:52:10 -0500 (Sun, 30 Mar 2014) | 5 lines
|
||||
|
||||
bug#0002405: SQL injection in graph_xport.php
|
||||
|
||||
- Fixed form input validation problems
|
||||
- Fixed rrd export and graph shell escape issues
|
||||
|
||||
------------------------------------------------------------------------
|
||||
Index: branches/0.8.8/graph_xport.php
|
||||
===================================================================
|
||||
--- branches/0.8.8/graph_xport.php (revision 7438)
|
||||
+++ branches/0.8.8/graph_xport.php (revision 7439)
|
||||
@@ -47,43 +47,48 @@
|
||||
|
||||
$graph_data_array = array();
|
||||
|
||||
+/* ================= input validation ================= */
|
||||
+input_validate_input_number(get_request_var("local_graph_id"));
|
||||
+input_validate_input_number(get_request_var("rra_id"));
|
||||
+/* ==================================================== */
|
||||
+
|
||||
/* override: graph start time (unix time) */
|
||||
-if (!empty($_GET["graph_start"]) && $_GET["graph_start"] < 1600000000) {
|
||||
- $graph_data_array["graph_start"] = $_GET["graph_start"];
|
||||
+if (!empty($_GET["graph_start"]) && is_numeric($_GET["graph_start"] && $_GET["graph_start"] < 1600000000)) {
|
||||
+ $graph_data_array["graph_start"] = get_request_var("graph_start");
|
||||
}
|
||||
|
||||
/* override: graph end time (unix time) */
|
||||
-if (!empty($_GET["graph_end"]) && $_GET["graph_end"] < 1600000000) {
|
||||
- $graph_data_array["graph_end"] = $_GET["graph_end"];
|
||||
+if (!empty($_GET["graph_end"]) && is_numeric($_GET["graph_end"]) && $_GET["graph_end"] < 1600000000) {
|
||||
+ $graph_data_array["graph_end"] = get_request_var("graph_end");
|
||||
}
|
||||
|
||||
/* override: graph height (in pixels) */
|
||||
-if (!empty($_GET["graph_height"]) && $_GET["graph_height"] < 3000) {
|
||||
- $graph_data_array["graph_height"] = $_GET["graph_height"];
|
||||
+if (!empty($_GET["graph_height"]) && is_numeric($_GET["graph_height"]) && $_GET["graph_height"] < 3000) {
|
||||
+ $graph_data_array["graph_height"] = get_request_var("graph_height");
|
||||
}
|
||||
|
||||
/* override: graph width (in pixels) */
|
||||
-if (!empty($_GET["graph_width"]) && $_GET["graph_width"] < 3000) {
|
||||
- $graph_data_array["graph_width"] = $_GET["graph_width"];
|
||||
+if (!empty($_GET["graph_width"]) && is_numeric($_GET["graph_width"]) && $_GET["graph_width"] < 3000) {
|
||||
+ $graph_data_array["graph_width"] = get_request_var("graph_width");
|
||||
}
|
||||
|
||||
/* override: skip drawing the legend? */
|
||||
if (!empty($_GET["graph_nolegend"])) {
|
||||
- $graph_data_array["graph_nolegend"] = $_GET["graph_nolegend"];
|
||||
+ $graph_data_array["graph_nolegend"] = get_request_var("graph_nolegend");
|
||||
}
|
||||
|
||||
/* print RRDTool graph source? */
|
||||
if (!empty($_GET["show_source"])) {
|
||||
- $graph_data_array["print_source"] = $_GET["show_source"];
|
||||
+ $graph_data_array["print_source"] = get_request_var("show_source");
|
||||
}
|
||||
|
||||
-$graph_info = db_fetch_row("SELECT * FROM graph_templates_graph WHERE local_graph_id='" . $_REQUEST["local_graph_id"] . "'");
|
||||
+$graph_info = db_fetch_row("SELECT * FROM graph_templates_graph WHERE local_graph_id='" . get_request_var("local_graph_id") . "'");
|
||||
|
||||
/* for bandwidth, NThPercentile */
|
||||
$xport_meta = array();
|
||||
|
||||
/* Get graph export */
|
||||
-$xport_array = @rrdtool_function_xport($_GET["local_graph_id"], $_GET["rra_id"], $graph_data_array, $xport_meta);
|
||||
+$xport_array = @rrdtool_function_xport($_GET["local_graph_id"], get_request_var("rra_id"), $graph_data_array, $xport_meta);
|
||||
|
||||
/* Make graph title the suggested file name */
|
||||
if (is_array($xport_array["meta"])) {
|
||||
Index: branches/0.8.8/lib/rrd.php
|
||||
===================================================================
|
||||
--- branches/0.8.8/lib/rrd.php (revision 7438)
|
||||
+++ branches/0.8.8/lib/rrd.php (revision 7439)
|
||||
@@ -865,13 +865,13 @@
|
||||
/* basic graph options */
|
||||
$graph_opts .=
|
||||
"--imgformat=" . $image_types{$graph["image_format_id"]} . RRD_NL .
|
||||
- "--start=$graph_start" . RRD_NL .
|
||||
- "--end=$graph_end" . RRD_NL .
|
||||
+ "--start=" . cacti_escapeshellarg($graph_start) . RRD_NL .
|
||||
+ "--end=" . cacti_escapeshellarg($graph_end) . RRD_NL .
|
||||
"--title=" . cacti_escapeshellarg($graph["title_cache"]) . RRD_NL .
|
||||
"$rigid" .
|
||||
- "--base=" . $graph["base_value"] . RRD_NL .
|
||||
- "--height=$graph_height" . RRD_NL .
|
||||
- "--width=$graph_width" . RRD_NL .
|
||||
+ "--base=" . cacti_escapeshellarg($graph["base_value"]) . RRD_NL .
|
||||
+ "--height=" . cacti_escapeshellarg($graph_height) . RRD_NL .
|
||||
+ "--width=" . cacti_escapeshellarg($graph_width) . RRD_NL .
|
||||
"$scale" .
|
||||
"$unit_value" .
|
||||
"$unit_exponent_value" .
|
||||
@@ -1606,8 +1606,8 @@
|
||||
|
||||
/* basic export options */
|
||||
$xport_opts =
|
||||
- "--start=$xport_start" . RRD_NL .
|
||||
- "--end=$xport_end" . RRD_NL .
|
||||
+ "--start=" . cacti_escapeshellarg($xport_start) . RRD_NL .
|
||||
+ "--end=" . cacti_escapeshellarg($xport_end) . RRD_NL .
|
||||
"--maxrows=10000" . RRD_NL;
|
||||
|
||||
$xport_defs = "";
|
||||
@@ -1997,7 +1997,7 @@
|
||||
$stacked_columns["col" . $j] = ($graph_item_types{$xport_item["graph_type_id"]} == "STACK") ? 1 : 0;
|
||||
$j++;
|
||||
|
||||
- $txt_xport_items .= "XPORT:" . $data_source_name . ":" . str_replace(":", "", cacti_escapeshellarg($legend_name)) ;
|
||||
+ $txt_xport_items .= "XPORT:" . cacti_escapeshellarg($data_source_name) . ":" . str_replace(":", "", cacti_escapeshellarg($legend_name)) ;
|
||||
}else{
|
||||
$need_rrd_nl = FALSE;
|
||||
}
|
||||
Reference in New Issue
Block a user