Skip to content

Commit

Permalink
Merge branch 'master' of github.com:grafana/grafana
Browse files Browse the repository at this point in the history
* 'master' of github.com:grafana/grafana: (24 commits)
  docs: update latest to 5.0.1
  push 5.0.1 to package cloud
  changelog: adds release date for 5.0.1
  bump master build to 5.1.0-pre1
  move quota to dedicated service
  rename Context to ReqContext
  changelog: note about closing #11145 and #11127
  docs: adds note about closing #10632
  removes commented code
  removes unused variables
  upgrade to go 1.10
  alerting: fixes validation error when saving alerts in dash
  add csv templating format
  docs: note about closing #11046
  docs: adds note about #10942
  Documentation: path "~/go" to "$GOPATH"
  Update ROADMAP.md
  move Context and session out of middleware
  only use jwt token if it contains an email address
  hide row actions for viewers
  ...
  • Loading branch information
bergquist committed Mar 8, 2018
2 parents 71df276 + a589f70 commit ad15c54
Show file tree
Hide file tree
Showing 91 changed files with 1,024 additions and 776 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@

* **Postgres/MySQL**: Ability to insert 0s or nulls for missing intervals [#9487](https://github.com/grafana/grafana/issues/9487), thanks [@svenklemm](https://github.com/svenklemm)
* **Graph**: Thresholds for Right Y axis [#7107](https://github.com/grafana/grafana/issues/7107), thx [@ilgizar](https://github.com/ilgizar)
* **Alerting**: Pausing/un alerts now updates new_state_date [#10942](https://github.com/grafana/grafana/pull/10942)
* **Templating**: Add comma templating format [#10632](https://github.com/grafana/grafana/issues/10632), thx [@mtanda](https://github.com/mtanda)

# 5.0.1 (unreleased)
### Minor
* **OpsGenie**: Add triggered alerts as description [#11046](https://github.com/grafana/grafana/pull/11046), thx [@llamashoes](https://github.com/llamashoes)

# 5.0.1 (2018-03-08)

* **Postgres**: PostgreSQL error when using ipv6 address as hostname in connection string [#11055](https://github.com/grafana/grafana/issues/11055), thanks [@svenklemm](https://github.com/svenklemm)
* **Dashboards**: Changing templated value from dropdown is causing unsaved changes [#11063](https://github.com/grafana/grafana/issues/11063)
* **Prometheus**: Fixes bundled Prometheus 2.0 dashboard [#11016](https://github.com/grafana/grafana/issues/11016), thx [@roidelapluie](https://github.com/roidelapluie)
* **Sidemenu**: Profile menu "invisible" when gravatar is disabled [#11097](https://github.com/grafana/grafana/issues/11097)
* **Dashboard**: Fixes a bug with resizeable handles for panels [#11103](https://github.com/grafana/grafana/issues/11103)
* **Alerting**: Telegram inline image mode fails when caption too long [#10975](https://github.com/grafana/grafana/issues/10975)
* **Alerting**: Fixes silent failing validation [#11145](https://github.com/grafana/grafana/pull/11145)
* **OAuth**: Only use jwt token if it contains an email address [#11127](https://github.com/grafana/grafana/pull/11127)

# 5.0.0-stable (2018-03-01)

Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,22 @@ deps: deps-js
build-go:
go run build.go build

build-server:
go run build.go build-server

build-cli:
go run build.go build-cli

build-js:
npm run build
yarn run build

build: build-go build-js

test-go:
go test -v ./pkg/...

test-js:
npm test
yarn test

test: test-go test-js

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ the latest master builds [here](https://grafana.com/grafana/download)
### Building the backend
```bash
go get github.com/grafana/grafana
cd ~/go/src/github.com/grafana/grafana
cd $GOPATH/src/github.com/grafana/grafana
go run build.go setup
go run build.go build
```
Expand Down
1 change: 0 additions & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ But it will give you an idea of our current vision and plan.
- v5.1
- Crossplatform builds & build speed improvements
- Enterprise LDAP
- New template interpolation syntax
- Provisioning workflow
- First login registration view
- IFQL Initial support
Expand Down
4 changes: 4 additions & 0 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ func main() {
clean()
build("grafana-cli", "./pkg/cmd/grafana-cli", []string{})

case "build-server":
clean()
build("grafana-server", "./pkg/cmd/grafana-server", []string{})

case "build":
clean()
for _, binary := range binaries {
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ machine:
GOPATH: "/home/ubuntu/.go_workspace"
ORG_PATH: "github.com/grafana"
REPO_PATH: "${ORG_PATH}/grafana"
GODIST: "go1.9.3.linux-amd64.tar.gz"
GODIST: "go1.10.linux-amd64.tar.gz"
post:
- mkdir -p ~/download
- mkdir -p ~/docker
Expand Down
6 changes: 3 additions & 3 deletions docs/sources/installation/debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ weight = 1

Description | Download
------------ | -------------
Stable for Debian-based Linux | [grafana_5.0.0_amd64.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.0.0_amd64.deb)
Stable for Debian-based Linux | [grafana_5.0.1_amd64.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.0.1_amd64.deb)

Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing
installation.
Expand All @@ -24,9 +24,9 @@ installation.


```bash
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.0.0_amd64.deb
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.0.1_amd64.deb
sudo apt-get install -y adduser libfontconfig
sudo dpkg -i grafana_5.0.0_amd64.deb
sudo dpkg -i grafana_5.0.1_amd64.deb
```

## APT Repository
Expand Down
10 changes: 5 additions & 5 deletions docs/sources/installation/rpm.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ weight = 2

Description | Download
------------ | -------------
Stable for CentOS / Fedora / OpenSuse / Redhat Linux | [5.0.0 (x86-64 rpm)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.0-1.x86_64.rpm)
Stable for CentOS / Fedora / OpenSuse / Redhat Linux | [5.0.1 (x86-64 rpm)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.1-1.x86_64.rpm)


Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing
Expand All @@ -26,23 +26,23 @@ installation.
You can install Grafana using Yum directly.

```bash
$ sudo yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.0-1.x86_64.rpm
$ sudo yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.1-1.x86_64.rpm
```

Or install manually using `rpm`.

#### On CentOS / Fedora / Redhat:

```bash
$ wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.0-1.x86_64.rpm
$ wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.1-1.x86_64.rpm
$ sudo yum install initscripts fontconfig
$ sudo rpm -Uvh grafana-5.0.0-1.x86_64.rpm
$ sudo rpm -Uvh grafana-5.0.1-1.x86_64.rpm
```

#### On OpenSuse:

```bash
$ sudo rpm -i --nodeps grafana-5.0.0-1.x86_64.rpm
$ sudo rpm -i --nodeps grafana-5.0.1-1.x86_64.rpm
```

## Install via YUM Repository
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/installation/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ weight = 3

Description | Download
------------ | -------------
Latest stable package for Windows | [grafana-5.0.0.windows-x64.zip](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.0.windows-x64.zip)
Latest stable package for Windows | [grafana-5.0.1.windows-x64.zip](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.1.windows-x64.zip)

Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing
installation.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"company": "Grafana Labs"
},
"name": "grafana",
"version": "5.0.1-pre1",
"version": "5.1.0-pre1",
"repository": {
"type": "git",
"url": "http://github.com/grafana/grafana.git"
Expand Down
2 changes: 1 addition & 1 deletion packaging/publish/publish_both.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env bash
version=4.6.3
version=5.0.1

wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_${version}_amd64.deb

Expand Down
5 changes: 2 additions & 3 deletions pkg/api/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import (
"strings"

"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
)

func AdminGetSettings(c *middleware.Context) {
func AdminGetSettings(c *m.ReqContext) {
settings := make(map[string]interface{})

for _, section := range setting.Cfg.Sections() {
Expand All @@ -30,7 +29,7 @@ func AdminGetSettings(c *middleware.Context) {
c.JSON(200, settings)
}

func AdminGetStats(c *middleware.Context) {
func AdminGetStats(c *m.ReqContext) {

statsQuery := m.GetAdminStatsQuery{}

Expand Down
9 changes: 4 additions & 5 deletions pkg/api/admin_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import (
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/metrics"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/util"
)

func AdminCreateUser(c *middleware.Context, form dtos.AdminCreateUserForm) {
func AdminCreateUser(c *m.ReqContext, form dtos.AdminCreateUserForm) {
cmd := m.CreateUserCommand{
Login: form.Login,
Email: form.Email,
Expand Down Expand Up @@ -47,7 +46,7 @@ func AdminCreateUser(c *middleware.Context, form dtos.AdminCreateUserForm) {
c.JSON(200, result)
}

func AdminUpdateUserPassword(c *middleware.Context, form dtos.AdminUpdateUserPasswordForm) {
func AdminUpdateUserPassword(c *m.ReqContext, form dtos.AdminUpdateUserPasswordForm) {
userId := c.ParamsInt64(":id")

if len(form.Password) < 4 {
Expand Down Expand Up @@ -77,7 +76,7 @@ func AdminUpdateUserPassword(c *middleware.Context, form dtos.AdminUpdateUserPas
c.JsonOK("User password updated")
}

func AdminUpdateUserPermissions(c *middleware.Context, form dtos.AdminUpdateUserPermissionsForm) {
func AdminUpdateUserPermissions(c *m.ReqContext, form dtos.AdminUpdateUserPermissionsForm) {
userId := c.ParamsInt64(":id")

cmd := m.UpdateUserPermissionsCommand{
Expand All @@ -93,7 +92,7 @@ func AdminUpdateUserPermissions(c *middleware.Context, form dtos.AdminUpdateUser
c.JsonOK("User permissions updated")
}

func AdminDeleteUser(c *middleware.Context) {
func AdminDeleteUser(c *m.ReqContext) {
userId := c.ParamsInt64(":id")

cmd := m.DeleteUserCommand{UserId: userId}
Expand Down
Loading

0 comments on commit ad15c54

Please sign in to comment.