+static void show_breadcrump_field (const char *str) /* {{{ */
+{
+ if ((str == NULL) || (str[0] == 0))
+ printf ("<em>none</em>");
+ else if (IS_ANY (str))
+ printf ("<em>any</em>");
+ else if (IS_ALL (str))
+ printf ("<em>all</em>");
+ else
+ {
+ char *str_html = html_escape (str);
+ printf ("<a href=\"%s?action=list_graphs;search=%s\">%s</a>",
+ script_name (), str_html, str_html);
+ free (str_html);
+ }
+} /* }}} void show_breadcrump_field */
+
+static int show_breadcrump (show_graph_data_t *data) /* {{{ */
+{
+ graph_ident_t *ident;
+ char *prefix;
+
+ if (data->inst != NULL)
+ {
+ prefix = "Instance";
+ ident = inst_get_selector (data->inst);
+ }
+ else
+ {
+ prefix = "Graph";
+ ident = graph_get_selector (data->cfg);
+ }
+
+ printf ("<div class=\"breadcrump\">%s: "", prefix);
+ show_breadcrump_field (ident_get_host (ident));
+ printf (" / ");
+ show_breadcrump_field (ident_get_plugin (ident));
+ printf (" – ");
+ show_breadcrump_field (ident_get_plugin_instance (ident));
+ printf (" / ");
+ show_breadcrump_field (ident_get_type (ident));
+ printf (" – ");
+ show_breadcrump_field (ident_get_type_instance (ident));
+ printf (""</div>\n");
+
+ return (0);
+} /* }}} int show_breadcrump */
+