Commit Graph

11294 Commits

Author SHA1 Message Date
Torkel Ödegaard
de314851a6
NewPanelEditor: Fixes alert state & annotations, alert history (#23124)
* Updated title to show dashboard title

* Sort of fixed annotations and alerting state
2020-03-27 06:40:14 +01:00
Dominik Prokop
4eae1b5483
NewPanelEditor: fluent API for custom field config and panel options creation (#23070)
* Registry of standard option editors

* Move override processors  to grafana data

* API for declaratively creating field config/panel options

* Enable declarative API in PanelPlugin for options and field config

* Use new api in react table panel

* Add color and unit picker to option registries

* Add some docs and tests

* Fix tests
2020-03-26 21:48:46 +01:00
Barak Kakoun
0c9e50c7da
All endpoints deleted (#23113)
because id is never defined on notification object, the condition 'n.id === an.id' is equal to 'undefined === undefined' which is always true.
that code is responsible for the situation when you delete one endpoint and it removes all of them.
2020-03-26 19:30:31 +01:00
Torkel Ödegaard
936594f5d0
DashboardSettings: Fixed scrolling (#23108) 2020-03-26 14:36:24 +01:00
Andrej Ocenas
4c5005e575
Explore: Fix 100% height of graph and table panel (#23101)
* Fix 100% height styles

* Move utility class to component styles
2020-03-26 13:24:58 +01:00
Dominik Prokop
046d9c1af4
DashboardSave: Add new dashboard check (#23104) 2020-03-26 12:09:39 +01:00
Tobias Skarhed
5cdb8f8e44
Form Migrations: Button (#23019)
* Update legacy exports and fix Type errors

* Remove Button and LinkButton from Forms namespace

* Fix errors

* Update snapshots

* Move Legacy button

* Migrate more Buttons

* Remove legacy button dependency

* Move button up

* Remove legacy button

* Update Snapshots

* Fix ComponentSize issues

* Switch primary button

* Switch primary

* Add classNames and fix some angular directive issues

* Fix failing build and remove log

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-26 11:50:27 +01:00
Alex Khomenko
85dc4e565e
Search/migrate search results (#22930)
* Search: Setup SearchResults.tsx

* Search: add watchDepth

* Search: Use SearchResults.tsx in Angular template

* Search: Render search result header

* Search: Move new search components to features/search

* Search: Render nested dashboards

* Search: Expand dashboard folder

* Search: Remove fa prefix from icon names

* Search: Enable search results toggling

* Search: Add onItemClick handler

* Search: Add missing aria-label

* Search: Add no results message

* Search: Fix e2e selectors

* Search: Update SearchField imports

* Search: Add conditional classes

* Search: Abstract DashboardCheckbox

* Search: Separate ResultItem

* Search: Style ResultItem

* Search: Separate search components

* Search: Tweak checkbox styling

* Search: Simplify component names

* Search: Separate tag component

* Search: Checkbox docs

* Search: Remove inline on click

* Add Tag component

* Add Tag story

* Add TagList

* Group Tab and TabList

* Fix typechecks

* Remove Meta

* Use forwardRef for the Tag

* Search: Use TagList from grafana/ui

* Search: Add media query for TagList

* Search: Add types

* Search: Remove selectThemeVariant from SearchItem.tsx

* Search: Style section + header

* Search: Use semantic html

* Search: Adjust section padding

* Search: Setup tests

* Search: Fix tests

* Search: tweak result styles

* Search: Expand SearchResults tests

* Search: Add SearchItem tests

* Search: Use SearchResults in search.html

* Search: Toggle search result sections

* Search: Make selected prop optional

* Search: Fix tag selection

* Search: Fix tag filter onChange

* Search: Fix uncontrolled state change warning

* Search: Update icon names

* Search: memoize SearchCheckbox.tsx

* Search: Update types

* Search: Cleanup events

* Search: Semantic html

* Use styleMixins

* Search: Tweak styling

* Search: useCallback for checkbox toggle

* Search: Add stylesFactory

Co-authored-by: CirceCI <circleci@grafana.com>
2020-03-26 10:09:08 +01:00
Ryan McKinley
19123444a1
Chore: move specific DataQuery props to loki/tsdb (#23086) 2020-03-25 22:30:22 -07:00
Ryan McKinley
27913289d3
Chore: fix typo and remove deprecation (#23073) 2020-03-25 17:21:09 -07:00
Andrej Ocenas
ae09ccbf79
Trace UI demo (#20297)
* Add integration with Jeager
Add Jaeger datasource and modify derived fields in loki to allow for opening a trace in Jager in separate split.
Modifies build so that this branch docker images are pushed to docker hub
Add a traceui dir with docker-compose and provision files for demoing.:wq

* Enable docker logger plugin to send logs to loki

* Add placeholder zipkin datasource

* Fixed rebase issues, added enhanceDataFrame to non-legacy code path

* Trace selector for jaeger query field

* Fix logs default mode for Loki

* Fix loading jaeger query field services on split

* Updated grafana image in traceui/compose file

* Fix prettier error

* Hide behind feature flag, clean up unused code.

* Fix tests

* Fix tests

* Cleanup code and review feedback

* Remove traceui directory

* Remove circle build changes

* Fix feature toggles object

* Fix merge issues

* Fix some null errors

* Fix test after strict null changes

* Review feedback fixes

* Fix toggle name

Co-authored-by: David Kaltschmidt <david.kaltschmidt@gmail.com>
2020-03-25 12:25:39 +01:00
kay delaney
40e875369b
Explore: Allows a user to cancel a running query (#22545) 2020-03-25 10:38:14 +00:00
Torkel Ödegaard
40d195e4a7
BackendSrv: Adds config to response to fix external plugins that use this (#23032)
* BackendSrv: Added config to response

* QueryInspector: Removing config from showing up

* Replace config with request and make it be the unmodified params sent in
2020-03-25 10:21:12 +01:00
Torkel Ödegaard
e8efd17ea9
Buttons: Improves vertical alignment in buttons (#23030)
* Buttons: Improves vertical alignment in buttons

* Updated snapshot

* Fixed strict null errors
2020-03-25 09:21:44 +01:00
Agnès Toulet
d825b9e799
Analytics: Send event when opening a dashboard (#22921)
* Analytics: add open dashboard event

* Analytics: move code to analyticsProcessor

* Dashboard: fix init tests

* Analytics: remove open event for new dashboard

* Analytics: rename analyticsProcessor functions
2020-03-25 09:01:49 +01:00
BhartiAgrawalNvidia
ce8df91cc9
Fixing issue 16090 where Grafana uses illegal characters in requests … (#21447)
* Fixing issue 16090 where Grafana uses illegal characters in requests to Prometheus

* Rebase with Grafana and Merge branch 'master' of https://github.com/BhartiAgrawalNvidia/grafana into fix-16090

# Conflicts:
#	public/app/plugins/datasource/prometheus/language_provider.ts

* Rebase with Grafana and Merge branch 'master' of https://github.com/BhartiAgrawalNvidia/grafana into fix-16090

# Conflicts:
#	public/app/plugins/datasource/prometheus/language_provider.ts

* Use querystring to escape the url

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-03-24 17:02:50 +01:00
xiaobeiyang
803f553552
Variable: Support more variable formatting. (#21622)
* Support more variable formatting.
Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-03-24 16:26:58 +01:00
Hugo Häggmark
31ad86ffc0
TemplateSrv: deprecates templateSrv.variables and adds getVariables (#23026)
* TemplateSrv: deprecates templateSrv.variables and adds getVariables

* Update public/app/plugins/datasource/postgres/query_ctrl.ts

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

* Update public/app/plugins/datasource/stackdriver/components/VariableQueryEditor.test.tsx

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

* Update public/app/plugins/datasource/cloudwatch/datasource.ts

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

* Update public/app/plugins/datasource/mysql/query_ctrl.ts

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

* Chore: updates after PR comments

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-03-24 16:03:53 +01:00
Torkel Ödegaard
441e87d4d4
NewPanelEdit: Adding repeating options (#22984)
* NewPanelEdit: Adding repeating options

* Added all repeat options

* reduce strict null errors
2020-03-24 15:44:13 +01:00
Arve Knudsen
15455ab593
CircleCI: Run golangci-lint in two batches (#23021)
* CircleCI: Run golangci-lint in two batches

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* CircleCI: Fix typo

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: adds fallback value to time series class

* Chore: changes fallback value from null to empty string in FilterInput component

* Update public/app/core/time_series2.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@grafana.com>

* Chore: updates || to ?? operators

Co-authored-by: Lukas Siatka <lukasz.siatka@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2020-03-24 13:50:05 +01:00
Ivana Huckova
dd732eac50
Rich history: Improve animation (#22983) 2020-03-24 11:13:38 +01:00
Torkel Ödegaard
08c95c3419
UI: Theme changes (#22880)
* Theme: Updates the theme to align panel & page background colors

* Updated dashboard settings view to be similar to new panel edit

* Updated themes

* Added shadow

* Updates generated files

* Minor fix to inspect drawer

* Clean up old dashboard setttings stuff

* Polish to search

* Updated truth image

* Minor tweaks to dropdown menu

* Updates and alignments between inspect drawer and explore rich history

* removed unused variables

* Minor tweak to light page header bg
2020-03-24 10:30:53 +01:00
Marcus Andersson
41bc1aa3ae
DataLinks: make sure we use the correct datapoint when dataset contains null value. (#22981)
* Fix to make sure we have the correct dataIndex when using data links.

* fixed strict null errors.

* decreased number of errors.
2020-03-24 08:19:19 +01:00
Hugo Häggmark
05b6d38374
Variables: breaks variable.ts into 2 separate files utils and types (#22884) 2020-03-24 05:46:31 +01:00
Hugo Häggmark
cf5064bfa0
Variables: replaces homegrown variableAdapters with Registry (#22866)
* Refactor: intial commit

* Tests: fixes tests

* Refactor: adds stricter typings
2020-03-23 15:33:17 +01:00
Hugo Häggmark
9af04a49ea
Variables: replaces UUID with name for a more performant lookup in TemplateSrv (#22858)
* Refactor: renames uuid to id

* Refactor: misc renames

* Refactor: fixes renaming of variable

* Refactor: changes method accessed by templateSrv

* Refactor: fixes for NEW_VARIABLE_ID

* Refactor: rename flow refactor

* Tests: adds missing reducer and action tests

* Refactor: keeping tests consitent

* Chore: reorder imports

* Chore: removes uuid package

* Refactor: fixes imports
2020-03-23 13:45:08 +01:00
flopp999
8aca83a646
Menu: aligning user menu options (#22940) 2020-03-23 11:29:36 +01:00
Marcus Andersson
a7a1406415
Variables: migrates ad hoc variable type to react/redux. (#22784)
* Refactor: moves all the newVariables part to features/variables directory

* Feature: adds datasource type

* Tests: adds reducer tests

* Tests: covers data source actions with tests

* Chore: reduces strict null errors

* boilerplate that will be replaced by real code.

* added old editor template.

* added initial version of ad hoc editor.

* added working (apart from add) version of the editor.

* Added placeholder for picker.

* Have a working UI. Need to connect it so we refresh the variables on changes.

* variable should be updated now.

* removed console.log

* made the url work.

* cleaned up the adapter.

* added possiblity to create filter directly from table.

* moved infotext from general reducer to extended value of adhoc.

* fixed strict null errors.

* fixed strict null errors.

* fixed issue where remove was displayed before being added.

* fixed issue with fragment key.

* changed so template_src is using the redux variables.

* minor refactorings.

* moved adhoc picker to adhoc variable.

* adding tests for reducer and fixed bug.

* added tests or urlparser.

* added tests for ad hoc actions.

* added more tests.

* added more tests.

* fixed strict null error.

* fixed copy n pase error.

* added utilit for getting new variable index.

* removed console.log

* added location to reducerTester type and created a module type for it.

* changed so we only have one builder pattern.

* fixed tests to use static expected values.

* fixed strict errors.

* fixed more strict errors.

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2020-03-23 09:00:36 +01:00
flopp999
5df00abfcf
Admin: Added Name to user list (#22939)
In Config-users Name is listed so it may also be visible in Admin-users
2020-03-20 21:19:05 +01:00
Dominik Prokop
bdb5659977
NewPanelEdit: Organise sidebar in tabs (#22870)
* Refactor value mappings UI to work better with new panel edit

* TS fix

* Experimenting with tabs in the sidebar

* Small refactor and added Panel general settings

* Merge fixes

* fix fieldOptions being used instead of fieldConfig

* Added icons to tabs (testing)

* Only 3 tabs i think, panel specific options need ot exist in first tab, some style tweaks

* Moved title and no value up

* Updated

* Render panel options in Options tab and add old options styles hack to display those vertically

* Basic settings to Panel settings

* Make nullcheck pass

* Snaps bump

* Fix standard configs not update

* Organise sidebar better, add tmp NewPanelEditorContext to hide duplicate legacy options

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-20 15:15:04 +01:00
Boyko
c600a08524
Query components unsafe lifecycle methods (#21163)
* Chore: refactor query components unsafe lifecycle methods

* Chore: remove redundant defaults

* Chore: check expression exist while filter targets in query

* Chore: fix broken test

* Chore: adding query filed tests

* pass normalized query to QueryFieldsEditor

Signed-off-by: Boyko Lalov <boiskila@gmail.com>

* Remove introduced strictNullCheck errors and correctly solve merged conficts

* Improve redability and fix strictNullChecks

Co-authored-by: Ivana <ivana.huckova@gmail.com>
2020-03-20 13:00:49 +01:00
Torkel Ödegaard
8e131384e3
Panels: Fixed size issue with panels when existing panel edit mode (#22912) 2020-03-20 11:49:54 +01:00
Torkel Ödegaard
d16211b782
Azure: Fixed dropdowns not showing current value (#22914) 2020-03-20 11:04:21 +01:00
Marcus Andersson
5cf7803264
Fix: failing tests when running on none english os. (#22913) 2020-03-20 10:34:35 +01:00
Hugo Häggmark
8d5c6053db
BackendSrv: only add content-type on POST, PUT requests (#22910)
* BackendSrv: only add content-type on POST, PUT requests
Fixes #22869

* Tests: imports polyfill for Headers
2020-03-20 10:21:32 +01:00
Tobias Skarhed
a2b3da2792
Migration: Create org (#22542)
* Add NewOrgPage

* Remove filrs

* Remove import

* Remove comments

* Get navModel from Redux

* Add DTO

* Get nav model from state

* Change error display

* Add async await and check if org is available

* Fix null strict null error

* Update public/app/features/org/NewOrgPage.tsx

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

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-03-19 14:22:53 +01:00
Dominik Prokop
f2742d4a28
NewPanelEdit: Refactor value mappings UI to work better with new panel edit (#22808)
* Refactor value mappings UI to work better with new panel edit

* TS fix
2020-03-19 12:28:05 +01:00
Dominik Prokop
bf7579d984
FieldOverrides: Move FieldConfigSource from fieldOptions to PanelModel.fieldConfig (#22600)
* Apply field overrides in PanelChrome

* Move applyFieldOverrides to panel query runner

* Review updates

* Make sure overrides are applied back on souce panel when exiting the new edit mode

* TS ignores in est

* Make field display work in viz repeater

* Review updates

* Review and test updates

* Change the way overrides and trransformations are retrieved in PQR

* Add fieldConfig property to PanelModel

* Dashboard migration v1

* Use field config when exiting new panel edit mode

* Gauge - use fieldConfig from panel model

* FieldDisplayOptions - don's extend FieldConfigSource

* Fix fieldDisplay ts

* StatPanel updated

* Stat panel defaults applied

* Table2 panel options  update

* React graph updates

* BarGauge updated

* PieChart, Gauge, BarGauge and Stat updates

* PieChart - remove field config defaults from options

* FieldDisplayEditor - remove unused methos

* PanelModel - remove debugger

* Remove fieldConfig from field options when migrating dashboard

* Update data links migrations

* Update fieldDisaplay tests to respect new fieldConfig

* Update dashboard schema version in snapshots

* Fix BarGaugePanel test

* Rebase fixes

* Add onFieldConfigChange to PanelProps type

* Update shared single stat migration

* Pass PanelModel instead of options only for panel type change handler [breaking]

* Renames

* Don't mutate panel options

* Migrations update

* Remove obsolete snap

* Minor updates after review

* Fix null checks

* Temporarily (until we decide to switch to new pane edit) bring back old aditors

* Temporarily rename ValueMappingEditor and MappingRow to Legacy*

* Migrations update

* Updae setFieldConfigDefaults API

* Update the way field config defaults are applied

* Use standard field config for gauge, bar gauge and stat panels

* refactoring

* Revert dashboard fieldOptions migrations as those are handled by single stat migrator

* Fix ts in tests

* Strict null fix and some minor fixes

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-03-19 11:50:31 +01:00
Ivana Huckova
8ba75e77b1
Design tweaks (#22886) 2020-03-19 10:17:56 +01:00
Ivana Huckova
0d88a49126
Remove duplicated localStorage mock (#22872) 2020-03-19 09:24:28 +01:00
Jess
db85c3e7b9
Rich history UX fixes (#22783)
* Initial commit

* Visualised renamed or deleted  datasources as well, if they have queries

* Pass ds image to card and information if the datasource was removed/renamed

* Set up card with datasource info and change run query

* Style comment, run button

* Fix button naming

* Remember last filters

* Update public/app/core/store.ts

* Update public/app/features/explore/RichHistory/RichHistory.tsx

* Update comments

* Rename datasource to data source

* Add test coverage, fix naming

* Remove unused styles, add feedback info

Co-authored-by: Ivana <ivana.huckova@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2020-03-19 08:47:27 +01:00
Daniel Lee
3b9a4e6444
AzureMonitor: support workspaces function for template variables (#22882)
* azuremonitor: adds support for workspaces query macro...

...for Azure Logs template variable queries

* docs: azure logs workspaces templating function

* Update docs/sources/features/datasources/azuremonitor.md

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

* docs: convert list into table

* docs: fixes prettier formatting problem

Prettier adds a slash before dollar signs in markdown. Disabling it
for this table with a prettier comment.

https://prettier.io/docs/en/ignore.html

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-03-19 00:41:35 +01:00
Cyril Tovena
ec9167e972
Check if the datasource is of type loki using meta.id instead of name. (#22877)
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
2020-03-18 21:18:48 +01:00
Denis
26626d9073
Prometheus: Render missing labels in legend formats as an empty string (#22355)
* Empty value for unknown Prometheus label (grafana#16041)

* Empty value for unknown Prometheus label (grafana#16041)

* fix linter
2020-03-18 19:57:11 +01:00
Hugo Häggmark
52242ddf76
Variables: adds missing feature toggle in DashboardModel (#22868) 2020-03-18 15:55:12 +01:00
Torkel Ödegaard
044ec40112
Graphite: Rollup Indicator (#22738)
* WIP: Rollup indiator progress

* Progress

* Progress, can now open inspector with right tab

* changed type and made inspect

* Showing stats

* Progress

* Progress

* Getting ready for v1

* Added option and fixed some strict nulls

* Updated

* Fixed test
2020-03-18 13:00:14 +01:00
Torkel Ödegaard
aa4ed76a00
Graphite: Fixed issue with query editor and next select metric now showing after selecting metric node (#22856)
* Graphite: Fixed digest issue in graphite query editor

* Fixed unit test

* Updated
2020-03-18 11:47:31 +01:00
maximka
be73dcd2eb
Search: Improve tags layout , #22804 (#22830) 2020-03-18 08:14:56 +01:00
Erik Sundell
1cd7ce24c7
Stackdriver: Fix GCE auth bug when creating new data source (#22836)
* Fix test datasource for gce auth

* Cache gce default project locally

* Await gce default project call

* Remove reload functionality

* Fix build problem
2020-03-18 08:11:14 +01:00
Ivana Huckova
8edf8e3982
Rich history: Test coverage (#22852)
* Add unit test coverage

* Add tests to util/richHistory

* Remove unused import

* Remove redundant tests

* Fix tests for components

* Test saving to local storage

* Add boxshadow to container

* Revert "Add boxshadow to container"

This reverts commit 5ca2e850e4.

* Fix failing tests after merging master

* Fix imports, aria-labels

* Remove console.log
2020-03-17 23:24:27 +01:00