feat(adrs): display associated entity in AdrSearchResultListItem

Signed-off-by: Phil Kuang <pkuang@factset.com>
This commit is contained in:
Phil Kuang
2022-08-08 15:30:25 -04:00
parent af1e11b744
commit bfc7c50a09
7 changed files with 33 additions and 0 deletions
+1
View File
@@ -22,6 +22,7 @@
"postpack": "backstage-cli package postpack"
},
"dependencies": {
"@backstage/catalog-model": "^1.1.0",
"@backstage/core-components": "^0.11.0-next.2",
"@backstage/core-plugin-api": "^1.0.5-next.0",
"@backstage/integration-react": "^1.1.3-next.1",
@@ -23,9 +23,11 @@ import {
ListItemText,
makeStyles,
} from '@material-ui/core';
import { parseEntityRef } from '@backstage/catalog-model';
import { Link } from '@backstage/core-components';
import { useAnalytics } from '@backstage/core-plugin-api';
import { AdrDocument } from '@backstage/plugin-adr-common';
import { humanizeEntityRef } from '@backstage/plugin-catalog-react';
import { ResultHighlight } from '@backstage/plugin-search-common';
import { HighlightedSearchResultText } from '@backstage/plugin-search-react';
@@ -104,6 +106,13 @@ export const AdrSearchResultListItem = ({
}
/>
<Box>
<Chip
label={`Entity: ${
result.entityTitle ??
humanizeEntityRef(parseEntityRef(result.entityRef))
}`}
size="small"
/>
{result.status && (
<Chip label={`Status: ${result.status}`} size="small" />
)}