mirror of
https://github.com/outbackdingo/openapi-ui.git
synced 2026-01-27 18:19:50 +00:00
Merge pull request #49 from PRO-Robotech/feature/dev
enriched tables on factory | fix undefined while tables switch
This commit is contained in:
8
package-lock.json
generated
8
package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user