Commit Graph

6844 Commits

Author SHA1 Message Date
Francisco Guimarães
0223a75de0 Refresh query variable when another variable is used in regex field (#12961) 2018-08-20 11:56:12 +02:00
Sven Klemm
e04127e430 unify quoting 2018-08-18 16:09:12 +02:00
Sven Klemm
49319fbdea prefill editor with first metric table 2018-08-18 13:21:08 +02:00
Sven Klemm
ff2564900f only allow 1 filter macro in where clause 2018-08-18 12:34:19 +02:00
Sven Klemm
c1890dbb6d fix timeColumnType assignment 2018-08-18 12:28:05 +02:00
Sven Klemm
9699d7a166 make suggested filter macro depend on type 2018-08-18 12:11:10 +02:00
Sven Klemm
18ce6fc280 use unixEpochGroup macro for unix timestamp 2018-08-18 12:04:32 +02:00
Sven Klemm
998bb6ebe3 Merge branch 'master' into postgres-query-builder 2018-08-18 11:54:39 +02:00
Francisco Guimarães
d58986872c Replacing variable interpolation in "All value" value 2018-08-17 11:04:32 -03:00
Marcus Efraimsson
2bb87446be
Merge pull request #12955 from grafana/12951-login-buttons
Login button issue in light theme
2018-08-17 15:31:31 +02:00
Marcus Efraimsson
313a8bd033
Merge pull request #12891 from svenklemm/unixepochgroup
add $__unixEpochGroup and $__unixEpochGroupAlias to sql datasources
2018-08-17 14:41:33 +02:00
Marcus Efraimsson
d6ad1ced6d
when value in variable changes, identify which variable(s) to update
Given you have variables a, b, c, d where b depends on a, c depends on b, c, d depends on a.
When updating a only an update of b and d should be triggered since c depends on b
and c will be updated eventually when the update of b are finished.
2018-08-17 12:20:21 +02:00
Patrick O'Carroll
190432296d removed inverse btn styling and added bgColor to generic oauth and grafana.com login buttons, added styling so log in button uses dark theme inverse btn styling both for dark and light theme 2018-08-17 10:40:57 +02:00
Sven Klemm
8e4db8cc3a suggest operators depending on datatype 2018-08-17 10:38:23 +02:00
Sven Klemm
28f97a2450 update persisted parts on param change 2018-08-16 13:23:38 +02:00
Sven Klemm
e84a1cbcc5 persist datatype information 2018-08-16 12:50:32 +02:00
Sven Klemm
8ced29a0e7 Don't do value suggestions for numeric and timestamp 2018-08-16 11:48:36 +02:00
Patrick O'Carroll
8877200ef4 created a class for loading buttons, added a button for when login slow on login page 2018-08-16 10:58:47 +02:00
Sven Klemm
735c4abe6c rename postgres_query.jest.ts to .test.ts 2018-08-15 12:06:32 +02:00
Sven Klemm
907e8fd77c fix variable escaping 2018-08-15 11:37:30 +02:00
Sven Klemm
a2f4441f9d autodetect timescaledb when version >= 9.6 2018-08-15 10:42:15 +02:00
Sven Klemm
2d12801186 detect postgres version for saved datasources 2018-08-15 09:48:06 +02:00
Sven Klemm
2606f6e715 use pointer cursor for buttons in query editor 2018-08-15 09:21:17 +02:00
Sven Klemm
6d8ad3b076 require postgres 9.4+ for ordered set aggregate functions 2018-08-14 15:49:37 +02:00
Sven Klemm
9d022766ee add postgres version to datasource config 2018-08-14 15:45:55 +02:00
Sven Klemm
c90eb45cef only show first/last aggregate when timescaledb is enabled 2018-08-14 15:29:29 +02:00
Sven Klemm
e12d07dd68 keep jsonData in PostgresDatasource 2018-08-14 15:27:58 +02:00
Sven Klemm
5b3b0295e8 Merge branch 'master' into postgres-query-builder 2018-08-14 15:10:16 +02:00
Benoît Knecht
7ec146df99 social: add GitLab authentication backend
GitLab could already be used as an authentication backend by properly
configuring `auth.generic_oauth`, but then there was no way to authorize
users based on their GitLab group membership.

This commit adds a `auth.gitlab` backend, similar to `auth.github`, with
an `allowed_groups` option that can be set to a list of groups whose
members should be allowed access to Grafana.
2018-08-14 14:11:48 +02:00
Marcus Efraimsson
660530a3a6
Merge pull request #12914 from dehrax/12224-final
Karma to Jest: rename and cleanup
2018-08-14 12:55:23 +02:00
Sven Klemm
15c8ef6c95 Merge branch 'master' into postgres-query-builder 2018-08-14 12:51:03 +02:00
Torkel Ödegaard
a1ed3ae094 feat: add auto fit panels to shortcut modal, closes #12768 2018-08-14 12:26:08 +02:00
Marcus Efraimsson
74077be19e
Merge pull request #12680 from svenklemm/timebucket
[postgres] add timescaledb option to postgres datasource
2018-08-14 12:12:43 +02:00
Marcus Efraimsson
ddc83c2a72
Merge pull request #12897 from dehrax/12224-renderer
WIP Karma to Jest: heatmap renderer (refactor)
2018-08-14 11:16:48 +02:00
Marcus Efraimsson
77ee032e41
Merge pull request #12809 from dehrax/12224-share-modal-ctrl
Karma to Jest: share_modal_ctrl
2018-08-14 10:57:15 +02:00
Tobias Skarhed
a65589a5fb Rename test files 2018-08-14 10:52:41 +02:00
Marcus Efraimsson
03aed21d4b
Merge pull request #12598 from kichristensen/TimeRangeVariables
Support timeFilter in query templating for InfluxDB
2018-08-14 10:24:21 +02:00
Marcus Efraimsson
8dbc75ceea
Merge pull request #12844 from grafana/10705_dash_links
Use uid when linking to dashboards internally in a dashboard
2018-08-14 09:16:43 +02:00
Tobias Skarhed
53bab1a84b Remove tests and logs 2018-08-14 09:15:14 +02:00
Torkel Ödegaard
7e0482e78d
Fix for Graphite function parameter quoting (#12907)
* fix: graphite function parameters should never be quoted for boolean, node, int and float types, fixes #11927

* Update gfunc.ts
2018-08-14 08:52:51 +02:00
Marcus Efraimsson
36e808834d don't render hidden columns in table panel (#12911) 2018-08-14 08:50:22 +02:00
Tobias Skarhed
fa6d25af72 Remove comment 2018-08-13 16:36:22 +02:00
Tobias Skarhed
be7b663369 Cleanup 2018-08-13 16:36:22 +02:00
Tobias Skarhed
38422ce8a4 All tests passing 2018-08-13 16:36:22 +02:00
Tobias Skarhed
35694a76ef Class to function. Half tests passing 2018-08-13 16:36:22 +02:00
Tobias Skarhed
739bee0207 Karma to Jest: graph (refactor) (#12860)
* Begin conversion

* Test setup started

* Begin rewrite of graph

* Rewrite as class

* Some tests passing

* Fix binding errors

* Half tests passing

* Call buildFlotPairs. More tests passing

* All tests passing

* Remove test test

* Remove Karma test

* Make methods out of event functions

* Rename GraphElement
2018-08-13 16:08:01 +02:00
Tobias Skarhed
472b880939 Add React container 2018-08-13 15:51:58 +02:00
Marcus Efraimsson
39669e5002 fix redirect to panel when using an outdated dashboard slug (#12901) 2018-08-13 15:41:15 +02:00
David
1c185ef8d8 Add commit to external stylesheet url (#12902)
- currently only the release is used as a fingerprint which produces
  caching issues for all lastest master builds
- also add build commit to url fingerprint
- make bra also watch go html template files
2018-08-13 15:40:52 +02:00
Marcus Efraimsson
d110343e53
Merge pull request #12838 from grafana/12476-show-teams-on-profile
show teams on profile
2018-08-13 15:16:04 +02:00
Patrick O'Carroll
535bab1baa now hides team header when no teams + fix for list hidden when only one team 2018-08-13 15:07:29 +02:00
Tobias Skarhed
e6057e08de Rename to HeatmapRenderer 2018-08-13 14:24:15 +02:00
Tobias Skarhed
2e2de38b31 Mock things 2018-08-13 13:55:47 +02:00
David Kaltschmidt
978e89657e Explore: Fix label filtering for rate queries
- exclude `]` from match expression for selector injection to ignore
  range vectors like `[10m]`
2018-08-13 12:53:12 +02:00
Sven Klemm
3f5d325e5b Merge branch 'master' into postgres-query-builder 2018-08-13 12:40:00 +02:00
Sven Klemm
8c4d59363e add $__unixEpochGroup to mssql datasource 2018-08-13 12:23:42 +02:00
Sven Klemm
fbc67a1c64 add $__unixEpochGroup to mysql datasource 2018-08-13 12:17:05 +02:00
Sven Klemm
bfe28ee061 Add $__unixEpochGroup macro to postgres datasource 2018-08-13 12:08:14 +02:00
Patrick O'Carroll
bdd9af0864 changed const members to filteredMembers to trigger get filtered members, changed input value to team.search (#12885) 2018-08-13 11:34:16 +02:00
Sven Klemm
c9bbdf244c get timecolumn datatype on timecolumn change 2018-08-13 11:29:35 +02:00
Tobias Skarhed
a79c43420a Add mocks 2018-08-13 10:57:32 +02:00
Sven Klemm
1dd8192d51 fix datatype query 2018-08-13 09:57:46 +02:00
Julien Pivotto
48364f0111 Add support for $__range_s (#12883)
Fixes #12882

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2018-08-13 07:53:41 +02:00
Sven Klemm
d8606ddfb0 Merge branch 'master' into postgres-query-builder 2018-08-12 10:02:18 +02:00
Tobias Skarhed
520aad819d Replace element 2018-08-10 16:30:51 +02:00
Tobias Skarhed
076bfea362 Rewrite heatmap to class 2018-08-10 15:35:47 +02:00
David Kaltschmidt
0f5945c557 Explore: still show rate hint if query is complex
- action hint currently only works for very simple queries
- show a hint w/o action otherwise
2018-08-10 15:29:21 +02:00
David Kaltschmidt
a0fbe3c296 Explore: Filter out existing labels in label suggestions
- a valid selector returns all possible labels from the series API
- we only want to suggest the label keys that are not part of the
  selector yet
2018-08-10 14:45:09 +02:00
Daniel Lee
2770a7bc0c
Merge pull request #12843 from pgiraud/plugin_readme_links
Convert URL-like text to links in plugins readme
2018-08-10 14:01:05 +02:00
Daniel Lee
71630e4a7b
Merge pull request #12856 from grafana/12855-team-members-delete-button
Delete button for team members page
2018-08-10 13:46:13 +02:00
David Kaltschmidt
e832f91fb6 Fix initial state in split explore
- remove `edited` from query state to reset queries
- clear more properties in state
2018-08-10 13:37:15 +02:00
Patrick O'Carroll
277c735814 replaced with EmptyListCta 2018-08-10 11:31:35 +02:00
Tobias Skarhed
9188f7423c Begin conversion 2018-08-10 09:35:19 +02:00
Patrick O'Carroll
1d1370d11d changed messaging 2018-08-10 08:27:22 +02:00
Sven Klemm
a4a33d80db mention time_bucket in timescaledb tooltip 2018-08-09 17:30:46 +02:00
Marcus Efraimsson
1bb3cf1c31 keep legend scroll position when series are toggled (#12845) 2018-08-09 16:04:56 +03:00
Patrick O'Carroll
f339b3502a replaced confirm delete modal with deleteButton component in teams members list 2018-08-09 12:56:55 +02:00
Patrick O'Carroll
584a9cd942 [wip]added empty list cta to team list, if statement toggles view for when the list is empty or not 2018-08-09 11:05:20 +02:00
David Kaltschmidt
9d66eeb10c Fix padding for metrics chooser in explore 2018-08-09 10:21:54 +02:00
Sven Klemm
acd1acba2d revert passing ctrl to testDatasource 2018-08-09 10:05:35 +02:00
Sven Klemm
c3aad10047 change timescaledb to checkbox instead of select 2018-08-09 10:05:35 +02:00
Sven Klemm
b987aee7cf add timescaledb option to postgres datasource
This adds an option to the postgres datasource config for
timescaledb support. When set to auto it will check for
timescaledb when testing the datasource.

When this option is enabled the $__timeGroup macro will
use the time_bucket function from timescaledb to group
times by an interval.

This also passes the datasource edit control to testDatasource
to allow for setting additional settings, this might be useful
for other datasources aswell which have optional or version
dependant features which can be queried.
2018-08-09 10:05:35 +02:00
David Kaltschmidt
128a5d98e1 Explore: expand recording rules for queries
- load recording rules from prometheus
- map rule name to rule query
- query hint to detect recording rules in query
- click on hint fix expands rule name to query
2018-08-08 16:56:21 +02:00
David
c1b9bbc2cf Explore: Query hints for prometheus (#12833)
* Explore: Query hints for prometheus

- time series are analyzed on response
- hints are shown per query
- some hints have fixes
- fix rendered as link after hint
- click on fix executes the fix action

* Added tests for determineQueryHints()

* Fix index for rate hints in explore
2018-08-08 17:50:30 +03:00
Pierre GIRAUD
d7fb704e27
Convert URL-like text to links in plugins readme 2018-08-08 16:07:33 +02:00
Marcus Efraimsson
e97251fe28
skip target _self to remove full page reload 2018-08-08 16:01:35 +02:00
Marcus Efraimsson
8dfe4a97ef
use uid when linking to dashboards internally in a dashboard 2018-08-08 16:01:01 +02:00
Sven Klemm
13d0fa4b9a add previous fill mode to query builder 2018-08-08 12:23:41 +02:00
Sven Klemm
3b6454ab88 Merge branch 'master' into postgres-query-builder 2018-08-08 12:09:17 +02:00
Patrick O'Carroll
a94406ac53 added more info about the teams 2018-08-08 11:22:47 +02:00
Patrick O'Carroll
ca06893e69 removed mock-teams, now gets teams from backend 2018-08-08 10:50:27 +02:00
Marcus Efraimsson
8952137ea2
Merge pull request #12753 from svenklemm/sql-fillmode-last
Add fill mode to fill in previously seen value when point is missing to SQL datasources
2018-08-08 10:29:56 +02:00
Patrick O'Carroll
b0ddc15e1a team list for profile page + mock teams 2018-08-08 09:23:36 +02:00
Sven Klemm
52c7edf2f4 rename last fillmode to previous 2018-08-07 21:11:51 +02:00
David
91d04b87ad
Merge pull request #12821 from grafana/davkal/explore-query-ux
Explore: prometheus query helpers
2018-08-07 17:56:08 +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
Marcus Efraimsson
cfe81510f9
Merge pull request #12796 from dehrax/12768-panel-heights
WIP: Fit panels to screen height
2018-08-07 15:57:40 +02:00
Tobias Skarhed
2ad358215a Remove window 2018-08-07 14:49:11 +02:00
Tobias Skarhed
a0da66610e Fix url param errors 2018-08-07 14:48:22 +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
David Kaltschmidt
307248f713 Add clear row button
- clears the content of a query row
2018-08-07 13:43:32 +02:00
David Kaltschmidt
00f04f4ea0 Add clear button to Explore
- Clear All button to clear all queries and results
- moved result viewer buttons below query rows to make it more clear
  that they govern result options
2018-08-07 13:42:32 +02:00
David Kaltschmidt
f1c1633d15 Explore: show message if queries did not return data
- every result viewer displays a message that it received an empty data
  set
2018-08-07 13:03:33 +02:00
David
0f94d2f5f1 Fix closing parens completion for prometheus queries in Explore (#12810)
- position was determined by SPACE, but Prometheus selectors can
  contain spaces
- added negative lookahead to check if space is outside a selector
- moved braces plugin into PromQueryField since braces are prom specific
2018-08-07 13:34:12 +03:00
David
34761205fd
Merge pull request #12799 from grafana/davkal/explore-history
Explore: Add history to query fields
2018-08-06 17:46:15 +02:00
Marcus Efraimsson
b3c25076d0
Merge pull request #12746 from grafana/11305_mssql_logo
Mssql: add logo
2018-08-06 17:19:53 +02:00
David Kaltschmidt
cda3b01781 Reversed history direction for explore
- _.reverse() was modifying state.history
2018-08-06 14:45:03 +02:00
David Kaltschmidt
eaff7b0f68 Explore: Add history to query fields
- queries are saved to localstorage history array
- one history per datasource type (plugin ID)
- 100 items kept with timestamps
- history suggestions can be pulled up with Ctrl-SPACE
2018-08-06 14:45:03 +02:00
David
5da3584dd4 Explore: facetting for label completion (#12786)
* Explore: facetting for label completion

- unified metric and non-metric label completion
- label keys and values are now fetched fresh for each valid selector
- complete selector means only values are suggested that are supported
  by the selector
- properly implemented metric lookup for selectors (until the first
  metric was used which breaks when multiple metrics are present)
- typeahead tests now need a valid selection to demark the cursor

* Fix facetting queries for empty selector
2018-08-06 15:36:02 +03:00
Tobias Skarhed
9f87f6081a Remove Karma test 2018-08-06 11:23:50 +02:00
Tobias Skarhed
46dd4eba9e All tests passing 2018-08-06 11:23:50 +02:00
Tobias Skarhed
034ca69610 Add mock constructor 2018-08-06 11:23:50 +02:00
Tobias Skarhed
7f4723a9a7 Begin conversion 2018-08-06 11:23:50 +02:00
Tobias Skarhed
ccd964e1df Convert query control 2018-08-06 10:57:58 +02:00
Tobias Skarhed
45eadae692 Convert datasource 2018-08-06 10:42:35 +02:00
Torkel Ödegaard
624f3a0173 refactor: take submenu into account PR #12796 2018-08-05 11:39:46 +02:00
Torkel Ödegaard
b1b8a38061 refactor: renaming variables, refactoring PR #12796 2018-08-05 11:39:46 +02:00
Torkel Ödegaard
013f8cd8ea refactor: moving code around a bit, refactoring PR #12796 2018-08-05 11:39:46 +02:00
Tobias Skarhed
f00b5eee83 Remove weird import 2018-08-05 11:39:46 +02:00
Tobias Skarhed
4b84a58575 Disable submenu when autopanels is enabled 2018-08-05 11:39:46 +02:00
Tobias Skarhed
36c406eefb Extract to own method 2018-08-05 11:39:46 +02:00
Tobias Skarhed
1618b095c7 Use and add keybard shortcut 2018-08-05 11:39:46 +02:00
Tobias Skarhed
63fa9fdc6d Add temporary url parameter 2018-08-05 11:39:46 +02:00
Tobias Skarhed
338a37abc8 Replace floor with round 2018-08-05 11:39:46 +02:00
Tobias Skarhed
9e4748e2aa Go with just single margin compensation 2018-08-05 11:39:46 +02:00
Tobias Skarhed
78b3dc40f1 Add margin and padding compensation 2018-08-05 11:39:46 +02:00
Tobias Skarhed
a9f24bb36d Remove weird import 2018-08-05 11:39:45 +02:00
Tobias Skarhed
818fe09a7f Fit panels to screen height 2018-08-05 11:39:45 +02:00
Sven Klemm
6d07d825e9 dont break default parameters for functions 2018-08-03 18:38:40 +02:00
Sven Klemm
e4ae8be9fa fix suggestion query 2018-08-03 14:09:41 +02:00
Marcus Efraimsson
6f1b125c48
Merge pull request #12808 from dehrax/12224-simple
Karma to Jest: remove tests
2018-08-03 13:38:57 +02:00
David Kaltschmidt
c900a30106 renamed slate unit tests to .jest.ts 2018-08-03 13:09:05 +02:00
Tobias Skarhed
61eb96ed79 Remove simple tests 2018-08-03 12:34:13 +02:00
Tobias Skarhed
61e3a0cceb Begin conversion 2018-08-03 11:57:03 +02:00
David
bda49fcaa2 Add click on explore table cell to add filter to query (#12729)
* Add click on explore table cell to add filter to query

- move query state from query row to explore container to be able to set
  modified queries
- added TS interface for columns in table model
- plumbing from table cell click to datasource
- add modifyQuery to prometheus datasource
- implement addFilter as addLabelToQuery with tests

* Review feedback

- using airbnb style for Cell declaration
- fixed addLabelToQuery for complex label values
2018-08-03 11:20:13 +03:00
Sven Klemm
aa830211fe dont order for aggregate 2018-08-03 10:15:28 +02:00
Sven Klemm
dabfd88cd9 add moving average to query builder 2018-08-03 07:44:36 +02:00
Sven Klemm
0b57e88f9e adjust frontend test 2018-08-03 06:19:53 +02:00
Sven Klemm
2cae966e6c use $__timeGroupAlias macro 2018-08-02 21:40:15 +02:00
Sven Klemm
bfc66a7ed0 add fillmode "last" to sql datasource
This adds a new fill mode last (last observation carried forward) for grafana
to the sql datasources. This fill mode will fill in the last seen value in a
series when a timepoint is missing or NULL if no value for that series has
been seen yet.
2018-08-02 20:35:09 +02:00
Sven Klemm
67edb9e9fe Merge remote-tracking branch 'upstream/master' into postgres-query-builder 2018-08-02 16:39:27 +02:00
Marcus Efraimsson
5cca478656
Merge pull request #12760 from svenklemm/postgres-timegroup
remove alias from postgres $__timeGroup macro

add $__timeGroupAlias macro to all sql datasources
2018-08-02 16:36:01 +02:00
Marcus Efraimsson
4d3e435298
Merge pull request #12774 from grafana/12766-table-colored-cell-link
table link color fix
2018-08-02 16:32:09 +02:00
Patrick O'Carroll
ff0ca6b7e2 added two new classes for color, fixed so link has value color 2018-08-02 15:25:48 +02:00
andig
57910549b6 Improve iOS and Windows 10 experience (#12769)
* Improve iOS homescreen icon

* Improve Windows10 tile experience

* Remove unused favicon
2018-08-02 03:37:50 -07:00
Mitsuhiro Tanda
04fcd2a054 add series override option to hide tooltip (#12378)
* add series override option to hide tooltip

* fix test

* invert option

* fix test

* remove initialization
2018-08-02 02:49:40 -07:00
Patrick O'Carroll
b03e3242e3 removed table-panel-link class 2018-08-02 11:21:17 +02:00
Patrick O'Carroll
36d981597e removed table-panel-link class and add a class white to modify table-panel-cell-link class 2018-08-02 11:18:21 +02:00
Sven Klemm
7e9c9199c1 add warning when switching from raw sql mode 2018-08-02 10:15:53 +02:00
Sven Klemm
a221d9ec84 add more prominent button for switching edit mode 2018-08-02 09:50:21 +02:00