Commit Graph

133 Commits

Author SHA1 Message Date
Torkel Ödegaard
4819e50441 newgrid: fixes to default home dashboard 2017-08-25 14:47:57 +02:00
Torkel Ödegaard
1aa5ed0cde ux: minor fixes 2017-08-25 10:41:24 +02:00
Torkel Ödegaard
301ae2ea05 Merge branch 'develop' into develop-newgrid-rows 2017-08-18 08:57:33 +02:00
Torkel Ödegaard
8817cc9aaf ux: color tweaks 2017-08-17 21:32:23 +02:00
Torkel Ödegaard
7ed2ed71f0 ux: dashboard stuff 2017-08-17 18:50:46 +02:00
Torkel Ödegaard
637ff61f90 Merge branch 'develop' into develop-newgrid-rows 2017-08-17 15:56:38 +02:00
Torkel Ödegaard
11f6c4eb28 ux: minor changes 2017-08-17 15:52:22 +02:00
Torkel Ödegaard
8b87964344 ux: testing roboto font 2017-08-14 13:57:16 +02:00
Torkel Ödegaard
61459b287c grid: new grid fixes 2017-08-10 15:29:40 +02:00
Torkel Ödegaard
a2a4325b6e Merge branch 'develop-newgrid' of github.com:grafana/grafana into develop-newgrid 2017-08-09 15:35:06 +02:00
Torkel Ödegaard
77b42220f4 feat: new grid fixes 2017-08-09 15:33:19 +02:00
Torkel Ödegaard
95f67ed79d minor fixes 2017-08-05 08:51:57 +02:00
Torkel Ödegaard
957e1c188a Merge branch 'develop' into develop-newgrid 2017-08-04 13:26:05 +02:00
Torkel Ödegaard
a0a2eda5c6 Merge branch 'master' into gridstack 2017-08-04 13:09:26 +02:00
Torkel Ödegaard
d862b64b1b ux: minor panel menu tweaks 2017-08-03 13:26:30 +02:00
Torkel Ödegaard
148c24aa18 ux: tweaks to new panel menu 2017-08-03 10:35:27 +02:00
Torkel Ödegaard
9fb60c2fc8 Merge branch 'develop' into panel-title-menu-ux 2017-08-02 09:56:08 +02:00
Torkel Ödegaard
e312408855 updated 2017-08-02 09:22:22 +02:00
Torkel Ödegaard
21a3f443f2 Merge branch 'master' into panel-title-menu-ux 2017-08-01 11:43:00 +02:00
Torkel Ödegaard
a6bbcb8fef ux: gridstack poc 2017-06-13 16:10:56 -04:00
Trent White
192c447c2c create new auth icon for grafana.com so it doesn't share the same file as the main logo (#8581) 2017-06-12 17:17:00 +02:00
Torkel Ödegaard
f3fe664f24 ux: minor tweak to faintness of icons of panel menu caret 2017-06-08 16:57:37 +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
64d620c987 dasboard_history: minor style fix change 2017-06-07 13:50:59 +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
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
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
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
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
d4f2f41088 add dashboard and plugin icons to plugin list and dash search 2017-03-21 11:12:58 -04: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
xginn8
873a8bc520 wrap the title of a panel and dashboard search results. fixes #7203 (#7213) 2017-01-16 12:02:07 +01:00
Torkel Ödegaard
8030b56bba fix(panel): fixed panel help text for panels that set background color, fixes #7085 2017-01-02 11:14:00 +01:00
Trent White
5440804109 add new grabber icon and tweak styles to better fit space (#7019) 2016-12-20 17:49:04 +01:00
Matt
594207b6d3 Polish on icon placement, incorporated torkel's better idea for going slightly lighter, make sure error icon color was white now 2016-12-16 12:51:22 -05:00
Matt
0c85e845df Softened the color a bit by mixing in the panel-bg, so it's not introducing any new variables. Was too start as pure body-bg 2016-12-16 12:11:29 -05:00
Torkel Ödegaard
62f3b16671 feat(panel): working on panel help text and unifying panel links, panel errors, and panel help into a single panel feature, #4079 , #6847 2016-12-16 13:06:04 +01:00
Torkel Ödegaard
ac9ae52cea feat(panel): working on panel help text and unifying panel links, panel errors, and panel help into a single panel feature, #4079 , #6847 2016-12-16 12:46:29 +01:00