Commit Graph

10574 Commits

Author SHA1 Message Date
Torkel Ödegaard
95a4ec8bf2 Merge branch 'v4.3.x' 2017-05-31 10:55:06 +02:00
Torkel Ödegaard
ed4d170bcc build: updated version to v4.3.2 2017-05-31 10:48:16 +02:00
Torkel Ödegaard
812958162a revert: removed lazy loading feature, closes #8500 2017-05-31 10:47:04 +02:00
Torkel Ödegaard
cd3807055e chrome: an attempt to fix scroll issue with chrome, but this did not fix the problem as it seems to be caused by some interaction between graph rendering and scrolling, #8494 2017-05-30 13:50:38 +02:00
Pranay Kanwar
26ec874fb1 Frontend query changes corresponding #8336 (#8489) 2017-05-30 09:53:11 +02:00
Dan Cech
e4cb103966 remove X-Forwarded-* headers added by nginx when proxying data source & plugin requests (#8418)
* remove X-Forwarded-* headers added by nginx when proxying data source & plugin requests

* properly handle X-Forwarded-For
2017-05-29 13:09:15 +02:00
Torkel Ödegaard
5c1833de1f Merge branch 'master' of github.com:grafana/grafana 2017-05-29 12:21:21 +02:00
Torkel Ödegaard
f16e3e38ee Merge branch 'v4.3.x' 2017-05-29 12:20:34 +02:00
Daniel Lee
d318c9093f graph: Handle data with zeroes for log scale
fixes #8446. Data with all values equal to zero, creates a max with the
value of Infinite. The for loop for creating ticks then gets stuck in an
infinite loop. This fix resets min and max and creates some fake ticks
for the y-axis if the min and max are not finite numbers.
2017-05-29 12:18:54 +02:00
Dan Cech
c95162e067 tweak column lengths for utf8mb4 support on older mysql (#8483) 2017-05-29 12:18:27 +02:00
Torkel Ödegaard
0d865a83bc fix: fixed test data fake metric query, fixes #8474 2017-05-29 12:17:51 +02:00
Victor Azevedo
980b9b5ca0 use fielddata_fields in elasticsearch 2.x queries
Resolves issue #8467
2017-05-29 12:15:51 +02:00
Daniel Lee
371625aeec Merge branch 'v4.3.x' 2017-05-29 11:13:14 +02:00
Daniel Lee
beced6f3a6 graph: Handle data with zeroes for log scale
fixes #8446. Data with all values equal to zero, creates a max with the
value of Infinite. The for loop for creating ticks then gets stuck in an
infinite loop. This fix resets min and max and creates some fake ticks
for the y-axis if the min and max are not finite numbers.
2017-05-29 11:12:08 +02:00
Torkel Ödegaard
5e0b03928e Merge branch 'v4.3.x' 2017-05-29 10:49:02 +02:00
Torkel Ödegaard
0d39852ef4 fix: fixed test data fake metric query, fixes #8474 2017-05-29 10:48:38 +02:00
Torkel Ödegaard
ab44c7d63e Merge branch 'master' of github.com:grafana/grafana 2017-05-29 08:52:07 +02:00
Torkel Ödegaard
ed2092e287 docs: updated alerting docs to make query conditions easier to understand, fixes #8486 2017-05-29 08:51:56 +02:00
Dan Cech
c0d5b61403 tweak column lengths for utf8mb4 support on older mysql (#8483) 2017-05-29 08:31:36 +02:00
Dan Cech
7004a84c30 tweak column lengths for utf8mb4 support on older mysql 2017-05-29 08:19:51 +02:00
Anton Yackushev
c2885430bd fix "no formatting directive in Fatalf call" (vet) (#8487) 2017-05-29 08:12:54 +02:00
Daniel Lee
e65f86147f changelog: note for #8058 2017-05-26 15:56:44 +02:00
Daniel Lee
c17d02e496 csv: remove sep metadata as only works for excel 2017-05-26 15:43:09 +02:00
Cédric Reginster
ee0d0155a5 Refactor to component based style 2017-05-26 15:43:09 +02:00
Cédric Reginster
f484b4c347 Make csv export date time format configurable
- Move export csv options to modal dialog
2017-05-26 15:43:09 +02:00
Daniel Lee
3292a48381 graph: dashes with linewidth fix. Fixes #8469
Adds series override options for dash spaces and dash length.
2017-05-26 15:09:05 +02:00
Dan Cech
8422697199 centralize oauth http calls, validate response status (#8470) 2017-05-26 14:35:32 +02:00
Ben Tranter
a927b893ae Use DBSession for getMaxVersion 2017-05-25 23:04:00 -04:00
sanchitraizada
e6616cc551 Merge pull request #10 from walmartlabs/version-control
History and Version Control for Dashboard Updates
2017-05-25 14:50:47 -07:00
Torkel Ödegaard
60d5d5fb15 docs: updated changelog 2017-05-25 20:37:01 +02:00
Torkel Ödegaard
68397d342b Merge branch 'patch-1' of https://github.com/goldeelox/grafana into goldeelox-patch-1 2017-05-25 20:34:38 +02:00
Torkel Ödegaard
09267bbfe8 docs: elasticsearch, added info about size property in templating query 2017-05-25 20:11:53 +02:00
Victor Azevedo
0a1c2a7024 use fielddata_fields in elasticsearch 2.x queries
Resolves issue #8467
2017-05-25 11:43:29 -04:00
Ben Tranter
b6e46c9eb8 History and Version Control for Dashboard Updates
A simple version control system for dashboards. Closes #1504.

Goals

1. To create a new dashboard version every time a dashboard is saved.
2. To allow users to view all versions of a given dashboard.
3. To allow users to rollback to a previous version of a dashboard.
4. To allow users to compare two versions of a dashboard.

Usage

Navigate to a dashboard, and click the settings cog. From there, click
the "Changelog" button to be brought to the Changelog view. In this
view, a table containing each version of a dashboard can be seen. Each
entry in the table represents a dashboard version. A selectable
checkbox, the version number, date created, name of the user who created
that version, and commit message is shown in the table, along with a
button that allows a user to restore to a previous version of that
dashboard. If a user wants to restore to a previous version of their
dashboard, they can do so by clicking the previously mentioned button.
If a user wants to compare two different versions of a dashboard, they
can do so by clicking the checkbox of two different dashboard versions,
then clicking the "Compare versions" button located below the dashboard.
From there, the user is brought to a view showing a summary of the
dashboard differences. Each summarized change contains a link that can
be clicked to take the user a JSON diff highlighting the changes line by
line.

Overview of Changes

Backend Changes

- A `dashboard_version` table was created to store each dashboard
  version, along with a dashboard version model and structs to represent
  the queries and commands necessary for the dashboard version API
  methods.
- API endpoints were created to support working with dashboard
  versions.
- Methods were added to create, update, read, and destroy dashboard
  versions in the database.
  - Logic was added to compute the diff between two versions, and
  display it to the user.
  - The dashboard migration logic was updated to save a "Version
  1" of each existing dashboard in the database.

Frontend Changes

- New views
- Methods to pull JSON and HTML from endpoints

New API Endpoints

Each endpoint requires the authorization header to be sent in
the format,

```
Authorization: Bearer <jwt>
```

where `<jwt>` is a JSON web token obtained from the Grafana
admin panel.

`GET "/api/dashboards/db/:dashboardId/versions?orderBy=<string>&limit=<int>&start=<int>"`

Get all dashboard versions for the given dashboard ID. Accepts
three URL parameters:

- `orderBy` String to order the results by. Possible values
  are `version`, `created`, `created_by`, `message`. Default
  is `versions`. Ordering is always in descending order.
- `limit` Maximum number of results to return
- `start` Position in results to start from

`GET "/api/dashboards/db/:dashboardId/versions/:id"`

Get an individual dashboard version by ID, for the given
dashboard ID.

`POST "/api/dashboards/db/:dashboardId/restore"`

Restore to the given dashboard version. Post body is of
content-type `application/json`, and must contain.

```json
{
  "dashboardId": <int>,
  "version": <int>
}
```

`GET "/api/dashboards/db/:dashboardId/compare/:versionA...:versionB"`

Compare two dashboard versions by ID for the given
dashboard ID, returning a JSON delta formatted
representation of the diff. The URL format follows
what GitHub does. For example, visiting
[/api/dashboards/db/18/compare/22...33](http://ec2-54-80-139-44.compute-1.amazonaws.com:3000/api/dashboards/db/18/compare/22...33)
will return the diff between versions 22 and 33 for
the dashboard ID 18.

Dependencies Added

- The Go package [gojsondiff](https://github.com/yudai/gojsondiff)
  was added and vendored.
2017-05-24 19:14:39 -04:00
Torkel Ödegaard
d1d47b5697 docs: updated changelog with fix for InfluxDB query issue, #8459 2017-05-24 16:49:30 +02:00
Torkel Ödegaard
90871ca12e Merge branch 'v4.3.x' 2017-05-24 16:48:05 +02:00
Torkel Ödegaard
896f849b84 fix: influxdb query editor did no show alias by input field when in text editor mode, fixes #8459 2017-05-24 16:47:38 +02:00
Dhia
ac28c4b233 add Referer header to logs. This is useful to link datasource requests to dashboard that originated it (#8399) 2017-05-24 13:47:29 +02:00
Torkel Ödegaard
8b7a0100b1 docs: updated changelog with info on merged PR #8405 2017-05-24 13:46:33 +02:00
Torkel Ödegaard
dcf7385cc1 sensu: added input tooltip to source property 2017-05-24 13:44:38 +02:00
joe miller
090594a0bc support setting the source and handler attribute in sensu notifications (#8405)
* support setting the handler attribute in sensu alert notifications

* allow the user to set the source attribute of Sensu notifications
2017-05-24 13:42:24 +02:00
Dan Cech
007c08f2a8 remove X-Forwarded-* headers added by nginx when proxying data source & plugin requests (#8418)
* remove X-Forwarded-* headers added by nginx when proxying data source & plugin requests

* properly handle X-Forwarded-For
2017-05-24 13:39:40 +02:00
Daniel Parks
2d29d7b3d6 Add support for AWS DMS CloudWatch metric (#8458) 2017-05-24 13:24:24 +02:00
Torkel Ödegaard
3133721422 docs: update changelog 2017-05-24 13:23:11 +02:00
Torkel Ödegaard
28bff0c1f3 Merge branch 'v4.3.x' 2017-05-24 13:22:09 +02:00
Torkel Ödegaard
b17a1ed557 playlist: fixed dashboard play ordering, fixes #7688 2017-05-24 13:21:43 +02:00
Torkel Ödegaard
e6d79dfedf docs: updated changelog 2017-05-24 11:23:41 +02:00
Torkel Ödegaard
5740702cb5 Merge branch 'master' of github.com:grafana/grafana 2017-05-24 11:21:17 +02:00
Torkel Ödegaard
a5318def66 Merge branch 'v4.3.x' 2017-05-24 11:20:35 +02:00
Torkel Ödegaard
634ee0f9fa fix: graphg panel logarithmic scale goes blow x-axis, fixes #8244 2017-05-24 11:20:07 +02:00