Commit Graph

93 Commits

Author SHA1 Message Date
Torkel Ödegaard
c7d701c8fa explore logs styling poc, WIP 2018-12-06 10:53:01 +01:00
Torkel Ödegaard
dddbe62d6c Merge branch 'master' into react-panels-step1 2018-10-19 09:15:37 +02:00
David Kaltschmidt
9e647590ac Review feedback, increased height 2018-10-18 10:42:25 +02:00
David Kaltschmidt
ff67213b42 Explore: Use react-table as table component
- adds react-table as dependency
- replaces custom table component in Explore
- vendors react-table styles and overrides them (currently in
  explore.scss)
2018-10-17 14:58:04 +02:00
Torkel Ödegaard
8ba865bf57 Merge branch 'master' into react-panels-step1 2018-10-12 13:31:20 +02:00
Peter Holmberg
02e7d713a1 Added Loading state on org pages 2018-10-11 11:49:34 +02:00
Peter Holmberg
262fee0a42 new grid layout add data source 2018-10-03 16:04:30 +02:00
Torkel Ödegaard
0b794ff685 Merge branch 'master' into react-panels 2018-08-24 17:29:10 +02:00
David Kaltschmidt
2961c3b3b9 Review feedback
- use color variables for cascader styles
- fix Table value type
2018-08-07 17:42:00 +02:00
David Kaltschmidt
642374de25 Explore: Metrics chooser for prometheus
- load all histogrammable metrics on start, based on `{le!=''}` series
  query
- select dropdown shows all those metrics as well as histograms in a
  special group
- select a metric will write fill the metric in the query box
- if a histogram is chosen, it will write a complete
  `histogram_quantile` query
- added new dependency: rc-cascader
2018-08-07 13:43:32 +02:00
Patrick O'Carroll
0b421004ea built a component for delete button in tables, instead of using a modal to confirm it now does it in the row of the table, created a sass file for the component, the component uses css transitions for animation 2018-07-20 09:59:04 +02:00
Torkel Ödegaard
e052e165e9 Merge branch 'react-panels' of github.com:grafana/grafana into react-panels 2018-07-09 15:35:31 +02:00
Torkel Ödegaard
dbe191fd55 wip: viz editor started 2018-07-07 05:10:42 -07:00
David Kaltschmidt
0425b47791 refactor Explore query field 2018-06-14 16:19:29 +01:00
David Kaltschmidt
f1220fd2a4 Explore WIP 2018-04-26 20:27:19 +02:00
Daniel Lee
4bc5945c17 dashfolders: remove inline styles 2018-01-30 17:26:44 +01:00
Torkel Ödegaard
7854f80f5a Merge remote-tracking branch 'origin/10289_user_picker' 2018-01-10 13:14:43 +01:00
Johannes Schill
e4a2bda4f2 10389 react tooltip components (#10473)
* poc: Use react-popper for tooltips #10389

* poc: Add popover component and use a hoc() for Tooltip + Popover to avoid code duplication #10389

* jest: Add snapshot tests to Popover and Tooltip #10389

* poc: Move target from hoc into Popover/Tooltip-component #10389

* poc: Clean up unused styles and use the existing Grafana style/colors on popper tooltip #10389

* poc: Remove test code before PR

* poc: Remove imports used in poc but shouldn't be included anymore #10389
2018-01-10 10:27:33 +01:00
Johannes Schill
5931d6c87d ux: POC on new select box for the user picker (#10289) 2018-01-09 14:39:10 +01:00
Torkel Ödegaard
908b6c8d0b tech: ran prettier on all scss files 2017-12-19 16:22:41 +01:00
Torkel Ödegaard
fbe9f759ad ux: work on dashboard settings views 2017-12-08 18:15:24 +01:00
Torkel Ödegaard
1b6be031e5 ux: dashboard settings progress 2017-12-08 15:53:26 +01:00
Torkel Ödegaard
9369a87e93 Merge branch 'develop' into develop-settings 2017-12-08 14:32:15 +01:00
Johannes Schill
ba3a81aba5 ux: Add CTA for empty lists 2017-12-04 16:18:46 +01:00
Torkel Ödegaard
1c27df97d6 ux: dashboard setings progres 2017-12-02 07:05:58 +01:00
Torkel Ödegaard
645f49eda4 ux: updating header design for pages 2017-11-30 11:31:38 +01:00
Marcus Efraimsson
d9ecb59dae dashlist: Support for check/uncheck all 2017-11-23 18:32:44 +01:00
Torkel Ödegaard
772ab7812f ux: worked on add panel function 2017-10-16 09:55:55 +02:00
Torkel Ödegaard
a3bd761b0c ux: testing out new icons 2017-10-14 21:17:16 +02:00
Torkel Ödegaard
6cd2624caf ux: initial react grid poc 2017-10-09 17:24:10 +02:00
Torkel Ödegaard
d38c891fac merge with master 2017-10-02 14:14:45 +02:00
Torkel Ödegaard
0c86241c5b Webpack (#9391)
* webpack poc, this is not going to work for plugins, dam

* tech: webpack and systemjs for plugins starting to work

* tech: webpack and systemjs combo starting to work

* tech: webpack + karma tests progress

* tech: webpack + karma progress

* tech: working on tests

* tech: webpack

* tech: webpack + karma, all tests pass

* tech: webpack + karma, all tests pass

* tech: webpack all tests pass

* webpack: getting closer

* tech: webpack progress

* webpack: further build refinements

* webpack: ng annotate fixes

* webpack: optimized build fix

* tech: minor fix for elasticsearch

* tech: webpack + ace editor

* tech: restored lodash move mixin compatability

* tech: added enzyme react test and upgraded to react v16

* tech: package version fix

* tech: added testdata to built in bundle

* webpack: sass progress

* tech: prod & dev build is working for the sass

* tech: clean up unused grunt stuff and moved to scripts folder

* tech: added vendor and manifest chunks, updated readme and docs

* tech: webpack finishing touches
2017-10-01 20:02:25 +02:00
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
Patrick O'Carroll
d6725d4fbe updated error page html+css, added ds_store to ignore (#9285) 2017-09-18 14:04:55 +02:00
Torkel Ödegaard
a38ded9e7e Merge branch 'master' into develop-newgrid-row-design2 2017-09-07 15:05:41 +02:00
Torkel Ödegaard
637ff61f90 Merge branch 'develop' into develop-newgrid-rows 2017-08-17 15:56:38 +02:00
Torkel Ödegaard
7bf6904119 ux: scrollbar stuff 2017-08-15 11:51:47 +02:00
Torkel Ödegaard
27d6492f40 ux: removed custom scrollbar look 2017-08-15 09:10:39 +02:00
Alexander Zobnin
e4dabb657c code-editor: initial directive for rich code editor (ace) 2017-08-07 19:31:50 +03: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
e63fa9c83c Merge branch 'master' into dashboard_folders 2017-06-15 16:23:10 -04:00
Torkel Ödegaard
9ff4ab1236 Merge branch 'master' into query_troubleshooting 2017-06-13 16:47:04 -04:00
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
Daniel Lee
764d25f007 WIP: rollback 2017-06-12 15:49:09 +02:00
sanchitraizada
77c046aac6 Implement review feedback 2017-06-01 17:57:09 -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
6ad1a396a5 feat: query troubleshooter 2017-05-19 16:00:01 +02:00