Commit Graph

491 Commits

Author SHA1 Message Date
Torkel Ödegaard
a6bbcb8fef ux: gridstack poc 2017-06-13 16:10:56 -04:00
Torkel Ödegaard
35c440eb79 Gridstack: testing 2017-06-13 12:59:37 -04:00
Torkel Ödegaard
95c8a76aa6 ux: minor search style improvements 2017-06-08 13:56:51 +02:00
Torkel Ödegaard
01ff3bbe0a ux: mini css position fix 2017-06-07 22:03:10 +02:00
Torkel Ödegaard
61bdc91272 ux: css fix to search position when sidemenu is pinned 2017-06-07 21:54:55 +02:00
Torkel Ödegaard
64d620c987 dasboard_history: minor style fix change 2017-06-07 13:50:59 +02:00
Torkel Ödegaard
56b3c4a3a0 dasboard_history: fixed disabled attribute so it works both by disabling and fixing style, no need for disabled class and disabled attribute 2017-06-07 13:46:36 +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
Torkel Ödegaard
88da3a99e1 refactoring: trying to remove all the css overrides in history tab and make the styles more more inline with best practice css, and if needed use modifier overrides instead 2017-06-06 11:03:56 +02:00
Torkel Ödegaard
f3980504e2 Merge branch 'master' into walmartlabs-master 2017-06-05 13:43:00 +02:00
Torkel Ödegaard
d47c47853a ux: added css annimations for dash edit views 2017-06-02 15:29:25 +02:00
Torkel Ödegaard
3bea304bab ux: made new search more responsive 2017-06-02 14:19:39 +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
77c046aac6 Implement review feedback 2017-06-01 17:57:09 -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
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
c34db77f04 grafana_com: changed name of oauth grafana_net integration (old settings names still work), and updated login button look, closes #8415 2017-05-22 14:56:50 +02:00
Torkel Ödegaard
a0b9dcad4d alert: alerting annotation improvements, fixes #8421 2017-05-22 13:02:49 +02:00
Torkel Ödegaard
878121bb46 fix: templating variable name validation detecting global variable naming wrongly, fixes #8423 2017-05-19 11:14:11 +02:00
Torkel Ödegaard
43d5525aaa Merge branch 'master' into alert_state 2017-05-18 13:38:34 +02:00
Daniel Lee
4182acda58 Merge pull request #8332 from sliceratwork/master
upgrade to Font Awesome 4.7.0
2017-05-17 14:58:14 +02:00
Torkel Ödegaard
f84dc24fcb alerting: improving and fixing alert history, #7257 2017-05-15 16:17:05 +02:00
Torkel Ödegaard
0a68dabb89 heatmap: Fixes & progress on heatmap docs 2017-05-10 17:17:51 +02:00
Andrei Stefan
b054b1faac upgrade to Font Awesome 4.7.0 2017-05-10 09:28:00 +03:00
Torkel Ödegaard
8bbff2c44e table: refactoring table options, now column styles are in a seperate tab 2017-05-09 12:35:44 +02:00
Torkel Ödegaard
556829eda9 table: began table options redesign 2017-05-08 11:17:29 +02:00
Torkel Ödegaard
5c9810fba4 docs: added in app docs & links to annotation docs 2017-05-05 11:30:44 +02:00
Torkel Ödegaard
2479ad262e ux: updated look of info box 2017-05-05 09:16:28 +02:00
Andrei Stefan
c57ec23a66 fix broken layout for styleguide icons tab 2017-05-03 11:46:08 +03:00
Andrei Stefan
ad3da0f47c add icon guide 2017-05-02 15:57:02 +03:00
Matt Toback
b909cfbde4 Refactored Alert Pulse (#8227)
* Moved the animation to the pseudo element which seemed to reduce the CPU usage in an observable way.

* Removed unnecessary style
2017-04-27 08:49:03 +02:00
Torkel Ödegaard
a0d8afd435 ux: minor change to styles & heatmap option names 2017-04-26 14:18:58 +02:00
Torkel Ödegaard
ea53e7221e mysql: added query help 2017-04-21 15:52:42 +02:00
Torkel Ödegaard
809467955a Merge branch 'master' into create-annotations 2017-04-18 17:07:44 +02:00
Torkel Ödegaard
db36639ffc fix: #8111 2017-04-18 16:58:34 +02:00
Torkel Ödegaard
0335c1f368 ux: updated styles a bit 2017-04-14 13:08:03 +02:00
Torkel Ödegaard
dbe5480edc create annotations work 2017-04-14 11:41:02 +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
Alexander Zobnin
c9801595e5 heatmap: add heatmap_ctrl tests and fix errors 2017-03-27 19:04:29 +03:00
Alexander Zobnin
96e91b5a0f Move css styles to public/sass/components/_panel_heatmap.scss 2017-03-24 15:15:01 +03:00
Trent White
5ed7d65b0e orange grafana.com seemed too much. making it gray 2017-03-21 13:13:35 -04:00
Trent White
a510d85480 format css 2017-03-21 11:17:28 -04:00
Trent White
182a30e22c style tweak 2017-03-21 11:16:42 -04:00
Trent White
d4f2f41088 add dashboard and plugin icons to plugin list and dash search 2017-03-21 11:12:58 -04:00
Daniel Lee
b9940e618c profile: locks login fields if disable_login_form
If the auth config variable, disable_login_form, is set to true then
the username and email fields are set to read-only on the profile page.

The reason for this is so that the user does not lock themselves out by
changing their email address or username. Or create a new user by
changing both.

ref #7810
2017-03-21 14:42:32 +01:00
bergquist
9b6571fab1 template: dont allow template variables to begin with '__'
closes #7678
2017-02-28 17:04:47 +01:00
xginn8
1c8509ea58 wrap text in annotations modal (#7549)
annotation: wrap text in drop_element, fixes #7542
2017-02-14 08:49:43 +01:00
Daniel Lee
193d468ed3 admin: adds paging to global user list
Currently there is a limit of 1000 users in the global
user list. This change introduces paging so that an
admin can see all users and not just the first 1000.

Adds a new route to the api - /api/users/search that
returns a list of users and a total count. It takes
two parameters perpage and page that enable paging.

Fixes #7469
2017-02-13 12:59:36 +01:00