Commit Graph

135 Commits

Author SHA1 Message Date
Torkel Ödegaard
21a3f443f2 Merge branch 'master' into panel-title-menu-ux 2017-08-01 11:43:00 +02:00
Torkel Ödegaard
73563d087c feat: more work on #8768 2017-07-31 14:39:33 +02:00
Torkel Ödegaard
3e8937e53b Merge branch 'master' into new-sidemenu 2017-06-14 10:00:43 -04:00
Torkel Ödegaard
9ff4ab1236 Merge branch 'master' into query_troubleshooting 2017-06-13 16:47:04 -04:00
Torkel Ödegaard
5061b3c691 ux: nav experiments 2017-06-12 21:11:22 +02:00
Torkel Ödegaard
f341a21b01 ux: side nav experiments 2017-06-12 16:46:02 +02:00
Torkel Ödegaard
ef9fa7b0cc ux: very early start to new sidemenu 2017-06-08 22:17:43 +02:00
Torkel Ödegaard
25683c688f ux: minor progress on panel title menu makover 2017-06-08 16:22:51 +02:00
Torkel Ödegaard
4206f98ba4 Merge branch 'master' into panel-title-menu-ux 2017-06-08 14:50:03 +02:00
Torkel Ödegaard
8f6c9c5946 dasboard_history: some polish around styles & diff colors, and minor fixes 2017-06-07 12:39:06 +02:00
Torkel Ödegaard
948e5ae74d dashboard_history: further css & markup fixes, removing style overrides & resuing existing styles and markup components 2017-06-06 23:04:14 +02: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
7cb6466251 feat: query troubleshooter, improving json explorer 2017-05-20 23:43:59 +02:00
Torkel Ödegaard
d840645dd7 feat: metrics tab, minor change 2017-05-20 23:03:04 +02:00
Torkel Ödegaard
499e01d832 feat: metrics tab reworking 2017-05-20 18:21:41 +02:00
Torkel Ödegaard
0335c1f368 ux: updated styles a bit 2017-04-14 13:08:03 +02:00
Torkel Ödegaard
c68fffcd6d ux: popover forms 2017-04-13 20:28:13 +02:00
Torkel Ödegaard
2f61fc6afe ux: made progress on popover forms 2017-04-13 18:39:49 +02:00
Torkel Ödegaard
702978eff7 ux: more work on panel menu 2017-04-11 10:05:30 +02:00
Torkel Ödegaard
a47183f740 ux: panel title ux improvements poc 2017-04-11 07:43:40 +02:00
Torkel Ödegaard
2f4da15264 fix(http api): throw validation error if missing property in call to /api/admin/users/123/permissions, #7365 2017-01-26 08:54:51 +01:00
Torkel Ödegaard
c99f4cb9c5 ux(dashboard): minor cleanup 2016-11-04 12:14:43 +01:00
Torkel Ödegaard
98be1734fa ux(dashboard): refining new row slide out menu, #6442 2016-11-03 22:14:29 +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
8eee4d8e6b fix(dashboard): fixed white theme for new dashboard row look / dash edit mode, #6442 2016-11-01 16:06:49 +01:00
Torkel Ödegaard
09a19d8ecb ux(dashboard): progress on ghost empty space panel 2016-10-30 18:02:46 +01:00
Torkel Ödegaard
1bb8192a38 Merge branch 'master' into dash-edit-mode 2016-10-23 10:03:55 +02:00
Torkel Ödegaard
fbae6abb3c feat(alerting): progress on handling no data in alert query, #5860 2016-09-06 20:40:12 +02:00
Torkel Ödegaard
224ceb0ae5 feat(thresholds): updated design for grab handles 2016-08-11 21:22:40 +02:00
Torkel Ödegaard
89ca15f3a1 feat(thresholds): lots of progress on thresholds 2016-08-11 18:25:41 +02:00
bergquist
8ec311ade4 Merge branch 'master' into alerting 2016-06-16 16:29:41 +02:00
Torkel Ödegaard
1500c0e954 feat(alerting): alert threshold handles progress 2016-06-11 22:33:02 +02:00
bergquist
1686d86c3b Merge branch 'master' into alerting_definitions 2016-05-30 08:26:08 +02:00
Torkel Ödegaard
ba6573af61 Merge branch 'master' into export-dashboard
Conflicts:
	public/app/features/dashboard/submenu/submenu.ts
2016-05-25 12:32:56 +02:00
Torkel Ödegaard
10c47ee27c feat(footer): some minor changes to footer to make it look good in light theme, closes #4889 2016-05-24 08:11:28 +02:00
bergquist
80f7fe8646 feat(alerting): add confirm text dialog when deleting dashboards with alerts 2016-05-16 11:54:28 +02:00
Torkel Ödegaard
d9d46096dd feat(import): lots of work on dashboard import 2016-05-13 17:39:22 +02:00
Torkel Ödegaard
ca8df67947 feat(import): things are starting to work 2016-05-13 11:26:02 +02:00
Torkel Ödegaard
2546ec062b Merge branch 'master' into dash-edit-mode
Conflicts:
	public/app/features/dashboard/partials/settings.html
