diff --git a/plugins/newrelic-dashboard/src/api/NewRelicDashboardApi.ts b/plugins/newrelic-dashboard/src/api/NewRelicDashboardApi.ts index 0d27c7a85e..649ba79202 100644 --- a/plugins/newrelic-dashboard/src/api/NewRelicDashboardApi.ts +++ b/plugins/newrelic-dashboard/src/api/NewRelicDashboardApi.ts @@ -29,7 +29,7 @@ export interface DashboardSnapshotSummary { export interface SnapshotDetailsSummary { getSnapshotDetails: SnapshotDetails[]; } -export const NewRelicDashboardApiRef = createApiRef({ +export const newRelicDashboardApiRef = createApiRef({ id: 'plugin.newrelicdashboard.service', description: 'Used by the New Relic Dashboard plugin to make requests', }); diff --git a/plugins/newrelic-dashboard/src/api/index.ts b/plugins/newrelic-dashboard/src/api/index.ts index a210967052..9b14160bcf 100644 --- a/plugins/newrelic-dashboard/src/api/index.ts +++ b/plugins/newrelic-dashboard/src/api/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ export type { NewRelicDashboardApi } from './NewRelicDashboardApi'; -export { NewRelicDashboardApiRef } from './NewRelicDashboardApi'; +export { newRelicDashboardApiRef } from './NewRelicDashboardApi'; export { NewRelicDashboardClient } from './NewRelicDashboardClient'; diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx index 71aeecbc93..a9af8d53e4 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; import { Box, Grid, makeStyles, Typography } from '@material-ui/core'; -import { NewRelicDashboardApiRef } from '../../api'; +import { newRelicDashboardApiRef } from '../../api'; import { useApi } from '@backstage/core-plugin-api'; import { useAsync } from 'react-use'; import { Progress, InfoCard, Link } from '@backstage/core-components'; @@ -38,7 +38,7 @@ const useStyles = makeStyles({ export const DashboardEntityList = () => { const DashboardEntity = useNewRelicDashboardEntity(); const classes = useStyles(); - const NewRelicDashboardAPI = useApi(NewRelicDashboardApiRef); + const NewRelicDashboardAPI = useApi(newRelicDashboardApiRef); const { value, loading, error } = useAsync(async (): Promise => { const dashboardObject: any = NewRelicDashboardAPI.getDashboardEntity( String(DashboardEntity?.integrationKey), diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx index c27ca1b183..043b69880f 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx @@ -18,7 +18,7 @@ import { Box, Grid } from '@material-ui/core'; import { useApi } from '@backstage/core-plugin-api'; import { useAsync } from 'react-use'; import { InfoCard, Progress } from '@backstage/core-components'; -import { NewRelicDashboardApiRef } from '../../../api'; +import { newRelicDashboardApiRef } from '../../../api'; import Alert from '@material-ui/lab/Alert'; type Props = { @@ -34,7 +34,7 @@ export const DashboardSnapshot = ({ permalink, duration, }: Props) => { - const NewRelicDashboardAPI = useApi(NewRelicDashboardApiRef); + const NewRelicDashboardAPI = useApi(newRelicDashboardApiRef); const { value, loading, error } = useAsync(async (): Promise => { const dashboardObject: any = NewRelicDashboardAPI.getDashboardSnapshot( guid, diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx index e05af18a36..a3435eee42 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; import { Grid, Tab, Tabs, makeStyles } from '@material-ui/core'; -import { NewRelicDashboardApiRef } from '../../../api'; +import { newRelicDashboardApiRef } from '../../../api'; import { useApi } from '@backstage/core-plugin-api'; import { useAsync } from 'react-use'; import { Progress } from '@backstage/core-components'; @@ -80,7 +80,7 @@ const useStyles = makeStyles( ); export const DashboardSnapshotList = ({ guid }: Props) => { const styles = useStyles(); - const NewRelicDashboardAPI = useApi(NewRelicDashboardApiRef); + const NewRelicDashboardAPI = useApi(newRelicDashboardApiRef); const { value, loading, error } = useAsync(async (): Promise => { const dashboardObject: any = NewRelicDashboardAPI.getDashboardEntity(guid); return dashboardObject; diff --git a/plugins/newrelic-dashboard/src/plugin.ts b/plugins/newrelic-dashboard/src/plugin.ts index 5106821fd7..9d2873b772 100644 --- a/plugins/newrelic-dashboard/src/plugin.ts +++ b/plugins/newrelic-dashboard/src/plugin.ts @@ -20,7 +20,7 @@ import { createApiFactory, discoveryApiRef, } from '@backstage/core-plugin-api'; -import { NewRelicDashboardApiRef, NewRelicDashboardClient } from './api'; +import { newRelicDashboardApiRef, NewRelicDashboardClient } from './api'; import { rootRouteRef } from './routes'; export const newRelicDashboardPlugin = createPlugin({ @@ -30,7 +30,7 @@ export const newRelicDashboardPlugin = createPlugin({ }, apis: [ createApiFactory({ - api: NewRelicDashboardApiRef, + api: newRelicDashboardApiRef, deps: { configApi: configApiRef, discoveryApi: discoveryApiRef }, factory: ({ configApi, discoveryApi }) => new NewRelicDashboardClient({