Commit Graph

25 Commits

Author SHA1 Message Date
Ashley Harrison
ac66e14054
Navigation: rename Grafana Machine Learning to just Machine Learning (#58893)
rename Grafana Machine Learning to just Machine Learning
2022-11-17 14:31:03 +00:00
Gabriel MABILLE
8756c4d91f
RBAC: Add tests on AddAppLinks (#58843)
* RBAC: Add tests on AddAppLinks
2022-11-16 17:44:33 +01:00
Gabriel MABILLE
a8c48b6801
RBAC: Cover plugin includes (#57582)
* RBAC: Add action to plugin includes

* Adding the feature toggle check

* Cue update

* Extract include access control to method

* Suggestion to prevent log when RBAC is disabled

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Rename IsRBACReady to RequireRBACAction

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
2022-11-16 15:54:04 +01:00
Ashley Harrison
028751a18a
Navigation: Add quick actions button (#58707)
* initial implementation for quick add

* add new isCreateAction prop on NavModel

* adjust separator margin

* switch to primary button

* undo changes to plugin.json

* remove unused props from interface

* use a consistent dropdown overlay type

* memoize findCreateActions

* add prop description

* use a function so that menus are only rendered when the dropdown is open
2022-11-15 12:08:15 +00:00
Leo
a71f74220a
Navigation: Remove monitoring texts for items under Monitoring section (#58522)
* rename Synthetic monitoring with Synthetics

* improved text override
2022-11-14 10:01:23 +01:00
Ashley Harrison
9cbbe65243
Move cloud link app to the Administration section (#58578) 2022-11-10 17:02:41 +00:00
Levente Balogh
181640b080
Connections: Support standalone plugin pages (#57772)
* feat(Connections): create sub-pages wrapped by `<Page>`

* feat(Connections): rename the Connections page and update routes

* feat(Connections): use new url for editing datasources

* refactor(Connections): remove unused tab components

* feat(Connections): update routes and nav titles

* tests: fix tests for Connections

* tests: fix typo in backend tests
2022-11-10 11:14:23 +01:00
Levente Balogh
eb3ee35e1c
Frontend Routing: Always render standalone plugin pages using the <AppRootPage> (#57771)
* chore: fix go lint issues

* feat(Routing): route standalone plugin pages to the `AppRoutePage`

* feat(plugin.json): introduce a new field called `isCorePage` for `includes`

* chore: add explanatory comments for types

* refactor(AppRootPage): receive the `pluginId` and `pluginSection` through the props

Now we are able to receive these as props as the pluginId is defined on navLinks
that are registered by plugins.

* chore: update teests for AppRootPage

* fix: remove rebase issue

* tests(applinks): add a test for checking isCorePage plugin page setting

* refactor(applinks): update tests to use FindById() and be more resilient to changes

* fix: Go lint issues

* refactor(routes): use cleaner types when working with plugin nav nodes

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* chore: fix linting issues

* t: remove `isCorePage` field from includes

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-11-07 15:19:31 +01:00
Levente Balogh
376f4b0cc7
Navigation: Add pluginId to standalone plugin page NavLinks (#57769)
* feat(Navigation): add `pluginId` to NavLink and override sibling navlinks with the same URL

* test replacing page from plugin

* chore: fix go lint issues

* fix(NavLink): change `PluginId` to `PluginID`

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

* fix(NavLink): make the `PluginId` -> `PluginID` change everywhere

* chore(navModel.ts): update explanatory comment for `pluginId`

Co-authored-by: Miklós Tolnai <miklos.tolnai@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-11-03 21:19:42 +01:00
Torkel Ödegaard
19b961465c
TopNav: Make it possible to to have sections without children (#57815) 2022-10-31 11:01:34 +01:00
Guilherme Caulada
cfd9e72da5
Add dashboards to the navtree on public dashboards (#57542) 2022-10-24 16:34:27 -03:00
mikkancso
a4e66a2a01
Connections: New "Connect data" page with data source catalog (#56772)
* remove Plugins and CloudIntegrations tab and add ConnectData tab

* ConnectData: add Search component and use it

* ConnectData: add DataSourcePluginList component

* add CardGrid component

* add CategoryHeader component

* ConnectData: restructure content

DataSourcePluginList is removed, because its responsibilities are
actually the same as ConnectData's responsibilities.

NoResults was added as a reusable component, and was moved out of
CardGrid, since there could be more CardGrid on one page, but only one
NoResults.

* fix spacer

* use LoadingPlaceholder

* CardGrid: add margin

* generalize CardGridProps

* move isLoading and error into CardGrid

We'd like CardGrid to be reusable, even multiple times within a page.
In this case, it's better UX if we show the loading or error states per
card grid, not for the whole page.

* ConnectData: fix NoResults condition

* fix and add meaningful tests

* fix indentation

* move isLoading and error back to ConnectData

* make `url` required for CardGrid items
2022-10-20 15:53:10 +02:00
Gabriel MABILLE
3963ed3754
RBAC: Allow access to /dashboards when user has dashboards create (#56712)
* RBAC: Allow access to dashboards when user has dashboards create

* Remove eval any that I didn't add on purpose
2022-10-18 11:15:52 +02:00
Jeff Levin
cc27214dca
Public Dashboards: Add audit table (#54508)
This PR adds an audit table for public dashboards allowing a user to view all public dashboards on an instance of grafana. The public dashboards team is working on a proposal for adding RBAC support to the audit table for 9.3

Co-authored-by: juanicabanas <juan.cabanas@grafana.com>
2022-10-12 21:36:05 -08:00
Ashley Harrison
dd9e1498f9
only render direct children on the landing page routes (#56720) 2022-10-12 10:01:33 +01:00
Artur Wierzbicki
bf264d2f76
Query library: requiresDevMode dummy backend (#56466)
* query library - dummy backend

* fix tests

* dont explicitly marshall backend dataresponse

* skip integration tests

* null check for tests

* added query library to codeowners

* null check for tests

* lint
2022-10-07 11:31:45 -07:00
Levente Balogh
55187ebc48
Navtree: Make it possible to configure standalone plugin pages (#56393)
* feat: make it possible to register standalone app plugin pages under different sections

* refactor(sample.ini): use "admin" instead of "starred" section in the INI

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

* feat(defaults.ini): add app navigation settings to the defaults.ini as well

* fix: use the correct key in the tests

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-06 12:57:03 +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
Levente Balogh
ae5e8bc53b
refactor: rename Data Connections to Connections (#56353) 2022-10-05 09:56:58 +02: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
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
Torkel Ödegaard
e31cb93ec0
NavTree: Make it possible to configure where in nav tree plugins live (#55484)
* NewIA: Plugin nav config

* progress

* Progress

* Things are working

* Add monitoring node

* Add alerts and incidents

* added experiment with standalone page

* Refactoring by adding a type for navtree root

* First test working

* More tests

* more tests

* Progress on richer config and sorting

* Sort weight working

* Path config

* Improving logic for not including admin or cfg nodes, making it the last step so that enterprise can add admin nodes without having to worry about the section not existing

* fixed index routes

* removed file

* Fixes

* Fixing tests

* Fixing more tests and adding support for weight config

* Updates

* Remove unused fake

* More fixes

* Minor tweak

* Minor fix

* Can now control position using sortweight even when existing items have no sortweight

* Added tests for frontend standalone page logic

* more tests

* Remove unused fake and fixed lint issue

* Moving reading settings to navtree impl package

* remove nav_id setting prefix

* Remove old test file

* Fix trailing newline

* Fixed bug with adding nil node

* fixing lint issue

* remove some code we have to rethink

* move read settings to PrivideService and switch to util.SplitString
2022-09-28 08:29:35 +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
Torkel Ödegaard
09f4068849
NavTree: Refactor out the navtree building from api/index.go and into it's own service (#55552) 2022-09-22 22:04:48 +02:00