$local_graph_id, 'name' => $aggregate['name'], 'graph_description' => __('Aggregated Device'), 'url' => $url . $local_graph_id, 'source' => GRAPH_SOURCE_AGGREGATE, ); } else { return array( 'id' => $local_graph_id, 'name' => __('Not Templated'), 'graph_description' => __('Not Applicable'), 'url' => $url . $local_graph_id, 'source' => GRAPH_SOURCE_AGGREGATE, ); } } elseif ($graph_local['graph_template_id'] == 0) { return array( 'id' => $local_graph_id, 'name' => __('Not Templated'), 'url' => '', 'source' => GRAPH_SOURCE_PLAIN, ); } elseif ($graph_local['snmp_query_id'] > 0 && $graph_local['snmp_query_graph_id'] > 0) { $url = $config['url_path'] . 'data_queries.php' . '?action=item_edit' . '&id=' . $graph_local['snmp_query_graph_id'] . '&snmp_query_id=' . $graph_local['snmp_query_id']; return array( 'id' => $graph_local['snmp_query_graph_id'], 'name' => (!empty($graph_local['query_name']) ? $graph_local['query_name'] : __('Not Found')), 'url' => $url, 'source' => GRAPH_SOURCE_DATA_QUERY ); } elseif ($graph_local['snmp_query_id'] > 0 && $graph_local['snmp_query_graph_id'] == 0) { return array( 'id' => 0, 'name' => __('Damaged Graph'), 'url' => '', 'source' => GRAPH_SOURCE_DATA_QUERY ); } else { if (!empty($graph_local['template_name'])) { $url = $config['url_path'] . 'graph_templates.php?action=template_edit&id=' . $graph_local['graph_template_id']; return array( 'id' => $graph_local['graph_template_id'], 'name' => $graph_local['template_name'], 'url' => $url, 'source' => GRAPH_SOURCE_TEMPLATE, ); } else { return array( 'id' => 0, 'name' => __('Not Found'), 'url' => '', 'source' => GRAPH_SOURCE_TEMPLATE, ); } } }