Commit Graph

3452 Commits

Author SHA1 Message Date
Ashley Harrison
78a57f2064
Navigation: use ToolbarButton in TopSearchBar for consistency (#56371)
* use ToolbarButton in TopSearchBar for consistency

* Removed unnessary styles

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-05 12:22:47 +01:00
Torkel Ödegaard
b396f16fe1
TopNav: Section styling fix (#56372) 2022-10-05 13:06:51 +02:00
Torkel Ödegaard
aa274500cf
TopNav: Fixes to page and plugin page handling (#56278)
* Added labels

* App page fixes

* Switch to switch

* Fixing sort position for Apps
2022-10-05 11:46:27 +02:00
Giordano Ricci
a7de5182b0
Explore: Revert split pane resize feature (#56310)
* Revert "Explore: Prevent panes from disappearing when resizing window in split view (#55696)"

This reverts commit 0a5aa19ca2.

* Revert "Explore: Add resize to split view, with Min/Max button (#54420)"

This reverts commit c3e4f1f876.
2022-10-04 15:42:43 +01:00
Ashley Harrison
ab09f2783c
fix section root styling, parentItem will be the home item now (#56266) 2022-10-04 11:17:12 +01:00
Ashley Harrison
7e5509891a
Navigation: adjust megamenu position in mobile (#56262)
* adjust megamenu position in mobile

* improve mobile breadcrumb logic
2022-10-04 10:40:34 +01:00
Levente Balogh
cc6fae18db
BackendSrv: Make it possible to pass options to .get|post|patch... methods (#51316)
* feat: make it possible to pass in `options` to `.get()`, `.post()`, etc methods

* feat(Datasource): make it possible to specify `optinos` for `getResource()` and `postResource()`

* fix(BackendSrv): use partial `BackendSrvRequest`

* feat(Datasource): make it possible to set `options` for resource requests

* refactor(BackendSrv): remove internal usage of `.request()`

* fix(GettingStarted): remove unnecessary import

* fix: fix type issues by typing the delete dashboard response

* refactor: use more strict types for `params`

By reusing the type of `BackendSrvRequest.params`

* refactor: make the options paramater partial

* fix: extract `data` from the fetch response

* docs: update the deprecation notice or `BackendSrv.request()`

* refactor: use `.request()` as if it was private

* refactor: remove unnecessary change
2022-10-04 10:40:21 +02:00
Ashley Harrison
317b353b34
Navigation: Collapsible section nav implementation (#55995)
* initial collapsible section nav implementation

* fix unit tests

* automatically collapse sectionnav when below lg size

* fix unit tests

* only register 1 event listener each time

* fix display name for SectionNavToggle
2022-10-04 09:19:23 +01:00
Ashley Harrison
8984507291
Navigation: show breadcrumbs correctly when on the home page (#55759)
* show breadcrumbs correctly when on the home page

* adjust breadcrumb unit tests

* update betterer

* fix backend tests

* update getSectionRoot to look at the home nav id

* remove redundant setting of home dashboard

* construct a home navmodelitem in the backend

* fix cases when the feature toggle is off

* fix unit test

* fix more unit tests

* refactor how buildBreadcrumbs works

* use HOME_NAV_ID

* move homeNav useSelector into NavToolbar

* remove unnecesary cloneDeep

* don't need locationUtil here

* restore using getUrlForPartial in DashboardPage

* special case for the editview query param

* remove commented out code

* add comment to clarify splice behaviour

* slightly cleaner syntax
2022-10-03 15:05:19 +01:00
Ashley Harrison
3e688ecf7d
Navigation: remove description from the backend navmodel and use subTitle instead (#56155)
* remove description from the backend navmodel and use subTitle instead

* only add admin subtitle in topnav
2022-10-03 10:09:32 +01:00
Laura Fernández
fca252e7dc
A11y: enable rule jsx-a11y/alt-text (#55832)
* Enable jsx-a11y/alt-text rule

* Fix errors

* Fix tests

* Enable jsx-a11y/alt-text rule after solving merge conflict

* Delete unused import

* Modify files according to the reviewer's comments

* Revert test changes and update snapshot

* tweaks to image alt names

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-10-03 09:27:04 +01:00
Leo
7df49ca230
Navigation: Add News to top nav (#55466)
* added news feed component

* move button to news component

* create newsfeed hooks and conver NewsPanel to functional component

* added news_feed_enabled and news_feed_url to server settings ini

* add default value in defaults.ini

* set news drawer settings value to true by default

* remove server settings config

* use useToggle hook

* fix newsitem render

* support drawer on mobile screen

* use media query utility
2022-09-30 15:11:24 +02:00
Ashley Harrison
5b1fdd535a
Accessibility: turn on jsx-a11y/no-noninteractive-tabindex + fix/ignore errors (#56084)
* turn on jsx-a11y/no-noninteractive-tabindex + fix/ignore errors

* update comments
2022-09-30 13:20:39 +01:00
Laura Benz
fc6afc6b84
Core: Implement aria attributes for query rows, improve a11y (#55563)
* feat: add aria-expanded prop

* refactor: remove console.log()

* feat: add aria-controls

* refactor: add id to expendable section

* refactor: create unique id
2022-09-30 13:03:55 +02:00
Gábor Farkas
d2601003cf
Logs: move logs-functions from grafana-data to grafana-main (#55457)
* logs: move utils from grafana-data to grafana

* logs: adjust imports

* updated betterer checksum file
2022-09-30 12:16:47 +02:00
Torkel Ödegaard
b4f73c9f09
PluginPages: Support plugin pages that don't belong to a section (#55904)
* Fixing pages that don't exist in navtree

* Fix test

* fix lint warning

* Fixes
2022-09-29 13:27:51 +02:00
Drew Slobodnjak
b0cd511ecc
Geomap: Fix tooltip display option (#55956) 2022-09-28 15:21:21 -07:00
Guilherme Caulada
2a12644778
Links: Fix opening links from different orgs on the same tab (#55837)
* Skip intercepting links of different orgs

* Check if orgId is present on query params

* Use locationSearchToObject instead of parseKeyValue

* Revert locationSearchToObject to parseKeyValue
2022-09-27 16:50:05 -03:00
Ashley Harrison
527c00dae5
enable rule jsx-a11y/role-supports-aria-props (#55839) 2022-09-27 15:42:46 +01:00
Oscar Kilhed
53a39e5037
Make LocalStorageProvider react to storage events (#55810) 2022-09-27 14:37:59 +02:00
Virginia Cepeda
27f022283d
JS Agent: remove user email and add session id (#55767) 2022-09-27 08:59:32 -03:00
Laura Fernández
6b6882c141
Navigation: Align landing pages with designs (#55749) 2022-09-27 11:16:29 +02:00
Jimmie Han
708225f69f
feat: add tracesToMetrics span time shift options (#54710) (#55335) 2022-09-27 09:30:33 +01:00
kay delaney
4d1b422b25
Chore: Remove empty and leftover files (#55757) 2022-09-26 11:33:07 -04:00
Torkel Ödegaard
018733dd24
PluginDetails: Make plugin details page look good in topnav (#55571)
* PluginDetails: Make plugin details page look good in topnav

* Minor style tweak aligning things

* minor refactoring where I moved the logic to decide the default tab into its own hook.

* refactor(plugindetails): first pass at using navmodel for usePluginDetailsTabs hook

* refactor(plugindetails): move "reset page when uninstalling plugin" to installcontrols

this prevents a user from seeing a blank page if they uninstall an app plugin whilst viewing a
config page

* refactor(plugindetails): remove usage of toIconName and reduce nested if

* Trying to fix tests

* minor fix

* test(plugindetails): update selectors causing failing tests

* chore(plugindetails): remove commented out test code

* test(plugindetails): clean up - remove unnecesary usage of waitFor

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-09-26 15:04:07 +02:00
Ashley Harrison
366731d8d9
Navigation: Add descriptions to NavModelItems (#55669)
* add some descriptions!

* Update some descriptions

* Tweak playlist description

* fix unit tests + betterer
2022-09-23 16:08:08 +01:00
Ashley Harrison
c65a8d3cab
reenable active state for home (#55566) 2022-09-23 16:03:01 +01:00
Kristina
c3e4f1f876
Explore: Add resize to split view, with Min/Max button (#54420)
* Add split resize to Explore without keeping width in state

* debug commit

* ugly hack around split lib only supporting one child

* Use SplitView to accomodate one or two elements, remove debug code, fix test

* More cleanup, fix state action

* Fix even split from manual size scenario

* cleanup

* Add new state elements to test

* Handle scrollable on internal element for virtualized lists

* Left align overflow button for explore

* Change min/max buttons

* Apply suggestions from code review

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Add more suggestions from the code review

* Fix problems tests found

* commit broken test with debug info

* Add test, remove debug code

* Remove second get of panes

* Remove second get of panes

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-09-23 08:20:33 -05:00
Sonia Aguilar
e714d750f2
Alerting: Character / allowed in dashboard folder names, but not in alert folder names (#54395)
* Refactor FolderPicker to functional componment and add dissalowSlashes as an optional prop

* Update DetailsStep component to use FolderPicker dissalowing slashes in folders

* Adds icon that links to the Github issue when showing slashes not allowed  warning

* Add test for slashed folders warning

* Fix merge conflicts with folder creation fix PR

* Move slashes filter to useRuleFolderFilter hook, and make folder warning an optional generic prop

* Apply PR review suggestions
2022-09-23 14:44:24 +02:00
juanicabanas
c7419de2e5
PublicDashboard: Add RTK Query with loading and error state. Add MSW dependency for testing. (#55518)
PublicDashboard: Add RTK Query with loading and error state. Add MSW dependency for testing.
2022-09-22 09:35:04 -03:00
kay delaney
9e0d349bf9
LibraryPanelSearch: Refactor and fix hyphen issue (#55314) 2022-09-21 18:37:17 +01:00
Ashley Harrison
cf19baf80f
improve responsiveness of breadcrumbs (#55572) 2022-09-21 15:52:06 +01:00
Ashley Harrison
1978b935ba
remove underlay fade out animation (#55578) 2022-09-21 10:42:08 -04:00
Torkel Ödegaard
8440baab91
NavBarMenu: Section as links and design tweak (#55538)
* scaffold new component + remove storing of expanded state

* some padding fixes

* simplify!

* move browse back to being a child of dashboards

* behaviour working

* improve child matcher to look recursively

* increase NavBarMenu zIndex to ensure it overlays explore drawer

* some renaming

* fix unit test

* make dashboards a top level item again and make chevrons their own buttons

* remove active background state

* Finished tweaks

* remove theme change

* Remove exit animation

* align button centrally + fix empty message alignment

* only show the empty message if there are no children

* ensure overflowing menu items truncate correctly

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-09-21 11:57:30 +02:00
Torkel Ödegaard
96dfc4bac5
GrafanaRoute: Use React.Lazy instead of react-loadable and improve error handling (#55339)
* Things are working

* Add new GrafanaRoute tests

* removed old file

* Remove from package.json
2022-09-21 05:41:05 +02:00
Torkel Ödegaard
40bc140a9a
Refactoring and simplifying TopSearchBar (#55341) 2022-09-20 18:57:38 +02:00
owensmallwood
aae2c3c4f4
PublicDashboards: Tag is rerendered when dashboard meta changes in state (#55414)
Can update dashboard meta state using dashboard events.
2022-09-20 10:42:57 -06:00
Josh Hunt
070d44802f
Chore: Type Rudderstack and AppInsights window APIs (#55162)
* Chore: Type Rudderstack and AppInsights window APIs

* remove rudder sdk to dev deps
2022-09-20 10:06:31 -04:00
Josh Hunt
d014a3a09b
Echo: Add support for Google Analytics 4 (#55446)
* user essentials mob! 🔱

lastFile:public/app/core/services/echo/backends/analytics/GA4Backend.ts

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/core/services/echo/backends/analytics/GA4Backend.ts

* user essentials mob! 🔱

lastFile:public/app/core/services/echo/backends/analytics/GA4Backend.ts

* user essentials mob! 🔱

lastFile:public/app/app.ts

* user essentials mob! 🔱

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Leodegario Pasakdal <leodegario.pasakdal@grafana.com>
2022-09-20 03:13:14 -07:00
Torkel Ödegaard
10b3c0787a
CSSTransition fixes warnings (#55340) 2022-09-20 11:47:31 +02:00
Kristina
273ff02dde
Explore: Add error handling function when retrieving datasource (#55055)
* Use datasource function with error handling

* Check datasource exists when validating query, add test

* Add mock to test that now requires it

* Add comment explaining verbose validity logic
2022-09-19 09:43:16 -05:00
Torkel Ödegaard
2916b483eb
Update a few more pages to use navId instead of navModel from store (#55342) 2022-09-19 13:21:41 +02:00
kay delaney
64bbb7a7ce
Chore: Update and enforce usage of typed react-redux hooks (#55349)
* Chore: Update and enforce usage of typed react-redux hooks
2022-09-19 10:49:35 +01:00
Leo
1a0cbdeabe
Navigation: Add help menu to top search bar (#55062)
* add help menu to top search bar

* fixes

* handle preventDefault in node graph specifically

* use icon prop of MenuItem

* undo changes to ContextMenuPlugin/DataLinksContextMenu

* remove unused component

* revert storybook changes

* Tweaks

* remove unused style

* stop propagation on the header so version can be highlighted

* make sure useContextMenu has the exact same logic as before

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-09-17 18:17:00 +02:00
Gareth Dawson
5c66c41220
Loki: Remove any type from logsModel.test.ts (#55287)
* Remove any type from logsModel.test.ts

* Remove duplicate type checks
2022-09-16 12:56:35 +01:00
Torkel Ödegaard
b8e72d6173
TopNav: KioskMode rewrite move to AppChrome responsibility and make it a global feature (#55149)
* Initial progress

* Moving keybindingSrv to context

* Simplfy KioskMode

* Removed unused logic

* Make kiosk=tv behave as before but when topnav is enabled

* Minor fix

* Fixing tests

* Fixing bug with notice when entering kiosk mode

* Fixed test
2022-09-15 14:04:58 +02:00
Ryan McKinley
7700b529f9
SupportSnapshots: improved iframe support (#55059)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-09-14 12:54:09 -07:00
Sonia Aguilar
7a6f452f13
Alerting/fix folder creation dropdown (#54687)
*Refactor FolderPicker to be functional component.

* Add customAdd optional property to FolderPicker so we can add new values in the alert view but keeping the same behaviour in the rest of the ui.

* Add test for being able to add folder when no folders found.
2022-09-14 14:04:36 +02:00
Ashley Harrison
14d4e0eeca
set font-weight correctly (#55074) 2022-09-13 13:34:02 +02:00
Marcus Andersson
c95b530502
DataSource: Adding possibility to hide queries from the inspector (#54892)
* adding the possibility to hide queries when they are executed via the DataSourceWithBackend.query
2022-09-13 13:27:16 +02:00