Merge pull request #66 from PRO-Robotech/feature/dev

new querykeys | {i} in sidebars/breadcrumbs
This commit is contained in:
typescreep
2025-07-21 15:04:19 +03:00
committed by GitHub
4 changed files with 23 additions and 5 deletions

8
package-lock.json generated
View File

@@ -11,7 +11,7 @@
"@ant-design/icons": "5.6.0",
"@monaco-editor/react": "4.6.0",
"@originjs/vite-plugin-federation": "1.3.6",
"@prorobotech/openapi-k8s-toolkit": "^0.0.1-alpha.61",
"@prorobotech/openapi-k8s-toolkit": "^0.0.1-alpha.62",
"@readme/openapi-parser": "4.0.0",
"@reduxjs/toolkit": "2.2.5",
"@tanstack/react-query": "5.62.2",
@@ -2798,9 +2798,9 @@
}
},
"node_modules/@prorobotech/openapi-k8s-toolkit": {
"version": "0.0.1-alpha.61",
"resolved": "https://registry.npmjs.org/@prorobotech/openapi-k8s-toolkit/-/openapi-k8s-toolkit-0.0.1-alpha.61.tgz",
"integrity": "sha512-c3Pb3cE66FFNR1euAxScymVqZxAabJktjkokgO41Gf5W7pzZV+9l+cm41tcHyun8BvXzOMX5vkPSbhtNVuGKfA==",
"version": "0.0.1-alpha.62",
"resolved": "https://registry.npmjs.org/@prorobotech/openapi-k8s-toolkit/-/openapi-k8s-toolkit-0.0.1-alpha.62.tgz",
"integrity": "sha512-Ase/PSMID8NKuZhNMn19f4rWluKlaAA62YOxY7CJq0ji1DP4hQuw3Izw8Qm/CFAMJ/J9wdnyEgFraEZ9qAeP+g==",
"license": "MIT",
"dependencies": {
"@monaco-editor/react": "4.6.0",

View File

@@ -20,7 +20,7 @@
"@ant-design/icons": "5.6.0",
"@monaco-editor/react": "4.6.0",
"@originjs/vite-plugin-federation": "1.3.6",
"@prorobotech/openapi-k8s-toolkit": "0.0.1-alpha.61",
"@prorobotech/openapi-k8s-toolkit": "0.0.1-alpha.62",
"@readme/openapi-parser": "4.0.0",
"@reduxjs/toolkit": "2.2.5",
"@tanstack/react-query": "5.62.2",

View File

@@ -9,6 +9,7 @@ type TManageableBreadCrumbsProps = {
}
export const ManageableBreadcrumbs: FC<TManageableBreadCrumbsProps> = ({ idToCompare, inside }) => {
const location = useLocation()
const { pathname } = useLocation()
const params = useParams()
const clusterName = params?.clusterName || ''
@@ -21,6 +22,13 @@ export const ManageableBreadcrumbs: FC<TManageableBreadCrumbsProps> = ({ idToCom
const apiExtensionVersion = params?.apiExtensionVersion || ''
const crdName = params?.crdName || ''
const replaceValuesPartsOfUrls = location.pathname
.split('/')
.reduce<Record<string, string | undefined>>((acc, value, index) => {
acc[index.toString()] = value
return acc
}, {})
return (
<ManageableBreadcrumbsWithDataProvider
idToCompare={idToCompare}
@@ -42,6 +50,7 @@ export const ManageableBreadcrumbs: FC<TManageableBreadCrumbsProps> = ({ idToCom
entryName,
apiExtensionVersion,
crdName,
...replaceValuesPartsOfUrls,
}}
pathname={pathname}
/>

View File

@@ -21,6 +21,7 @@ export const ManageableSidebar: FC<TManageableSidebarProps> = ({
idToCompare,
currentTags,
}) => {
const location = useLocation()
const { pathname } = useLocation()
const params = useParams()
const clusterName = params?.clusterName || ''
@@ -46,6 +47,13 @@ export const ManageableSidebar: FC<TManageableSidebarProps> = ({
}
}, [])
const replaceValuesPartsOfUrls = location.pathname
.split('/')
.reduce<Record<string, string | undefined>>((acc, value, index) => {
acc[index.toString()] = value
return acc
}, {})
return (
<Styled.Container
$isDark={theme === 'dark'}
@@ -66,6 +74,7 @@ export const ManageableSidebar: FC<TManageableSidebarProps> = ({
instanceName,
namespace,
syntheticProject,
...replaceValuesPartsOfUrls,
}}
pathname={pathname}
idToCompare={idToCompare}