Commit Graph

11043 Commits

Author SHA1 Message Date
Andrej Ocenas
39f7cff7c7
Loki: Refactor editor and syntax hooks (#21687) 2020-01-24 15:07:45 +01:00
Torkel Ödegaard
198f561541
Footer: added back missing footer to login page (#21720) 2020-01-24 12:35:54 +01:00
Dominik Prokop
d9e1cb44c8
Annotations: Fix issue with annotation queries editors (#21712) 2020-01-24 10:55:54 +01:00
Ivana Huckova
e75840737e
Loki: Fix Loki with repeated panels and interpolation for Explore (#21685) 2020-01-24 09:50:09 +01:00
Shavonn Brown
b3d5e678f4
Make importDataSourcePlugin cancelable (#21430)
* make importDataSourcePlugin cancelable

* fix imported plugin assignment

* init datasource plugin to redux

* remove commented

* testDataSource to redux

* add err console log

* isTesting is never used

* tests, loadError type

* more tests, testingStatus obj
2020-01-23 20:37:20 -05:00
Dominik Prokop
cdfac32dfd
PhantomJS: Fix rendering of panels using Prometheus datasource
In 043bb59 a URLSearchParams usage was introduced which is not supported by PhantomJS. @babel/polyfill(deprecated) does not contain polyfill for URLSearchParams, hence the code (and Prometheus graphs rendering) was failing in PhantomJS environment.

The solution is to add https://www.npmjs.com/package/url-search-params-polyfill that takes care of the URLSearchParams
2020-01-23 13:10:38 +01:00
kay delaney
87af7d9987
backendSrv: Only stringifies request body if payload isn't already a string (#21639)
* backendSrv: Only stringifies request body if payload isn't already a string

* Add test cases to verify behaviour
2020-01-23 08:54:20 +00:00
Erik Sundell
296af36a6f
Run query when region, namespace and metric changes (#21633) 2020-01-22 21:37:40 +01:00
Dominik Prokop
5afcf79c59
Migrations: migrate admin user create page (#21506)
* Create basic react page for AdminUserCreate

* Forms.Field - render asterisk when field is marked as required

* Add validation to user create form wih react-hook-form

* Remove Angular code for UserCreatePage

* Remove commented route for admin settings

* Remove unused import

* Hide react-hooks-form behind Form component

* Fix webkit autofill

* Webkit autofill on inpiuts - bring back focus shadow

* Temporarily fix story (before 21635 is merged)

* Form: docs and minor updates to new form elements (#21635)

* Allow Switch, checkbox to be uncontrolled, forward refs, styles update

* Add Form docs

* User create page update

* Remove unused import

* Apply review notes
2020-01-22 15:26:03 +01:00
Torkel Ödegaard
36aab3a738
Docs: Whats new updates (#21664)
* Docs: Whats new updates

* Add cloudwatch and stackdriver paragraphs

* Minor changes

* Add link helper to render gif

* Docs: what's new updates

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2020-01-22 14:02:47 +01:00
Torkel Ödegaard
741e1bb7e9
Login: Better auto sizing of login logo (#21645) 2020-01-22 11:06:12 +01:00
Hugo Häggmark
5dddc91ba5
Chore: Fixes PhantomJs by adding polyfills for fetch and AbortController (#21655)
* Chore: Fixes PhantomJs rendering

* Docs: Updated docs

* Update contribute/style-guides/e2e.md

Co-Authored-By: Dominik Prokop <dominik.prokop@grafana.com>

* Docs: Updates docs according to PR comments

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-01-22 08:15:31 +01:00
Torkel Ödegaard
92ef8644c5
Templating: A way to support object syntax for global vars (#21634) 2020-01-21 16:06:04 +01:00
Emil Hessman
25e2f1c2dd Plugins: Apply adhoc filter in Elasticsearch logs query (#21346)
Fixes #21086
2020-01-21 09:39:55 +00:00
kay delaney
cf2cc71393 Chore: Remove angular dependency from backendSrv (#20999)
* Chore: Remove angular dependency from backendSrv

* Refactor: Naive soultion for logging out unauthorized users

* Refactor: Restructures to different streams

* Refactor: Restructures datasourceRequest

* Refactor: Flipped back if statement

* Refactor: Extracted getFromFetchStream

* Refactor: Extracts toFailureStream operation

* Refactor: Fixes issue when options.params contains arrays

* Refactor: Fixes broken test (but we need a lot more)

* Refactor: Adds explaining comments

* Refactor: Adds latest RxJs version so cancellations work

* Refactor: Cleans up the takeUntil code

* Refactor: Adds tests for request function

* Refactor: Separates into smaller functions

* Refactor: Adds last error tests

* Started to changed so we require getBackendSrv from the @grafana-runtime when applicable.

* Using the getBackendSrv from @grafana/runtime.

* Changed so we use the getBackendSrv from the @grafana-runtime when possible.

* Fixed so Server Admin -> Orgs works again.

* Removed unused dependency.

* Fixed digest issues on the Server Admin -> Users page.

* Fix: Fixes digest problems in Playlists

* Fix: Fixes digest issues in VersionHistory

* Tests: Fixes broken tests

* Fix: Fixes digest issues in Alerting => Notification channels

* Fixed digest issues on the Intive page.

* Fixed so we run digest after password reset email sent.

* Fixed digest issue when trying to sign up account.

* Fixed so the Server Admin -> Edit Org works with backendSrv

* Fixed so Server Admin -> Users works with backend srv.

* Fixed digest issues in Server Admin -> Orgs

* Fix: Fixes digest issues in DashList plugin

* Fixed digest issues on Server Admin -> users.

* Fix: Fixes digest issues with Snapshots

* Fixed digest issue when deleting a user.

* Fix: Fixes digest issues with dashLink

* Chore: Changes RxJs version to 6.5.4 which includes the same cancellation fix

* Fix: Fixes digest issue when toggling folder in manage dashboards

* Fix: Fixes bug in executeInOrder

* Fix: Fixes digest issue with CreateFolderCtrl and FolderDashboardsCtrl

* Fix: Fixes tslint error in test

* Refactor: Changes default behaviour for emitted messages as before migration

* Fix: Fixes various digest issues when saving, starring or deleting dashboards

* Fix: Fixes digest issues with FolderPickerCtrl

* Fixed digest issue.

* Fixed digest issues.

* Fixed issues with angular digest.

* Removed the this.digest pattern.

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>
2020-01-21 10:08:07 +01:00
Tobias Skarhed
6ff315a299
Emotion: Add main package with version 10 (#21560)
* Update version and snapshots

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-01-21 07:40:05 +01:00
Ryan McKinley
5f14d62c0d
TestData: allow negative values for random_walk parameters (#21627) 2020-01-20 10:50:42 -08:00
Torkel Ödegaard
2732aca05c
TestData: Adds important new features to the random walk scenario (#21613)
* test data refactor

* new random walk options

* fixed test

* Added automatic names
2020-01-20 12:42:42 +01:00
Daniel Lee
79255fafaf
graphite: does not modify last segment when... (#21588)
opening the Graphite query editor and there is no data
for the last segment value.

Fixes #21563
2020-01-20 10:18:41 +01:00
Ivana Huckova
dfeee3dd4a
grafana/ui: Add synced timepickers styling to TimePicker (#21598) 2020-01-20 09:59:35 +01:00
Torkel Ödegaard
b087edc224
Typescript: null check fixes, and news panel fix (#21595) 2020-01-19 19:16:31 +01:00
Peter Holmberg
e762190616 Inspect: table take full height in drawer (#21580) 2020-01-18 08:24:17 +01:00
Tobias Skarhed
fef31acbf2
ButtonCascader: Fix error in Explore (#21585)
* Add children and remove nullified icon

* Revert data format with children

* Update test

* Revert styles

* Update types
2020-01-17 18:07:40 +01:00
Torkel Ödegaard
5af7b15c10
Redux: Fixed function adding a new reducer (#21575) 2020-01-17 16:05:08 +01:00
Torkel Ödegaard
66d8871415
Minor style changes on upgrade page (#21566) 2020-01-17 16:02:43 +01:00
Ivana Huckova
c738a889ed
Explore: Context tooltip to copy labels and values from graph (#21405) 2020-01-17 15:52:08 +01:00
Emil Tullstedt
26f72ccc4e
Config: Use license info instead of build info for feature toggling (#21558) 2020-01-17 15:44:12 +01:00
Erik Sundell
0e3a7b1a6f
Fix merge problem (#21574) 2020-01-17 15:30:54 +01:00
Ivana Huckova
9ebd99d595
Explore: Create unique ids and deduplicate Loki logs (#21493) 2020-01-17 14:28:00 +01:00
Erik Sundell
d40b66f1c1
CloudWatch: Calculate period based on time range (#21471)
* Calculate min period based on time range and no of queries

* Use hardcoded array of periods if period is not defined actively by the user

* Fix broken tests

* Use a smaller max period for auto interval

* Fix broken tests

* Test period calculation

* Test min retention period

* Fix broken test
2020-01-17 13:22:43 +01:00
Peter Holmberg
5f3d913cec
Inspect: Download DataFrame to Csv (#21549)
* basic setup for csv export

* tinkering with flex-grow

* fixed layout

* align select and button

* using stylesfactory
2020-01-17 12:55:21 +01:00
Erik Sundell
260239d98b
Stackdriver: Support meta labels (#21373)
* Rewrite angular segments for filter and group by in react

* wip: refactoring

* Update metric find queries

* Remove old maps used to create labels - use one map for all types instead

* Use value as label (again) for filters ang groupby

* Remove old filter

* Remove not used code

* Fixes after pr feedback

* Fix broken tests and add new metadata tests

* Add index file to make imports cleaner

* Cleanup. Remove old angular filter code

* Fix broken tests

* Use type switching instead of if statements

* Use globals for regex

* Updates after pr feedback

* Make sure it's possible to filter using the same key multiple times

* Replace metric select with segment component

* Pass template vars as props

* Refactor meta labels code

* Reorder template variables

* Fix broken tests

* Reset metric value when changing service

* Fix lint issue.

* Make tests independant of element order

* Include kubernetes.io in regex

* Add instruction in help section
2020-01-17 12:25:47 +01:00
Tobias Skarhed
aa0982da56
Add component: Cascader (#21410)
* Rename old cascader

* Change name of old cascader

* Add basic cascader without search

* Add basic cascader without search

* Flatten options to make it searchable

* Add regex search and make backspace work

* Add barebone search without styles

* Add SearchResult list

* Add search navigation

* Rewrite of cascader and add some things to SelectBase

* Make SelectBase controlllable

* Cleanup

* Add initial value functionality

* Add onblur to hand caret direction

* New storyboom format for ButtonCascader

* Add knobs to story

* Add story and docs for UnitPicker

* Make UnitPicker use Cascader

* Fix backspace issue and empty value

* Fix backspace issue for real

* Remove unused code

* Fix focus issue

* Change children to items and remove ButtonCascaderProps

* Remove local CascaderOption

* Fix failed test

* Revert UnitPicker changes and change format for ButtonCascader

* Fix failing tests
2020-01-17 11:30:33 +01:00
Torkel Ödegaard
15b2bf3e5c
Dashboards: Default Home Dashboard Update (#21534)
* HomeLinks: WIP panel for getting started links

* Progress

* progress

* Updated styling

* Updated default home dashboard

* Update light card styles

* Tweaks based on feedback
2020-01-17 09:43:17 +01:00
Ryan McKinley
0f0374544f
Templating: update variables on location changed (#21480) 2020-01-16 10:55:54 -08:00
kay delaney
451e9beaf0
Explore/Loki: Filter expression only treated as regex when regex operator is used (#21538)
* Explore/Loki: Filter expression only treated as regex when regex operator is used
Closes #17963

* Adds test cases to verify new behavior
2020-01-16 16:09:49 +00:00
Sofia Papagiannaki
1636e8873b
Fix TypeScript error (#21545) 2020-01-16 17:38:49 +02:00
kay delaney
cc1d468041
Explore: Ensures queries aren't updated when returning to dashboard if browser back is used (#20897)
* Explore: Ensures queries aren't updated when returning to dashboard if browser back is used
Closes #20873
2020-01-16 11:44:05 +00:00
Peter Holmberg
43dbbe51f0
Inspect: Use AutoSizer for managing width for content in tabs. (#21511)
* wrap content in autosizer

* replace lib

* removing react-virtualized, correct type in editor.ts

* remove caret

* remove dep from grafana/ui and remove story util
2020-01-16 11:11:33 +01:00
Ryan McKinley
c5da1864a6
AppPlugin: remove simple app from the core repo (#21526) 2020-01-15 16:10:27 -08:00
Ryan McKinley
76ba2db4e7
DataLinks: allow using values from other fields in the same row (#21478) 2020-01-15 12:02:52 -08:00
Dominik Prokop
3f957a3735
grafana/data: Update plugin config page typings (BREAKING) (#21503)
* Change typyings of plugins config pages

* Update plugin config page types of core plugins
2020-01-15 19:42:44 +01:00
Erik Sundell
a35b2ac463
CloudWatch: Annotation Editor rewrite (#20765)
* wip: react rewrite

* Cleanup

* Break out non annontations specific fields

* Cleanup. Make annontations editor a functional component

* Remove redundant classnames

* Add paneldata to props

* Cleanup

* Fix rebase merge problem

* Updates after pr feedback

* Fix conflict with master
2020-01-15 16:38:15 +01:00
Emil Tullstedt
29687903f8
Admin: Add promotional page for Grafana Enterprise (#21422)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-01-15 14:50:44 +01:00
Peter Holmberg
16ded9fe6e Tabs: Hide Tabs on Page header on small screens (#21489)
* Adding className to hide tabs on small screens

* update snapshot

* Readd border on pageheader

* update snap
2020-01-15 12:54:35 +01:00
Torkel Ödegaard
98bbdea69d
SideMenu: Fixes issue with logout link opened in new tab (#21488)
* SideMenu: Fixes issue with logout link opened in new tab

* Updated snapshot
2020-01-15 10:29:27 +01:00
Ryan McKinley
f6c94b9c40
Templating: use default datasource when missing (#21495) 2020-01-14 22:51:25 -08:00
Ivana Huckova
ba7d8c1a3d
Explore: Fix timepicker when browsing back after switching datasource (#21454) 2020-01-14 19:20:17 +01:00
Marcus Andersson
45dc4a834e
Fix: when clicking a plot on a touch device we won't display the annotation menu (#21479)
* Fixed so when clicking a plot on a touch device we won't display the annotation context menue.

* Refactorings after feedback.

* changed to standard-ish comment.
2020-01-14 14:16:44 +01:00
Ryan McKinley
a0d43de761 Backend Plugins: add a common implementation (#21408)
* add common backend

* use const for range

* likely not differnt

* send the right orgId

* Add DataSourceWithBackend to @grafana/runtime mock in root reducer test

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-01-14 12:59:48 +01:00