Commit Graph

5030 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
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
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
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
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
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
Torkel Ödegaard
8e131384e3
Panels: Fixed size issue with panels when existing panel edit mode (#22912) 2020-03-20 11:49:54 +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
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
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
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
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
Ivana Huckova
d7312750a3
Revert "Explore: Add test coverage for Rich history (#22722)" (#22850)
This reverts commit 40a8aea313.
2020-03-17 17:20:32 +01:00
Ivana Huckova
40a8aea313
Explore: Add test coverage for Rich history (#22722)
* 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.
2020-03-17 16:10:56 +01:00
Ivana Huckova
544690060a
Rich History: UX adjustments and fixes (#22729)
* Initial commit

* Fix spelling of data sources

* Display sorting value for starred and query tab

* Fix handle color for light theme

* Add close button and fix animation

* Remove toggling of tabs

* Stop event propagation when clicking on comment buttons

* Add title for card functionality

* Remove interpolation for easier searchability of variables

* Improve syncing of comments and starred

* Add modal to check if user wants to permanently delete history

* Fix the height of the query card buttons

* Adjust slider's width based on drawer width

* Add spacing between slider and legend

* Semantic variable naming

* Fix disabled button when live tailing

* Add error handling

* Remove unused imports

* Fix starring, remove useEffect

* Remove emiting of appEvents.alertError in store

* Remove unused imports
2020-03-17 16:06:02 +01:00
Hugo Häggmark
d953511e02
Variables: adds onTimeRangeUpdated to newVariables (#22821)
* Feature: adds onTimeRangeUpdated to newVariables

* Refactor: removes VariableWithRefresh and unused func

* Refactor: adds console output when something throws as well
2020-03-17 14:10:30 +01:00
Hugo Häggmark
dc76cc1a26
Variables: fixes so order in list is preserved after save (#22805) 2020-03-17 13:28:14 +01:00
Hugo Häggmark
45784f58f5
Variables: fixes so single value picker closes dropdown on select (#22823) 2020-03-17 08:29:10 +01:00
Torkel Ödegaard
46165a7f7b
SaveDashboard: Updated modal design/layout a bit (#22810) 2020-03-16 15:33:18 +01:00
Dominik Prokop
642c1a16dd
FieldOverrides: Apply field overrides in PanelQueryRunner (#22439)
* 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

* Minor updates after review

* Fix null checks
2020-03-16 14:26:03 +01:00
Hugo Häggmark
fb789e8398
Variables: migrates interval variable type to React/Redux (#22797)
* Feature: migrates interval variable type to React/Redux
2020-03-16 13:45:51 +01:00
Marcus Andersson
be192b8191
Chore: migrate admin/users from angular to react + redux (#22759)
* Start adding admin users list page to redux/react.

* removed unused code.

* added pagination.

* changed so we use the new form styles.

* added tooltip.

* using tagbadge for authlabels.

* remove unused code.

* removed old code.

* Fixed the last feedback on PR.
2020-03-16 09:53:20 +01:00
Torkel Ödegaard
f78501f3b5
AngularPanels: Fixed inner height calculation (#22796) 2020-03-16 09:48:44 +01:00
Hugo Häggmark
1db067396a
Variables: migrates data source variable type to React/Redux (#22770)
* 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
2020-03-16 06:32:04 +01:00
Peter Holmberg
7019471f3f
Migrate: Create new folder page (#22693)
* Migrate create new folder page

* Add header

* Bump react-hook-form

* Form async validatio example

* fix async validation

* Change input size

* async validation on new folder create + documentation

* remove angular things

* fix errors in docs

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-03-13 15:02:54 +01:00
Dominik Prokop
1256d9e78d
grafana/data: PanelTypeChangedHandler API update to use PanelModel instead of panel options object [BREAKING] (#22754)
This changes PanelModel's API to support PanelModel API updates when changing panel type. Primary useful when changing panel type between Angular and React panels, as other migrations can be handled via DashboardMigrator.

API change: https://github.com/grafana/grafana/pull/22754/files#diff-d9e3f91dc7d5697f6d85ada008003b4b
2020-03-13 08:27:16 +01:00
Dominik Prokop
b441b73345
DashboardSave: Autofocus save dashboard form input (#22748) 2020-03-12 11:50:50 +01:00
Hugo Häggmark
b51e28bc15
Chore: reduces strict null errors to 824 (#22744)
* Chore: reduces strict null errors with 100+

* Chore: lowers the build error number
2020-03-12 10:22:33 +01:00