enriched tables on factory

This commit is contained in:
typescreep
2025-07-15 22:17:09 +03:00
parent 0adbbe9089
commit ff66b62bbb
6 changed files with 15 additions and 6 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.54",
"@prorobotech/openapi-k8s-toolkit": "^0.0.1-alpha.55",
"@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.54",
"resolved": "https://registry.npmjs.org/@prorobotech/openapi-k8s-toolkit/-/openapi-k8s-toolkit-0.0.1-alpha.54.tgz",
"integrity": "sha512-ocIFnyKyi9xf55eJloy00wJBnzo7gppSkBKqLa4fclaB4rsm8rQA49oPzPyqTB8QGFCfFs4qjfCBsLRghvOBqw==",
"version": "0.0.1-alpha.55",
"resolved": "https://registry.npmjs.org/@prorobotech/openapi-k8s-toolkit/-/openapi-k8s-toolkit-0.0.1-alpha.55.tgz",
"integrity": "sha512-AleLtpAsOvTN3/dunR9/lQmh1gxJNvL5RgVNQMfmR6WomVeKqEJvm9hlEUfPJrQYpnUsFc/k/BuZqasg/+WGog==",
"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.54",
"@prorobotech/openapi-k8s-toolkit": "0.0.1-alpha.55",
"@readme/openapi-parser": "4.0.0",
"@reduxjs/toolkit": "2.2.5",
"@tanstack/react-query": "5.62.2",

View File

@@ -12,6 +12,7 @@ import { RootState } from 'store/store'
import { BASE_API_GROUP, BASE_API_VERSION } from 'constants/customizationApiGroupAndVersion'
export const Factory: FC = () => {
const theme = useSelector((state: RootState) => state.openapiTheme.theme)
const cluster = useSelector((state: RootState) => state.cluster.cluster)
const { key } = useParams()
@@ -29,6 +30,11 @@ export const Factory: FC = () => {
}
return (
<DynamicRendererWithProviders urlsToFetch={spec.urlsToFetch} items={spec.data} components={DynamicComponents} />
<DynamicRendererWithProviders
urlsToFetch={spec.urlsToFetch}
theme={theme}
items={spec.data}
components={DynamicComponents}
/>
)
}

View File

@@ -130,6 +130,7 @@ export const TableBuiltinInfo: FC<TTableBuiltinInfoProps> = ({ namespace, typeNa
<OverflowMaxHeightContainer $maxHeight={height}>
{!error && data && (
<EnrichedTableProvider
key={`/v1/${typeName}`}
customizationId={`default-/v1/${typeName}`}
tableMappingsReplaceValues={{
clusterName: params.clusterName,

View File

@@ -127,6 +127,7 @@ export const ResourceInfo: FC<TResourceInfoProps> = ({
<OverflowMaxHeightContainer $maxHeight={height}>
{!error && data && (
<EnrichedTableProvider
key={`/${apiGroup}/${apiVersion}/${crdPluralName}`}
customizationId={`default-/${apiGroup}/${apiVersion}/${crdPluralName}`}
tableMappingsReplaceValues={{
clusterName: params.clusterName,

View File

@@ -144,6 +144,7 @@ export const TableNonCrdInfo: FC<TTableNonCrdInfoProps> = ({
<OverflowMaxHeightContainer $maxHeight={height}>
{!error && data && (
<EnrichedTableProvider
key={`/${apiGroup}/${apiVersion}/${typeName}`}
customizationId={`default-/${apiGroup}/${apiVersion}/${typeName}`}
tableMappingsReplaceValues={{
clusterName: params.clusterName,