Commit Graph

2182 Commits

Author SHA1 Message Date
Leon Sorokin
3ecacc9d1d
TimeSeries: fix spanNulls threshold toggle during panel editing (#34452) 2021-05-20 06:47:49 +02:00
Ryan McKinley
8147a65b5e
Histogram: move histogram from alpha to beta panel (#34246)
* add legend

* tooltip off-by-one

* units in x axis

* update function call

* remove tooltip
2021-05-19 17:13:17 -07:00
Andrej Ocenas
da1558e7a2
Explore: UI improvements to trace view (#34276)
* Various ui fixes

* Remove unused classes

* Fix opening of collapsible

* Fix pointer issue

* Update e2e test
2021-05-19 19:41:54 +02:00
sidverma
3f0df997bc
Accessibility: Style now has focus state (#34422) 2021-05-19 19:12:06 +02:00
Josh Hunt
5dca9fd4d8
AzureMonitor: Support querying any Resource for Logs queries (#33879)
* wip

* wip:

* ui work for resource picker

* disable rows when others are selected

* resource picker open button

* Azure Monitor: Connect to backend with real data (#34024)

* Connect to backend with real data

* Fixes from code review.

* WIP:Begin thinking about how to make queries with scope determined by the resource picker

* More fixes post code review.

* Fixes after rebasing

* Remove outdated todo

* AzureMonitor: Support any resource for Logs queries (#33762)

* Apply button for resource picker

* scroll table body

* secondary cancel button

* loading state for nested rows

* Display resource components in picker button

* fix tests

* fix icons

* move route function

* Migrate from workspace to resource uri for log analytics (#34337)

* reword backwards compat comment

* remove base url suffix

* fix lint error

* move migrations to seperate file

* cleanup

* update regex

* cleanup

* update plugin routes to use new azure auth type

* use AzureDataSourceInstanceSettings alias

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
2021-05-19 17:39:08 +01:00
Dominik Prokop
a2cbbe1b8a
BarChart: value label sizing (#34229)
* Bar chart label positioning and sizing

* Dev dashbard

* Improve autosizing

* Remove sync option

* Unify text sizing options between stat-ish visualizations and bar chart

* Add simple categorical data scenario and update dev dashboard

* Remove unused options builder

* Add docs annotations

* Fix go lint
2021-05-19 17:33:56 +02:00
Alex Khomenko
958ebce1e1
Enable adding tags on blur (#34374) 2021-05-19 16:32:14 +02:00
Piotr Jamróz
559ce4db89
QueryField: Do not modify the query field while typing (#34300)
* Do not sanitize the query while typing, but only onBlur or before the query is run

Otherwise sanitized value may cause update Slate component and trigger blur losing focus of the input

* Revert "Do not sanitize the query while typing, but only onBlur or before the query is run"

This reverts commit 00779889

* Avoid changing the input while typing

Cleaning happens on each change and with trimming it changes the value if the user types a space as the last character (may happen quite often while typing a query). In worst cases it's causing losing the focus in Slate if the space is typed before debounced change callback is triggered (500ms).
2021-05-19 16:29:48 +02:00
Torkel Ödegaard
c944a33b95
Switch: Add hover effect for inline switch (#34387) 2021-05-19 16:25:04 +02:00
Alex Khomenko
0a2054bbe0
Storybook: Fix Button story (#34357) 2021-05-19 11:22:39 +02:00
Domas
5721019573
Alerting: various rule form fixes (#34272) 2021-05-18 19:14:57 +03:00
Torkel Ödegaard
7375115a98
Theme: Updating old theme variables to use the new theme higher contrast colors (#34305) 2021-05-18 18:00:30 +02:00
Andrej Ocenas
2e7ccf0e42
NodeGraph: Show gradient fields in legend (#34078)
* Add gradient fields to legend

* Fix test

* Remove unnecessary mapping

* Add tests
2021-05-18 16:30:27 +02:00
Marcus Andersson
2aa1a051f0
Alerting: visualizing data when creating/editing alerting rule. (#34191)
* VizWrapper to handle some state

* alertingqueryrunner first edition

* added so we always set name and uid when changing datasource.

* wip.

* wip

* added support for canceling requests.

* util for getting time ranges for expression queries

* remove logs, store data in state

* merge from run branch

* incremental commit

* viz working

* added structure for marble testing.

* paddings and move viz picker

* less height for viz, less width on rows

* change so the expression buttons doesnt submit form.

* fixed run button.

* replaced mocks with implementation that will set default query + expression.

* merge with run queries

* fixed so we set a datasource name for the default expression rule.

* improving expression guard.

* lots of styling fixes for viz

* adding placeholder for relative time range.

* fixed story.

* added basic structure to handle open/close of time range picker.

* removed section from TimeOptions since it isn't used any where.

* adding mapper and tests

* move relativetimepicker to its own dir

* added some simple tests.

* changed test.

* use relativetimerangeinput

* redo state management

* refactored the tests.

* replace timerange with relativetimerange

* wip

* wip

* did some refactoring.

* refactored time option formatting.

* added proper formatting and display of time range.

* add relative time description, slight refactor of height

* fixed incorrect import.

* added validator and changed formatting.

* removed unused dep.

* reverted back to internal function.

* fixed display of relative time range picker.

* fixed failing tests.

* fixed parsing issue.

* fixed position of time range picker.

* some more refactorings.

* fixed validation of really big values.

* added another test.

* restored the step2 check.

* fixed merge issue.

* Update packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButtonGroup.tsx

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

* reverted change.

* fixed merge conflict.

* fixed todo.

* sort some paddings

* replace theme with theme2

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-05-18 16:16:26 +02:00
Alex Khomenko
9f9666415b
grafana/ui: Prevent Select placeholder text from wrapping (#34260) 2021-05-18 15:29:50 +03:00
Domas
098b4fc319
Alerting: wrap top level components in ErrorBoundary (#34040) 2021-05-18 13:56:31 +03:00
Torkel Ödegaard
c2ee2f10a7
Table: Fix issue with table border not showing with colored background cells (#34231) 2021-05-18 12:23:17 +02:00
Ivana Huckova
a40aef0822
Logs panel: Support details view (#34125)
* Show log details in Logs panel

* Add hide log details as panel option

* Refactor tests to use testing library

* Change hideLogDetails to enableLogsDetails

* Add enableLogDetails to test file
2021-05-18 11:16:29 +02:00
Alex Khomenko
10a19ab790
grafana/ui: update react-hook-form to version 7.5.3 (#34218) 2021-05-18 12:07:13 +03:00
Maria Alexandra
0e207c4133
Dashboard: Fix Editing a panel with auto-refresh enabled auto-refresh in the edit screen (#34128)
* Dashboard: Fix editing panel with auto-refresh

- Add default hidden and disabled auto-refresh option on the editing panel
- Extend unit test for DashboardModel
- Add unit test DashNavTimeControls component
2021-05-18 10:20:11 +02:00
Ryan McKinley
eba6f66fba
FieldDisplay: remove auto min/max for percent units (#34234) 2021-05-17 10:54:06 -07:00
Ryan McKinley
7b32c5439b
Timeseries: support boolean values out-of-the-box (#34168) 2021-05-17 09:52:47 -07:00
Uchechukwu Obasi
85620f65a8
TextArea: updates story from knobs to control (#34195)
* TextArea: updates story from knobs to control

* removed the cols control since it has no effect on component

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-05-17 15:31:09 +02:00
Uchechukwu Obasi
21f0509f8b
Table: updates story from knobs to control (#34193)
* Tables: updates story from knobs to control

* removes the Descending and sortByDisplayName controls since they have no effect on component

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-05-17 14:27:05 +01:00
Jack Westbrook
00253fe359
Dependencies: Remove duplicates from yarn.lock (#34124)
* build(yarn): run yarn-deduplicate on lock file

* chore(npm): clean up moment dependencies

* chore(npm): move dev dependencies out of dependencies

* chore(npm): bump moment-timezone to fix TS errors

* chore(npm): move dev dependencies to devDependencies in package.json
2021-05-17 14:18:54 +02:00
Ivana Huckova
25d42dbedb
QueryField: Remove carriage return character from pasted text (#34076)
* Remove carriage returns

* Clean up
2021-05-17 13:40:08 +02:00
Hugo Häggmark
d721298e03
Table: Makes tooltip scrollable for long JSON values (#34120) 2021-05-17 10:19:41 +02:00
Alex Khomenko
65cacd31c2
grafana/ui: Unify disabled styles for input components (#34126)
* Select: Add disabled prop to SingleValue

* TagsInput: Disable remove button with disabled prop

* Checkbox: Add disabled styles
2021-05-15 10:06:42 +02:00
Torkel Ödegaard
953aadd6e4
Timeline: Adds opacity & line width option (#34118)
* Timeline: Adds opacity & line width option

* Updated devenv dashboards, added back original timeline modes
2021-05-14 17:24:40 +02:00
Torkel Ödegaard
c61a610f72
ValueMappings: Add duplicate action, and disable dismiss on backdrop click (#34100)
* ValueMappings: Add duplicate action, and disable dissmiss on backdrop click

* Updated modal to have property closeOnBackdropClick
2021-05-14 16:53:20 +02:00
Oscar Kilhed
a71cebbcb1
grafana/u: Move stacking config to common options builder (#34106)
* Move stacking config to options builder

* Extract stacking interface
2021-05-14 12:01:40 +02:00
Giordano Ricci
062e1d5ab8
Switch: prevent wrapping for InlineSwitch (#34077) 2021-05-14 09:26:00 +01:00
Dominik Prokop
5e0e91cd9a
Update packages version (#34064)
* Update packages version

* update root package.json
2021-05-13 16:02:18 +02:00
Zoltán Bedi
4705589f1b
Exemplars: refactor exemplar marker (#34053)
Don't use tooltip container.
Revert pointer-events: none for tooltip container.
2021-05-13 15:36:28 +02:00
Zoltán Bedi
32030f3929
Add e2e test for exemplars flow (#33972)
* Add e2e test for exemplars flow

* Check if data source is created

* Lets see what is going on

* Try again

* Updating the image maybe?

* Revert "Updating the image maybe?"

This reverts commit 968b44b0d9.

* Try with force

* Use electron

* Wait for new url?

* Wait?????

* Should be good now

* Revert e2e recording
2021-05-13 14:17:09 +02:00
Uchechukwu Obasi
765e771a2a
StatsPicker: updates story from knobs to control (#34008) 2021-05-13 09:02:44 +02:00
Uchechukwu Obasi
8f91b59640
Switch: updates story from knobs to control (#34016)
* Switch: updates story from knobs to control

* small nit fixes

* exported default storybook config as meta
2021-05-13 09:01:56 +02:00
Torkel Ödegaard
567bbdf6e6
Theme: New visualization colors model (#33973)
* Initial design for new viz colors

* added unit tests

* Progress

* Updated selected color

* Use old named color names and colors to begin with

* Updates

* Fixing tests

* Progress

* Updates

* updating

* fixing tests

* Using some named colors

* renames && fixes

* remove plural

* fixed tests
2021-05-13 07:32:13 +02:00
Jack Westbrook
abdceb18da
Plugins: introduce marketplace app (#33869)
* add uninstall flow

* add install flow

* small cleanup

* smaller-footprint solution

* cleanup + make bp start auto

* fix interface contract

* improve naming

* accept version arg

* ensure use of shared logger

* make installer a field

* add plugin decommissioning

* add basic error checking

* fix api docs

* making initialization idempotent

* add mutex

* fix comment

* fix test

* add test for decommission

* improve existing test

* add more test coverage

* more tests

* change test func to use read lock

* refactoring + adding test asserts

* improve purging old install flow

* improve dupe checking

* change log name

* skip over dupe scanned

* make test assertion more flexible

* remove trailing line

* fix pointer receiver name

* update comment

* add context to API

* add config flag

* add base http api test + fix update functionality

* simplify existing check

* clean up test

* refactor tests based on feedback

* add single quotes to errs

* use gcmp in tests + fix logo issue

* make plugin list testing more flexible

* address feedback

* fix API test

* fix linter

* undo preallocate

* Update docs/sources/administration/configuration.md

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

* Update docs/sources/administration/configuration.md

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

* Update docs/sources/administration/configuration.md

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

* fix linting issue in test

* add docs placeholder

* update install notes

* Update docs/sources/plugins/marketplace.md

Co-authored-by: Marcus Olsson <marcus.olsson@hey.com>

* update access wording

* add more placeholder docs

* add link to more info

* PR feedback - improved errors, refactor, lock fix

* improve err details

* propagate plugin version errors

* don't autostart renderer

* add H1

* fix imports

* feat(bundled-plugins): introduce marketplace-app to the repo

* chore(marketplace-app): remove backend

* feat(marketplace): nav is only visible to admins

* feat(marketplace): use gnet api

* refactor(marketplace): move styles to theme2 move card concerns to card component

* feat(marketplace): introduce loaders, clean up styles

* refactor(marketplace): wip - debugging for api endpoints

* feat(grafana-ui): introduce height prop to Layout components

* refactor(marketplace): clean up org details component

* fix(marketplace): display search results without active filters

* refactor(marketplace): use grafana api for install/uninstall

* refactor(marketplace): remove pluginDir

* feat(marketplace): clean up Library page

* fix(plugins): get panel plugins from meta for newly installed plugins

* fix(marketplace): fix multiple renders of InstallControls when installing/uninstalling plugins

* refactor(marketplace): componentise the loader

* chore(marketplace): remove unsigned plugins option

* refactor(marketplace): remove includeUnsigned from codebase

* refactor(marketplace): prefer useStyles over useTheme

* docs(marketplace): remove changelog and update readme

* Apply suggestions from code review

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

* refactor(marketplace): prefer module over class for api

* refactor(marketplace): move updatePlugin to api

* refactor(marketplace): add PluginMeta to api to please TS

* feat(marketplace): always include pre-release in semver check

* chore(marketplace): remove redundant arch install code. backend handles it now

* feat(marketplace): add a link to browse page if library is empty

* refactor(marketplace): replace status with isLoading boolean for hooks

* refactor(marketplace): clean up async functions in InstallControls

* fix(marketplace): setInstalled false on successful uninstall

* include marketplace in bundled plugin test

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Marcus Olsson <marcus.olsson@hey.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-05-12 21:07:37 +02:00
Oscar Kilhed
1b5f1bfe33
Fix tooltip not closing (#34001)
* Fix tooltip not closing

* make this a bit less hacky

* use a more specific element for the mouseleave event

* Make sure we limit running of effect

* Remove console log

* Probably don't need useCallback
2021-05-12 19:52:19 +02:00
Torkel Ödegaard
1601f12cf1
ValueMappings: UX Feedback and fixes (#34011)
* ValueMappings: UX Feedback and fixes

* minor update to texts

* Update
2021-05-12 19:26:30 +02:00
Marcus Andersson
07ef4060a3
Alerting: adding a time picker for selecting relative time. (#33689)
* adding placeholder for relative time range.

* fixed story.

* added basic structure to handle open/close of time range picker.

* removed section from TimeOptions since it isn't used any where.

* adding mapper and tests

* move relativetimepicker to its own dir

* added some simple tests.

* changed test.

* use relativetimerangeinput

* redo state management

* refactored the tests.

* replace timerange with relativetimerange

* wip

* wip

* did some refactoring.

* refactored time option formatting.

* added proper formatting and display of time range.

* add relative time description, slight refactor of height

* fixed incorrect import.

* added validator and changed formatting.

* removed unused dep.

* reverted back to internal function.

* fixed display of relative time range picker.

* fixed failing tests.

* fixed parsing issue.

* fixed position of time range picker.

* some more refactorings.

* fixed validation of really big values.

* added another test.

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
2021-05-12 17:51:31 +02:00
Alex Khomenko
167bad070b
Grafana-UI: Add disabled state to picker components (#34005)
* TimeRangeInput: add disabled prop

* TimeOfDayPicker: add disabled prop

* TimeZonePicker: add disabled prop

* TagsInput: add disabled prop
2021-05-12 18:33:36 +03:00
Uchechukwu Obasi
a7efe19167
RangeSlider: updates story from knobs to control (#33980)
* RangeSlider: updates story from knobs to control

* changed the orientation control to type Select

* removes tooltipAlwaysVisible control since it crashes the story
2021-05-12 15:09:06 +01:00
Andrej Ocenas
fdd6620d0a
NodeGraph: Exploration mode (#33623)
* Add exploration option to node layout

* Add hidden node count

* Add grid layout option

* Fix panning bounds calculation

* Add legend with sorting

* Allow sorting on any stats or arc value

* Fix merge

* Make sorting better

* Reset focused node on layout change

* Refactor limit hook a bit

* Disable selected layout button

* Don't show markers if only 1 node is hidden

* Move legend to the bottom

* Fix text backgrounds

* Add show in graph layout action in grid layout

* Center view on the focused node, fix perf issue when expanding big graph

* Limit the node counting

* Comment and linting fixes

* Bit of code cleanup and comments

* Add state for computing layout

* Prevent computing map with partial data

* Add rollup plugin for worker

* Add rollup plugin for worker

* Enhance data from worker

* Fix perf issues with reduce and object creation

* Improve comment

* Fix tests

* Css fixes

* Remove worker plugin

* Add comments

* Fix test

* Add test for exploration

* Add test switching to grid layout

* Apply suggestions from code review

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* Remove unused plugin

* Fix function name

* Remove unused rollup plugin

* Review fixes

* Fix context menu shown on layout change

* Make buttons bigger

* Moved NodeGraph to core grafana

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-05-12 16:04:21 +02:00
Uchechukwu Obasi
9c498c6810
Spinner: updates story from knobs to control (#33988) 2021-05-12 14:39:28 +01:00
Alex Khomenko
553d3b9dbc
Grafana-UI: Add className to TagsInput (#33944)
* Grafana-UI: Add className to TagsInput

* Do not add existing tags
2021-05-12 15:09:12 +03:00
Uchechukwu Obasi
0992cedbf4
Slider: updates story from knobs to control (#33983) 2021-05-12 12:24:22 +02:00
Uchechukwu Obasi
8c03b80490
Select: updates story from knobs to control (#33954)
* Select: updates story from knobs to control

* exported default storybook config as meta

* disables non-functional controls
2021-05-12 10:45:01 +02:00
Uchechukwu Obasi
3d47bf247f
SecretFormField: updates story from knobs to control (#33920)
* SecretFormField: updates story from knobs to control

* disables knobs in story
2021-05-12 08:59:21 +01:00