From dca45f177fa50843800dfc40bf89b140e6288acd Mon Sep 17 00:00:00 2001 From: Alex Laverty Date: Thu, 9 Jul 2015 11:50:29 +1000 Subject: [PATCH 01/10] Fixed invalid json example, added missing comma --- docs/sources/reference/http_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/reference/http_api.md b/docs/sources/reference/http_api.md index 90b7274cce6..fb9e7600ecf 100644 --- a/docs/sources/reference/http_api.md +++ b/docs/sources/reference/http_api.md @@ -53,7 +53,7 @@ Creates a new dashboard or updates an existing dashboard. "rows": [ { } - ] + ], "schemaVersion": 6, "version": 0 }, From 14e25100d4066caaa366ffed9aa0f9d87fa30c78 Mon Sep 17 00:00:00 2001 From: gmembre Date: Thu, 9 Jul 2015 22:17:12 +0200 Subject: [PATCH 02/10] Adding GOPATH --- docs/sources/project/building_from_source.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/sources/project/building_from_source.md b/docs/sources/project/building_from_source.md index dc08f5a261a..b59d067eec4 100644 --- a/docs/sources/project/building_from_source.md +++ b/docs/sources/project/building_from_source.md @@ -17,6 +17,7 @@ dev environment. ## Get Code ``` +export GOPATH=``pwd` go get github.com/grafana/grafana ``` @@ -24,11 +25,11 @@ go get github.com/grafana/grafana ``` cd $GOPATH/src/github.com/grafana/grafana go run build.go setup (only needed once to install godep) -godep restore (will pull down all golang lib dependecies in your current GOPATH) +$GOPATH/bin/godep restore (will pull down all golang lib dependecies in your current GOPATH) go build . ``` -# Building on Windows +## Building on Windows The Grafana backend includes Sqlite3 which requires GCC to compile. So in order to compile Grafana on windows you need to install GCC. We recommend [TDM-GCC](http://tdm-gcc.tdragon.net/download). From 3fa228dcbba4d0440ea2d4a4c8644bdec4ddc3d0 Mon Sep 17 00:00:00 2001 From: gmembre Date: Thu, 9 Jul 2015 22:49:27 +0200 Subject: [PATCH 03/10] Correcting typo --- docs/sources/project/building_from_source.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/project/building_from_source.md b/docs/sources/project/building_from_source.md index b59d067eec4..b0ae5cec724 100644 --- a/docs/sources/project/building_from_source.md +++ b/docs/sources/project/building_from_source.md @@ -17,7 +17,7 @@ dev environment. ## Get Code ``` -export GOPATH=``pwd` +export GOPATH=`pwd` go get github.com/grafana/grafana ``` From 244e682c2ba1cbdccc6cb1ee15c5785adbed5e8e Mon Sep 17 00:00:00 2001 From: Johannes Wienke Date: Fri, 10 Jul 2015 12:16:41 +0200 Subject: [PATCH 04/10] Series override option to hide legend entries Adds a series override option to hide certain series from the legend. * public/app/components/timeSeries.js: boolean flag to decide display in legend and application of override option for this flag * public/app/panels/graph/legend.js: exclude hidden series * public/app/panels/graph/seriesOverridesCtrl.js: add legend override option This fixes #2324 --- public/app/components/timeSeries.js | 2 ++ public/app/panels/graph/legend.js | 4 ++++ public/app/panels/graph/seriesOverridesCtrl.js | 1 + 3 files changed, 7 insertions(+) diff --git a/public/app/components/timeSeries.js b/public/app/components/timeSeries.js index 3c41378947e..74194e68ff9 100644 --- a/public/app/components/timeSeries.js +++ b/public/app/components/timeSeries.js @@ -13,6 +13,7 @@ function (_, kbn) { this.color = opts.color; this.valueFormater = kbn.valueFormats.none; this.stats = {}; + this.legend = true; } function matchSeriesOverride(aliasOrRegex, seriesAlias) { @@ -55,6 +56,7 @@ function (_, kbn) { if (override.fillBelowTo !== void 0) { this.fillBelowTo = override.fillBelowTo; } if (override.color !== void 0) { this.color = override.color; } if (override.transform !== void 0) { this.transform = override.transform; } + if (override.legend !== void 0) { this.legend = override.legend; } if (override.yaxis !== void 0) { this.yaxis = override.yaxis; diff --git a/public/app/panels/graph/legend.js b/public/app/panels/graph/legend.js index 1f016f2c3a3..beea27ec8b7 100644 --- a/public/app/panels/graph/legend.js +++ b/public/app/panels/graph/legend.js @@ -130,6 +130,10 @@ function (angular, app, _, kbn, $) { if (panel.legend.hideEmpty && series.allIsNull) { continue; } + // ignore series excluded via override + if (!series.legend) { + continue; + } var html = '