Merge branch 'master' into docs_v5.0

This commit is contained in:
Torkel Ödegaard
2018-02-05 16:29:49 +01:00
11 changed files with 58 additions and 11 deletions
+1
View File
@@ -61,6 +61,7 @@ Dashboard panels and rows are positioned using a gridPos object `{x: 0, y: 0, w:
* **Singlestat**: suppress error when result contains no datapoints [#9636](https://github.com/grafana/grafana/issues/9636), thx [@utkarshcmu](https://github.com/utkarshcmu) * **Singlestat**: suppress error when result contains no datapoints [#9636](https://github.com/grafana/grafana/issues/9636), thx [@utkarshcmu](https://github.com/utkarshcmu)
* **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) * **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) * **Pagerduty**: Pagerduty dont auto resolve incidents by default anymore. [#10222](https://github.com/grafana/grafana/issues/10222)
* **Cloudwatch**: Fix for multi-valued templated queries. [#9903](https://github.com/grafana/grafana/issues/9903)
## Tech ## Tech
* **RabbitMq**: Remove support for publishing events to RabbitMQ [#9645](https://github.com/grafana/grafana/issues/9645) * **RabbitMq**: Remove support for publishing events to RabbitMQ [#9645](https://github.com/grafana/grafana/issues/9645)
+10
View File
@@ -16,6 +16,7 @@ weight = 1
Description | Download Description | Download
------------ | ------------- ------------ | -------------
Stable for Debian-based Linux | [grafana_4.6.3_amd64.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.6.3_amd64.deb) Stable for Debian-based Linux | [grafana_4.6.3_amd64.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.6.3_amd64.deb)
Beta for Debian-based Linux | [grafana_5.0.0-beta1_amd64.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.0.0-beta1_amd64.deb)
Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing
installation. installation.
@@ -27,6 +28,15 @@ installation.
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.6.3_amd64.deb wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.6.3_amd64.deb
sudo apt-get install -y adduser libfontconfig sudo apt-get install -y adduser libfontconfig
sudo dpkg -i grafana_4.6.3_amd64.deb sudo dpkg -i grafana_4.6.3_amd64.deb
```
## Install Latest Beta
```bash
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.0.0-beta1_amd64.deb
sudo apt-get install -y adduser libfontconfig
sudo dpkg -i grafana_5.0.0-beta1_amd64.deb
``` ```
## APT Repository ## APT Repository
+7
View File
@@ -16,6 +16,7 @@ weight = 2
Description | Download Description | Download
------------ | ------------- ------------ | -------------
Stable for CentOS / Fedora / OpenSuse / Redhat Linux | [4.6.3 (x86-64 rpm)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3-1.x86_64.rpm) Stable for CentOS / Fedora / OpenSuse / Redhat Linux | [4.6.3 (x86-64 rpm)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3-1.x86_64.rpm)
Latest Beta for CentOS / Fedora / OpenSuse / Redhat Linux | [5.0.0-beta1 (x86-64 rpm)](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.0-beta1.x86_64.rpm)
Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing
installation. installation.
@@ -28,6 +29,12 @@ You can install Grafana using Yum directly.
$ sudo yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3-1.x86_64.rpm $ sudo yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3-1.x86_64.rpm
``` ```
## Install Beta
```bash
$ sudo yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.0-beta1.x86_64.rpm
```
Or install manually using `rpm`. Or install manually using `rpm`.
#### On CentOS / Fedora / Redhat: #### On CentOS / Fedora / Redhat:
+5
View File
@@ -101,3 +101,8 @@ as this will make upgrades easier without risking losing your config changes.
## Upgrading from 2.x ## Upgrading from 2.x
We are not aware of any issues upgrading directly from 2.x to 4.x but to be on the safe side go via 3.x => 4.x. We are not aware of any issues upgrading directly from 2.x to 4.x but to be on the safe side go via 3.x => 4.x.
## Upgrading to v5.0
The dashboard grid layout engine has changed. All dashboards will be automatically upgraded to new
positioning system when you load them in v5. Dashboards saved in v5 will not work in older versions of Grafana.
+1
View File
@@ -14,6 +14,7 @@ weight = 3
Description | Download Description | Download
------------ | ------------- ------------ | -------------
Latest stable package for Windows | [grafana.4.6.3.windows-x64.zip](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3.windows-x64.zip) Latest stable package for Windows | [grafana.4.6.3.windows-x64.zip](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3.windows-x64.zip)
Latest beta package for Windows | [grafana.5.0.0-beta1.windows-x64.zip](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.0-beta1.windows-x64.zip)
Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing
installation. installation.
+1 -1
View File
@@ -4,7 +4,7 @@
"company": "Grafana Labs" "company": "Grafana Labs"
}, },
"name": "grafana", "name": "grafana",
"version": "5.0.0-pre1", "version": "5.0.0-beta1",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "http://github.com/grafana/grafana.git" "url": "http://github.com/grafana/grafana.git"
+2 -2
View File
@@ -1,6 +1,6 @@
#! /usr/bin/env bash #! /usr/bin/env bash
deb_ver=4.6.0-beta1 deb_ver=5.0.0-beta1
rpm_ver=4.6.0-beta1 rpm_ver=5.0.0-beta1
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_${deb_ver}_amd64.deb wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_${deb_ver}_amd64.deb
@@ -1,4 +1,4 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { inject, observer } from 'mobx-react'; import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx'; import { toJS } from 'mobx';
import IContainerProps from 'app/containers/IContainerProps'; import IContainerProps from 'app/containers/IContainerProps';
@@ -8,6 +8,7 @@ import Tooltip from 'app/core/components/Tooltip/Tooltip';
import PermissionsInfo from 'app/core/components/Permissions/PermissionsInfo'; import PermissionsInfo from 'app/core/components/Permissions/PermissionsInfo';
import AddPermissions from 'app/core/components/Permissions/AddPermissions'; import AddPermissions from 'app/core/components/Permissions/AddPermissions';
import SlideDown from 'app/core/components/Animations/SlideDown'; import SlideDown from 'app/core/components/Animations/SlideDown';
@inject('nav', 'folder', 'view', 'permissions') @inject('nav', 'folder', 'view', 'permissions')
@observer @observer
export class FolderPermissions extends Component<IContainerProps, any> { export class FolderPermissions extends Component<IContainerProps, any> {
@@ -14,6 +14,7 @@ describe('FolderSettings', () => {
dashboard: { dashboard: {
id: 1, id: 1,
title: 'Folder Name', title: 'Folder Name',
uid: 'uid-str',
}, },
meta: { meta: {
url: '/dashboards/f/uid/folder-name', url: '/dashboards/f/uid/folder-name',
@@ -23,19 +24,27 @@ describe('FolderSettings', () => {
); );
const store = RootStore.create( const store = RootStore.create(
{}, {
view: {
path: 'asd',
query: {},
routeParams: {
uid: 'uid-str',
},
},
},
{ {
backendSrv: backendSrv, backendSrv: backendSrv,
} }
); );
wrapper = shallow(<FolderSettings backendSrv={backendSrv} {...store} />); wrapper = shallow(<FolderSettings backendSrv={backendSrv} {...store} />);
return wrapper page = wrapper.dive();
.dive() return page
.instance() .instance()
.loadStore() .loadStore()
.then(() => { .then(() => {
page = wrapper.dive(); page.update();
}); });
}); });
@@ -5,6 +5,7 @@ export const Folder = types.model('Folder', {
title: types.string, title: types.string,
url: types.string, url: types.string,
canSave: types.boolean, canSave: types.boolean,
uid: types.string,
hasChanged: types.boolean, hasChanged: types.boolean,
}); });
@@ -14,15 +15,23 @@ export const FolderStore = types
}) })
.actions(self => ({ .actions(self => ({
load: flow(function* load(uid: string) { load: flow(function* load(uid: string) {
// clear folder state
if (self.folder && self.folder.uid !== uid) {
self.folder = null;
}
const backendSrv = getEnv(self).backendSrv; const backendSrv = getEnv(self).backendSrv;
const res = yield backendSrv.getDashboardByUid(uid); const res = yield backendSrv.getDashboardByUid(uid);
self.folder = Folder.create({ self.folder = Folder.create({
id: res.dashboard.id, id: res.dashboard.id,
title: res.dashboard.title, title: res.dashboard.title,
url: res.meta.url, url: res.meta.url,
uid: res.dashboard.uid,
canSave: res.meta.canSave, canSave: res.meta.canSave,
hasChanged: false, hasChanged: false,
}); });
return res; return res;
}), }),
@@ -115,6 +115,7 @@ export const PermissionsStore = types
self.fetching = false; self.fetching = false;
self.error = null; self.error = null;
}), }),
addStoreItem: flow(function* addStoreItem() { addStoreItem: flow(function* addStoreItem() {
self.error = null; self.error = null;
let item = { let item = {
@@ -152,11 +153,13 @@ export const PermissionsStore = types
resetNewType(); resetNewType();
return updateItems(self); return updateItems(self);
}), }),
removeStoreItem: flow(function* removeStoreItem(idx: number) { removeStoreItem: flow(function* removeStoreItem(idx: number) {
self.error = null; self.error = null;
self.items.splice(idx, 1); self.items.splice(idx, 1);
return updateItems(self); return updateItems(self);
}), }),
updatePermissionOnIndex: flow(function* updatePermissionOnIndex( updatePermissionOnIndex: flow(function* updatePermissionOnIndex(
idx: number, idx: number,
permission: number, permission: number,
@@ -166,18 +169,19 @@ export const PermissionsStore = types
self.items[idx].updatePermission(permission, permissionName); self.items[idx].updatePermission(permission, permissionName);
return updateItems(self); return updateItems(self);
}), }),
setNewType(newType: string) { setNewType(newType: string) {
self.newItem = NewPermissionsItem.create({ type: newType }); self.newItem = NewPermissionsItem.create({ type: newType });
}, },
resetNewType() { resetNewType() {
resetNewType(); resetNewType();
}, },
toggleAddPermissions() { toggleAddPermissions() {
self.isAddPermissionsVisible = !self.isAddPermissionsVisible; self.isAddPermissionsVisible = !self.isAddPermissionsVisible;
}, },
showAddPermissions() {
self.isAddPermissionsVisible = true;
},
hideAddPermissions() { hideAddPermissions() {
self.isAddPermissionsVisible = false; self.isAddPermissionsVisible = false;
}, },