Commit Graph

126 Commits

Author SHA1 Message Date
Ashley Harrison
c4570ecfdc
Chore: Tweaks to support React 19 (#90653)
changes needed for react 19, mostly don't spread key
2024-07-19 13:40:02 +01:00
Alex Khomenko
ad6cf2ce4d
Restore dashboards: Design review (#90468)
* Update singular case

* More copy & count fixes

* Translate success messages

* Update message

* Split no-deleted message
2024-07-17 15:00:46 +03:00
Josh Hunt
8f4b76a3de
RestoreDashboards: Hide restore/delete actions when no items are selected (#90431)
* RecentlyDeleted: Only show actions when items selected

* RestoreDashboards: Hide actions when no items are selected
2024-07-15 15:38:31 +01:00
Laura Benz
29ac7fd3c4
RestoreDashboards: Improved Empty and Loading states (#89825)
* fix: empty state blocking page completely

* refactor: replace epmty state implementation

* refactor: first step to fix flickering

* refactor: fix TS errors and add translations

* refactor

* tidy up search emptyState default value

* other wip

* clean up

* undo change we made to ssm

* remove log

* comment

* move empty state into seperate file

* remove log

* undo change:

---------

Co-authored-by: joshhunt <josh@trtr.co>
2024-07-15 13:45:33 +03:00
Laura Fernández
cd6f018c95
RestoreDashboards: Add event tracking (#90321) 2024-07-15 12:00:29 +02:00
Alex Khomenko
62494248e3
Restore dashboards: Add RBAC (#90270)
* Restore dashboards: Add RBAC

* Add check to navtree

* Prevent non-admins from searching deleted dbs

* Add check to the route

* Cleanup

* Update translations

* Update API permissions

* Correct permissions

* Update warning message

* Update translation

* Return 401 for deleted query without admin role
2024-07-11 13:20:04 +03:00
Laura Benz
8031ef1aac
Dashboard settings: Refactor delete modals (#90279)
* refactor: add translatable elements and confirmation text

* refactor: add translatable element

* refactor: add translatable element

* refactor: run i18n extraction

* refactor: add translatable elements
2024-07-11 11:47:28 +02:00
Alex Khomenko
22df2d9b06
BrowseDashboards: Fix starred toggle (#90138) 2024-07-05 17:11:03 +03:00
Alex Khomenko
0500b596db
BrowseDashboards: Update results when starred param changes (#89944)
* BrowseDashboards: Trigger update results when starred param changes

* Use LocationService

* Use locationService directly
2024-07-02 17:37:40 +03:00
Laura Benz
c9a5ee616e
RestoreDashboards: Add search (#89692)
* feat: add search

* feat: run i18n extraction

* refactor: styling issue for smaller screen sizes
2024-06-27 14:00:12 +02:00
Ryan McKinley
529d4e1169
Dashboards: Use dashboard_api k8s wrapper for save options also (#89598) 2024-06-26 13:35:04 +03:00
Laura Benz
5da94bb669
RestoreDashboards: Add an empty state (#89662)
* feat: add empty state

* fix: flickering

* Update public/app/features/browse-dashboards/RecentlyDeletedPage.tsx

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

---------

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2024-06-25 16:04:20 +03:00
Ashley Harrison
47f8717149
React: Use new JSX transform (#88802)
* update eslint, tsconfig + esbuild to handle new jsx transform

* remove thing that breaks the new jsx transform

* remove react imports

* adjust grafana-icons build

* is this the correct syntax?

* try this

* well this was much easier than expected...

* change grafana-plugin-configs webpack config

* fixes

* fix lockfile

* fix 2 more violations

* use path.resolve instead of require.resolve

* remove react import

* fix react imports

* more fixes

* remove React import

* remove import React from docs

* remove another react import
2024-06-25 12:43:47 +01:00
Laura Fernández
fd96edaef7
POC: Disable ConfirmButton (#89539) 2024-06-25 09:42:18 +02:00
Ashley Harrison
7d8afd9578
Tab: Improve accessible name (#89602)
* replace aria-label selector with data-testid

* fix unit tests

* fix e2e selectors

* fix last unit test

* fix e2e tests

* fix casing

* fix e2e test

* fix casing
2024-06-24 17:48:26 +01:00
Ashley Harrison
a89deaeb73
BrowseDashboards: Stop caching getAffectedItems (#89609)
stop caching getAffectedItems since alert rule/library panel creation isn't in rtkquery
2024-06-24 13:28:44 +01:00
Laura Benz
7c868e9b52
RestoreDashboards: Create deletion process (#89234)
* feat: add button

* feat: add modal

* refactor: move component

* feat: add backend handling

* fix: opening the modal

* feat: adjust modal content

* feat: adjust old delete modal

* feat: add text to old delete modal
2024-06-20 18:18:11 +02:00
Laura Benz
34b3dbdbf3
RestoreDashboards: Adjust path (#89233)
* refactor: change path

* fix: page headline

* refactor: remove condition
2024-06-18 17:24:48 +02:00
Josh Hunt
8a891dcdc4
RestoreDashboards: Clear cached parent folders after restoring a dashboard (#89162)
* RestoreDashboards: Refresh parent folders after restoring a dashboard

* actually, just clear the cache

* less log

* refactor
2024-06-17 11:15:37 +01:00
Josh Hunt
15c81b2a8b
Move RecentlyDeleted into browse-dashboards (#89214)
* Move RecentlyDeleted into browse-dashboards

* refactor: change path

---------

Co-authored-by: Laura Benz <laura.benz@grafana.com>
2024-06-14 17:25:19 +03:00
Laura Benz
ca2df58ab0
RestoreDashboards: Implement restore workflow (#88753)
* feat: create interactable elements

* feat: add i18n

* feat: add restoment process

* refactor: move restore endpoint

* refactor: adjust some API things

* refactor: adjust i18n

* Run i18n abstraction

* refactor: clean up

* refactor: update comment

* refactor: update text in modal

* refactor: correct translation keys

* refactor: add changes from code review

* refactor: add styling

* Update go.work.sum
2024-06-13 09:12:10 +02:00
Josh Hunt
c58d09fd81
BrowseDashboards: Prepend subpath to New Browse Dashboard actions (#89109) 2024-06-12 17:22:00 +01:00
Josh Hunt
994ddf7e6f
RecentlyDeleted: Remove search box (#89043)
* RecentlyDeleted: Remove search box

* i18n
2024-06-11 17:45:10 +03:00
Ashley Harrison
55dfc76b23
Chore: replace General with Dashboards (#89017)
replace General with Dashboards
2024-06-11 13:10:25 +01:00
Ryan McKinley
41e0430f83
K8s/Dashboards: Add frontend api to switch between implementations (#88632) 2024-06-05 17:34:23 +03:00
Laura Benz
adbb005d38
RestoreDashboards: Populate page (#88555)
* feat: add search input and filters

* feat: add state management v0

* feat: update search view and add to trash page

* refactor: fix some errors

* feat: page population

* feat: fix error

* Run betterer checks locally

* Run i18n abstraction

* refactor: clean up after merging main

* refactor: clean up after merging main

* Run i18n abstraction

* refactor: remove browse view
2024-06-04 12:08:18 +02:00
Konrad Lalik
93870c1cd8
Alerting: Use new endpoints to fetch single GMA rule on view and edit pages (#87625) 2024-05-30 12:55:06 +02:00
Tobias Skarhed
fb1acb45a2
Search: Announce to screen reader when query returns no result (#87382)
* Add alert role to not-found variant

* Provide role prop and apply for two cases
2024-05-22 14:15:56 +02:00
Ashley Harrison
fc45b56d9d
EmptyState: Apply call-to-action variant in core (#86448)
* apply empty state in a bunch of places

* fix unit tests

* put alert back on top

* add data-testids so e2e tests keep working

* remove info boxes

* fix annotations empty state alignment with new maxWidth
2024-04-22 17:01:24 +01:00
Tom Ratcliffe
a5c75c5ffb Remove explicit imports of whatwg-fetch from individual test files 2024-04-18 12:23:38 +01:00
butkovv
b039995a4e
BrowseDashboards: Add subpath to URLs on Browse Dashboards page (#84992)
* BrowseDashboards: Add subpath to URLs on Browse Dashboards page

* comment

* use existing config

* comment

---------

Co-authored-by: joshhunt <josh@trtr.co>
2024-03-28 15:15:05 +02:00
Ashley Harrison
7ad2ec9665
EmptyState: use not-found empty state variant everywhere in core (#85007)
* use EmptyState component everywhere in core

* remove GrotNotFound core component

* update unit tests

* search -> not-found

* fix 3 more
2024-03-27 12:15:12 +00:00
Josh Hunt
365fd2cb72
FolderPicker: Add permission filter to nested folder picker (#84644)
* FolderPicker: Add permission filter to nested folder picker

* Add permission filtering to Searcher

* make default edit only

* dashlist view folders

* update tests
2024-03-19 13:44:52 +02:00
Josh Hunt
030b83d8f2
NestedFolderPicker: Seperate state from Browse Dashboards (#82672)
* initial very very early stab at isolated state for nested folder picker

* more

* complete state rework. still need to do search

* tidy up some comments

* split api hook into seperate file, start to try and get search results back (its not working)

* Fix loading status

* Reset files

* cleanup

* fix tests

* return object

* restore hiding items

* restore

* restore

* remove those comments

* rename hooks

* rename hooks

* simplify selectors - thanks ash!!!

* more ci please?
2024-02-21 20:02:37 +02:00
Dan83
b6b5935992
Chore: Remove Form usage in NewFolderForm components (#83028)
* Chore: Remove Form usage from NewFolderForm

* Chore: Remove Form usage from NewFolderForm

* Chore: Remove Form usage from NewFolderForm

* Replace HorizontalGroup with Stack

* add Default Values and launch prettier
2024-02-21 13:56:04 +02:00
Ashley Harrison
cf65d91ee9
Chore: upgrade to msw v2 (#82270)
* Update dependency msw to v2

* close

* minor fixes

* fetch import changes

* fix some alerting tests

* fix another alerting test

* fix systemjs tests

* don't return undefined in json mocks

* don't return undefined in json response

* add type

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-14 13:16:44 +00:00
Ashley Harrison
e2c2704296
Browse Dashboards: Imported dashboards now display immediately in the dashboard list (#81819)
* create importDashboard method in rtk query

* fix unit tests

* Revert "fix unit tests"

This reverts commit 72cd81c803.

* fix unit test
2024-02-06 10:46:24 +00:00
Ashley Harrison
a30f8645d1
Chore: Migrate frontend platform code to use data-testid for selectors (#81787)
* migrate some stuff from aria-label to data-testid

* convert styles to objects

* fix unit tests

* empty commit to kick drone now enterprise branch is there
2024-02-02 13:26:37 +00:00
Torkel Ödegaard
1d5edb2a18
DashboardScene: Saving (#81163)
* DashboardScene: First save works

* Updates

* version mismatch works

* Error handling

* save current time range working

* Progress on save as

* Save as works

* Progress

* First tests

* Add unit tests

* Minor tweak

* Update

* Update isDirty state when saving
2024-01-29 12:04:45 +01:00
Alex Khomenko
f154b2b855
Grafana/ui: Add Space component (#81145)
* Grafana/ui: Add Space component

* Add responsive styles and prop docs

* Use the Box component

* Docs

* Replace the component from grafana/experimental

* Update story

* Tweak docs

* Adjust docs
2024-01-25 08:59:24 +02:00
renovate[bot]
f8056a3e56
Update dependency react-virtualized-auto-sizer to v1.0.20 (#80596)
* Update dependency react-virtualized-auto-sizer to v1.0.20

* Update dependency react-virtualized-auto-sizer to v1.0.20

* update types

* mock in a few more tests

* fix InspectDataTab test

* fix test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-01-17 12:13:14 +00:00
Josh Hunt
94ec6474d3
NestedFolders: Support Shared with me folder for showing items you've been granted access to (#80141)
* start shared with me frontend tweaks

* prevent linking to sharedwithme folder

* tests

* make divider take up 0 height

* Prevent sharedwithme from being selected

* test
git push

* pr feedback

* prevent setting url for sharedwithme

* split iconForItem/kind functions

* Hide sharedwithme in nested folder picker

* fix test fixture
2024-01-15 10:56:31 +00:00
Alexander Weaver
cf8e8852c3
Alerting: Drop NamespaceID from responses on unstable ngalert API endpoints in favor of NamespaceUID (#79359)
* Drop from API response

* Drop from swagger docs

* Drop from integration tests

* regenerate public swagger docs

* Drop from frontend

* Drop asserts for namespaceID field
2023-12-15 11:06:53 -06:00
Ashley Harrison
4290ed3d86
Chore: Remove newBrowseDashboards feature toggle (#78190)
* remove all the things

* fix OldFolderPicker tests

* i18n

* remove more unused code

* remove mutation of error object since it's now frozen in the redux state

* fix error handling
2023-11-22 15:22:00 +00:00
Ieva
6097ff255c
Dashboards: Fix dashboard listing when user can't list any folders (#77983)
* return empty list of folder if the user doesn't have the permissions to view folders

* fix the empty folder list initialisation
2023-11-10 11:27:53 +00:00
Alexa V
10269cb7f5
Grafana UI: Add description to Menu component (#77808)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-11-10 09:32:05 +01:00
Laura Fernández
8f49ec91df
BrowseDashboards: Add RadioButtonGroup to be able to chose between 'Browse' or 'List' view (#77561) 2023-11-07 16:16:43 +01:00
Josh Hunt
f08ad95c59
BrowseDashboards: Improve screen reader announcements (#75970)
* use aria-labelledby to describe the whole row

* change

* fix typo

* i18n
2023-10-05 09:14:26 +00:00
Josh Hunt
40a41113aa
BrowseDashboards: Add (skipped) basic e2e tests to prepare for GA (#75917)
Add e2e tests for new Browse Dashboards UI
2023-10-04 09:08:43 +00:00
Ashley Harrison
18b237879d
DockedMegaMenu: Refactor and rename to simplify (#75872)
* tidy up some styles

* remove NavBarMenuItemWrapper + consolidate components

* lots of renaming

* use object syntax in FeatureHighlight

* fix a couple of missing find+replace

* adjust li positioning

* fix text truncation

* bit more tidy up

* refactor indent into it's own component

* memoize styles in Indent
2023-10-03 13:03:27 +01:00