Commit Graph

75 Commits

Author SHA1 Message Date
Torkel Ödegaard
18337f610d Merge branch 'master' into develop 2017-09-22 08:42:07 +02:00
Torkel Ödegaard
fed35909cc tech: progress on react poc 2017-09-21 13:32:57 +02:00
Torkel Ödegaard
84b1519480 tech: initial react poc 2017-09-20 17:44:23 +02:00
Torkel Ödegaard
a38ded9e7e Merge branch 'master' into develop-newgrid-row-design2 2017-09-07 15:05:41 +02:00
Torkel Ödegaard
eb0f5cc900 ux: progress on metrics tab changes 2017-08-31 16:38:49 +02:00
Torkel Ödegaard
a4da0adf38 ux: switching orgs now works through modal 2017-08-16 15:37:13 +02:00
Torkel Ödegaard
7f0f0eb617 ux: more nav work 2017-08-16 11:28:52 +02:00
Torkel Ödegaard
7bf6904119 ux: scrollbar stuff 2017-08-15 11:51:47 +02:00
Alexander Zobnin
e4dabb657c code-editor: initial directive for rich code editor (ace) 2017-08-07 19:31:50 +03:00
Torkel Ödegaard
e63fa9c83c Merge branch 'master' into dashboard_folders 2017-06-15 16:23:10 -04:00
Torkel Ödegaard
380e7e7f04 Merge branch 'master' into metric-segment-remake 2017-06-14 16:17:13 -04:00
Torkel Ödegaard
9ff4ab1236 Merge branch 'master' into query_troubleshooting 2017-06-13 16:47:04 -04:00
Daniel Lee
18269a5886 WIP: user + user-group pickers for permissions 2017-06-12 15:49:09 +02:00
Daniel Lee
bc6aa74439 WIP: user-picker directive 2017-06-12 15:49:09 +02:00
Torkel Ödegaard
f3980504e2 Merge branch 'master' into walmartlabs-master 2017-06-05 13:43:00 +02:00
Torkel Ödegaard
e9d5e037e8 ux: merge branch navbarv2, new navbar with dashboard search available on all pages, closes #6475 2017-06-02 14:00:42 +02: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
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
a0b9dcad4d alert: alerting annotation improvements, fixes #8421 2017-05-22 13:02:49 +02:00
Torkel Ödegaard
6ad1a396a5 feat: query troubleshooter 2017-05-19 16:00:01 +02:00
Torkel Ödegaard
f65878c21d ux: working on query troubleshooting 2017-05-18 17:04:31 +02:00
Torkel Ödegaard
f64385cfc9 ux(tweak): minor polish to date picker styling 2016-11-16 17:53:56 +01:00
huydx
f5a804a558 Fix typo (password strenght -> password strength) 2016-11-11 18:02:58 +09:00
Torkel Ödegaard
82592f0c13 ux(help): began work on new help modal 2016-11-03 20:32:36 +01:00
Torkel Ödegaard
40ea014fa8 ux(dashboar): added shortcut for build mode, switched keybinding lib to mousetrap, supports sequences so also added for Go to home dashboard, open search with starred dashbords prefiltered, go to profile, #6442 2016-11-02 12:55:58 +01:00
Torkel Ödegaard
4d420a0c33 refactor(): dashboard row model and hunting down memory leak 2016-10-30 15:14:18 +01:00
Torkel Ödegaard
b65642564a poc for new metric segment 2016-10-08 10:06:47 +02:00
Torkel Ödegaard
23246605b0 feat(graph panel): working on adding non time series support to graph panel 2016-09-22 16:05:20 +02:00
Torkel Ödegaard
3ad38eefd2 feat(alerting): test results look better 2016-07-21 13:57:19 +02:00
Torkel Ödegaard
ec0b09450c Merge branch 'export-dashboard'
Conflicts:
	conf/defaults.ini
	pkg/setting/setting.go
	public/app/core/components/grafana_app.ts
	public/app/core/core.ts
	public/app/features/dashboard/dashboardCtrl.js
2016-06-16 08:06:43 +02:00
Torkel Ödegaard
0d3e06e68a feat(wizard): merged wizard poc 2016-05-12 14:45:32 +02:00
Torkel Ödegaard
2c7447eaca feat(): started work on new import system 2016-05-11 16:18:52 +02:00
Torkel Ödegaard
b170b6ec8b feat(query part): moved query part editor from influxdb to core 2016-05-11 14:52:44 +02:00
Torkel Ödegaard
38a10f8be4 progress 2016-04-01 17:34:30 -07:00
Torkel Ödegaard
1dabd68327 Merge branch 'master' into checkboxv3 2016-03-28 11:22:23 +02:00
Torkel Ödegaard
32a1d1445c refactor(): trying to move app events away from rootScope 2016-03-23 17:39:10 +01:00
Torkel Ödegaard
8dee54bf5d feat(live): progress on panel <-> data source communication patterns 2016-03-22 18:21:21 +01:00
Torkel Ödegaard
98206ab49f ux(): created new gf-form-switch directive clean/refactoring 2016-03-21 21:24:06 +01:00
Torkel Ödegaard
0f6579801d Merge branch 'master' into websocket
Conflicts:
	public/app/core/core.ts
2016-03-16 15:19:32 +01:00
Torkel Ödegaard
c411714546 ux(): added card layout selector and list view mode, #4364 2016-03-15 15:28:37 +01:00
Torkel Ödegaard
fbd94fc6ce feat(websockets): inital work on websockets, #4355 2016-03-14 11:59:51 +01:00
Torkel Ödegaard
df67d57bca ux(): minor work on info popover 2016-03-01 21:01:41 +01:00
Torkel Ödegaard
c94659f552 ux(color popover): refactored color popover to use drop lib 2016-02-22 18:46:58 +01:00
Torkel Ödegaard
a93fe5b2b2 poc(): tether drop 2016-02-21 18:08:44 +01:00
Torkel Ödegaard
b369b7e495 ux(): added page-dashboard body class 2016-02-12 18:55:45 +01:00
Torkel Ödegaard
18eb9d6076 feat(apps): began work on app pages 2016-02-09 11:17:49 +01:00
Torkel Ödegaard
660ce3a61d fix(row editor): row editor fix and cleanup of unused code 2016-02-04 22:19:46 +01:00
Torkel Ödegaard
eaaf9246b7 feat(plugins): more work on refining datasource editors 2016-02-02 09:12:58 +01:00
Torkel Ödegaard
12f487e223 feat(plugin-editors): more work on plugin editor loading 2016-02-01 23:24:08 +01:00
Torkel Ödegaard
92c2f8d556 feat(pinned sidemenu): completed side menu pinned stuff 2016-01-29 16:52:30 -05:00