Commit Graph

2090 Commits

Author SHA1 Message Date
Ivana Huckova
445132a904
Fix escaping in ANSI and dynamic button removal (#31731) 2021-03-08 12:24:44 +01:00
Ryan McKinley
a61e636bcd
DataFrameJSON: introduce a json format that supports same semantics as arrow (#31010) 2021-03-05 12:24:43 -08:00
Vicky Lee
6819a25add
Grafana/ui: display all selected levels for Cascader (#31729)
* add support for displaying all selected levels for cascader

* add story for Cascader with display all selected levels

* add tests for Cascader with displayAllSelectedLevels prop

* replace enzyme test with RTL for cascader
2021-03-05 18:26:31 +00:00
Dominik Prokop
fdc6f2cc6f
DataLinks: Bring back single click links for Stat, Gauge and BarGauge panel (#31692)
* Bring back clickable Stat, Gauge and BarGauge panels

* Demo dashboard

* Add DataLinksContextMenu tests

* Only use new UI for data links, revert panel links logic
2021-03-05 10:29:19 +01:00
Leon Sorokin
a5f3889b93
GraphNG: cache ianaName & reduce calls to getTimeZoneInfo() (#31712) 2021-03-05 00:17:43 -06:00
Alec Posney
56ce068a91
GraphNG: Fixes Tooltip mode 'All' for XYChart (#30921) (#31260) 2021-03-04 20:59:48 -08:00
Gábor Farkas
289dc39ced
grafana/ui: added storybook link to readme (#31600) 2021-03-04 10:57:15 +01:00
Ivana Huckova
4c2e5fcbd0
Explore/Logs: Escaping of incorrectly escaped log lines (#31352)
* POC: Escaping of incorrectly escaped log lines

* Remove unused import

* Fix test, change copy

* Make escapedNewlines optional

* Fix typechecks

* Remove loading state from the escaping button

* Update namings
2021-03-03 18:32:27 +01:00
Oscar Kilhed
b36314d03f
PieChart: Add color changing options to pie chart (#31588)
* Allow changing of series color for PieChart

* Use useTheme hook

* Remove duplicate import
2021-03-02 13:18:03 +01:00
Dominik Prokop
0ba16acd45
Bring back correct legend sizing afer PlotLegend refactor (#31582) 2021-03-02 10:58:40 +01:00
Jack Westbrook
e13a48166b
chore: bump lodash to 4.17.21 (#31549) 2021-03-02 10:13:27 +01:00
Uchechukwu Obasi
5773b8f28c
ConfirmButton: updates story from knobs to controls (#31476)
* ConfirmButton: updates story from knobs to controls

* made some changes
2021-03-01 16:39:36 +01:00
Torkel Ödegaard
fcac61203e
PieChart: Update text color and minor changes (#31546) 2021-03-01 14:08:48 +01:00
Oscar Kilhed
10def28989
PieChart: Improve piechart legend and options (#31446)
* Add percent of total to piechart legend

* Remove defaults

* Add label selector

* Fix multiselect option ui

* Add percent of total to piechart legend

* Add label selector

* add multiselect options ui

* change how pie chart labels are displayed

* Fixed right aligned values in legend

* added titles to display values so they show in table mode

* Move legend display value options to below other options

* Add addMultiSelect method to ui builder

* Use addMultiSelect on builder

* Use multiselect for the legend columns and update the panel test dashboard

* Remove explicit typing on addMultiselect and remove non existing properties from piechart story

* Add release tag

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-03-01 11:18:24 +01:00
Oscar Kilhed
89fa4acafc
Add multiselect options ui (#31501)
* add multiselect options ui

* Change import

* Add addMultiSelect method to ui builder
2021-02-28 09:33:30 +01:00
Ivana Huckova
aeabaee2da
Explore: Show ANSI colored logs in logs context (#31510)
* If ANSI in log context, show it

* Update

* Update

* Add test
2021-02-26 16:27:51 +01:00
Ivana Huckova
2d9f460e19
LogsPanel: Show all received logs (#31505)
* Show all received logs in LogsPanel

* Remove rowLimit
2021-02-26 15:33:34 +01:00
Torkel Ödegaard
eddc163e78
AddPanel: Design polish (#31484)
* AddPanel: Design fixes

* More design updates

* More tweaks

* Updated snapshot

* Modal fixes

* Updated field labels

* Move icon to left again
2021-02-26 12:29:28 +01:00
Torkel Ödegaard
14e7f70eac
TimeSeriesPanel: Remove unnecessary margin from legend (#31467)
* TimeSeriesPanel: Remove unnessary padding

* add back margin for right aligned legend
2021-02-26 11:09:07 +01:00
Torkel Ödegaard
5b0fe1a500
GrafanaUI: Fixes typescript error for missing css prop (#31479) 2021-02-25 16:16:32 +01:00
Jack Westbrook
ad68f3c5e6
DashboardSettings: Migrate Link Settings to React (#31150)
* feat(dashboardsettings): migrate dashboard links EmptyListCTA to react

* feat(dashboardsettings): initial commit of links settings migration to react

* feat(dashboardsettings): add links form functionality

* refactor(dashboardsettings): separate out linksettings components and concerns

* Updates to links list

* Form improvements

* test(dashboardlinks): update links so tests run

* refactor: move _.move to arrayMove for testing purposes

* test(dashboardsettings): initial commit of link settings tests

* refactor(app): put back lodash move method for backwards compatibility

* test(dashboardsettings): add links settings tests

* style(dashboardsettings): camelcase constants

* chore(dashboardsettings): delete old angular links settings view

* fix(dashboardsettings): forceupdate links on submenuVisibilityChanged and correct imports

* chore: remove reference to old angular link settings components

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-02-25 11:50:10 +01:00
kay delaney
47d2a8085b
Frontend changes for library panels feature (#30653)
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-02-25 10:26:28 +00:00
ying-jeanne
4a2e32b401
Revert ""Release: Updated versions in package to 7.4.3" (#31444)" (#31452)
This reverts commit 59d11ce84f.
2021-02-24 17:53:08 +01:00
Zoltán Bedi
c8deaeacce
Chore: Fix eslint react hook warnings in grafana-ui (#31092)
* Chore: Fix eslint react hook warnings in grafana-ui

* Remove unneeded exlcudes

* Address Andrej's review
2021-02-24 17:21:47 +01:00
Uchechukwu Obasi
8f7e26cd01
Chore: fixed incorrect naming for disable settings (#31448) 2021-02-24 15:37:40 +01:00
Uchechukwu Obasi
f3a7cb4709
NamedColorsPalette: updates story from knobs to controls (#31443) 2021-02-24 12:52:56 +01:00
Grot (@grafanabot)
59d11ce84f
"Release: Updated versions in package to 7.4.3" (#31444) 2021-02-24 12:36:51 +01:00
Uchechukwu Obasi
5af27cb43e
ColorPicker: updates story from knobs to controls (#31429)
* ColorPicker: updates story from knobs to controls

* changed story name to uppercase

* made some changes to story name

* made some changes
2021-02-24 12:35:35 +01:00
Uchechukwu Obasi
070d512c57
ClipboardButton: updates story from knobs to controls (#31422) 2021-02-24 10:47:53 +01:00
ying-jeanne
c57047a420
Postgres: allow providing TLS/SSL certificates as text in addition to file paths (#30353)
* postgres SSL certification

* add back the UI to configure SSL Authentication files by file path

* add backend logic

* correct unittest

* mini changes

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

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* mutex

* check file exist before remove

* change permission

* change default configuremethod to file-path

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update public/app/plugins/datasource/postgres/partials/config.html

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* rename sslconfiguremethod to sslconfigurationmethod

* frontend update

* solve comments

* Postgres: Convert tests to stdlib

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

* Postgres: Be consistent about TLS/SSL terminology

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

* fix init inconsistancy

* Fix tests

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

* naming convention

* Fix tests

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

* Fix tests

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

* Undo change

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

* Fix TLS issue

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

* Fix tests

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

* Fix tests

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

* change permissions

* Fix data source field names

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

* Clean up HTML

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

* Improve popover text

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

* Fix SSL input bug

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

* Undo unnecessary change

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

* Clean up backend code

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

* Fix build

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

* More consistent naming

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

* Clean up code

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

* Enforce certificate file permissions

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

* add settings

* Undo changes

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

* fix windows file path

* PostgresDataSource: Fix mutex usage

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

* Fix tests

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

* Update pkg/tsdb/postgres/postgres.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* fix compilation

* fix unittest

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Apply suggestions from code review

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* mock function

* change kmutex package

* add kmutex into middleware

* lock connection file per datasource

* add unittest regarding concurrency

* version should be equal

* adding unittest

* fix the loop

* fix unitest

* fix postgres unittst

* remove comments

* move dataPath from arg to tlsManager struct field

* Use DecryptedValues method

Use cached decrypted values instead of
using secure json data decrypt which will
decrypt unchanged values over and over again.

* remove unneeded mutex in tests and cleanup tests

* fix the lint

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-02-23 22:10:55 +01:00
Uchechukwu Obasi
af12e6d20e
Move NOOP_CONTROL to storybook utils and change to a standalone file (#31421) 2021-02-23 15:20:07 +01:00
Uchechukwu Obasi
9ce07b11d2
CallToActionCard: updates story from knobs to controls (#31393)
* CallToActionCard: updates story from knobs to controls

* used better naming for ctaElement control

* Capitalise Story names

* moved some changes to a separate PR

* fixes CI frontend build issue
2021-02-23 11:41:14 +01:00
Uchechukwu Obasi
6a4880ad14
Cascader: updates story from knobs to controls (#31399) 2021-02-23 09:50:52 +01:00
Alex Khomenko
6db4b40d5b
Data source list: Use Card component (#31326)
* Replace DataSourcesListItem with Card

* Add tests

* Remove unused styles

* Make card heading semi bold

* Make heading semi-bold

* Show type name instead of type id

* Fix key warning

* Update Card

* Fix tests

* Make typeName optional

* remove styling that was just a test

* Make typeName non-optional and fix tests

* Update list key

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-02-22 14:02:10 +02:00
Hugo Häggmark
9967f193c8
Revert "StoryBook: Introduces Grafana Controls (#31351)" (#31388)
This reverts commit c5797cc274.
2021-02-22 11:04:27 +01:00
Hugo Häggmark
c5797cc274
StoryBook: Introduces Grafana Controls (#31351) 2021-02-22 09:53:06 +01:00
Torkel Ödegaard
3e55c967ee
Theming: Support for runtime theme switching and hooks for custom themes (#31301)
* WIP Custom themes

* Load custom themes from URL and via event

* Dynamic page background

* Header color change

* Fixing tests and emotion warnings

* Fixed test

* moving cx to getStyles

* Review fixes

* minor change
2021-02-20 09:02:06 +01:00
Torkel Ödegaard
ce63df425d
TimeSeriesPanel: Fixes overlapping time axis ticks (#31332)
* GraphNG: Fixes overlapping time axis ticks

* Review tweaks
2021-02-19 12:10:48 +01:00
Oscar Kilhed
aeb4bcb3ed
Grafana/UI: Add basic legend to the PieChart (#31278)
* Add basic legend to the PieChart

* Remove console log

* Remove PieChartWithLegend and refactor PieChart a bit

* Use FALLBACK_COLOR

* Refactor PieChart

* Change back to [function]
2021-02-19 11:49:40 +01:00
Uchechukwu Obasi
debb82e124
BarGuage: updates story from knobs to controls (#31223)
* BarGuage: updated story from knobs to controls

* fixes type errors and disables unused controls

* update controls to support some BarGauge props

* changed addBarGaugeStory to component and removed closure

* cleaned up to be more readable

* more refactoring to be readable

* final touches...

* fixed disabled controls issue

* moved NOOP_CONTROL declaration to a seperate PR

* made some tweaks to the story names
2021-02-18 16:03:56 +01:00
Uchechukwu Obasi
0e63dfafbe
ButtonCascader: updates story from knobs to controls (#31288)
* ButtonCascader: updates story from knobs to controls

* some nit fixes
2021-02-18 13:52:09 +01:00
Alex Khomenko
e932d5bb09
Grafana-UI: Update tooltip type (#31310) 2021-02-18 11:10:11 +02:00
Uchechukwu Obasi
14afa167f4
BigValue: updates story from knobs to controls (#31240)
* BigValue: updates story from knobs to controls

* some refactoring to make code more readable

* made some changes
2021-02-17 15:05:40 +01:00
Alex Khomenko
c21e45e428
Search: display sort metadata (#31167)
* Search: display metadata

* Search: update SortPicker icon

* Search: display folder meta data

* Search: reset sort picker on layout change

* Search: align tags in Card component

* Search: replace hyphen with dash

* Search: preserve sort state on layout change

* Search: update tests

* Search: fix tests

* Update pkg/services/search/hits.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/search/components/SearchItem.tsx

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/search/components/SearchItem.tsx

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/search/types.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Search: fix type error

* Search: add General folder name and adjust icon margin

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-02-17 14:06:19 +02:00
Jack Westbrook
4b25310941
Chore: grafana-toolkit uses grafana-ui and grafana-data workspaces (#30701)
* chore(grafana-toolkit): use workspace versions of grafana/ui and grafana/data

* chore: replace references to popperjs 1 typings with popperjs 2 typings
2021-02-16 19:33:50 +01:00
Josh Hunt
85e186cf10
Grafana-UI: Add id to Select to make it easier to test (#31230)
* Prettier formatting

* Grafana-UI: Add support for id and inputId props to Select

* Grafana-UI: Add aria-label to Select

* Grafana-UI: InlineField and Field get ID from inputId prop

For Select

* Fix tests using TagFilter

* Update Select prop documentation

* Update Field tests to use screen instead

* Fix the last few tests
2021-02-16 16:19:55 +00:00
kay delaney
38daf0cba6
UI/Card: Fix handling of 'onClick' callback (#31225) 2021-02-16 13:11:37 +00:00
Torkel Ödegaard
4dfce12a81
TagsInput: Design update and component refactor (#31163)
* TagsInput: Design update and component refactor

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

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

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

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

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

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

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

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Updated

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-02-16 09:39:11 +01:00
Dominik Prokop
9c08b34e71
GraphNG: refactor core to class component (#30941)
* First attempt

* Get rid of time range as config invalidation dependency

* GraphNG class refactor

* Get rid of DataFrame dependency from Plot component, get rid of usePlotData context, rely on XYMatchers for data inspection from within plugins

* Bring back legend

* Fix Sparkline

* Fix Sparkline

* Sparkline update

* Explore update

* fix

* BarChart refactor to class

* Tweaks

* TS fix

* Fix tests

* Tests

* Update packages/grafana-ui/src/components/uPlot/utils.ts

* Update public/app/plugins/panel/timeseries/plugins/ContextMenuPlugin.tsx

* GraphNG: unified legend for BarChart, GraphNG & other uPlot based visualizations (#31175)

* Legend experiment

* Nits
2021-02-15 16:46:29 +01:00
Uchechukwu Obasi
100e7eb992
Alert: update story to use controls (#31145)
* Alert: updated story to use Controls

* updated some changes
2021-02-12 16:45:05 +01:00
Torkel Ödegaard
e38fc6939c
DataSourceSettings: Fixes add header button, it should not trigger a save & test action (#31135) 2021-02-11 15:22:44 +01:00
Torkel Ödegaard
cb5928fdb7
PieChart: Progress on new core pie chart (#28020)
Use visx for the Pie chart plugin.

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-02-11 14:32:33 +01:00
Dominik Prokop
8d339a279b
Eslint: no-duplicate-imports rule (bump grafana-eslint-config) (#30989)
* Eslint: no-duplicate-imports rule (bump grafana-eslint-config)

* Chore: Fix duplicate imports (#31041)

* Rebased this branch into eslint-no-duplicate-imports

* updated some changes

* merged uncaught duplicate imports

* fixes frontend test- I hope

* fixes e2e test- I hope

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-02-11 13:45:25 +01:00
Zoltán Bedi
cc463f30a4
Exemplars: Change CTA style (#30880)
* Exemplars: Change CTA style

* Address review feedbacks

* Fix table column aligning

* Minor alignments + uncontrolled component warning fix
2021-02-10 18:02:48 +01:00
Torkel Ödegaard
758d1386cd
DashboardSettings: Update to new form styles (#31022)
* DashboardSettings: Update to new form styles

* Improve header margin and fixing issue in permissions tab

* Updated

* Switch to radio

* Remove unused import
2021-02-09 20:41:07 +01:00
Hugo Häggmark
297ff9a168
DashboardLinks: Fixes crash when link has no title (#31008)
* DashboardLinks: Fixes crash when link misses title

* Chore: updates after PR comments
2021-02-09 15:46:56 +01:00
Ivana Huckova
c69c8bd47c
Explore: Remove emotion error when displaying logs (#31026)
* Remove emotion error

* Remove redundant context variable
2021-02-09 14:57:06 +01:00
Torkel Ödegaard
39d7ebc7d1
BarGauge: Improvements to value sizing and table inner width calculations (#30990)
* BarGauge: Increase min value width and fix height when setting manual text size

* updated snapshot

* Big improvement to bar gauge value sizing and fixing table gauge sizing

* removed unused const

* added a unit test
2021-02-09 14:18:08 +01:00
Uchechukwu Obasi
b4d51c9f68
ColorPicker: migrated styles from sass to emotion (#30909)
* ColorPicker: migrated styles from sass to emotion

* fixes frontend test

* updated some changes

* updated some changes

* fixed small import nits
2021-02-09 12:19:12 +01:00
Hugo Häggmark
bd28512d29
Graph: Fixes so graph is shown for non numeric time values (#30972)
* Graph: Fixes so graph is shown for non numeric time values

* Tests: changes times to UTC

* Tests: forgot one value in time array

* GraphNG: make time series panel work with string time stamps (#30981)

* Make Time series panel work with data that time is represented as string

* Map to for

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-02-09 09:46:37 +01:00
Hugo Häggmark
f42bb84cbf
TextPanel: Fixes so panel title is updated when variables change (#30884)
* TextPanel: Fixes so panel title is updated when variables change

* Tests: fixes tests

* Chore: updates after PR comments
2021-02-09 06:05:34 +01:00
Oscar Kilhed
3a905847e8
Grafana/UI: Remove DismissableFeatureInfoBox and replace with LocalSt… (#30988)
* Grafana/UI: Remove DismissableFeatureInfoBox and replace with LocalStorageValueProvider
2021-02-08 16:12:05 +01:00
Torkel Ödegaard
907d3a2aac
StatPanel: Fixes issue formatting date values using unit option (#30979) 2021-02-08 15:30:20 +01:00
Torkel Ödegaard
f081df0a4f
Theme: Use higher order theme color variables rather then is light/dark logic (#30939) 2021-02-06 18:01:22 +01:00
Torkel Ödegaard
5cd41adc1e
Alerts: Update Alert storybook to show more states (#30908)
* Alert: Design update for alerts

* Before text color

* Text update

* reverted style changes

* Minor fix

* Updated snapshot
2021-02-05 09:19:09 +01:00
Hugo Häggmark
2a3aa95163
Variables: Adds queryparam formatting option (#30858)
* Variables: Adds queryparam formatting option

* Chore: fixes strict errors

* Chore: changes after PR comments
2021-02-05 07:16:06 +01:00
Torkel Ödegaard
56ef7c4a4c
DataSourceSettings: Adds info box and link to Grafana Cloud (#30891)
* Updated

* DataSourceSettings: Adds info box and link to Grafana Cloud

* Updated wording

* Less words

* use variables

* Fixing ts issues

* fixed import
2021-02-04 11:12:20 +01:00
Jack Westbrook
3066b38c5e
Grafana-ui: fixes closing modals with escape key (#30745)
* feat(grafana-ui): add an escape key listener to Modal

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

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* feat(grafana-ui): add closeOnEscape prop to control Modal behaviour

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-02-03 17:01:29 +01:00
Uchechukwu Obasi
1f66b5c7a9
Chart/Tooltip: refactored style declaration (#30824)
* Chart/Tooltip: added theme variables and refactored style declaration

* added some changes

* removed useStyle hook since we're not using themes variables

* Added useStyle back since it memoizes the style generation
2021-02-03 12:50:02 +01:00
Jack Westbrook
4f684cc498
Grafana-ui: fixes no data message in Table component (#30821)
* Wip

* fix(grafana-ui): add no data message to Table component
2021-02-03 10:09:07 +01:00
Nathan Rodman
9b4d4915b0
grafana/ui: Update pagination component for large number of pages (#30151) 2021-02-03 10:00:13 +01:00
Leon Sorokin
b5400922e2
BarChart: inside-align strokes, upgrade uPlot to 1.6.4. (#30806) 2021-02-02 11:49:45 -06:00
Oscar Kilhed
99acad4448
GrafanaUI: Add a way to persistently close InfoBox (#30716)
* GrafanaUI: Add a way to persistently close InfoBox

InfoBox and FeatureInfoBox can take up a lot of screen realestate. This makes it easy to let the user close the boxes.

* Migrate InfoBox story to controls
2021-02-02 15:16:31 +01:00
Uchechukwu Obasi
ffc6eda351
FormField: migrated sass styling to emotion (#30392)
* merged conflicts

* added and utilised useStyle hooks

* Fixes snapshot test

* FormField: added grow property to component

* added a carriage return to index.scss

* properly sort props so the required props are at the top

* removed the grow props since it's not used

* fixes frontend test- I hope
2021-02-02 09:58:50 +01:00
Alex Khomenko
eb83135ba9
Grafana-UI: Add story/docs for ErrorBoundary (#30304) 2021-02-02 09:50:00 +02:00
Dominik Prokop
820866e425
GraphNG: add bar alignment option (#30499)
* GraphNG: add bar alignment option

* Fix builders
2021-02-01 14:54:10 +01:00
Torkel Ödegaard
a3d765830e
Menu: Mark menu components as internal (#30740)
* Menu: Mark menu components are internal

* Update

* minor fix
2021-02-01 13:41:36 +01:00
Uchechukwu Obasi
2552fdb730
TableInputCSV: migrated styles from sass to emotion (#30554)
* TableInputCSV: migrated styles from sass to emotion

* placed the getSyles function at the end of the file

* made some changes

* fixes small nit

* fixes small nit

* replaced classNames with emotions cx function

* Replaced textarea with TextArea component

* updated some changes

* removed return type annotation

* fixed small import nit
2021-02-01 11:46:47 +01:00
Ryan McKinley
26b168f7eb
BarChart: add alpha bar chart panel (#30323) 2021-01-29 12:52:52 -08:00
Andreas Opferkuch
7d4c51459f
TagsInput: Make placeholder configurable (#30718)
PLUS
- width prop isn't actually used and thus might give users of this component the wrong idea, so I removed it from the type (and in `DataSourceHttpSettings`)
- Added storybook props table
2021-01-29 17:19:15 +01:00
Ryan McKinley
db9a8bf04a
Transform: improve the "outer join" performance/behavior (#30407) 2021-01-28 14:00:28 -08:00
Zoltán Bedi
4147c3b907
Trace: trace to logs design update (#30637)
* Add new icon to custom icons

* Show button in span detail
2021-01-28 11:32:02 +01:00
Torkel Ödegaard
02f8a139db
PanelEdit: Get rid of last remaining usage of navbar-button (#30682) 2021-01-27 20:10:03 +01:00
Alex Khomenko
aad7d495ec
Grafana-UI: Fix setting default value for MultiSelect (#30671)
* Grafana-ui: Default value to undefned vs empty array

* Grafana-ui: Remove log

* Grafana-ui: Update tests
2021-01-27 19:10:18 +02:00
Uchechukwu Obasi
d472c7820c
CustomScrollbar: migrated styles from sass to emotion (#30506)
* CustomScrollbar: migrated styles from sass to emotion

* fixes frontend test

* updated changes

* fixed page props and applied changes to all occurences

* moved the getStyles function to the bottom of the file

* made some changes

* fixed snapshot test

* Revert "Merge branch 'refactor-customscrollbar-30354' of https://github.com/grafana/grafana into refactor-customscrollbar-30354"

This reverts commit c45ee30b6b297991a1628e9b21c4121dc78e376c, reversing
changes made to d2645534e3.

* improved props name

* made use of theme variables for style consistency

* fixed snapshot test and updated some theme changes

* removed hover effects from customScrollbar style

* made some changes

* updated some changes

* added label to class names

* changed to a functional component and improved styling

* fixes snapshot test

* fixes small nit

* minor tweaks

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-01-27 17:47:24 +01:00
Torkel Ödegaard
701ad79bb5
PageToolbar: Extracting navbar styles & layout into a modern emotion based component (#30588)
* Explore: Replaces navbar-button and overriden explore button css classes with ToolbarButton and cleans up scss & markup, removes ResponsiveButton

* Change live button text when paused

* For the dashboard toolbar button I need a transparent button so I refactored the states/variants into a new ToolbarButtonVariatn

* PageToolbar wip

* Progress

* Prgress

* Minor progress

* Fixed back button and responsive titles

* Fixed tv mode

* Updated

* support tv modes and playlist

* more progress

* Fixing lots of view states and responsive features

* Minor fixes

* review fixes

* Fixes to e2e tests

* Review fixes
2021-01-27 15:02:04 +01:00
Jack Westbrook
d2c88034e9
chore(grafana-ui): bump storybook to 6.1.15 (#30642) 2021-01-26 15:48:13 +01:00
Oscar Kilhed
b0b9158a1d
Grafana/UI: Unit picker should not set a category as unit (#30638)
* Grafana/UI: Unit picker should not set a category as a unit

When clicking categories for units the category is set as the unit until a leaf node is selected.
This change exposes the changeOnSelect property from rc-cascader and sets it to false for the unit picker.

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-01-26 13:42:08 +01:00
Oscar Kilhed
07bb6b8dae
Grafana/UI: Add disable prop to Segment (#30539)
* Grafana/UI: Add disable prop to Segment

SegmentSync, SegmentAsync and SegmentInput had the disable prop inherited from HTMLProp but it did not disable the component. The disable prop should now disable the component.

* Use InlineLabel instead of span and remove some sass-classes in Segments

* Change MetricsQueryEditor test to reflect new layout of AsyncSegment

* Use useStyles hook to get themed styles for segment inputs

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-01-26 09:53:39 +01:00
Torkel Ödegaard
80294b2dbf
TimeRangePicker: Updates components to use new ToolbarButton & ButtonGroup (#30570)
* WIP: Using new components

* Progress

* Everything looks to be working

* Explore: Replaces navbar-button and overriden explore button css classes with ToolbarButton and cleans up scss & markup, removes ResponsiveButton (#30571)

* Explore: Replaces navbar-button and overriden explore button css classes with ToolbarButton and cleans up scss & markup, removes ResponsiveButton

* Change live button text when paused

* Fixed story

* For the dashboard toolbar button I need a transparent button so I refactored the states/variants into a new ToolbarButtonVariatn

* Changing my mind on the transparent variant

* review fixes

* Review fixes
2021-01-25 14:01:54 +01:00
Torkel Ödegaard
f003232a80
Explore: Fix logs hover state so that it is visible and in dark mode & simply hover code (#30572) 2021-01-25 09:22:16 +01:00
Hugo Häggmark
c5279bba7f
RefreshPicker: Fixes so valid intervals in url are visible in RefreshPicker (#30474)
* RefreshPicker: Fixes so refresh intervals from url are visible in RefreshPicker

* Refactor: changes after PR comments

* Chore: adds comment
2021-01-25 08:37:41 +01:00
Zoltán Bedi
15683319e0
OldGraph: Fix height issue in Firefox (#30565) 2021-01-25 08:07:51 +01:00
Torkel Ödegaard
2a21f067b7
ButtonSelect & RefreshPicker: Rewrite of components to use new emotion based ToolbarButton & Menu (#30510)
* ButtonSelect: Trying to rewrite the button select to use ToggleButtonGroup & Menu

* minor update

* Progress

* Updated

* Moving all the explore scenarios into the refresh picker component

* Minor fixes

* Fixed responsive part of run button

* More minor fixes

* typescript fix

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

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

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

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Review feedback fixes and more

* Fixes small ts issue

* Updated return to dashboard button and tests, moved ButtonSelect out of LegacyForms

* fixed ts issue

* Fixed test

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-01-23 08:17:50 +01:00
Ryan McKinley
8c1a79f24b
XY Chart: share legend config with timeseries (#30559) 2021-01-22 13:25:39 -08:00
Ryan McKinley
f2327baf66
DataFrame: cache frame/field index in field state (#30529) 2021-01-22 10:18:46 -08:00
Peter Holmberg
9c20698dfe
Storybook: Migrate card story to use controls (#30535) 2021-01-22 16:09:50 +01:00
Leon Sorokin
92a0ad7273
GraphNG: uPlot 1.6.3 (fix bands not filling below 0). close #30523. (#30527) 2021-01-21 19:30:24 -08:00
Leon Sorokin
87ef5598e6
GraphNG: uPlot 1.6.2 (#30521) 2021-01-21 16:10:50 -06:00
Ivana Huckova
56fb04e94c
Explore: Update styling of buttons (#30493)
* Switch deprecared toggle group for radio buttons

* Create transparent version of field, label and witch

* Replace divs wiith components

* Move styling from scss to js

* Update buttons

* Remove log generating file

* Update level button
2021-01-21 15:49:38 +01:00
Dominik Prokop
ffa68f6f91
GraphNG: Disable Plot logging by default (#30390)
* Disable Plot loggging by default

* Fix
2021-01-21 15:04:00 +01:00
Hugo Häggmark
ffd39933d4
Admin: Fixes so whole org drop down is visible when adding users to org (#30481)
* Modal: Admin: Fixes so whole org drop down is visible

* Tests: fixes failing tests

* Chore: cleans up the return type

* Chore: changes after PR comments

* Chore: changes after PR comments
2021-01-21 13:59:46 +01:00
Torkel Ödegaard
5c8d662bfc
Footer: Fixes layout issue in footer (#30443)
* Footer: Fixes missing icon issue causing footer layout issue

* Another fix
2021-01-21 13:01:20 +01:00
Andrej Ocenas
31192cf7db
Chore: Restrict internal imports from other packages (#30453) 2021-01-21 09:04:31 +01:00
Andrej Ocenas
c7e6d14d34
grafana/ui: Fix internal import from grafana/data (#30439) 2021-01-20 17:17:11 +01:00
Oscar Kilhed
b40b134e4c
Dashboard: Remove template variables option from ShareModal (#30395)
* Dashboard: Remove template variables option and update style of ShareModal (#29191)

* Simplified design

* Changed to text area component for embed and replaced select with RadioButtonGroup

* Use primitive string instead of SelectableValue in the states

* Changed embed html TextArea to writable and added a copy to clipboard button

* Added some space between the buttons on the snapshot tab and removed unnessecary FieldSet elements

* Add descriptions to the tabs that were missing descriptions

* Capitalization of theme names

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-01-20 15:48:49 +01:00
Grot (@grafanabot)
3de0efff69
"Release: Updated versions in package to 7.5.0-pre.0" (#30428) 2021-01-20 12:36:11 +01:00
Dominik Prokop
2293ae2ef2
GraphNG: assume uPlot's series stroke is always a function (#30416) 2021-01-20 11:24:17 +01:00
Torkel Ödegaard
1d689888b0
Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files

* Update eslint plugin

* updated files
2021-01-20 07:59:48 +01:00
Ryan McKinley
f27450ed94
GraphNG: sort ascending if the values appear reversed (#30405) 2021-01-19 21:44:16 -08:00
Kyle Brandt
d4edcd1838
Expressions: Remove feature toggle (#30316)
* Expressions: remove feature toggle, add experimental badge
* Make button only show for backend and mixed data sources

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-01-19 14:18:06 -05:00
Andrej Ocenas
218a8de220
NodeGraph: Add node graph visualization (#29706)
* Add GraphView component

* Add service map panel

* Add more metadata visuals

* Add context menu on click

* Add context menu for services

* Fix service map in dashboard

* Add field proxy in explore linkSupplier

* Refactor the link creation

* Remove test file

* Fix scale change when view is panned

* Fix node centering

* Don't show context menu if no links

* Fix service map containers

* Add collapsible around the service map

* Fix stats computation

* Remove debug log

* Fix time stats

* Allow string timestamp

* Make panning bounded

* Add zooming by mouse wheel

* Clean up the colors

* Fix stats for single trace graph

* Don't show debug config

* Add more complex layout

* Update layout with better fixing of the root nodes

* Code cleanup

* Change how we pass in link creation function and some more cleanup

* Refactor the panel section into separate render methods

* Make the edge hover more readable

* Move stats computation to data source

* Put edge labels to front

* Simplify layout for better multi graph layout

* Update for dark theme

* Move function to utils

* Visual improvements

* Improve context menu detail

* Allow custom details

* Rename to NodeGraph

* Remove unused dependencies

* Use named color palette and add some fallbacks for missing data

* Add test data scenario

* Rename plugin

* Switch scroll zoom direction to align with google maps

* Do some perf optimisations and rise the node limit

* Update alert styling

* Rename function

* Add tests

* Add more tests

* Change data frame column mapping to use column names

* Fix test

* Fix type errors

* Don't show context menu without links

* Add beta status to panel

* Fix tests

* Changed function to standard methods

* Fix typing

* Clean up yarn.lock

* Add some UI improvements

- better styling of the zoom buttons
- disable buttons when max reached

* Fix panel references after rename

* Add panel icon
2021-01-19 16:34:43 +01:00
Alex Khomenko
506120bb81
Grafana-UI: Make Card story public (#30388)
* Grafana-ui: Enable customisable separator for metadata

* Grafana-ui: Make Card story public
2021-01-19 14:23:11 +02:00
Jack Westbrook
c0dd1b6d11
Dashboard: migrate version history list (#29970)
* refactor(dashboard): remove redundant directive code from SaveDashboardAsButton

* feat(dashboard): initial commit of rendering version history with react

* feat(dashboard): append versions, use historySrv, UI as functional components

* feat(dashboard): initial commit of versions settings diff view

* refactor(historylist): remove code related to listing versions

* refactor(dashboard): use angular directive to render version comparison

* refactor(dashboard): clean up versions settings

* refactor(dashboard): move version history UI components into own files

* refactor(dashboard): update typings for version history react components

* feat(dashboard): initial commit of react revert dashboard modal

* test(dashboardsettings): clean up historylistctrl tests

* chore(dashboardsettings): remove unused state variable

* test(dashboardsettings): initial commit of VersionSettings component tests

* feat(grafana-ui): add className concatenation on Checkbox label

* Apply suggestions from code review

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* test(dashboardsettings): add more tests for Versions Settings react component

* test(dashboardsettings): add test to assert latest badge in Version history table

* fix(dashboardsettings): pass string to getDiff instead of react event object

* test(dashboardsettings): remove failing test from versions settings

* Moved scroll area to content, and fixed colors

* Update public/app/features/dashboard/components/DashboardSettings/VersionsSettings.test.tsx

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* style(dashboardsettings): add new lines to versions settings tests

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-01-19 13:19:01 +01:00
Alex Khomenko
0fceca5f73
Search: use Card component (#29892)
* Search: Use Card component for search items

* Search: Set min height of search item

* Search: Adjust item height

* Search: Move tags to the right

* Search: Center item content

* Search: Align tags

* Search: Adjust Card spacing

* Search: Adjust dimensions
2021-01-19 13:42:59 +02:00
Ivana Huckova
086c77f5e3
Loki: Remove showing of unique labels with the empty string value (#30363)
* Remove empty unique label values

* Add test

* Simplify
2021-01-19 11:06:51 +01:00
Takahiro Suzuki
c95928a1d9
Explore: Fix a bug where Typeahead crashes when a large amount of ite… (#29637)
* Explore: Fix a bug where Typeahead crashes when a large amount of items is given

* Fix format

* Improve memory efficiency of flattenGroupItems
2021-01-19 10:38:46 +01:00
Ryan McKinley
9b7edd7a5c
grafana/ui: export TLS auth component (#30320) 2021-01-18 23:14:38 -08:00
Torkel Ödegaard
93a59561ba
GraphNG: Color series from by value scheme & change to fillGradient to gradientMode (#29893) 2021-01-18 19:48:45 +01:00
Dominik Prokop
f004655b7d
Chore: Remove not used PanelOptionsGrid component (#30358) 2021-01-18 17:49:49 +01:00
Jack Westbrook
3279a032c6
chore: bump lodash to 4.17.20 (#30359) 2021-01-18 17:22:25 +01:00
Torkel Ödegaard
abe808bcfd
ToolbarButton: New emotion based component to replace all navbar, DashNavButton and scss styles (#30333)
* ToolbarButton: New emotion based component to replace all navbar, DashNavButton and scss styles

* Component ready for use

* Dam dam dam

* Starting big button design update

* Tried to use main button component but failed

* Minor fix

* Updates

* Updated

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

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update packages/grafana-ui/src/components/Button/ButtonGroup.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Updated to use spacing base

* Button updates

* Removd unused import

* Remove unused import

* Use correct theme variable for border-radius

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-01-18 17:16:35 +01:00
Torkel Ödegaard
c0cddc303a
Badge: Increase contrast, remove rocket icon for plugin beta/alpha state (#30357)
* Badge: Increase contrast, remove rocket icon for plugin beta/alpha state

* Remove icons to simplify design

* Adding warning icons back
2021-01-18 17:16:11 +01:00
Andrej Ocenas
6a2b0dde63
Grafana-ui: Fix context menu item always using onClick instead of href (#30350) 2021-01-18 12:07:48 +01:00
Torkel Ödegaard
e54e997801
Badge: Design improvement & reduce contrast (#30328)
* Badge: Design improvement & reduce contrast

* light theme border tweak

* Updated snapshot
2021-01-18 11:51:27 +01:00
baijunyao
8a5c4f46ce
Fix HTML character entity error (#30334) 2021-01-17 10:31:52 +02:00
Leon Sorokin
9d4769fd74
GraphNG: fix fillBelowTo regression (#30330) 2021-01-16 10:32:26 -06:00
Leon Sorokin
803fe70c3e
GraphNG: implement softMin/softMax for auto-scaling stabilization. close #979. (#30326) 2021-01-16 08:24:13 -06:00
Torkel Ödegaard
002ef5e8be
Legend: Fixes right y-axis legend from being pushed outside the bounds of the panel (#30327) 2021-01-16 14:09:05 +01:00
Ryan McKinley
8aba480a21
GraphNG: support fill below to (bands) (#30268) 2021-01-15 11:03:41 -08:00
Zoltán Bedi
b649bfc270
Prometheus: Add support for Exemplars (#28057)
* Fix typos

* Query exemplars API

* Add link to traceID

* Update exemplar to show more information

Reduce exemplars density

* Fix typos

* Query exemplars API

* Add link to traceID

* Update exemplar to show more information

Reduce exemplars density

* Update GraphNG legend type

* Show new graph component in Explore

* Add exemplar annotation a design update

* Graph panel not to show red line annotation

Exemplar plugin to use y value

* Address review comments

* Density filter for exemplars

* Update schema of exemplars

* Density filter with y-value sampling

* Enforce axis scales to include 0

* Changes after merge with master

* Show metrics when there is no result

* Decorators tests fix

* ExemplarMarker to receive component prop

* Remove context menu from explore graph

* Add color to graph

* Update explore graph panel

* Update graph config to use default values

* Fix data source tests

* Do not show exemplars outside of graph

* Add exemplars switch

* Fix typos

* Add exemplars query only when enabled

* Show graph in explore without filling it

* Update exemplars plugin y value scale selection

* Update tests

* Add data source picker for internal linking

* Increase pointSize for better visibility

* Fix explore e2e test

* Fix data link title variable interpolation

* Use new switch component in PromExemplarField

* Move FieldLink component to new file

* Convert exemplar to datalink

* Add legend toggling logic to Explore

* Add legend toggling to Explore

* Address Ivana's feedback

* Address Andrej's comments

* Address Gio's feedback

* Add tests for result_transformer

* Fix eslint issues

* Change sampler formula for better readability

Co-authored-by: David Kaltschmidt <david@leia.lan>
Co-authored-by: David Kaltschmidt <david@leia.fritz.box>
Co-authored-by: David Kaltschmidt <david.kaltschmidt@gmail.com>
2021-01-15 16:20:20 +01:00
Bogdan Matei
46167785e6
Grafana-UI: Enhances for TimeRangePicker and TimeRangeInput (#30102) 2021-01-15 16:53:57 +02:00
Torkel Ödegaard
32758e7cf0
Table: Fixes BarGauge cell display mode font size so that it is fixed to the default cell font size (#30303) 2021-01-15 15:35:17 +01:00
Dominik Prokop
a94c256516
GraphNG: remove y-axis position control from series color picker in the legend (#30302) 2021-01-15 14:24:21 +01:00
Dominik Prokop
f5dfb3b24b
GraphNG: stats in legend (#30251)
* StatsPickerEditor - add more config to the options ui

* Show calcs in the legend

* Refactor the way legend items are created

* Progress on refresh

* Migration update

* Use human-readable names in the legend stats

* Disable pointer cursor in table header
2021-01-15 09:14:50 +01:00
Alex Khomenko
61b9d811cb
Grafana UI: EmptySearchResult docs (#30281)
* Grafana-UI: Remove sass

* Grafana-UI: Add story/docs
2021-01-15 09:29:44 +02:00
Ivana Huckova
60828316c0
Fix spinner and broken buttons (#30286) 2021-01-14 20:05:38 +01:00
Torkel Ödegaard
d10dbc70a1
Icons: Adds custom icon support ands new panel and interpolation icons (#30277)
* Icons: Adds custom icon support ands new panel and interpolation icons

* Removed icon files

* updated snapshot

* Updates
2021-01-14 15:07:19 +01:00
Andrej Ocenas
9bb516e4e5
Grafana-ui: Allow context menu items to be open in new tab (#30141) 2021-01-14 14:18:41 +01:00
Marcus Andersson
382c75d0db
GraphNG: added support to change series color from legend. (#30256)
* added support for changing color of series.

* removed dependency on internal type.
2021-01-14 13:54:21 +01:00
Alex Khomenko
b48ac0dc53
Grafana-UI: Add story/docs for FilterPill (#30252)
* Grafana-UI: Add story/docs for FilterPill

* Grafana-UI: Update args
2021-01-14 09:55:49 +02:00
Alex Khomenko
b8d84092bb
Grafana-UI: Add story/docs for Counter (#30253)
* Grafana-UI: Add story/docs for Counter

* Grafana-UI: Fix naming
2021-01-14 09:09:08 +02:00
Leon Sorokin
6ce5740e64
GraphNG: uPlot 1.6, hide "Show points" in Points mode, enable "dot" lineStyle (#30263) 2021-01-13 18:33:18 -06:00
Jack Westbrook
24cfab6c7f
Chore: bump rollup across all packages (#29486)
* chore(packages): bump all rollup dependencies

* chore: refresh yarn.lock

* build(rollup): remove namedExports from config

* chore(packages): downgrade rollup so grafana-ui builds
2021-01-12 16:51:09 +01:00
Torkel Ödegaard
5b022a1c75
Legends: Refactoring and rewrites of legend components to simplify components & reuse (#30165)
* Legends: Refactoring and rewrites of legend components to simplify components & reuse

* Removed onSeriesAxisToggle

* More removal of onSeriesAxisToggle and storybook improvements

* Added story with legend values

* Move table legend styles from inline to defined in stylesFactory

* Update styles

* Change to circle

* Updated style to fat line

* Rename to VizLegend

* More renamed and fixes / polish

* Removed imports

* Minor change

* Updates

* Updates
2021-01-12 15:58:46 +01:00
Torkel Ödegaard
ed69edbb94
GraphNG: Hide grid for right-y axis if left x-axis exists (#30195)
* GraphNG: Hide grid for right-y axis

* Correct fix so it works if you just a right x-axis

* Removed import
2021-01-12 09:35:13 +01:00
Jack Westbrook
a4e49e4a9b
docs(badge): migrate story to use controls (#30180) 2021-01-11 16:32:10 +01:00
Torkel Ödegaard
b342e4f044
InlineSwitch: Minor story fix (#30186)
* InlineSwitch: Minor story fix

* Fix e2e test
2021-01-11 14:44:48 +01:00
Torkel Ödegaard
c0eadeba3a
Gauge: Fixes issue with all null values cause min & max to be null (#30156) 2021-01-11 13:25:08 +01:00
Torkel Ödegaard
7c4a597f4d
CleanUp: Removed old panel options group component (#30157)
* Removed unused component

* Remove scss import
2021-01-11 13:21:13 +01:00
Dmitry
7da8a12609
Chore: Fix spelling issue (#30168) 2021-01-11 11:27:28 +01:00
Torkel Ödegaard
314865dd88
InlineSwitch: Added missing InlineSwitch component and fixed two places that used unaligned inline switch (#30162)
* InlineSwitch: Added missing InlineSwitch component and fixed two places that used unaligned inline switch

* Fixed e2e tests
2021-01-11 10:50:17 +01:00
Ryan McKinley
549587a3c1
GraphNG: add new alpha XY Chart (#30096) 2021-01-10 22:57:48 -08:00
Torkel Ödegaard
ba158e72df
GraphNG: Minor polish & updates to new time series panel and move it from alpha to beta (#30163)
* GraphNG: Minor polish & updates to new time series panel

* Fixed gradient default

* Updated snapshot
2021-01-10 17:41:20 +01:00
Leon Sorokin
d65f7346a7
GraphNG: check cross-axis presence when auto-padding. close #30121. (#30126) 2021-01-07 17:27:15 -06:00
Ryan McKinley
71e93e521b
GraphNG: support dashes (#30070) 2021-01-07 09:59:21 -08:00
Leon Sorokin
dba4942edf
GraphNG: fix spanGaps optimization in alignDataFrames(). see #30101. (#30118) 2021-01-07 11:54:22 -06:00
Torkel Ödegaard
1c808be0f3
QueryEditorRow: Ability to change query name (#29779)
* QueryEditorRow: Ability to change query name

* Style tweaks

* Updated UX

* Fixed tests

* Added validation messages

* Fixed keyboard navigation

* Updated tests
2021-01-07 15:33:15 +01:00
Hugo Häggmark
b6efebd92c
Elastic: Fixes so templating queries work (#30003)
* Elastic: Fixes so templating queries work

* Chore: fixes test

* Fix: fixes getFields from metricFindQuery
2021-01-07 10:26:56 +00:00
Marcus Andersson
7aa6926ef6
GraphNG: adding possibility to toggle tooltip, graph and legend for series (#29575) 2021-01-06 12:40:32 -08:00
Dominik Prokop
e8e1c1402f
GraphNG: bring back tooltip (#29910) 2020-12-17 16:57:11 +01:00
Torkel Ödegaard
d066da42f8
Dashboard: Migrating dashboard settings to react (#27561)
* Dashboard: Started migrating dashboard settings

* Restore general settings from angular

* Use react permissions component

* feat(dashboard): add react LinksSettings wrapper for dash-links-editor

* feat(dashboard): add react VersionsSettings wrapper for gf-dashboard-history

* refactor(dashboard): replace DashboardPermissions connectWithStore with connect

* chore(dashboard): folderInfo as undefined

* feat(dashboard): initial commit of dashboard settings json editor

* feat(dashboard): introduce save json functionality

* chore(dashboard): delete obsolete imports

* feat(dashboard): add save and save as buttons to settings nav

* feat(dashboard): add react wrapper for annotations settings

* chore(dashboard): put back canDelete for general settings delete button

* Make editable

* Remove makeEditable from SettingsCtrl

* feat(dashboard): show json editor save button if canSave

* refactor(dashboard): move hasUnsavedFolderChange to dashboard.meta

* feat(dashboard): render hasUnsavedFolderChange view in permissions settings

* feat(dashboard): reset hasUnsavedFolderChange on settingg save success

* feat(dashboard): refresh route on sucessful settings save

* test(dashboard): update snapshots

* refactor(dashboard): automatically infer connected props for dashboard permissions

* refactor(dashboard): give dashboard versions checkboxes some padding

* Update public/app/types/folders.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2020-12-17 15:50:11 +01:00
Dominik Prokop
332f2f1ae8
Field Config API: Add ability to hide field option or disable it from the overrides (#29879)
* Add ability to hide field option or disable it from the overrides

* Rename options

* Tests
2020-12-17 09:20:47 +01:00
Ryan McKinley
8250b59dfe
GraphNG: support fill gradient (#29765) 2020-12-16 11:17:56 -08:00
Torkel Ödegaard
1506ec7bfc
InlineForms: Changes to make inline forms more flexible for query editors (#29782)
* Chore: Remove internal import for QueryEditorRow

* WIP inline forms fixes

* Added segment group component

* Added component status doc tag

* Chore: add as prop to InlineLabel to control rendered element (#29876)

* Use div for InlineLabel & fix iconbuttons positioning

Co-authored-by: Elfo404 <gio.ricci@grafana.com>
2020-12-16 15:14:19 +01:00
Alex Khomenko
3a27dc55eb
Move colors demo under theme colors (#29873) 2020-12-16 10:51:45 +02:00
Leon Sorokin
75761bf67b
GraphNG: uPlot 1.5.2, dynamic stroke/fill, Flot-style hover points (#29866)
* upgrade uPlot 1.5.2 (dynamic stroke & fill, cursor.points API)

* flot-style hover points

* fix tests?
2020-12-16 07:22:25 +01:00
Ryan McKinley
6cc6a7822d
GraphNG: only initialize path builders once (#29863) 2020-12-15 19:23:51 -06:00
Torkel Ödegaard
4e1cab1e69
GraphNG: Do not set fillColor from GraphNG only opacity (#29851)
* GraphNG: Do not set fillColor from GraphNG only opacity

* use color settings if they exist

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-12-15 21:50:40 +01:00
Alex Khomenko
8d9b4e4ac2
Display palette and colors for dark and light themes in storybook (#29848) 2020-12-15 17:40:24 +02:00
Ivana Huckova
356fa0dce6
Explore/Logs: Correctly display newlines in detected fields (#29541)
* Fix using of newlines in detected fields

* Wrapping depends on main selection

* Update props to be optional

* Add missing wrapLogMessage prop to test
2020-12-15 14:43:12 +01:00
Hugo Häggmark
5f4b528122
Select: Changes default menu placement for Select from auto to bottom (#29837)
* Select: Changes default menuPlacement from auto to bottom

* Tests: Fixes snapshot
2020-12-15 12:46:31 +01:00
Dominik Prokop
69b05aae46
GraphNG: Context menu (#29745)
* Refactor Context menu and add Menu component to grafana/ui

* ContextMenuPlugin WIP

* Fix docs issues

* Remove Add annotations menu item from graph context menu

* ts ifx
2020-12-15 10:53:04 +01:00
Dominik Prokop
92527c2647
GraphNG: Enable scale distribution configuration (#29684)
* Enable scale distribution configuration

* use uPlot's rangeLog() instead of rangeNum() for log scales

* merge master

* Remove unsupported log bases

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-12-15 10:18:30 +01:00
Torkel Ödegaard
b8025c7702
Sparkline: Fixes issue with sparkline that sent in custom fillColor instead of fillOpacity (#29825)
* Sparkline: Fixes issue with sparkline that sent in custom fillColor instead of fillOpacity

* Updated
2020-12-15 09:56:09 +01:00
Dominik Prokop
e33c7cfbd2
GraphNG: Load uPlot path builders lazily (#29813) 2020-12-14 15:45:03 +01:00
Alex Khomenko
8587e9fe6c
Grafana-UI: Support optgroup for MultiSelect (#29805)
* Grafana-UI: Support optgroup for MultiSelect

* Update packages/grafana-ui/src/components/Select/Select.story.tsx

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-12-14 15:11:25 +02:00
Torkel Ödegaard
98c0b09564
Sliders: Update behavior and style tweak (#29795)
* Sliders: Update behavior and style tweak

* More style tweaks, and changed new graph opacity option from 0 - 1 to 1 to 100

* Updated point size max

* Fixed hooks useCallback dependency issue

* Update test
2020-12-14 11:34:12 +01:00
Andrej Ocenas
d5a5461ced
Grafana-ui: Fix collapsible children sizing (#29776) 2020-12-14 09:51:59 +01:00
Leon Sorokin
755715fb64
GraphNG: uPlot 1.5.1 (#29789) 2020-12-12 00:54:37 -06:00
Leon Sorokin
77d6100b44
GraphNG: update uPlot v1.5.0 (#29763) 2020-12-11 11:01:55 -08:00
Jeremy Alvis
f021f97c31
DataSourceSettings: Add servername field to DataSource TLS config (#29279)
* DataSourceSettings: Add servername field to DataSource TLS config

A DNS lookup URL can be provided in the DataSource URL field in order
to dynamically load balance between multiple instances of a DataSource.
When using mutual TLS, Golang's TLS config implementation checks that
the certificate's common name (< 1.15) or subject alternative name
(>= 1.15) has the same value as the domain being accessed. If the DNS
entry is dynamically generated for a specific environment, the
certificate cannot be generated with a name matching the dynamic
DNS URL. As such, Golang offers a servername field that can be set to
overwrite what value is used when checking against the certificate's
common name (or subject alternative name). Without this change, Skip
TLS Verify must be set to true in order for the DataSource to work,
removing some of the benefits gained by using mutual TLS.

This commit adds the ability to set Grafana's internal Golang TLS config
servername field from the UI or a provisioned DataSource.

The servername field is optional and the existing behavior is retained if
the field is not set.

Co-authored-by: Dana Pruitt <dpruitt@vmware.com>
Co-authored-by: Jeremy Alvis <jalvis@pivotal.io>

* Update docs with PR review changes

Co-authored-by: Jeremy Alvis <jalvis@pivotal.io>
Co-authored-by: Dana Pruitt <dpruitt@vmware.com>

* Update with additional PR requested changes

* Minor updates based on PR change requests

Co-authored-by: Dana Pruitt <dpruitt@vmware.com>
2020-12-10 16:07:05 +01:00
Domas
70d68c156d
Logging: log frontend errors caught by ErrorBoundary, including component stack (#29345)
* log component stack on error boundary

* test for error boundary

* PR feedback fixes
2020-12-10 10:50:37 +01:00
Uchechukwu Obasi
4ea2c7d2b1
ChangePassword: improved keyboard navigation (#29567)
* ChangePassword: improved keyboard navigation

* updated skip button with appropriate tag

* applied box shadow to skip button
2020-12-10 09:41:44 +01:00
Will Browne
31d64d9074
Auth: Add SigV4 header allowlist to reduce chances of verification issues (#29650)
* enforce allowlist

* fix default auth selection

* add Host and comment
2020-12-09 10:45:57 +01:00
Ryan McKinley
770e8e4a0b
DataFrame: add path and description metadata (#29695) 2020-12-08 17:36:09 -08:00
Ryan McKinley
3ce93050e0
GraphNG: replace bizcharts with uPlot for sparklines (#29632) 2020-12-08 08:13:12 -08:00
Torkel Ödegaard
a4953bb65a
RadioButton: Fix flex issue in master for radio buttons (#29664) 2020-12-08 09:08:06 +01:00
Leon Sorokin
fee0d44e5c
GraphNG: rename "points" to "showPoints" (#29635)
* rename "points" to "showPoints"

* rename ShowPoints enum to PointVisibility
2020-12-07 09:29:34 -06:00
Ryan McKinley
4e4211965e
GraphNG: time range should match the panel timeRange (#29596)
* match time range

* less logging

* almost working

* more logging

* more logging

* fix snapshot

* Use layout effect for the time range ref update

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-12-07 14:48:10 +01:00
Dominik Prokop
56e7ce6f16
GraphNG: Fix annotations and exemplars plugins (#29613) 2020-12-07 09:16:13 +01:00
Leon Sorokin
2d156a385b
GraphNG: fix and optimize spanNulls (#29633)
* fix and optimize spanNulls

* AsZero implies spanNulls = true, to prevent null-scanning

* move spanNulls toggle below fillOpacity
2020-12-06 19:26:00 -06:00
Leon Sorokin
2f92794c94
GraphNG: rename GraphMode to DrawStyle (#29623) 2020-12-04 13:08:25 -06:00
Ryan McKinley
a36bd89581
GraphNG: add spanNulls config option (#29512) 2020-12-04 10:38:45 -08:00
Ryan McKinley
716117b7da
Stat/Gauge: expose explicit font sizing (#29476) 2020-12-04 10:03:59 -08:00
Leon Sorokin
7236a44a4f
GraphNG: add gaps/nulls support to staircase & smooth interpolation modes (#29593) 2020-12-04 08:33:04 -08:00
Peter Holmberg
f9c8d5ab49
grafana/ui: Migrate Field knobs to controls (#29433)
* migrate knobs to controls

* default value for error

* some fix after review
2020-12-04 17:06:40 +01:00
Giordano Ricci
bb45f5fedc
Elasticsearch: Migrate queryeditor to React (#28033)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-12-04 14:29:40 +00:00
Torkel Ödegaard
3d6380a0aa
QueryGroup & DataSourceSrv & DataSourcePicker changes simplify usage, error handling and reduce duplication, support for uid (#29542)
* Starting moving more stuff into data source picker

* WIP progress

* Progress on datasource picker rethink

* Things are working now some details to figure out

* Removed commented part

* Complex work on getting data source lists

* Fixed variable support showing correct data sources

* Tried fixing dashboard import but failed

* Fixes

* Fixed import dashboard

* Fixed unit test

* Fixed explore test

* Fixed test

* Fix

* fixed more tests

* fixed more tests

* fixed showing which option is default in picker

* Changed query variable to use data source picker, updated tests and e2e

* Fixed more tests

* Updated snapshots, had wrong typescript version
2020-12-04 14:24:55 +01:00
Dominik Prokop
563478ece7
GraphNG: Fix issues with plugins not retrieving plot instance (#29585)
* Fix issues with plugins not retrieving plot instance

* Review
2020-12-04 12:44:46 +01:00
Jack Westbrook
55d536c6bc
Grafana/ui: Storybook controls understand component types (#29574)
* feat(grafana-ui): use storybook docgen over webpack config

* chore(grafana-ui): bump storybook to latest (6.1.9)
2020-12-04 10:10:47 +01:00
Andreas Opferkuch
a7bdc059c1
@grafana/ui: Add bell-slash to available icons (#29579)
Used in Alerting UI for alert silencing.
2020-12-03 18:14:04 +01:00
Torkel Ödegaard
fa64d7ece4
Alert: Fix forwardRef warning (#29577) 2020-12-03 17:35:34 +01:00
kay delaney
56db402d0f
Chore: Upgrade typescript to 4.1 (#29493)
* Chore: Upgrade typescript to 4.1
2020-12-03 15:05:59 +00:00
Ryan McKinley
3c9310e93c
GraphNG: support auto and explicit axis width (#29553)
* auto axis

* auto axis

* expand everyhting with the same scale/unit

* expand everyhting with the same scale/unit
2020-12-03 09:30:40 +01:00
Leon Sorokin
22ec38b043
GraphNG: Bars, Staircase, Smooth modes (#29359)
* initial impl of Bars, Staircase, Smooth modes

* fix fillTo for staircase and smooth paths

* fix pointSize

* [bars] adjust gap factor & reduce bar width to include stroke width. remove rounding to favor gap & width uniformity over edge crispness.

* remove line path fallback for too-dense data

* "Auto" points mode implies "Never" for Bars

* slightly reduce x axis tick density

* fix bars height calc, make bars crisp again.

* [bars] don't use hard-coded 'x' scale key

* refactor catmullRomFitting() to accept x & y coord arrays. restrict to processing only visible data range.

* move path building functions to own file

* export typed functions

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-12-02 16:41:24 -06:00
Dominik Prokop
974233bf81
Graph NG: Invalidate uPlot config on timezone changes (#29531) 2020-12-02 14:21:39 +01:00
Ivana Huckova
2a61d7ff9f
IntelliSense: Fix autocomplete and highlighting for Loki, Prometheus, Cloudwatch (#29381)
* Pass languages directly to SlatePrism plugin

* Update

* Remove unused variables

* Update packages/grafana-ui/src/components/DataLinks/DataLinkInput.tsx

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* Update public/app/plugins/datasource/prometheus/components/PromQueryField.tsx

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* Update public/app/plugins/datasource/prometheus/components/PromQueryField.tsx

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* Update public/app/plugins/datasource/loki/components/LokiQueryFieldForm.tsx

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* Update public/app/plugins/datasource/cloudwatch/components/LogsQueryField.tsx

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* Try Prism import instead of languages

* Update webpack

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2020-12-02 14:09:55 +01:00
Uchechukwu Obasi
88b1517794
Icon: Changed the icon for signing in (#29530)
* Icon: changed the icon for signing in

Signed-off-by: Uchechukwu Obasi <obasiuche62@gmail.com>

* fixes test-frontend (I hope)
2020-12-02 13:50:53 +01:00
Dominik Prokop
1ac02390e2
GraphNG: simplify effects responsible for plot updates/initialization (#29496)
* Add test coverage for uPlot initialization and data updates

* fix ts

* WIP

* I see some light in the tunel

* Tests update

* Fix rendering before hooks are evaluated
2020-12-02 12:22:49 +01:00
Chi-Hsuan Huang
73518bf1e7
Chore: Enable remaining eslint-plugin-react rules (#29519)
* Chore: Enable eslint react/no-render-return-value rule

Eanble the rule and remove the unused render return

part of: #29201

* Chore: Enable eslint react/no-children-prop rule

Not linting issues after turning on this. No other file changes requried

part of: #29201

* Chore: Enable eslint react/no-unknown-property rule

Correct enable-background to enableBackground

part of: #29201

* Chore: Enable eslint react/no-unescaped-entities rule

Replaced " with &quot; replaced ' with &apos;

part of: #29201
2020-12-02 10:03:37 +01:00
Uchechukwu Obasi
53cd59a5a5
Datasources: fixed long error message overflowing container (#29440)
* Fixed: error message overflow container

Signed-off-by: Uchechukwu Obasi <obasiuche62@gmail.com>

* used min-width property for better styling

Signed-off-by: Uchechukwu Obasi <obasiuche62@gmail.com>

* Switched to Alert component

* Fixed passing aria-label to Alert component

* Fixed e2e test (I hope)

* another attempt to fix e2e

* Fixed display name

Co-authored-by: Uchechukwu Obasi <obate@Uchechukwus-MacBook-Pro.local>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-12-02 09:30:28 +01:00
Torkel Ödegaard
34f2a72ff2
DataLinks: Removes getDataSourceSettingsByUid from applyFieldOverrides (#29447)
* DataLinks: Removes getDataSourceSettingsByUid from applyFieldOverrides and data linking code

* Fixed test

* Fixed a few tests

* Fixed unit tests

* Removed old getDataSourceSettingsByUid from interface, still there for runtime backward compatability
2020-12-01 19:10:23 +01:00
Chi-Hsuan Huang
546f569e0c
Chore: Enable eslint-plugin-react partial rules (#29428)
* Chore: Enable eslint react/display-name

Enable react/display-name and fixed the corresponding linting issue

part of: #29201

* Chore: Enable eslint react/no-deprecated

Enable react/no-deprecated and add the UNSAFE_ prefix for deprected methods

part of: #29201

* Chore: Enable eslint react/no-find-dom-node

Enable react/no-find-dom-node rule and use ref instead

part of: #29201

* Test: Update TeamGroupSync test snapshot

Since we added the displayName for ToolTip compontent and tag name is changed.

* Fix: Fixed ClickOutsideWrapper render

The props.children might contains numbers of nodes which make cloneElement failed. Change to simply use a div to wrapper
the children and assign the ref to div for this feature

* Style: Use shorthand method definition style for inline component

* Fix: Rebase master and fix linting

Rebase from master branch and fix new displayName linting warning
2020-12-01 16:19:52 +01:00
Totalus
754aca25c5
Transformation: added support for excluding/including rows based on their values. (#26884)
* Adding FilterByValue transformer skeleton

* Connecting options with Editor

* Improving UI and making deep copy of options on change.

* Improving Transformation Editor UI

* Implementing Regex filtering

* Adding valueFilters.ts and creating filter registry

* Connecting the test function

* Correcting TypeScript errors

* Using FilterInstance instead of simple Filter test function

* Adding field.type as filter options

* Improving UI. Adding custom placeholder depending on filter.

* Implementing a few more filter types

* Implementing more filters

* Return original data if no filter were processed

* Improving UI

* Correcting TS errors

* Making sure inequality transform are invalid until the filterExpression is not empty

* Cleanup in the UI file

* Improving UI (highlight invalid fields)

* Only show filterType that are supported for the selected field

* Adding tests + correction of a filter

* Adding transformer test

* Adding doc

* Cleanup

* Typing props for FilterSelectorRow component

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Moving rendering in the JSX

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Memoizing filterTypeOptions computation

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Improve code compactness

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Cleanup + solving TS errors

* Updating some labels

* Wrapping stuff around useMemo and useCallback

* Using cloneDeep from lodash

* Don't highlight field name input if null

* Removing time type fields in selectable options

* We want loose equality in this scenario.

* Adding `onChange` to useCallback dependencies

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Include or exclude matching any or all conditions

* Correcting field name matching

* Cleanup

* Don't highlight the filterExpression input when its empty

* Adding Range filter

* Updating doc

* Correcting TS error

* Only showing the Match All/Match Any option if more than one condition

* Two inputs for the Range filter instead of one

* Improving invalid highlight for Range filter type

* Cleanup

* Improving labels in UI

* Using ButtonSelect to improve UI

* editor UI updates.

* Updating tests

* Adding component for Regex

* Improve TS typing

* Adding components for the other filter types.

* Cleanup

* Correct error

* Updating valueFilter.test.ts

* Updating filterByValue.test.ts

* Reverting and removing Range filter

* Update docs/sources/panels/transformations.md

* starting to implement poc.

* added a small poc.

* wip

* added tests.

* added structure for dynamic value matcher editors.

* added more support.

* added some more value matchers.

* removed unused value filters.

* added some more matchers.

* adding more matchers.

* added a range matcher.

* fixing some tests.

* fixing tests.

* remove unused dep.

* making the matching a bit more performant.

* UX improvements and alignment fixes

* fixed delete button.

* fixed some spacing in the UI.

* added docs for matchers.

* adding docs and exposing value matcher types.

* will store dateTime as string.

* updated docs according to feedback.

* moved filter by value in transformation list.

* Improved description.

* added regex value filter.

* added support for regex.

* fixing failing tests.

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-12-01 10:22:37 +01:00
Marcus Andersson
cbb2c0a5d8
Field overrides: added matcher to match all fields within frame/query. (#28872) 2020-12-01 09:38:35 +01:00
Ryan McKinley
097dcc456a
MinMax: keep global min/main in field state (#29406) 2020-11-29 09:22:16 -08:00
Torkel Ödegaard
98d753d36d
Jest: Upgrade to latest (#29450) 2020-11-29 08:32:26 +01:00
Jack Westbrook
3f6a2c29c9
Chore: bump grafana-ui rollup dependencies (#29315)
* chore(grafana-ui): bump rollup dependencies

* update yarn lock

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Drone <drone@grafana.com>
2020-11-29 08:05:23 +01:00
Leon Sorokin
61d6dcf9ce
GraphNG: use uPlot's native ms support (#29445) 2020-11-27 17:06:57 -06:00
Ryan McKinley
9dbf54eb61 GraphNG: support x != time in library (#29353) 2020-11-25 10:37:18 -08:00
Zoltán Bedi
f73c9dcec8
Update yarn.lock to use latest rc-util (#29313) 2020-11-25 10:24:00 +01:00
Hugo Häggmark
04d857dfe6
Variables: Adds description field (#29332)
* Variables: Adds description field

* Refactor: Adds new Form components

* Refactor: Fixes aria labels

* Refactor: removes skipped tests

* Refactor: Breaks out smaller select components

* Refactor: removes gf-form div

* Refactor: Breaks up several more selects into smaller components

* Chore: Fixes typings
2020-11-25 10:21:48 +01:00
Jack Westbrook
0fc8426bf1
Chore: Bump storybook to v6 (#28926)
* Wip

* feat: get storybook and app building locally

* docs: comment webpack react alias

* build(grafana-ui): put back ts-loader

* build: prefer storybook essentials over actions and docs. bump dark-mode

* chore(storybook): migrate to latest config

* build: prevent test env throwing Invalid hook call errors

* chore: lodash resolves to package dependency rather than project

* use decorators as variable instead of function

* perf(storybook): reduce bundling time by splitting type check and compilation

* refactor(storybook): use sortOrder.order param to sort intro story first

* build: use yarn workspace command

* refactor(storybook): use previous knobs addon registration

* migrate button story to controls

* build(storybook): silence warnings in console

* build: bump storybook related ts packages

* style: remove trailing whitespace

* refactor(graphng): export interface for storybook

* controls migration guide

* fix typo

* docs(storybook): default docs to use dark theme as per current implementation

* revert(grafana-ui): put back react-is namedExport

this was changed for react 17 bump but causes rollup to fail during bundling

* chore: bump storybook to 6.1, enable fastRefresh, silence eslint prop-types

* docs(grafana-ui): move knobs -> controls migration guide to storybook style-guide

* chore(storybook): silence terminal warning about order of docs addon

* Update contribute/style-guides/storybook.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Apply documentation suggestions

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* chore(storybook): bump to 6.1.2

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2020-11-24 10:38:41 +01:00
Ivana Huckova
83329ae7e4
Explore/Logs: Update Parsed fields to Detected fields (#28881)
* Change all parsed fields and functions to detected fields

* Update

* Sneak in UI improvement, add tooltip

* Update docs/sources/whatsnew/whats-new-in-v6-5.md

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

* Update docs/sources/whatsnew/whats-new-in-v6-5.md

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

* Remove changes from old Whats new

* Rename LogMessageParsed

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-11-23 20:10:09 +01:00
Dominik Prokop
7e21863982
GraphNG: Init refactorings and fixes (#29275)
* When comparing field config, shallowly compare custom config

* Refactoring plot init and data update (WIP)

* GraphNG: Fixed points mode

* Fixed min & max from frame config

* Fixed axis left / right auto logic

* Minor tweak to cursor color

* Fixed time axis now that uPlot deals in milliseconds as well

* fixed ts issue

* Updated test

* Fixed axis placement logic again

* Added new unit test for axis placement logic

* Removed unused props

* Fixed zoom issue due to uPlot time resolution change

* Add back millisecond time tick support

* Comment out GraphNG test

* Fixed being able to switch legend on/off

* Updated unit tests

* GraphNG: Fixed hiding axis

* Frame comparison: allow skipping properties

* Update y-axis ranges without reinitializing uPlot

* update snap

* GraphNG: Fixed axis label placement and spacing issues

* update snaps

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-11-23 19:07:02 +01:00
Leon Sorokin
917b5c5f2a
[graph-ng] add temporal DataFrame alignment/outerJoin & move null-asZero pass inside (#29250)
[GraphNG] update uPlot, add temporal DataFrame alignment/outerJoin, move null-asZero pass inside, merge isGap updates into u.setData() calls.

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-11-20 23:49:36 -06:00
Dominik Prokop
671b319315
Fix warnings for conflicting style rules (#29249)
* Bump popper

* Bump react-transition group

* Fix react conflicting style ruls warning

* Fix ts
2020-11-20 08:12:42 +01:00
Torkel Ödegaard
57592de4b1
BarGauge: Fix story for BarGauge, caused knobs to show for other stories (#29232) 2020-11-19 15:53:49 +01:00
Alex Khomenko
2c4899a4cd
Grafana UI: Card API refactor (#29034)
* Refactor API

* Fix types

* Cleanup

* Remove useMemo

* Update actions

* Update story

* Align secondary actions

* Replace snapshot tests

* Update docs

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

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* Allow overriding child props

* Fix types and remove alpha tags

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2020-11-19 09:48:56 +02:00
Torkel Ödegaard
ec218de05e
React: Upgrading react to v17, wip (#29057)
* React: Upgrading react, wip

* build(grafana-ui): bump react to v17

* build: get enzyme running with react 17

* chore(grafana-ui): declare isMemo namedExport for rollup

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2020-11-18 19:37:17 +01:00
Piotr G
ab2a46bcb3
Gauge: Tweaks short value auto-sizing (#29197)
* Tweaks gauge value auto-sizing

* tweak factor a bit

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-11-18 18:38:57 +01:00
Ryan McKinley
1895626080
GraphNG: update the options config (#28917) 2020-11-18 08:46:44 -08:00
Dominik Prokop
0cfb967404
ESlint: React fixes part 1 (#29062)
* Eslint: allign with latest grafana-eslint-config

* fix ts

* Fix react/jsx-key

* Fix react/no-children-prop

* Fix react/jsx-no-target-blank
2020-11-18 15:36:35 +01:00
Dominik Prokop
5ae7280249
Introduce eslint-plugin-react (#29053)
* Eslint: allign with latest grafana-eslint-config

* fix ts

* Bump @grafana-eslint-congig version
2020-11-18 14:19:33 +01:00
Dominik Prokop
05fbc614bd
Refactor declarative series configuration to a config builder (#29106)
* Wip: refactor declarative series configuration to a config builder

* Fix plugins initialization

* Config builder reorg and tests

* Typecheck

* Update packages/grafana-ui/src/components/uPlot/context.ts

* Scales config tweak

* Temp disable tests

* Disable some tests temporarily
2020-11-18 11:14:24 +01:00
Dominik Prokop
f28ba27ca2
Table: Fix incorrect condtition for rendering table filter (#29165) 2020-11-18 08:46:40 +01:00
Torkel Ödegaard
28ce2f12ed
Legend/GraphNG: Refactoring legend types and options (#29067)
* Legend/GraphNG: Refactoring legend types and options

* Rename label

* Minor update

* Fixed legend placement crash issue

* remove unused

* Minor tweaks and fixes
2020-11-13 17:08:55 +01:00
Hugo Häggmark
1bdcd2f9ab
Chore: Bumps types for jest (#29098) 2020-11-13 14:48:11 +01:00
Andrej Ocenas
bbb1f72963
LogsPanel: Fix scrolling in dashboards (#28974) 2020-11-13 14:26:29 +01:00
Ivana Huckova
71df15738f
sort alphabetically unique labels, labels and parsed fields (#29030) 2020-11-13 14:17:00 +01:00
Torkel Ödegaard
a8c417f09d
GraphNG: Adding ticks test dashboard and improves tick spacing (#29044)
* GraphNG: Adding ticks test dashboard and improves tick spacing

* Added comments

* Trying to trigger CI

* Update
2020-11-12 17:23:05 +01:00
Torkel Ödegaard
367e7b861b
GraphNG: Fixed axis measurements (#29036) 2020-11-11 20:23:46 +01:00
Valentin Agachi
2c724e0aa2
Explore: support ANSI colors in live logs (#28895)
Closes #28893

Co-authored-by: Ivana <ivana.huckova@gmail.com>
2020-11-11 14:58:45 +01:00
Jack Westbrook
6d40206431
Dashboard: remove usage of Legacyforms (#28707)
* refactor(dashboard): remove usage of legacyform components in sharemodal

* refactor(dashboard): replace legacyform components

* refactor(dashboard): remove ng-if and correct typo in content of sharesnapshot

* feat(grafana-ui): set displayName prop for Switch component

* refactor(dashboard): migrate TimePickerSettings legacyform components

* refactor(queryoptions): migrate switch and input to nextgen components

* refactor(sharesnapshot): prefer InlineFieldRow over gf-form-group

* refactor(shareembed): styling fixes

* refactor(timepickersettings): prefer double bang over nullish coalescing operator

* fix(grafana-ui): switch uses id prop if passed in

* feat: connect labels and switches with ids
2020-11-11 14:52:22 +01:00
Ivana Huckova
812f588a75
Logs Panel: Fix inconsistent higlighting (#28971)
* Highlight filter expression in panel

* Remove coonsole.log
2020-11-11 09:58:21 +01:00
Andrej Ocenas
b90304cc79
LogsPanel: Don't show scroll bars when not needed (#28972) 2020-11-10 16:12:15 +01:00
Torkel Ödegaard
91eac6e7af
StatPanel: Fixed center of values in edge case scenarios (#28968) 2020-11-10 15:38:25 +01:00
Torkel Ödegaard
83042cc4b7
GraphNG: Restore focus option (#28946)
* GraphNG: Restore focus option

* Update snapshot
2020-11-09 21:12:22 +01:00
Torkel Ödegaard
71fffcb17c
GraphNG: Using new VizLayout, moving Legend into GraphNG and some other refactorings (#28913)
* Graph refactorings

* Move legend to GraphNG and use new VizLayout

* Things are working

* remove unused things

* Update

* Fixed ng test dashboard

* Update

* More refactoring

* Removed plugin

* Upgrade uplot

* Auto size axis

* Axis scaling

* Fixed tests

* updated

* minor simplification

* Fixed selection color

* Fixed story

* Minor story fix

* Improve x-axis formatting

* Tweaks

* Update

* Updated

* Updates to handle timezone

* Updated

* Fixing types

* Update

* Fixed type

* Updated
2020-11-09 15:31:03 +01:00