diff --git a/.editorconfig b/.editorconfig
index 84bbaf8a420..cbde126ca6c 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -8,7 +8,6 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
-insert_final_newline = true
[*.go]
indent_style = tab
diff --git a/.gitignore b/.gitignore
index 12e7bed3f46..72f6684ef20 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,8 +10,8 @@ awsconfig
/public_gen
/public/vendor/npm
/tmp
-vendor/phantomjs/phantomjs
-vendor/phantomjs/phantomjs.exe
+tools/phantomjs/phantomjs
+tools/phantomjs/phantomjs.exe
profile.out
coverage.txt
@@ -60,3 +60,4 @@ debug.test
/vendor/**/*_test.go
/vendor/**/.editorconfig
/vendor/**/appengine*
+*.orig
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c76ab12984c..d7dd13dba98 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,7 @@
Grafana v5.0 is going to be the biggest and most foundational release Grafana has ever had, coming with a ton of UX improvements, a new dashboard grid engine, dashboard folders, user teams and permissions. Checkout out this [video preview](https://www.youtube.com/watch?v=BC_YRNpqj5k) of Grafana v5.
-### New Features
+### New Major Features
- **Dashboards** Dashboard folders, [#1611](https://github.com/grafana/grafana/issues/1611)
- **Teams** User groups (teams) implemented. Can be used in folder & dashboard permission list.
- **Dashboard grid**: Panels are now layed out in a two dimensional grid (with x, y, w, h). [#9093](https://github.com/grafana/grafana/issues/9093).
@@ -10,24 +10,22 @@ Grafana v5.0 is going to be the biggest and most foundational release Grafana ha
- **UX**: Major update to page header and navigation
- **Dashboard settings**: Combine dashboard settings views into one with side menu, [#9750](https://github.com/grafana/grafana/issues/9750)
-## New Dashboard Grid
-
-The new grid engine is major upgrade for how you can position and move panels. It enables new layouts and a much easier dashboard building experience. The change is backwards compatible. Grafana will automatically upgrade your dashboards to the new schema and position panels to match your existing layout. There might be minor differences in panel height.
-
-Dashboard panels and rows are positioned using a gridPos object `{x: 0, y: 0, w: 24, h: 5}`. Units are in grid dimensions (24 columns, 1 height unit 30px). Rows and Panels objects exist (together) in a flat array directly on the dashboard root object. Rows are not needed for layouts anymore and are mainly there for backward compatibility. Some panel plugins that do not respect their panel height might require an update.
-
-# 4.7.0 (unreleased / v4.7.x branch)
-
## Breaking changes
-`[dashboard.json]` have been replaced with [dashboard provisioning](http://docs.grafana.org/administration/provisioning/).
-
+* **[dashboard.json]** have been replaced with [dashboard provisioning](http://docs.grafana.org/administration/provisioning/).
Config files for provisioning datasources as configuration have changed from `/conf/datasources` to `/conf/provisioning/datasources`.
From `/etc/grafana/datasources` to `/etc/grafana/provisioning/datasources` when installed with deb/rpm packages.
-The pagerduty notifier now defaults to not auto resolve incidents. More details at [#10222](https://github.com/grafana/grafana/issues/10222)
+* **Pagerduty** The notifier now defaults to not auto resolve incidents. More details at [#10222](https://github.com/grafana/grafana/issues/10222)
+
+## New Dashboard Grid
+
+The new grid engine is a major upgrade for how you can position and move panels. It enables new layouts and a much easier dashboard building experience. The change is backward compatible. So you can upgrade your current version to 5.0 without breaking dashboards, but you cannot downgrade from 5.0 to previous versions. Grafana will automatically upgrade your dashboards to the new schema and position panels to match your existing layout. There might be minor differences in panel height. If you upgrade to 5.0 and for some reason want to rollback to the previous version you can restore dashboards to previous versions using dashboard history. But that should only be seen as an emergency solution.
+
+Dashboard panels and rows are positioned using a gridPos object `{x: 0, y: 0, w: 24, h: 5}`. Units are in grid dimensions (24 columns, 1 height unit 30px). Rows and Panels objects exist (together) in a flat array directly on the dashboard root object. Rows are not needed for layouts anymore and are mainly there for backward compatibility. Some panel plugins that do not respect their panel height might require an update.
## New Features
+* **Alerting**: Add support for internal image store [#6922](https://github.com/grafana/grafana/issues/6922), thx [@FunkyM](https://github.com/FunkyM)
* **Data Source Proxy**: Add support for whitelisting specified cookies that will be passed through to the data source when proxying data source requests [#5457](https://github.com/grafana/grafana/issues/5457), thanks [@robingustafsson](https://github.com/robingustafsson)
* **Postgres/MySQL**: add __timeGroup macro for mysql [#9596](https://github.com/grafana/grafana/pull/9596), thanks [@svenklemm](https://github.com/svenklemm)
* **Text**: Text panel are now edited in the ace editor. [#9698](https://github.com/grafana/grafana/pull/9698), thx [@mtanda](https://github.com/mtanda)
@@ -38,7 +36,11 @@ The pagerduty notifier now defaults to not auto resolve incidents. More details
* **Dashboard as cfg**: Load dashboards from file into Grafana on startup/change [#9654](https://github.com/grafana/grafana/issues/9654) [#5269](https://github.com/grafana/grafana/issues/5269)
* **Prometheus**: Grafana can now send alerts to Prometheus Alertmanager while firing [#7481](https://github.com/grafana/grafana/issues/7481), thx [@Thib17](https://github.com/Thib17) and [@mtanda](https://github.com/mtanda)
* **Table**: Support multiple table formated queries in table panel [#9170](https://github.com/grafana/grafana/issues/9170), thx [@davkal](https://github.com/davkal)
+* **Security**: Protect against brute force (frequent) login attempts [#7616](https://github.com/grafana/grafana/issues/7616)
+
## Minor
+* **Graph**: Don't hide graph display options (Lines/Points) when draw mode is unchecked [#9770](https://github.com/grafana/grafana/issues/9770), thx [@Jonnymcc](https://github.com/Jonnymcc)
+* **Prometheus**: Show label name in paren after by/without/on/ignoring/group_left/group_right [#9664](https://github.com/grafana/grafana/pull/9664), thx [@mtanda](https://github.com/mtanda)
* **Alert panel**: Adds placeholder text when no alerts are within the time range [#9624](https://github.com/grafana/grafana/issues/9624), thx [@straend](https://github.com/straend)
* **Mysql**: MySQL enable MaxOpenCon and MaxIdleCon regards how constring is configured. [#9784](https://github.com/grafana/grafana/issues/9784), thx [@dfredell](https://github.com/dfredell)
* **Cloudwatch**: Fixes broken query inspector for cloudwatch [#9661](https://github.com/grafana/grafana/issues/9661), thx [@mtanda](https://github.com/mtanda)
@@ -48,10 +50,8 @@ The pagerduty notifier now defaults to not auto resolve incidents. More details
* **Github**: Use organizations_url provided from github to verify user belongs in org. [#10111](https://github.com/grafana/grafana/issues/10111), thx
[@adiletmaratov](https://github.com/adiletmaratov)
* **Backend**: Fixed bug where Grafana exited before all sub routines where finished [#10131](https://github.com/grafana/grafana/issues/10131)
-
-## Tech
-* **RabbitMq**: Remove support for publishing events to RabbitMQ [#9645](https://github.com/grafana/grafana/issues/9645)
-
+* **Azure**: Adds support for Azure blob storage as external image stor [#8955](https://github.com/grafana/grafana/issues/8955), thx [@saada](https://github.com/saada)
+* **Telegram**: Add support for inline image uploads to telegram notifier plugin [#9967](https://github.com/grafana/grafana/pull/9967), thx [@rburchell](https://github.com/rburchell)
## Fixes
* **Sensu**: Send alert message to sensu output [#9551](https://github.com/grafana/grafana/issues/9551), thx [@cjchand](https://github.com/cjchand)
@@ -59,6 +59,9 @@ The pagerduty notifier now defaults to not auto resolve incidents. More details
* **Postgres/MySQL**: Control quoting in SQL-queries when using template variables [#9030](https://github.com/grafana/grafana/issues/9030), thanks [@svenklemm](https://github.com/svenklemm)
* **Pagerduty**: Pagerduty dont auto resolve incidents by default anymore. [#10222](https://github.com/grafana/grafana/issues/10222)
+## Tech
+* **RabbitMq**: Remove support for publishing events to RabbitMQ [#9645](https://github.com/grafana/grafana/issues/9645)
+
# 4.6.3 (2017-12-14)
## Fixes
diff --git a/Gopkg.lock b/Gopkg.lock
new file mode 100644
index 00000000000..8d82b29d622
--- /dev/null
+++ b/Gopkg.lock
@@ -0,0 +1,636 @@
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
+[[projects]]
+ name = "cloud.google.com/go"
+ packages = ["compute/metadata"]
+ revision = "767c40d6a2e058483c25fa193e963a22da17236d"
+ version = "v0.18.0"
+
+[[projects]]
+ name = "github.com/BurntSushi/toml"
+ packages = ["."]
+ revision = "b26d9c308763d68093482582cea63d69be07a0f0"
+ version = "v0.3.0"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/Unknwon/com"
+ packages = ["."]
+ revision = "7677a1d7c1137cd3dd5ba7a076d0c898a1ef4520"
+
+[[projects]]
+ name = "github.com/apache/thrift"
+ packages = ["lib/go/thrift"]
+ revision = "b2a4d4ae21c789b689dd162deb819665567f481c"
+ version = "0.10.0"
+
+[[projects]]
+ name = "github.com/aws/aws-sdk-go"
+ packages = [
+ "aws",
+ "aws/awserr",
+ "aws/awsutil",
+ "aws/client",
+ "aws/client/metadata",
+ "aws/corehandlers",
+ "aws/credentials",
+ "aws/credentials/ec2rolecreds",
+ "aws/credentials/endpointcreds",
+ "aws/credentials/stscreds",
+ "aws/defaults",
+ "aws/ec2metadata",
+ "aws/endpoints",
+ "aws/request",
+ "aws/session",
+ "aws/signer/v4",
+ "internal/shareddefaults",
+ "private/protocol",
+ "private/protocol/ec2query",
+ "private/protocol/query",
+ "private/protocol/query/queryutil",
+ "private/protocol/rest",
+ "private/protocol/restxml",
+ "private/protocol/xml/xmlutil",
+ "service/cloudwatch",
+ "service/ec2",
+ "service/ec2/ec2iface",
+ "service/s3",
+ "service/sts"
+ ]
+ revision = "decd990ddc5dcdf2f73309cbcab90d06b996ca28"
+ version = "v1.12.67"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/benbjohnson/clock"
+ packages = ["."]
+ revision = "7dc76406b6d3c05b5f71a86293cbcf3c4ea03b19"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/beorn7/perks"
+ packages = ["quantile"]
+ revision = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/bmizerany/assert"
+ packages = ["."]
+ revision = "b7ed37b82869576c289d7d97fb2bbd8b64a0cb28"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/bradfitz/gomemcache"
+ packages = ["memcache"]
+ revision = "1952afaa557dc08e8e0d89eafab110fb501c1a2b"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/codahale/hdrhistogram"
+ packages = ["."]
+ revision = "3a0bb77429bd3a61596f5e8a3172445844342120"
+
+[[projects]]
+ name = "github.com/codegangsta/cli"
+ packages = ["."]
+ revision = "cfb38830724cc34fedffe9a2a29fb54fa9169cd1"
+ version = "v1.20.0"
+
+[[projects]]
+ name = "github.com/davecgh/go-spew"
+ packages = ["spew"]
+ revision = "346938d642f2ec3594ed81d874461961cd0faa76"
+ version = "v1.1.0"
+
+[[projects]]
+ name = "github.com/fatih/color"
+ packages = ["."]
+ revision = "570b54cabe6b8eb0bc2dfce68d964677d63b5260"
+ version = "v1.5.0"
+
+[[projects]]
+ name = "github.com/go-ini/ini"
+ packages = ["."]
+ revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a"
+ version = "v1.32.0"
+
+[[projects]]
+ name = "github.com/go-ldap/ldap"
+ packages = ["."]
+ revision = "bb7a9ca6e4fbc2129e3db588a34bc970ffe811a9"
+ version = "v2.5.1"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/go-macaron/binding"
+ packages = ["."]
+ revision = "ac54ee249c27dca7e76fad851a4a04b73bd1b183"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/go-macaron/gzip"
+ packages = ["."]
+ revision = "cad1c6580a07c56f5f6bc52d66002a05985c5854"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/go-macaron/inject"
+ packages = ["."]
+ revision = "d8a0b8677191f4380287cfebd08e462217bac7ad"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/go-macaron/session"
+ packages = [
+ ".",
+ "memcache",
+ "mysql",
+ "postgres",
+ "redis"
+ ]
+ revision = "b8e286a0dba8f4999042d6b258daf51b31d08938"
+
+[[projects]]
+ name = "github.com/go-sql-driver/mysql"
+ packages = ["."]
+ revision = "2cc627ac8defc45d65066ae98f898166f580f9a4"
+
+[[projects]]
+ name = "github.com/go-stack/stack"
+ packages = ["."]
+ revision = "259ab82a6cad3992b4e21ff5cac294ccb06474bc"
+ version = "v1.7.0"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/go-xorm/builder"
+ packages = ["."]
+ revision = "488224409dd8aa2ce7a5baf8d10d55764a913738"
+
+[[projects]]
+ name = "github.com/go-xorm/core"
+ packages = ["."]
+ revision = "e8409d73255791843585964791443dbad877058c"
+
+[[projects]]
+ name = "github.com/go-xorm/xorm"
+ packages = ["."]
+ revision = "6687a2b4e824f4d87f2d65060ec5cb0d896dff1e"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/golang/protobuf"
+ packages = [
+ "proto",
+ "ptypes",
+ "ptypes/any",
+ "ptypes/duration",
+ "ptypes/timestamp"
+ ]
+ revision = "c65a0412e71e8b9b3bfd22925720d23c0f054237"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/gopherjs/gopherjs"
+ packages = ["js"]
+ revision = "178c176a91fe05e3e6c58fa5c989bad19e6cdcb3"
+
+[[projects]]
+ name = "github.com/gorilla/websocket"
+ packages = ["."]
+ revision = "ea4d1f681babbce9545c9c5f3d5194a789c89f5b"
+ version = "v1.2.0"
+
+[[projects]]
+ name = "github.com/gosimple/slug"
+ packages = ["."]
+ revision = "e9f42fa127660e552d0ad2b589868d403a9be7c6"
+ version = "v1.1.1"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/grafana/grafana_plugin_model"
+ packages = ["go/datasource"]
+ revision = "dfe5dc0a6ce05825ba7fe2d0323d92e631bffa89"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/hashicorp/go-hclog"
+ packages = ["."]
+ revision = "5bcb0f17e36442247290887cc914a6e507afa5c4"
+
+[[projects]]
+ name = "github.com/hashicorp/go-plugin"
+ packages = ["."]
+ revision = "3e6d191694b5a3a2b99755f31b47fa209e4bcd09"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/hashicorp/go-version"
+ packages = ["."]
+ revision = "4fe82ae3040f80a03d04d2cccb5606a626b8e1ee"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/hashicorp/yamux"
+ packages = ["."]
+ revision = "683f49123a33db61abfb241b7ac5e4af4dc54d55"
+
+[[projects]]
+ name = "github.com/inconshreveable/log15"
+ packages = ["."]
+ revision = "0decfc6c20d9ca0ad143b0e89dcaa20f810b4fb3"
+ version = "v2.13"
+
+[[projects]]
+ name = "github.com/jmespath/go-jmespath"
+ packages = ["."]
+ revision = "0b12d6b5"
+
+[[projects]]
+ name = "github.com/jtolds/gls"
+ packages = ["."]
+ revision = "77f18212c9c7edc9bd6a33d383a7b545ce62f064"
+ version = "v4.2.1"
+
+[[projects]]
+ name = "github.com/klauspost/compress"
+ packages = [
+ "flate",
+ "gzip"
+ ]
+ revision = "6c8db69c4b49dd4df1fff66996cf556176d0b9bf"
+ version = "v1.2.1"
+
+[[projects]]
+ name = "github.com/klauspost/cpuid"
+ packages = ["."]
+ revision = "ae7887de9fa5d2db4eaa8174a7eff2c1ac00f2da"
+ version = "v1.1"
+
+[[projects]]
+ name = "github.com/klauspost/crc32"
+ packages = ["."]
+ revision = "cb6bfca970f6908083f26f39a79009d608efd5cd"
+ version = "v1.1"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/kr/pretty"
+ packages = ["."]
+ revision = "cfb55aafdaf3ec08f0db22699ab822c50091b1c4"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/kr/text"
+ packages = ["."]
+ revision = "7cafcd837844e784b526369c9bce262804aebc60"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/lib/pq"
+ packages = [
+ ".",
+ "oid"
+ ]
+ revision = "61fe37aa2ee24fabcdbe5c4ac1d4ac566f88f345"
+
+[[projects]]
+ name = "github.com/mattn/go-colorable"
+ packages = ["."]
+ revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072"
+ version = "v0.0.9"
+
+[[projects]]
+ name = "github.com/mattn/go-isatty"
+ packages = ["."]
+ revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39"
+ version = "v0.0.3"
+
+[[projects]]
+ name = "github.com/mattn/go-sqlite3"
+ packages = ["."]
+ revision = "6c771bb9887719704b210e87e934f08be014bdb1"
+ version = "v1.6.0"
+
+[[projects]]
+ name = "github.com/matttproud/golang_protobuf_extensions"
+ packages = ["pbutil"]
+ revision = "3247c84500bff8d9fb6d579d800f20b3e091582c"
+ version = "v1.0.0"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/mitchellh/go-testing-interface"
+ packages = ["."]
+ revision = "a61a99592b77c9ba629d254a693acffaeb4b7e28"
+
+[[projects]]
+ name = "github.com/opentracing/opentracing-go"
+ packages = [
+ ".",
+ "ext",
+ "log"
+ ]
+ revision = "1949ddbfd147afd4d964a9f00b24eb291e0e7c38"
+ version = "v1.0.2"
+
+[[projects]]
+ name = "github.com/patrickmn/go-cache"
+ packages = ["."]
+ revision = "a3647f8e31d79543b2d0f0ae2fe5c379d72cedc0"
+ version = "v2.1.0"
+
+[[projects]]
+ name = "github.com/prometheus/client_golang"
+ packages = [
+ "api",
+ "api/prometheus/v1",
+ "prometheus",
+ "prometheus/promhttp"
+ ]
+ revision = "967789050ba94deca04a5e84cce8ad472ce313c1"
+ version = "v0.9.0-pre1"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/prometheus/client_model"
+ packages = ["go"]
+ revision = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/prometheus/common"
+ packages = [
+ "expfmt",
+ "internal/bitbucket.org/ww/goautoneg",
+ "model"
+ ]
+ revision = "89604d197083d4781071d3c65855d24ecfb0a563"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/prometheus/procfs"
+ packages = [
+ ".",
+ "internal/util",
+ "nfsd",
+ "xfs"
+ ]
+ revision = "85fadb6e89903ef7cca6f6a804474cd5ea85b6e1"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/rainycape/unidecode"
+ packages = ["."]
+ revision = "cb7f23ec59bec0d61b19c56cd88cee3d0cc1870c"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/sergi/go-diff"
+ packages = ["diffmatchpatch"]
+ revision = "1744e2970ca51c86172c8190fadad617561ed6e7"
+
+[[projects]]
+ name = "github.com/smartystreets/assertions"
+ packages = [
+ ".",
+ "internal/go-render/render",
+ "internal/oglematchers"
+ ]
+ revision = "0b37b35ec7434b77e77a4bb29b79677cced992ea"
+ version = "1.8.1"
+
+[[projects]]
+ name = "github.com/smartystreets/goconvey"
+ packages = [
+ "convey",
+ "convey/gotest",
+ "convey/reporting"
+ ]
+ revision = "9e8dc3f972df6c8fcc0375ef492c24d0bb204857"
+ version = "1.6.3"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/teris-io/shortid"
+ packages = ["."]
+ revision = "771a37caa5cf0c81f585d7b6df4dfc77e0615b5c"
+
+[[projects]]
+ name = "github.com/uber/jaeger-client-go"
+ packages = [
+ ".",
+ "config",
+ "internal/baggage",
+ "internal/baggage/remote",
+ "internal/spanlog",
+ "log",
+ "rpcmetrics",
+ "thrift-gen/agent",
+ "thrift-gen/baggage",
+ "thrift-gen/jaeger",
+ "thrift-gen/sampling",
+ "thrift-gen/zipkincore",
+ "utils"
+ ]
+ revision = "3ac96c6e679cb60a74589b0d0aa7c70a906183f7"
+ version = "v2.11.2"
+
+[[projects]]
+ name = "github.com/uber/jaeger-lib"
+ packages = ["metrics"]
+ revision = "7f95f4f7e80028096410abddaae2556e4c61b59f"
+ version = "v1.3.1"
+
+[[projects]]
+ name = "github.com/yudai/gojsondiff"
+ packages = [
+ ".",
+ "formatter"
+ ]
+ revision = "7b1b7adf999dab73a6eb02669c3d82dbb27a3dd6"
+ version = "1.0.0"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/yudai/golcs"
+ packages = ["."]
+ revision = "ecda9a501e8220fae3b4b600c3db4b0ba22cfc68"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/crypto"
+ packages = ["pbkdf2"]
+ revision = "3d37316aaa6bd9929127ac9a527abf408178ea7b"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/net"
+ packages = [
+ "context",
+ "context/ctxhttp",
+ "http2",
+ "http2/hpack",
+ "idna",
+ "internal/timeseries",
+ "lex/httplex",
+ "trace"
+ ]
+ revision = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/oauth2"
+ packages = [
+ ".",
+ "google",
+ "internal",
+ "jws",
+ "jwt"
+ ]
+ revision = "b28fcf2b08a19742b43084fb40ab78ac6c3d8067"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/sync"
+ packages = ["errgroup"]
+ revision = "fd80eb99c8f653c847d294a001bdf2a3a6f768f5"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/sys"
+ packages = ["unix"]
+ revision = "af50095a40f9041b3b38960738837185c26e9419"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/text"
+ packages = [
+ "collate",
+ "collate/build",
+ "internal/colltab",
+ "internal/gen",
+ "internal/tag",
+ "internal/triegen",
+ "internal/ucd",
+ "language",
+ "secure/bidirule",
+ "transform",
+ "unicode/bidi",
+ "unicode/cldr",
+ "unicode/norm",
+ "unicode/rangetable"
+ ]
+ revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3"
+
+[[projects]]
+ name = "google.golang.org/appengine"
+ packages = [
+ ".",
+ "cloudsql",
+ "internal",
+ "internal/app_identity",
+ "internal/base",
+ "internal/datastore",
+ "internal/log",
+ "internal/modules",
+ "internal/remote_api",
+ "internal/urlfetch",
+ "urlfetch"
+ ]
+ revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a"
+ version = "v1.0.0"
+
+[[projects]]
+ branch = "master"
+ name = "google.golang.org/genproto"
+ packages = ["googleapis/rpc/status"]
+ revision = "a8101f21cf983e773d0c1133ebc5424792003214"
+
+[[projects]]
+ name = "google.golang.org/grpc"
+ packages = [
+ ".",
+ "balancer",
+ "balancer/base",
+ "balancer/roundrobin",
+ "codes",
+ "connectivity",
+ "credentials",
+ "encoding",
+ "grpclb/grpc_lb_v1/messages",
+ "grpclog",
+ "health",
+ "health/grpc_health_v1",
+ "internal",
+ "keepalive",
+ "metadata",
+ "naming",
+ "peer",
+ "resolver",
+ "resolver/dns",
+ "resolver/passthrough",
+ "stats",
+ "status",
+ "tap",
+ "transport"
+ ]
+ revision = "6b51017f791ae1cfbec89c52efdf444b13b550ef"
+ version = "v1.9.2"
+
+[[projects]]
+ branch = "v3"
+ name = "gopkg.in/alexcesaro/quotedprintable.v3"
+ packages = ["."]
+ revision = "2caba252f4dc53eaf6b553000885530023f54623"
+
+[[projects]]
+ name = "gopkg.in/asn1-ber.v1"
+ packages = ["."]
+ revision = "379148ca0225df7a432012b8df0355c2a2063ac0"
+ version = "v1.2"
+
+[[projects]]
+ name = "gopkg.in/bufio.v1"
+ packages = ["."]
+ revision = "567b2bfa514e796916c4747494d6ff5132a1dfce"
+ version = "v1"
+
+[[projects]]
+ branch = "v2"
+ name = "gopkg.in/gomail.v2"
+ packages = ["."]
+ revision = "81ebce5c23dfd25c6c67194b37d3dd3f338c98b1"
+
+[[projects]]
+ name = "gopkg.in/ini.v1"
+ packages = ["."]
+ revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a"
+ version = "v1.32.0"
+
+[[projects]]
+ name = "gopkg.in/macaron.v1"
+ packages = ["."]
+ revision = "75f2e9b42e99652f0d82b28ccb73648f44615faa"
+ version = "v1.2.4"
+
+[[projects]]
+ name = "gopkg.in/redis.v2"
+ packages = ["."]
+ revision = "e6179049628164864e6e84e973cfb56335748dea"
+ version = "v2.3.2"
+
+[[projects]]
+ branch = "v2"
+ name = "gopkg.in/yaml.v2"
+ packages = ["."]
+ revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4"
+
+[solve-meta]
+ analyzer-name = "dep"
+ analyzer-version = 1
+ inputs-digest = "4de68f1342ba98a637ec8ca7496aeeae2021bf9e4c7c80db7924e14709151a62"
+ solver-name = "gps-cdcl"
+ solver-version = 1
diff --git a/Gopkg.toml b/Gopkg.toml
new file mode 100644
index 00000000000..22c56d29c71
--- /dev/null
+++ b/Gopkg.toml
@@ -0,0 +1,199 @@
+# Gopkg.toml example
+#
+# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
+# for detailed Gopkg.toml documentation.
+#
+# required = ["github.com/user/thing/cmd/thing"]
+# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
+#
+# [[constraint]]
+# name = "github.com/user/project"
+# version = "1.0.0"
+#
+# [[constraint]]
+# name = "github.com/user/project2"
+# branch = "dev"
+# source = "github.com/myfork/project2"
+#
+# [[override]]
+# name = "github.com/x/y"
+# version = "2.4.0"
+
+ignored = [
+ "github.com/grafana/grafana/data/*",
+ "github.com/grafana/grafana/public/*",
+ "github.com/grafana/grafana/node_modules/*"
+ ]
+
+[[constraint]]
+ name = "github.com/BurntSushi/toml"
+ version = "0.3.0"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/Unknwon/com"
+ #version = "1.0.0"
+
+[[constraint]]
+ name = "github.com/aws/aws-sdk-go"
+ version = "1.12.65"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/benbjohnson/clock"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/bmizerany/assert"
+
+[[constraint]]
+ name = "github.com/codegangsta/cli"
+ version = "1.20.0"
+
+[[constraint]]
+ name = "github.com/davecgh/go-spew"
+ version = "1.1.0"
+
+[[constraint]]
+ name = "github.com/fatih/color"
+ version = "1.5.0"
+
+[[constraint]]
+ name = "github.com/go-ldap/ldap"
+ version = "2.5.1"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/go-macaron/binding"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/go-macaron/gzip"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/go-macaron/session"
+
+[[constraint]]
+ name = "github.com/go-sql-driver/mysql"
+ revision = "2cc627ac8defc45d65066ae98f898166f580f9a4"
+ #version = "1.3.0" //keeping this since we would rather depend on version then commit
+
+[[constraint]]
+ name = "github.com/go-stack/stack"
+ version = "1.7.0"
+
+[[constraint]]
+ name = "github.com/go-xorm/core"
+ revision = "e8409d73255791843585964791443dbad877058c"
+ #version = "0.5.7" //keeping this since we would rather depend on version then commit
+
+[[constraint]]
+ name = "github.com/go-xorm/xorm"
+ revision = "6687a2b4e824f4d87f2d65060ec5cb0d896dff1e"
+ #version = "0.6.4" //keeping this since we would rather depend on version then commit
+
+[[constraint]]
+ name = "github.com/gorilla/websocket"
+ version = "1.2.0"
+
+[[constraint]]
+ name = "github.com/gosimple/slug"
+ version = "1.1.1"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/grafana/grafana_plugin_model"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/hashicorp/go-hclog"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/hashicorp/go-version"
+
+[[constraint]]
+ name = "github.com/inconshreveable/log15"
+ version = "2.13.0"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/lib/pq"
+
+[[constraint]]
+ name = "github.com/mattn/go-isatty"
+ version = "0.0.3"
+
+[[constraint]]
+ name = "github.com/mattn/go-sqlite3"
+ version = "1.6.0"
+
+[[constraint]]
+ name = "github.com/opentracing/opentracing-go"
+ version = "1.0.2"
+
+[[constraint]]
+ name = "github.com/patrickmn/go-cache"
+ version = "2.1.0"
+
+[[constraint]]
+ name = "github.com/prometheus/client_golang"
+ version = "0.9.0-pre1"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/prometheus/client_model"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/prometheus/common"
+
+[[constraint]]
+ name = "github.com/smartystreets/goconvey"
+ version = "1.6.3"
+
+[[constraint]]
+ name = "github.com/uber/jaeger-client-go"
+ version = "2.11.2"
+
+[[constraint]]
+ name = "github.com/yudai/gojsondiff"
+ version = "1.0.0"
+
+[[constraint]]
+ branch = "master"
+ name = "golang.org/x/net"
+
+[[constraint]]
+ branch = "master"
+ name = "golang.org/x/oauth2"
+
+[[constraint]]
+ branch = "master"
+ name = "golang.org/x/sync"
+
+[[constraint]]
+ name = "gopkg.in/gomail.v2"
+ branch = "v2"
+
+[[constraint]]
+ name = "gopkg.in/ini.v1"
+ version = "1.32.0"
+
+[[constraint]]
+ name = "gopkg.in/macaron.v1"
+ version = "1.2.4"
+
+[[constraint]]
+ branch = "v2"
+ name = "gopkg.in/yaml.v2"
+
+[prune]
+ non-go = true
+ go-tests = true
+ unused-packages = true
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/teris-io/shortid"
diff --git a/Makefile b/Makefile
index d003cda6dd4..d89718d200c 100644
--- a/Makefile
+++ b/Makefile
@@ -26,3 +26,6 @@ test: test-go test-js
run:
./bin/grafana-server
+
+protoc:
+ protoc -I pkg/tsdb/models pkg/tsdb/models/*.proto --go_out=plugins=grpc:pkg/tsdb/models/.
\ No newline at end of file
diff --git a/README.md b/README.md
index 069958d9031..80a80b694c1 100644
--- a/README.md
+++ b/README.md
@@ -45,23 +45,17 @@ For this you need nodejs (v.6+).
```bash
npm install -g yarn
yarn install --pure-lockfile
-npm run build
-```
-
-To rebuild frontend assets (typescript, sass etc) as you change them start the watcher via.
-
-```bash
npm run watch
```
-Run tests
+Run tests
```bash
-npm run test
+npm run jest
```
-Run tests in watch mode
+Run karma tests
```bash
-npm run watch-test
+npm run karma
```
### Recompile backend on source change
diff --git a/build.go b/build.go
index 1c61c72d5dc..d55244246ff 100644
--- a/build.go
+++ b/build.go
@@ -347,11 +347,11 @@ func ChangeWorkingDir(dir string) {
}
func grunt(params ...string) {
- if runtime.GOOS == "windows" {
- runPrint(`.\node_modules\.bin\grunt`, params...)
- } else {
- runPrint("./node_modules/.bin/grunt", params...)
- }
+ if runtime.GOOS == "windows" {
+ runPrint(`.\node_modules\.bin\grunt`, params...)
+ } else {
+ runPrint("./node_modules/.bin/grunt", params...)
+ }
}
func gruntBuildArg(task string) []string {
@@ -371,7 +371,7 @@ func gruntBuildArg(task string) []string {
}
func setup() {
- runPrint("go", "get", "-v", "github.com/kardianos/govendor")
+ runPrint("go", "get", "-v", "github.com/golang/dep")
runPrint("go", "install", "-v", "./pkg/cmd/grafana-server")
}
diff --git a/circle.yml b/circle.yml
index 4eb600bfde3..bf013e3f5b1 100644
--- a/circle.yml
+++ b/circle.yml
@@ -9,7 +9,7 @@ machine:
GOPATH: "/home/ubuntu/.go_workspace"
ORG_PATH: "github.com/grafana"
REPO_PATH: "${ORG_PATH}/grafana"
- GODIST: "go1.9.2.linux-amd64.tar.gz"
+ GODIST: "go1.9.3.linux-amd64.tar.gz"
post:
- mkdir -p ~/download
- mkdir -p ~/docker
diff --git a/conf/defaults.ini b/conf/defaults.ini
index e16ef95178a..3766c829323 100644
--- a/conf/defaults.ini
+++ b/conf/defaults.ini
@@ -174,6 +174,9 @@ disable_gravatar = false
# data source proxy whitelist (ip_or_domain:port separated by spaces)
data_source_proxy_whitelist =
+# disable protection against brute force login attempts
+disable_brute_force_login_protection = false
+
#################################### Snapshots ###########################
[snapshots]
# snapshot sharing options
@@ -473,7 +476,7 @@ sampler_param = 1
#################################### External Image Storage ##############
[external_image_storage]
-# You can choose between (s3, webdav, gcs)
+# You can choose between (s3, webdav, gcs, azure_blob, local)
provider =
[external_image_storage.s3]
@@ -493,4 +496,12 @@ public_url =
[external_image_storage.gcs]
key_file =
bucket =
-path =
\ No newline at end of file
+path =
+
+[external_image_storage.azure_blob]
+account_name =
+account_key =
+container_name =
+
+[external_image_storage.local]
+# does not require any configuration
diff --git a/conf/sample.ini b/conf/sample.ini
index 544fa7e0c7d..784f6b7cfc9 100644
--- a/conf/sample.ini
+++ b/conf/sample.ini
@@ -162,6 +162,9 @@ log_queries =
# data source proxy whitelist (ip_or_domain:port separated by spaces)
;data_source_proxy_whitelist =
+# disable protection against brute force login attempts
+;disable_brute_force_login_protection = false
+
#################################### Snapshots ###########################
[snapshots]
# snapshot sharing options
@@ -417,7 +420,7 @@ log_queries =
#################################### External image storage ##########################
[external_image_storage]
# Used for uploading images to public servers so they can be included in slack/email messages.
-# you can choose between (s3, webdav, gcs)
+# you can choose between (s3, webdav, gcs, azure_blob, local)
;provider =
[external_image_storage.s3]
@@ -436,4 +439,12 @@ log_queries =
[external_image_storage.gcs]
;key_file =
;bucket =
-;path =
\ No newline at end of file
+;path =
+
+[external_image_storage.azure_blob]
+;account_name =
+;account_key =
+;container_name =
+
+[external_image_storage.local]
+# does not require any configuration
diff --git a/docker/blocks/apache_proxy/Dockerfile b/docker/blocks/apache_proxy/Dockerfile
new file mode 100644
index 00000000000..37c2a4e493b
--- /dev/null
+++ b/docker/blocks/apache_proxy/Dockerfile
@@ -0,0 +1,4 @@
+FROM jmferrer/apache2-reverse-proxy:latest
+
+COPY ports.conf /etc/apache2/sites-enabled
+COPY proxy.conf /etc/apache2/sites-enabled
\ No newline at end of file
diff --git a/docker/blocks/apache_proxy/docker-compose.yaml b/docker/blocks/apache_proxy/docker-compose.yaml
new file mode 100644
index 00000000000..2aec3d4bc4f
--- /dev/null
+++ b/docker/blocks/apache_proxy/docker-compose.yaml
@@ -0,0 +1,9 @@
+# This will proxy all requests for http://localhost:10081/grafana/ to
+# http://localhost:3000 (Grafana running locally)
+#
+# Please note that you'll need to change the root_url in the Grafana configuration:
+# root_url = %(protocol)s://%(domain)s:/grafana/
+
+ apacheproxy:
+ build: blocks/apache_proxy
+ network_mode: host
diff --git a/docker/blocks/apache_proxy/ports.conf b/docker/blocks/apache_proxy/ports.conf
new file mode 100644
index 00000000000..e7a5f9712af
--- /dev/null
+++ b/docker/blocks/apache_proxy/ports.conf
@@ -0,0 +1 @@
+Listen 10081
\ No newline at end of file
diff --git a/docker/blocks/apache_proxy/proxy.conf b/docker/blocks/apache_proxy/proxy.conf
new file mode 100644
index 00000000000..5eb35cbe8b9
--- /dev/null
+++ b/docker/blocks/apache_proxy/proxy.conf
@@ -0,0 +1,4 @@
+
+ ProxyPass /grafana/ http://localhost:3000/
+ ProxyPassReverse /grafana/ http://localhost:3000/
+
\ No newline at end of file
diff --git a/docker/blocks/mysql/docker-compose.yaml b/docker/blocks/mysql/docker-compose.yaml
index 6eee158ac43..f7881e66539 100644
--- a/docker/blocks/mysql/docker-compose.yaml
+++ b/docker/blocks/mysql/docker-compose.yaml
@@ -12,3 +12,10 @@
- /etc/timezone:/etc/timezone:ro
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb_monitor_enable=all]
+ fake-mysql-data:
+ image: grafana/fake-data-gen
+ network_mode: bridge
+ environment:
+ FD_DATASOURCE: mysql
+ FD_PORT: 3306
+
diff --git a/docker/blocks/mysql_tests/docker-compose.yaml b/docker/blocks/mysql_tests/docker-compose.yaml
index c6c3097d463..3c59b66b5ac 100644
--- a/docker/blocks/mysql_tests/docker-compose.yaml
+++ b/docker/blocks/mysql_tests/docker-compose.yaml
@@ -7,4 +7,7 @@
MYSQL_PASSWORD: password
ports:
- "3306:3306"
+ volumes:
+ - /etc/localtime:/etc/localtime:ro
+ - /etc/timezone:/etc/timezone:ro
tmpfs: /var/lib/mysql:rw
diff --git a/docker/blocks/nginx_proxy/Dockerfile b/docker/blocks/nginx_proxy/Dockerfile
new file mode 100644
index 00000000000..9ded20dfdda
--- /dev/null
+++ b/docker/blocks/nginx_proxy/Dockerfile
@@ -0,0 +1,3 @@
+FROM nginx:alpine
+
+COPY nginx.conf /etc/nginx/nginx.conf
\ No newline at end of file
diff --git a/docker/blocks/nginx_proxy/docker-compose.yaml b/docker/blocks/nginx_proxy/docker-compose.yaml
new file mode 100644
index 00000000000..7c3447ade5c
--- /dev/null
+++ b/docker/blocks/nginx_proxy/docker-compose.yaml
@@ -0,0 +1,9 @@
+# This will proxy all requests for http://localhost:10080/grafana/ to
+# http://localhost:3000 (Grafana running locally)
+#
+# Please note that you'll need to change the root_url in the Grafana configuration:
+# root_url = %(protocol)s://%(domain)s:/grafana/
+
+ nginxproxy:
+ build: blocks/nginx_proxy
+ network_mode: host
diff --git a/docker/blocks/nginx_proxy/nginx.conf b/docker/blocks/nginx_proxy/nginx.conf
new file mode 100644
index 00000000000..18e27b3fb01
--- /dev/null
+++ b/docker/blocks/nginx_proxy/nginx.conf
@@ -0,0 +1,19 @@
+events { worker_connections 1024; }
+
+http {
+ sendfile on;
+
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Host $server_name;
+
+ server {
+ listen 10080;
+
+ location /grafana/ {
+ proxy_pass http://localhost:3000/;
+ }
+ }
+}
\ No newline at end of file
diff --git a/docker/blocks/postgres/docker-compose.yaml b/docker/blocks/postgres/docker-compose.yaml
index eced00aafeb..566df7b8877 100644
--- a/docker/blocks/postgres/docker-compose.yaml
+++ b/docker/blocks/postgres/docker-compose.yaml
@@ -7,3 +7,10 @@
ports:
- "5432:5432"
command: postgres -c log_connections=on -c logging_collector=on -c log_destination=stderr -c log_directory=/var/log/postgresql
+
+ fake-postgres-data:
+ image: grafana/fake-data-gen
+ network_mode: bridge
+ environment:
+ FD_DATASOURCE: postgres
+ FD_PORT: 5432
\ No newline at end of file
diff --git a/docker/blocks/prometheus/Dockerfile b/docker/blocks/prometheus/Dockerfile
index 1ad28f524ff..2098e6527d3 100644
--- a/docker/blocks/prometheus/Dockerfile
+++ b/docker/blocks/prometheus/Dockerfile
@@ -1,3 +1,3 @@
-FROM prom/prometheus
+FROM prom/prometheus:v1.8.2
ADD prometheus.yml /etc/prometheus/
ADD alert.rules /etc/prometheus/
diff --git a/docs/Dockerfile b/docs/Dockerfile
index 7679f2b7e4b..faf90ea0ecd 100644
--- a/docs/Dockerfile
+++ b/docs/Dockerfile
@@ -9,5 +9,6 @@ FROM grafana/docs-base:latest
COPY config.toml /site
COPY awsconfig /site
+COPY versions.json /site/static/js
VOLUME ["/site/content"]
diff --git a/docs/sources/administration/cli.md b/docs/sources/administration/cli.md
index 2be1881cfab..3dc9b0cf3b4 100644
--- a/docs/sources/administration/cli.md
+++ b/docs/sources/administration/cli.md
@@ -10,17 +10,17 @@ weight = 8
# Grafana CLI
-Grafana cli is a small executable that is bundled with grafana server and is suppose to be executed on the same machine as grafana runs.
+Grafana cli is a small executable that is bundled with Grafana-server and is supposed to be executed on the same machine Grafana-server is running on.
## Plugins
-The CLI helps you install, upgrade and manage your plugins on the same machine it CLI is running.
-You can find more information about how to install and manage your plugins at the
-[plugin page]({{< relref "plugins/installation.md" >}}).
+The CLI allows you to install, upgrade and manage your plugins on the machine it is running on.
+You can find more information about how to install and manage your plugins in the
+[plugins page]({{< relref "plugins/installation.md" >}}).
## Admin
-> This feature is only available in grafana 4.1 and above.
+> This feature is only available in Grafana 4.1 and above.
To show all admin commands:
`grafana-cli admin`
@@ -39,7 +39,7 @@ then there are two flags that can be used to set homepath and the config file pa
`grafana-cli admin reset-admin-password --homepath "/usr/share/grafana" newpass`
-If you have not lost the admin password then it is better to set in the Grafana UI. If you need to set the password in a script then the [Grafana API](http://docs.grafana.org/http_api/user/#change-password) can be used. Here is an example with curl using basic auth:
+If you have not lost the admin password then it is better to set in the Grafana UI. If you need to set the password in a script then the [Grafana API](http://docs.grafana.org/http_api/user/#change-password) can be used. Here is an example using curl with basic auth:
```bash
curl -X PUT -H "Content-Type: application/json" -d '{
diff --git a/docs/sources/administration/metrics.md b/docs/sources/administration/metrics.md
index 56d0290bc82..5eed2b7ce15 100644
--- a/docs/sources/administration/metrics.md
+++ b/docs/sources/administration/metrics.md
@@ -10,6 +10,6 @@ weight = 8
# Internal metrics
-Grafana collects some metrics about it self internally. Currently Grafana supports pushing metrics to graphite and exposing them to be scraped by Prometheus.
+Grafana collects some metrics about itself internally. Currently, Grafana supports pushing metrics to Graphite or exposing them to be scraped by Prometheus.
-To enabled internal metrics you have to enable it under the [metrics] section in your [grafana.ini](http://docs.grafana.org/installation/configuration/#enabled-6) config file.If you want to push metrics to graphite you have also have to configure the [metrics.graphite](http://docs.grafana.org/installation/configuration/#metrics-graphite) section.
+To emit internal metrics you have to enable the option under the [metrics] section in your [grafana.ini](http://docs.grafana.org/installation/configuration/#enabled-6) config file. If you want to push metrics to Graphite, you must also configure the [metrics.graphite](http://docs.grafana.org/installation/configuration/#metrics-graphite) section.
diff --git a/docs/sources/administration/permissions.md b/docs/sources/administration/permissions.md
new file mode 100644
index 00000000000..5cfc6ecac9c
--- /dev/null
+++ b/docs/sources/administration/permissions.md
@@ -0,0 +1,76 @@
++++
+title = "Permissions"
+description = "Grafana user permissions"
+keywords = ["grafana", "configuration", "documentation", "admin", "users", "permissions"]
+type = "docs"
+aliases = ["/reference/admin"]
+[menu.docs]
+name = "Permissions"
+parent = "admin"
+weight = 3
++++
+
+# Permissions
+
+Grafana users have permissions that are determined by their:
+
+- **Organization Role** (Admin, Editor, Viewer)
+- Via **Team** memberships where the **Team** has been assigned specific permissions.
+- Via permissions assigned directly to user (on folders or dashboards)
+- The Grafana Admin (i.e. Super Admin) user flag.
+
+## Organization Roles
+
+Users can be belong to one or more organizations. A user's organization membership is tied to a role that defines what the user is allowed to do
+in that organization.
+
+### Admin Role
+
+Can do everything scoped to the organization. For example:
+
+- Add & Edit data data sources.
+- Add & Edit organization users & teams.
+- Configure App plugins & set org settings.
+
+### Editor Role
+
+- Can create and modify dashboards & alert rules. This can be disabled on specific folders and dashboards.
+- **Cannot** create or edit data sources nor invite new users.
+
+### Viewer Role
+
+- View any dashboard. This can be disabled on specific folders and dashboards.
+- **Cannot** create or edit dashboards nor data sources.
+
+This role can be tweaked via Grafana server setting [viewers_can_edit]({{< relref "installation/configuration.md#viewers-can-edit" >}}). If you set this to true users
+with **Viewer** can also make transient dashboard edits, meaning they can modify panels & queries but not save the changes (nor create new dashboards).
+Useful for public Grafana installations where you want anonymous users to be able to edit panels & queries but not save or create new dashboards.
+
+## Grafana Admin
+
+This admin flag makes a user a `Super Admin`. This means they can access the `Server Admin` views where all users and organizations can be administrated.
+
+### Dashboard & Folder Permissions
+
+> Introduced in Grafana v5.0
+
+{{< docs-imagebox img="/img/docs/v50/folder_permissions.png" max-width="500px" class="docs-image--right" >}}
+
+For dashboards and dashboard folders there is a **Permissions** page that make it possible to
+remove the default role based permssions for Editors and Viewers. It's here you can add and assign permissions to specific **Users** and **Teams**.
+
+You can assign & remove permissions for **Organization Roles**, **Users** and **Teams**.
+
+Permission levels:
+
+- **Admin**: Can edit & create dashboards and edit permissions.
+- **Edit**: Can edit & create dashboards. **Cannot** edit folder/dashboard permissions.
+- **View**: Can only view existing dashboars/folders.
+
+#### Restricting access
+
+The highest permission always wins so if you for example want to hide a folder or dashboard from others you need to remove the **Organization Role** based permission from the
+Access Control List (ACL).
+
+- You cannot override permissions for users with **Org Admin Role**
+- A more specific permission with lower permission level will not have any effect if a more general rule exists with higher permission level. For example if "Everyone with Editor Role Can Edit" exists in the ACL list then **John Doe** will still have Edit permission even after you have specifically added a permission for this user with the permission set to **View**. You need to remove or lower the permission level of the more general rule.
\ No newline at end of file
diff --git a/docs/sources/administration/provisioning.md b/docs/sources/administration/provisioning.md
index 3dd5c5fd1d3..c3595969281 100644
--- a/docs/sources/administration/provisioning.md
+++ b/docs/sources/administration/provisioning.md
@@ -3,6 +3,7 @@ title = "Provisioning"
description = ""
keywords = ["grafana", "provisioning"]
type = "docs"
+aliases = ["/installation/provisioning"]
[menu.docs]
parent = "admin"
weight = 8
@@ -12,7 +13,7 @@ weight = 8
## Config file
-Checkout the [configuration](/installation/configuration) page for more information about what you can configure in `grafana.ini`
+Checkout the [configuration](/installation/configuration) page for more information on what you can configure in `grafana.ini`
### Config file locations
@@ -35,7 +36,7 @@ GF__
```
Where the section name is the text within the brackets. Everything
-should be upper case, `.` should be replaced by `_`. For example, given these configuration settings:
+should be upper case and `.` should be replaced by `_`. For example, given these configuration settings:
```bash
# default section
@@ -48,7 +49,7 @@ admin_user = admin
client_secret = 0ldS3cretKey
```
-Then you can override them using:
+Overriding will be done like so:
```bash
export GF_DEFAULT_INSTANCE_NAME=my-instance
@@ -60,24 +61,23 @@ export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
## Configuration management tools
-Currently we do not provide any scripts/manifests for configuring Grafana. Rather then spending time learning and creating scripts/manifests for each tool, we think our time is better spent making Grafana easier to provision. Therefor, we heavily relay on the expertise of he community.
+Currently we do not provide any scripts/manifests for configuring Grafana. Rather than spending time learning and creating scripts/manifests for each tool, we think our time is better spent making Grafana easier to provision. Therefore, we heavily relay on the expertise of the community.
Tool | Project
-----|------------
Puppet | [https://forge.puppet.com/puppet/grafana](https://forge.puppet.com/puppet/grafana)
Ansible | [https://github.com/cloudalchemy/ansible-grafana](https://github.com/cloudalchemy/ansible-grafana)
-Ansible | [https://github.com/picotrading/ansible-grafana](https://github.com/picotrading/ansible-grafana)
Chef | [https://github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana)
Saltstack | [https://github.com/salt-formulas/salt-formula-grafana](https://github.com/salt-formulas/salt-formula-grafana)
-## Datasources
+## Datasources
> This feature is available from v5.0
It's possible to manage datasources in Grafana by adding one or more yaml config files in the [`provisioning/datasources`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `datasources` that will be added or updated during start up. If the datasource already exists, Grafana will update it to match the configuration file. The config file can also contain a list of datasources that should be deleted. That list is called `delete_datasources`. Grafana will delete datasources listed in `delete_datasources` before inserting/updating those in the `datasource` list.
-### Running multiple grafana instances.
-If you are running multiple instances of Grafana you might run into problems if they have different versions of the datasource.yaml configuration file. The best way to solve this problem is to add a version number to each datasource in the configuration and increase it when you update the config. Grafana will only update datasources with the same or lower version number than specified in the config. That way old configs cannot overwrite newer configs if they restart at the same time.
+### Running multiple Grafana instances.
+If you are running multiple instances of Grafana you might run into problems if they have different versions of the `datasource.yaml` configuration file. The best way to solve this problem is to add a version number to each datasource in the configuration and increase it when you update the config. Grafana will only update datasources with the same or lower version number than specified in the config. That way, old configs cannot overwrite newer configs if they restart at the same time.
### Example datasource config file
```yaml
@@ -86,7 +86,7 @@ delete_datasources:
- name: Graphite
org_id: 1
-# list of datasources to insert/update depending
+# list of datasources to insert/update depending
# whats available in the datbase
datasources:
# name of the datasource. Required
@@ -116,7 +116,7 @@ datasources:
# mark as default datasource. Max one per org
is_default:
#