mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* feat: show data-sources under the data-connections page
* refactor: add a constant for data-sources routes
* refactor: add a context that holds the currently active data-sources routes
* refactor: use the data-sources routes constant wherever possible
* refactor: use the data-sources routes context wherever possible
* feat(data-connections): add edit and new pages
* feat(data-connections): set the the custom routes via the context provider
* fix(data-connections): set the active tab properly
We needed to update the routes to match with the ones on the backend ("data-sources" vs "datasources"),
and we also needed to check if it is the default tab, in which case we would like to highlight the Datasources tab.
* tests: fix tests for Data Connections page
* fix: address rebase issues
* tests: find button based on role and text
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* fix: add missing closing ) paren in tests
* refactor: use implicit return types for components
* tests: change role from "button" to "link"
* refactor: stop using unnecessary wrapper components
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
13 lines
393 B
TypeScript
13 lines
393 B
TypeScript
import { DataSourcesRoutes } from './types';
|
|
|
|
/**
|
|
* Default routes for data sources pages.
|
|
* (Links to the pages can be overriden for this feature by using `DataSourcesRoutesContext`)
|
|
*/
|
|
export const DATASOURCES_ROUTES: DataSourcesRoutes = {
|
|
List: '/datasources',
|
|
Edit: '/datasources/edit/:uid',
|
|
Dashboards: '/datasources/edit/:uid/dashboards',
|
|
New: '/datasources/new',
|
|
} as const;
|