Code

graph: Introduce a new type representing a metric.
[sysdb/webui.git] / server / graph.go
index 9c679bc5a0386a9ed48a4900a8a5c7d9a7f7af27..7509485930e23f60f1dc140e8776d3d0b473c8b5 100644 (file)
@@ -64,7 +64,7 @@ func (s *Server) graph(w http.ResponseWriter, req request) {
        g := &graph.Graph{
                Start:   start,
                End:     end,
-               Metrics: [][2]string{{req.args[0], req.args[1]}},
+               Metrics: []graph.Metric{{Hostname: req.args[0], Identifier: req.args[1]}},
        }
        p, err := g.Plot(s.c)
        if err != nil {