Merge pull request #20299 from cursedcoder/export-dashboard-list
Export DashboardSnapshotList for NewRelic dashboard plugin
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
'@backstage/plugin-newrelic-dashboard': minor
|
||||
---
|
||||
|
||||
Changes in `newrelic-dashboard` plugin:
|
||||
|
||||
- Make DashboardSnapshotList component public
|
||||
- Settle discrepancies in the exported API
|
||||
- Deprecate DashboardSnapshotComponent
|
||||
@@ -11,12 +11,22 @@ import { JSX as JSX_2 } from 'react';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
// @public
|
||||
export const DashboardSnapshot: (props: {
|
||||
guid: string;
|
||||
name: string;
|
||||
permalink: string;
|
||||
}) => JSX_2.Element;
|
||||
|
||||
// @public @deprecated
|
||||
export const DashboardSnapshotComponent: (props: {
|
||||
guid: string;
|
||||
name: string;
|
||||
permalink: string;
|
||||
}) => JSX_2.Element;
|
||||
|
||||
// @public
|
||||
export const DashboardSnapshotList: (props: { guid: string }) => JSX_2.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export const EntityNewRelicDashboardCard: () => JSX_2.Element;
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ export {
|
||||
newRelicDashboardPlugin,
|
||||
EntityNewRelicDashboardCard,
|
||||
EntityNewRelicDashboardContent,
|
||||
DashboardSnapshot,
|
||||
DashboardSnapshotList,
|
||||
DashboardSnapshotComponent,
|
||||
} from './plugin';
|
||||
export { isNewRelicDashboardAvailable } from './Router';
|
||||
|
||||
@@ -52,7 +52,7 @@ export const newRelicDashboardPlugin = createPlugin({
|
||||
/** @public */
|
||||
export const EntityNewRelicDashboardContent = newRelicDashboardPlugin.provide(
|
||||
createComponentExtension({
|
||||
name: 'EntityNewRelicDashboardPage',
|
||||
name: 'EntityNewRelicDashboardContent',
|
||||
component: {
|
||||
lazy: () => import('./Router').then(m => m.Router),
|
||||
},
|
||||
@@ -62,7 +62,7 @@ export const EntityNewRelicDashboardContent = newRelicDashboardPlugin.provide(
|
||||
/** @public */
|
||||
export const EntityNewRelicDashboardCard = newRelicDashboardPlugin.provide(
|
||||
createComponentExtension({
|
||||
name: 'EntityNewRelicDashboardListComponent',
|
||||
name: 'EntityNewRelicDashboardCard',
|
||||
component: {
|
||||
lazy: () =>
|
||||
import('./components/NewRelicDashboard/DashboardEntityList').then(
|
||||
@@ -80,9 +80,9 @@ export const EntityNewRelicDashboardCard = newRelicDashboardPlugin.provide(
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const DashboardSnapshotComponent = newRelicDashboardPlugin.provide(
|
||||
export const DashboardSnapshot = newRelicDashboardPlugin.provide(
|
||||
createComponentExtension({
|
||||
name: 'DashboardSnapshotComponent',
|
||||
name: 'DashboardSnapshot',
|
||||
component: {
|
||||
lazy: () =>
|
||||
import(
|
||||
@@ -91,3 +91,33 @@ export const DashboardSnapshotComponent = newRelicDashboardPlugin.provide(
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
/**
|
||||
* Render dashboard snapshots from Newrelic in backstage. Use dashboards which have the tag `isDashboardPage: true`
|
||||
*
|
||||
* @deprecated
|
||||
* Use DashboardSnapshot export name instead
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const DashboardSnapshotComponent = DashboardSnapshot;
|
||||
|
||||
/**
|
||||
* Render a dashboard snapshots list from Newrelic in backstage. Use dashboards which have the tag `isDashboardPage: true`
|
||||
*
|
||||
* @remarks
|
||||
* This can be helpful for rendering dashboards outside of Entity Catalog.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const DashboardSnapshotList = newRelicDashboardPlugin.provide(
|
||||
createComponentExtension({
|
||||
name: 'DashboardSnapshotList',
|
||||
component: {
|
||||
lazy: () =>
|
||||
import(
|
||||
'./components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList'
|
||||
).then(m => m.DashboardSnapshotList),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user