Commit Graph

1712 Commits

Author SHA1 Message Date
Nathan Marrs
34fefa1d47
Fix to geomap editor crash (#48786) 2022-05-05 13:28:03 -07:00
Connor Lindsey
08bee1e682
Trace to logs: Only show loki and splunk datasources in settings (#48723) 2022-05-05 06:28:28 -06:00
Maria Alexandra
6e530d45bc
grafana/ui: Add default type="button" to <Button> (#48183) 2022-05-04 18:36:14 +02:00
Ashley Harrison
06d3c27bc1
Select: Portal menu by default (#48176)
* Remove menuShouldPortal from all <Select /> components

* fix unit tests

* leave menuShouldPortal as an escape hatch

* Fix import order
2022-05-04 15:12:59 +01:00
Ashley Harrison
8fcae1ef3c
Navigation: change Search Dashboards back to sentence case (Search dashboards) (#48272)
* revert search dashboards to sentence case

* Saved Items -> Saved items
2022-05-04 14:24:10 +01:00
Nathan Marrs
ff38f24044
Canvas: Refactor group to frame (#48671) 2022-05-03 22:58:00 -07:00
Josh Hunt
5dabb55b39
Navigation: Enable new navigation by default (#48447) 2022-05-03 16:28:40 +02:00
Ivana Huckova
f90622e0d0
Shortcuts: Add shortcut to show shortcuts to the list of shortcuts (#48395)
* Shortcuts: Add shortcut for shortcuts

* Update public/app/core/components/help/HelpModal.tsx

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-02 14:55:44 +02:00
Joao Silva
cc114e24ca
Navigation: Fixes closing submenus on scrolling (#48207) 2022-04-28 10:19:10 +01:00
kay delaney
3b4d237ade
Notifications: Hide display of trace ID behind feature flag (#48057)
* Notifications: Hide display of trace ID behind feature flag
2022-04-26 14:31:27 +01:00
Joao Silva
ebe34ddcba
Navigation: Remove the 'active' indicator from the Home icon when collapsed (#48192) 2022-04-25 17:12:58 +01:00
Ashley Harrison
a7f02094b1
Navigation: Add scroll indicators (#48115)
* Attach nav item menus to a portal that's a sibling of the chevron to prevent incorrect stacking

* add scrollbar to navbar

* Make clickable area of grafana logo full size

* hide vertical track as well

* initial attempt at a scroll overlay

* fix indentation

* Extract into a separate component

* Add arrows

* fix unit tests

* Fix imports in new component

* add comment
2022-04-22 17:21:52 +01:00
Josh Hunt
3c6e0e8ef8
Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
Ashley Harrison
5f83fc3c61
Navigation: Use correct component for custom branding (#48101)
* Use correct component for whitelabelling

* extract logic into reusable function
2022-04-22 11:04:23 +01:00
Ashley Harrison
a34da3e248
Navigation: Implement scrolling navbar + fix clickable area of grafana logo (#48045)
* Attach nav item menus to a portal that's a sibling of the chevron to prevent incorrect stacking

* add scrollbar to navbar

* Make clickable area of grafana logo full size

* hide vertical track as well

* prettier...
2022-04-22 11:04:04 +01:00
Ashley Harrison
11bc5e1a06
Navigation: Prevent chevron overlaying navbar menus (#47988)
* Attach nav item menus to a portal that's a sibling of the chevron to prevent incorrect stacking

* Make sure hover menus size correctly

* refactor into separate component

* Fix focus behaviour

* fix test again...
2022-04-22 10:38:47 +01:00
Ashley Harrison
d832bde270
Upgrade @testing-library/user-event to v14 (#47898)
* Update dependency @testing-library/user-event to v14

* everything is async...

* everything is async pt.2

* Fix cascader tests

* hack the yarn.lock file to remove the old version of @testing-library/dom

* some more fixes!

* MOAR FIXES

* more fixes

* remove a bunch of places where we're wrapping in act()

* down to 7 failing tests...

* Fix arrow tests

* Fix rest of NavBarItem tests

* Fix last tests

* Use {Enter} instead of {enter}

* Revert "Use {Enter} instead of {enter}"

This reverts commit e72453bb52.

* remove some unused act imports

* Fix LibraryPanelsSearch tests

* more stable test

* More consistent test...

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-21 13:15:21 +01:00
Joao Silva
34d4b571e6
Navigation: Fixes issue with menu closing when hovering back to the trigger (#47992) 2022-04-21 10:12:37 +01:00
Alex Khomenko
9c0aa09a85
Feature Highlights: update upgrade components UI (#47885)
* Highlights: add action prop

* Highlight team sync for trial users

* Add badges for trial highlights

* Move events to UpgradeBox

* Fix undefined license settings

* Update snapshot

* Update public/app/features/datasources/state/navModel.ts

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

* Update public/app/features/datasources/state/navModel.ts

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

* Update public/app/features/datasources/state/navModel.ts

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

* Update copy and event handling

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-04-20 15:08:49 +03:00
kay delaney
c48d8d1d48
Frontend: Add notification persistence behind feature flag (#47871) 2022-04-20 10:42:32 +01:00
Ashley Harrison
bb5f77703c
prevent horizontal scrollbar on firefox during expand animation (#47758) 2022-04-19 10:31:59 +01:00
Adela Almasan
858a1bd24e
Geomap: Add color scale in legend (#47803)
Added color scale in geomap legend
2022-04-18 09:19:20 -05:00
kay delaney
38809d73c2
Nav: Icon clickable area fills all available space (#47334)
Closes #47255
2022-04-13 14:41:48 +01:00
Torkel Ödegaard
6042beab43
Performance: Create separate div for portal root to limit reflow -> recalc style (#47633)
* Performance: Create separate div for portal root to limit reflow -> recalc style

* refactoring
2022-04-13 07:39:22 +02:00
Maria Alexandra
85de0d88c7
Navigation: Show only + icons in overlay menu for new NavBar (#47347)
* Nav: Show overlay icons based on allowed list

* user essentials mob! 🔱

* Navigation: clean up and use new backend prop to show plus icons and
improve visual styling

* Nav: Fix top padding

* refactor to not use showIconInNavbar in NavBarMenuItem

* remove a missed bit

* refactor icon into const

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-04-12 14:51:40 +01:00
Torkel Ödegaard
7181efd1cf
Explore: Allow users to save Explore queries to dashboards (#47083)
* Select: Expose AsyncSelectProps interface

* DashboardPicker: Add a generic DashboardPicker component

* Dashboard Service: improve types

* Explore: allow saving explore state in a new panel in an existing dashboard

* Handle saving provisioned dashboards error

* Improve test coverage

* simplify test setup

* Strip base path from url when redirecting to a dashboard

* Keep existing variables when saving to an existing dashboard

* group assertions in test

* SearchCard: handle undefined in meta.updated

* Change required error message

* Add to dashboard alternative

* Add to existing is working

* Add to dashboard form

* remove default add-panel when creating a dashboard from explore

* types cleanup

* remove unneeded BE change

* simplify selector

* Add explore2Dashboard feature toggle

* add tests

* Small refactor & add tests

* small DashboardPicker improvements

* use partial from lodash

* Better error handling

* improve tests & disable button when there are no queries

* rename addPanelToDashboard function

* remove localStorage item if opening tab fails

* UI touchups & tracking

* Fix tests & remove close reporting

* remove echologger debug

* fix adding a panel to an existing dashboard

* Enable explore2Dashboard by default and add docs

* Ensure each panel in dashboards has a valid ID

* force CI restart

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-04-12 13:26:07 +02:00
Ashley Harrison
fb0f30e30b
Navigation: wrap long items in the menu correctly (#47431)
* start implementing wrapping behaviour

* handle more cases

* minWidth > width to preserve mobile behaviour

* Better css
2022-04-11 17:19:33 +01:00
Nathan Marrs
99bb6ebd2b
Search: Update tag filter options dynamically (#47165) 2022-04-08 12:18:52 -07:00
Ashley Harrison
d95782845d
Navigation: add aria-label to NavBarToggle (#47434)
* add aria-label to NavBarToggle

* use open/close instead
2022-04-07 14:14:01 +02:00
Ashley Harrison
04c037b2cb
Navigation: implement full-width mobile menu (#47383)
* navigation: implement proper mobile menu

* Update public/app/core/components/NavBar/Next/NavBarMenu.tsx

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* animation feedback

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-04-06 16:53:59 +01:00
Ashley Harrison
9b61f1cd9f
close when clicking just the icon (#47331) 2022-04-05 16:16:05 +01:00
Ashley Harrison
b6a184996b
Implement hover states + remove some old code to do with pinning (#47328) 2022-04-05 15:53:23 +01:00
Joao Silva
d311a3bef5
Navigation: Keeps nav item hover when hovering over the item menu (#47281) 2022-04-05 15:38:58 +01:00
Ashley Harrison
8ede6161d4
Navigation: implement underlay (#47311)
* Navigation: implement underlay

* abstract out animation duration and add box-shadow

* rename underlay to backdrop, better syntax for composing css
2022-04-05 14:21:22 +01:00
kay delaney
25c91d7bb9
Nav: Capitalize "Dashboards" in "Search Dashboards" (#47289) 2022-04-05 09:17:23 +01:00
kay delaney
2018d83e1c
Navigation: Add persistence to collapsible nav items (#47292) 2022-04-05 09:17:02 +01:00
Cat Perry
b5f2f3e710
Tempo: Traces to Logs - From viewing Tempo traces to displaying Splunk logs (#46855)
* Add functionality to see splunk logs via tempo trace view
2022-04-04 13:24:33 -07:00
Ashley Harrison
1c34cc8b91
Navigation: Put expand toggle at beginning of tab order (#47268)
* Put toggle at beginning of tab order

* create NavBarToggle

* move margin into the common component

* lint fixes
2022-04-04 16:51:24 +01:00
Ashley Harrison
962eba39ac
Navigation: Make expandable menu items fill content properly (#47264) 2022-04-04 14:48:58 +01:00
Ashley Harrison
56176e320b
Navigation: Fix menu scrolling in expanded menu (#47261) 2022-04-04 14:48:48 +01:00
Ashley Harrison
e0457665f6
Navigation: prevent navbar from showing when .sidemenu-hidden is set (#47134) 2022-04-01 11:27:53 +01:00
Ashley Harrison
4958f932aa
wrap icons in a div to ensure they're centred (#47136) 2022-04-01 11:27:46 +01:00
Maria Alexandra
7ae72e1195
Navigation: Refactor existing menu to allow for scrolling (#47076)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
2022-04-01 11:24:52 +01:00
kay delaney
83140f7369
Navigation: Fix layout shift for long collapse content (#47161) 2022-04-01 10:42:19 +01:00
Ashley Harrison
a571fcda6e
knock back the color of the navbar toggle (#47131) 2022-03-31 14:35:38 +01:00
kay delaney
54b1d88c44
Navigation: Add animation when closing nav menu (#47128) 2022-03-31 14:42:38 +02:00
Ashley Harrison
6b2e1c6187
Navigation: lower expandable navbar z-index (#47125) 2022-03-31 13:03:23 +01:00
Ashley Harrison
0cde5908ca
Navigation: fix gap at top of menu (#47123) 2022-03-31 13:03:13 +01:00
Ashley Harrison
7d9f22fa59
Navigation: add border in collapsed state (#47122) 2022-03-31 12:05:24 +01:00
kay delaney
f486b54b84
Navigation: Rough implementation of new navbar design (#46909) 2022-03-30 18:05:52 +01:00
Alex Khomenko
114704e2e2
Feature Highlights: update components (#46920)
* Apply new upgrade styles

* Add caption/update pro badge color

* Update team sync upgrade page

* Add UpgradeContentVertical

* Update public/app/core/components/Upgrade/UpgradeBox.tsx

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

* Update screenshots

* Update screenshots[2]

* Scroll screenshot if doesnt fit

* Add missing target prop

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-03-30 14:46:56 +02:00
Ashley Harrison
7d8af12cca
Navbar: remove visual sections + home button (#46693)
* Navbar: remove visual sections + home button

* remove padding

* Fix label
2022-03-18 10:57:55 +00:00
Connor Lindsey
0da40b7f09
Tempo: Separate trace to logs and loki search datasource config (#46655)
* Tempo: Separate trace to logs and loki search datasource config

* Add getLokiSearchDS util and tests
2022-03-17 11:23:15 -06:00
Nathan Marrs
11aa6a3e8f
Value mapping/add icon support (#44503)
Co-authored-by: Ryan McKinley <ryantxu@users.noreply.github.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-03-15 08:51:12 -07:00
renovate[bot]
9546523f41
Update dependency @react-aria/button to v3.4.2 (#45452)
* Update dependency @react-aria/button to v3.4.2

* Use type assertions

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-03-14 16:31:55 +00:00
matt abrams
ec84b7bd23
A11y: Make the Library Panel "clear filter" buttons accessible (#46341)
* swap span for button + add aria-label

* swap span for button + add aria-label

* add new style + increase padding

* fix typo

* switch to link variant + trim custom css
2022-03-11 11:10:13 +01:00
Yaelle Chaudy
bfde8ee603
A11y : Updated EmptyListCTA to switch between Button and LinkButton (#46292)
* Updated EmptyListCTA to switch between Button and LinkButton

* Added tests
2022-03-08 12:41:00 +01:00
Karl Persson
7966e3583e
Access control: Dashboard and folder permissions frontend (#45094) 2022-03-03 15:18:27 +01:00
kay delaney
f530775e45
Chore: Remove several 'as' type assertions (#45913) 2022-03-02 14:02:09 +00:00
kay delaney
59317a22e4
AppNotifications: Migrate usage of deprecated appEvents.emit method to redux actions (#45607) 2022-02-23 11:31:15 +00:00
Connor Lindsey
af2d19b02e
Tracing: Add option to map tag names to log label names in trace to logs settings (#45178)
* Add mapped tags input to allow renaming tags in trace to logs settings

* Use mappedTags in createSpanLink

* Update traceToLogs docs

* Show 'add kv' button if no tags

* Update docs

* Default mappedTags to tag values
2022-02-22 23:17:45 +01:00
kay delaney
b6682cdcb9
Navigation: Proof-of-concept for pinning navbar items (#44775) 2022-02-21 15:25:47 +00:00
Ryan McKinley
bbddab0294
Chore: refactor core transformer folder structure (#45497) 2022-02-17 08:12:38 -08:00
Agnès Toulet
8835020457
Feature Highlights: add RS event for nav items (#45470) 2022-02-17 14:20:37 +01:00
Ryan McKinley
bb86ba99ee
Heatmap: new panel based based on uPlot (#44080)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-16 14:49:17 -08:00
Dan Cech
51cd6f3cc5
Configuration: Add ability to customize okta login button name and icon (#44079)
* add ability to customize okta login button name and icon

* update configs, add basic frontend test

* add icon to oauth settings type

* trigger tests

* fix typecheck
2022-02-16 11:35:00 -05:00
Dominik Prokop
8bb3de3037
Analytics: Collect information about queries reordering (#45392) 2022-02-16 14:16:25 +01:00
Hugo Häggmark
5760a18da5
Chore: Replace enzyme with RTL in OrgSwitcher.test.tsx (#45439) 2022-02-16 00:48:13 -08:00
kay delaney
10cc2fd6bc
Chore: Add types for OAuth settings in config (#45247) 2022-02-11 13:54:24 +00:00
Victor Marin
a12f2e1d19
TablePanel: Do not prefix columns with frame name if multiple frames and override active (#45174)
* Fix bug where table panel shows column names prefixed with frame name

* simplify && fix tests

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-02-11 11:47:48 +02:00
Karl Persson
d2b9da9dde
Access control: Support uids for resource permissions (#45226)
* add middleware to solve uid -> id for requests
2022-02-10 17:47:48 +01:00
Shahar Mor
3eac34f5f3
Kiosk: Reuse kiosk module (#44625)
* Reuse kiosk module, centralize kiosk query handling

* update kiosk tests to set correct kiosk value

* fix DashboardPage kiosk test

* remove unused UrlQueryValue, revert import change
2022-02-10 11:54:50 +00:00
Alexander Zobnin
49790eac32
Access control: Fix role picker after roles update (#44978)
* Access control: Fix role picker after roles update

* Refactor, use useAsyncFn()

* Review suggestions
2022-02-09 16:42:46 +03:00
Hugo Häggmark
e4534deab3
Chore: Reduce console output in NavBarItem.test.tsx (#45139)
* Chore: Reduce console ouput in NavBarItem.test.tsx

* Chore: remove async
2022-02-09 14:07:28 +01:00
Agnès Toulet
ee6f8b6cd9
Feature Highlights: add RudderStack events (#45099)
* add RS events for PRO badge

* part 2

* fix team sync events

* clean up ProBadge
2022-02-09 11:18:27 +01:00
Alex Khomenko
d21abdfe77
Feature Highlights: Refactor report nav highlight (#44765)
* Remove UpgradeBox from report nav

* Add children prop

* Update icon

* Update styles

* Update text

* Add pro badge to main nav

* Remove redundant span

* Update secondaryAction
2022-02-08 09:53:57 +02:00
Agnès Toulet
bdac6576e4
Feature Highlights: add highlight to toolbar button and add upgrade modal (#44645)
* Feature Highlights: add highlight to toolbar button and add upgrade modal

* replace hideTitle attribute by making title optional

* update modal design

* remove unused updates
2022-02-07 16:04:15 +01:00
Karl Persson
3cf31451ec
Access control: Reduce number of API calls for role picker (#44905)
* Restucture state for TeamRolePicker and UserRolePicker

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-02-04 14:54:42 +01:00
Ashley Harrison
9e52361c1e
Accessibility: Fix text selection when using FocusScope (#44770)
* Add tabIndex={-1} to places using focusScope to allow for text highlighting

* use useDialog

* don't need explicit tabIndex anymore

* remove duplicate spreading of props
2022-02-04 11:20:18 +00:00
Josh Hunt
de7a920967
Chore: Suppress messages and logs from tests (#44629)
* Suppress "not wrapped in act()" warning in UserPicker test

* Add menuShouldPortal to AmRoutesExpandedForm to suppress deprecation warning

* use forwardRef in alerting ActionIcon to suppress ref warning

* Add menuShouldPortal to alerting GroupBy to suppress deprecation warning
2022-02-04 12:36:44 +11:00
Gabriel MABILLE
6d931226d8
AccessControl: Show UserPicker based on canListUsers (#44843)
* AccessControl: Show UserPicker based on canListUser

* Update public/app/core/components/AccessControl/AddPermission.tsx

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-02-03 16:59:25 +01:00
renovate[bot]
d87cd6f26c
Update dependency prettier to v2.5.1 (#43473)
* Update dependency prettier to v2.5.1

* prettier fixes

* chore(toolkit): bump prettier to 2.5.1

* style(eslint): bump grafana config to 2.5.2 in core and toolkit

* style(mssql-datasource): fix no-inferrable-types eslint errors

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-02-02 12:02:32 +00:00
Nathan Marrs
b2b584f611
Geomap: Improve tooltip UX and fix data links (#44740) 2022-02-01 18:17:39 -08:00
Josh Hunt
c6ce629fd8
I18n: Translate navigation items (#44131)
* I18n: Translate navigation items

* improve comment, remove console.log

* update mock macros

* Mark up all phrases for translation

* added deprecate text comment, moved translations to a seperate file

* use TestProvider in NavBarItem

* use TestProvider in nav tests

* remove text deprecation comment

* update translations
2022-01-31 03:41:58 +01:00
Ashley Harrison
666a794a82
Navigation: Initialise navTree in redux store (#44440)
* Add navTree to redux store and used that in NavBar/NavBarNext

* Use createSlice

* update import

* Use NavBarUnconnected instead of Component
2022-01-28 10:06:52 +00:00
Alex Khomenko
55e1c53e36
NavModel: Enable adding suffix elements to tabs (#44155)
* Trigger extra events

* Extend html attributes

* Add suffix to tabs

* Add upgrade routes

* suffix => highlightText

* suffix => suffixText

* Add size prop

* Update prop name

* Convert tabSuffix to a component
2022-01-26 09:15:45 +02:00
Kevin Burke
24efb42f19
app/core/components/TraceToLogsSettings: fix spelling error (#44399)
"Let's" is an abbreviation of "let us", which is not the right use in
this sentence on the settings page.
2022-01-25 12:42:48 +01:00
Torkel Ödegaard
566556fea2
QueryEditors: Restore query editor margin to what old value (#44384) 2022-01-25 09:19:39 +01:00
Alex Khomenko
aead2e9157
Navigation: allow adding extra content (#44048)
* Add PRO badge

* Allow adding extra content

* Add extra content for the new navbar

* Use highlight text instead of extra content

* Trigger extra events

* Remove ExtraContent

* Update public/app/core/components/NavBar/NavFeatureHighlight.tsx

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* Remove redundant i

* Add UpgradeBox

* Move highlight to menu trigger

* Clear navbar next

* Cleanup

* Fix UpgradeBox styles

* Add arrow icon

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-01-25 10:04:44 +02:00
Ryan McKinley
c0fc60dfef
Table: default display for geometry fields (#44347) 2022-01-24 16:10:36 -08:00
Ryan McKinley
b88811e2af
DataFrame: deprecate/remove field.parse(any) (#44299) 2022-01-24 16:27:35 +00:00
Nathan Marrs
76827c2069
Refactor: move threshold editor out of grafana-ui (#44300) 2022-01-21 16:17:33 -08:00
Ryan McKinley
082b1b4db7
Geomap: add spatial transformers (alpha) (#44020) 2022-01-21 14:27:26 -08:00
Nathan Marrs
c6e853a13c
Refactor: Move Value Mappings to Grafana public instead of Grafana UI (#44237) 2022-01-20 20:36:34 -08:00
Kyle Cunningham
febc24522d
Accessibility Fixes for Several SQL Based Datasource Config Pages (#43982)
* Add label elements for select boxes: MSSQL config

* Add Permission level label

* Add aria-label for password field

* Fixes for Postgres a11y page

* Fix whitespace error

* Swap aria-labelby for "for"

* Prefer "for" over aria-labeledby
2022-01-19 15:53:54 -06:00
Josh Hunt
9f97f05fcc
DashboardSettings: Prevent Dashboard permissions from linking to folder permissions when user does not have sufficient permissions (#44212)
* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* add tests

* fix up

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2022-01-19 16:27:33 +01:00
Alexander Zobnin
dc913f2311
Access control: fetch role options only if user has permissions (#44201)
* Access control: fetch role options only if user has permissions

* Fix org/users page
2022-01-19 16:15:52 +03:00
Gabriel MABILLE
fc405ea9da
AccessControl: Make Permissions component customizable (#43992)
* Setting default values for props

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

* Using table instead

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
2022-01-19 12:19:46 +01:00
Karl Persson
acb791bdd6
Disable select when permissions is not managed or if user does not have (#44144)
* Disable select when permissions is not managed
2022-01-18 12:45:14 +01:00
Josh Hunt
36983d8d3b
Chore: Mark up User Profile page for translation (#43874)
* Mark up User profile page for translation

* Extract new messages

* updated selectors

* update selectors

* wip TestProvider

* update tests

* fix field labels

* extract new messages

* don't store date objects in redux state

* don't store date objects in redux state
2022-01-17 16:58:49 +00:00
Alexander Zobnin
867ca5b59e
Access control: Team role picker (#43418)
* Refactor: move fetching from role picker to parent component

* Make built in role props optional

* Initial team role picker

* Add role picker to the teams list

* Optimize fetching roles

* Add pagination for the teams page

* Fix tests

* Hide roles if access control not enabled

* Fix test snapshots

* Refactor: use useAsync() hook

* Refactor: simplify input component

* Move api calls to separate file

* Refactor: use useAsync() hook for user role picker

* Tweak role picker input width

* Fix pagination

* Update test snapshots

* Use loading state from useAsync() hook

* Fix roles label if no roles assigned
2022-01-17 18:04:54 +03:00
Gilles De Mey
bd9df4f829
Alerting: show deleted datasource (#43891) 2022-01-17 14:30:00 +01:00
Ryan McKinley
fd8baf5f7d
Gazetteer: reactor so the source is a DataFrame (#43783) 2022-01-13 17:15:31 -08:00
Giordano Ricci
afd110309c
Elasticsearch: fix a11y issues in datasource settings (#43706) 2022-01-12 09:19:10 +00:00
Ryan McKinley
7e5e3f9dc0
FeatureToggles: typed as optional booleans (#43925) 2022-01-11 16:18:54 -08:00
Dan Cech
34f757ba5a
switch to using featureEnabled for enterprise features (#41559)
* switch to using featureEnabled for enterprise features
2022-01-07 15:11:23 -05:00
David
a08e0581de
Hotkeys: Make time range permanent (#43802)
Typing `t a` in Explore or Dashboards will turn a relative time like "Last 1 hour"
into an absolute range to make the URL permanent, so that when sharing it others
will see the same data.

- registered `t a` in key service
- new `AbsoluteTimeEvent` dispatch via global event bus
- dashboard times handled in TimeSrv
- Explore times handled in Explore.tsx and Explore's time reducer

I could not find an easy way to combine time handling for Exlore and Dashboard in one place.
2022-01-07 16:51:29 +01:00
kay delaney
36e4a871f2
UI/ClipboardButton: Remove ClipboardJS in favor of native Clipboard API (#42996)
* UI/ClipboardButton: Remove ClipboardJS in favor of native Clipboard API
Closes #42365

* Add backwards compatibility
2022-01-07 13:41:09 +00:00
kay delaney
890c43adf1
UI/Card: Refactor Card component for improved accessibility (#41890)
* UI/Card: Improve accessibility of Card component

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-01-06 15:48:12 +00:00
Ashley Harrison
c87b048af8
Login: Prevent page overflowing on mobile (#43739) 2022-01-06 10:34:13 +00:00
Ashley Harrison
39f787cbef
Navigation: Remove some redundant css and tidy up reverse logic (#43403)
* Remove some redundant css and tidy up reverse logic

* Fix alignment of subtitle

* Remove navbar-dropdown class
2021-12-21 16:15:03 +00:00
renovate[bot]
159fb4cebb
Update dependency eslint-plugin-react to v7.27.1 (#43207)
* Update dependency eslint-plugin-react to v7.27.1

* Fix up code to work with new version of eslint-plugin-react

* kick drone

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-12-21 11:11:27 +00:00
Ashley Harrison
c7f76df61e
Use outline -2px to guarantee visibility of outline (#43400) 2021-12-21 10:52:26 +00:00
Ashley Harrison
57c3549b07
Implement left arrow to focus parent, fix list style on firefox (#43345)
* Implement left arrow to close menu for now, fix list style on firefox

* Implement onLeft

* Fix outline of first item in navbar

* Fix focus styles appearing when using mouse

* add unit test
2021-12-20 17:41:14 +01:00
Ashley Harrison
6f8e651cdb
Move the background style to the parent component (#43359) 2021-12-20 16:00:29 +00:00
Karl Persson
c3ca2d214d
Access control: Refactor managed permission system to create api and frontend components (#42540)
* Refactor resource permissions
* Add frondend components for resource permissions

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2021-12-20 09:52:24 +01:00
Connor Lindsey
70c0a9d117
A11y: Fix Fastpass issues for tracing query editors and config pages (#42759)
* Add aria-labels to Jaeger config page

* Fix fastpass issues for Tempo config page

* Fix fastpass issues for other tracing query types like search
2021-12-17 11:49:21 -07:00
Ben Sully
13d9fddd3e
Transformations: Add 'JSON' field type to ConvertFieldTypeTransformer (#42624)
* Add 'JSON' field type to ConvertFieldTypeTransformer

I've been playing around with #41994 and found that it requires fields
to contain array values, which can't be sent from a backend plugin. This
PR adds the ability for the ConvertFieldTypeTransformer to parse
JSON values and store the result in the transformed field.
The main use case for this right now is so that a field
containing a JSONified array can be transformed into a field
containing an actual array, which can in
turn be used for the table charts in #41994.

Supersedes #42521.

* Add second option to complex field conversion to increase flexibility

This avoids falsely equating 'JSON' with FieldType.other, and instead
allows multiple parsers to be used if the 'Complex' type is selected.

Currently only JSON parsing is implemented, but others could be
supported easily in future.

* Revert "Add second option to complex field conversion to increase flexibility"

This reverts commit 6314ce35eb.

* Improve test for object parsing of complex field transformer

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-12-16 11:18:11 +01:00
Torkel Ödegaard
8ca36b76cf
Select: Fix issue with placeholder and auto width (#42851)
* Select: Fix issue with placeholder and auto width

* Fixed lint issue
2021-12-08 14:05:13 +01:00
Hugo Häggmark
a0333c1545
Navigation: fix navigation when appSubUrl is configured (#42863)
* Navigation: fix navigation when appSubUrl is configured

* Update public/app/core/components/NavBar/NavBarItem.tsx

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

* Chore: changes after PR comments

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-12-08 10:42:08 +01:00
Nathan Marrs
2af5ad4764
Canvas: use name as UID (#42696) 2021-12-06 21:04:58 -08:00
Maria Alexandra
e468fcf518
Navigation: Implement Keyboard Navigation (#41618)
* Navigation: Start creating new NavBarMenu component

* Navigation: Apply new NavBarMenu to NavBarNext

* Navigation: Remove everything to do with .sidemenu-open--xs

* Navigation: Ensure search is passed to NavBarMenu

* Navigation: Standardise NavBarMenuItem

* This extra check isn't needed anymore

* Navigation: Refactor <li> out of NavBarMenu

* Navigation: Combine NavBarMenuItem with DropdownChild

* use spread syntax since performance shouldn't be a concern for such small arrays

* Improve active item logic

* Ensure unique keys

* Remove this duplicate code

* Add unit tests for getActiveItem

* Add tests for NavBarMenu

* Rename mobileMenuOpen -> menuOpen in NavBarNext (since it can be used for mobile menu or megamenu)

* just use index to key the items

* Use exact versions of @react-aria packages

* Navigation: Make the dropdown header a NavBarMenuItem

* Navigation: Stop using dropdown-menu for styles

* Navigation: Add react-aria relevant packages

* Navigation: Refactor NavBarDropdown to support react aria

* Navigation: apply keyboard navigation to NavBar component

* Navigation: UseHover hook for triggering submenu on navbar

* Navigation: rename testMenu component to NavBarItemButton

* WIP

* some hacks

* Refactor: clean up keybinding events

* Navigation:  render subtitle on item menu and disable it

* Navigation: Adds react-aria types (#42113)

* Refactor: refactor out to NavBarItemWithoutMenu

* Refactor: cleaning up stuff

* Refactor: comment out unused code

* Chore: Removes section and uses items only

* Chore: fix NavBarNext

* Chore: adds tests

* Refactor: minimize props api

* Refactor: various refactors

* Refactor: rename enableAllItems

* Refactor: remove unused code

* Refactor: fix clicking on menuitems

* Refactor: use recommended onAction instead

* Navigation: Fix a11y issues on NavBar

* Navigation: Fix a11y navBar Next

* Navigation: Remove unnecessary label prop, use link.text instead

* Apply suggestions from code review

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* Apply unit tests suggestions from code review

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

* Update react-aria/menu package to latest version and apply PR suggestion

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-12-06 06:58:17 +01:00
Ashley Harrison
cc9151d382
Dependencies: Jest 27 (#42681)
* Update jest monorepo

* Update version of marked so it doesn't throw an error, set testEnvironment

* Fix some unit tests

* Remove all these tests that aren't actually working...

* use spyOn instead of mocking the whole module

* Fix linting

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-03 17:09:25 +00:00
Nathan Marrs
e07abd76c0
Canvas: refactor layer editor (#42562)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-12-02 15:54:45 -08:00
Ashley Harrison
5eb35606b9
Transformations: Clarify behaviour of Date format (#42436)
* Transformations: Clarify behaviour of `Date format`

* Remove full stop from bullet point
2021-11-29 16:30:07 +00:00
wengelbrecht-grafana
e1a3b6a386
Update FieldLookupTransformerEditor.tsx (#42405)
Fixed 2 small spelling mistakes
2021-11-29 14:27:34 +01:00
Ashley Harrison
a897154017
pally-ci: Ignore version update element (#42249)
* pa11y-ci: Ignore update version element

* Add hideElements to pa11yci-pr.conf.js
2021-11-25 09:51:21 +00:00
Torkel Ödegaard
070344943c
PanelEditor: Present actionable suggestions when panel cannot visualize current data (#42083)
* PanelDataError: Show actions when current panel cannot visualize data

* Fixed so that suggestions tab is opened from action

* Cleanup

* Fixed tests

* Fix tests

* Fixing tests

* Fixed ts issues
2021-11-25 09:41:03 +01:00
Alexander Zobnin
177a0d69d1
Disable only built-in role selector for external users (#42197) 2021-11-24 17:25:28 +03:00
Ashley Harrison
20e1457a78
Select: use findBy and make these tests async to avoid act() errors (#42134) 2021-11-23 14:53:10 +00:00
Dominik Prokop
d2d38c978f
grafana/ui: Export types and utils required by grafana/experimental (#42133)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-11-23 15:41:51 +01:00
renovate[bot]
035e676cad
Update dependency react-select to v5 (#41604)
* Update dependency react-select to v5

* Remove @types/react-select and update types accordingly

* Fix all unit tests

* Add @ts-expect-error to individual errors, remove prefix as it doesn't seem to exist?

* Another minor typescript fix

* Apply fixes from torkel's PR

* Fix last typescript error

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-23 12:11:26 +00:00
Alexander Zobnin
da2c99a2e1
Access control: use delegatable flag to check if role can be granted (#42070)
* Access control: use delegatable flag to check if role can be granted or not

* Fix naming
2021-11-22 17:44:03 +03:00
Alexander Zobnin
6f8cfc6def
Role picker: extend width to prevent menu being out of page (#42047) 2021-11-22 16:30:24 +03:00
Ryan McKinley
82cf49143d
ExtractFields: properly detect value types from extracted fields (#41995) 2021-11-19 09:50:30 -08:00
Alexander Zobnin
d66158a042
Fix loop when cannot fetch roles (#41901) 2021-11-19 12:23:03 +03:00
Ieva
11f133b406
Access Control: use role groups in role picker (#41912)
* use role groups in role picker UI

* Update public/app/core/components/RolePicker/RolePickerMenu.tsx

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

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-11-19 08:52:16 +00:00
Ryan McKinley
a6e60c62f4
Transformers: extract fields from JSON and text (alpha) (#41791)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-18 21:52:49 -08:00
Gabriel MABILLE
0ee0a0b7a0
AccessControl: FGAC permissions for orgs endpoint on frontend (#41050)
* AccessControl: FGAC permissions for orgs endpoint on frontend

Protect org update endpoints

add or refactor missing right messages

cover org page

* removing scopes from orgs

* Perform permission control with global org

* Perform the error handling in case of 403

* Simplify frontend code by requiring read access for sure

* Remove roles I added to decrease the number of changes

* Remove the check for server admin to reduce the number of changes

* change error message

* Cleaning todos

* Remove unecessary changes

* Fix tests

* Update test snapshot

* Update pkg/api/roles.go

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update public/app/features/admin/AdminEditOrgPage.tsx

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Format AdminEditOrgPage for linting

* Update public/app/features/admin/AdminEditOrgPage.tsx

Co-authored-by: Vardan Torosyan <vardants@gmail.com>

* Update public/app/features/admin/AdminEditOrgPage.tsx

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Update public/app/features/admin/AdminListOrgsPage.tsx

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Commit suggestions

* Commit suggestion canRead canWrite

* fix typo

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2021-11-18 14:10:38 +01:00
Alexander Zobnin
757463bd27
Add new role picker to admin/users page (#40631)
* Very simple role picker

* Style radio button

* Separate component for the built-in roles selector

* Custom component instead of Select

* refactor

* Custom input for role picker

* Refactor

* Able to select built-in role

* Add checkboxes for role selector

* Filter out fixed and internal roles

* Add action buttons

* Implement role search

* Fix selecting roles

* Pass custom roles to update

* User role picker

* Some UX work on role picker

* Clear search query on close

* Blur input when closed

* Add roles counter

* Refactor

* Add disabled state for picker

* Adjust disabled styles

* Replace ChangeOrgButton with role picker on admin/users page

* Remove unused code

* Apply suggestions from code review

Suggestions from the @Clarity-89

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

* Refactor: fix some errors after applying review suggestions

* Show fixed roles in the picker

* Show applied fixed roles

* Fix role counter

* Fix checkbox selection

* Use specific Role type for menu options

* Fix menu when roles list is empty

* Fix radio button name

* Make fixed roles from built-in role disabled

* Make whole menu scrollable

* Add BuiltInRole type

* Simplify appliedRoles

* Simplify options and props

* Do not select and disable inherited fixed roles

* Enable selecting fixed role

* Add description tooltip

* Fix role param name

* Export common input styles from grafana/ui

* Add ValueContainer

* Use value container

* Refactor appliedRoles logic

* Optimise role rendering

* Display selected roles

* Fix tooltip position

* Use OrgRole type

* Optimise role rendering

* Use radio button from grafana UI

* Submenu WIP

* Role picker submenu WIP

* Hide role description

* Tweak styles

* Implement submenu selection

* Disable role selection if it's inherited

* Show new role picker only in Enterprise

* Fix types

* Use orgid when fetching/updating roles

* Use orgId in all access control requests

* Styles for partially checked checkbox

* Tweak group option styles

* Role picker menu: refactor

* Reorganize roles in menu

* Fix input behaviour

* Hide groups on search

* Remove unused components

* Refactor

* Fix group selection

* Remove icons from role tags

* Add spacing for menu sections

* Rename clear all to clear in submenu

* Tweak menu width

* Show changes in the input when selecting roles

* Exclude inherited roles from selection

* Increase menu height

* Change built-in role in input on select

* Include inherited roles to the built-in role selection

* refcator import

* Refactor role picker to be able to pass roles and builtin roles getters

* Add role picker to the org users page

* Show inherited builtin roles in the popup

* Filter out managed roles

* Fix displaying initial builtin roles

* Show tooltip only for non-builtin roles

* Set min width for focused input

* Do not disable inherited roles (by design)

* Only show picker if access control enabled

* Fix tests

* Only close menu on click outside or on indicator click

* Open submenu on hover

* Don't search on empty query

* Do not open/close menu on click

* Refactor

* Apply suggestions from code review

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

* Fix formatting

* Apply suggestions

* Add more space for close menu sign

* Tune tooltip styles

* Move tooltip to the right side of option

* Use info sign instead of question

Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-11-17 18:22:40 +03:00
Ashley Harrison
5452c069f7
PanelEdit: Display drag indicators on draggable sections (#41711)
* PanelEdit: Display drag indicators on draggable sections

* Move drag indicators between the sections
2021-11-17 13:46:24 +00:00
Hugo Häggmark
5498203507
Chore: Reduce pa11y-ci errors (#41787)
* Chore: moves alert to test-id

* Chore: moves Dashboard navigation to test-id

* Chore: moves Bar gauge value to data-testid

* Chore move Folder picker select container to data-testid

* Chore: moves Time zone picker select container to data-testid

* Chore: moves Choose starting day of the week to data-testid

* Chore: change tabIndex on search input

* Chore: moves various search related aria-lables to data-testid

* Chore: connects label to select input on alerting page

* Chore: connects TimeZonePicker and WeekStartPicker with labels

* Chore: moves CallToActionButton to data-testid

* Chore: move user home preferences select to data-testid

* Chore: lower all thresholds
2021-11-17 14:45:45 +01:00
Ashley Harrison
e0a60cf459
Navigation: Set dropdown text color to primary to match previous behaviour (#41560) 2021-11-10 17:34:38 +00:00
Gilles De Mey
2bc30daa49
Alerting: allows clearing the datasource selection in rule list (#41264) 2021-11-09 18:20:36 +01:00
Ashley Harrison
90d2d1f4da
Navigation: Refactor mobile menu into it's own component (#41308)
* Navigation: Start creating new NavBarMenu component

* Navigation: Apply new NavBarMenu to NavBarNext

* Navigation: Remove everything to do with .sidemenu-open--xs

* Navigation: Ensure search is passed to NavBarMenu

* Navigation: Standardise NavBarMenuItem

* This extra check isn't needed anymore

* Navigation: Refactor <li> out of NavBarMenu

* Navigation: Combine NavBarMenuItem with DropdownChild

* use spread syntax since performance shouldn't be a concern for such small arrays

* Improve active item logic

* Ensure unique keys

* Remove this duplicate code

* Add unit tests for getActiveItem

* Add tests for NavBarMenu

* Rename mobileMenuOpen -> menuOpen in NavBarNext (since it can be used for mobile menu or megamenu)

* just use index to key the items

* Use exact versions of @react-aria packages

* Navigation: Make the dropdown header a NavBarMenuItem

* Navigation: Stop using dropdown-menu for styles

* Navigation: Hide divider in NavBarMenu + tweak color on section header
2021-11-09 13:41:38 +00:00
Torkel Ödegaard
d07fa0ce5e
AngularJS: Move angular stuff into app/angular (#41415)
* Moving more angular parts

* Moving more angular stuff

* Moving components

* Move more things
2021-11-08 18:41:04 +01:00
kay delaney
c8b7373016
A11y/UserAdminPage: Improves tab navigation and focus management (#41321) 2021-11-05 14:45:00 +00:00
Ryan McKinley
70e92ef987
Transformations: support a rows mode in labels to fields (#41020) 2021-11-04 17:12:01 +01:00
Ashley Harrison
727a4bd9e4
Navigation: New NavBar designs behind feature toggle (#41045)
* Navigation: Remove plus button behind feature toggle

* Navigation: Add home button behind feature toggle

* Navigation: Move settings/admin to bottom section behind feature toggle

* Navigation: Refactor grafana logo to be a NavBarItem

* Navigation: Create new PluginSection and styling changes to support new sections

* Navigation: Hack to use mobile menu as a mega menu for now

* Navigation: Only render plugin section if there are items

* Navigation: mobile menu is always 100% width if toggle is off

* Navigation: Reset width back to 48 and fix broken css property

* Navigation: Create generic NavBarSection component to reduce repetition

* Navigation: Don't show sublinks for core items

* Navigation: Comments from UX review

* Navigation: Remove mobile menu hack

* Navigation: Unit tests for enrichConfigItems and other minor review comments

* Navigation: Move section logic to backend

* Navigation: Refactor alerting links out into a separate function

* Navigation: More tests for isLinkActive

* Linting...

* Navigation: Create new NavBar component for when feature toggle is enabled
2021-11-02 11:19:18 +00:00
kay delaney
124c3f537f
A11y: Fix misc. fastpass issues (#41088) 2021-11-01 14:45:23 +00:00
nikki-kiga
963544ffe6
Transformations: Add gazetteer transformation (#40967) 2021-10-27 20:20:56 -07:00
Torkel Ödegaard
54af57b8e6
VisualizationSelection: Real previews of suitable visualisation and options based on current data (#40527)
* Initial pass to move panel state to it's own, and make it by key not panel.id

* Progress

* Not making much progress, having panel.key be mutable is causing a lot of issues

* Think this is starting to work

* Began fixing tests

* Add selector

* Bug fixes and changes to cleanup, and fixing all flicking when switching library panels

* Removed console.log

* fixes after merge

* fixing tests

* fixing tests

* Added new test for changePlugin thunk

* Initial struture in place

* responding to state changes in another part of the state

* bha

* going in a different direction

* This is getting exciting

* minor

* More structure

* More real

* Added builder to reduce boiler plate

* Lots of progress

* Adding more visualizations

* More smarts

* tweaks

* suggestions

* Move to separate view

* Refactoring to builder concept

* Before hover preview test

* Increase line width in preview

* More suggestions

* Removed old elements of onSuggestVisualizations

* Don't call suggestion suppliers if there is no data

* Restore card styles to only borders

* Changing supplier interface to support data vs option suggestion scenario

* Renamed functions

* Add dynamic width support

* not sure about this

* Improve suggestions

* Improve suggestions

* Single grid/list

* Store vis select pane & size

* Prep for option suggestions

* more suggestions

* Name/title option for preview cards

* Improve barchart suggestions

* Support suggestions when there are no data

* Minor change

* reverted some changes

* Improve suggestions for stacking

* Removed size option

* starting on unit tests, hit cyclic dependency issue

* muuu

* First test for getting suggestion seems to work, going to bed

* add missing file

* A basis for more unit tests

* More tests

* More unit tests

* Fixed unit tests

* Update

* Some extreme scenarios

* Added basic e2e test

* Added another unit test for changePanelPlugin action

* More cleanup

* Minor tweak

* add wait to e2e test

* Renamed function and cleanup of unused function

* Adding search support and adding search test to e2e test
2021-10-25 13:55:06 +02:00
Ashley Harrison
447a088750
Annotations: Allow addition of custom values whilst tags are loading (#40702) 2021-10-21 14:55:02 +01:00
kay delaney
565537c6e2
A11y/Dashboard: Fix various dashboard settings issues (#40641)
See #39429
2021-10-20 14:54:00 +01:00
Torkel Ödegaard
25813db334
RowsToFields: Fix issue with field names that are numbers (#40580)
* RowsToFields: Fix issue with field names that are numbers

* Only add the index accessor if field name does not conflict with it

* fix lint

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-10-19 07:27:24 +02:00
Ashley Harrison
ec0fcbbf4b
Annotations: Improve tag search performance (#40567) 2021-10-18 15:00:46 +01:00
Guilherme Caulada
a9faab6b09
Dashboard: Add week start option to global and dashboard preferences (#40010)
* Add global week start option to shared preferences

* Add default_week_start to configuration docs

* Add week start option to dashboards

* Add week start argument to tsdb time range parser

* Fix strict check issues

* Add tests for week start

* Change wording on default_week_start documentation

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

* Update week_start column to be a nullable field

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Update configuration to include browser option

* Update WeekStartPicker container selector

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

* Add menuShouldPortal to WeekStartPicker to remove deprecation warning

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

* Add inputId to WeekStartPicker

* Use e2e selector on WeekStartPicker aria-label

* Simplify WeekStartPicker onChange condition

* Specify value type on WeekStartPicker weekStarts

* Remove setWeekStart side effect from reducer

* Fix updateLocale failing to reset week start

* Store week start as string to handle empty values

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-10-18 10:27:14 -03:00
kay delaney
db62ce477d
A11y/Dashboard: Fix various fastpass issues for dashboard settings (#40335)
* A11y/Dashboard: Fix various fastpass issue for dashboard settings
See #39429
2021-10-18 13:51:26 +01:00
Piotr Jamróz
6dc21d5899
Refactor: Decouple Label Browser from LocalStorage (#40449)
* Refactor: Decouple Label Browser from LocalStorage

* Clean up
2021-10-15 14:18:11 +02:00
renovate[bot]
58fdb717ba
Update dependency @types/react to v17 (#40440)
* Update dependency @types/react to v17

* Chore: Typescript fixes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-15 12:25:47 +01:00
renovate[bot]
4565fcd0df
Update dependency @testing-library/user-event to v13 (#40394)
* Update dependency @testing-library/user-event to v13

* Changes needed for userEvent v13

* Ignore pointer-event checks until jsdom issue is fixed

* Remove unused act imports

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-14 13:29:41 +01:00
Hugo Häggmark
31d50f931d
Chore: Reduces strict errors in DashboardPickerByID (#40431)
* Chore: Reduces strict errors in DashboardPickerByID

* Chore: updates after PR comments

* Chore: fix for undefined strict error
2021-10-14 10:20:04 +02:00
Hugo Häggmark
a981ea22fb
A11y: Fix fastpass issues for share modal (#40386) 2021-10-14 07:13:15 +02:00
Torkel Ödegaard
c4ce7a40af
AngularPanels: Move angular panel infra & components to angular/app folder (#40373)
* AngularPanels: Move to app/angular folder

* Fixing issues
2021-10-13 16:59:47 +02:00
Hugo Häggmark
30c1e7fa5c
A11y: Fix fastpass issues for /explore with gdev-testdata (#40309)
* A11y: Fix fastpass issues for /explore with gdev-testdata

* Chore: changes after PR feedback

* Chore: revert file to main

* Tests: fix for e2e tests
2021-10-13 06:09:35 +02:00
Giordano Ricci
95d9722afa
Fix: prevent queryDisplyText in QueryRowHeader from overflowing (#40094)
* Revert "Fix Query Editor Row horizontal overflow (#39419)"

This reverts commit 42b1fa0f62.

* fix: prevent queryDisplyText in QueryRowHeader from overflowing
2021-10-07 09:13:07 +01:00
Connor Lindsey
3a8d04603f
Explore: Add opt-in config for Node Graph in Jaeger, Zipkin, and Tempo (#39958) 2021-10-06 13:39:14 -06:00
kay delaney
1ce750471f
A11y: Fix fastpass issues for dashboard management pages (#39940)
* A11y: Fix fastpass issues for dashboard pages
See #39429
2021-10-06 11:58:18 +01:00
Ashley Harrison
a3783a4eb7
Navigation: Increase navigation width + make icons a consistent size (#39959)
* Navigation: Increase navigation width + make icons a consistent size

* Navigation: Move style to only apply to headers
2021-10-04 16:18:17 +01:00
Guilherme Caulada
706a665240
Auth: add name parameter to auth.saml (#39883)
* add name parameter to auth.saml

* Create constant to store default SAML name
2021-10-04 09:58:16 -03:00
Alex Khomenko
d6fd17531d
QueryEditor: Add missing keys to extra action components (#39913) 2021-10-04 09:05:43 +03:00
Ashley Harrison
4350f4931d
NavBar: Styling tweaks to tidy up appearance (#39871)
* NavBar: Styling tweaks to tidy up appearance

* NavBar: Add external link icon to external links

* NavBar: Dim the external link icon

* bump drone

* NavBar: Rename variable to better describe what it's doing
2021-10-01 15:53:56 +01:00
Hugo Häggmark
7c7b21b39e
DashboardList/AlertList: Fix for missing All folder value (#39772)
* DashboardList/AlertList: Fix for missing All folder value

* Refactor: Fixes case where folder does not exist in results
2021-10-01 06:20:25 +02:00
kay delaney
451d023c79
A11y: Fix fastpass issues for /org/teams pages (#39848)
* A11y: Fix fastpass issues for /org/teams pages
See #39429
2021-09-30 15:46:10 +01:00
Oscar Kilhed
630a120a15
OrgPage: Minor typo fix (#39764) 2021-09-29 14:05:54 +02:00
Dominik Prokop
f887576a27
Table panel: Make filter case insensitive (#39746)
* Expose FilterInput from grafana/ui

* Make table filter case insensitive

* Update packages/grafana-ui/src/components/Table/FilterList.tsx

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

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-29 09:35:41 +02:00
Marcus Andersson
b626ba223f
Hooks: Adding possibility to display banner on the top of the page (#39099)
* adding working version of notificaion banner trigger.

* Move it to enterprise

* Fixing csss, none of the pages showed our CustomScrollbar or had double scrollbars

* fixing explore

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-09-29 08:28:07 +02:00
Connor Lindsey
06592410b2
Tempo: Improve search form defaults and validation (#39534)
* Tempo: add default limit, option to hide Loki search, and run query on hotkey in dropdowns
2021-09-28 10:52:57 -06:00
Ashley Harrison
a4d41d35d0
Chore(Navigation): Rename SideMenu -> NavBar (#39483) 2021-09-22 14:56:15 +01:00
Ashley Harrison
f3475b864c
Chore: Tidy up emotion css with better theme breakpoint (#39340) 2021-09-20 08:55:31 +01:00
Ryan McKinley
98cca6317d
Options: expose a dashboard picker element (#38955) 2021-09-13 23:30:46 -07:00
Ashley Harrison
ca53f5c8da
Navigation: Implement active state for items in the Sidemenu (#39030)
* Navigation: Implement active state for items in the Sidemenu

* Navigation: Improve logic for when link is active and extract isSearchActive into a util function

* Navigation: Implement custom rule for dashboards under /d/ and fix minor bugs

* Navigation: only show first matching active state + strip query params from link urls
2021-09-13 16:49:27 +01:00
Connor Lindsey
e3c11d2682
Explore: Add filter by trace and span ID to trace to logs feature (#38943)
* Add filter by trace and span ID to trace to logs feature

* Update settings screenshot
2021-09-09 07:24:08 -06:00
Ashley Harrison
e4ca6f2445
Sidemenu: Refactor Sidemenu to use emotion (#38995)
* Chore(Sidemenu): Refactor Sidemenu scss into emotion

* Fix unit test

* Sidemenu: use cx instead of template strings
2021-09-09 09:56:08 +01:00
Ryan McKinley
a960aae4e7
Timeseries: add wide-to-long, and fix the multi-frame output (#38670)
Co-authored-by: Douglas Thrift <dthrift@flexera.com>
2021-09-08 23:44:51 +02:00
Ashley Harrison
e639b220ce
Sidemenu: Use <a> instead of <Link> when target is present (#38987) 2021-09-08 14:39:49 +01:00
Ashley Harrison
b82fe083d7
Sidemenu: Refactor SignIn to use SideMenuItem (#38882) 2021-09-08 09:48:30 +01:00
nikki-kiga
2a2f10da7e
Transformations: Use fieldMatchers for convertFieldType and add doc (#38769) 2021-09-03 04:18:06 +02:00
Ashley Harrison
ea65e11c44
Sidemenu: Various accessibility improvements (#38823) 2021-09-02 14:17:57 +01:00
Ashley Harrison
205c672417
Sidemenu: Refactor TopSectionItem and BottomNavLinks into SideMenuItem (#38755)
* Sidemenu: Refactor TopSectionItem and BottomNavLinks into SideMenuItem

* Update failing snapshot

* BottomSection: Convert tests to RTL + add some extra unit tests
2021-09-01 17:16:50 +01:00
Gabriel MABILLE
9f29241a0c
AccessControl: add one-dimensional permissions to datasources (#38070)
* AccessControl: add one-dimensional permissions to datasources in the backend

* AccessControl: add one-dimensional permissions to datasources in the frontend (#38080)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-01 15:18:17 +02:00
Ashley Harrison
b40d48258d
Sidemenu: Fix logout button (#38747) 2021-08-31 11:33:38 +01:00
Ashley Harrison
7a242afcd6
Sidemenu: Refactor BottomNavLinks to use SideMenuDropDown (#38598)
* Sidemenu: Attempt to refactor BottomNavLinks to use SideMenuDropDown

* BottomNavLinks: Rewrite existing enzyme tests in RTL

* BottomNavLinks: Use object spreading instead of slicing
2021-08-31 10:37:51 +01:00
nikki-kiga
a54a139176
Transformations: Convert field types to time string number or boolean (#38517)
* outline string to time

add stringToTime transformer

start to add format

add type and dateformat

rename stringToTime to fieldConversion

add more type support and use FieldNamePicker

add field conversion transformation

* adjust for performance feedback

rename and adjust labels and widths

shorten labels and null values

rename to convertFieldType

update test

* make updates
2021-08-27 13:49:31 -07:00
Ashley Harrison
a583f7e160
Sidemenu: Refactor SideMenuDropDown (#38554)
* SideMenuDropDown: Refactor to be more component-ey + rewrite tests in RTL

* SideMenuDropDown: Rename childLinks -> items

* Rename mockChildLinks -> mockItems as well
2021-08-26 14:08:27 +01:00
Ashley Harrison
b30882bd2b
Sidemenu: Refactor DropDownChild (#38509)
* DropDownChild: Refactor DropDownChild to be more component-like

* Rewrite tests in RTL

* Let's not do this just yet...
2021-08-25 14:27:04 +01:00
Ryan McKinley
b88f8bacf3
DataFrame: add frame type key to DataFrame structure (#38092) 2021-08-20 09:26:40 -07:00
Hugo Häggmark
a0773b290b
Dashboard: Prevents folder change when navigating to general settings (#38103)
* Dashboard: Prevents folder change when navigating to general settings

* Tests: fixes broken tests

* Chore: changes from PR feedback
2021-08-20 11:53:48 +02:00
Tobias Skarhed
89572926c3
Search: Make search icon keyboard navigable (#37865)
* Make search icon keyboard navigable

* Update text

* Update test

* Remove unused line

* Add global focus-visible styles for button
2021-08-16 15:51:44 +02:00
Maria Alexandra
1735f9a56b
Navigation: Add aria-label to top section links to improve a11y for screen readers (#36953) 2021-08-16 15:10:57 +02:00