From 20d440e4564b9d92bc3c9402432c3e0ed8f7adb1 Mon Sep 17 00:00:00 2001 From: Chris Langhout Date: Thu, 9 Nov 2023 18:50:31 +0100 Subject: [PATCH] feat: add copy to clipboard button for uid etag and entityRef Signed-off-by: Chris Langhout --- .../components/OverviewPage.tsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx index 26aa69e425..8b3b69a55a 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx @@ -21,6 +21,7 @@ import { List, ListItem, ListItemIcon, + ListItemSecondaryAction, makeStyles, Typography, } from '@material-ui/core'; @@ -37,6 +38,7 @@ import { } from './common'; import { EntityKindIcon } from './EntityKindIcon'; import { stringifyEntityRef } from '@backstage/catalog-model'; +import { CopyTextButton } from '@backstage/core-components'; const useStyles = makeStyles({ root: { @@ -61,6 +63,7 @@ export function OverviewPage(props: { entity: AlphaEntity }) { 'type', ); + const entityRef = stringifyEntityRef(props.entity); return ( <> Overview @@ -84,18 +87,24 @@ export function OverviewPage(props: { entity: AlphaEntity }) { {metadata.uid && ( + + + )} {metadata.etag && ( + + + )} - + + + +