Commit Graph

7343 Commits

Author SHA1 Message Date
Torkel Ödegaard
fd71abc301 fixed issue with babel plugin proposal class properties that initiated
properties to void 0. This breaks angularjs preAssignBinding which
applies bindings to this before constructor is called. Fixed by
using fork of babel plugin.

https://github.com/babel/babel/issues/8417
2018-11-23 13:41:45 +01:00
David Kaltschmidt
f831836fa7 Explore: make query field suggestions more robust
- drop invalid history items
- make highlighter more robust by defaulting to empty string on text to highlight
2018-11-23 12:25:43 +01:00
flopp999
91d97ab5b5 Fix abbreviations of Litre/min and milliLitre/min (#14114) 2018-11-23 02:48:22 -08:00
David Kaltschmidt
ecaee88efe Sort Prometheus range suggestions by length
- add sortText property to range completion items
2018-11-23 11:43:21 +01:00
David Kaltschmidt
b778b5350a Explore: swtiching to logging should keep prometheus labels in case of error
Logging's query importer drops all labels that are not common to both datasources.

- keep labels if label lookup of logging datasource came back empty
- easier to remove labels than having to add them in the first place
2018-11-23 11:15:25 +01:00
David
377eaa891c
Merge pull request #14147 from grafana/davkal/explore-data-query
Explore: Introduce DataQuery interface for query handling
2018-11-22 12:01:37 +01:00
David Kaltschmidt
9e94d22401 Added comments 2018-11-22 12:00:41 +01:00
David Kaltschmidt
21ee85b1e2 Fix issue with deleting a query (empty string not updating) 2018-11-22 11:14:46 +01:00
David Kaltschmidt
bbaa5b63c8 Fix history rendering for DataQuery 2018-11-22 11:02:53 +01:00
David
1125ca4d79
Merge pull request #14014 from miqh/feat/explore-toggle-series
Add ability to toggle visibility of graph series in explore section
2018-11-21 17:31:46 +01:00
David Kaltschmidt
331d419d4f Combine query functions 2018-11-21 17:21:13 +01:00
David Kaltschmidt
22987ee75f Renamed targets to queries 2018-11-21 16:28:30 +01:00
bergquist
14688766ef updates time range options for alert queries
add some new options for the to value.
removes '1s' option for from since thats unreasonable low

closes #12134
2018-11-21 15:43:37 +01:00
bergquist
60c291c8dc format: remove </input> and align tabs 2018-11-21 15:42:25 +01:00
David Kaltschmidt
b3161bea5a Explore: Introduce DataQuery interface for query handling
- Queries in Explore have been string based
- This PR introduces the use of the DataQuery type to denote all queries handled in Explore
- Within Explore all handling of DataQueries is transparent
- Modifying DataQueries is left to the datasource
- Using `target` as variable names for DataQueries to be consistent with the rest of Grafana
2018-11-21 14:45:57 +01:00
Michael Huynh
a333c31ea8
Fix set utilities for explore section
Discovered implementation issues with the set utilities used in the
explore section after adding some tests. Added tests to reinforce the
expected behaviour of the utility functions.

Related: #13522
2018-11-21 21:42:53 +08:00
Torkel Ödegaard
0731b8635b fixed failing graph tests 2018-11-21 13:53:32 +01:00
Torkel Ödegaard
cab92f88af fixed issue with new legend not checking if panel.legend.show 2018-11-21 11:38:15 +01:00
Michael Huynh
c7dc557e91
Add visibility toggle for explore graph series
The implemented toggling UX is similar to how the dashboard graph plugin
behaves. Also incorporates review feedback to persist series visibility
state by means of the alias property, with the limitation it carries
too.

Related: #13522
2018-11-20 21:52:42 +08:00
Daniel Lee
4aeea56342
Merge pull request #14007 from grafana/stackdriver-template-query-editor
Stackdriver template query editor
2018-11-20 13:41:18 +01:00
Erik Sundell
7021e07ab2 stackdriver: remove not used variable 2018-11-20 13:22:43 +01:00
Erik Sundell
b200f92710 stackdriver: use angular dropdown so that we can restrict user input 2018-11-20 13:18:00 +01:00
Erik Sundell
7fc8ed942f stackdriver: make sure object type queries are also checked for vtemplate variables 2018-11-20 12:30:31 +01:00
Roland Dunn
fa2c46edb9
Revert "Update google analytics code to submit full URL not just path" 2018-11-19 18:21:37 +00:00
Marcus Efraimsson
9af5e9a448
Merge pull request #14127 from grafana/team_members_fix
Remove react warning in team members page
2018-11-19 09:03:41 -08:00
Marcus Efraimsson
0aca6f587b
remove react warning 2018-11-19 17:54:17 +01:00
Erik Sundell
fa32310f8a stackdriver: add query keyword to service, metric and project since these were the only fields in the editor that was missing it in the whole editor 2018-11-19 16:37:42 +01:00
David Kaltschmidt
4771eaba5b Explore: POC dedup logging rows
- added dedup switches to logs view
- strategy 'exact' matches rows that are exact (except for dates)
- strategy 'numbers' strips all numbers
- strategy 'signature' strips all letters and numbers to that only whitespace and punctuation remains
- added duplication indicator next to log level
2018-11-19 16:26:47 +01:00
Erik Sundell
19d1d7f35a stackdriver: add query keyword style to query fields 2018-11-19 16:26:06 +01:00
Erik Sundell
164e9a4f9a stackdriver: fix failing test 2018-11-19 16:19:56 +01:00
David
d4e792dccd
Merge pull request #14107 from grafana/davkal/explore-panel
Explore: collapsible result panels
2018-11-19 15:17:05 +00:00
David
c20c787b62
Merge pull request #14104 from grafana/davkal/prometheus-rule-expansion
Prometheus: fix rules expansion
2018-11-19 15:11:09 +00:00
Erik Sundell
0ec4491a52 stackdriver: reimplementing service variable query type 2018-11-19 16:06:30 +01:00
Marcus Efraimsson
0d30f3ba52
update snapshot 2018-11-19 14:57:34 +01:00
Erik Sundell
795af5deed stackdriver: fix failing tests 2018-11-19 14:51:52 +01:00
Erik Sundell
0aeaec1ac6 stackdriver: add support for template variables 2018-11-19 14:44:40 +01:00
Torkel Ödegaard
c67b55776c
Merge pull request #14123 from grafana/switch-back-from-mixed
fixed issue switching back from mixed data source
2018-11-19 14:40:37 +01:00
Torkel Ödegaard
0053bee886
Merge pull request #14121 from grafana/panel-size-in-edit-mode-fix
fixed issue with panel size when going into edit mode
2018-11-19 14:21:37 +01:00
Torkel Ödegaard
1157a62375 fixed issue switching back from mixed data source, introduced by react panels changes 2018-11-19 14:20:19 +01:00
Marcus Efraimsson
c22e7f4263
fix group sync cta link 2018-11-19 13:23:17 +01:00
Torkel Ödegaard
d81d2f00f6 fixed issue with panel size when going into edit mode 2018-11-19 12:26:15 +01:00
Erik Sundell
26b1cc5dcf stackdriver: join resource and metric labels. split them in values and keys 2018-11-19 11:34:40 +01:00
Carl Bergquist
6049855dc7
Merge pull request #13947 from bergquist/alerting_for
Introduce alert debouncing
2018-11-19 10:38:02 +01:00
bergquist
76cbd7f0de alerting: reduce the length of range queries
since we introduce deboucing the length should matter less.
But going below 5m as default might be weird depending on datasource.
2018-11-19 09:10:19 +01:00
Victor Cinaglia
ba5a002323
Mitigate XSS vulnerabilities in Singlestat panel
Sanitize `prefix` and `postfix` fields. Re-arrange code slightly in order to handle variable
interpolation.
2018-11-18 20:33:36 -05:00
Torkel Ödegaard
435079c6e7
Merge pull request #14102 from grafana/change-tab-in-edit-modefix
fix: dont setViewMode when nothing has changed
2018-11-17 14:46:16 +01:00
David Kaltschmidt
adb2430a1b Explore: collapsible result panels
- replace the Graph/Table buttons with toggle control in a wrapper panel
- moved toggle control to left to be close to the label
- removed panel styles from Logs and Graph viewer
- moved loader animation to panel
2018-11-16 18:21:13 +00:00
David
634d71a657
Merge pull request #14052 from grafana/davkal/explore-query-importer
Explore: POC for datasource query importers
2018-11-16 14:55:19 +00:00
David Kaltschmidt
e3e8be16b3 Prometheus: fix rules expansion
Rules expansion (available via query hints in explore) was broken for expressions that contained selectors.

- fix replacing regexp to recognize `{` and `[` as the end of a rule name
- moved logic to language utils
- added tests
2018-11-16 14:38:20 +00:00
David Kaltschmidt
411719bc70 Explore: POC for datasource query importers
Explore is about keeping context between datasources if possible. When
changing from metrics to logging, some of the filtering can be kept to
narrow down logging streams relevant to the metrics.

- adds `importQueries` function in language providers
- query import dependent on origin datasource
- implemented  prometheus-to-logging import: keeping label selectors
  that are common to both datasources
- added types
2018-11-16 13:52:58 +00:00
Marcus Efraimsson
2c7dfd74b4
Merge pull request #14100 from grafana/fix-save-redirect-issue
fix for save dashboard redirect issue
2018-11-16 04:03:47 -08:00
Marcus Efraimsson
f528142655
Merge pull request #14089 from grafana/fixed-alert-tab-location
fixed alert tab order and fixed some console logging issues
2018-11-16 03:58:13 -08:00
Torkel Ödegaard
96104e4372 fix: dont setViewMode when nothing has changed 2018-11-16 12:39:26 +01:00
Torkel Ödegaard
e85a3f1d04 fix redirect issue, caused by timing of events between angular location change and redux state changes 2018-11-16 11:29:32 +01:00
Alexander Zobnin
8c7f4ac188
fix datasource testing 2018-11-16 13:17:41 +03:00
Torkel Ödegaard
905ef22075 fixed order of time range tab 2018-11-16 06:53:54 +01:00
Roland Dunn
242ceb6d95 Update google analytics code to submit full URL not just path 2018-11-15 20:12:48 +00:00
Marcus Efraimsson
0810aa2e60
Merge pull request #12371 from marefr/xaxis_thresholds
Time regions support in graph panel
2018-11-15 08:46:39 -08:00
David
fe45cb9aa1
Merge pull request #14032 from grafana/davkal/explore-prevent-term-completion
Explore: Don't suggest term items when text follows
2018-11-15 16:43:15 +00:00
Torkel Ödegaard
8ce1cc2d52 fixed alert tab order and fixed some console logging issues 2018-11-15 17:33:55 +01:00
Marcus Efraimsson
3b4a224a57
Add tooltip 2018-11-15 17:25:58 +01:00
Marcus Efraimsson
a8e6b241d6
changed time region color modes 2018-11-15 17:07:42 +01:00
Marcus Efraimsson
48905a613d
fix pending alert annotation tooltip icon 2018-11-15 16:29:58 +01:00
Marcus Efraimsson
52a71596eb
fix selected home dashboard should show as selected even though its not starred 2018-11-15 14:43:50 +01:00
bergquist
7ba04466a2 alerting: improve annotations for pending state 2018-11-15 14:30:36 +01:00
Marcus Efraimsson
9606491f6c
reload browser after preferences been updated 2018-11-15 14:29:14 +01:00
Marcus Efraimsson
b8539570d0
fix snapshot tests 2018-11-15 14:16:17 +01:00
Torkel Ödegaard
cf0db51659 Trying to reduce the amount of duplication with preferences 2018-11-15 13:37:29 +01:00
Erik Sundell
69137e6774 stackdriver: revert project test stuff 2018-11-15 13:23:42 +01:00
Erik Sundell
b9d5fa1b36 stackdriver: revert test code 2018-11-15 13:20:32 +01:00
bergquist
e7260d77b3 adds pending filter for alert list page 2018-11-15 12:46:28 +01:00
bergquist
968bfd0139 adds pending state to alert list panel 2018-11-15 12:42:47 +01:00
David Kaltschmidt
ce59acd141 Extracted language provider variables for readibility 2018-11-15 11:20:27 +00:00
Marcus Efraimsson
116e367e71
fix time regions mutable bug 2018-11-15 11:30:49 +01:00
Torkel Ödegaard
2ff58d5241 Merge branch 'master' into 12550_team_preferences 2018-11-15 11:29:36 +01:00
Marcus Efraimsson
81efc00adf
set default color mode 2018-11-15 11:21:30 +01:00
stop-cran
20214b3d6a [elasticsearch] Do not set a placeholder to index name, if it's already specified. 2018-11-14 18:45:18 +02:00
Marcus Efraimsson
0f57c4b20e
create time regions solely based on utc time 2018-11-14 17:21:20 +01:00
Torkel Ödegaard
0a080149ae
Merge pull request #14054 from marefr/6367_raw_document_reset
Fix switching from es raw document metric breaks query editor
2018-11-14 16:46:47 +01:00
David
f00f347099
Merge pull request #14033 from grafana/davkal/explore-slow-ds-load
Explore: Dont set datasource in state if navigated away
2018-11-14 14:45:35 +00:00
Peter Holmberg
655f4d0a8d fixed issue with save. 2018-11-13 18:23:35 +01:00
Peter Holmberg
03cf238fa7 fixed mutability issue in dashboard dropdowns 2018-11-13 18:23:00 +01:00
Marcus Efraimsson
63be43e3b2
graph: Time region support 2018-11-13 12:23:06 +01:00
Erik Sundell
2e0cbe75ee stackdriver: use arrow functions 2018-11-13 11:06:08 +01:00
Erik Sundell
e698202fae stackdriver: use new naming convention for query editor all over 2018-11-13 10:57:10 +01:00
Marcus Efraimsson
69a57850c4
restore user profile preferences 2018-11-13 10:22:02 +01:00
Mat Schaffer
f6313fe675
Clarify wording of playlist protip
Per discussion on 154fbe2413 (r31238888) it seemed like this wording might be easier to understand.
2018-11-13 14:56:32 +09:00
Marcus Efraimsson
1194ff282e
team preferences ui 2018-11-12 20:58:59 +01:00
David Kaltschmidt
9b48338d95 Explore: Dont set datasource in state if navigated away
Datasource selection triggers a connection test, on success
the DS is set in the Explore state. If the test takes long and user
selects a different DS, and just after that the first test succeeds,
then the first DS overwrites the state.

* when test returns check if datasource is still the requested one
2018-11-12 18:06:12 +00:00
David Kaltschmidt
ff0ed06441 Explore: Don't suggest term items when text follows
Tab completion gets in the way when constructing a query from the inside
out:

```
up| => |up => sum(|up)
```

At that point the language provider will not suggest anything.
2018-11-12 17:40:05 +00:00
Torkel Ödegaard
a2a4458923
Merge pull request #14023 from grafana/gauge-panel
React Gauge Panel - first step
2018-11-12 15:58:54 +01:00
Peter Holmberg
490fb9e8e6 import changes 2018-11-12 11:25:47 +01:00
Torkel Ödegaard
057696a0f8
Merge pull request #14002 from Nexucis/bugfix/template-srv
[Bugfix] Don't drop the value when it's equal to None
2018-11-11 16:49:51 +01:00
Peter Holmberg
656900516b draw gauge 2018-11-09 16:37:09 +01:00
Erik Sundell
30f9a324ac stackdriver: remove service query tyhpe 2018-11-09 14:36:50 +01:00
Erik Sundell
3b9eda2561 stackdriver: correct aligner name 2018-11-09 14:36:04 +01:00
Erik Sundell
f307fc4760 stackdriver: typescriptifying props 2018-11-09 14:30:28 +01:00
Erik Sundell
996b470dd0 stackdriver: remove redundant try catch 2018-11-09 14:24:21 +01:00
Erik Sundell
bb1f79ecdc stackdriver: rename query function 2018-11-09 13:55:16 +01:00
Erik Sundell
5424603052 stackdriver: rename query variable 2018-11-09 13:55:16 +01:00
Erik Sundell
f14b3e7fcf stackdriver: remove debug log 2018-11-09 13:55:16 +01:00
Erik Sundell
9c85793dbb stackdriver: test saved variable 2018-11-09 13:55:15 +01:00
Erik Sundell
b262be73e0 stackdriver: fix failing tests 2018-11-09 13:55:15 +01:00
Erik Sundell
45f49c2e5b stackdriver: remove services query type 2018-11-09 13:55:15 +01:00
Erik Sundell
209b1c026e stackdriver: update tests 2018-11-09 13:55:15 +01:00
Erik Sundell
0280179d35 stackdriver: add tests for render snapshop and default query type 2018-11-09 13:55:15 +01:00
Erik Sundell
7bdf97d3e6 stackdriver: remove lodash since object assign will do the trick 2018-11-09 13:55:15 +01:00
Erik Sundell
85ef5c2523 stackdriver: make sure we don't crash when selected service doesnt have a value 2018-11-09 13:55:15 +01:00
Erik Sundell
8333bf0b76 stackdriver: add simple render test 2018-11-09 13:55:15 +01:00
Erik Sundell
24cb44e029 stackdriver: rename params 2018-11-09 13:55:15 +01:00
Erik Sundell
f168dd5d34 stackdriver: remove not used prop 2018-11-09 13:55:14 +01:00
Erik Sundell
1fe70721c9 stackdriver: persist template variable definition 2018-11-09 13:55:14 +01:00
Erik Sundell
2d14bd10f3 stackdriver: add default value for query type 2018-11-09 13:55:14 +01:00
Erik Sundell
588c5c045a stackdriver: pass query definition from react, making it possible to use another definition than the query string only 2018-11-09 13:55:14 +01:00
Erik Sundell
5069f4afc9 stackdriver: make it possible to use alignment period template variable 2018-11-09 13:55:14 +01:00
Erik Sundell
a027a87d50 stackdriver: make it possible to use aligner template variable 2018-11-09 13:55:14 +01:00
Erik Sundell
2a6aec721e stackdriver: make it possible to use aggregation template variable 2018-11-09 13:55:14 +01:00
Erik Sundell
a951e577b7 stackdriver: make it possible to use aggregation template variable 2018-11-09 13:55:14 +01:00
Erik Sundell
20f1956225 stackdriver: make it possible to use metric type template variable 2018-11-09 13:55:13 +01:00
Erik Sundell
4569527873 stackdriver: set currentdatasource when editview is enabled 2018-11-09 13:55:13 +01:00
Erik Sundell
40bb3551cf stackdriver: return correct value 2018-11-09 13:55:13 +01:00
Erik Sundell
3883643ea2 stackdriver: reset query value on datasource changed 2018-11-09 13:55:13 +01:00
Erik Sundell
fcf39a0839 stackdriver: fix default value bug 2018-11-09 13:55:13 +01:00
Erik Sundell
042d156e5f stackdriver: extend label width 2018-11-09 13:55:13 +01:00
Erik Sundell
21940c2ca3 stackdriver: revert refactoring 2018-11-09 13:55:12 +01:00
Erik Sundell
2780ef27fd stackdriver: extract variables for pickers 2018-11-09 13:55:12 +01:00
Erik Sundell
b3c34be648 stackdriver: cleanup 2018-11-09 13:55:12 +01:00
Erik Sundell
a46b9cb0bb stackriver: rename interface 2018-11-09 13:55:12 +01:00
Erik Sundell
e9e20224d4 stackriver: use type for state 2018-11-09 13:55:12 +01:00
Erik Sundell
e0c0dc1453 stackdriver: rename state vars 2018-11-09 13:55:12 +01:00
Erik Sundell
9872ea7d8c stackdriver: extract common function 2018-11-09 13:55:11 +01:00
Erik Sundell
c993a4d296 stackdriver: streamline the way labels are refreshed when a new value is picked in the dropdowns above 2018-11-09 13:55:11 +01:00
Erik Sundell
1791e7329c stackdriver: handle default state 2018-11-09 13:55:11 +01:00
Erik Sundell
3c5f8325f5 stackdriver: refactor dropdown component 2018-11-09 13:55:11 +01:00
Erik Sundell
3c1cf214bc stackdriver: replace components with basic stateless select 2018-11-09 13:55:11 +01:00
Erik Sundell
1194da0d04 stackdriver: remove not used func. wrap query in exception 2018-11-09 13:55:11 +01:00
Erik Sundell
3af1d74c6a stackdriver: reload all child dropdown and update selected accordingly 2018-11-09 13:55:10 +01:00
Erik Sundell
c40794c2b9 stackdriver: improve default state handling 2018-11-09 13:55:10 +01:00
Erik Sundell
16c6d79dd6 stackdriver: use standard naming convention for selects 2018-11-09 13:55:10 +01:00
Erik Sundell
d80025d215 stackdriver: streamline label change 2018-11-09 13:55:10 +01:00
Erik Sundell
727472a3cb stackdriver: refactor TemplateQueryComponent 2018-11-09 13:55:10 +01:00
Erik Sundell
f0b4af9f6c stackdriver: use enum for query type 2018-11-09 13:55:10 +01:00
Erik Sundell
ca77cdc37e stackdriver: add aggregation query 2018-11-09 13:55:09 +01:00
Erik Sundell
b1db07789b stackdriver: add alignment periods 2018-11-09 13:55:09 +01:00
Erik Sundell
a0b8c4acba stackdriver: add aligner query 2018-11-09 13:55:09 +01:00
Erik Sundell
b3edad40a9 stackdriver: add resource types query 2018-11-09 13:55:09 +01:00
Erik Sundell
cb0d563aae stackdriver: add support for resource label queries 2018-11-09 13:55:09 +01:00
Erik Sundell
8c3874ee30 stackdriver: return friendly display name 2018-11-09 13:55:08 +01:00
Erik Sundell
4ab278dca4 stackdriver: add metric labels query 2018-11-09 13:55:08 +01:00
Erik Sundell
cbb663015e stackdriver: move response parsing to datasource file 2018-11-09 13:55:08 +01:00