Commit Graph

477 Commits

Author SHA1 Message Date
Ashley Harrison
7a2a5dde8b Chore: Enable remaining jsx-a11y rules (#70990)
enabling remaining a11y rules + ignore existing violations
2023-06-30 16:58:16 +01:00
RoxanaAnamariaTurc
af9b071a78 I18n: Mark up strings on Navigation - Connections section (#70914) 2023-06-30 11:27:19 +01:00
Oscar Kilhed
50c0ff8400 DatasourcePicker: Skip flaky upload test (#70756)
Skip flaky upload test
2023-06-27 18:05:06 +02:00
Ivan Ortega Alba
3bf8dc1397 DS Picker: Add missing props and improve autoheight logic (#70393)
* DS Picker: Add `inputId` and `noDefault` options

* DS Picker: Add `disabled` state

* Add tests for `disabled`

* Select default DS if `current` is not provided

* Remove `width` from style

* Move types next to components

* Only calculate height when opening
2023-06-23 10:26:18 +02:00
Oscar Kilhed
cf4d86d95f DataSourcePicker: refactor file drop out of query group (#68236)
* refactor file drop out of query group

* make sure we display errors when file upload fails

* refactor to make onChange take default queries

* let grafana datasource handle file -> query

* add dropdown tests

* add modal tests

* add filtering props to dropdown

---------

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2023-06-21 10:55:55 +02:00
Ashley Harrison
13e3308959 Chore: some type fixes (#69860)
* some type fixes

* restore empty object

* undo 1 fix for now

* commit betterer update

* explicitly type slug and uid as string | undefined
2023-06-20 17:13:49 +01:00
Giordano Ricci
d5d3db9a6e DSPicker: Respect datasource & mixed props (#70377) 2023-06-20 14:21:49 +02:00
Ivan Ortega Alba
6be0ca396f DS Picker: first item is always active when filtering (#70071)
* Select always the first item by default when filtering

* Avoid re-render when updating the selected item state
2023-06-16 18:30:49 +03:00
Ivan Ortega Alba
5b97670f11 DS Picker: Support width and hideTextValue (#70074) 2023-06-15 16:34:20 +02:00
Jaroslav Benc
12cd99ae8d Pass testing status to the data source plugin extension (#69988) 2023-06-14 13:18:24 +02:00
Ivan Ortega Alba
908b248e10 DS Picker: Built-in datasources are not marked as selected (#70020) 2023-06-14 10:52:49 +02:00
Ivan Ortega Alba
bc48622919 DS Picker: Fix React key issue for built-in data source list (#70018) 2023-06-13 16:06:49 +00:00
Levente Balogh
d25cea90b0 Datasources: Make the datasources config extendable by plugins (#68064)
* feat: add a new UI extension type: component

* fix: remove reference to not existing type

* chore: update betterer results

* review: use a single type notation in import

* review: stop exporting `PluginExtensionBase`

* refactor: make extension config types more explicit

By using some repetition now these types are much easier to oversee.

* feat: add a new extension point to the datasources config

* fix: export tcontext type from grafana-data

* chore: update betterer results

* chore: fix tests

* feat: extend the context shared with extensions

* feat: stop omitting jsonData props & update context type

* tests: update tests
2023-06-02 11:01:36 +02:00
Taewoo K
4ab863d122 add datasource type (#69407) 2023-06-01 13:35:43 -04:00
Ivan Ortega Alba
c9adcc1e97 DS Picker: Make responsive the modal for smaller devices (#68875)
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
2023-05-26 16:38:58 +02:00
Levente Balogh
6a995d526a Datasources: Extend optional reporting (#69061)
* feat: add default properties to the `reportInteraction()`

* chore: add more tracking events to the ds-config page

* refactor: adding the `path` to the `meta` instaed
2023-05-26 10:22:07 +02:00
Taewoo K
2823523972 add subTitle with feature toggle check (#69075) 2023-05-25 11:26:25 -04:00
Taewoo K
7f84e83ffe Datasource: datasource config page header redesign (#66999)
* Wip

* remove name input from page body

* render title & subTitle in datasource page in connections and remove unused prop - uid

* styling on actions button group

* remove unused props in edit datasource page

* set gap as 8px between buttons

* move editable datasourcename to the header

* add subTitle component

* remove useRef and use autoFocus prop

* pass false to isDefault  when dataSource is undefined

* change button text

* remove suffix icon

* remove unused import - Icon

* consolidate duplicate useDataSourceSettingsNav into datasrouces hook

* move dataSource context to useDataSourceSettingsNav

* remove Explore button in the footer

* remove unused props

* fix failing test on button group

* fix typo on file naming

* remove disabled prop

* fix param

* add test

* add test files

* disable editing title in readOnly provision datasource

* update name should save dataSource

* prevent swith toggle change from label clicking and change margin

* update tooltip message

* use datasource update on header instead of state update

* remvoe subTitle component and move subTitle component next to page Info component

* Added title

* remove subTitle in buildNavModel

* replace Button with Badge

* make datasourceheader as a component

* horizontal gap of 24px between pageInfo and actions components

* align page Info value items

* accept react node as page info label and add tooltip to Default item

* update navId for edit datasource page in connections

* update unit testing for Title

* fix gen_que

* betterer

* prettier fix

* fix e2e test

* add data-testid to nameEditIcon selector

* fix tooltip text

* fix navId for connections datasources edit page

* fix e2e selector: change autoSizeInput to Input

* adding ellipsis to EditDataSourceTitle

* override grafana-ui titleContainer h1 styles

* UI cleanup and apply readOnly to default datasource switch

* add period

* datasource name validation

* title and page info alignment

* add feature toggle - dataSourcePageHeader

* restore basicSettings component and apply feature toggle

* go lint

* Revert "title and page info alignment"

This reverts commit 681ac51f11.

* remove editable fields from page Header - name, default datasource switch

* fix go test: toggle generator

* remove test id

* remove alerting badge in BasicSettings component

* Revert "remove alerting badge in BasicSettings component"

This reverts commit fb33ff9028.

* feature toggle on alerting badge

* rename component & filename

* move DataSourceInfo type

* change button to link in test

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Miguel Palau Zarza <mpalauzarza@gmail.com>
2023-05-23 09:18:00 -04:00
Ivan Ortega Alba
9e61172245 DS Picker: Use custom scrollbar (#68845) 2023-05-22 23:55:18 +02:00
Torkel Ödegaard
2f6d538044 DataSourcePicker: Design tweak proposal (#68747)
* DataSourcePicker: Design tweak proposal

* Revert unrelated change

* Remove unrelated change

* Fixed spacing of logo
2023-05-22 14:53:40 +02:00
Andriy
39e57489a1 fix: Use fall back alert type for data source healthcheck alert when status is not recognised (#68650) 2023-05-22 13:50:46 +02:00
Ivan Ortega Alba
49467b3e5a DS Picker takes the max height available and flip when needed (#68698)
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
2023-05-18 19:42:19 +02:00
Ivan Ortega Alba
1505a188eb Dashboards: Remove no-datasource screen (#68574)
* Dashboards: Remove non-ds configured landing page

* Remove `datasourceOnboarding` feature toggle
2023-05-17 14:22:40 +02:00
Ivan Ortega Alba
da00df8e5c DS Picker: Align open advanced button to right (#68394) 2023-05-12 16:03:25 +00:00
Ivan Ortega Alba
ede8df846e Add/Edit Panel: Enable new DS picker toggle by default (#68380)
* Add Panel: Enable new DS picker and onboarding DS prompt

* Add e2e selectors
2023-05-12 17:09:30 +02:00
Ivan Ortega Alba
cb293ecf1c Improve DS Advance Picker to give user context about the built in DS and CTA (#68203)
* Add description to DS built-in list of items

* Open the new DS view in a new tab
2023-05-10 15:56:00 -03:00
Juan Cabanas
8ec5527479 DataSourceModal: responsive behavior (#67944) 2023-05-09 09:52:29 -03:00
Juan Cabanas
24668137f8 NavBar: app chrome state wrongly overwritten when ds modal is opened (#67952) 2023-05-08 16:51:42 -03:00
Ashley Harrison
37378c4dd8 Navigation: more nav interface cleanup (#67708)
more nav interface cleanup
2023-05-04 14:17:44 +01:00
Ivan Ortega Alba
1afaf4d73e Improve empty state when no ds picker were found (#67422) 2023-05-04 13:17:03 +03:00
David Harris
44f75ba185 chore: fix link to docs (#67642)
* chore: fix link to docs

* Update public/app/features/datasources/components/DataSourcesList.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

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

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2023-05-02 18:05:54 +01:00
Torkel Ödegaard
9614dc2446 Connections: Simplify connections nav (#66813)
* Connections: Simplify connections nav

* rename Connections pages everywhere

---------

Co-authored-by: Miklós Tolnai <miklos.tolnai@grafana.com>
2023-05-02 10:51:59 +02:00
Kuba Siemiatkowski
ba8bba78fc Datasource: Move the Delete data source button back to the bottom (#67552)
* - move delete button back to the lower section

* - remove the top Delete button

* - fix e2e tests
2023-05-01 12:16:16 +02:00
Oscar Kilhed
836fef6785 DataSourcePicker: keyboard navigatable list hook and implementation in the new data source picker dropdown (#67370)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2023-04-28 18:19:31 +02:00
Kuba Siemiatkowski
f8faacd54a Datasource: Overhaul plugin error handling and action buttons (#67014)
* - initial work on data source config page

* - add links to test status box
- add tracking function

* - add test for the DataSourceConfigAlert component

* - fix flicker of the alert box

* - fix the build

* - small improvements

* - fix failing build

* - fix failing unit tests

* - prettier and betterer fixes

* - fix failing e2e tests

* - fix build again

* - rewrite solution according to the PR comments

* - cleanup

* - fix failing e2e

* - use absolute path in link

* Minor fixes

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-28 15:57:17 +02:00
Ivan Ortega Alba
8b6160bc66 Fix: Advanced DS picker search is case sensitive (#67420) 2023-04-28 10:38:14 +00:00
Ivan Ortega Alba
4d96afa979 Check add DS permissions in advanced DS picker (#67237) 2023-04-27 16:51:31 +02:00
Ivan Ortega Alba
a576bd4f26 DataSourcePicker: Tweak styles (#67280) 2023-04-26 15:07:51 +02:00
Oscar Kilhed
a4f1206811 DataSourcePicker: Fix datasource picker input not clearing on close (#67248)
Fix datasource picker input not clearing on close
2023-04-26 12:27:32 +02:00
Oscar Kilhed
044d7f61c7 DataSourcePicker: fix flickering datasource dropdown (#67206)
* fix flickering

* refactor onClose/onOpen

* do not set value of input, make the placeholder look like the value instead

* Show search icon when the dropdown is open

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2023-04-26 10:08:32 +03:00
Ivan Ortega Alba
581cc85ba5 Add analytics to new DS picker and onboarding experience (#67060)
* Add analytics to ds picker advanced mode

* Add analytics to ds picker dropdown
2023-04-25 21:07:16 +02:00
Ivan Ortega Alba
44035ecbb2 Advanced DS Picker open Connections page when toggle is enabled (#67139) 2023-04-25 10:42:04 +02:00
Ivan Ortega Alba
4d474e8e4f Fix icon size for data source picker list item (#67144) 2023-04-25 10:41:31 +02:00
Ashley Harrison
4e492ae725 Navigation: Unify Page component (#66951)
* remove old page component

* add test to check initDashboard is only called once (prevent variables loading twice)

* add help node

* update unit tests

* remove last mentions of topnav

* fix unit tests

* remove unused props from ButtonRow interface

* remove prop from test
2023-04-24 16:41:32 +01:00
Oscar Kilhed
d419402a43 DataSourcePicker: Add recently used from local storage to ds picker (#66985)
* Add recently used from local storage to ds picker
2023-04-21 18:07:11 +03:00
Ivan Ortega Alba
49624ca2ef Adjust styles for DS picker dropdown and modal (#67004)
Adjust styles for dropdown and modal
2023-04-21 11:25:03 +02:00
Ivan Ortega Alba
40c7b3126e Prompt DS modal when the user adds the first panel to a dashboard (#66911)
* Prompt DS modal when the user adds the first panel to a dashboard

* Rename state prop and use toggle

* Change modal size

* Avoid flickering for dashboard modal when changing number of results

* When editing panel 1, only display when new dashboard
2023-04-20 13:44:19 +02:00
Oscar Kilhed
a7e74f6d6d DataSourcePicker: Refactor and collapse the DataSourceDropdown components (#66820)
* clean up the components and convert to functional components

* Create hooks for getting DS

* remove focus style override from input

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2023-04-20 12:11:13 +02:00
Ivan Ortega Alba
3edc246ca3 Variables are available in the new DS picker and modal (#66923) 2023-04-20 11:34:24 +02:00
Ivan Ortega Alba
c7af53b79f [Under FF] New DS Picker with advance mode (#66566)
* Add a wrapper to switch between the previous and new DS picker depending on the feature toggle advancedDataSourcePicker.

* Add a new component to represent the modal DS picker, which we will refer as advanced DS picker
Integrate this into the Edit panel, for now, until we're ready to replace everywhere the grafana-runtime DS picker by the wrapper.

* Replace Drawer component with the dropdown

* Adjust the first version of the styles to fit into this Figma design

* Adjust the design of the FileDropzoneDefaultChildren to match with the new DS modal but everywhere else is used nowadays.

---------

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2023-04-19 16:08:09 +03:00