new querykeys | {i} in sidebars

This commit is contained in:
typescreep
2025-07-21 15:01:24 +03:00
parent 4341afa84d
commit ff71adf250
3 changed files with 14 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

@@ -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}