Commit Graph

11233 Commits

Author SHA1 Message Date
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
Sofia Papagiannaki
d135f1229d
Alerting: new min_interval_seconds options to enforce a minimum eval frequency (#21188)
* add min_interval_seconds setting to alerting config

It will let operator enforce a minimum time for the scheduler to enqueue evaluations

* Introduce UI modifications

* Update docs

Co-authored-by: Martin <uepoch@users.noreply.github.com>
2020-01-14 11:13:34 +02:00
Peter Holmberg
6b3041d358
Panel: Use Tabs in panel inspector (#21468)
* replace select with tabs

* storybook example

* Update snapshot, move styles to component files
2020-01-14 09:03:14 +01:00
Alexander Zobnin
8505d90768 Admin: New Admin User page (#20498)
* admin: user page to react WIP

* admin user page: basic view

* admin user page: refactor, extract orgs and permissions components

* admin user: change sessions actions styles

* admin user: add disable button

* user admin: add change grafana admin action

* user admin: able to change org role and remove org

* user admin: confirm force logout

* user admin: change org button style

* user admin: add confirm modals for critical actions

* user admin: lock down ldap user info

* user admin: align with latest design changes

* user admin: add LDAP sync

* admin user: confirm button

* user admin: add to org modal

* user admin: fix ConfirmButton story

* admin user: handle grafana admin change

* ConfirmButton: make styled component

* ConfirmButton: completely styled component

* User Admin: permissions section refactor

* admin user: refactor (orgs and sessions)

* ConfirmButton: able to set confirm variant

* admin user: inline org removal

* admin user: show ldap sync info only for ldap users

* admin user: edit profile

* ConfirmButton: some fixes after review

* Chore: fix storybook build

* admin user: rename handlers

* admin user: remove LdapUserPage import from routes

* Chore: fix ConfirmButton tests

* Chore: fix user api endpoint tests

* Chore: update failed test snapshots

* admin user: redux actions WIP

* admin user: use new ConfirmModal component for user profile

* admin user: use new ConfirmModal component for sessions

* admin user: use lockMessage

* ConfirmButton: use primary button as default

* admin user: fix ActionButton color

* UI: use Icon component for Modal

* UI: refactor ConfirmModal after Modal changes

* UI: add link button variant

* UI: able to use custom ConfirmButton

* Chore: fix type errors after ConfirmButton refactor

* Chore: revert Graph component changes (works with TS 3.7)

* Chore: use Forms.Button instead of ActionButton

* admin user: align items

* admin user: align add to org modal

* UI: organization picker component

* admin user: use org picker for AddToOrgModal

* admin user: org actions

* admin user: connect sessions actions

* admin user: updateUserPermissions action

* admin user: enable delete user action

* admin user: sync ldap user

* Chore: refactor, remove unused code

* Chore: refactor, move api calls to actions

* admin user: set user password action

* Chore: refactor, remove unused components

* admin user: set input focus on edit

* admin user: pass user into debug LDAP mapping

* UserAdminPage: Ux changes

* UserAdminPage: align buttons to the left

* UserAdminPage: align delete user button

* UserAdminPage: swap add to org modal buttons

* UserAdminPage: set password field to empty when editing

* UserAdminPage: fix tests

* Updated button border

* Chore: fix ConfirmButton after changes introduced in #21092

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-01-13 17:10:19 +01:00
Peter Holmberg
891b84e986
Fix: Tab icons not showing (#21465)
* revert back to i element

* snap
2020-01-13 13:53:39 +01:00
Torkel Ödegaard
b6c75b10d1
Login: Refactoring how login background is rendered (#21446)
* Login: Refactoring how login background is rendered

* Tweak
2020-01-13 09:42:21 +01:00
Torkel Ödegaard
27a77f588c
StatPanel: Refactoring & fixes (#21437)
* refactoring BigValue layout to use polymorphism

* Renamed file

* StatPanel: Fixed min & max handling, white theme background

* Typescript and test fixes

* Fixed justify center logic

* Updated test dashboard

* Updated test dashboard

* Adjust time xMax to align with last data point if it's close

* Fixed color issue

* removed text shadow

* Removed unused stuff

* Fixed auto min max

* Fixed strict typescript issues

* Updated
2020-01-13 09:41:35 +01:00
Hugo Häggmark
4f0fa776be
Chore: Migrates reducers and actions to Redux Toolkit (#21287)
* Refactor: Adds Redux Toolkit package

* Refactor: Uses configureStore from Redux Toolkit

* Refactor: Migrates applicationReducer

* Refactor: Migrates appNotificationsReducer

* Refactor: Migrates locationReducer

* Refactor: Migrates navModelReducer

* Refactor: Migrates teamsReducer and teamReducer

* Refactor: Migrates cleanUpAction

* Refactor: Migrates alertRulesReducer

* Refactor: Cleans up recursiveCleanState

* Refactor: Switched to Angular compatible reducers

* Refactor: Migrates folderReducer

* Refactor: Migrates dashboardReducer

* Migrates panelEditorReducer

* Refactor: Migrates dataSourcesReducer

* Refactor: Migrates usersReducer

* Refactor: Migrates organizationReducer

* Refactor: Migrates pluginsReducer

* Refactor: Migrates ldapReducer and ldapUserReducer

* Refactor: Migrates apiKeysReducer

* Refactor: Migrates exploreReducer and itemReducer

* Refactor: Removes actionCreatorFactory and reducerFactory

* Refactor: Moves mocks to test section

* Docs: Removes sections about home grown framework

* Update contribute/style-guides/redux.md

Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Refactor: Cleans up some code

* Refactor: Adds state typings

* Refactor: Cleans up typings

* Refactor: Adds comment about ImmerJs autoFreeze

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-01-13 08:03:22 +01:00
Torkel Ödegaard
35679d4689
Logos: Refactoring a bit how logos are rendered (#21421) 2020-01-10 22:15:16 +01:00
Shavonn Brown
a7509d2ca0
More datasource funcs poc (#21047)
* remove anon funcs, removed options from state, removed update method, static selects as constants

* cancellable promise

* cancel promise on unmount

* use new datasource funcs for dryer component

* event handler funcs

* updated funcs and moved to utils, updating config editors

* S has no keys. never will never work

* remove report json

* update azure snapshot

* DataSourceSettings keyof

* rename reset funcs
2020-01-10 14:26:33 -05:00
Ryan McKinley
7521d2bba0 Heatmap: fix formatting (#21433)
* add formatting

* remove logging
2020-01-10 12:50:30 +01:00
vikkyomkar
15fe58f193 Docs: Fixed broken links of Datasource doc at Grafana plugin page (#21363)
Fixes #21362
2020-01-10 12:38:16 +01:00
Peter Holmberg
bb649489c8
grafana/ui: Create Tabs component (#21328)
* create tabs component

* replace tabs in pageheader

* splitting two different types of tabitems

* fix index and conditionals in tabs

* redo tabs to not render anchor links

* rename to className and use cx to combine classes

* reverting back to a simpler use case

* moving type to types file

* fix import

* redoing Tabs to simpler composition components

* pr feedback

* update snapshot

* use icon component, added knob for storybook
2020-01-10 10:38:43 +01:00
Ryan McKinley
bf18704490
Inspector: support custom metadata display (#20854) 2020-01-09 22:59:23 -08:00
teodoryantcheff
0bf9e9bc28 Table: Added text align option to column styles (#21175)
* Added text align option to column styles, tests

* table panel migrations

* added tests

* default column style is now auto

* tests and fixtures...

* wrong comments need removing

* xss guard

* test

* Some test for invalid options, formatting.

* Remote branch tracking.
2020-01-09 16:01:12 +01:00
Martin Brenner
7784b519a0 PluginPage: Add appSubUrl string to config pages url (#21414) 2020-01-09 14:02:58 +01:00
Torkel Ödegaard
91ea3b15fa
Footer: Single footer component for both react & angular pages (#21389)
* Footer: Single footer implementation for both react & angular pages

* Export type

* Updates

* Use footer links in help menu

* Updates & Fixes

* Updated snapshot

* updated snapshot
2020-01-09 11:25:52 +01:00
Torkel Ödegaard
fe61f6b7a7
AddDataSource: Added missing phantom plugin (#21406)
* AddDataSource: Added missing phantom plugin

* Fixed test
2020-01-09 08:26:32 +01:00
Shavonn Brown
cd5d5bcbba
Cloud Watch: Standardize Config Editor Implementation (#20489)
* remove anon funcs, removed options from state, removed update method, static selects as constants

* cancellable promise

* cancel promise on unmount

* use new datasource funcs for dryer component
2020-01-08 08:57:52 -05:00
Erik Sundell
cf2dd51827
CloudWatch: dimension_values templating fix (#21401)
* Handle dimension value if passed as array

* Break out dimension value loading into its own func
2020-01-08 12:24:10 +01:00
Lukas Siatka
34d9274c4c Datasource: fixes prometheus datasource tests - adds align range 2020-01-07 15:41:01 +01:00
Torkel Ödegaard
f774c4a076
Cloudwatch: Fixed crash when switching from cloudwatch data source (#21376) 2020-01-07 13:05:14 +01:00
lzd
ee77e1a791 Datasource: fix a bug where deleting data source will trigger save and test events (#21300) 2020-01-07 09:48:46 +01:00
Dominik Prokop
630f75d3ef
Forms: revamped select (#21092) 2020-01-07 09:20:06 +01:00
Torkel Ödegaard
e78074992b
AddDatasourcePage: Refactoring & more Phantom plugins (#21261)
* WIP: New types and state refactoring

* Added buildCategories & tests

* Added phantom plugins

* fixed tests

* Minor changes, force enterprise plugins to enterprise category

* Fixed tests
2020-01-06 16:56:34 +01:00
Torkel Ödegaard
f93f1c4b51
Chore: Remove empty flot.pie file (#21356) 2020-01-06 16:53:38 +01:00
Ryan McKinley
1ba072cd58
NewsPanel: update default feed url (#21342) 2020-01-04 13:41:43 -08:00
Ryan McKinley
e550572033
DataFrame: round trip metadata to arrow Table (#21277) 2020-01-03 08:12:19 -08:00
David
cb3d91b53c
Prometheus: user metrics metadata to inform query hints (#21304)
* Prometheus: user metrics metadata to inform query hints

- no longer analyse datapoints
- either use metrics metadata to determine metrics type or use metric
name suffix
- removed testcases based on datapoints

* Added hint certainty and tests
2020-01-03 12:55:50 +01:00
okhowang
512a42d2c6 Panel: disable edit/duplicate/delete entry for repeat panel (#21257) 2020-01-03 12:18:39 +01:00
David
d63ad9ac93
Prometheus: Disable suggestions at beginning of value (#21302)
* Prometheus: Disable suggestions at beginning of value

- fixed comparison operator regex
- no longer suggest anything at beginning of label value

* Detect cursor in front of label values
2020-01-03 12:16:27 +01:00
Ryan McKinley
e1acc77297
@grafana/data: use timeZone parameter rather than isUtc (#21276) 2020-01-02 08:11:28 -08:00
David
3667781e6f
Loki: fix filter expression suggestions (#21290)
* Loki: fix filter expression suggestions

- dont suggest term completion items in filter expression
- allow at least one character before suggesting term items
- keep logql expression when switching between Metrics/Logs mode
- show only history by default in completion items

* Clear results when changing mode
2019-12-31 09:53:30 +01:00
David
334b89f3ee
Prometheus: Fix label value suggestion (#21294)
* Prometheus: Fix label value suggestion

- remove quotes from typeahead input to suggest correct label values
- fix acceptance of partial label values

* Disable mid-word suggestions

* Fix test
2019-12-31 08:56:57 +01:00
David
649fa6789e
Prometheus: Fix term completion that contain keywords (#21295)
- `unless`, `or` and `and` are binary operators
- if they appear in a query the query was broken up so the suggestor
only works on the current term
- this change fixes the splitter logic to make sure those keywords are
not inside a word
2019-12-30 18:03:35 +01:00
Ryan McKinley
d9e9843a10
FieldConfig: add thresholds and color modes (#21273) 2019-12-28 17:32:58 -08:00
Björn Rabenstein
36aad1c101 Prometheus: improve tooltips (#21247)
* Prometheus data source: Update tooltip for _Scrape interval_

The old tool tip was plainly wrong. The globally configured scrape
interval is not necessarily the most used scrape interval, so the new
wording is describing what actually matters. The evaluation interval
wasn't even mentioned before. And finally, the configured value is
not strictly a lower limit for the step query parameter as it can be
overridden by the panel option _Min time interval_.

I plan to explain the overriding intricacies in the tool tip for _Min
time interval_.

Signed-off-by: beorn7 <beorn@grafana.com>

* Improve tooltip for _Min step_

The previous tool tip was mostly addressing aspects that are not
specific to _Min step_ (and might be more appropriate to be added to
the _Min time interval_ tool tip as that setting has a wider
scope). The new version emphasizes the important gotchas: that this is
an _additional_ lower limit, and that it is _not_ multiplied by the
resolution factor.

Signed-off-by: beorn7 <beorn@grafana.com>

* Fixed snapshot

Co-authored-by: David <david.kaltschmidt@gmail.com>
2019-12-27 09:49:42 +01:00
Torkel Ödegaard
45b7de1910
Explore: Moves PromContext from query level to DataQueryRequest level (#21260)
Closes #19598

Fixes bug introduced recently where the new PromQueryEditor did not preserve
the PromContext.Explore set on the query model by PromQueryField which caused
the table to be empty for Prometheus in explore.
2019-12-27 09:11:16 +01:00
Łukasz Szczęsny
545b72da33 BridgeSrv: do not strip base from state.location.url (#20161) 2019-12-26 16:08:04 +01:00
Torkel Ödegaard
8477104925
Graph: another tooltip fix (#21251) 2019-12-25 08:15:31 +01:00
Zach Bagnall
d0360de8f1 Alerting: Add configurable severity support for PagerDuty notifier (#19425)
* Pagerduty notifier: configurable severity

Instead of hardcoding `critical` make it configurable per notification channel instance.

* fix html

* Add a test to ensure default severity is correct

* Notifications doc

* Add a non-default test

* Add err check on NewJson (all tests)

* Add default severity (critical) to AlertNotificationEditCtrl class
2019-12-24 09:32:05 +02:00
Torkel Ödegaard
8740c66218
Graph: Fixed no value in graph tooltip (#21246) 2019-12-24 08:25:17 +01:00
David
d0ba644355
Promtheus: Fix hint and error display for query rows (#21242)
- prometheus explore editor introduced new styles for the hint display
- when multiple rows are rendered the hints are covered because they are
forced to have 0 height
- this change removes the 0-height
2019-12-23 19:53:42 +01:00
vikkyomkar
bc10a69626 Docs: fixed broken doc link for graph and table panels (#21238)
* fixed  broken doc link

* fixed broken doc link
2019-12-23 17:41:27 +01:00
vikkyomkar
68f73b18fb Docs: fix of broken doc link in the dashlist panel's help section (#21230)
* fixed the broker link of dashlist panel docs

* fixed broken document link
2019-12-23 17:40:43 +01:00
mpursley
bf79b97b6e Docs: Update the link to docs for singlestat (#21225) 2019-12-23 17:39:38 +01:00
Lukas Siatka
74924c8284 Explore: moves add query row button below query rows (#20522)
* Explore: updates Query Row component, moves latency to query row actions

* Explore: updates query row actions - adds latency and removes add row button

* Explore: updates explore toolbar props, adds index of the last query row

* Explore: updates toolbar, adds add new row button

* Explore: updates add new query row toolbar button title to add query

* Explore: updates query row actions - adds disabled property on latency button

* Explore: updates query row actions snapshot

* Explore: updates styles

* Explore: updates query row, removes latency

* Explore: updates query row actions, removed latency

* Explore: updates query row actions test and snapshot

* Explore: updates toolbar, moves add new query row button below query rows

* Explore: updates add query row button color and adds transparent background to latency div

* Explore: updates styles for add query row button responsiveness

* Explore: updates query row with latency button, fixes alignment of overall latency

* Explore: updates query row actions snapshot

* Explore: removes overall latency

* Explore: updates query row latency - removes mouseover-triggered style changes

* Explore: updates query row actions snapshot

* Explore: moves styles from scss to emotion

* Add row button: Removed responsiveness, reused query row styles

Co-authored-by: David <david.kaltschmidt@gmail.com>
2019-12-23 12:29:00 +01:00
Lukas Siatka
1de24cc929 Explore: adds PrometheusExploreQueryEditor (#20195)
* Explore: updates prom query field styles with flex-grow

* Explore: adds prometheus explore query editor

* Explore: updates step input width in prom explore query editor

* Explore: updates prom explore query editor step field input placeholder to auto

* Explore: updates prom explore query editor to include history

* Explore: updates prom explore query editor, removes unused lodash import

* Explore: updates step spacing in prom explore query editor

* Explore: updates prom explore query editor - moves logic to query field

* Explore: updates prom query field - adds step field with conditional rendering

* Explore: updates promql cheat sheet with step description

* Explore: updates prom cheat sheet  step description

* Explore: updates styles - adds query row break class

* Explore: moves back step markup to PromExploreQueryEditor
2019-12-23 11:42:31 +01:00
Björn Rabenstein
7e8f4d0b0e Simplify adjustInterval (#21226)
Much easier to wrap one's head around it if it is expressed more
directly.

This is not mathematically the same as the previous version involved
more rounding than necessary because of the way the intervalFactor was
handled. I'd argue the new version is better because it gets closer to
the 11,000 points limit and thus approaches better what the user
wanted within the limits of Prometheus.

Note that in practice, the 11,000 points limit should never be of
relevance. (Even a 4k screen doesn't have 11k points on the x axis.)

Signed-off-by: beorn7 <beorn@grafana.com>
2019-12-23 08:28:08 +01:00
Torkel Ödegaard
31c59f3de9 Sass: Checked in tmpl files 2019-12-23 07:22:44 +01:00
Torkel Ödegaard
3347b45a95
Table: Component progress & custom FieldConfig options (#21231)
* Table: Set & use field display processor

* Use applyFieldOverrides outside in story instead

* Change types a bit

* Table: Move to flexible layout

* Simplest possible custom field option

* Skip default column

* Added textAlign

* Explore: Set display processor for table data frame

* Fixed storybook

* Refactoring

* Progress on cell display mode

* Major progress

* Progress & refactoring

* Fixes

* Updated tests

* Added more tests

* Table: Progress on cell style customization

* Restored testdata random walk table scenario

* put back unrelated change

* remove unused things

* Updated table story

* Renamed property

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2019-12-23 06:22:54 +01:00
Ryan McKinley
8d537b7afb Chore: remove StreamHandler and DataStreamState (#21234)
* remove StreamHandler

* remove DataStreamState
2019-12-23 06:16:04 +01:00
Torkel Ödegaard
6c2375e495
DashboardGrid: Fixed flickering while resizing (#21221) 2019-12-21 08:01:26 +01:00
Ryan McKinley
b8c0924ab1
NewsPanel: add news as a builtin panel (#21128) 2019-12-20 10:47:45 -08:00
Torkel Ödegaard
392819c5d0
New bar gauge style: Unfilled (#21201)
* BarGauge: Added unfilled option

* Fixed white theme and added 2 unit tests

* Added another demo dashboard

* Fixed dev env dashboards
2019-12-20 16:05:37 +01:00
Marcus Andersson
587e4009f3
Dashboard: new updated time picker (#20931)
* Dashboard: started to implement new time picker.

* TimePicker: working in full screen (except calendar).

* TimePicker: first draft on narrow screen variant.

* TimePicker: small adjustments to the narrow design.

* TimePicker: enabled range selection and started to style calendar.

* TimePicker: applied some more styling.

* Calendar: added so the calendar range selection is styled properly.

* Calendar: added styling for timepicker calendar in narrow screen.

* TimePicker: made it possible to select range from calendar.

* TimePicker: made the calendar have previous selected value.

* TimePicker: moved calendar to be able to update form state.

* TimePicker: calendar is now displayed onFocus or onClick.

* TimePicker: calendar will be closed if click outside input.

* Calendar: fixed the styling of the calendar in narrow screen.

* Calendar: made it work properly with narrow screen.

* TimePicker: connected recent to absolute time range.

* TimePicker: changed the label on recent ranges.

* TimePicker: cleaned up the range list and options.

* TimePicker: some more cleaning up.

* TimePicker: cleaned up the calendar a bit.

* TimePicker: some more refactorings.

* TimePicker: refactorings.

* TimePicker: styled modal properly.

* TimePicker: empty recent list.

* TimePicker: width when calendar in full screen.

* TimePicker: will validate input value.

* TimePicker: removed unused code.

* TimePicker: positioning with emotion instead of sass.

* Calendar: Made sure we send the dates in the correct order to the calendar.

* TimePicker: fixed theme.

* TimePicker: fixed positioning of the content.

* TimePicker: positioning of narrow.

* TimePicker: added some simple tets.

* TimePicker: fixed issue with invalid and added error message.

* TimePicker: added history.

* TimePicker: cleaned up snapshot data.

* TimePicker: fixed so we keep the quick values in the input.

* TimePicker: fixed the missing styling on UTC.

* TimePicker: added missing caret icon.

* TimePicker: fixed formatting on recent time ranges.

* TimePicker: added missing -.

* TimePicker: refactorings after feedback.

* TimePicker: renamed reserved prop name.

* TimePicker: added missing onChange call.

* TimePicker: removed alternative return type.

* TimePicker: fixed the sorting order on the recent list.

* TimePicker: added useCallback for the onEvent functions.

* TimePicker: moving away from default export.

* TimePicker: used the isMathString instead of private function.

* TimePicker: minor refactoring simplify the code.

* TimePicker: Added empty container that will expand when less then 4 recent searches.

* TimePicker: changed the top to be absolute relative to the container.

* TimePicker: updated snapshots for failing tests.

* Fixed shadow

* Move it down a bit

* added some more tests.

* Fixed so we change the anchor point of the time picker in really small screens.

* removed memo.

* fixed snapshot.

* Make sure that we always use the correct timeZone when formatting output.

* Fixed form background.

* Some minor fixes after demo.

* Making sure that empty info box is centered.

* updated snapshots for timepicker after css changes.

* fixed so we don't overflow when input validation error.

* adjusted final things on the time picker.

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2019-12-20 15:31:58 +01:00
Ryan McKinley
104c2e3636 Metrictank: fix bundled dashboard (#21209)
* update metrictank dashboard

* Restored dashboard datasource variable, and improved error handling in the import api handler

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2019-12-20 11:42:47 +01:00
Marcus Andersson
05d831df29
Tooltip: preventing xss injections via the colors variable. (#21203)
* Tooltip: preventing xss injections via the colors variable.

* added xss check for single series tooltop color.

* added sanitize to the hoverInfo.value.
2019-12-20 11:28:10 +01:00
Ivana Huckova
14b2dad9da
Livetailing: set table withd to 100% (#21213) 2019-12-20 11:21:04 +01:00
Hugo Häggmark
f1b675b12e
e2e: Waits for login before moving forward (#21185) 2019-12-19 07:51:32 +01:00
Torkel Ödegaard
0676189291
PanelChrome: Mini refactor (#21171) 2019-12-19 07:01:35 +01:00
Torkel Ödegaard
10413c4aa5
DashboardGrid: Change grid margin to 8, to align to 8px grid (#21167) 2019-12-18 14:30:17 +01:00
Peter Holmberg
2e60752258
Panel: Show inspect panel in Drawer instead of Modal (#21148) 2019-12-18 13:57:07 +01:00
David
34c1433ba4
Prometheus: Fix typehead after binary operators (#21152)
- no longer do right-trim to prevent suggestions after space
- rely on splitting on syntax elements to identify relevant prefix
- added tests
2019-12-18 13:35:31 +01:00
Hugo Häggmark
05cb85feba
Table: Matches column names with unescaped regex characters (#21164)
* Table: Matches column names with unescaped regex characters
Fixes #21106

* Chore: Cleans up unused code
2019-12-18 12:38:39 +01:00
Dominik Prokop
26aa1f0cca
DataLinks: Sanitize data/panel link URLs (#21140)
* Sanitize html in panel links

* Add sanitize-url package

* Enable config mocking

* Sanitize datalinks urls

* Update public/app/core/config.ts

* Minor test update

* Remove sanitize-url dependency

* Remove typings

* Review update

* Revert "Remove sanitize-url dependency"

This reverts commit c4f38e6de6.

* Revert "Remove typings"

This reverts commit 676d47e8c2.

* Sanitaze, don't escape html when sanitizing URL
2019-12-18 11:31:11 +01:00
Torkel Ödegaard
475bd7ad09
Dashboard: Only show resize-handle on hover (#21160) 2019-12-18 11:15:59 +01:00
Peter Holmberg
e9079c3faa
grafana/ui: New table component (#20991)
* first working example

* Support sorting, adding types while waiting for official ones

* using react-window for windowing

* styles via emotion

* sizing

* set an offset for the table

* change table export

* fixing table cell widths

* Explore: Use new table component in explore (#21031)

* Explore: Use new table component in explore

* enable oncellclick

* only let filterable columns be clickable, refactor renderrow

* remove explore table

* Keep using old merge tables logic

* prettier

* remove unused typings file

* fixing tests

* Fixed explore table issue

* NewTable: Updated styles

* Fixed unit test

* Updated TableModel

* Minor update to explore table height

* typing
2019-12-18 08:38:50 +01:00
Hugo Häggmark
841cffbe9a
e2e: Migrates query variable CRUD tests to new framework (#21146)
* Refactor: Adds params to visit

* Refactor: Restructures exported Pages somewhat

* Refactor: Moves more into new framework but holdup because of bugs in digest

* Refactor: Finish migrating templating e2e tests to new framework

* Refactor: Changes after merge with master

* Refactor: Removes weird change

* Refactor: Adds duplication test

* Refactor: Adds move down and move up variable asserts

* Refactor: Adds some test to value select dropdown
2019-12-18 06:13:58 +01:00
Boyko
331bc173cc Chore: Upgrade react, react-dom, react-test-renderer versions (#21130)
* Chore: Upgrade react, react-dom, react-test-renderer versions

* Chore: Normalize windows path for webpack plugin test

* Chore: Replace deprecated react-testing-hooks-library
2019-12-17 13:42:30 +01:00
David
13073fa6ba
Prometheus: Display HELP and TYPE of metrics if available (#21124)
* Prometheus: Display HELP and TYPE of metrics if available

- Prometheus recently added a metadata API around HELP and TYPE of
metrics
- request metadata when datasource instance is created
- use metadata to show help and type in typeahead suggestions and in
metrics selector as tooltip

* Fix types
2019-12-17 11:06:43 +01:00
Hugo Häggmark
7d21868931
e2e: Updates truth image (#21132) 2019-12-17 09:15:53 +01:00
Torkel Ödegaard
4f1fffb948
FontSize: Change base font size to 14px (#21104) 2019-12-16 17:45:33 +01:00
Ivana Huckova
842dde3dc9
Explore: Refactor log rows (#21066) 2019-12-16 16:07:36 +01:00
Marcus Efraimsson
71382ae7ed phantomjs: performance.getEntriesByType not supported (#21009) 2019-12-16 09:40:12 +01:00
Torkel Ödegaard
16f0e75448
New panel editor (behind feature toggle) (#21097)
* WIP: initial 10min poc of new panel editor

* added queries

* PanelEditor: copy panel model when going into edit mode

* Added option
2019-12-16 09:18:48 +01:00
Hugo Häggmark
664cb5f8f1
e2e: Adds ScenarioContext and video recordings to e2e (#21110)
* Refactor: Adds ScenarioContext

* Refactor: Removes async

* Refactor: Adds video and reverts CIRCLE_SHA2 to CIRCLE_SHA1

* Refactor: Adds videos to release job as well
2019-12-16 08:49:36 +01:00
Torkel Ödegaard
fcc74ad2b4
DashboardImport: Fixes broken import page in prod builds (#21101) 2019-12-14 17:50:31 +01:00
Ryan McKinley
6de4933a4a
FieldConfig: set min/max automatically for gauge (#21073) 2019-12-13 08:36:49 -08:00
Jerry Ylilammi
e27ab89aed Postgres/MySQL/MSSQL: Adds support for region annotations (#20752)
Adds support for region annotations in Postgres, MySQL and 
MSSQL data sources by adding a column named timeend to 
annotation query.

Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

Closes #20918
Ref #10589
2019-12-13 17:25:36 +01:00
Shavonn Brown
f65da93d72
Azure Monitor: Use default from datasource if not saved on dashboard/query (#20899)
* use default from datasource if not saved on dash/query

* find datasource default workspace in returned workspace list

* don't need the find

* fix dropdown
2019-12-13 11:03:08 -05:00
Shavonn Brown
c14398edc8
Azure Monitor: Copy AM Creds to Log Analytics When Using Same As (#21032)
* copy creds draft

* copy azure monitor creds to log analystics for sameas

* alert

* update snapshot
2019-12-13 11:02:39 -05:00
Alexander Zobnin
fd2131c1e3
UI: ConfirmButton component (#20993)
* UI: ConfirmButton component

* UI: add link button variant

* UI: add ConfirmButton story with delete option

* Chore: use ConfirmButton instead of DeleteButton

* UI: remove DeleteButton

* UI: rename confirmButtonVariant to confirmVariant

* UI: use Form.Button in ConfirmButton

* Chore: use sm ConfirmButton size after changing defaults

* Revert "UI: add link button variant"

This reverts commit 4372350daa.

* Chore: add 'link' variant type to the Button

* UI: DeleteButton component on top of ConfirmButton

* Chore: use DeleteButton instead of ConfirmButton

* Chore: DeleteButton, use md size by default

* Chore: update test snapshots
2019-12-13 14:42:18 +03:00
kay delaney
4dba02dd20
Angular/React: Migrates team creation form to react (#21058) 2019-12-13 08:51:10 +00:00
Hugo Häggmark
483415ac7c
Templating: Fixes digest issues in Template Variable Editor (#21079)
* Fix: Adds extra digest after promises

* Feature: Adds promise to digest utility
2019-12-13 09:47:53 +01:00
Torkel Ödegaard
98bea0990f
OrgSwitcher: Fixed issue rendering org switcher even when it's not open (#21061)
* OrgSwitcher: Fixed issue rendering org switcher even when it's not open

* Updated test

* Fixed unit test
2019-12-13 09:27:45 +01:00
Witek Bedyk
818972f11b Chore: Remove rejected files (#21072)
These files get created when applying a patch with some hunks being
rejected. These two files can be safely ignored.
2019-12-13 09:05:54 +01:00
Hugo Häggmark
e96f962076
e2e: Uses should on first element after visit to prevent flakiness (#21077) 2019-12-13 08:39:12 +01:00
Ryan McKinley
1aa39ee458
FieldConfig: support overrides model (#20986) 2019-12-12 14:55:30 -08:00
Torkel Ödegaard
1f73e2aadf
AngularPanels: fixed transparency issue (#21070) 2019-12-12 22:35:37 +01:00
Hugo Häggmark
a187500c0e
Prometheus: Prevents validation of inputs when clicking in them without changing the value (#21059)
Fixes #21056
2019-12-12 13:26:12 +01:00
Hugo Häggmark
e69ec6ca53
Prometheus: Fixes so user can change HTTP Method in config (#21055)
Fixes #21004
2019-12-12 11:52:03 +01:00
Torkel Ödegaard
4e1e0b9065
MetricSegment: Fix metric segment UI crash in prod builds (#21053) 2019-12-12 09:22:25 +01:00
Itamar Turner-Trauring
70e38ec352 OpenTSDB: Adding lookup limit to OpenTSDB datasource settings (#20647)
* feat: adding lookup limit to OpenTSDB settings

Adding lookup to OpenTSDB datasource settings and using it in the datasource for tag value lookup and suggest

* Document the change.

* feat: UI for configuring OpenTSDB lookup limit.

* Apply prettier.

* Fix compilation error.
2019-12-12 09:02:50 +01:00
Hugo Häggmark
8fd1931e1c
Templating: Fixes default visibility for submenu to same as dashboard (#21050) 2019-12-12 08:04:36 +01:00
Andrej Ocenas
5a3c1dc6a4
Elastic: Add data links in datasource config (#20186) 2019-12-11 17:40:56 +01:00
David
e7ae220cde
Logs: Optional logs label column (#21025)
* Logs: Optional logs label column

- reintroduces label column that was removed when log details were
introduced
- added to explore and also as a new option to logs panel
- explore column settings now stored in localstorage
- labels are rendered with font size xs
- labels that start with `_` or are called `level` or `filename` are not
displayed
- removed click handlers and moved remaining `LogLabel` logic into `LogLabels`

* Added prop to satisfy interface

* Review feedback

* removed comment

* Changed label of label column switch
2019-12-11 16:11:32 +01:00
Ivana Huckova
32c9d558f9
Explore: Sync timepicker and logs after live-tailing stops (#20979) 2019-12-11 14:14:39 +01:00
Hugo Häggmark
8495af4c52
Fix: Shows SubMenu when filtering directly from table (#21017)
* Fix: Shows SubMenu when filtering from table
Fixes #20270

* Tests: Updates snapshots

* Refactor: Changes after PR comments

* Refactor: Changes template
2019-12-11 14:09:57 +01:00
okhowang
4698cef2a2 Alerting: Fix template variable in query check (#20721) 2019-12-11 11:11:37 +01:00
Torkel Ödegaard
72ee1b9a94
MixedDatasources: Do not filter out all mixed data sources in add mixed query dropdown (#20990) 2019-12-10 23:17:55 +01:00
David
75923c43d1
Promtheus: Improve tab completion (#20938)
Change in behavior:

- no longer suggest everything in empty field, only history
- term suggestions need at least one character
2019-12-10 16:11:31 +01:00
David
2d5dc5d6b2
Loki: fix labels fetching when no initial range given (#21000) 2019-12-10 15:29:32 +01:00
Erik Sundell
0e4850f203
UI: Segment fixes (#20947)
* Add support for primitive values/onchange

* Fix segment clickaway bug

* Fix onchange

* Use primitive in cloudwatch

* Add placeholder

* Use placeholder in cloudwatch editor

* Fix lint error

* Fix lodash import

* Use new component story format

* Add support for autofocus

* Use selectable value for onchange event

* Fix lint error
2019-12-10 13:00:22 +01:00
Labesse Kévin
26789d1eb6 Stackdriver: Make service list searchable (#20989)
* remove non-searchable option

* fix unit test

Signed-off-by: Kevin Labesse <kevin@labesse.me>

* fix unit test
2019-12-10 12:29:25 +01:00
Alexander Zobnin
f24b84faef
UI: ConfirmModal component (#20965)
* UI: ConfirmModal component based on Modal

* UI: refactor ConfirmModal after Modal changes

* UI: use Icon component for Modal

* UI: ConfirmModal tests

* UI: ConfirmModal story
2019-12-10 11:57:34 +03:00
lzd
6efadc9d79 Alert: If the permission is forbidden, keep the historical alarm data present. (#19007) 2019-12-10 09:22:49 +01:00
Hendrik van Huyssteen
bf0d87aaf6 Graph: Add fill gradient option to series override line fill (#20941) 2019-12-10 09:09:48 +01:00
David
1a2dad9d0c
Prometheus: disable dynamic label lookup on big datasources (#20936)
* Prometheus: disable dynamic label lookup on big datasources

- when a prometheus datasource has more than 10000 metrics, label lookup
for the query field is disabled
- installations of that size have slow typehead lookup times and make
the editor sluggish

* Raise dynamic lookup threshold to 10000 metrics

* Run start tasks again
2019-12-09 17:02:17 +01:00
David
7665dcc867
Loki: Fix datasource config page test run (#20971)
- since the API update, the URL fallback was working, but the response
format also needed adapting: `data` (v1) vs `values` (pre-v1)
- this change looks for either data or values in the response for test
and metadata requests
2019-12-09 16:45:56 +01:00
Hugo Häggmark
8140c9bab7
e2e: Replaces truth image (#20966) 2019-12-09 14:45:24 +01:00
Erik Sundell
93ab0532c7
Make sure datasource variable is being used everywhere (#20917) 2019-12-09 11:35:26 +01:00
Torkel Ödegaard
fc00d8336f
Alerting: Improve alert threshold handle dragging behavior (#20922) 2019-12-09 10:49:35 +01:00
Andrej Ocenas
a7f4e4c56a
Prometheus: Refactor labels caching (#20898) 2019-12-09 09:46:52 +01:00
Hugo Häggmark
58cffde0f2
e2e: Uses Cypress instead of Puppeteer (#20753)
* WIP: intial commit

* Tests: Runs e2e tests

* Refactor: Adds BASE_URL support

* Refactor: Adds namespacing

* Refactor: Cleans up the Page api

* Build: Adds to build-branches-and-prs job for testing

* Build: Hardcoded image for now

* Refactor: Uses Selectors in App

* Refactor: Adds addDataSource flow

* WIP

* Refactor: Adds e2eScenario

* Refactor: Adds add and delete scenarios

* Refactor: Adds logging

* Refactor: Adds ability to for Selectors with variables

* Refactor: Using variable selectors instead

* Refactor: Adds flow until Share Panel

* Refactor: Adds clicking on rendered image link

* Refactor: Deletes log output

* Refactor: Updates snapshots

* Chore: Reverts changes

* Refactor: Removes log plugin because maybe it breaks yarn build

* Refactor: Adds rendered image download

* Refactor: Adds image comparison

* Refactor: Removes uncaught errors override

* Refactor: Changes order of images to compare

* Refactor: Updates truth image

* Build: Updates path to CI artifacts

* Refactor: Cleaning up types and config

* wip

* Refactor: Cleans up external api

* Refactor: More cleanup

* Refactor: More cleanup

* Refactor: Removes usages of Pages and Flows

* Refactor: Removes last traces of Cypress in spec

* Refactor: Adds comments
2019-12-09 00:14:25 -08:00
Sofia Papagiannaki
4ad8b6f030 Elasticsearch: set default port to 9200 in ConfigEditor (#20948) 2019-12-07 21:50:54 -08:00
Ivana Huckova
23327fcdea
Loki: Remove appending of (?i) in Loki query editor if not added by user (#20908) 2019-12-06 18:04:13 +01:00
kay delaney
b4736558ac Datasource/Loki: Loki now goes to Logs mode when importing prom queries (#20890)
* Datasource/Loki: Loki now goes to Logs mode when importing prom queries
Closes #20831

* Fixes behavior and adds tests

* Update public/app/features/explore/state/actions.test.ts
2019-12-06 17:00:05 +01:00
David
ab3df98523
Cloudwatch: Defined explore query editor for cloudwatch (#20909)
* Defined explore query editor for cloudwatch

* Fix types
2019-12-06 16:04:31 +01:00
kay delaney
6f4f327887
Datasource/Loki: Empty metric name no longer replaced by query (#20924)
Closes #20762
2019-12-06 14:30:27 +00:00
Torkel Ödegaard
2a44cbd137
AngularPanels: Check for digest cycle on root scope (#20919) 2019-12-06 09:03:14 +01:00
Shavonn Brown
ced13da889 InfluxDB: Use new datasource update option funcs (#20907) 2019-12-06 08:57:05 +01:00
Torkel Ödegaard
a9bf8f80e9
Search: Fixed angular digest issues (#20906) 2019-12-05 19:17:26 +01:00
Erik Sundell
9d9f0e1b8c
Remove false positive error message for expression and id field (#20864) 2019-12-05 18:38:40 +01:00
Ivana Huckova
827688f152
Elastic: Fix multiselect variable interpolation for logs (#20894) 2019-12-05 11:55:03 +01:00
Torkel Ödegaard
20fad92a80
Singlestat: Fixed unit not showing and switched to new unit picker (#20892) 2019-12-05 11:54:14 +01:00
Torkel Ödegaard
87485e24a4
MetaAnalytics: Minor fix for meta analytics event (#20888)
* Minor fix for meta analytics event

* Fixed dashboardSrv issue

* Added timeSinceNavigationStart
2019-12-05 11:51:38 +01:00
Andrej Ocenas
c4c031ef43
Explore: Cleanup redundant state variables and unused actions (#20837) 2019-12-05 11:22:46 +01:00
kay delaney
880fbcb09a
Chore/Tech debt: Remove (most) instances of $q angular service use (#20668)
* Chore/Tech debt: Remove (most) instances of $q angular service use
Removes instances where the angular $q service is used and replaces
it with native Promises.
2019-12-05 09:04:03 +00:00
Torkel Ödegaard
62f0aca3e6
AngularPanels: Fixed loading spinner being stuck in some rare cases (#20878) 2019-12-05 08:59:07 +01:00
Hendrik van Huyssteen
9a7a1b86ee TeamPicker: Increase size limit from 10 to 100 (#20882) 2019-12-05 08:32:18 +01:00
Dominik Prokop
178bb1d3ab Echo: mechanism for collecting custom events lazily (#20365)
* Introduce Echo for collecting frontend metrics

* Update public/app/core/services/echo/Echo.ts

Co-Authored-By: Peter Holmberg <peterholmberg@users.noreply.github.com>

* Custom meta when adding event

* Rename consumer to backend

* Remove buffer from Echo

* Minor tweaks

* Update package.json

* Update public/app/app.ts

* Update public/app/app.ts

* Collect paint metrics when collecting tti. Remove echoBackendFactory

* Update yarn.lock

* Move Echo interfaces to runtime

* progress on meta and echo

* Collect meta analytics events

* Move MetaanalyticsBackend to enterprise repo

* Fixed unit tests

* Removed unused type from test

* Fixed issues with chunk loading (reverted index-template changes)

* Restored changes

* Fixed webpack prod
2019-12-05 08:30:39 +01:00
Torkel Ödegaard
4b8a50e70b StatPanel: change to beta 2019-12-04 21:34:33 +01:00
Shavonn Brown
2098b9eb44
Azure Monitor: Standardize Config Editor Implementation (#20455)
* initial changes - removal from state, remove anon functions, reset secrets empty

* post testing cleanup

* init promise cancellation, other cleanup

* workspaces response parser, remove version incrementing

* update datasource funcs - DRYer

* remove prop mutation

* func to modify root config opt

* fix version issue

* update snapshot
2019-12-04 14:35:53 -05:00
Marcus Andersson
5f72bfe6e7 GraphTooltip: added boundaries so we never render tooltip outside window. (#20874) 2019-12-04 18:08:49 +01:00
Dominik Prokop
ad33d95dd3 Graphite: Use data frames when procesing annotation query in graphite ds (#20857)
* Use data frames when procesing annotation query in graphite ds

* Remove destruct
2019-12-04 18:07:11 +01:00
Andrej Ocenas
4c9cb415ec Elastic: Fix parsing for millisecond number timestamps (#20290)
* Stop parsing 'field'

* Remove time field from query for docs queries

* Test refactor to test all versions

* Fix tests
2019-12-04 14:43:43 +01:00
Erik Sundell
e0229045f2
UI: Use SelectableValue as Segment value (#20867)
* Use SelectableValue for segment value

* Update cloudwatch components to use new segment props
2019-12-04 13:55:23 +01:00
kay delaney
b111fee642
Datasource/Loki: Fixes issue where time range wasn't being supplied with annotation query (#20829)
* Datasource/Loki: Fixes issue where time range wasn't being supplied with annotation query
Closes #20667

* Add test to verify new behavior

* Added end/start check to test
2019-12-04 12:43:22 +00:00
Andrej Ocenas
6682a36b8a
Explore: Fix reset reducer duplication (#20838) 2019-12-04 12:51:15 +01:00
kay delaney
02bbdca604
Datasource/Loki: Simplifies autocompletion (#20840)
Unifies loki autocomplete so behavior isn't different
across explore modes.
Closes #20769
2019-12-04 09:00:35 +00:00
Ryan McKinley
d7c76dacad ValueFormats: dynamically create units (#20763)
* update fixed

* update fixed

* update fixed

* don't change any tests

* add mising space

* Custom unit formats

* return a string for kbn

* return a string for kbn

* return a string for kbn

* Simplify unit tests

* More units

* fix more tests

* fix more tests

* fix more tests

* format values

* format values

* TimeSeries to string

* more kbn tests

* use the formatted value

* BarGauge: Fixed font size calculations

* support prefix

* add si support

* avoid npe

* BarGauge/BigValue: value formatting

* fix some tests

* fix tests

* remove displayDateFormat

* another unicode char

* Graph: Use react unit picker

* Updated unit picker

* Fixed build errors

* more formatting

* graph2 tooltip formatting

* optional chaining
2019-12-04 09:08:07 +01:00
kay delaney
a093fbb51a Migration: Migrate org switcher to react (#19607)
* Migration: Migrate org switcher to react

* Improve modal overflow behavior

* Updated modal backdrop

* Renamed type

* Modal: Refactoring and reducing duplication
2019-12-03 22:47:19 +01:00
Ivana Huckova
5a4465a382
Explore: Log message line wrapping options for logs (#20360) 2019-12-03 13:02:44 +01:00
Dominik Prokop
3f348287aa Fix prettier (#20827) 2019-12-03 10:23:41 +01:00
Ivana Huckova
45259f4362
Loki: Support for template variable queries (#20697) 2019-12-03 09:40:22 +01:00
Ivana Huckova
5710e52c11
Explore: Export timezone from redux state (#20812) 2019-12-03 09:38:47 +01:00
Peter Holmberg
aa9d00d019
OpenTsdb: Migrate Config Editor to React (#20808) 2019-12-03 08:56:05 +01:00
Philipp Nowak
64916cd7a9 TablePanel, GraphPanel: Exclude hidden columns from CSV (#19925)
* TablePanel: Don't include hidden columns in CSV export

Fixes #12076

* GraphPanel: Don't include hidden series in CSV export

Series are hidden if all values are zero/empty and the relevant graph
option is enabled as well. (e.g. "Hide series: With only nulls")

Fixes #12076
2019-12-02 21:58:36 +01:00
Ryan McKinley
e216044c75
DataFrame: add utilities to @grafana/data that support apache arrow (#20813) 2019-12-02 12:39:50 -08:00
Torkel Ödegaard
74ac73716f
Panels: Fixed transparency option for angular panels (#20814) 2019-12-02 20:28:38 +01:00
Ivana Huckova
e68e93f595
Chore: Move Prometheus datasorce tests from specs folder and merge duplicated test files (#20755) 2019-12-02 18:14:26 +01:00
kay delaney
68944f8286
Datasource/Loki: Fixes regression where enhanceDataFrame was not called (#20660)
* Datasource/Loki: Fixes regression where enhanceDataFrame was not called
Closes #20642
2019-12-02 12:05:40 +00:00
Christian Lamberty
6eb7813565 Graph-Panel: Center option for bar charts (#19723) 2019-12-01 22:53:29 -08:00
Torkel Ödegaard
8894e2858c
StatPanel: ColorMode, GraphMode & JustifyMode changes (#20680)
* StatPanel: Options rethink

* Changed options to string based

* -Fixed tests

* Refactoring moving files

* Refactoring alignment factors

* Added alignment factors

* Added basic test

* Added unit test for layout

* Font size handling

* Font sizing works

* Progress on sizing

* Updated

* Minor update

* Updated

* Updated

* Removed line option

* updated

* Updated

* Updated

* Updated

* Highlight last point

* Fixed tests

* Code refactoring and cleanup

* updated

* Updated snapshot
2019-12-01 17:02:44 +01:00
Dieter Plaetinck
67bfdaeb3c Graphite: Add metrictank dashboard to Graphite datasource (#20776)
Adds the latest metrictank dashboard (v0.13.1)
per https://github.com/grafana/metrictank/pull/1557
(same version lives on https://grafana.com/grafana/dashboards/279)

fixes #20658

Note: for older versions of metrictank, some metrics may be a bit
different and thus some charts might not work.
2019-11-29 12:40:02 -08:00
Peter Holmberg
b3816a2727 Navigation: Fix navigation when new password is chosen (#20747) 2019-11-29 07:38:03 -08:00
Andrej Ocenas
f2574f4944
Prometheus: Fix caching for default labels request (#20718) 2019-11-28 16:55:38 +01:00
Peter Holmberg
c5ff7fa580 ReactMigration: Migrate Graphite config page to React (#20444)
* adding configeditor

* fix method signature and add state for metrictankhelper

* fix onChangeHandler

* prettier fix

* remove config and fix autoversion

* adding optional parameter to make this build

* set default version if none specified

* Graphite: removed version detection
2019-11-27 15:45:35 -08:00
Erik Sundell
116b6188a6
CloudWatch: Region template query fix (#20661)
* Make region an optional parameter

* Test region template query
2019-11-27 17:06:11 +01:00
Hugo Häggmark
a538e67d4d
Tests: Skipping Template Variable tests for now (#20707) 2019-11-27 16:01:39 +01:00
kay delaney
d6ef02b3b3 Datasource/Loki: Fix issue where annotation queries weren't getting their variables interpolated (#20702)
Closes #20667
2019-11-27 15:58:21 +01:00
Hugo Häggmark
1751770394
Fix: Fixes templateSrv is undefined for plugins that do not use @@ngInject (#20696)
Fixes #20662
2019-11-27 12:48:56 +01:00
Erik Sundell
2929649fd4
CloudWatch: Annotations query editor loading fix (#20687)
* Re-adding lost import

* Make sure wildcard is not in annotations editor
2019-11-27 11:48:58 +01:00
David
c53ed5bbac
Loki: Fix query error for step parameter (#20607)
* Loki: Fix query error for step parameter

- Loki does not fully support float steps like prometheus and returns a
query error
- this change makes sure that the step parameter is rounded to an
integer

* Added test and comments
2019-11-26 05:43:24 -08:00
Peter Holmberg
cd07c3e652
Fix: Disable draggable panels on small devices (#20629)
* fix for draggable on mobile

* elaborate in code comment
2019-11-26 12:58:20 +01:00
kay delaney
514f2beafc
Chore: Remove several instances of non-strict null usage (#20563) 2019-11-26 09:01:32 +00:00
Torkel Ödegaard
665079dc8c
StatPanel: Rename singlestat2 to stat (#20651) 2019-11-25 16:13:14 -08:00
Torkel Ödegaard
65942efb95
Panels: Add support for panels with no padding (#20012)
* Panels: Added support to set panel padding to zero

* WIP: fullChromeControl work

* Tweaks to header position

* Reverted some overlay mechanic and now back to no title only

* Fixed test

* Fixed transparent flag

* Added show title

* Added font weight to value

* Reverted back to no padding option

* Fixed issue with border and width and height
2019-11-25 13:26:18 -08:00
Hugo Häggmark
2c2ed8371d
E2E: Adds tests for QueryVariable CRUD (#20448)
* WIP: Adds basic template variables CRUD start

* e2eTests: Adds aria-labels in VariableEditorCtrl

* Refactor: Simplifies a bit

* e2eTests: Adds first Template Variable CRUD for QueryVariable

* Tests: Adds ArrayPageOjbectType

* Tests: Adds createQueryVariable method

* Tests: Refactor CRUD test

* Tests: Adds datasource and dashboard to scenario

* Refactor: Fixes type errors

* Refactor: Move pages to toolkit
2019-11-25 07:29:01 +01:00
Torkel Ödegaard
6c50feb252 BarGauge/Gauge: Add back missing title option field display options (#20616)
Fixes #20615
2019-11-24 17:49:39 +01:00
Ryan McKinley
cbdca6cce8 VizRepeater/BarGauge: Use common font dimensions across repeated visualisations (#19983)
* calculate metrics

* fix tests

* update test

* update names

* BarGauge: measure title width

* BarGauge: added tests

* BarGauge: Improved font size handling

* Removed unused var

* BarGauge: Further font size tweaks

* BarGauge: added comments

* BarGauge: final tweak

* Updated snapshot*

* Fixed issues
2019-11-24 01:00:08 +01:00
Ivana Huckova
29b46f7a28
Explore: UI changes for split view and live tailing (#20516) 2019-11-22 12:26:14 +01:00
Ivana Huckova
c6a9a83bf3
Explore: Keep logQL filters when selecting labels in log row details (#20570) 2019-11-22 12:23:21 +01:00
Torkel Ödegaard
f47759b98e
TextPanel: Fixes issue with template variable value not properly html escaped (#20588)
* sanitize html after replacing variables

* TextPanel: Always html escape variable values
2019-11-22 10:28:54 +01:00
Ivana Huckova
569c81d07e
Explore: UI changes for derived fields (#20557) 2019-11-21 18:15:40 +01:00
kay delaney
fcad439c29
Chore: Remove angular dependency from prometheus datasource (#20536)
* Chore: Remove angular dependency from prometheus datasource
2019-11-21 15:36:56 +00:00
Lukas Siatka
4ddb113b79 Explore: updates responsive button to pass all the div element props 2019-11-21 15:06:16 +01:00
Łukasz Siatka
013179eebc Explore: fixes explore responsive button ref 2019-11-21 15:06:16 +01:00
Łukasz Siatka
1cc1e545a0 Explore: adds a ref to responsive button 2019-11-21 15:06:16 +01:00
Łukasz Siatka
231e620f95 Explore: updates responsive button to forward ref 2019-11-21 15:06:16 +01:00
Ivana Huckova
c9645a96c6
Explore: UI fixes for log details (#20485) 2019-11-21 13:18:29 +01:00
Eric Leijonmarck
f05607d4c0 UserTableView: Show user name in table view (#18108)
* refactor to multiple rows

* added name for org user struct

* added name getorgusers

* added user name to tableview

* made test pass

* updated userMocks to user name field

* added missing UsersTable snapshot

* added name on teammembers page, be able to search query for name, login and email

* added the updated snapshots

* conform to same sorting as output form

* conform to previous way of using it

* sort first by login and after by email, as it was before
2019-11-21 12:44:46 +02:00
Mitsuhiro Tanda
e33cf32b97 CloudWatch: enable min_interval (#20260) 2019-11-21 11:42:48 +01:00
Erik Sundell
22edacd4a8
Update dashboards (#20486) 2019-11-21 10:46:15 +01:00
Hugo Häggmark
e03d702d0c
Fix: Prevents crash when searchFilter is non string (#20526) 2019-11-21 06:21:36 +01:00
Peter Holmberg
d3d595a776
MySql: Fix tls auth settings in config page (#20501) 2019-11-20 14:33:10 +01:00
Erik Sundell
ec18e2bfc3
CloudWatch: Remove HighResolution toggle since it's not being used (#20440)
* Remove highres flag since it's not being used

* Remove not used code. Init id field correctly

* Fix broken tests

* Remove GMS related calculations

* Rename period field

* Add breaking changes to changelog. Also update upgrading docs

* Update snapshot

* Update docs after feedback

* Changes after feedback
2019-11-20 13:34:44 +01:00
Sofia Papagiannaki
d1c523838b
API: Optionally list expired keys (#20468)
* API: Optionally list expired keys

* Update docs
2019-11-20 13:14:57 +02:00
Torkel Ödegaard
322c110b89
TimePicker: Fixed update issue after plugin uses getLocationSrv().update (#20466)
* TimePicker: Fixed update issue after plugin uses getLocationSrv().update

* comment fix

* don't mess with the text panel
2019-11-19 21:19:10 +01:00
kay delaney
ca3dff99e8
Chore: Bumps prettier version for new typescript syntax support (#20463)
* Chore: Bumps prettier version for new typescript syntax support

* Ran new version of prettier against the codebase
2019-11-19 13:59:39 +00:00
Erik Sundell
38d5abfadb
CloudWatch: Make sure period variable is being interpreted correctly (#20447)
* Make sure variable is interpreted before parsing int

* Use correct datatype in tests
2019-11-19 12:36:50 +01:00
Torkel Ödegaard
785584a690
UsersPage: Removed icon in external button (#20441) 2019-11-19 09:28:17 +01:00
Gabriel Kent
836cf8e639 Dashboard Migrator: persist thresholds param if already set (#20458) 2019-11-18 19:45:12 -08:00
Shavonn Brown
eadf324062 InfluxDB: convert config editor to react (#20282)
* convert config editor to react

* tests and some cleanup

* test

* snaps

* updating per comments

* remove anonymous funcs, remove config from state

* remove unecessaries
2019-11-18 09:39:58 +01:00
kay delaney
e0a2d4beac Grafana/Loki: Adds support for new Loki endpoints and metrics (#20158)
* Grafana/Loki: Adds support for new Loki endpoints and metrics

* Adds `/loki/` prefix to new loki endpoints and updates response interfaces

* Improved legacy support

* Removed changes related to plugin.json and added Loki-specific hacks

* Fixes live streaming for legacy loki datasources
2019-11-15 16:38:25 +01:00
kay delaney
1248457fee
Chore: Fix error caused by typescript upgrade (#20408) 2019-11-15 10:13:49 +00:00
kay delaney
f1c8330877
Chore: Upgrade typescript to 3.7 (#20375)
* Chore: Upgrade typescript to 3.7
2019-11-15 09:18:09 +00:00
Dominik Prokop
d602da20f6
Fix flot overriding onselectstart/ondrag events (#20381) 2019-11-15 09:21:45 +01:00
kay delaney
4483bcadec
Chore: Move and wrap Cascader component to @grafana/ui (#20246)
* Chore: Move and wrap Cascader component to @grafana/ui
Closes #19042

* Removes unneeded props from interface and removes rc-trigger

* Removes more unneeded props
2019-11-14 10:26:42 +00:00
Erik Sundell
00bef917ee
CloudWatch: Datasource improvements (#20268)
* CloudWatch: Datasource improvements

* Add statistic as template variale

* Add wildcard to list of values

* Template variable intercept dimension key

* Return row specific errors when transformation error occured

* Add meta feedback

* Make it possible to retrieve values without known metrics

* Add curated dashboard for EC2

* Fix broken tests

* Use correct dashboard name

* Display alert in case multi template var is being used for some certain props in the cloudwatch query

* Minor fixes after feedback

* Update dashboard json

* Update snapshot test

* Make sure region default is intercepted in cloudwatch link

* Update dashboards

* Include ec2 dashboard in ds

* Do not include ec2 dashboard in beta1

* Display actual region
2019-11-14 10:59:41 +01:00
Lukas Siatka
adc84c6ac5 Explore: updates breakpoint used to collapse datasource picker 2019-11-13 12:01:19 +01:00
Ivana Huckova
822b0b2708
Elastic: Fix Elastic template variables interpolation when redirecting to Explore (#20314) 2019-11-13 10:41:57 +01:00
Torkel Ödegaard
6959cf77ca
Links: Updated links to grafana.com (#20320)
* Links: Updated links to grafana.com

* Updated snapshot
2019-11-12 19:26:44 +01:00
Torkel Ödegaard
b756aa0bb1
Prometheus: Adds hint support to dashboard and fixes prometheus link in query editor (#20275)
* Prometheus: moved hints into query editor, and fixed missing refIds in responses

* Minor fix

* Removed unused type import
2019-11-11 16:47:17 +01:00
Ivana Huckova
78520ac3d1
Explore: Fix always disabled QueryField for InfluxDB (#20299) 2019-11-11 16:34:37 +01:00
Andrej Ocenas
a08c2c43db
Explore: Fix interpolation of error message (#20301) 2019-11-11 16:29:11 +01:00
Torkel Ödegaard
6f3f0bf3e0
PanelLinks: fixed issue with old panel links and grafana behind a subpath (#20298) 2019-11-11 12:18:58 +01:00
Torkel Ödegaard
dd6f5efabe
Templating: Made default template variable query editor field a text area with dynamic automatic height (#20288) 2019-11-11 10:04:22 +01:00
Ryan McKinley
8430a182ef
Transformations: filter results by refId (#20261) 2019-11-08 11:47:35 -08:00
Torkel Ödegaard
767c672a2f
PanelData: Support showing data and errors in angular panels (#20286) 2019-11-08 16:38:43 +01:00