mirror of
https://github.com/outbackdingo/openapi-ui.git
synced 2026-01-27 18:19:50 +00:00
sidebar tags
This commit is contained in:
@@ -24,9 +24,15 @@ type TManageableSidebarProps = {
|
||||
instanceName?: string
|
||||
projectName?: string
|
||||
idToCompare: string
|
||||
currentTags?: string[]
|
||||
}
|
||||
|
||||
export const ManageableSidebar: FC<TManageableSidebarProps> = ({ projectName, instanceName, idToCompare }) => {
|
||||
export const ManageableSidebar: FC<TManageableSidebarProps> = ({
|
||||
projectName,
|
||||
instanceName,
|
||||
idToCompare,
|
||||
currentTags,
|
||||
}) => {
|
||||
const { pathname } = useLocation()
|
||||
const params = useParams()
|
||||
const clusterName = params?.clusterName || ''
|
||||
@@ -86,6 +92,7 @@ export const ManageableSidebar: FC<TManageableSidebarProps> = ({ projectName, in
|
||||
}}
|
||||
pathname={pathname}
|
||||
idToCompare={idToCompare}
|
||||
currentTags={currentTags}
|
||||
noMarginTop
|
||||
/>
|
||||
</Styled.Container>
|
||||
|
||||
@@ -56,7 +56,12 @@ export const FormApiPage: FC<TFormApiPageProps> = ({ forcedTheme, inside }) => {
|
||||
<ContentCard flexGrow={1} displayFlex flexFlow="column">
|
||||
<RowFlexGrow wrap={false}>
|
||||
<Col span="auto">
|
||||
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
|
||||
<ManageableSidebar
|
||||
instanceName={possibleInstance}
|
||||
projectName={possibleProject}
|
||||
idToCompare={sidebarId}
|
||||
currentTags={[`${apiGroup}/${apiVersion}/${typeName}`]}
|
||||
/>
|
||||
</Col>
|
||||
<FlexCol flex="auto">
|
||||
{entryName ? (
|
||||
|
||||
@@ -54,7 +54,12 @@ export const FormBuiltinPage: FC<TFormBuiltinPageProps> = ({ forcedTheme, inside
|
||||
<ContentCard flexGrow={1} displayFlex flexFlow="column">
|
||||
<RowFlexGrow wrap={false}>
|
||||
<Col span="auto">
|
||||
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
|
||||
<ManageableSidebar
|
||||
instanceName={possibleInstance}
|
||||
projectName={possibleProject}
|
||||
idToCompare={sidebarId}
|
||||
currentTags={[typeName]}
|
||||
/>
|
||||
</Col>
|
||||
<FlexCol flex="auto">
|
||||
{entryName ? (
|
||||
|
||||
@@ -56,7 +56,12 @@ export const FormCrdPage: FC<TFormCrdPageProps> = ({ forcedTheme, inside }) => {
|
||||
<ContentCard flexGrow={1} displayFlex flexFlow="column">
|
||||
<RowFlexGrow wrap={false}>
|
||||
<Col span="auto">
|
||||
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
|
||||
<ManageableSidebar
|
||||
instanceName={possibleInstance}
|
||||
projectName={possibleProject}
|
||||
idToCompare={sidebarId}
|
||||
currentTags={[`${apiGroup}/${apiVersion}/${typeName}`]}
|
||||
/>
|
||||
</Col>
|
||||
<FlexCol flex="auto">
|
||||
{entryName ? (
|
||||
|
||||
@@ -59,7 +59,12 @@ export const TableApiPage: FC<TTableApiPageProps> = ({ forcedTheme, inside }) =>
|
||||
<ContentCard flexGrow={1} displayFlex flexFlow="column">
|
||||
<RowFlexGrow wrap={false}>
|
||||
<Col span="auto">
|
||||
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
|
||||
<ManageableSidebar
|
||||
instanceName={possibleInstance}
|
||||
projectName={possibleProject}
|
||||
idToCompare={sidebarId}
|
||||
currentTags={[`${apiGroup}/${apiVersion}/${typeName}`]}
|
||||
/>
|
||||
</Col>
|
||||
<FlexCol flex="auto">
|
||||
{typeName && apiGroup && apiVersion && (
|
||||
|
||||
@@ -48,7 +48,12 @@ export const TableBuiltinPage: FC<TTableBuiltinPageProps> = ({ forcedTheme, insi
|
||||
<ContentCard flexGrow={1} displayFlex flexFlow="column">
|
||||
<RowFlexGrow wrap={false}>
|
||||
<Col span="auto">
|
||||
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
|
||||
<ManageableSidebar
|
||||
instanceName={possibleInstance}
|
||||
projectName={possibleProject}
|
||||
idToCompare={sidebarId}
|
||||
currentTags={[`${typeName}`]}
|
||||
/>
|
||||
</Col>
|
||||
<FlexCol flex="auto">
|
||||
{typeName && (
|
||||
|
||||
@@ -50,7 +50,12 @@ export const TableCrdPage: FC<TTableCrdPageProps> = ({ forcedTheme, inside }) =>
|
||||
<ContentCard flexGrow={1} displayFlex flexFlow="column">
|
||||
<RowFlexGrow wrap={false}>
|
||||
<Col span="auto">
|
||||
<ManageableSidebar instanceName={possibleInstance} projectName={possibleProject} idToCompare={sidebarId} />
|
||||
<ManageableSidebar
|
||||
instanceName={possibleInstance}
|
||||
projectName={possibleProject}
|
||||
idToCompare={sidebarId}
|
||||
currentTags={[`${apiGroup}/${apiVersion}/${crdName}`]}
|
||||
/>
|
||||
</Col>
|
||||
<FlexCol flex="auto">
|
||||
{crdName && apiGroup && apiVersion && apiExtensionVersion && (
|
||||
|
||||
Reference in New Issue
Block a user