* use relative path to graphs.xml
* use correct absolute path for hosts
(relative paths are confused by colons in IPv6 addresses)
"var graph_width = " GRAPH_WIDTH ";\n"
"var graph_height = " GRAPH_HEIGHT ";\n"
"var bar_gap = 1;\n"
- "var graphs_uri = \"/graphs.xml\";\n"
+ "var graphs_uri = \"graphs.xml\";\n"
"var graphs = [\n"
);
#include "hosts_db.h"
#include "db.h"
#include "html.h"
+#include "http.h" /* for base_url */
#include "ncache.h"
#include "now.h"
#include "str.h"
str_appendf(buf,
"<tr class=\"%s\">\n"
- " <td><a href=\"/hosts/%s/\">%s</a></td>\n"
+ " <td><a href=\"%shosts/%s/\">%s</a></td>\n"
" <td>%s</td>\n",
css_class,
- ip, ip,
+ base_url, ip, ip,
(b->u.host.dns == NULL) ? "" : b->u.host.dns);
if (show_mac_addrs)