Files
Levente Balogh a1c565dec9 Data Connections: Add data sources (#52436)
* 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>
2022-07-25 14:29:21 +02:00

26 lines
700 B
TypeScript

import { css } from '@emotion/css';
import React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { useStyles2 } from '@grafana/ui';
import { AppPluginLoader } from 'app/features/plugins/components/AppPluginLoader';
import { CLOUD_ONBOARDING_APP_ID, ROUTES } from '../../constants';
export function CloudIntegrations() {
const s = useStyles2(getStyles);
return (
<div className={s.container}>
<AppPluginLoader id={CLOUD_ONBOARDING_APP_ID} basePath={ROUTES.CloudIntegrations} />
</div>
);
}
const getStyles = (theme: GrafanaTheme2) => ({
// We would like to force the app to stay inside the provided tab
container: css`
position: relative;
`,
});