Commit Graph

11233 Commits

Author SHA1 Message Date
Tobias Skarhed
768911a6f9
Migration: Invite Signup (#22437)
* Inital commit with new page

* Make routing work

* Correct field

* Move submit button and fix routing after signup

* Remove comments

* Fix feedback

* Undo mistake
2020-02-28 15:45:00 +01:00
Agnès Toulet
1db26d354f
Core: add hideFromMenu for child items (#22494) 2020-02-28 15:09:55 +01:00
lfroment
72628c8ea0
Dashboard: Adds support for a global minimum dashboard refresh interval (#19416)
This feature would provide a way for administrators to limit the minimum 
dashboard refresh interval globally.
Filters out the refresh intervals available in the time picker that are lower 
than the set minimum refresh interval in the configuration .ini file
Adds the minimum refresh interval as available in the time picker.
If the user tries to enter a refresh interval that is lower than the minimum 
in the URL, defaults to the minimum interval.
When trying to update the JSON via the API, rejects the update if the 
dashboard's refresh interval is lower than the minimum.
When trying to update a dashboard via provisioning having a lower 
refresh interval than the minimum, defaults to the minimum interval 
and logs a warning. 

Fixes #3356

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-02-28 14:32:01 +01:00
Torkel Ödegaard
c002a39456
NewPanelEditor: Angular panel options, and angular component state to redux major change (#22448)
* NewPanelEdit: Added angular options to new panel editor and started looking and angular component state

* Moved angular component state to redux

* Close to working 100%

* Think everything is working

* AlertTab: Alert tab now gets angularComponent from redux

* Fixed panel menu access to angular panel component

* Added new tests

* Fixed unit test

* Fixed strict null errors

* Fixed typescript issues

* fixed issues
2020-02-28 11:04:40 +01:00
Agnès Toulet
646b74efbb
Icons: add reports icon (#22445) 2020-02-28 09:51:03 +01:00
Peter Holmberg
3f7b058bea
Panel inspect: Horizontal scrolling in Data table (#22245)
* First try at horizontal scrolling

* move width logic to table

* Update packages/grafana-ui/src/components/Table/Table.tsx

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

* wrap table with memo

* fix typo

* re add field

* WIP: Table scrolling troubles

* Annother approach

* Think it's working

* Removed unnessary change

* Table: Added custom scrollbar for horizontal scrolling

* Removed console log and fixed test

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-02-28 09:26:20 +01:00
Vikky Omkar
066d5cf4da
Alerting: Fixed the issue/bug of diff and percent_diff functions *Breaking change* (#21338)
fixes #16270 #10129
2020-02-27 20:25:03 +01:00
Torkel Ödegaard
712253fbee
NewPanelEditor: Wait a bit before resending query result on panel editor exit (#22421) 2020-02-26 13:39:23 +01:00
Torkel Ödegaard
9272af264a
NewPanelEditor: Panel edit tweaks (#22415)
* NewPanelEditor: Alternative edit layout

* Fixed full height issue

* panel-edit-tabs experiment

* minor tweaks

* PanelEditor: Minor tweaks
2020-02-25 17:58:20 +01:00
Agnès Toulet
1dd404a1fb
Core: Make application title customizable for WL (#22401)
* Core: Add custom app title

* Docs: Update White Labeling title customization

* Core: set back export for Branding types
2020-02-25 15:18:37 +01:00
Marcus Andersson
12f1af2956
Fix: Added missing "remove"-icon for light theme. 2020-02-25 14:43:15 +01:00
Agnès Toulet
d3c50692c0
Admin: fix images on license page (#22413) 2020-02-25 12:06:46 +01:00
Torkel Ödegaard
5b40b26744
UX: BackButton left arrow icon (#22369)
* Adding new svg for back arrow button

* Created new back button component

* same stroke width

* minor fix

* Style changes

* hover animation

* Minor tweak
2020-02-22 22:13:56 +01:00
Torkel Ödegaard
1f4a04436c
NewPanelEditor: Fixed cleanup that could cause crash (#22384)
* NewPanelEditor: Fixed cleanup that could cause crash

* Fixed unit test
2020-02-22 21:08:42 +01:00
Torkel Ödegaard
c79e7afcbd
Theme: Fixed bug in sass file (#22382) 2020-02-22 16:01:04 +01:00
Roman Misyurin
e7244f0f8a
DashLinks: Add pull right to dropdown menu (#22233) 2020-02-20 10:02:13 +01:00
Tobias Skarhed
d2689b6d6c
Migration: User invite (#22263)
* Add new form and functionality

* Add new files

* Connect to Redux and add navigation stuff

* Add required login/name

* Remove import

* Fix feedback

* Replace direct button spacing with HorizontalGroup

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-02-20 08:01:14 +01:00
Miguel Carvajal
49fe4ff69e
Annotations: Call panel refresh when table transform changes to annotations (#22323) 2020-02-20 07:11:42 +01:00
Torkel Ödegaard
0dbe5323d7
PanelInspector: Fixed issue in panel inspector (#22302) 2020-02-19 14:39:44 +01:00
Torkel Ödegaard
a45794d0ec
FieldConfigs: String select type & cell display mode added to table panel (#22274)
* FieldConfigs: Added string select field config

* FieldConfigs: Added string select field config

* Changed to generic select type
2020-02-19 11:30:19 +01:00
Torkel Ödegaard
e591fbc322 LinkSrv: Add newlines so I can read code 2020-02-19 09:18:50 +01:00
Torkel Ödegaard
7acea5b3fa
NewPanelEdit: Add back datalinks and new table panel fix (#22267)
* NewPanelEditor: Add back data links

* Made custom table options work in table panel
2020-02-18 17:08:39 +01:00
Sebastian Poxhofer
4cf765839a
Prometheus: Implement region annotation (#22225) 2020-02-18 16:10:15 +01:00
Andrej Ocenas
934d93ad94
Elastic: Map level field based on config. (#22182)
* Map level field based on config.

* Fix type
2020-02-17 16:49:24 +01:00
Tobias Skarhed
0c4dae321c
Migrations: Signup page (#21514)
* Start Angular migration

* Add SignupCtrl

* Change name signup

* Add backend call

* Put form in separate file

* Add form model

* Start using react-hook-forms

* Add FormModel to state

* Reduxify

* Connect nav with Redux

* Fix routing and navModel

* Fetch state options on mount

* Add default values and add button margin

* Add errror messages

* Fix title

* Remove files and cleanup

* Add Signup tests

* Add boot config assingnAutoOrg and verifyEmailEnabled

* Remove onmount call

* Remove ctrl and move everything to SignupForm

* Make routeParams optional for testing

* Remove name if it is empty

* Set username

* Make function component

* Fix subpath issues and add link button

* Move redux to SignupPage
2020-02-17 11:13:13 +01:00
Torkel Ödegaard
d9414b4693
NewPanelEditor: Making angular panels reuse data and render on edit mode enter (#22229)
* First stab at angular panels load in new edit

* Things are working
2020-02-17 07:28:53 +01:00
Torkel Ödegaard
bfa959c66a
PanelEdit: Title tweaks (#22237) 2020-02-17 07:28:00 +01:00
Torkel Ödegaard
5396c9ef92
NewPanelEdit: Minor changes (#22239) 2020-02-17 07:27:21 +01:00
Torkel Ödegaard
4ca3967091
Chore: Fixed strict null errors (#22238) 2020-02-17 07:25:27 +01:00
Torkel Ödegaard
f1ecaa5d45
NewPanelEditor: Thresholds v2 (#22232)
* initial wip

* Progress on new threshold design

* Testing radio button group for mode option

* Starting to come together

* Fixed percent mode

* Full width radio groups

* Minor tweaks, cursor to trash icon and hover state

* fixed unit tests

* Fixed storybook

* re-ordering fields

* Updated snapshot

* Make it consistent, add vs create
2020-02-17 06:57:10 +01:00
Ryan McKinley
cc589a0d76
Inspector: find the datasource from the refId, not the metadata (#22231)
* remove datasource

* get datasoure from refId

* metrictank does not need to say the datasource
2020-02-16 05:12:40 -08:00
Dominik Prokop
131a3248ba
New panel editor: Persist panel editor ui state (#22210) 2020-02-15 11:31:11 -08:00
Lukas Siatka
fd44abd177
DevEnv: update frontend dependencies - tests (#22140)
* DevEnv: updates @types/testing-library__react-hooks 3.1.0 -> 3.2.0

* DevEnv: updates @types/enzyme-adapter-react-16 1.0.5 -> 1.0.6

* DevEnv: updates @types/react-test-renderer 16.9.0 -> 16.9.2

* DevEnv: updates react-test-renderer 16.9.0 -> 16.12.0

* DevEnv: updates @types/enzyme 3.9.0 -> 3.10.5

* DevEnv: updates enzyme-adapter-react-16 1.0.6 -> 1.15.2

* DevEnv: updates enzyme 3.9.0 -> 3.11.0

* Fix: updates snapshots

* Fix: updates tests

* DevEnv: updates enzyme-to-json 3.3.5 -> 3.4.4

* DevEnv: updates expect.js 0.2.0 -> 0.3.1

* DevEnv: updates @types/puppeteer-core 1.9.0 -> 2.0.0

* DevEnv: updates puppeteer-core 1.15.0 -> 2.1.1

* DevEnv: updates @types/expect-puppeteer 3.3.1 -> 4.4.0

* DevEnv: updates expect-puppeteer 4.1.1 -> 4.4.0

* DevEnv: updates mocha 4.1.0 -> 7.0.1
2020-02-14 15:16:07 +01:00
Dominik Prokop
fa34a7692e
Make Explore panel link work when grafana served from sub url (#22202)
* Make explore url work when grafana served from sub url

* Update public/app/core/utils/explore.ts
2020-02-14 15:13:49 +01:00
Peter Holmberg
0cde7decd7
Inspect: Inspect header design update (#22120)
* first things

* rename

* add stats, remove table related changes

* header size and expand icon

* add case for nan request time

* fixing null checks

* reverting changes to table

* fix background on header

* Some small fixes after review

* do not use formInputBg
2020-02-14 14:14:37 +01:00
Dominik Prokop
e846a26c8c
FieldOverrides: FieldOverrides UI (#22187) 2020-02-14 13:46:08 +01:00
Ryan McKinley
2c9b321c48
FieldOverides: apply field overrides based on configuration (#22047)
* test apply

* test apply

* Move standard field config editor registry to grafana-data

* merge master

* Apply field config defaults

* Make field and dataFrameIndex optional on on FieldOverrideContext

* Apply custom field config overrides

* Gauge - make sure thresholds are set

* Move series and field scoped vars calculation

* Enable template variables interpolation in title fields

* Expose standars field configs from grafana ui via function

* Add missing option to the config for the min value to be derived from field values

* Fix ts issue

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-02-13 21:37:24 +01:00
Torkel Ödegaard
e1d5cfbd20 Dashboard: fixed padding inconsistency 2020-02-13 19:32:28 +01:00
Hugo Häggmark
335b1a8983
BackendSrv: Fixes a stupid mistake with a missing return (#22177) 2020-02-13 16:08:41 +01:00
Torkel Ödegaard
70b0ec65b3
PanelEdit: Fixed timing and state related issues (#22131)
* PanelEdit: Fixed timing and state related issues

* Added unit test and changed some logic

* Fixed id logic

* Updated snapshots

* Update public/app/features/dashboard/state/PanelModel.ts

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

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-02-13 16:06:45 +01:00
Andrej Ocenas
9c55500cc0
Elastic: Replace range as number not string (#22173) 2020-02-13 16:00:01 +01:00
Torkel Ödegaard
ba7c931286
e2e: Fixed issue with aria label (#22166)
* e2e: Fixed issue with aria label

* removed ini
2020-02-13 13:14:55 +01:00
Peter Holmberg
e5df200893
Fix: Do not remove whitespace in PanelLink url (#22087)
* remove whitespace replace

* readd replace newline

* adding a test
2020-02-13 11:32:18 +01:00
kay delaney
0d5c1e1bc7
React Migration: Migrates FolderPicker from angular to react (#21088)
* Angular/React: Migrates FolderPicker from angular to react

* move to core

* snap

* minor changes

* more removes

* Managing creating new and saving in movetofolderctrl

* Do not use new forms.field, fix select menu

* FolderPicker responsible to creating new folder

* create new as prop

* snap

* remove unnecessary things

* remove console log

* snap

* fix null checks

* add search debouncing

* set folder to state, null check

* typing folder

* adding case for loadOptions

* snap

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2020-02-13 11:13:03 +01:00
twendt
ff6a082e23
Auth: Azure AD OAuth (#20030)
* Implement Azure AD oauth

* Use go-jose and cleanup

* Update go-jose in go.mod

* cleanup

* Add unit tests

* Fix scopes

* Add documentation page

* Improve documentation

* Convert extract_role into function.

* Do not use upn and replace unique_name with preferred_username

* Configure login button

* Use official microsoft icon and color from branding guideline.

* Add Azure AD config section in sample.ini.
2020-02-13 12:12:25 +03:00
Lukas Siatka
9ed08d1903
Bugfix: updates cloudwatch query editor test async render to prevent it from throwing error (#22150) 2020-02-13 09:07:33 +01:00
Torkel Ödegaard
6d879a0227
NewPanelEdit: Design tweaks (#22156)
* NewPanelEdit: minor design tweak

* Updated
2020-02-13 09:01:03 +01:00
Diana Payton
8641b91389
TestData: Update streaming.json (#22132)
Changed `graph2` to `graph` in two places.
2020-02-13 06:29:36 +01:00
Ivana Huckova
2be4d8dfd0
Explore: Refactor active buttons css (#22124) 2020-02-12 20:11:40 +01:00
kay delaney
003fb4a3d0
Datasource/Loki: Fixes issue where live tailing displayed date as invalid (#22128)
Closes #21929
2020-02-12 17:44:26 +00:00
Torkel Ödegaard
cfe30080e4
NewPanelEditor: Fixed issue going back to dashboard after pull page reload (#22121)
* Fixed issue going back to dashboard

* fixed logic

* Fixed unit test

* Fixed unit test
2020-02-12 18:36:32 +01:00
Ivana Huckova
1448767c08
Loki, Prometheus: Fix PromQL and LogQL syntax highlighting (#21944)
* Loki, Prometheus: Fix syntax to not highlight # in quotes as a comment in queryField

* Loki, Prometheus: Fix syntax to not highlight # in quotes as a comment in queryField

* Fix regex

* PromQL, LogQL: Update syntax

* LogQL, PromQL highlighting: Add tests
2020-02-12 15:45:36 +01:00
Torkel Ödegaard
fa1602daea
NewPanelEdit: Added visualization tab / selection view (#22117)
* NewPanelEdit: Added visualization tab

* Minor fix
2020-02-12 12:54:58 +01:00
Torkel Ödegaard
df1d43167a
NewPanelEditor: Panel editor tabs in state (url) (#22102)
* tabs & style tweaks

* Styling updates

* ok look

* tweaks

* Updated snapshots

* Moved transforms

* Updated
2020-02-12 10:42:57 +01:00
Hugo Häggmark
8264b220c5
Annotation & Alerts: Makes various annotation and alert requests cancelable (#22055)
* Annotations: Makes various annotation and alert calls cancelable
Fixes #21943

* Refactor: Uses backendSrv.get method with requestId instead

* Update public/app/features/annotations/annotations_srv.ts

Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-02-12 09:37:36 +01:00
Alex Khomenko
ec0051c075
Fix/add width to toggle button group (#21924)
* Grafana-UI: Add option to customize ToggleButtonGroup's width

* Grafana-UI: Add an option to customize TimeOfDayPicker width via width prop

* Grafana-UI: Add comment

* Grafana-UI: Switch width to size for TimeOfDayPicker

* Cleanup merge
2020-02-11 16:47:52 +02:00
Torkel Ödegaard
fee18f143e
NewPanelEditor: Introduce redux state and reducer (#22070)
* New panel editor redux

* minor change

* Updated

* progress

* updated

* Fixed panel data mutable issue

* more actions

* Discard works

* Updated

* Updated
2020-02-11 14:57:16 +01:00
Bruce Merry
02c779cfa3
Prometheus: make $__range more precise (#21722)
* Make $__range more precise in Prometheus

It is now always equivalent to `${__range_s}s`, rather than rounding
down to an integer multiple of the biggest possible unit. For example,
a range of 47 hours is now represented as `169200s` rather than `1d`.

Closes #21689.

* Update a unit test to match new __range calc
2020-02-11 14:28:06 +01:00
Dominik Prokop
e612d7a2f9
New panel edit: data links edit (#22077)
* Move data links suggestions to grafana-data

* Data links -  field config and overrides

* Lint

* Fix test

* Add variable suggestions  to field override context

* Revert "Move data links suggestions to grafana-data"

This reverts commit 5d8d01a65e.

* Move FieldConfigEditor to core
2020-02-11 13:48:36 +01:00
Alex Khomenko
e07e03c26d
Read target prop from the links in the footer (#22074)
* Grafana-core: Read target prop from the links in footer instead of having them hardcoded

* Grafana-core: Update ServerStats snapshot
2020-02-11 14:00:06 +02:00
Hugo Häggmark
747b546c26
Chore: Adds cancellation to backendSrv request function (#22066)
* Chore: Adds cancellation to backendSrv request function

* Refactor: Corrects typing for requestId
2020-02-10 15:14:53 +01:00
Torkel Ödegaard
49407987fe
Dashboard: Move some plugin & panel state to redux (#22052)
* WIP: dashboard panel redux

* Progress

* Progress

* Changing plugin type

* Progress

* Updated

* Progess

* Fixed timing issue

* Updated

* Fixed unit tests

* Fixed issue in dashboard page

* Updated test
2020-02-10 14:23:54 +01:00
Hugo Häggmark
0b082e8768
Chore: Fixes non utc tests (#22063) 2020-02-10 13:15:30 +01:00
Dominik Prokop
dd37d003ef
Links: Assure base url when single stat, panel and data links are built (#21956)
* Assure base url when single stat, panel and data links are built

* Update public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx

* Update public/app/features/panel/panellinks/link_srv.ts

* Update public/app/features/panel/panellinks/link_srv.ts

* Update public/app/features/panel/panellinks/link_srv.ts

* Update public/app/features/panel/panellinks/link_srv.ts

* Review updates

* Remove unnecessary code
2020-02-10 12:45:15 +01:00
Hugo Häggmark
cd6809685f BackendSrv: Returns correct error when a request is cancelled (#21992)
Fixes #21991
2020-02-10 06:29:52 +01:00
Dominik Prokop
31101d54a4
Make zoom and time shift work after emmitter change (#22051) 2020-02-09 19:19:44 +01:00
Ryan McKinley
34b52cb835
New Editor: refresh when time values change (#22049) 2020-02-09 18:48:14 +01:00
Ryan McKinley
bedc708dfa Collapse: add a controlled collapse (#22046) 2020-02-09 17:39:26 +01:00
Ryan McKinley
e9c6c040da
New Editor: add display modes to fix ratio with actual display (#22032)
* add mode picker

* ratio cleanup

* add siebar toggle

* use secondary button

* use cog icon

* cleanup

* full to fill

* Portaling for Select

* Centering container for panel edit

* Panel editor tabs

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-02-09 15:39:46 +01:00
Ryan McKinley
08a4317b46
DashNavTimeControls: remove $injector and rootScope from time picker (#22041) 2020-02-09 14:36:49 +01:00
Dominik Prokop
1728742096 New panel edit: field overrides ui (#22036)
* Add title editor

* Wip

* FIeld config overrides UI (v1)

* Basic property override editors

* name to prop

* use prop not path

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-02-09 14:34:42 +01:00
Torkel Ödegaard
34c397002c PanelChrome: Use react Panel Header for angular panels. (#21265)
* WIP: Angular panel chrome, this is going to be tricky

* AngularPanelChrome: initial render works

* Options are showing up

* viz options working

* Fixed singlestat background

* AngularPanels: Fixed alert tab

* Removed anuglar loading spinner

* Dashboard: Refactor dashboard reducer & actions

* Dashboard: minor refactoring

* PanelChrome: loading state moved to header

* Subscribe to render events to solve title update issue

* Time info and query errors now works

* PanelHeader: unifying angular and react behavior

* added getPanelMenu test

* Scrollable now works again

* Various fixes

* Making stuff work

* seperate event emitter for angular

* Fixed issue sending updated dimensions to angular panel

* Minor tweaks

* Fixed tests

* Alerting: alert state now works

* Fixed unit tests

* Fixed a few null check errors

* Simplified events handling

* Fixed strict null checks
2020-02-09 10:53:34 +01:00
Ryan McKinley
2feaad8b0d
New Editor: add a tabs row for the query section (#22037) 2020-02-09 10:50:58 +01:00
Torkel Ödegaard
a58d2b87f8 Dashboard: Refactor dashboard reducer & actions (#22021)
* Dashboard: Refactor dashboard reducer & actions

* Dashboard: minor refactoring

* Minor cleanup
2020-02-09 09:45:50 +01:00
Dominik Prokop
b8e68efe70 New panel editor: Add title editor (#22030) 2020-02-08 19:31:17 +01:00
Ryan McKinley
da395729c3 FieldEditor: extendable FieldConfig UI (#21882)
* initial POC

* fix import

* field config editor in the sidebar

* field config editor in the sidebar

* field config editor in the sidebar

* sidebar

* include threshold in sidebar

* include threshold in sidebar

* include threshold in sidebar

* init to empty threshold

* merge

* Make sure editor is fully rendered when page is refreshed

* use scrollbars

* add matcher UI folder

* remove

* Field options basic editors

* Removed deebugger

* Make number field editor controlled

* Update public/app/features/dashboard/state/PanelModel.ts

* Update public/app/plugins/panel/gauge/GaugePanel.tsx

* Ready for production

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-02-08 18:29:09 +01:00
Dominik Prokop
3617e59548 New panel edit: support scrolling (#22026)
* Make new edit work again

* Add custom scrolls

* better merge

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-02-08 14:12:02 +01:00
Ryan McKinley
e7710f0c66
Thresholds: get theme from context automatically (#22025)
* get theme from context for thresholds

* remove theme

* use theme context

* remove theme from gauge/bargauge
2020-02-08 13:59:26 +01:00
Dominik Prokop
e17b76ad7a
New Panel Edit: works for panels with and without queries (#22024)
* Make new edit work again

* add cx

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-02-08 13:23:16 +01:00
Ryan McKinley
a51ac787c0
PanelEditor: use splitpane for new editor (#22022)
* use splitpane for new editor

* change header

* use back button icon

* adding react split
2020-02-08 12:01:09 +01:00
Steven Vachon
f48169633c
TSLint → ESLint (#21006)
* Alphabetized tslint and tsconfig files

* Optimized tsconfig files

* Optimized editorconfig & prettier config files

… to reduce redundancy

* Switched to @grafana/tsconfig

… and:
* de-duped options
* removed options with default values

* Fixed nasty issue with types for nested slate-react

* Replaced TSLint with ESLint

* TSLint disables → ESLint disables

… also JSHint removals, which haven’t had an affect since it was replaced with TSLint.

* Compliances for ESLint, Prettier and TypeScript

* Updated lockfile
2020-02-08 02:40:04 +01:00
Dominik Prokop
9b6a843177
New panel edit: don't query when entering edit mode (#21921)
* First attempt

* Save confirmation with discard option, reusing queriess a little bit differently

* simplify cloning panels and restoring last results in panel query runner

* Remove save button

* Update public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx

* Exit/discard buttons

* Update snaps

* Review comments

* Fix lint
2020-02-07 14:59:04 +01:00
Dominik Prokop
4b271f27fb
Fix bad grammar in Dashboard Link page (#21984) 2020-02-06 19:23:38 +01:00
Ed Welch
f2c3d23140
Prometheus: Allow sub-second step in the prometheus datasource (#21861) 2020-02-06 15:28:20 +01:00
Lukas Siatka
2d3c5064e1
Datasource: updates PromExploreQueryEditor to prevent it from throwing error on edit (#21605)
* Datasource: updates PromExploreQueryEditor - rewrite to functional component

* Datasource: updates PromQueryField - moves an extra field from children to the separate prop

* Datasource: adds PromExploreExtraField

* Datasource: updates PromExploreQueryEditor - fixes typo

* Datasource: updates prometheus explore editor snapshots

* Datasource: updates PromExploreExtraField export

* Datasource: removes unnecessary div from PromExploreQueryEditor

* Datasource: adds basic PromExploreExtraField snapshot test

* Datasource: adds basic PromExploreQueryEditor test

* Datasource: updates PromExploreQueryEditor snapshot to fix timezone issues

* Datasource: updates PromExploreQueryEditor - onChangeQueryStep cleanup

* Datasource: updates PromExploreQueryEditor test to check ExtraFieldElement render

* Datasource: simplified PromExploreQueryEditor onStepChange method

* Datasource: updates Prometheus module import

* Datasource: updates PromExploreQueryEditor test

* Datasource: updates PromExploreQueryEditor tests

* Datasource: fixes PromExploreQueryEditor error on empty interval init

* Datasource: adds a tooltip to PromExploreExtraField mounted in PromExploreQueryEditor

* Datasource: updates PromExploreQueryEditor snapshots
2020-02-06 12:37:30 +00:00
Lukas Siatka
df48d1c19f
Explore: Adds Loki explore query editor (#21497)
* Explore: updates grafana-data explore query field props with explore mode

* Explore: updates query row to pass down explore mode to query fields

* Explore: adds LokiExploreQueryEditor

* Explore: updates loki query field form to render children

* Explore: adds loki explore extra field component

* Explore: adds extra field element to loki query field form

* Explore: updates loki explore query editor to use extra field element

* Explore: moves ExploreMode to grafana-data

* Explore: updates query row limit string

* Explore: adds maxLines to DataQuery

* Explore: adds maxLines to loki datasource runRangeQueryWithFallback

* Explore: adds onChangeQueryLimit to LokiExploreQueryEditor

* Explore: updates loki explore query editor to render extra field only in logs mode

* Explore: fixes query limits for live and legacy queries

* Explore: fixes result processor max lines limit in get logs result

* Explore: fixes Loki datasource limit test

* Explore: removes unnecessary ExploreMode from Loki language provider

* Explore: fixes formatting

* Explore: updates grafana-data datasource types - replaces strings with explore mode enum

* Explore: updates loki explore query field props to take ReactNode

* Explore: updates the way we calculate loki query lines limit to fall back to 0 lines on negative or invalid input instead of datasource maxLines

* Explore: updates result processor get logs result method to avoid counting invalid/negative line limits

* Explore: updates loki result transformer to process only an appropriate slice of a result instead of an entire one

* Explore: adds a method for query limit preprocessing/mapping

* Explore: updates loki datasource run range query with fallback method to use options.maxDataPoints in dashboards

* Explore: removes unnecessary maxlineslimt from getLogsResult in resultProcessor

* Explore: moves line limit to metadata

* Explore: adds an ability to specify input type of extra field

* Explore: updates LokiExploreQueryEditor - adds an input type

* Explore: updates LokiExploreQueryEditor to run queries when maxLines is positive

* Explore: fixes failing import of ExploreMode

* Explore: fixes reducers test imports formatting

* Explore: updates Loki extra field with min value set to 0

* Explore: exports LokiExploreExtraFieldProps

* Explore: adds render test of LokiExploreQueryEditor

* Explore: adds LokiExploreQueryEditor snapshot

* Explore: updates LokiExploreQueryEditor onChangeQueryLimit method to prevent it from running when query input is empty - fixes cheatsheet display issue

* Explore: updates Loki editor snapshots

* Explore: fixes typo in test set name in LokiExploreQueryEditor

* Explore: adds a render test of LokiExploreExtraField

* Explore: fixes typo in LokiExploreQueryEditor

* Explore: updates LokiExploreQueryEditor snapshot due to timezone issues

* Explore: updates LokiExploreExtraField to export both functional component and a version using memo

* Explore: updates LokiExploreQueryEditor to export both functional component and memoized function

* Explore: updates LokiExploreQueryEditor - removes unnecessary react fragment

* Explore: updates LokiExploreQueryEditor snapshot

* Explore: adds LokiExploreQueryEditor tests for different explore mode cases

* Explore: fixes Loki datasource and result transformer

* Explore: updates LokiExploreQueryEditor snapshot

* Explore: updates LokiExploreQueryEditor tests and test setup

* Explore: updates LokiExploreQueryEditor - refactors component

* Explore: updates LokiExploreQueryEditor to use default import from LokiExploreExtraField

* Explore: updates LokiExploreQueryEditor snapshot

* Explore: fixes formatting

* Explore: updates LokiExploreQueryEditor max lines change

* Explore: updates LokiExploreQueryEditor tests checking ExtraFieldElement

* Explore: adds mock loki datasource to LokiExploreQueryEditor

* Explore: updates LokiExploreQueryEditor test mock - adds language provider

* Explore: updates LokiExploreQueryEditor snapshot

* Explore: updates Loki ResultTransformer to filter out rows on limit - logic to be moved into a component with new form styles

* Explore: updates LokiExploreQueryEditor tests
2020-02-06 12:34:52 +00:00
Huan Wang
8b632ac029
Prometheus: Do not show rate hint when increase function is applied (#21955) 2020-02-06 12:56:53 +01:00
Ivana Huckova
89d1ab37de
Elastic: Limit the number of datapoints for the counts query (#21937) 2020-02-06 11:06:26 +01:00
Hugo Häggmark
26d71c90f5
Prometheus: Fixes default step value for annotation query (#21934)
Fixes #21914
2020-02-05 16:40:37 +01:00
Dominik Prokop
90d415861d
Dashboard edit: Fix 404 when making dashboard editable 2020-02-05 13:29:11 +01:00
Erik Sundell
78b1ab8360
Fix formatting (#21894) 2020-02-04 14:16:56 +01:00
Alex Khomenko
3d8317a747
Fix/add default props to prom query editor (#21908)
* Plugins: Add default query to PromQueryEditor

* Plugins: Update PromQueryEditor snapshot

* Plugins: Use Partial for default PromQuery
2020-02-04 11:37:18 +02:00
Edgar Orendain
bb8e15ceab
Graph Panel: Fixed typo in thresholds form (#21903) 2020-02-04 10:04:21 +01:00
Tobias Skarhed
959c49f6d8
Disable logging in button (#21900) 2020-02-04 09:41:11 +01:00
Adrien F
5c89a8451e
DatasourceEditor: Add UI to edit custom HTTP headers (#17846)
* DatasourceEditor: Add UI to edit custom HTTP headers

Support for custom headers was added in #11643 but was missing in the UI.

Fixes #12779

* Review

* Layout updates

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-02-04 09:25:10 +01:00
Jorge Luis Betancourt
96099636dc
Datasource: Show access (Browser/Server) select on the Prometheus datasource (#21833)
* Datasource: Show access (Browser/Server) select on the Prometheus datasource configuration editor

* Trigger build
2020-02-04 08:42:26 +01:00
Shavonn Brown
c4e3110034
deps so can mock in tests (#21827) 2020-02-03 09:07:50 -05:00
Damien Castanier
7720bfab95
Templating: Add new global built-in variables (#21790)
* Add new global built-in variables #20523
new branch from master

* #20523 Revert change on __from and __to like requested

* #20523 simplify contextSrv access

* #20523 simplify contextSrv access

* #20523 repair jest tests
2020-02-03 08:57:38 +01:00
Peter Holmberg
93195facba
Fix: Reimplement HideFromTabs in Tabs component (#21863)
* reimplement hidefromtabs

* remove console log

* going with option b instead

* less explicit
2020-02-03 08:16:48 +01:00
Marcus Efraimsson
6e80315531
Image Rendering: Fix render of graph panel legend aligned to the right using Grafana image renderer plugin/service (#21854)
Don't render class body--phantomjs on body element when 
PhantomJS renderer not is in use.

Fixes #21830
2020-01-30 17:35:32 +01:00