renamed newRelicDashboardApiRef
Signed-off-by: mufaddal motiwala <mufaddalmm.52@gmail.com>
This commit is contained in:
@@ -29,7 +29,7 @@ export interface DashboardSnapshotSummary {
|
||||
export interface SnapshotDetailsSummary {
|
||||
getSnapshotDetails: SnapshotDetails[];
|
||||
}
|
||||
export const NewRelicDashboardApiRef = createApiRef<NewRelicDashboardApi>({
|
||||
export const newRelicDashboardApiRef = createApiRef<NewRelicDashboardApi>({
|
||||
id: 'plugin.newrelicdashboard.service',
|
||||
description: 'Used by the New Relic Dashboard plugin to make requests',
|
||||
});
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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<any> => {
|
||||
const dashboardObject: any = NewRelicDashboardAPI.getDashboardEntity(
|
||||
String(DashboardEntity?.integrationKey),
|
||||
|
||||
+2
-2
@@ -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<any> => {
|
||||
const dashboardObject: any = NewRelicDashboardAPI.getDashboardSnapshot(
|
||||
guid,
|
||||
|
||||
+2
-2
@@ -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<any> => {
|
||||
const dashboardObject: any = NewRelicDashboardAPI.getDashboardEntity(guid);
|
||||
return dashboardObject;
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user