add NEWRELIC_GUID_ANNOTATION in index

Signed-off-by: mufaddal motiwala <mufaddalmm.52@gmail.com>
This commit is contained in:
mufaddal motiwala
2021-12-20 11:50:52 +05:30
parent 342292a457
commit 7caba057c8
@@ -15,12 +15,12 @@
*/
import { useEntity } from '@backstage/plugin-catalog-react';
import { NEWRELIC_GUID } from '../constants';
import { NEWRELIC_GUID_ANNOTATION } from '../constants';
export function useNewRelicDashboardEntity() {
const { entity } = useEntity();
const integrationKey: string | undefined =
entity?.metadata?.annotations?.[NEWRELIC_GUID];
entity?.metadata?.annotations?.[NEWRELIC_GUID_ANNOTATION];
const name: string | undefined = entity?.metadata?.name;
return { integrationKey, name };