feat(adrs): display associated entity in AdrSearchResultListItem
Signed-off-by: Phil Kuang <pkuang@factset.com>
This commit is contained in:
@@ -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" />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user