2016-04-29 14:50:17 +02:00
Torkel Ödegaard
bca0894f73 feat(query editors): progress on query editors 2016-04-26 09:58:55 +02:00
Torkel Ödegaard
6b813b4e2a feat(query editors): remember collapsed state 2016-04-25 15:11:40 +02:00
Matt Toback
a7e8e64d78 The beginnings of the build mode and rows 2016-04-15 19:52:18 -04:00
Matt Toback
c1a5771fcd Updated colors to fix issue 2016-04-14 11:38:07 -04:00
Torkel Ödegaard
9868edb138 ux(): changed tooltip style 2016-04-12 13:00:33 -04:00
Torkel Ödegaard
7afb6fa3e3 ux(ds edit): combine save and test connection buttons, closes #4658 2016-04-12 11:20:03 -04:00
Torkel Ödegaard
6ce934f1dd feat(pluginlist): worked on plugin list 2016-04-11 20:33:58 -04:00
Matt Toback
f4fc3f48a7 New modal for upgrades and updated styles on list 2016-04-11 19:01:18 -04:00
Torkel Ödegaard
22b11d7d4d feat(graph panel): changed to PR #4493 and other polish, removed the relative time from graph tooltip, did not think it worked that well 2016-04-09 12:45:35 -04:00
Torkel Ödegaard
14326b626e ux(): checkbox now works in dark and white theme 2016-03-28 13:10:42 +02:00
Torkel Ödegaard
1dabd68327 Merge branch 'master' into checkboxv3 2016-03-28 11:22:23 +02:00
Matt
82b1a11820 Added a new util class for highlight words, proper variables added for light and dark 2016-03-24 22:01:33 -04:00
Torkel Ödegaard
ae255a7adf ux(): new checkbox tweaks 2016-03-21 13:37:56 +01:00
Torkel Ödegaard
9c2809a1a4 ux(): button style tweaks, align with grafana.net styles more 2016-03-20 10:31:50 +01:00
Matt Toback
6bf05a8154 Made the input shadow a bit more subtle while maintaining the box shadow 2016-03-16 16:08:18 -04:00
Torkel Ödegaard
82eb32a71e ux(): initial pass at new card / list design, #4364 2016-03-15 09:15:24 +01:00
Torkel Ödegaard
581ffb862c feat(plugins): polish to plugin page, better handling for reading readme file contents 2016-03-13 19:21:44 +01:00
Torkel Ödegaard
d55dc92502 feat(plugins): restored config view functionality to plugin page 2016-02-26 18:55:17 +01:00
Torkel Ödegaard
c148d89004 feat(plugins): progress on plugins page 2016-02-26 18:25:39 +01:00
Torkel Ödegaard
7207068181 ux(): worked more on new tabs view 2016-02-24 10:32:22 +01:00
Torkel Ödegaard
fa5cf602f5 removed old popover and unused boostrap components 2016-02-22 18:56:35 +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
f375c3000d ux(): help popover 2016-02-22 11:41:50 +01:00
Torkel Ödegaard
cc4fdd6d0c ux(): fixed issue with cach buster for temlpates, and updated on hover style for sidemenu to look better 2016-02-21 12:47:57 +01:00
Torkel Ödegaard
1a412378db fix(forms): reverted back to old checkboxes as the new ones are broken and missing clear state, fixes #4096 2016-02-21 08:18:49 +01:00
Matt
3ca8e8a6d2 Added a mixin to handle vendor prefixes for animations. Trying out slight opacity on menu 2016-02-20 14:40:16 -05:00
Torkel Ödegaard
c77f91213c ux(): minor tweak 2016-02-20 16:16:29 +01:00
Torkel Ödegaard
1dbaabffbc ux(): dark shade / contrast mini tweak 2016-02-20 16:09:31 +01:00
Torkel Ödegaard
701a2fdcf3 ux(): tweaks and polish, and also simpifying width classes, gf-size-xxx and gf-size-max-xx are now width-(1-30), and max-width-(1-30) 2016-02-20 14:21:39 +01:00
Torkel Ödegaard
a685e46fb6 ux(): minor tweaks 2016-02-20 11:05:06 +01:00
Torkel Ödegaard
d0d21ba9a6 ux(): updated orange color and fixed sidemenu background on dark theme 2016-02-19 15:33:24 +01:00
Torkel Ödegaard
4a062b6d00 ux(): colors refactoring 2016-02-19 14:24:19 +01:00
Torkel Ödegaard
c21b353042 ux(): color/grays palate refactoring 2016-02-19 12:26:59 +01:00
Torkel Ödegaard
e24e34619a ux(): began long on tiresome work on color refactors, polished button styles, added buttons to styleguide 2016-02-18 20:41:23 +01:00
Torkel Ödegaard
65f9cc986a ux(): styleguide with auto generated colors generated from the sass variable files 2016-02-18 18:01:24 +01:00
Torkel Ödegaard
cae975cb39 ux(): fixed login, signup, signup step2 and invite views 2016-02-18 14:44:36 +01:00
Torkel Ödegaard
08c1def8b7 ux(): minor update 2016-02-18 09:44:40 +01:00
Torkel Ödegaard
c97dbf390e ux(): fixed invite box 2016-02-16 14:39:45 +01:00
Torkel Ödegaard
008a031493 ux(sass): fixes and tweaks 2016-02-16 14:07:41 +01:00
Torkel Ödegaard
b05939ec9a ux(sass): work on sass variables, getting messy 2016-02-16 12:15:09 +01:00
Torkel Ödegaard
7c917156ee ux(sass): variable refactoring 2016-02-16 10:42:06 +01:00
Torkel Ödegaard
febad7b1d7 ux(saas): variable renaming 2016-02-16 09:42:46 +01:00
Torkel Ödegaard
1cd3985913 ux(sass): variable renaming 2016-02-16 08:30:37 +01:00
Torkel Ödegaard
058c905432 ux(sass): variable renaming 2016-02-16 08:17:08 +01:00
Torkel Ödegaard
41b775561a ux(): datasource form tweaks 2016-02-16 07:57:58 +01:00
Torkel Ödegaard
9045be0c12 ux(sass): rename less folder to sass 2016-02-15 18:17:06 +01:00