function get_graph_title($local_graph_id) { $graph = db_fetch_row("select graph_local.host_id, graph_local.snmp_query_id, graph_local.snmp_index, graph_templates_graph.title from (graph_templates_graph,graph_local) where graph_templates_graph.local_graph_id=graph_local.id and graph_local.id=$local_graph_id"); if ((strstr($graph["title"], "|")) && (!empty($graph["host_id"]))) { return expand_title($graph["host_id"], $graph["snmp_query_id"], $graph["snmp_index"], $graph["title"]); }else{ return $graph["title"]; } }
function get_graph_title($local_graph_id) { $graph = db_fetch_row("select\n\t\tgraph_local.host_id,\n\t\tgraph_local.snmp_query_id,\n\t\tgraph_local.snmp_index,\n\t\tgraph_templates_graph.title\n\t\tfrom (graph_templates_graph,graph_local)\n\t\twhere graph_templates_graph.local_graph_id=graph_local.id\n\t\tand graph_local.id={$local_graph_id}"); if (strstr($graph["title"], "|") && !empty($graph["host_id"])) { return expand_title($graph["host_id"], $graph["snmp_query_id"], $graph["snmp_index"], $graph["title"]); } else { return $graph["title"]; } }
function thold_format_name($template, $local_graph_id, $local_data_id, $data_source_name) { $desc = db_fetch_cell('SELECT name_cache FROM data_template_data WHERE local_data_id=' . $local_data_id . ' LIMIT 1'); if (substr_count($template["name"], '|')) { $gl = db_fetch_row("SELECT * FROM graph_local WHERE id={$local_graph_id}"); if (sizeof($gl)) { $name = expand_title($gl["host_id"], $gl["snmp_query_id"], $gl["snmp_index"], $template["name"]); } else { $name = $desc . ' [' . $data_source_name . ']'; } } else { $name = $desc . ' [' . $data_source_name . ']'; } return $name; }
function get_graph_title($local_graph_id) { $graph = db_fetch_row_prepared('SELECT graph_local.host_id, graph_local.snmp_query_id, graph_local.snmp_index, graph_templates_graph.local_graph_id, graph_templates_graph.title FROM (graph_templates_graph, graph_local) WHERE graph_templates_graph.local_graph_id = graph_local.id AND graph_local.id = ?', array($local_graph_id)); if (strstr($graph['title'], '|') && !empty($graph['host_id'])) { $graph['title'] = substitute_data_input_data($graph['title'], $graph, 0); return expand_title($graph['host_id'], $graph['snmp_query_id'], $graph['snmp_index'], $graph['title']); } else { return $graph['title']; } }
function thold_format_name($template, $local_graph_id, $local_data_id, $data_source_name) { $desc = db_fetch_cell_prepared('SELECT name_cache FROM data_template_data WHERE local_data_id = ? LIMIT 1', array($local_data_id)); if (isset($template['name']) && strpos($template['name'], '|') !== false) { $gl = db_fetch_row_prepared("SELECT * FROM graph_local WHERE id = ?", array($local_graph_id)); if (sizeof($gl)) { $name = expand_title($gl['host_id'], $gl['snmp_query_id'], $gl['snmp_index'], $template['name']); } else { $name = $desc . ' [' . $data_source_name . ']'; } } else { $name = $desc . ' [' . $data_source_name . ']'; } return $name; }