From 0a13b7c559d778dc8e7ef9e6e917537f6750d4d1 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Tue, 29 Mar 2016 14:45:25 +0900 Subject: [PATCH 001/112] highlight series name in tooltip when shared tooltip active --- public/app/plugins/panel/graph/graph_tooltip.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/graph/graph_tooltip.js b/public/app/plugins/panel/graph/graph_tooltip.js index 3e2900be4e9..afb473723ae 100644 --- a/public/app/plugins/panel/graph/graph_tooltip.js +++ b/public/app/plugins/panel/graph/graph_tooltip.js @@ -142,11 +142,16 @@ function ($) { continue; } + var highlightStyle = ''; + if (item && i === item.seriesIndex) { + highlightStyle = ' style="font-weight: bold;"'; + } + series = seriesList[i]; value = series.formatValue(hoverInfo.value); - seriesHtml += '
'; + seriesHtml += '
'; seriesHtml += ' ' + series.label + ':
'; seriesHtml += '
' + value + '
'; plot.highlight(i, hoverInfo.hoverIndex); From e0277702135c9c2e8eeee2a1cd75ee5c7b71c391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 4 Apr 2016 17:49:33 -0400 Subject: [PATCH 002/112] docs(): updated links to beta2 --- docs/sources/installation/debian.md | 6 +++--- docs/sources/installation/rpm.md | 8 ++++---- packaging/publish/publish.sh | 18 +++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/sources/installation/debian.md b/docs/sources/installation/debian.md index 2d24e7a9c3f..84beccfa513 100644 --- a/docs/sources/installation/debian.md +++ b/docs/sources/installation/debian.md @@ -11,7 +11,7 @@ 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-beta11459429091_amd64.deb](https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.0-beta11459429091_amd64.deb) +Beta .deb for Debian-based Linux | [grafana_3.0.0-beta21459801392_amd64.deb](https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.0-beta21459801392_amd64.deb) ## Install Stable @@ -21,9 +21,9 @@ Beta .deb for Debian-based Linux | [grafana_3.0.0-beta11459429091_amd64.deb](h ## Install 3.0 Beta - $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.0-beta11459429091_amd64.deb + $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.0-beta21459801392_amd64.deb $ sudo apt-get install -y adduser libfontconfig - $ sudo dpkg -i grafana_3.0.0-beta11459429091_amd64.deb + $ sudo dpkg -i grafana_3.0.0-beta21459801392_amd64.deb ## APT Repository diff --git a/docs/sources/installation/rpm.md b/docs/sources/installation/rpm.md index 5e8e746d0f7..498fcb2d580 100644 --- a/docs/sources/installation/rpm.md +++ b/docs/sources/installation/rpm.md @@ -11,7 +11,7 @@ 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-beta11459429091.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.0-beta11459429091.x86_64.rpm) +Beta .RPM for CentOS / Fedor / OpenSuse / Redhat Linux | [grafana-3.0.0-beta21459801392.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.0-beta21459801392.x86_64.rpm) ## Install Stable Release from package file @@ -34,18 +34,18 @@ Or install manually using `rpm`. You can install Grafana using Yum directly. - $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.0-beta11459429091.x86_64.rpm + $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.0-beta21459801392.x86_64.rpm Or install manually using `rpm`. #### On CentOS / Fedora / Redhat: $ sudo yum install initscripts fontconfig - $ sudo rpm -Uvh grafana-3.0.0-beta11459429091.x86_64.rpm + $ sudo rpm -Uvh grafana-3.0.0-beta21459801392.x86_64.rpm #### On OpenSuse: - $ sudo rpm -i --nodeps grafana-3.0.0-beta11459429091.x86_64.rpm + $ sudo rpm -i --nodeps grafana-3.0.0-beta21459801392.x86_64.rpm ## Install via YUM Repository diff --git a/packaging/publish/publish.sh b/packaging/publish/publish.sh index 58021bc6ffa..38f4a6b4167 100755 --- a/packaging/publish/publish.sh +++ b/packaging/publish/publish.sh @@ -1,22 +1,22 @@ #! /usr/bin/env bash -deb_ver=3.0.0-beta11459429091 -rpm_ver=3.0.0-beta11459429091 +deb_ver=3.0.0-beta21459801392 +rpm_ver=3.0.0-beta21459801392 #rpm_ver=3.0.0-1 -wget https://grafanarel.s3.amazonaws.com/builds/grafana_${deb_ver}_amd64.deb +#wget https://grafanarel.s3.amazonaws.com/builds/grafana_${deb_ver}_amd64.deb -# package_cloud push grafana/stable/debian/jessie grafana_${deb_ver}_amd64.deb -# package_cloud push grafana/stable/debian/wheezy grafana_${deb_ver}_amd64.deb +#package_cloud push grafana/stable/debian/jessie grafana_${deb_ver}_amd64.deb +#package_cloud push grafana/stable/debian/wheezy grafana_${deb_ver}_amd64.deb -package_cloud push grafana/testing/debian/jessie grafana_${deb_ver}_amd64.deb -package_cloud push grafana/testing/debian/wheezy grafana_${deb_ver}_amd64.deb +#package_cloud push grafana/testing/debian/jessie grafana_${deb_ver}_amd64.deb +#package_cloud push grafana/testing/debian/wheezy grafana_${deb_ver}_amd64.deb -wget https://grafanarel.s3.amazonaws.com/builds/grafana-${rpm_ver}.x86_64.rpm +#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 From 860e771493ecb0bda7f82414fd71edc5e87c3491 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Tue, 5 Apr 2016 12:01:13 +0200 Subject: [PATCH 003/112] fix(plugins): Fix broken link in plugins readme Can't find the DEVELOPMENT.md file so linked to http://docs.grafana.org/project/building_from_source/ instead. --- docs/sources/plugins/development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/plugins/development.md b/docs/sources/plugins/development.md index e8b5c620732..46f0f1764af 100644 --- a/docs/sources/plugins/development.md +++ b/docs/sources/plugins/development.md @@ -10,7 +10,7 @@ From grafana 3.0 it's very easy to develop your own plugins and share them with ## Short version -1. [Setup grafana](https://github.com/grafana/grafana/blob/master/DEVELOPMENT.md) +1. [Setup grafana](http://docs.grafana.org/project/building_from_source/) 2. Clone an example plugin into ```/var/lib/grafana/plugins``` or `data/plugins` (relative to grafana git repo if your running development version from source dir) 3. Code away! From b39aa02b52df1efc51f4a7b278cf08134a0fc88d Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Tue, 5 Apr 2016 12:05:14 +0200 Subject: [PATCH 004/112] fix(plugins): Fix broken link in plugins readme Another link to setup instructions that it is broken. --- docs/sources/plugins/development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/plugins/development.md b/docs/sources/plugins/development.md index 46f0f1764af..29dcd0568e3 100644 --- a/docs/sources/plugins/development.md +++ b/docs/sources/plugins/development.md @@ -34,7 +34,7 @@ and [apps](./apps.md) plugins in the documentation. ## Start developing your plugin There are two ways that you can start developing a Grafana plugin. -1. Setup a Grafana development environment. [(described here)](https://github.com/grafana/grafana/blob/master/DEVELOPMENT.md) and place your plugin in the ```data/plugins``` folder. +1. Setup a Grafana development environment. [(described here)](http://docs.grafana.org/project/building_from_source/) and place your plugin in the ```data/plugins``` folder. 2. Install Grafana and place your plugin in the plugins directory which is set in your [config file](../installation/configuration.md). By default this is `/var/lib/grafana/plugins` on Linux systems. 3. Place your plugin directory anywhere you like and specify it grafana.ini. From 3c1e9e9a25732a1aefe2f44a30307d0478849493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 5 Apr 2016 09:05:34 -0400 Subject: [PATCH 005/112] fix(table): fixed issue with table panel and annotations, fixes #4563 --- public/app/plugins/panel/table/module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/table/module.ts b/public/app/plugins/panel/table/module.ts index 295c7e0ee33..a6d348064eb 100644 --- a/public/app/plugins/panel/table/module.ts +++ b/public/app/plugins/panel/table/module.ts @@ -77,9 +77,9 @@ class TablePanelCtrl extends MetricsPanelCtrl { this.pageIndex = 0; if (this.panel.transform === 'annotations') { + this.setTimeQueryStart(); return this.annotationsSrv.getAnnotations(this.dashboard).then(annotations => { - this.dataRaw = annotations; - this.render(); + return {data: annotations}; }); } From 676e950fa30547f4b835776c82fa57cf40714eea Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 5 Apr 2016 15:34:24 +0200 Subject: [PATCH 006/112] fix(cli): improve error message for not using sudo closes #4562 --- .../grafana-cli/commands/install_command.go | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkg/cmd/grafana-cli/commands/install_command.go b/pkg/cmd/grafana-cli/commands/install_command.go index 0f783d5d3ff..81e7a15233b 100644 --- a/pkg/cmd/grafana-cli/commands/install_command.go +++ b/pkg/cmd/grafana-cli/commands/install_command.go @@ -120,6 +120,7 @@ func RemoveGitBuildFromName(pluginName, filename string) string { } var retryCount = 0 +var permissionsDeniedMessage = "Could not create %s. Permission denied. Make sure you have write access to plugindir" func downloadFile(pluginName, filePath, url string) (err error) { defer func() { @@ -153,16 +154,16 @@ func downloadFile(pluginName, filePath, url string) (err error) { newFile := path.Join(filePath, RemoveGitBuildFromName(pluginName, zf.Name)) if zf.FileInfo().IsDir() { - os.Mkdir(newFile, 0777) + err := os.Mkdir(newFile, 0777) + if PermissionsError(err) { + return fmt.Errorf(permissionsDeniedMessage, newFile) + } } else { dst, err := os.Create(newFile) - if err != nil { - if strings.Contains(err.Error(), "permission denied") { - return fmt.Errorf( - "Could not create file %s. permission deined. Make sure you have write access to plugindir", - newFile) - } + if PermissionsError(err) { + return fmt.Errorf(permissionsDeniedMessage, newFile) } + defer dst.Close() src, err := zf.Open() if err != nil { @@ -176,3 +177,7 @@ func downloadFile(pluginName, filePath, url string) (err error) { return nil } + +func PermissionsError(err error) bool { + return err != nil && strings.Contains(err.Error(), "permission denied") +} From 9b30634217817edf34e533d4a09fdb9a58c613cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 5 Apr 2016 11:24:08 -0400 Subject: [PATCH 007/112] fix(postgres): fixed issue with postgres caused by wrong prefrences table types, dropped table and created it with correct column types, fixes #4558 --- CHANGELOG.md | 7 ++++++- packaging/publish/publish.sh | 2 +- pkg/api/avatar/avatar.go | 1 + .../sqlstore/migrations/preferences_mig.go | 14 ++++++++------ 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb4ab3ad1e8..930ba87956b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ -# 3.0.0-beta2 (unreleased) +# 3.0.0-beta3 (unreleased) + +### Bug fixes +* **Postgres**: Fixed page render crash when using postgres, fixes [#4558](https://github.com/grafana/grafana/issues/4558) + +# 3.0.0-beta2 (2016-04-04) ### New Features (introduces since 3.0-beta1) * **Preferences**: Set home dashboard on user and org level, closes [#1678](https://github.com/grafana/grafana/issues/1678) diff --git a/packaging/publish/publish.sh b/packaging/publish/publish.sh index 38f4a6b4167..89a59ea5be1 100755 --- a/packaging/publish/publish.sh +++ b/packaging/publish/publish.sh @@ -16,7 +16,7 @@ rpm_ver=3.0.0-beta21459801392 #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 diff --git a/pkg/api/avatar/avatar.go b/pkg/api/avatar/avatar.go index 79aebece349..41ce857db4f 100644 --- a/pkg/api/avatar/avatar.go +++ b/pkg/api/avatar/avatar.go @@ -116,6 +116,7 @@ func (this *service) ServeHTTP(w http.ResponseWriter, r *http.Request) { if avatar.Expired() { if err := avatar.Update(); err != nil { log.Trace("avatar update error: %v", err) + avatar = this.notFound } } diff --git a/pkg/services/sqlstore/migrations/preferences_mig.go b/pkg/services/sqlstore/migrations/preferences_mig.go index 6425c3735bb..67a8169a7a8 100644 --- a/pkg/services/sqlstore/migrations/preferences_mig.go +++ b/pkg/services/sqlstore/migrations/preferences_mig.go @@ -10,12 +10,12 @@ func addPreferencesMigrations(mg *Migrator) { Name: "preferences", Columns: []*Column{ {Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true}, - {Name: "org_id", Type: DB_Int, Nullable: true}, - {Name: "user_id", Type: DB_NVarchar, Length: 255, Nullable: true}, + {Name: "org_id", Type: DB_BigInt, Nullable: false}, + {Name: "user_id", Type: DB_BigInt, Nullable: false}, {Name: "version", Type: DB_Int, Nullable: false}, - {Name: "home_dashboard_id", Type: DB_BigInt, Nullable: true}, - {Name: "timezone", Type: DB_NVarchar, Length: 50, Nullable: true}, - {Name: "theme", Type: DB_NVarchar, Length: 20, Nullable: true}, + {Name: "home_dashboard_id", Type: DB_BigInt, Nullable: false}, + {Name: "timezone", Type: DB_NVarchar, Length: 50, Nullable: false}, + {Name: "theme", Type: DB_NVarchar, Length: 20, Nullable: false}, {Name: "created", Type: DB_DateTime, Nullable: false}, {Name: "updated", Type: DB_DateTime, Nullable: false}, }, @@ -25,6 +25,8 @@ func addPreferencesMigrations(mg *Migrator) { }, } + mg.AddMigration("drop preferences table v3", NewDropTableMigration("preferences")) + // create table - mg.AddMigration("create preferences table v2", NewAddTableMigration(preferencesV2)) + mg.AddMigration("create preferences table v3", NewAddTableMigration(preferencesV2)) } From 43896dc416cfadce50668976b61e662c2a417d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 5 Apr 2016 11:29:12 -0400 Subject: [PATCH 008/112] fix(): updated changelog and version to beta3 --- CHANGELOG.md | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 930ba87956b..589e4e07551 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Bug fixes * **Postgres**: Fixed page render crash when using postgres, fixes [#4558](https://github.com/grafana/grafana/issues/4558) +* **Table panel**: Fixed table panel bug when trying to show annotations in table panel, fixes [#4563](https://github.com/grafana/grafana/issues/4563) # 3.0.0-beta2 (2016-04-04) diff --git a/package.json b/package.json index d741bab574e..b245bf540da 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Coding Instinct AB" }, "name": "grafana", - "version": "3.0.0-beta2", + "version": "3.0.0-beta3", "repository": { "type": "git", "url": "http://github.com/grafana/grafana.git" From 616b8f82ee25940aa810e3ea3e527a2976007955 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Tue, 5 Apr 2016 13:24:19 -0400 Subject: [PATCH 009/112] document godep build dependency --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a3336e0373b..434dd19152b 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ the latest master builds [here](http://grafana.org/download/builds) - Go 1.5 - NodeJS +- [Godep](https://github.com/tools/godep) ### Get Code From ed1fe9364838044eaaa038458b6c475e99ed9e68 Mon Sep 17 00:00:00 2001 From: Vitor Boschi Date: Wed, 6 Apr 2016 08:53:20 -0300 Subject: [PATCH 010/112] Fix percentage checkbox naming. Fix #4584 --- public/app/plugins/panel/graph/tab_display.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/panel/graph/tab_display.html b/public/app/plugins/panel/graph/tab_display.html index 5c021dae8e1..067651540e2 100644 --- a/public/app/plugins/panel/graph/tab_display.html +++ b/public/app/plugins/panel/graph/tab_display.html @@ -69,7 +69,7 @@ + checked="ctrl.panel.percentage" on-change="ctrl.render()">
From dc7f8014a27faa43098227c1e8b647e389b9cf9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 6 Apr 2016 08:43:06 -0400 Subject: [PATCH 011/112] fix(app config): fixed issue with app config tab, fixes #4575 --- CHANGELOG.md | 1 + public/app/core/directives/plugin_component.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 589e4e07551..936be63f7c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Bug fixes * **Postgres**: Fixed page render crash when using postgres, fixes [#4558](https://github.com/grafana/grafana/issues/4558) * **Table panel**: Fixed table panel bug when trying to show annotations in table panel, fixes [#4563](https://github.com/grafana/grafana/issues/4563) +* **App Config**: Fixed app config issue showing content of other app config, fixes [#4575](https://github.com/grafana/grafana/issues/4575) # 3.0.0-beta2 (2016-04-04) diff --git a/public/app/core/directives/plugin_component.ts b/public/app/core/directives/plugin_component.ts index 4f87a94573e..3e6383cc5c6 100644 --- a/public/app/core/directives/plugin_component.ts +++ b/public/app/core/directives/plugin_component.ts @@ -169,7 +169,7 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $ return System.import(model.module).then(function(appModule) { return { baseUrl: model.baseUrl, - name: 'app-config-' + model.pluginId, + name: 'app-config-' + model.id, bindings: {appModel: "=", appEditCtrl: "="}, attrs: {"app-model": "ctrl.model", "app-edit-ctrl": "ctrl"}, Component: appModule.ConfigCtrl, From a27d72b437a1528b03ae658c8b47643ac59b126f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 6 Apr 2016 08:49:47 -0400 Subject: [PATCH 012/112] fix(): fixed issue with scripted dashboard example, fixes #4579 --- public/app/features/dashboard/dashboardSrv.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/app/features/dashboard/dashboardSrv.js b/public/app/features/dashboard/dashboardSrv.js index ed119f6e23f..89c09ac551a 100644 --- a/public/app/features/dashboard/dashboardSrv.js +++ b/public/app/features/dashboard/dashboardSrv.js @@ -428,6 +428,8 @@ function (angular, $, _, moment) { // update graph yaxes changes panelUpgrades.push(function(panel) { if (panel.type !== 'graph') { return; } + if (!panel.grid) { return; } + if (!panel.yaxes) { panel.yaxes = [ { From 7f8f5f34989d5842f80177ddefecbffdbb1e91c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 6 Apr 2016 09:08:49 -0400 Subject: [PATCH 013/112] fix(): minor fix for plugin page, fixes #4578 --- public/app/features/plugins/partials/plugin_edit.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/plugins/partials/plugin_edit.html b/public/app/features/plugins/partials/plugin_edit.html index 6cb0ae5bf78..d5f69df2366 100644 --- a/public/app/features/plugins/partials/plugin_edit.html +++ b/public/app/features/plugins/partials/plugin_edit.html @@ -4,8 +4,8 @@