Commit Graph

248 Commits

Author SHA1 Message Date
Andrej Ocenas
319a0585a5
Logs: Add href to internal link (#23757) 2020-04-22 19:42:28 +02:00
Torkel Ödegaard
45dfa20467
Buttons: Center text in buttons (#23789)
* Buttons: Center buttons

* Updated size of transformation button

* removed snapshot
2020-04-22 18:47:41 +02:00
Dominik Prokop
6715cf22a3
Transformations: Improve UI and add some love to filter by name (#23751)
* Change filterByName options to accept arrays instead of strings

* Improve transformations UI

* Minor updates

* Minor UI changes

* Review
2020-04-22 13:38:50 +02:00
Hugo Häggmark
bcf5d4b25c
Transformers: adds labels as columns transformer (#23703)
* Transformers: adds labels as columns transformer

* Refactor: adds support for same timestamps with different labels

* Refactor: adds basic transform ui

* Refactor: adds sorted result

* Refactor: renames transformer
2020-04-22 12:21:34 +02:00
Andrej Ocenas
a89d629b7e
Tracing: Add some error handling to JaegerQueryField (#23599) 2020-04-21 14:18:56 +02:00
Marcus Andersson
a2d741f60f
Docs: run the api-extractor on master to update docs (#23726)
* regenerated packages docs.

* fixed spelling issues.

* fixed spelling issues.
2020-04-21 10:41:50 +02:00
Torkel Ödegaard
4d9d3270af
CSS: Various css bug fixes (Safari fix for graph panels and more) (#23704)
* CSS: Various css bug fixes

* Updated
2020-04-21 09:12:34 +02:00
Ryan McKinley
229176f1b0
Transformers: calculate a new field based on the row values (#23675) 2020-04-20 09:57:04 -07:00
Andrej Ocenas
e5dd7efdee
Provisioning: Allows specifying uid for datasource and use that in derived fields (#23585)
* Add uid to datasource

* Fix uid passing when provisioning

* Better error handling and Uid column type change

* Fix test and strict null error counts

* Add backend tests

* Add tests

* Fix strict null checks

* Update test

* Improve tests

* Update pkg/services/sqlstore/datasource.go

Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com>

* Variable rename

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-20 15:48:38 +02:00
Ivana Huckova
f37814f3b1
Fix getLogLevelFromKey when non-string supplied (#23654) 2020-04-20 13:50:14 +02:00
Torkel Ödegaard
56a7de562e
Table: Improvements to column resizing, style and alignment (#23663)
* Table: Fixed to column alignment

* testing table state reducer

* Styles starting to work

* Persisting column resize now works

* Trying to fix Table storybook stories

* Minor updates

* fixed ts issue

* Table: Support duplicate field names, and use data frame directly instead of copying data and other improvements (#23681)

* Poc at use data frame directly

* working ok

* Table improvements
2020-04-20 09:27:40 +02:00
Torkel Ödegaard
3aa8eb0176
NewPanelEdit: Improvements to angular panels and other fixes (#23678)
* Removed old editor components

* Angular panel improvements

* Progress

* Updated tests

* Simple persistence for angular panel option state

* Improving graph edit experiance

* Improving series overrides

* updated e2e test

* Regstry: refactoring
2020-04-20 08:47:25 +02:00
Dominik Prokop
d2a13c4715
FieldOverride: Support data links via field overrides (#23590)
* Move xss and sanitize packages to grafana-data

* Move text, url and location utils to grafana-data

* Move grafana config types to grafana-data

* Move field display value proxy to grafana-data

* Fix

* Move data links built in vars to grafana-data

* Attach links supplier to when applying field overrides

* Prep tests

* Use links suppliers attached via field overrides

* locationUtil dependencies type

* Move sanitize-url declaration to grafana-data

* Revert "Move sanitize-url declaration to grafana-data"

This reverts commit 11db9f5e55.

* Fix typo

* fix ts vol1

* Remove import from runtime in data.... Make TS happy at the same time ;)

* Lovely TS, please shut up

* Lovely TS, please shut up vol2

* fix tests

* Fixes

* minor refactor

* Attach get links to FieldDisplayValue for seamless usage

* Update packages/grafana-data/src/field/fieldOverrides.ts

* Make storybook build
2020-04-20 07:37:38 +02:00
Ryan McKinley
88ec7e097f
toDataFrame: detect field properties using in rather than hasOwnProperty (#23673) 2020-04-18 15:11:24 -07:00
Dominik Prokop
539edba31b
Overrides: Show option group counters for options that represent collections (#23655) 2020-04-18 14:05:38 +02:00
Hugo Häggmark
97c5e2971d
Transformers: changes reduce transformer (#23611)
* Transformers: changes reduce transformer

* Refactor: fixes lenght of frame

* Minor tweaks and polish

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-04-17 16:27:00 +02:00
Torkel Ödegaard
1816ab8013
Inspect: Transformers (#23598)
* WIP: Inspect transformers

* Updated

* Transformations working in inspect drawer and series to columns working as normal transformation

* Minor name change

* Updated

* Updated

* Fix: fixes crash with dataFrameIndex out of bounds

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2020-04-17 14:03:21 +02:00
Hugo Häggmark
0205c42bfa
Transformers: fixes column names generated by seriesToColumn transformer (#23642) 2020-04-17 09:33:56 +02:00
Ryan McKinley
6c021f7bb9
Table: add a select option when multiple tables exist (#23545)
* add a table picker

* move picker to the top

* add missing change

* Removed overflow from panel-content so dropdown menus can extend a panel, moved the select to the bottom

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-04-16 21:35:58 +02:00
Ryan McKinley
010c67cc71
Chore: update rxjs (#23577) 2020-04-14 16:22:03 -07:00
Torkel Ödegaard
460561a25c
Transformations: UX updates (#23574) 2020-04-14 21:17:44 +02:00
Torkel Ödegaard
bc60f9c403
Theme: Typography variables overhaul, theme cleanup, improvents to storybook ThemeColors component (#23531)
* Began text theme refactoring

* Consolidating blue varaibles

* Theme: Typography overhaul and theme cleanup

* Theme updates, alignment and fixes

* Updated snapshots

* Restored template variable class

* Updates

* added container

* Updated snapshot
2020-04-14 11:32:14 +02:00
Torkel Ödegaard
8b7decf57b
Styles & Theme: Inline form styles polish & tweaks (#23521)
* Styles: Refactoring and tweaks to inline form styles

* Minor change

* Minor fix

* Updated snapshot

* tweaks

* minor tweak

* Updated modal style

* Updated snapshot

* Updated more snapshots
2020-04-13 09:58:40 +02:00
Torkel Ödegaard
1ba8f1647e
Theme: Refactoring theme colors variables (#23513)
* Theme: Typography updates

* Updated

* Updated snapshot

* Renamed colors to palette

* Introduce colors namespace

* Massive theme color move

* Removing color selection logic with more abstract concepts

* Updates

* Minor sidemenu change
2020-04-12 15:05:49 +02:00
Ryan McKinley
6f1a25a896
DataFrame: expose an object array as a data frame (#23494) 2020-04-11 07:08:22 -07:00
Torkel Ödegaard
6cb7d95916
Components: IconButton (#23510)
* IconButton: New component to share pointer, size & hover style for icon buttons

* Progress

* IconButton: new component

* Think I am done

* Updated snapshots

* Do not like the black button reverting that, and not the plus-circle changed to plus

* fixed test

* fixed e2e test

* Fixed ts issue
2020-04-11 16:07:18 +02:00
Dominik Prokop
58257a95a3
Transformations: Refactor to use single registry for transformations (#23502)
* Use single registry for transformations

* Fix transformations tests

* Added documentation comments and minor refactor

* Added documentation comments and minor refactor
Minor misunderstanding between me and Typescript. We should be good friends back now.

* Fix registry import
2020-04-10 19:21:49 +02:00
Torkel Ödegaard
5a4f690807
NewPanelEditor: Enable new edit mode (#23405)
* WIP: initial commit to transition to new edit mode

* More old edit cleanup

* Minor update

* Refactoring url edit/fullscreen state to simplify logic, now seperate states

* Fixed tests and part of the explore integration

* Updated snapshot

* Fix alert rule links

* Fixed issue going back from explore

* Updated snapshots

* Fixes and changes

* Fixed bridge srv issue

* Fixed add panel issue

* Removed console log

* Removed render

* Tests: fixes e2e smoketest

* Make description optional

* Fixed typings

* e2e fixes

* removed import

* updated snapshot

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2020-04-10 16:37:26 +02:00
Dominik Prokop
f9c0c22d85
Add documentation comments for declarative options API (#23495) 2020-04-10 13:29:48 +02:00
Ryan McKinley
32555fc769
Plugins: add a deprecated state (#23496)
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-04-10 11:30:36 +02:00
Dominik Prokop
76827d2152
NewPanelEdit: General options categorisation (#23145)
* First bar gauge panel option

* Update doc comments

* Minor changes

* progress

* Minor type updates

* Fixing typing errors

* Fix that TS!

* Bring satisfaction to that beast called typescript

* Prototype

* Remove import

* Experimenting with different named categories

* Experimenting with category naming

* Naming is very hard

* merge master

* Remove commented code

* Fix merge

* Categorise panel options into collapsible sections

* Remove categories from table panel

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-04-09 21:22:43 +02:00
Marcus Andersson
32066a3f67
Build: removed circular dependencies to make grafana/ui build again (#23468)
* fixed dependecy issues.

* Fixed so we don't have any circular dependencies.

* added missing type.

* fixed formatting issue of config.

* skipping sourcemap again.
2020-04-09 09:42:59 -07:00
Dominik Prokop
94f2a3ebae
Packages: Fix for imports from indexes (#23458), fixes e2e 2020-04-09 11:30:25 +02:00
Stephanie Closson
3acc318d72
Chore: reduce null check errors to 788 (currently over 798) (#23449)
* Fixed ts errors so build will succeed

* Update packages/grafana-data/src/types/graph.ts

Co-Authored-By: Ryan McKinley <ryantxu@gmail.com>

* Feedback from code review

* Leaving out trivial typing's

* Fix error with color being undefined now.

* fix test with timezone issue

* Fixed test

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-04-09 08:29:36 +02:00
Ryan McKinley
38082747dc
Chore: export OptionsUIRegistryBuilder on grafana/data (#23444)
* export the ui registry

* add to utils index also
2020-04-09 07:57:03 +02:00
Andrej Ocenas
263dcb1452
Chore: Fix bunch of strict null error to fix master CI (#23443)
* Fix bunch of null error

* Fix failing test

* Another test fix
2020-04-08 23:44:10 +02:00
Dominik Prokop
ea792edd3a
NewPanelEditor/Panels: refactor setDefault to setPanelOptions (#23404)
* Remove deprecated setDefault usages

* Add simple support for conditinal field config properties

* Use new API in NewsPanel

* Update tests

* Fix check
2020-04-08 19:21:26 +02:00
Ivana Huckova
431f454d57
@grafana/ui: Create Icon component and replace part of the icons (#23402)
* Part1: Unicons implementation (#23197)

* Create a new Icon component

* Update icons in main sidebar

* Update icons in Useful links and in react components on  main site

* Update icons in Useful links and in main top navigation

* Adjust sizing

* Update panel navigation and timepicker

* Update icons in Panel menu

* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)

* Update icons in add panel widget

* Resolve merge conflict

* Fix part of the test errors and type errors

* Fix storybook errors

* Update getAvailableIcons import in storybook knobs

* Fix import path

* Fix SyntaxError: Cannot use import statement outside a module in test environment error

* Remove dynamic imports

* Remove types as using @ts-ignore

* Update snapshot test

* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax

* Remove color prop from icon, remove color implemetation in mono icons

* Update navbar styling

* Move toPascalCase to utils/string

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Resolve type errors resulted from merge

* Part2: Unicons implementation (#23266)

* Create a new Icon component

* Update icons in main sidebar

* Update icons in Useful links and in react components on  main site

* Update icons in Useful links and in main top navigation

* Adjust sizing

* Update panel navigation and timepicker

* Update icons in Panel menu

* Update icons in add panel widget

* Resolve merge conflict

* Fix part of the test errors and type errors

* Fix storybook errors

* Update getAvailableIcons import in storybook knobs

* Fix import path

* Fix SyntaxError: Cannot use import statement outside a module in test environment error

* Remove dynamic imports

* Remove types as using @ts-ignore

* Update snapshot test

* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax

* Implment icons in Tabs

* Implement icons in search items and  empty  list

* Update buttons

* Update button-related snapshot tests

* Update icons in modals and page headers

* Create anfular wrapper and update all icons on search screen

* Update sizing, remove colors, update snapshot tests

* Remove color prop from icon, remove color implemetation in mono icons

* Remove color props from monochrome icons

* Complete update of icons for search screen

* Update icons for infor tooltips, playlist, permissions

* Support temporarly font awesome icons used in enterprise grafana

* Part1: Unicons implementation (#23197)

* Create a new Icon component

* Update icons in main sidebar

* Update icons in Useful links and in react components on  main site

* Update icons in Useful links and in main top navigation

* Adjust sizing

* Update panel navigation and timepicker

* Update icons in Panel menu

* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)

* Update icons in add panel widget

* Resolve merge conflict

* Fix part of the test errors and type errors

* Fix storybook errors

* Update getAvailableIcons import in storybook knobs

* Fix import path

* Fix SyntaxError: Cannot use import statement outside a module in test environment error

* Remove dynamic imports

* Remove types as using @ts-ignore

* Update snapshot test

* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax

* Remove color prop from icon, remove color implemetation in mono icons

* Update navbar styling

* Move toPascalCase to utils/string

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Icons update

* Add optional chaining to for isFontAwesome variable

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Part3:  Unicons implementation (#23356)

* Create a new Icon component

* Update icons in main sidebar

* Update icons in Useful links and in react components on  main site

* Update icons in Useful links and in main top navigation

* Adjust sizing

* Update panel navigation and timepicker

* Update icons in Panel menu

* Update icons in add panel widget

* Resolve merge conflict

* Fix part of the test errors and type errors

* Fix storybook errors

* Update getAvailableIcons import in storybook knobs

* Fix import path

* Fix SyntaxError: Cannot use import statement outside a module in test environment error

* Remove dynamic imports

* Remove types as using @ts-ignore

* Update snapshot test

* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax

* Implment icons in Tabs

* Implement icons in search items and  empty  list

* Update buttons

* Update button-related snapshot tests

* Update icons in modals and page headers

* Create anfular wrapper and update all icons on search screen

* Update sizing, remove colors, update snapshot tests

* Remove color prop from icon, remove color implemetation in mono icons

* Remove color props from monochrome icons

* Complete update of icons for search screen

* Update icons for infor tooltips, playlist, permissions

* Support temporarly font awesome icons used in enterprise grafana

* Part1: Unicons implementation (#23197)

* Create a new Icon component

* Update icons in main sidebar

* Update icons in Useful links and in react components on  main site

* Update icons in Useful links and in main top navigation

* Adjust sizing

* Update panel navigation and timepicker

* Update icons in Panel menu

* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)

* Update icons in add panel widget

* Resolve merge conflict

* Fix part of the test errors and type errors

* Fix storybook errors

* Update getAvailableIcons import in storybook knobs

* Fix import path

* Fix SyntaxError: Cannot use import statement outside a module in test environment error

* Remove dynamic imports

* Remove types as using @ts-ignore

* Update snapshot test

* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax

* Remove color prop from icon, remove color implemetation in mono icons

* Update navbar styling

* Move toPascalCase to utils/string

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Update icons in Explore

* Update icons in alerting

* Update + and x buttons

* Update icons in configurations and settings

* Update close icons

* Update icons in rich history

* Update alert messages

* Add optional chaining to for isFontAwesome variable

* Remove icon mock, set up jest.config

* Fix navbar plus icon

* Fir enable-bacground to enableBackgournd

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Merge remote branch origin master to icons-unicons

* Revert "Merge remote branch origin master to icons-unicons"

This reverts commit 3f25d50a39.

* Size-up dashnav icons

* Fix alerting icons, panel headers, update tests

* Fix typecheck error

* Adjustments - add panel icon, spacing

* Set TerserPlugin sourceMap to false to prevent running out of memory when publishing storybook

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-04-08 14:33:31 +02:00
Ryan McKinley
2f7ba21593
Docs: add basic docs for QueryResultMetaNotice (#23410)
* add basic docs

* fix typo

* use link not url
2020-04-08 08:18:48 +02:00
Ryan McKinley
4a2a2b163b
Query: make queryType a top level property (#23412) 2020-04-07 13:58:08 -07:00
Dominik Prokop
92231cc42e
FieldConfig: Set field config defaults based on config registry (#23376)
* Set field config defaults based on config registry

* Rename FIeldPropertyEditorItem to FieldConfigPopertyItem

* Remove console.log

* Simplify overrides persistence model and add support for nested properties in overrides

* Review updates
2020-04-07 15:02:08 +02:00
Marcus Andersson
1f717f514a
TabelPanel: add support for organizing fields/columns. (#23135)
* Added draft on transformers to sort and hide fields.

* added structure for the UI.

* draft on sorting/filtering UI.

* simplified the datastructure a bit.

* added draft on drag and drop support.

* added some super simple styling. Nothing final still waiting for a proper design on this.

* updated lockfile after merge.

* changed so we use the new path for button.

* added one more test.

* Ignore feature toggle

* Moved editor to app

* Added top description

* Minor update

* Did some renaming and simplified the code a bit.

* fixed so we dont use capital naming on the transformer.

* changed to an vertical drag and drop design.

* added support to rename fields.

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-04-07 06:54:09 +02:00
Torkel Ödegaard
b10392733d
FieldConfig: Unify the custom and standard registry (#23307)
* FieldConfig: Unifying standard and custom registry

* Adding path to option items to make id be prefixed for custom options

* Code updates progress

* Add docs back

* Fix TS

* ld overrides tests from ui to data

* Refactor - rename

* Gauge and table cleanup

* F-I-X e2e

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-04-06 16:24:41 +02:00
Ryan McKinley
7ab11027b0
TemplateSrv: expose limited templateSrv in grafana/runtime (#23339) 2020-04-05 21:44:49 -07:00
Torkel Ödegaard
3fae28be52
FieldOverride: Fixed number override so that it return undefined for null/undefined values and not NaN (#23344)
* FieldOverride: Fixed number override so that it return undefined for null/undefined values and not NaN

* Made process function be able to return undefined an null
2020-04-05 06:52:33 +02:00
Ryan McKinley
6366e43a44
Chore: swap [value,time] order when converting to DataFrame (#23206) 2020-04-03 11:11:28 -07:00
Stephanie Closson
c5252f1b64
Toolkit: simplify the plugin ci docker image (#23267)
* removing src dir on publish

* Moved from binary to native typescript
1. Moved to a native typescrpt github publish using the existing
github client.
2. Change dist.js to detect running in a linked environment.
Todo: Optimize docker image for build size.

* Optimized build of docker container
Much smaller. From 5.47 gb to 2.88

* Feedback from discussion with Ryan
- Added gget for getting grafana versions
- Added infrastructure for testing
- Uploaded new docker image

* Fixed typo... Not sure what happened there :)

* Added command to download canary

* small fix for displaying versions in help

* Removed --dev option
Should really just rename version to (ex: 1.2.0-dev)

* removing src dir on publish

* Moved from binary to native typescript
1. Moved to a native typescrpt github publish using the existing
github client.
2. Change dist.js to detect running in a linked environment.
Todo: Optimize docker image for build size.

* Optimized build of docker container
Much smaller. From 5.47 gb to 2.88

* Feedback from discussion with Ryan
- Added gget for getting grafana versions
- Added infrastructure for testing
- Uploaded new docker image

* Fixed typo... Not sure what happened there :)

* Added command to download canary

* small fix for displaying versions in help

* Removed --dev option
Should really just rename version to (ex: 1.2.0-dev)
2020-04-02 13:57:33 -06:00
Andrej Ocenas
a4d4dd325f
Explore: Add trace UI to show traces from tracing datasources (#23047)
* 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

* Add trace ui in Explore

* WIP

* WIP

* WIP

* Make jaeger datasource return trace data instead of link

* Allow js in jest tests

* Return data from Jaeger datasource

* Take yarn.lock from master

* Fix missing component

* Update yarn lock

* Fix some ts and lint errors

* Fix merge

* Fix type errors

* Make tests pass again

* Add tests

* Fix es5 compatibility

Co-authored-by: David Kaltschmidt <david.kaltschmidt@gmail.com>
2020-04-02 13:34:16 +02:00
Torkel Ödegaard
61e6e41ead
FieldConfig: Some name change suggestions and moving defaults to PanelPlugin (#23265)
* FieldConfig: Some name change suggestions and moving defaults to PanelPlugin

* More name changes
2020-04-02 13:24:50 +02:00
Dominik Prokop
dcf6bbc14f
NewPanelEditor: Options/FieldConfig API for defaults and common options selection (#23214)
* Add "some" typesafety to panel options/field config APIs

* Allow selected common field config properties config, allow option defaults config via fluent API

* Update packages/grafana-data/src/panel/PanelPlugin.ts

Co-Authored-By: Ryan McKinley <ryantxu@gmail.com>

* Add defaults support for custom field config

* Enable defaults setting for standard and custom field configs

* Remove setFieldConfigDefaults from PanelPlugin API and replace it with useStandardFieldConfig

* Update API for standard field config defaults

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-04-01 15:33:10 +02:00