Commit Graph

21 Commits

Author SHA1 Message Date
Ashley Harrison
135b0a25aa
Nested folders: Redo search query when actions complete (#68102)
redo search query if searching when actions complete
2023-05-10 11:13:27 +01:00
Ashley Harrison
5d5a54979c
Nested folders: hook up getAffectedItems to the backend count route (#67677)
* hook up getAffectedItems to the backend count route

* mock out backendSrv in unit tests

* Don't delete alert rules while API doesn't return counts

* Show alert rule counts when API returns them

* use components for modal styles

* Revert "use components for modal styles"

This reverts commit 80ac1152f8.

---------

Co-authored-by: joshhunt <josh@trtr.co>
2023-05-02 21:20:30 +00:00
Josh Hunt
c4a31390ef
NestedFolders: Use new Browse Dashboards UI behind feature flag (#67416)
NestedFolders: Put feature flagged new Browse Dashboards UI at main route
2023-05-02 17:25:03 +01:00
Ashley Harrison
02086e843f
Nested folders: hook up move/delete logic properly (#67648)
* clear selection post move/delete

* move actions out of rtk-query

* move findItems, create selectors, refetch children when moving/deleting

* cleaner syntax

* remove unnecessary function, just put logic in the selector

* handle moving/deleting from the root

* slightly cleaner

* handle when rootItems are undefined

* handle 'general' in the fetchChildren reducer

* only refresh at the end

* don't need thunk api
2023-05-02 17:22:51 +01:00
Josh Hunt
fd2c7594cf
NestedFolders: Add empty states for Browse and Search (#67423)
* NestedFolders: Add empty states for Browse and Search

* empty states

* fix types

* tests
2023-05-02 14:33:59 +03:00
Josh Hunt
32d3e895b3
NestedFolders: Indicate when folders have mixed-selection children (#67337)
* Show indeterminate checkbox for folders with partially selected children

* When selecting an item, check ancestors to see if all their children are now selected

* reword comment

* fix test

* fix lint

* Check all descendants for mixed state

* Use indeterminate checkbox

* fix test description

* make header checkbox select/unselect automatically

* mixed header checkbox:

* fix tests

* add tests
2023-05-02 13:17:25 +03:00
Tobias Skarhed
166641d66d
NestedFolders: Permission for creating and editing (#67406)
* Initial permissions

* Show/hide checkboxes

* Fix kinds from main

* CreateNewButton tests

* Update DashboardsTree test

* Mock folder permissions

* Rename showCheckBoxes to canSelect

* Make column ordering look better
2023-04-28 18:00:56 +02:00
Ashley Harrison
4b241311b3
Nested folders: very naive implementations of move/delete (#67309)
* implement naive delete

* implement naive move

* use params object instead of appending to url
2023-04-27 15:10:34 +01:00
Tobias Skarhed
4b047b62a7
NestedFolders: Button for creating new dashboards and and folders (#67260)
* Add CreateNewButton and tests

* Add translation support

* Move reused phrases to temp common file

* Use just a simple button

---------

Co-authored-by: joshhunt <josh@trtr.co>
2023-04-27 11:43:20 +01:00
Josh Hunt
334ecd1be7
NestedFolders: Select all for Browse and Search (#67227)
* NestedFolders: Select all for BrowseView and SearchView

* show fake indeterminate state for SearchView

* fix types

* Select search results as additional pages are loaded

* fix (de)select all between browse and search

* tests

* fix test

* fix test
2023-04-27 12:29:26 +03:00
Josh Hunt
9796b6b000
NestedFolders: Connect Search input fields to state manager (#67193)
* NestedFolders: Connect Search input fields to state manager

* Fix tag list not loading

* Clear includePanels checkbox when leaving search

* fix test

* Fix extra right margin

* fix missing style

* cleanup

* fix placeholder

* fix test
2023-04-26 15:42:25 +01:00
Ashley Harrison
258f11f08d
Nested folders: deduplicate selection of children (#67229)
* scaffold out dedupe logic, use mock api to get descendant info

* rename methods

* use for..of

* some renaming for clarity
2023-04-26 11:20:10 +01:00
Ashley Harrison
e6e741546f
Nested folders: Create basic Move/Delete modals (#67140)
* add modal scaffolding

* add some unit tests

* remove dummy api, add some TODO comments

* small test refactor

* another small test refactor

* fix unit tests due to aria-label/data-testid change
2023-04-25 17:08:40 +01:00
Josh Hunt
69e5a2bdf9
NestedFolders: Basic search view (#67093)
* First stab and reusing SearchView for new Browse Dashboards

* NestedFolders: Basic SearchView

* last bits of cleanup
2023-04-24 18:32:04 +03:00
Ashley Harrison
1cad819670
Nested folders: Add dummy Move/Delete actions (#67051)
* slight refactor, show actions on selection

* add unit tests

* refactor logic into custom selector + hook
2023-04-21 15:18:40 +01:00
Josh Hunt
1d0387dcc2
NestedFolders: Make TagsCell return null when showing nothing (#67041) 2023-04-21 12:17:04 +01:00
Josh Hunt
0eca9950a0
NestedFolders: Show Tags in Browse Dashboards (#67029)
* NestedFolders: Show tags in Browse Dashboards view

* tests
2023-04-21 11:49:58 +01:00
Josh Hunt
3518f8ec53
NestedFolders: Refactor BrowseView state into redux (#66898)
* refactor all state into redux

* add tests for reducers

* added comments
2023-04-20 16:37:00 +01:00
Josh Hunt
e0c5b4f0e0
NestedFolders: Basic item selection (#66843)
* NestedFolders: Item selection state

* Select children in state

* Unselect parents when children are unselected

* remove unneeded comment

* tests

* tidy test a little bit

* tidy test a little bit

* tidy test a little bit

* tidy test a little bit

* tidy test a little bit
2023-04-19 22:44:07 +03:00
Josh Hunt
9b15c79e19
NestedFolders: Virtual tree view (#66102)
* poc for virtual tree

* remove my silly debug stuff

* wip

* style table

* improve styles

* fix

* start to split tree into seperate component

* cleanup unused function

* split into more components

* more better

* secondary color type column

* simple tests for DashboardsTree

* restore styles from dodgy rebase

* remove my weirdo text component thing
2023-04-17 11:08:24 +01:00
Josh Hunt
5df33c0dc1
NestedFolders: New Browse Dashboards views (#66003)
* scaffold new browse routes

* a part of rtk query

* load nested data

* .

* link nested dashboards items

* add comment about bad code, update codeowners

* tidies
2023-04-12 10:44:01 +01:00