diff --git a/web/static/css/graph.css b/web/static/css/graph.css index 927d12bfe..8d72325b9 100644 --- a/web/static/css/graph.css +++ b/web/static/css/graph.css @@ -54,13 +54,3 @@ svg { height: 10px; margin: 2px 2px 0 8px; } - - .legend.rickshaw_legend { - width: auto; - } - - .legend.rickshaw_legend .line { - padding-bottom: 10px; - clear: none; - float: left; - } diff --git a/web/static/js/graph.js b/web/static/js/graph.js index f319868b1..296b3729a 100644 --- a/web/static/js/graph.js +++ b/web/static/js/graph.js @@ -299,7 +299,15 @@ Prometheus.Graph.prototype.renderLabels = function(labels) { } Prometheus.Graph.prototype.metricToTsName = function(labels) { - return labels["name"] + "
" + this.renderLabels(labels); + var tsName = labels["name"] + "{"; + var labelStrings = []; + for (label in labels) { + if (label != "name") { + labelStrings.push(label + "='" + labels[label] + "'"); + } + } + tsName += labelStrings.join(",") + "}"; + return tsName; }; Prometheus.Graph.prototype.parseValue = function(value) {