From 72bd5854850d0a53ad6074408a7c022087083f98 Mon Sep 17 00:00:00 2001 From: Bernerd Schaefer Date: Mon, 15 Apr 2013 10:04:09 +0200 Subject: [PATCH] Revert style change to legend items --- web/static/css/graph.css | 10 ---------- web/static/js/graph.js | 10 +++++++++- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/web/static/css/graph.css b/web/static/css/graph.css index 927d12bfe1..8d72325b9f 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 f319868b16..296b3729a7 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) {