{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":"cache","path":"cache","contentType":"directory"},{"name":"cli","path":"cli","contentType":"directory"},{"name":"contrib","path":"contrib","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"formats","path":"formats","contentType":"directory"},{"name":"images","path":"images","contentType":"directory"},{"name":"include","path":"include","contentType":"directory"},{"name":"install","path":"install","contentType":"directory"},{"name":"lib","path":"lib","contentType":"directory"},{"name":"locales","path":"locales","contentType":"directory"},{"name":"log","path":"log","contentType":"directory"},{"name":"mibs","path":"mibs","contentType":"directory"},{"name":"plugins","path":"plugins","contentType":"directory"},{"name":"resource","path":"resource","contentType":"directory"},{"name":"rra","path":"rra","contentType":"directory"},{"name":"scripts","path":"scripts","contentType":"directory"},{"name":"service","path":"service","contentType":"directory"},{"name":"tests","path":"tests","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".mdl_style.rb","path":".mdl_style.rb","contentType":"file"},{"name":".mdlrc","path":".mdlrc","contentType":"file"},{"name":"CHANGELOG","path":"CHANGELOG","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"about.php","path":"about.php","contentType":"file"},{"name":"aggregate_graphs.php","path":"aggregate_graphs.php","contentType":"file"},{"name":"aggregate_templates.php","path":"aggregate_templates.php","contentType":"file"},{"name":"auth_changepassword.php","path":"auth_changepassword.php","contentType":"file"},{"name":"auth_login.php","path":"auth_login.php","contentType":"file"},{"name":"auth_profile.php","path":"auth_profile.php","contentType":"file"},{"name":"automation_devices.php","path":"automation_devices.php","contentType":"file"},{"name":"automation_graph_rules.php","path":"automation_graph_rules.php","contentType":"file"},{"name":"automation_networks.php","path":"automation_networks.php","contentType":"file"},{"name":"automation_snmp.php","path":"automation_snmp.php","contentType":"file"},{"name":"automation_templates.php","path":"automation_templates.php","contentType":"file"},{"name":"automation_tree_rules.php","path":"automation_tree_rules.php","contentType":"file"},{"name":"cacti.sql","path":"cacti.sql","contentType":"file"},{"name":"cactid.php","path":"cactid.php","contentType":"file"},{"name":"cdef.php","path":"cdef.php","contentType":"file"},{"name":"clog.php","path":"clog.php","contentType":"file"},{"name":"clog_user.php","path":"clog_user.php","contentType":"file"},{"name":"cmd.php","path":"cmd.php","contentType":"file"},{"name":"cmd_realtime.php","path":"cmd_realtime.php","contentType":"file"},{"name":"color.php","path":"color.php","contentType":"file"},{"name":"color_templates.php","path":"color_templates.php","contentType":"file"},{"name":"color_templates_items.php","path":"color_templates_items.php","contentType":"file"},{"name":"data_debug.php","path":"data_debug.php","contentType":"file"},{"name":"data_input.php","path":"data_input.php","contentType":"file"},{"name":"data_queries.php","path":"data_queries.php","contentType":"file"},{"name":"data_source_profiles.php","path":"data_source_profiles.php","contentType":"file"},{"name":"data_sources.php","path":"data_sources.php","contentType":"file"},{"name":"data_templates.php","path":"data_templates.php","contentType":"file"},{"name":"gprint_presets.php","path":"gprint_presets.php","contentType":"file"},{"name":"graph.php","path":"graph.php","contentType":"file"},{"name":"graph_image.php","path":"graph_image.php","contentType":"file"},{"name":"graph_json.php","path":"graph_json.php","contentType":"file"},{"name":"graph_realtime.php","path":"graph_realtime.php","contentType":"file"},{"name":"graph_templates.php","path":"graph_templates.php","contentType":"file"},{"name":"graph_templates_inputs.php","path":"graph_templates_inputs.php","contentType":"file"},{"name":"graph_templates_items.php","path":"graph_templates_items.php","contentType":"file"},{"name":"graph_view.php","path":"graph_view.php","contentType":"file"},{"name":"graph_xport.php","path":"graph_xport.php","contentType":"file"},{"name":"graphs.php","path":"graphs.php","contentType":"file"},{"name":"graphs_items.php","path":"graphs_items.php","contentType":"file"},{"name":"graphs_new.php","path":"graphs_new.php","contentType":"file"},{"name":"help.php","path":"help.php","contentType":"file"},{"name":"host.php","path":"host.php","contentType":"file"},{"name":"host_templates.php","path":"host_templates.php","contentType":"file"},{"name":"index.php","path":"index.php","contentType":"file"},{"name":"link.php","path":"link.php","contentType":"file"},{"name":"links.php","path":"links.php","contentType":"file"},{"name":"logout.php","path":"logout.php","contentType":"file"},{"name":"managers.php","path":"managers.php","contentType":"file"},{"name":"package_import.php","path":"package_import.php","contentType":"file"},{"name":"permission_denied.php","path":"permission_denied.php","contentType":"file"},{"name":"plugins.php","path":"plugins.php","contentType":"file"},{"name":"poller.php","path":"poller.php","contentType":"file"},{"name":"poller_automation.php","path":"poller_automation.php","contentType":"file"},{"name":"poller_boost.php","path":"poller_boost.php","contentType":"file"},{"name":"poller_commands.php","path":"poller_commands.php","contentType":"file"},{"name":"poller_dsstats.php","path":"poller_dsstats.php","contentType":"file"},{"name":"poller_maintenance.php","path":"poller_maintenance.php","contentType":"file"},{"name":"poller_realtime.php","path":"poller_realtime.php","contentType":"file"},{"name":"poller_recovery.php","path":"poller_recovery.php","contentType":"file"},{"name":"poller_reports.php","path":"poller_reports.php","contentType":"file"},{"name":"poller_rrdcheck.php","path":"poller_rrdcheck.php","contentType":"file"},{"name":"poller_spikekill.php","path":"poller_spikekill.php","contentType":"file"},{"name":"pollers.php","path":"pollers.php","contentType":"file"},{"name":"remote_agent.php","path":"remote_agent.php","contentType":"file"},{"name":"reports_admin.php","path":"reports_admin.php","contentType":"file"},{"name":"reports_user.php","path":"reports_user.php","contentType":"file"},{"name":"rrdcheck.php","path":"rrdcheck.php","contentType":"file"},{"name":"rrdcleaner.php","path":"rrdcleaner.php","contentType":"file"},{"name":"script_server.php","path":"script_server.php","contentType":"file"},{"name":"service_check.php","path":"service_check.php","contentType":"file"},{"name":"settings.php","path":"settings.php","contentType":"file"},{"name":"sites.php","path":"sites.php","contentType":"file"},{"name":"snmpagent_mibcache.php","path":"snmpagent_mibcache.php","contentType":"file"},{"name":"snmpagent_mibcachechild.php","path":"snmpagent_mibcachechild.php","contentType":"file"},{"name":"snmpagent_persist.php","path":"snmpagent_persist.php","contentType":"file"},{"name":"spikekill.php","path":"spikekill.php","contentType":"file"},{"name":"templates_export.php","path":"templates_export.php","contentType":"file"},{"name":"templates_import.php","path":"templates_import.php","contentType":"file"},{"name":"tree.php","path":"tree.php","contentType":"file"},{"name":"user_admin.php","path":"user_admin.php","contentType":"file"},{"name":"user_domains.php","path":"user_domains.php","contentType":"file"},{"name":"user_group_admin.php","path":"user_group_admin.php","contentType":"file"},{"name":"utilities.php","path":"utilities.php","contentType":"file"},{"name":"vdef.php","path":"vdef.php","contentType":"file"}],"totalCount":110}},"fileTreeProcessingTime":4.267489,"foldersToFetch":[],"repo":{"id":29455529,"defaultBranch":"develop","name":"cacti","ownerLogin":"Cacti","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2015-01-19T05:36:15.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/5142645?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"1.2.x","listCacheKey":"v0:1703383646.0","canEdit":false,"refType":"branch","currentOid":"bd56b5624b275f26021f93001e50b202336466d6"},"path":"automation_templates.php","currentUser":null,"blob":{"rawLines":[" __('Delete')",");","","/* set default action */","set_default_action();","","switch (get_request_var('action')) {","\tcase 'save':","\t\tform_save();","","\t\tbreak;","\tcase 'ajax_dnd':","\t\tautomation_template_dnd();","","\t\tbreak;","\tcase 'actions':","\t\tform_actions();","","\t\tbreak;"," case 'movedown':"," automation_movedown();",""," header('Location: automation_templates.php?header=false');","\t\tbreak;"," case 'moveup':"," automation_moveup();",""," header('Location: automation_templates.php?header=false');","\t\tbreak;"," case 'remove':"," automation_remove();",""," header('Location: automation_templates.php?header=false');","\t\tbreak;","\tcase 'edit':","\t\ttop_header();","\t\ttemplate_edit();","\t\tbottom_footer();","\t\tbreak;","\tdefault:","\t\ttop_header();","\t\ttemplate();","\t\tbottom_footer();","\t\tbreak;","}","","function automation_template_dnd() {","\t/* ================= Input validation ================= */","\tget_filter_request_var('id');","\t/* ================= Input validation ================= */","","\tif (isset_request_var('template_ids') && is_array(get_nfilter_request_var('template_ids'))) {","\t\t$aids = get_nfilter_request_var('template_ids');","\t\t$sequence = 1;","","\t\tforeach($aids as $id) {","\t\t\t$id = str_replace('line', '', $id);","\t\t\tinput_validate_input_number($id);","","\t\t\tdb_execute_prepared('UPDATE automation_templates","\t\t\t\tSET sequence = ?","\t\t\t\tWHERE id = ?',","\t\t\t\tarray($sequence, $id));","","\t\t\t$sequence++;","\t\t}","\t}","","\theader('Location: automation_templates.php?header=false');","\texit;","}","","function automation_movedown() {","\tmove_item_down('automation_templates', get_filter_request_var('id'));","}","","function automation_moveup() {","\tmove_item_up('automation_templates', get_filter_request_var('id'));","}","","function automation_remove() {","\tdb_execute_prepared('DELETE FROM automation_templates WHERE id = ?', array(get_filter_request_var('id')));","}","","","function form_actions() {","\tglobal $at_actions;","","\t/* ================= input validation ================= */","\tget_filter_request_var('drp_action', FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => '/^([a-zA-Z0-9_]+)$/')));","\t/* ==================================================== */","","\t/* if we are to save this form, instead of display it */","\tif (isset_request_var('selected_items')) {","\t\t$selected_items = sanitize_unserialize_selected_items(get_nfilter_request_var('selected_items'));","","\t\tif ($selected_items != false) {","\t\t\tif (get_nfilter_request_var('drp_action') == '1') { /* delete */","\t\t\t\tdb_execute('DELETE FROM automation_templates WHERE ' . array_to_sql_or($selected_items, 'id'));","\t\t\t}","\t\t}","","\t\theader('Location: automation_templates.php?header=false');","\t\texit;","\t}","","\t/* setup some variables */","\t$at_list = ''; $i = 0;","","\tforeach ($_POST as $var => $val) {","\t\tif (preg_match('/^chk_([0-9]+)$/', $var, $matches)) {","\t\t\t/* ================= input validation ================= */","\t\t\tinput_validate_input_number($matches[1]);","\t\t\t/* ==================================================== */","","\t\t\t$at_list .= '
\" . __('Click \\'Continue\\' to delete the following Automation Template(s).') . \"
","\t\t\t\t\t