Commit Graph

3700 Commits

Author SHA1 Message Date
Dhia MOAKHAR
d55cc4e2a3 [elasticsearch] Fix add metric that was not working properly
when selecting Raw Documet metric type, the $scope.target.metrics was replaced by [$scope.agg],
 however the pointer to this variables is shared with metricAggs.
 Instead we free the array and add $scope.agg
2017-06-03 02:50:10 +00:00
Dhia MOAKHAR
966c2912fc [elasticsearch] Add option for result set size in raw_dcument
it allows to specify the result set size in raw_document.
 Example: table  panel could show more (or less) than 500 line if needed.
 Added test to spec
2017-06-02 23:56:48 +00: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
Torkel Ödegaard
95a4ec8bf2 Merge branch 'v4.3.x' 2017-05-31 10:55:06 +02:00
Torkel Ödegaard
812958162a revert: removed lazy loading feature, closes #8500 2017-05-31 10:47:04 +02:00
Torkel Ödegaard
cd3807055e chrome: an attempt to fix scroll issue with chrome, but this did not fix the problem as it seems to be caused by some interaction between graph rendering and scrolling, #8494 2017-05-30 13:50:38 +02:00
Pranay Kanwar
26ec874fb1 Frontend query changes corresponding #8336 (#8489) 2017-05-30 09:53:11 +02:00
Torkel Ödegaard
f16e3e38ee Merge branch 'v4.3.x' 2017-05-29 12:20:34 +02:00
Daniel Lee
d318c9093f graph: Handle data with zeroes for log scale
fixes #8446. Data with all values equal to zero, creates a max with the
value of Infinite. The for loop for creating ticks then gets stuck in an
infinite loop. This fix resets min and max and creates some fake ticks
for the y-axis if the min and max are not finite numbers.
2017-05-29 12:18:54 +02:00
Torkel Ödegaard
0d865a83bc fix: fixed test data fake metric query, fixes #8474 2017-05-29 12:17:51 +02:00
Victor Azevedo
980b9b5ca0 use fielddata_fields in elasticsearch 2.x queries
Resolves issue #8467
2017-05-29 12:15:51 +02:00
Torkel Ödegaard
5e0b03928e Merge branch 'v4.3.x' 2017-05-29 10:49:02 +02:00
Torkel Ödegaard
0d39852ef4 fix: fixed test data fake metric query, fixes #8474 2017-05-29 10:48:38 +02:00
Daniel Lee
c17d02e496 csv: remove sep metadata as only works for excel 2017-05-26 15:43:09 +02:00
Cédric Reginster
ee0d0155a5 Refactor to component based style 2017-05-26 15:43:09 +02:00
Cédric Reginster
f484b4c347 Make csv export date time format configurable
- Move export csv options to modal dialog
2017-05-26 15:43:09 +02:00
Daniel Lee
3292a48381 graph: dashes with linewidth fix. Fixes #8469
Adds series override options for dash spaces and dash length.
2017-05-26 15:09:05 +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
Victor Azevedo
0a1c2a7024 use fielddata_fields in elasticsearch 2.x queries
Resolves issue #8467
2017-05-25 11:43:29 -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
90871ca12e Merge branch 'v4.3.x' 2017-05-24 16:48:05 +02:00
Torkel Ödegaard
896f849b84 fix: influxdb query editor did no show alias by input field when in text editor mode, fixes #8459 2017-05-24 16:47:38 +02:00
Torkel Ödegaard
a5318def66 Merge branch 'v4.3.x' 2017-05-24 11:20:35 +02:00
Torkel Ödegaard
634ee0f9fa fix: graphg panel logarithmic scale goes blow x-axis, fixes #8244 2017-05-24 11:20:07 +02:00
Torkel Ödegaard
3695337980 refactoring: Elasticearch filter label PR #8420 2017-05-23 15:14:23 +02:00
Torkel Ödegaard
648e8a9547 Merge branch 'master' of https://github.com/limefamily/grafana into limefamily-master 2017-05-23 14:48:14 +02:00
Torkel Ödegaard
044668a395 login: minor fix to login page 2017-05-23 11:10:16 +02:00
Daniel Lee
73cb035231 mysql: annotation support. Fixes #8382
Simple query editor - a text area with a Show Help section.
Validation for empty query and if the time_sec column is missing.
2017-05-23 09:53:20 +02: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
7c50563f0f fix: fixed crash when gzip was enabled 2017-05-22 14:09:54 +02:00
Torkel Ödegaard
a64c06d02c mysql: add user permission notice mysql config view, closes #8359 2017-05-22 13:53:43 +02:00
Torkel Ödegaard
a0b9dcad4d alert: alerting annotation improvements, fixes #8421 2017-05-22 13:02:49 +02:00
Torkel Ödegaard
20e631a22d fix: All alert annotations showed up in unsaved/new dashboards graph panels with alert, fixes #8361 2017-05-22 10:49:26 +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
9045be5689 fix: Prometheus & hidden queries caused no metric query to be issued, fixes #8413 2017-05-19 10:24:47 +02:00
田子宽
9c35d3f87c Add kibana like readable label to elasticsearch query builder 2017-05-19 11:38:28 +08:00
Torkel Ödegaard
8918922179 alerting: fixed issue with included alerting error & no data reasons, fixes #8412 2017-05-18 14:10:12 +02:00
Torkel Ödegaard
43d5525aaa Merge branch 'master' into alert_state 2017-05-18 13:38:34 +02:00
Daniel Lee
540ee35393 timerange: new quick ranges, month and year so far
The new time ranges can also be used for time range overrides in the
override relative time field. E.g. now/M or now/y.
2017-05-17 13:52:39 +02:00
Torkel Ödegaard
87f5222907 typescript: fixed issue with tslint in testsW 2017-05-17 13:43:17 +02:00
Torkel Ödegaard
d261f33c3d influxdb: influxdb query editor changes 2017-05-17 13:27:56 +02:00
Torkel Ödegaard
972be88569 fix: singlestat gauge sizing issue when panel is very wide, fixes #7773 2017-05-17 11:56:40 +02:00
Torkel Ödegaard
8e03f321eb fix: Elasticsearch table aggregation and support for many aggregations of same type, now uses field name if more than 1 aggregation of same type, fixes #4709 2017-05-17 11:33:08 +02:00
Torkel Ödegaard
02c79a6389 influxdb: improvements to influxdb query editor, SLIMIT, LIMIT and ORDER BY now added on demand by plus button 2017-05-16 16:28:58 +02:00
Torkel Ödegaard
8b11712f5e fix: Graphite issue with toggle edit mode in query editor, fixes #8377 2017-05-16 14:29:30 +02:00
Torkel Ödegaard
f84dc24fcb alerting: improving and fixing alert history, #7257 2017-05-15 16:17:05 +02:00
Konstantin Koniev
9566197620 Internationalise keybindings. (#8311) 2017-05-12 14:59:56 +02:00
Torkel Ödegaard
910e54d75e Merge branch 'master' of github.com:grafana/grafana 2017-05-11 16:31:31 +02:00
Torkel Ödegaard
2e7ac8f2da heatmap: fix for unit options width 2017-05-11 15:20:13 +02:00
Mitsuhiro Tanda
5e85558e9e (prometheus) fix graph link (#8349) 2017-05-11 14:24:13 +02:00
Torkel Ödegaard
f976e465c4 mysql: minor improvement for table panel 2017-05-11 11:06:13 +02:00
Torkel Ödegaard
4ce0bf4d16 mysql: improved mysql data source, added test feature when adding data source, fixed cache issue 2017-05-11 10:50:24 +02:00
Torkel Ödegaard
ab6740c685 heatmap: Docs and heatmap fixes 2017-05-11 10:19:47 +02:00
Torkel Ödegaard
30b6c3b54a build: fixed heatmap test 2017-05-11 08:56:32 +02:00
Suzana Pescador
8c9cc4fae1 [Bug] Coloring Background on siglestat panel #7242 (#8334)
The bug was happening because the background color was being based on
the rounded value (accounting the user defined decimals). Changed it to
use the pure value (not the rounded) to follow whats being done in the
value color, and also in the table thresholds (they don't consider the
decimals when comparing to thresholds).
2017-05-10 20:02:35 +02:00
Torkel Ödegaard
1d4338ba54 Merge branch 'master' of github.com:grafana/grafana 2017-05-10 17:19:03 +02:00
Torkel Ödegaard
0a68dabb89 heatmap: Fixes & progress on heatmap docs 2017-05-10 17:17:51 +02:00
Suzana Pescador
d6eefcb5ce Can't remove default avg column in table #4515 (#8335)
Avg column was being added at every rendering, if the table was empty.
Now the column will be added once as an initialization when selecting a
'timeseries_aggregations' transform.
2017-05-10 15:51:34 +02:00
Torkel Ödegaard
d791f902e9 heatmap: more refactoring 2017-05-10 13:05:26 +02:00
Torkel Ödegaard
acff78d421 Merge branch 'master' into heatmap-refactoring2 2017-05-09 12:41:11 +02: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
e218052a90 fix: fixed slow down issue in table panel by removing the fillter null values feature (#7602), not sure the filter null values is a good table option, should be done in metric query, fixes #8234 2017-05-09 12:07:06 +02:00
Torkel Ödegaard
79120a0b1f Merge branch 'master' of github.com:grafana/grafana 2017-05-09 08:33:43 +02:00
Torkel Ödegaard
8d072de556 elasticsearch: changed default terms min_doc_count to 1 and order by to desc, closes #8231 2017-05-09 08:33:37 +02:00
Anton Yackushev
fdc97010b4 Rename fielddata_fields to docvalue_fields (#8317)
The parameter fielddata_fields is deprecated and removed in 5.0 https://github.com/elastic/elasticsearch/issues/19027
2017-05-09 07:16:48 +02:00
Torkel Ödegaard
25a267a7ab fix: segment used influxdb naming for variable in options callback, should be more generic 2017-05-08 16:08:53 +02:00
Torkel Ödegaard
f168c9e53d table: minor ux options update 2017-05-08 15:57:15 +02:00
Torkel Ödegaard
076a94560b Merge branch 'table-options' 2017-05-08 15:31:29 +02:00
Torkel Ödegaard
be284adacc table: more table options refactoring 2017-05-08 15:26:05 +02:00
Torkel Ödegaard
556829eda9 table: began table options redesign 2017-05-08 11:17:29 +02:00
lpavlovi
c323d2fc4c Removed panelElemName - appears to not be used anywhere (#8313) 2017-05-07 08:19:08 +02:00
Dan Cech
e8fbfce59a remove unneeded import, update docs text 2017-05-05 13:11:44 -04:00
Dan Cech
0f24b45c1a Merge branch 'master' into table-col-alias 2017-05-05 12:41:35 -04:00
Dan Cech
29653d2bec refactor and add column alias tests 2017-05-05 12:40:49 -04:00
Torkel Ödegaard
fbf39598b8 heatmp: removed series stats option, lacked tests 2017-05-05 17:33:54 +02:00
Torkel Ödegaard
ece21b2d95 heatmap: more refactoring 2017-05-05 17:28:33 +02:00
Torkel Ödegaard
dd5a426911 heatmap: refactoring heatmap 2017-05-05 16:15:08 +02:00
Torkel Ödegaard
43c6f74904 heatmap: removed fill background, and highlight card options 2017-05-05 12:33:04 +02:00
Torkel Ödegaard
4412e41738 ux: updated heatmap and alertlist icons 2017-05-05 11:43:42 +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
Torkel Ödegaard
e75bc5d39a docs: added templating docs link to app 2017-05-05 08:56:19 +02:00
Torkel Ödegaard
6ee11f1172 heatmap: minor update 2017-05-05 07:05:11 +02:00
Torkel Ödegaard
f167d459fe Merge branch 'heatmap-refactor' 2017-05-04 19:56:29 +02:00
Torkel Ödegaard
5acabc6ccb heatmap: refactoring 2017-05-04 19:56:20 +02:00
Torkel Ödegaard
61b51c0cbf heatmap: refactoring 2017-05-04 16:03:47 +02:00
柯豪
b7a1ff753a update name for AWS credentials (#8287) 2017-05-04 11:44:36 +02:00
Torkel Ödegaard
0bab1fd088 Merge branch 'templating-docs', closes #8243 2017-05-04 11:17:39 +02:00
Torkel Ödegaard
ed8d284715 docs: updated prometheus docs 2017-05-03 15:50:38 +02:00
Daniel Lee
186a5e9d6f Merge pull request #8274 from sliceratwork/master
Update style guide
2017-05-03 11:04:52 +02:00
Andrei Stefan
c57ec23a66 fix broken layout for styleguide icons tab 2017-05-03 11:46:08 +03:00
Torkel Ödegaard
b042c53980 ux: updated heatmap icon 2017-05-03 08:56:51 +02:00
Vladimir Gordiychuk
deab4a378a bug: MetricSegment lost information about type (#8278)
Fixed #8277
2017-05-03 08:22:30 +02:00
Andrei Stefan
53ccc6f48f fix theme switching in style guide 2017-05-02 16:45:34 +03:00
Andrei Stefan
f43c749422 add plugin authoring tab in style guide 2017-05-02 16:15:28 +03:00
Andrei Stefan
ad3da0f47c add icon guide 2017-05-02 15:57:02 +03:00
Torkel Ödegaard
0fd96b951a wip: heatmap refactor 2017-05-02 09:55:18 +02:00