diff --git a/graphs_new.php b/graphs_new.php index 73111a8e22..4048a753f2 100644 --- a/graphs_new.php +++ b/graphs_new.php @@ -36,11 +36,6 @@ switch ($_REQUEST["action"]) { case 'save': form_save(); - break; - case 'query_remove': - host_remove_query(); - - header("Location: graphs_new.php?host_id=" . $_GET["host_id"]); break; case 'query_reload': host_reload_query(); @@ -122,11 +117,6 @@ function host_reload_query() { data_query($_GET["host_id"], $_GET["id"]); } -function host_remove_query() { - db_execute("delete from host_snmp_cache where snmp_query_id=" . $_GET["id"] . " and host_id=" . $_GET["host_id"]); - db_execute("delete from host_snmp_query where snmp_query_id=" . $_GET["id"] . " and host_id=" . $_GET["host_id"]); -} - /* ------------------- New Graph Functions ------------------- */ @@ -542,71 +532,62 @@ function graphs() {
Host Template [" . db_fetch_cell("select name from host_template where id=" . $host["host_template_id"]) . "]", "98%", $colors["header"], "3", "center", ""); - - print " - Graph Template Name - \n - \n"; - - $graph_templates = db_fetch_assoc("select - graph_templates.id as graph_template_id, - graph_templates.name as graph_template_name - from host_template_graph, graph_templates - where host_template_graph.graph_template_id=graph_templates.id - and host_template_graph.host_template_id=" . $host["host_template_id"] . " - order by graph_templates.name"); - - $i = 0; - - $template_graphs = db_fetch_assoc("select graph_local.graph_template_id from graph_local,host_template_graph where graph_local.graph_template_id=host_template_graph.graph_template_id and graph_local.host_id=" . $host["id"] . " group by graph_local.graph_template_id"); - - print "\n"; - - /* create a row for each graph template associated with the host template */ - if (sizeof($graph_templates) > 0) { - foreach ($graph_templates as $graph_template) { - $query_row = $graph_template["graph_template_id"]; - print ""; $i++; + print ")\n"; + print "//-->\n\n"; - print " - Create: " . $graph_template["graph_template_name"] . " - - "; - form_checkbox("cg_" . $graph_template["graph_template_id"],"","","",0); - print " - "; + /* create a row for each graph template associated with the host template */ + if (sizeof($graph_templates) > 0) { + foreach ($graph_templates as $graph_template) { + $query_row = $graph_template["graph_template_id"]; + + print ""; $i++; + + print " + Create: " . $graph_template["graph_template_name"] . " + + "; + form_checkbox("cg_" . $graph_template["graph_template_id"],"","","",0); + print " + "; + } + } + + print "\n"; + + end_box(); } - } - - print "\n"; - - /* create a row at the bottom that lets the user create any graph they choose */ - //print " - // - // Create: "; - // form_dropdown("cg_g", db_fetch_assoc("select id,name from graph_templates order by name"), "name", "id", "", "", ""); - //print " - // "; - // form_checkbox("ccg","","","",0); - //print " - // "; - - end_box(); $snmp_queries = db_fetch_assoc("select snmp_query.id, @@ -684,8 +665,7 @@ function graphs() { Data Query [" . $snmp_query["name"] . "] - Reload Associated Query  - Delete Associated Query + Reload Associated Query