feat: add explore-backend plugin
Signed-off-by: Andrew Thauer <athauer@wealthsimple.com>
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
Paper,
|
||||
useTheme,
|
||||
} from '@material-ui/core';
|
||||
import BuildIcon from '@material-ui/icons/Build';
|
||||
import LaunchIcon from '@material-ui/icons/Launch';
|
||||
import {
|
||||
CatalogIcon,
|
||||
@@ -38,6 +39,7 @@ import {
|
||||
catalogApiRef,
|
||||
CATALOG_FILTER_EXISTS,
|
||||
} from '@backstage/plugin-catalog-react';
|
||||
import { ToolSearchResultListItem } from '@backstage/plugin-explore';
|
||||
import { searchPlugin, SearchType } from '@backstage/plugin-search';
|
||||
import {
|
||||
DefaultResultListItem,
|
||||
@@ -110,6 +112,10 @@ export const SearchModal = ({ toggleModal }: { toggleModal: () => void }) => {
|
||||
value: 'techdocs',
|
||||
name: 'Documentation',
|
||||
},
|
||||
{
|
||||
value: 'tools',
|
||||
name: 'Tools',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Grid>
|
||||
@@ -209,6 +215,17 @@ export const SearchModal = ({ toggleModal }: { toggleModal: () => void }) => {
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case 'tools':
|
||||
resultItem = (
|
||||
<ToolSearchResultListItem
|
||||
icon={<BuildIcon />}
|
||||
key={document.location}
|
||||
result={document}
|
||||
highlight={highlight}
|
||||
rank={rank}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
default:
|
||||
resultItem = (
|
||||
<DefaultResultListItem
|
||||
|
||||
@@ -41,6 +41,8 @@ import {
|
||||
import { TechDocsSearchResultListItem } from '@backstage/plugin-techdocs';
|
||||
import { Grid, List, makeStyles, Paper, Theme } from '@material-ui/core';
|
||||
import React from 'react';
|
||||
import { ToolSearchResultListItem } from '@backstage/plugin-explore';
|
||||
import BuildIcon from '@material-ui/icons/Build';
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) => ({
|
||||
bar: {
|
||||
@@ -155,6 +157,16 @@ const SearchPage = () => {
|
||||
rank={rank}
|
||||
/>
|
||||
);
|
||||
case 'tools':
|
||||
return (
|
||||
<ToolSearchResultListItem
|
||||
icon={<BuildIcon />}
|
||||
key={document.location}
|
||||
result={document}
|
||||
highlight={highlight}
|
||||
rank={rank}
|
||||
/>
|
||||
);
|
||||
default:
|
||||
return (
|
||||
<DefaultResultListItem
|
||||
|
||||
Reference in New Issue
Block a user