From ae66c3f2894600e4ea0915f54af140e1b17b6b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 10 May 2016 14:35:50 +0200 Subject: [PATCH 01/18] fix(influxdb): minor editor display fix --- .../app/plugins/datasource/influxdb/partials/query.editor.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/influxdb/partials/query.editor.html b/public/app/plugins/datasource/influxdb/partials/query.editor.html index c3a52531ef1..0d6dd5c5c3b 100644 --- a/public/app/plugins/datasource/influxdb/partials/query.editor.html +++ b/public/app/plugins/datasource/influxdb/partials/query.editor.html @@ -30,7 +30,7 @@
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 02/18] 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 03/18] 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 04/18] 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 05/18] 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 06/18] 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 07/18] 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 zcmai0eQZVrS9qs$7C@sw9;3Dkm*w@Y3hUj;Tt*elr_2?#|a zk~b7>hn4^v({6dJ-?4hMpIbd1D?|zaqE@$?MhlZwyXCf?v%0lgsIx+}0Q5j8xrn~@ zqc0n2LvKD4RqeKF8V)6Cq@{t%l@6O3cwZw3`VeSIfuax5Pz}WNLEm=Lh0NuJuC9g4 znbQ0Y$2D;hH#UYt6Q|GrhMAR(bp2TVMv?3JD!Fucxyt_wm4VM6{F?DF?~)4QA&MR} zZ^yJ?LRtcHv$PTY3!n=f>2$|`66W2(qJB_&yTs5g<7!aXW11MU@?f1^Vb)3I>h-{< zj~!-7KRLr(qJJYiF%S!}6H;jcyJP^r7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RLG)LXYcFY&;#AaJL(KQ)m)G*E4<=7 zf6jRhe&?O%@Rz}~!3W8AD*#w*IMMs2;q(sjT>yzV@Ewww(Fnnyfa zwBTRwTqIYKAEOnh26>T$qG&S+58D}=Mc}=P98q}-W3x-)h$4H15WU1BDN9{TJ@@4h z`=quu$ylxZ{jJ8jhr1s%+{NT;3kg!2u&tcYx=la4XyO-0TKn}^mzuU2kyFE-Iksp< zL+A)ON!&!0$c|Pa4*5V62i?-3gaawG>?N_sjTxF;hPg*Era>rnsF=g#uK5PWNENbacI5+SLt&m64yVo8Lys~@M_|wiyHFj2$;fs@9}i zh~@gvxQ@7?&*57piqvmy+NfW{wFpg3KWVlW!<9a=6UJUa&!T=biVh+TeTdGWZ=p|# zslWmZmoZsV*zQmR04oS%{K~TjN5i8Ca5&_M1TUI08-5E_fnl2*ZVWr6G7>E?WO@65 z0k#q|0@&bE1lZCIMXW*!^M5kouvnNO_4=TsnfdR!_m!Rcsqv+a(Xm7@m>7#T zjXw62dNiIW<%-d0u9R3i(9`bH&k*i`fmDlQO~FaL%=ZSQ?H4O^`-=l?^{b;nkq*)^zOihs8pCWDuWZooj)YYU=B2(*MF# zD9Q2svd90Gqz^Ch!|Z%Dz*h+vK2@-$M@sv5R5tyAR+x;B7y51u{73w4@2UFP bhJB5D{U-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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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 08/18] 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 09/18] 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 10/18] 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 11/18] 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 12/18] 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 13/18] 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 14/18] 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 15/18] 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 16/18] 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 17/18] 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 18/18] 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 }