From c555bbce3d531f50942e872ba959a248c6f2e4c7 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lespiau Date: Sun, 1 May 2016 01:32:36 +0200 Subject: [PATCH 01/64] Add optional tooltip ordering --- .../app/plugins/panel/graph/graph_tooltip.js | 18 +++++++++++++++--- public/app/plugins/panel/graph/module.ts | 1 + .../app/plugins/panel/graph/tab_display.html | 12 +++++++++--- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/public/app/plugins/panel/graph/graph_tooltip.js b/public/app/plugins/panel/graph/graph_tooltip.js index 9ab6369a6b2..0c2136f7d9d 100644 --- a/public/app/plugins/panel/graph/graph_tooltip.js +++ b/public/app/plugins/panel/graph/graph_tooltip.js @@ -81,9 +81,9 @@ function ($) { // Stacked series can increase its length on each new stacked serie if null points found, // to speed the index search we begin always on the last found hoverIndex. var newhoverIndex = this.findHoverIndexFromDataPoints(pos.x, series, hoverIndex); - results.push({ value: value, hoverIndex: newhoverIndex }); + results.push({ value: value, hoverIndex: newhoverIndex, color: series.color, label: series.label }); } else { - results.push({ value: value, hoverIndex: hoverIndex }); + results.push({ value: value, hoverIndex: hoverIndex, color: series.color, label: series.label }); } } @@ -133,6 +133,18 @@ function ($) { absoluteTime = dashboard.formatDate(seriesHoverInfo.time, tooltipFormat); + // Dynamically reorder the hovercard for the current time point if the + // option is enabled. + if (panel.tooltip.ordering === 'decreasing') { + seriesHoverInfo.sort(function(a, b) { + return parseFloat(b.value) - parseFloat(a.value); + }); + } else if (panel.tooltip.ordering === 'increasing') { + seriesHoverInfo.sort(function(a, b) { + return parseFloat(a.value) - parseFloat(b.value); + }); + } + for (i = 0; i < seriesHoverInfo.length; i++) { hoverInfo = seriesHoverInfo[i]; @@ -150,7 +162,7 @@ function ($) { value = series.formatValue(hoverInfo.value); seriesHtml += '
'; - seriesHtml += ' ' + series.label + ':
'; + seriesHtml += ' ' + hoverInfo.label + ':
'; seriesHtml += '
' + value + '
'; plot.highlight(i, hoverInfo.hoverIndex); } diff --git a/public/app/plugins/panel/graph/module.ts b/public/app/plugins/panel/graph/module.ts index a11c537b178..2b2e75b5a33 100644 --- a/public/app/plugins/panel/graph/module.ts +++ b/public/app/plugins/panel/graph/module.ts @@ -92,6 +92,7 @@ class GraphCtrl extends MetricsPanelCtrl { tooltip : { value_type: 'cumulative', shared: true, + ordering: 'alphabetical', msResolution: false, }, // time overrides diff --git a/public/app/plugins/panel/graph/tab_display.html b/public/app/plugins/panel/graph/tab_display.html index 067651540e2..a33ae0bc67f 100644 --- a/public/app/plugins/panel/graph/tab_display.html +++ b/public/app/plugins/panel/graph/tab_display.html @@ -42,23 +42,29 @@
Misc options
- +
- +
- +
+
+ +
+ +
+
From de5a39f320555e5fce2bf190b06c5725059a06ab Mon Sep 17 00:00:00 2001 From: bergquist Date: Mon, 2 May 2016 13:17:57 +0200 Subject: [PATCH 02/64] Revert "Revert "Merge branch 'utkarshcmu-rangeMaps'"" This reverts commit 58b91befdedfd5115f07710bc47ed4524bc0cb56. --- .../app/plugins/panel/singlestat/editor.html | 32 --------- .../plugins/panel/singlestat/mappings.html | 58 +++++++++++++++++ public/app/plugins/panel/singlestat/module.ts | 65 +++++++++++++++---- .../singlestat/specs/singlestat-specs.ts | 25 +++++++ 4 files changed, 136 insertions(+), 44 deletions(-) create mode 100644 public/app/plugins/panel/singlestat/mappings.html diff --git a/public/app/plugins/panel/singlestat/editor.html b/public/app/plugins/panel/singlestat/editor.html index fc3c9f69542..0504277a5e1 100644 --- a/public/app/plugins/panel/singlestat/editor.html +++ b/public/app/plugins/panel/singlestat/editor.html @@ -204,35 +204,3 @@
- -
-
-
-
    -
  • - Value to text mapping -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • - -
  • - - - -
  • - -
-
-
-
-
diff --git a/public/app/plugins/panel/singlestat/mappings.html b/public/app/plugins/panel/singlestat/mappings.html new file mode 100644 index 00000000000..a1105a159dd --- /dev/null +++ b/public/app/plugins/panel/singlestat/mappings.html @@ -0,0 +1,58 @@ +
+
+
+ + Type + +
+ +
+
+
+
+
+
Set valuea mappings
+
+
+ + + + + + + + +
+ +
+ +
+
+
+
+
Set range mappings
+
+
+ + + + From + + To + + Text + +
+ +
+ +
+
+
diff --git a/public/app/plugins/panel/singlestat/module.ts b/public/app/plugins/panel/singlestat/module.ts index 3c0b9e5342a..e2e529d00c7 100644 --- a/public/app/plugins/panel/singlestat/module.ts +++ b/public/app/plugins/panel/singlestat/module.ts @@ -35,6 +35,14 @@ class SingleStatCtrl extends MetricsPanelCtrl { valueMaps: [ { value: 'null', op: '=', text: 'N/A' } ], + mappingTypes: [ + {name: 'value to text', value: 1}, + {name: 'range to text', value: 2}, + ], + rangeMaps: [ + { from: 'null', to: 'null', text: 'N/A' } + ], + mappingType: 1, nullPointMode: 'connected', valueName: 'avg', prefixFontSize: '50%', @@ -73,6 +81,7 @@ class SingleStatCtrl extends MetricsPanelCtrl { onInitEditMode() { this.fontSizes = ['20%', '30%','50%','70%','80%','100%', '110%', '120%', '150%', '170%', '200%']; this.addEditorTab('Options', 'public/app/plugins/panel/singlestat/editor.html', 2); + this.addEditorTab('Value Mappings', 'public/app/plugins/panel/singlestat/mappings.html', 3); this.unitFormats = kbn.getUnitFormats(); } @@ -197,23 +206,45 @@ class SingleStatCtrl extends MetricsPanelCtrl { } } - // check value to text mappings - for (var i = 0; i < this.panel.valueMaps.length; i++) { - var map = this.panel.valueMaps[i]; - // special null case - if (map.value === 'null') { - if (data.value === null || data.value === void 0) { + // check value to text mappings if its enabled + if (this.panel.mappingType === 1) { + for (var i = 0; i < this.panel.valueMaps.length; i++) { + var map = this.panel.valueMaps[i]; + // special null case + if (map.value === 'null') { + if (data.value === null || data.value === void 0) { + data.valueFormated = map.text; + return; + } + continue; + } + + // value/number to text mapping + var value = parseFloat(map.value); + if (value === data.valueRounded) { data.valueFormated = map.text; return; } - continue; } + } else if (this.panel.mappingType === 2) { + for (var i = 0; i < this.panel.rangeMaps.length; i++) { + var map = this.panel.rangeMaps[i]; + // special null case + if (map.from === 'null' && map.to === 'null') { + if (data.value === null || data.value === void 0) { + data.valueFormated = map.text; + return; + } + continue; + } - // value/number to text mapping - var value = parseFloat(map.value); - if (value === data.valueRounded) { - data.valueFormated = map.text; - return; + // value/number to range mapping + var from = parseFloat(map.from); + var to = parseFloat(map.to); + if (to >= data.valueRounded && from <= data.valueRounded) { + data.valueFormated = map.text; + return; + } } } @@ -232,6 +263,16 @@ class SingleStatCtrl extends MetricsPanelCtrl { this.panel.valueMaps.push({value: '', op: '=', text: '' }); } + removeRangeMap(rangeMap) { + var index = _.indexOf(this.panel.rangeMaps, rangeMap); + this.panel.rangeMaps.splice(index, 1); + this.render(); + }; + + addRangeMap() { + this.panel.rangeMaps.push({from: '', to: '', text: ''}); + } + link(scope, elem, attrs, ctrl) { var $location = this.$location; var linkSrv = this.linkSrv; diff --git a/public/app/plugins/panel/singlestat/specs/singlestat-specs.ts b/public/app/plugins/panel/singlestat/specs/singlestat-specs.ts index dc85454b64a..3d6c565443b 100644 --- a/public/app/plugins/panel/singlestat/specs/singlestat-specs.ts +++ b/public/app/plugins/panel/singlestat/specs/singlestat-specs.ts @@ -84,4 +84,29 @@ describe('SingleStatCtrl', function() { expect(ctx.data.valueFormated).to.be('OK'); }); }); + + singleStatScenario('When range to text mapping is specifiedfor first range', function(ctx) { + ctx.setup(function() { + ctx.datapoints = [[41,50]]; + ctx.ctrl.panel.mappingType = 2; + ctx.ctrl.panel.rangeMaps = [{from: '10', to: '50', text: 'OK'},{from: '51', to: '100', text: 'NOT OK'}]; + }); + + it('Should replace value with text OK', function() { + expect(ctx.data.valueFormated).to.be('OK'); + }); + }); + + singleStatScenario('When range to text mapping is specified for other ranges', function(ctx) { + ctx.setup(function() { + ctx.datapoints = [[65,75]]; + ctx.ctrl.panel.mappingType = 2; + ctx.ctrl.panel.rangeMaps = [{from: '10', to: '50', text: 'OK'},{from: '51', to: '100', text: 'NOT OK'}]; + }); + + it('Should replace value with text NOT OK', function() { + expect(ctx.data.valueFormated).to.be('NOT OK'); + }); + }); + }); From 02ae1f79f7ede9d90416029aeb31cd88bee13ffc Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 3 May 2016 10:42:01 +0200 Subject: [PATCH 03/64] docs(changelog): add node about range to text mappings in singlestat --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a67f45e69ec..3f9a7a7b299 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 3.1.0 + +### Enhancements +* **Singlestat**: Add support for range to text mappings, closes [#1319](https://github.com/grafana/grafana/issues/1319) + # 3.0.0-beta7 (2016-05-02) ### Bug fixes From 5ee1b6ca972278fd591809043f2da7e039900676 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 10 May 2016 12:54:25 +0200 Subject: [PATCH 04/64] docs(changelog): add note about merged PR --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52708480ac1..0aa8bc79b94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Enhancements * **Singlestat**: Add support for range to text mappings, closes [#1319](https://github.com/grafana/grafana/issues/1319) +* **Graph**: Adds sort order options for graph tooltip, closes [#1189](https://github.com/grafana/grafana/issues/1189) # 3.0.0 stable (unreleased) From d6768402582c10e4bf5a7efddcfc914475eecd48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 10 May 2016 16:02:00 +0200 Subject: [PATCH 05/64] docs(): added homebrew info to mac install docs --- docs/sources/installation/mac.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/docs/sources/installation/mac.md b/docs/sources/installation/mac.md index 7246033b640..e65c2823666 100644 --- a/docs/sources/installation/mac.md +++ b/docs/sources/installation/mac.md @@ -6,8 +6,33 @@ page_keywords: grafana, installation, mac, osx, guide # Installing on Mac -There is currently no binary build for Mac, but Grafana will happily build on Mac. Read the [build from -source](/project/building_from_source) page for instructions on how to -build it yourself. +Installation can be done using [homebrew](http://brew.sh/) + +Install latest stable: + +``` +brew install grafana/grafana/grafana +``` + +To start grafana look at the command printed after the homebrew install completes. + +You can also add the grafana as tap. + +``` +brew tap grafana/grafana +brew install grafana +``` + +Install latest unstable from master: + +``` +brew install --HEAD grafana/grafana/grafana +``` + +To upgrade use the reinstall command + +``` +brew reinstall --HEAD grafana/grafana/grafana +``` From 56e53d7da24488c8de4ef25df22a92e4a04ae89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 10 May 2016 16:07:59 +0200 Subject: [PATCH 06/64] docs(): update readme dependency section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e678e48a14d..c6021182136 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ the latest master builds [here](http://grafana.org/download/builds) ### Dependencies - Go 1.5 -- NodeJS v0.12.0 +- NodeJS v4+ - [Godep](https://github.com/tools/godep) ### Get Code From c299b86983281bb9ea891d392fbc0f690fc4b9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 10 May 2016 16:33:05 +0200 Subject: [PATCH 07/64] docs(): updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6021182136..18a497092f2 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ go run build.go build ### Building frontend assets -To build less to css for the frontend you will need a recent version of of **node (v0.12.0)**, +To build less to css for the frontend you will need a recent version of of **node (v4+)**, npm (v2.5.0) and grunt (v0.4.5). Run the following: ```bash From 9b0da20d90429c1766d96c46c6a7a612bf5c875a Mon Sep 17 00:00:00 2001 From: Peggy Li Date: Tue, 10 May 2016 16:06:51 +0000 Subject: [PATCH 08/64] Fix typo in error message from update checker --- pkg/plugins/update_checker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/plugins/update_checker.go b/pkg/plugins/update_checker.go index 36169434096..ed43398357e 100644 --- a/pkg/plugins/update_checker.go +++ b/pkg/plugins/update_checker.go @@ -91,14 +91,14 @@ func checkForUpdates() { resp2, err := client.Get("https://raw.githubusercontent.com/grafana/grafana/master/latest.json") if err != nil { - log.Trace("Failed to get lates.json repo from github: %v", err.Error()) + log.Trace("Failed to get latest.json repo from github: %v", err.Error()) return } defer resp2.Body.Close() body, err = ioutil.ReadAll(resp2.Body) if err != nil { - log.Trace("Update check failed, reading response from github.net, %v", err.Error()) + log.Trace("Update check failed, reading response from github.com, %v", err.Error()) return } From 959714a6efc465219433e99ead3c8770f5896d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 10 May 2016 20:33:29 +0200 Subject: [PATCH 09/64] feat(docs): updated what's new article --- docs/sources/guides/whats-new-in-v3.md | 39 ++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/docs/sources/guides/whats-new-in-v3.md b/docs/sources/guides/whats-new-in-v3.md index eb1030f8f31..051691e0384 100644 --- a/docs/sources/guides/whats-new-in-v3.md +++ b/docs/sources/guides/whats-new-in-v3.md @@ -39,12 +39,13 @@ entire experience right within Grafana. -A preview of [Grafana.net](http://grafana.net) is launching along with this release. We -think it’s the perfect compliment to Grafana. +[Grafana.net](https://grafana.net) offers a central repository where the community can come together to discover, create and +share plugins (data sources, panels, apps) and dashboards. -Grafana.net currently offers a central repository where the community -can come together to discover and share plugins (Data Sources, Panels, -Apps) and Dashboards for Grafana 3.0 and above. +We are also working on a hosted Graphite-compatible data source that will be optimized for use with Grafana. +It’ll be easy to combine your existing data source(s) with this OpenSaaS option. Finally, Grafana.net can +also be a hub to manage all your Grafana instances. You’ll be able to monitor their health and availability, +perform dashboard backups, and more. We are also working on a hosted Graphite-compatible Data Source that will be optimized for use with Grafana. It’ll be easy to combine your @@ -65,7 +66,6 @@ Grafana 3.0 comes with a new command line tool called grafana-cli. You can easily install plugins from Grafana.net with it. For example: - ``` grafana-cli install grafana-pie-chart-panel ``` @@ -188,6 +188,33 @@ you can still install manually from [Grafana.net](http://grafana.net) * KairosDB: This data source has also no longer shipped with Grafana, you can install it manually from [Grafana.net](http://grafana.net) +## Plugin showcase + +Discovering and installing plugins is very quick and easy with Grafana 3.0 and [Grafana.net](https://grafana.net). Here +are a couple that I incurage you try! + +#### [Clock Panel](https://grafana.net/plugins/grafana-clock-panel) +Support's both current time and count down mode. + + +#### [Pie Chart Panel](https://grafana.net/plugins/grafana-piechart-panel) +A simple pie chart panel is now available as an external plugin. + + +#### [WorldPing App](https://grafana.net/plugins/raintank-worldping-app) +This is full blown Grafana App that adds new panels, data sources and pages to give +feature rich global performance monitoring directly from your on-prem Grafana. + + + +#### [Zabbix App](https://grafana.net/plugins/alexanderzobnin-zabbix-app) +This app contains the already very pouplar Zabbix data source plugin, 2 dashboards and a triggers panel. It is +created and maintained by [Alexander Zobnin](https://github.com/alexanderzobnin/grafana-zabbix). + + + +Checkout the full list of plugins on [Grafana.net](https://grafana.net/plugins) + ## CHANGELOG For a detailed list and link to github issues for everything included From 995f6be2c45c4d246ca7525bacf5a5317caad8ed Mon Sep 17 00:00:00 2001 From: Trent White Date: Wed, 11 May 2016 03:08:25 -0400 Subject: [PATCH 10/64] old grafana wordmark was still showing on login and sidebar (#4972) --- public/fonts/grafana-icons.eot | Bin 28992 -> 29716 bytes public/fonts/grafana-icons.svg | 13 ++++++---- public/fonts/grafana-icons.ttf | Bin 28804 -> 29528 bytes public/fonts/grafana-icons.woff | Bin 28880 -> 29604 bytes public/sass/base/_grafana_icons.scss | 36 ++++++++++++++------------- 5 files changed, 27 insertions(+), 22 deletions(-) diff --git a/public/fonts/grafana-icons.eot b/public/fonts/grafana-icons.eot index 4e594eca65de0def6ec31291285f897eff9a9873..88bc142e2056ec8daf240b07534d77205b05dfc6 100755 GIT binary patch delta 2520 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-vwfeHDR^1e|IDO1Z|Tu%HAM9h#> diff --git a/public/fonts/grafana-icons.svg b/public/fonts/grafana-icons.svg index 319e1739324..9006ea24078 100755 --- a/public/fonts/grafana-icons.svg +++ b/public/fonts/grafana-icons.svg @@ -31,10 +31,10 @@ - - + + - + @@ -46,14 +46,17 @@ - + - + + + + \ No newline at end of file diff --git a/public/fonts/grafana-icons.ttf b/public/fonts/grafana-icons.ttf index 2cfefbff196599282a6cf7ad15b01e9b29138070..50b2a0303f644e212864c67f544a810c45501853 100755 GIT binary patch delta 2543 zcmai0Yiv{J8UEhyT%9&UsY1MuVANC#_k8It= z^7p;xdA{d+-}k$m*M9DI@X2jZ2oORl$s%D$>&}6epwTS+5}CKLjZMsD<_m9KI!_4H zAfBAg9G*vOLcEApoX&l7|7Q!QZzKK|A$ilxRA$mT5`UJE125rtbOs4apZOBvUm@N& zGk4^v#_xOHK>Sz4zs(((=*kQv<8eafKStuvT;{2HGQhq<$iZ!hAIN9srdDoU=tDe% zL2k?+ID7;X#n0h(ZJaRN+0$z&sQ5PQgo@Q&04@c{>fJxE2;1rh>_BDW;mnD~* zuLX-Wkji7vqQa( zoEf4;pk+bHd5pCiV_8TCMspjeB3tTcD43*?a5ME(TP;T5-7O$!oiCgMzt%;A^$^oK zZP-Q^GZzel+_+j<+vO>LxPs19I+r*HS zyKC$Uvqq{{Mc-!+OtWN=oMbN0zY(73@IJ|eR2x8+bl`OX9*JKE68OOdBMb*|^#)@q zcwr7+XIb?I;=#w&_ZYwW9{rMvT;VFj!ARAgKpQ7A>YvrCv_n1jsJaHJ)x}4+Y9(s) zGyNn$Vx*U(NfxjA3GynrL_WZ^8yJtf8ILN7M`pDN&EUZ!ET3S^6>)JM?e2J_keq}B z2;hkrP;-AuBqTAoZ{=MBIV5{f9*&||W5J{R?-^cAU373SN+?)I|6dr!&!lFSb`G4J zPNZ_D`nSK(nQED9e<-`Nx$)8IL}X-Jo2b4EKZJvcV7HRpZSC?M+C(=GdqyMelRcX@ z^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8)B~J;8yfsqGt$RX`ycM+3s1`Jt z$Z0uwN{ zW)=gYZbAcMyh8%byolUrdNH7>C~$ERGz%Kop~%Uktjt6*Vp(*%II5SL(k03;Dr#fM z86vvdBUvcNn194r&$3w0CYDd0{OWSN5SRh=gGo`0cZriaO<-r-P&tApxxbjw|0!Rw7t6(VXka+xar*1GCIauSU3JG(sm^y z3W-TcL?T8L#(jY3f*(X;G*OeWgcuTyd{HxSAjWSKj41PqlBh(&4xhU*94Lv`dwTc$ zp1;3)pZD(c&v@!OcD&fRX%oT-j=~gLYF-Z`tc{M?MprqCQ-iro0U)YBg9L0>*jyo|kK8CSSMx(KNKUmWAJE#W5QCbT=zXB`T zHJKm8A}eqLE3<+s&{L!{nF@wdJspIoqRl3%#6Uv9IYg?ckW}KTYKtf9{K>91o(~Bu zOM*P#)|K?vJwSvIuU{7RX-q^+^l9ys(q5!;`ZU~QLZCDT81P64^*bAz^&5C4LgTSbR$DP# z=A%1c>{av}>P2~U1Zn64bOC)0eac)Z7Gb!I$&$kkXCwe>DP@eGIeV}*s#Os-hf*)Y zgJ!ITy@V;nuuM)5hLwtNGAnYlxqOfTmJ)L!VDM8#Skm=H9Dxw-|3t!ODPiWzK`x`N z*9Rr7+<(`7sOi+(Zrg*&8=?z0_ExJOKotj zF1V6ZTfmRNs3-qYHeI&q@Top5D0_ETRz-ZMrOe9u&+ zQd`zHbf-jt^sJ$7kS+dy^7^+FA@RGAG#1Nb@E2D?^})@e?bqBUKCi}!n#_g>(I+M3clGnF#E&gSlerg~V8_2Z81}NdkRy~i8Z+*q> z-~!KB)axkTibZ`p8W-&t9omXOrx9 y?i0shmsH7Do?PDQuJyE%56NBcnVRX^Lv=6tPX@XJ2b4SNd*(Mv9e;D*66$XV=b7UG diff --git a/public/sass/base/_grafana_icons.scss b/public/sass/base/_grafana_icons.scss index f7f3a0368ee..f3264d409cd 100644 --- a/public/sass/base/_grafana_icons.scss +++ b/public/sass/base/_grafana_icons.scss @@ -1,10 +1,10 @@ @font-face { font-family: 'grafana-icons'; - src: url('../fonts/grafana-icons.eot?h6rv8b'); - src: url('../fonts/grafana-icons.eot?h6rv8b#iefix') format('embedded-opentype'), - url('../fonts/grafana-icons.ttf?h6rv8b') format('truetype'), - url('../fonts/grafana-icons.woff?h6rv8b') format('woff'), - url('../fonts/grafana-icons.svg?h6rv8b#grafana-icons') format('svg'); + src: url('../fonts/grafana-icons.eot?okx5td'); + src: url('../fonts/grafana-icons.eot?okx5td#iefix') format('embedded-opentype'), + url('../fonts/grafana-icons.ttf?okx5td') format('truetype'), + url('../fonts/grafana-icons.woff?okx5td') format('woff'), + url('../fonts/grafana-icons.svg?okx5td#grafana-icons') format('svg'); font-weight: normal; font-style: normal; } @@ -61,6 +61,9 @@ .icon-gf-endpoint:before { content: "\e609"; } +.icon-gf-page:before { + content: "\e908"; +} .icon-gf-filter:before { content: "\e60a"; } @@ -112,9 +115,6 @@ .icon-gf-save:before { content: "\e614"; } -.icon-gf-settings:before { - content: "\e615"; -} .icon-gf-share:before { content: "\e616"; } @@ -124,10 +124,13 @@ .icon-gf-search:before { content: "\e618"; } -.icon-gf-tag-add:before { +.icon-gf-settings:before { + content: "\e615"; +} +.icon-gf-add:before { content: "\e619"; } -.icon-gf-tag-remove:before { +.icon-gf-remove:before { content: "\e61a"; } .icon-gf-video:before { @@ -169,6 +172,12 @@ .icon-gf-scale:before { content: "\e906"; } +.icon-gf-pending:before { + content: "\e909"; +} +.icon-gf-verified:before { + content: "\e90a"; +} .icon-gf-worldping:before { content: "\e627"; } @@ -176,10 +185,3 @@ content: "\e903"; } -.icon-gf-app:before { - content: "\e902"; -} -.icon-gf-datasource:before { - content: "\e607"; -} - From bbd52c0b713a5220ae0e27f8471aa9877a7e6589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 11 May 2016 09:35:22 +0200 Subject: [PATCH 11/64] changelog(): updated and updated version --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 930a91af1da..dea2b9c5f31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 3.0.0 stable (unreleased) +# 3.0.0 Stable (2016-05-11) * **Templating**: Fixed issue with new data source variable not persisting current selected value, fixes [#4934](https://github.com/grafana/grafana/issues/4934) diff --git a/package.json b/package.json index 8b9ec906ed9..eab8c01a977 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Coding Instinct AB" }, "name": "grafana", - "version": "3.0.0-beta7", + "version": "3.0.1", "repository": { "type": "git", "url": "http://github.com/grafana/grafana.git" From 03663c5b289fb5e684fd83549929fd11667599a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 11 May 2016 10:23:17 +0200 Subject: [PATCH 12/64] docs(): updated download links --- docs/sources/installation/debian.md | 13 +++---------- docs/sources/installation/rpm.md | 27 ++++----------------------- 2 files changed, 7 insertions(+), 33 deletions(-) diff --git a/docs/sources/installation/debian.md b/docs/sources/installation/debian.md index cac6a7c92b8..363cd4dcf7e 100644 --- a/docs/sources/installation/debian.md +++ b/docs/sources/installation/debian.md @@ -10,20 +10,13 @@ page_keywords: grafana, installation, debian, ubuntu, guide Description | Download ------------ | ------------- -Stable .deb for Debian-based Linux | [grafana_2.6.0_amd64.deb](https://grafanarel.s3.amazonaws.com/builds/grafana_2.6.0_amd64.deb) -Beta .deb for Debian-based Linux | [grafana_3.0.0-beta71462173753_amd64.deb](https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.0-beta71462173753_amd64.deb) +Stable .deb for Debian-based Linux | [grafana_3.0.1_amd64.deb](https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.1_amd64.deb) ## Install Stable - $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_2.6.0_amd64.deb + $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.1_amd64.deb $ sudo apt-get install -y adduser libfontconfig - $ sudo dpkg -i grafana_2.6.0_amd64.deb - -## Install 3.0 Beta - - $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.0-beta71462173753_amd64.deb - $ sudo apt-get install -y adduser libfontconfig - $ sudo dpkg -i grafana_3.0.0-beta71462173753_amd64.deb + $ sudo dpkg -i grafana_3.0.1_amd64.deb ## APT Repository diff --git a/docs/sources/installation/rpm.md b/docs/sources/installation/rpm.md index 744cafe93db..88ee5cd7862 100644 --- a/docs/sources/installation/rpm.md +++ b/docs/sources/installation/rpm.md @@ -10,43 +10,24 @@ page_keywords: grafana, installation, centos, fedora, opensuse, redhat, guide Description | Download ------------ | ------------- -Stable .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [grafana-2.6.0-1.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0-1.x86_64.rpm) -Beta .RPM for CentOS / Fedor / OpenSuse / Redhat Linux | [grafana-3.0.0-beta71462173753.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.0-beta71462173753.x86_64.rpm) +Stable .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [grafana-3.0.1-1.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-2.3.1-1.x86_64.rpm) ## Install Stable Release from package file You can install Grafana using Yum directly. - $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0-1.x86_64.rpm + $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.1-1.x86_64.rpm Or install manually using `rpm`. #### On CentOS / Fedora / Redhat: $ sudo yum install initscripts fontconfig - $ sudo rpm -Uvh grafana-2.6.0-1.x86_64.rpm + $ sudo rpm -Uvh grafana-3.0.1-1.x86_64.rpm #### On OpenSuse: - $ sudo rpm -i --nodeps grafana-2.6.0-1.x86_64.rpm - -## Install Beta Release from package file - -You can install Grafana using Yum directly. - - $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.0-beta71462173753.x86_64.rpm - -Or install manually using `rpm`. - -#### On CentOS / Fedora / Redhat: - - $ sudo yum install initscripts fontconfig - $ sudo rpm -Uvh grafana-3.0.0-beta71462173753.x86_64.rpm - -#### On OpenSuse: - - $ sudo rpm -i --nodeps grafana-3.0.0-beta71462173753.x86_64.rpm - + $ sudo rpm -i --nodeps grafana-3.0.1-1.x86_64.rpm ## Install via YUM Repository From 549eb15c32991bdf0eb174b60d982b1b2c5d0fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 11 May 2016 10:37:21 +0200 Subject: [PATCH 13/64] Update latest.json --- latest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/latest.json b/latest.json index 8ddb446ec44..4afdb750b3f 100644 --- a/latest.json +++ b/latest.json @@ -1,4 +1,4 @@ { - "stable": "2.6.0", - "testing": "3.0.0-beta7" + "stable": "3.0.1", + "testing": "3.0.1" } From 56bf9c56125b1deb317013754f07fc41ca04ab32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 11 May 2016 13:20:01 +0200 Subject: [PATCH 14/64] fix(): changed how package iteration/build is generated --- build.go | 8 +++----- packaging/publish/publish.sh | 10 +++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/build.go b/build.go index e1fc3599aa8..4347c486063 100644 --- a/build.go +++ b/build.go @@ -132,12 +132,10 @@ func readVersionFromPackageJson() { if len(parts) > 1 { linuxPackageVersion = parts[0] linuxPackageIteration = parts[1] - if linuxPackageIteration != "" { - // add timestamp to iteration - linuxPackageIteration = fmt.Sprintf("%s%v", linuxPackageIteration, time.Now().Unix()) - } - log.Println(fmt.Sprintf("Iteration %v", linuxPackageIteration)) } + + // add timestamp to iteration + linuxPackageIteration = fmt.Sprintf("%d%s", time.Now().Unix(), linuxPackageIteration) } type linuxPackageOptions struct { diff --git a/packaging/publish/publish.sh b/packaging/publish/publish.sh index 79303707231..d2826366627 100755 --- a/packaging/publish/publish.sh +++ b/packaging/publish/publish.sh @@ -1,7 +1,7 @@ #! /usr/bin/env bash -deb_ver=3.0.0-beta51460725904 -rpm_ver=3.0.0-beta51460725904 +deb_ver=3.0.1 +rpm_ver=3.0.1-1 #rpm_ver=3.0.0-1 @@ -16,7 +16,7 @@ rpm_ver=3.0.0-beta51460725904 #wget https://grafanarel.s3.amazonaws.com/builds/grafana-${rpm_ver}.x86_64.rpm #package_cloud push grafana/testing/el/6 grafana-${rpm_ver}.x86_64.rpm -package_cloud push grafana/testing/el/7 grafana-${rpm_ver}.x86_64.rpm +#package_cloud push grafana/testing/el/7 grafana-${rpm_ver}.x86_64.rpm -# package_cloud push grafana/stable/el/7 grafana-${version}-1.x86_64.rpm -# package_cloud push grafana/stable/el/6 grafana-${version}-1.x86_64.rpm +package_cloud push grafana/stable/el/7 grafana-${version}.x86_64.rpm +package_cloud push grafana/stable/el/6 grafana-${version}.x86_64.rpm From 8a3bdb3685f996265d5521c18c5a312802921931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 11 May 2016 13:21:25 +0200 Subject: [PATCH 15/64] fix(typo): corrected spelling in error message, fixes #4982 --- public/app/features/templating/templateValuesSrv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/templating/templateValuesSrv.js b/public/app/features/templating/templateValuesSrv.js index 472c24aef61..d44f07ed366 100644 --- a/public/app/features/templating/templateValuesSrv.js +++ b/public/app/features/templating/templateValuesSrv.js @@ -204,7 +204,7 @@ function (angular, _, kbn) { } if (options.length === 0) { - options.push({text: 'No datasurces found', value: ''}); + options.push({text: 'No data sources found', value: ''}); } variable.options = options; From dac62ec560f162e5d3e9e85d6c698918e76c87d1 Mon Sep 17 00:00:00 2001 From: Dan Cech Date: Wed, 11 May 2016 14:09:03 -0400 Subject: [PATCH 16/64] fix rpm download link --- docs/sources/installation/rpm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/installation/rpm.md b/docs/sources/installation/rpm.md index 88ee5cd7862..a49378203c7 100644 --- a/docs/sources/installation/rpm.md +++ b/docs/sources/installation/rpm.md @@ -10,7 +10,7 @@ page_keywords: grafana, installation, centos, fedora, opensuse, redhat, guide Description | Download ------------ | ------------- -Stable .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [grafana-3.0.1-1.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-2.3.1-1.x86_64.rpm) +Stable .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [grafana-3.0.1-1.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.1-1.x86_64.rpm) ## Install Stable Release from package file From 731c35540f661713c09a15f862bc82d558d94354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 12 May 2016 07:29:33 +0200 Subject: [PATCH 17/64] packaging(): default RESTART_ON_UPGRADE to true, closes #4993 --- package.json | 2 +- packaging/deb/default/grafana-server | 2 +- packaging/rpm/sysconfig/grafana-server | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index eab8c01a977..b9b87ab6e75 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Coding Instinct AB" }, "name": "grafana", - "version": "3.0.1", + "version": "3.0.2", "repository": { "type": "git", "url": "http://github.com/grafana/grafana.git" diff --git a/packaging/deb/default/grafana-server b/packaging/deb/default/grafana-server index dd06906b903..cc5ee866f7d 100644 --- a/packaging/deb/default/grafana-server +++ b/packaging/deb/default/grafana-server @@ -14,6 +14,6 @@ CONF_DIR=/etc/grafana CONF_FILE=/etc/grafana/grafana.ini -RESTART_ON_UPGRADE=false +RESTART_ON_UPGRADE=true PLUGINS_DIR=/var/lib/grafana/plugins diff --git a/packaging/rpm/sysconfig/grafana-server b/packaging/rpm/sysconfig/grafana-server index dd06906b903..cc5ee866f7d 100644 --- a/packaging/rpm/sysconfig/grafana-server +++ b/packaging/rpm/sysconfig/grafana-server @@ -14,6 +14,6 @@ CONF_DIR=/etc/grafana CONF_FILE=/etc/grafana/grafana.ini -RESTART_ON_UPGRADE=false +RESTART_ON_UPGRADE=true PLUGINS_DIR=/var/lib/grafana/plugins From 0201ac24e768fa15c4d0cee46df5cadfbd283773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 12 May 2016 10:31:36 +0200 Subject: [PATCH 18/64] fix(templating): fixed issue with mixing repeated row and repeated panel, fixes #4988 --- CHANGELOG.md | 6 +++++- karma.conf.js | 2 +- packaging/publish/publish.sh | 4 ++-- public/app/features/dashboard/dynamicDashboardSrv.js | 3 ++- public/test/specs/dynamicDashboardSrv-specs.js | 1 + 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dea2b9c5f31..fd2a4dd50a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -# 3.0.0 Stable (2016-05-11) +# 3.0.2 Stable (unreleased) + +* **Templating**: Fixed issue mixing row repeat and panel repeats, fixes [#4988](https://github.com/grafana/grafana/issues/4988) + +# 3.0.1 Stable (2016-05-11) * **Templating**: Fixed issue with new data source variable not persisting current selected value, fixes [#4934](https://github.com/grafana/grafana/issues/4934) diff --git a/karma.conf.js b/karma.conf.js index c803dda5eae..cdcea23a90b 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -26,7 +26,7 @@ module.exports = function(config) { browsers: ['PhantomJS'], captureTimeout: 20000, singleRun: true, - autoWatchBatchDelay: 10000, + autoWatchBatchDelay: 1000, browserNoActivityTimeout: 60000, }); diff --git a/packaging/publish/publish.sh b/packaging/publish/publish.sh index d2826366627..79da73d441a 100755 --- a/packaging/publish/publish.sh +++ b/packaging/publish/publish.sh @@ -18,5 +18,5 @@ rpm_ver=3.0.1-1 #package_cloud push grafana/testing/el/6 grafana-${rpm_ver}.x86_64.rpm #package_cloud push grafana/testing/el/7 grafana-${rpm_ver}.x86_64.rpm -package_cloud push grafana/stable/el/7 grafana-${version}.x86_64.rpm -package_cloud push grafana/stable/el/6 grafana-${version}.x86_64.rpm +package_cloud push grafana/stable/el/7 grafana-${rpm_ver}.x86_64.rpm +package_cloud push grafana/stable/el/6 grafana-${rpm_ver}.x86_64.rpm diff --git a/public/app/features/dashboard/dynamicDashboardSrv.js b/public/app/features/dashboard/dynamicDashboardSrv.js index 9e369733f45..f131b47b557 100644 --- a/public/app/features/dashboard/dynamicDashboardSrv.js +++ b/public/app/features/dashboard/dynamicDashboardSrv.js @@ -52,6 +52,8 @@ function (angular, _) { else if (panel.repeatPanelId && panel.repeatIteration !== this.iteration) { row.panels = _.without(row.panels, panel); j = j - 1; + } else if (row.repeat || row.repeatRowId) { + continue; } else if (!_.isEmpty(panel.scopedVars) && panel.repeatIteration !== this.iteration) { panel.scopedVars = {}; } @@ -118,7 +120,6 @@ function (angular, _) { panel = copy.panels[i]; panel.scopedVars = {}; panel.scopedVars[variable.name] = option; - panel.repeatIteration = this.iteration; } }, this); }; diff --git a/public/test/specs/dynamicDashboardSrv-specs.js b/public/test/specs/dynamicDashboardSrv-specs.js index b988203009a..a09c3788377 100644 --- a/public/test/specs/dynamicDashboardSrv-specs.js +++ b/public/test/specs/dynamicDashboardSrv-specs.js @@ -167,6 +167,7 @@ define([ it('should generate a repeartRowId based on repeat row index', function() { expect(ctx.rows[1].repeatRowId).to.be(1); + expect(ctx.rows[1].repeatIteration).to.be(ctx.dynamicDashboardSrv.iteration); }); it('should set scopedVars on row panels', function() { From 35f55cabf0d8ed2fd24d07d07de0a7e398e24d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 12 May 2016 10:41:15 +0200 Subject: [PATCH 19/64] fix(templating): improved detection of nested template variables, fixes #4986, fixes #4987 --- CHANGELOG.md | 1 + public/app/features/templating/templateSrv.js | 3 ++- public/test/specs/templateSrv-specs.js | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd2a4dd50a1..e9beca0c761 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # 3.0.2 Stable (unreleased) * **Templating**: Fixed issue mixing row repeat and panel repeats, fixes [#4988](https://github.com/grafana/grafana/issues/4988) +* **Templating**: Fixed issue detecting dependencies in nested variables, fixes [#4987](https://github.com/grafana/grafana/issues/4987), fixes [#4986](https://github.com/grafana/grafana/issues/4986) # 3.0.1 Stable (2016-05-11) diff --git a/public/app/features/templating/templateSrv.js b/public/app/features/templating/templateSrv.js index f60414eac43..7e96af22e2a 100644 --- a/public/app/features/templating/templateSrv.js +++ b/public/app/features/templating/templateSrv.js @@ -97,7 +97,8 @@ function (angular, _) { if (!str) { return false; } - return str.indexOf('$' + variableName) !== -1 || str.indexOf('[[' + variableName + ']]') !== -1; + var match = this._regex.exec(str); + return match && (match[1] === variableName || match[2] === variableName); }; this.highlightVariablesAsHtml = function(str) { diff --git a/public/test/specs/templateSrv-specs.js b/public/test/specs/templateSrv-specs.js index 3334d7a7bfe..fd7247cbd81 100644 --- a/public/test/specs/templateSrv-specs.js +++ b/public/test/specs/templateSrv-specs.js @@ -190,6 +190,11 @@ define([ expect(contains).to.be(true); }); + it('should not find it if only part matches with $var syntax', function() { + var contains = _templateSrv.containsVariable('this.$ServerDomain.filters', 'Server'); + expect(contains).to.be(false); + }); + it('should find it with [[var]] syntax', function() { var contains = _templateSrv.containsVariable('this.[[test]].filters', 'test'); expect(contains).to.be(true); From 2f6b00b6f74379eeffd0d87656f1d3d65564c944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denny=20Sch=C3=A4fer?= Date: Thu, 12 May 2016 10:41:36 +0200 Subject: [PATCH 20/64] Add What's New in Grafana 3.0 link into the readme (#5001) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 18a497092f2..6dbfc5388c2 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB. - [What's New in Grafana 2.0](http://docs.grafana.org/guides/whats-new-in-v2/) - [What's New in Grafana 2.1](http://docs.grafana.org/guides/whats-new-in-v2-1/) - [What's New in Grafana 2.5](http://docs.grafana.org/guides/whats-new-in-v2-5/) +- [What's New in Grafana 3.0](http://docs.grafana.org/guides/whats-new-in-v3/) ## Features ### Graphite Target Editor From 9f9f4e7fef934365dc05a2135e143f46ec7e116d Mon Sep 17 00:00:00 2001 From: Dan Cech Date: Thu, 12 May 2016 04:43:31 -0400 Subject: [PATCH 21/64] use new plugin-specific repo route when installing or updating a single plugin (#4992) --- .../grafana-cli/commands/upgrade_command.go | 15 ++++++------- pkg/cmd/grafana-cli/services/services.go | 22 +++++++++++++------ 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/pkg/cmd/grafana-cli/commands/upgrade_command.go b/pkg/cmd/grafana-cli/commands/upgrade_command.go index b9ca834be6d..e788b3bdfaa 100644 --- a/pkg/cmd/grafana-cli/commands/upgrade_command.go +++ b/pkg/cmd/grafana-cli/commands/upgrade_command.go @@ -1,6 +1,8 @@ package commands import ( + "github.com/fatih/color" + "github.com/grafana/grafana/pkg/cmd/grafana-cli/log" s "github.com/grafana/grafana/pkg/cmd/grafana-cli/services" ) @@ -14,20 +16,17 @@ func upgradeCommand(c CommandLine) error { return err } - remotePlugins, err2 := s.ListAllPlugins(c.GlobalString("repo")) + v, err2 := s.GetPlugin(localPlugin.Id, c.GlobalString("repo")) if err2 != nil { return err2 } - for _, v := range remotePlugins.Plugins { - if localPlugin.Id == v.Id { - if ShouldUpgrade(localPlugin.Info.Version, v) { - s.RemoveInstalledPlugin(pluginsDir, pluginName) - return InstallPlugin(localPlugin.Id, "", c) - } - } + if ShouldUpgrade(localPlugin.Info.Version, v) { + s.RemoveInstalledPlugin(pluginsDir, pluginName) + return InstallPlugin(localPlugin.Id, "", c) } + log.Infof("%s %s is up to date \n", color.GreenString("✔"), localPlugin.Id) return nil } diff --git a/pkg/cmd/grafana-cli/services/services.go b/pkg/cmd/grafana-cli/services/services.go index f0ad460842d..2332511ed89 100644 --- a/pkg/cmd/grafana-cli/services/services.go +++ b/pkg/cmd/grafana-cli/services/services.go @@ -44,7 +44,7 @@ func ReadPlugin(pluginDir, pluginName string) (m.InstalledPlugin, error) { } if res.Id == "" { - return m.InstalledPlugin{}, errors.New("could not read find plugin " + pluginName) + return m.InstalledPlugin{}, errors.New("could not find plugin " + pluginName + " in " + pluginDir) } return res, nil @@ -69,13 +69,21 @@ func RemoveInstalledPlugin(pluginPath, id string) error { } func GetPlugin(pluginId, repoUrl string) (m.Plugin, error) { - resp, _ := ListAllPlugins(repoUrl) + fullUrl := repoUrl + "/repo/" + pluginId - for _, i := range resp.Plugins { - if i.Id == pluginId { - return i, nil - } + res, err := goreq.Request{Uri: fullUrl, MaxRedirects: 3}.Do() + if err != nil { + return m.Plugin{}, err + } + if res.StatusCode != 200 { + return m.Plugin{}, fmt.Errorf("Could not access %s statuscode %v", fullUrl, res.StatusCode) } - return m.Plugin{}, errors.New("could not find plugin named \"" + pluginId + "\"") + var resp m.Plugin + err = res.Body.FromJsonTo(&resp) + if err != nil { + return m.Plugin{}, errors.New("Could not load plugin data") + } + + return resp, nil } From c6744925c469f43ba658c5c351c3a6c21bd1c0c6 Mon Sep 17 00:00:00 2001 From: Anton Chevychalov Date: Thu, 12 May 2016 15:11:10 +0300 Subject: [PATCH 22/64] Add new parameter to config: default_theme. --- conf/defaults.ini | 3 +++ conf/sample.ini | 3 +++ pkg/services/sqlstore/preferences.go | 4 +++- pkg/setting/setting.go | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/conf/defaults.ini b/conf/defaults.ini index f78287619a3..0a4b61fbe78 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -172,6 +172,9 @@ verify_email_enabled = false # Background text for the user field on the login page login_hint = email or username +# Default UI theme ("dark" or "light") +default_theme = dark + #################################### Anonymous Auth ########################## [auth.anonymous] # enable anonymous access diff --git a/conf/sample.ini b/conf/sample.ini index 6a26589d40d..7f358b07199 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -155,6 +155,9 @@ check_for_updates = true # Background text for the user field on the login page ;login_hint = email or username +# Default UI theme ("dark" or "light") +;default_theme = dark + #################################### Anonymous Auth ########################## [auth.anonymous] # enable anonymous access diff --git a/pkg/services/sqlstore/preferences.go b/pkg/services/sqlstore/preferences.go index d120c485ed3..65609a9c57c 100644 --- a/pkg/services/sqlstore/preferences.go +++ b/pkg/services/sqlstore/preferences.go @@ -5,6 +5,8 @@ import ( "github.com/grafana/grafana/pkg/bus" m "github.com/grafana/grafana/pkg/models" + + "github.com/grafana/grafana/pkg/setting" ) func init() { @@ -26,7 +28,7 @@ func GetPreferencesWithDefaults(query *m.GetPreferencesWithDefaultsQuery) error } res := &m.Preferences{ - Theme: "dark", + Theme: setting.DefaultTheme, Timezone: "browser", HomeDashboardId: 0, } diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go index 2d1bad945eb..b883a8d995d 100644 --- a/pkg/setting/setting.go +++ b/pkg/setting/setting.go @@ -88,6 +88,7 @@ var ( AutoAssignOrgRole string VerifyEmailEnabled bool LoginHint string + DefaultTheme string // Http auth AdminUser string @@ -454,6 +455,7 @@ func NewConfigContext(args *CommandLineArgs) error { AutoAssignOrgRole = users.Key("auto_assign_org_role").In("Editor", []string{"Editor", "Admin", "Read Only Editor", "Viewer"}) VerifyEmailEnabled = users.Key("verify_email_enabled").MustBool(false) LoginHint = users.Key("login_hint").String() + DefaultTheme = users.Key("default_theme").String() // anonymous access AnonymousEnabled = Cfg.Section("auth.anonymous").Key("enabled").MustBool(false) From 3feb6492e6d03de265e9c5c61b5e3d0eb0126aae Mon Sep 17 00:00:00 2001 From: Prajwal Rao Date: Thu, 12 May 2016 12:49:58 -0700 Subject: [PATCH 23/64] fixed datasources icon (#5015) --- public/app/features/panel/metrics_ds_selector.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/panel/metrics_ds_selector.ts b/public/app/features/panel/metrics_ds_selector.ts index b281c43048b..c0e1b776062 100644 --- a/public/app/features/panel/metrics_ds_selector.ts +++ b/public/app/features/panel/metrics_ds_selector.ts @@ -10,7 +10,7 @@ var template = `
-
+
+ + ARN of Assume Role + +
From 66bcae353c7d8d3a71cc0db06dee245ab6562b63 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Wed, 18 May 2016 14:56:23 +0900 Subject: [PATCH 54/64] (prometheus) pass dashboard time range to template query (#5007) * (prometheus) pass dashboard time range to template query * (prometheus) add passing time test of templating --- .../datasource/prometheus/datasource.ts | 4 ++-- .../prometheus/metric_find_query.js | 18 +++++++++------ .../specs/metric_find_query_specs.ts | 23 +++++++++++++------ public/test/specs/helpers.js | 4 ++++ 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/public/app/plugins/datasource/prometheus/datasource.ts b/public/app/plugins/datasource/prometheus/datasource.ts index ca7ef051ba0..978fee3e427 100644 --- a/public/app/plugins/datasource/prometheus/datasource.ts +++ b/public/app/plugins/datasource/prometheus/datasource.ts @@ -10,7 +10,7 @@ import PrometheusMetricFindQuery from './metric_find_query'; var durationSplitRegexp = /(\d+)(ms|s|m|h|d|w|M|y)/; /** @ngInject */ -export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateSrv) { +export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateSrv, timeSrv) { this.type = 'prometheus'; this.editorSrc = 'app/features/prometheus/partials/query.editor.html'; this.name = instanceSettings.name; @@ -145,7 +145,7 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS return $q.reject(err); } - var metricFindQuery = new PrometheusMetricFindQuery(this, interpolated); + var metricFindQuery = new PrometheusMetricFindQuery(this, interpolated, timeSrv); return metricFindQuery.process(); }; diff --git a/public/app/plugins/datasource/prometheus/metric_find_query.js b/public/app/plugins/datasource/prometheus/metric_find_query.js index 25704df1e2c..f449978be81 100644 --- a/public/app/plugins/datasource/prometheus/metric_find_query.js +++ b/public/app/plugins/datasource/prometheus/metric_find_query.js @@ -1,13 +1,13 @@ define([ - 'lodash', - 'moment', + 'lodash' ], -function (_, moment) { +function (_) { 'use strict'; - function PrometheusMetricFindQuery(datasource, query) { + function PrometheusMetricFindQuery(datasource, query, timeSrv) { this.datasource = datasource; this.query = query; + this.range = timeSrv.timeRange(); } PrometheusMetricFindQuery.prototype.process = function() { @@ -51,7 +51,9 @@ function (_, moment) { }); }); } else { - url = '/api/v1/series?match[]=' + encodeURIComponent(metric); + url = '/api/v1/series?match[]=' + encodeURIComponent(metric) + + '&start=' + (this.range.from.valueOf() / 1000) + + '&end=' + (this.range.to.valueOf() / 1000); return this.datasource._request('GET', url) .then(function(result) { @@ -86,7 +88,7 @@ function (_, moment) { }; PrometheusMetricFindQuery.prototype.queryResultQuery = function(query) { - var url = '/api/v1/query?query=' + encodeURIComponent(query) + '&time=' + (moment().valueOf() / 1000); + var url = '/api/v1/query?query=' + encodeURIComponent(query) + '&time=' + (this.range.to.valueOf() / 1000); return this.datasource._request('GET', url) .then(function(result) { @@ -107,7 +109,9 @@ function (_, moment) { }; PrometheusMetricFindQuery.prototype.metricNameAndLabelsQuery = function(query) { - var url = '/api/v1/series?match[]=' + encodeURIComponent(query); + var url = '/api/v1/series?match[]=' + encodeURIComponent(query) + + '&start=' + (this.range.from.valueOf() / 1000) + + '&end=' + (this.range.to.valueOf() / 1000); var self = this; return this.datasource._request('GET', url) diff --git a/public/app/plugins/datasource/prometheus/specs/metric_find_query_specs.ts b/public/app/plugins/datasource/prometheus/specs/metric_find_query_specs.ts index d328f4cb25b..38b50d2ce79 100644 --- a/public/app/plugins/datasource/prometheus/specs/metric_find_query_specs.ts +++ b/public/app/plugins/datasource/prometheus/specs/metric_find_query_specs.ts @@ -28,7 +28,7 @@ describe('PrometheusMetricFindQuery', function() { data: ["value1", "value2", "value3"] }; ctx.$httpBackend.expect('GET', 'proxied/api/v1/label/resource/values').respond(response); - var pm = new PrometheusMetricFindQuery(ctx.ds, 'label_values(resource)'); + var pm = new PrometheusMetricFindQuery(ctx.ds, 'label_values(resource)', ctx.timeSrv); pm.process().then(function(data) { results = data; }); ctx.$httpBackend.flush(); ctx.$rootScope.$apply(); @@ -43,13 +43,22 @@ describe('PrometheusMetricFindQuery', function() { {__name__: "metric", resource: "value3"} ] }; - ctx.$httpBackend.expect('GET', 'proxied/api/v1/series?match[]=metric').respond(response); - var pm = new PrometheusMetricFindQuery(ctx.ds, 'label_values(metric, resource)'); + ctx.$httpBackend.expect('GET', /proxied\/api\/v1\/series\?match\[\]=metric&start=.*&end=.*/).respond(response); + var pm = new PrometheusMetricFindQuery(ctx.ds, 'label_values(metric, resource)', ctx.timeSrv); pm.process().then(function(data) { results = data; }); ctx.$httpBackend.flush(); ctx.$rootScope.$apply(); expect(results.length).to.be(3); }); + it('label_values(metric, resource) should pass correct time', function() { + ctx.timeSrv.setTime({ from: moment.utc('2011-01-01'), to: moment.utc('2015-01-01') }); + ctx.$httpBackend.expect('GET', + /proxied\/api\/v1\/series\?match\[\]=metric&start=1293840000&end=1420070400/).respond(response); + var pm = new PrometheusMetricFindQuery(ctx.ds, 'label_values(metric, resource)', ctx.timeSrv); + pm.process().then(function(data) { results = data; }); + ctx.$httpBackend.flush(); + ctx.$rootScope.$apply(); + }); it('label_values(metric{label1="foo", label2="bar", label3="baz"}, resource) should generate series query', function() { response = { status: "success", @@ -59,8 +68,8 @@ describe('PrometheusMetricFindQuery', function() { {__name__: "metric", resource: "value3"} ] }; - ctx.$httpBackend.expect('GET', 'proxied/api/v1/series?match[]=metric').respond(response); - var pm = new PrometheusMetricFindQuery(ctx.ds, 'label_values(metric, resource)'); + ctx.$httpBackend.expect('GET', /proxied\/api\/v1\/series\?match\[\]=metric&start=.*&end=.*/).respond(response); + var pm = new PrometheusMetricFindQuery(ctx.ds, 'label_values(metric, resource)', ctx.timeSrv); pm.process().then(function(data) { results = data; }); ctx.$httpBackend.flush(); ctx.$rootScope.$apply(); @@ -72,7 +81,7 @@ describe('PrometheusMetricFindQuery', function() { data: ["metric1","metric2","metric3","nomatch"] }; ctx.$httpBackend.expect('GET', 'proxied/api/v1/label/__name__/values').respond(response); - var pm = new PrometheusMetricFindQuery(ctx.ds, 'metrics(metric.*)'); + var pm = new PrometheusMetricFindQuery(ctx.ds, 'metrics(metric.*)', ctx.timeSrv); pm.process().then(function(data) { results = data; }); ctx.$httpBackend.flush(); ctx.$rootScope.$apply(); @@ -90,7 +99,7 @@ describe('PrometheusMetricFindQuery', function() { } }; ctx.$httpBackend.expect('GET', /proxied\/api\/v1\/query\?query=metric&time=.*/).respond(response); - var pm = new PrometheusMetricFindQuery(ctx.ds, 'query_result(metric)'); + var pm = new PrometheusMetricFindQuery(ctx.ds, 'query_result(metric)', ctx.timeSrv); pm.process().then(function(data) { results = data; }); ctx.$httpBackend.flush(); ctx.$rootScope.$apply(); diff --git a/public/test/specs/helpers.js b/public/test/specs/helpers.js index ba75a4ebf51..7b64e18175d 100644 --- a/public/test/specs/helpers.js +++ b/public/test/specs/helpers.js @@ -138,6 +138,10 @@ define([ this.replace = function(target) { return target; }; + + this.setTime = function(time) { + this.time = time; + }; } function ContextSrvStub() { From a86d2188912f6dd1772d346fb3dc75af1d6b08d0 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Wed, 18 May 2016 16:36:57 +0900 Subject: [PATCH 55/64] (prometheus) fix metric find query --- public/app/plugins/datasource/prometheus/datasource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/prometheus/datasource.ts b/public/app/plugins/datasource/prometheus/datasource.ts index d4d4ff8ff83..be1f54f7a86 100644 --- a/public/app/plugins/datasource/prometheus/datasource.ts +++ b/public/app/plugins/datasource/prometheus/datasource.ts @@ -140,7 +140,7 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS var interpolated; try { - interpolated = templateSrv.replace(query); + interpolated = templateSrv.replace(query, {}, this.interpolateQueryExpr); } catch (err) { return $q.reject(err); } From 0cd2e150d51cbdb00aa97a641c602bbbfc624f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 18 May 2016 11:50:40 +0200 Subject: [PATCH 56/64] feat(snapshots): performance improvements to deep clone, makes snapshot's a lot quicker for big dashboards with a lot of panels and data --- package.json | 2 +- public/app/features/dashboard/dashboardSrv.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e4bb7adaba0..9dbff96c2b8 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "zone.js": "^0.6.6", "autoprefixer": "^6.3.3", "es6-promise": "^3.0.2", - "es6-shim": "^0.35.0", + "es6-shim": "^0.35.1", "expect.js": "~0.2.0", "glob": "~3.2.7", "grunt": "~0.4.0", diff --git a/public/app/features/dashboard/dashboardSrv.js b/public/app/features/dashboard/dashboardSrv.js index 2e1cd1acbf0..a4ae7b31468 100644 --- a/public/app/features/dashboard/dashboardSrv.js +++ b/public/app/features/dashboard/dashboardSrv.js @@ -65,7 +65,7 @@ function (angular, $, _, moment) { // cleans meta data and other non peristent state p.getSaveModelClone = function() { - var copy = angular.copy(this); + var copy = $.extend(true, {}, this); delete copy.meta; return copy; }; From cd80884b76ed5467d0bdbb88107fde03d855f3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 18 May 2016 12:01:11 +0200 Subject: [PATCH 57/64] fix(dashboard timepicker): fixed issue with time picker and UTC when reading time from url, fixes #5078 --- public/app/features/dashboard/timeSrv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/dashboard/timeSrv.js b/public/app/features/dashboard/timeSrv.js index 13f5ad07bab..cd52155ff5f 100644 --- a/public/app/features/dashboard/timeSrv.js +++ b/public/app/features/dashboard/timeSrv.js @@ -50,7 +50,7 @@ define([ if (!isNaN(value)) { var epoch = parseInt(value); - return moment(epoch); + return moment.utc(epoch); } return null; From c41e3dcb916f16554271df0aaa223e17f4b81a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 18 May 2016 12:04:37 +0200 Subject: [PATCH 58/64] updated changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d37e5ba9e1e..5321c2cd552 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ * **Graph**: Adds sort order options for graph tooltip, closes [#1189](https://github.com/grafana/grafana/issues/1189) * **Theme**: Add default theme to config file [#5011](https://github.com/grafana/grafana/pull/5011) -# 3.0.2 Stable (2016-05-16) +# 3.0.3 Patch release (unreleased) +* **Time picker**: Fixed issue timepicker and UTC when reading time from URL, fixes [#5078](https://github.com/grafana/grafana/issues/5078) + +# 3.0.2 Patch release (2016-05-16) * **Templating**: Fixed issue mixing row repeat and panel repeats, fixes [#4988](https://github.com/grafana/grafana/issues/4988) * **Templating**: Fixed issue detecting dependencies in nested variables, fixes [#4987](https://github.com/grafana/grafana/issues/4987), fixes [#4986](https://github.com/grafana/grafana/issues/4986) From 92ac3704155bb70a8557186864f8c64bd6094fbc Mon Sep 17 00:00:00 2001 From: bergquist Date: Wed, 18 May 2016 12:28:45 +0200 Subject: [PATCH 59/64] tech(docker): rename fake data writers --- docker/blocks/graphite/fig | 2 +- docker/blocks/influxdb/fig | 2 +- docker/blocks/opentsdb/fig | 2 +- docker/blocks/prometheus/fig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/blocks/graphite/fig b/docker/blocks/graphite/fig index 4268641d32f..60acb8c1131 100644 --- a/docker/blocks/graphite/fig +++ b/docker/blocks/graphite/fig @@ -8,7 +8,7 @@ graphite: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro -fake-data-gen: +fake-graphite-data: image: grafana/fake-data-gen net: bridge environment: diff --git a/docker/blocks/influxdb/fig b/docker/blocks/influxdb/fig index 0dc69cb6b72..bdb4a274634 100644 --- a/docker/blocks/influxdb/fig +++ b/docker/blocks/influxdb/fig @@ -5,7 +5,7 @@ influxdb: - "8083:8083" - "8086:8086" -fake-data-gen: +fake-influxdb-data: image: grafana/fake-data-gen net: bridge environment: diff --git a/docker/blocks/opentsdb/fig b/docker/blocks/opentsdb/fig index 705d746a864..c346475e9a3 100644 --- a/docker/blocks/opentsdb/fig +++ b/docker/blocks/opentsdb/fig @@ -3,7 +3,7 @@ opentsdb: ports: - "4242:4242" -fake-data-gen: +fake-opentsdb-data: image: grafana/fake-data-gen net: bridge environment: diff --git a/docker/blocks/prometheus/fig b/docker/blocks/prometheus/fig index aa00e1b6272..ecfcf395d26 100644 --- a/docker/blocks/prometheus/fig +++ b/docker/blocks/prometheus/fig @@ -6,7 +6,7 @@ prometheus: volumes: - /var/docker/prometheus:/prometheus-data -fake-data-gen: +fake-prometheus-data: image: grafana/fake-data-gen net: bridge ports: From 392cb2a7148d12ef24d404d6e7b1f3e82769a29e Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Wed, 18 May 2016 20:27:19 +0900 Subject: [PATCH 60/64] (cloudwatch) update changelog (#5080) * update cloudwatch.md * update changelog --- CHANGELOG.md | 1 + docs/sources/datasources/cloudwatch.md | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5321c2cd552..bf074487057 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ # 3.0.3 Patch release (unreleased) * **Time picker**: Fixed issue timepicker and UTC when reading time from URL, fixes [#5078](https://github.com/grafana/grafana/issues/5078) +* **CloudWatch**: Support for Multiple Account by AssumeRole, closes [#3522](https://github.com/grafana/grafana/issues/3522) # 3.0.2 Patch release (2016-05-16) diff --git a/docs/sources/datasources/cloudwatch.md b/docs/sources/datasources/cloudwatch.md index c69d3579784..a3b6a3ba61f 100644 --- a/docs/sources/datasources/cloudwatch.md +++ b/docs/sources/datasources/cloudwatch.md @@ -26,6 +26,8 @@ Name | The data source name, important that this is the same as in Grafana v1.x Default | Default data source means that it will be pre-selected for new panels. Credentials profile name | Specify the name of the profile to use (if you use `~/aws/credentials` file), leave blank for default. This option was introduced in Grafana 2.5.1 Default Region | Used in query editor to set region (can be changed on per query basis) +Custom Metrics namespace | Specify the CloudWatch namespace of Custom metrics +Assume Role Arn | Specify the ARN of the role to assume ## Authentication From d474eba53a4766e8992abc223f9ffad7452950d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 18 May 2016 14:18:08 +0200 Subject: [PATCH 61/64] fix(logging): fixed reading config level from config file, fixes #5079 --- pkg/setting/setting.go | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go index 2d1bad945eb..8494b8112b7 100644 --- a/pkg/setting/setting.go +++ b/pkg/setting/setting.go @@ -526,6 +526,17 @@ var logLevels = map[string]int{ "Critical": 5, } +func getLogLevel(key string, defaultName string) (string, int) { + levelName := Cfg.Section(key).Key("level").In(defaultName, []string{"Trace", "Debug", "Info", "Warn", "Error", "Critical"}) + + level, ok := logLevels[levelName] + if !ok { + log.Fatal(4, "Unknown log level: %s", levelName) + } + + return levelName, level +} + func initLogging(args *CommandLineArgs) { //close any existing log handlers. log.Close() @@ -533,8 +544,12 @@ func initLogging(args *CommandLineArgs) { LogModes = strings.Split(Cfg.Section("log").Key("mode").MustString("console"), ",") LogsPath = makeAbsolute(Cfg.Section("paths").Key("logs").String(), HomePath) + defaultLevelName, _ := getLogLevel("log", "Info") + LogConfigs = make([]util.DynMap, len(LogModes)) + for i, mode := range LogModes { + mode = strings.TrimSpace(mode) sec, err := Cfg.GetSection("log." + mode) if err != nil { @@ -542,12 +557,7 @@ func initLogging(args *CommandLineArgs) { } // Log level. - levelName := Cfg.Section("log."+mode).Key("level").In("Trace", - []string{"Trace", "Debug", "Info", "Warn", "Error", "Critical"}) - level, ok := logLevels[levelName] - if !ok { - log.Fatal(4, "Unknown log level: %s", levelName) - } + _, level := getLogLevel("log."+mode, defaultLevelName) // Generate log configuration. switch mode { From 10339090b80b80fc07f2670971efae13ea71c794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 18 May 2016 15:22:40 +0200 Subject: [PATCH 62/64] fix(annotations): fixed annotation error handling, fixes #5077 --- public/app/features/annotations/annotations_srv.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/app/features/annotations/annotations_srv.js b/public/app/features/annotations/annotations_srv.js index b0022135ef5..a693dd602c8 100644 --- a/public/app/features/annotations/annotations_srv.js +++ b/public/app/features/annotations/annotations_srv.js @@ -55,10 +55,11 @@ define([ }, this); }); - promiseCached = $q.all(promises) - .then(function() { - return list; - }); + promiseCached = $q.all(promises).then(function() { + return list; + }).catch(function(err) { + $rootScope.appEvent('alert-error', ['Annotations failed', (err.message || err)]); + }); return promiseCached; }; From 24a410ae8f441fcf0310a9ce7a190451d2698bfd Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Wed, 18 May 2016 12:31:59 -0400 Subject: [PATCH 63/64] docs(preferences): Document user and org preferences (#5087) closes #5069 --- docs/sources/http_api/overview.md | 1 + docs/sources/http_api/preferences.md | 100 +++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 docs/sources/http_api/preferences.md diff --git a/docs/sources/http_api/overview.md b/docs/sources/http_api/overview.md index 8e7e2d60ad3..7f5a3ecfac8 100644 --- a/docs/sources/http_api/overview.md +++ b/docs/sources/http_api/overview.md @@ -18,4 +18,5 @@ dashboards, creating users and updating data sources. * [User API](/http_api/user/) * [Admin API](/http_api/admin/) * [Snapshot API](/http_api/snapshot/) +* [Preferences API](/http_api/preferences/) * [Other API](/http_api/other/) diff --git a/docs/sources/http_api/preferences.md b/docs/sources/http_api/preferences.md new file mode 100644 index 00000000000..6bb00ed8132 --- /dev/null +++ b/docs/sources/http_api/preferences.md @@ -0,0 +1,100 @@ +---- +page_title: Preferences API +page_description: Grafana Preferences API Reference +page_keywords: grafana, preferences, http, api, documentation +--- + +# User and Org Preferences API + +Keys: + +- **theme** - One of: ``light``, ``dark``, or an empty string for the default theme +- **homeDashboardId** - The numerical ``:id`` of a favorited dashboard, default: ``0`` +- **timezone** - One of: ``utc``, ``browser``, or an empty string for the default + +Omitting a key will cause the current value to be replaced with the +system default value. + +## Get Current User Prefs + +`GET /api/user/preferences` + +**Example Request**: + + GET /api/user/preferences HTTP/1.1 + Accept: application/json + Content-Type: application/json + Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk + +**Example Response**: + + HTTP/1.1 200 + Content-Type: application/json + + {"theme":"","homeDashboardId":0,"timezone":""} + +## Update Current User Prefs + +`PUT /api/user/preferences` + +**Example Request**: + + PUT /api/user/preferences HTTP/1.1 + Accept: application/json + Content-Type: application/json + Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk + + { + "theme": "", + "homeDashboardId":0, + "timezone":"utc" + } + +**Example Response**: + + HTTP/1.1 200 + Content-Type: text/plain; charset=utf-8 + + {"message":"Preferences updated"} + +## Get Current Org Prefs + +`GET /api/org/preferences` + +**Example Request**: + + GET /api/org/preferences HTTP/1.1 + Accept: application/json + Content-Type: application/json + Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk + +**Example Response**: + + HTTP/1.1 200 + Content-Type: application/json + + {"theme":"","homeDashboardId":0,"timezone":""} + +## Update Current Org Prefs + +`PUT /api/org/preferences` + +**Example Request**: + + PUT /api/org/preferences HTTP/1.1 + Accept: application/json + Content-Type: application/json + Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk + + { + "theme": "", + "homeDashboardId":0, + "timezone":"utc" + } + +**Example Response**: + + HTTP/1.1 200 + Content-Type: text/plain; charset=utf-8 + + {"message":"Preferences updated"} From 1bb4ca22e7542d0e2600de9464d7b5020ba85e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 19 May 2016 07:58:44 +0200 Subject: [PATCH 64/64] fix(test): fixed failing unsaved changes test --- public/app/core/utils/datemath.ts | 2 +- public/test/specs/unsavedChangesSrv-specs.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app/core/utils/datemath.ts b/public/app/core/utils/datemath.ts index b66325c71a8..467d3750c9a 100644 --- a/public/app/core/utils/datemath.ts +++ b/public/app/core/utils/datemath.ts @@ -28,7 +28,7 @@ export function parse(text, roundUp?) { mathString = text.substring(index + 2); } // We're going to just require ISO8601 timestamps, k? - time = moment(parseString); + time = moment(parseString, moment.ISO_8601); } if (!mathString.length) { diff --git a/public/test/specs/unsavedChangesSrv-specs.js b/public/test/specs/unsavedChangesSrv-specs.js index af88ff77ea6..ddbbb557055 100644 --- a/public/test/specs/unsavedChangesSrv-specs.js +++ b/public/test/specs/unsavedChangesSrv-specs.js @@ -29,6 +29,7 @@ define([ beforeEach(function() { dash = _dashboardSrv.create({ + refresh: false, rows: [ { panels: [{ test: "asd", legend: { } }]