mirror of
https://github.com/outbackdingo/openapi-ui.git
synced 2026-01-27 18:19:50 +00:00
Merge pull request #111 from PRO-Robotech/feature/dev
stock/inside tables support {i}
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { FC, useState, useEffect } from 'react'
|
||||
import { useNavigate, useParams } from 'react-router-dom'
|
||||
import { useLocation, useNavigate, useParams } from 'react-router-dom'
|
||||
import { Spin, Alert, Button, Flex } from 'antd'
|
||||
import { PlusOutlined, ClearOutlined, MinusOutlined } from '@ant-design/icons'
|
||||
import { useSelector } from 'react-redux'
|
||||
@@ -38,6 +38,7 @@ export const TableBuiltinInfo: FC<TTableBuiltinInfoProps> = ({
|
||||
inside,
|
||||
customizationIdPrefix,
|
||||
}) => {
|
||||
const location = useLocation()
|
||||
const navigate = useNavigate()
|
||||
const params = useParams()
|
||||
const cluster = useSelector((state: RootState) => state.cluster.cluster)
|
||||
@@ -130,6 +131,13 @@ export const TableBuiltinInfo: FC<TTableBuiltinInfoProps> = ({
|
||||
setSelectedRowsData([])
|
||||
}
|
||||
|
||||
const replaceValuesPartsOfUrls = location.pathname
|
||||
.split('/')
|
||||
.reduce<Record<string, string | undefined>>((acc, value, index) => {
|
||||
acc[index.toString()] = value
|
||||
return acc
|
||||
}, {})
|
||||
|
||||
return (
|
||||
<>
|
||||
{isPending && <Spin />}
|
||||
@@ -152,6 +160,7 @@ export const TableBuiltinInfo: FC<TTableBuiltinInfoProps> = ({
|
||||
entryName: params.entryName,
|
||||
apiExtensionVersion: params.apiExtensionVersion,
|
||||
crdName: params.crdName,
|
||||
...replaceValuesPartsOfUrls,
|
||||
}}
|
||||
cluster={cluster}
|
||||
theme={theme}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { FC, useState, useEffect } from 'react'
|
||||
import { useNavigate, useParams } from 'react-router-dom'
|
||||
import { useLocation, useNavigate, useParams } from 'react-router-dom'
|
||||
import { Spin, Alert, Button, Flex } from 'antd'
|
||||
import { PlusOutlined, ClearOutlined, MinusOutlined } from '@ant-design/icons'
|
||||
import { useSelector } from 'react-redux'
|
||||
@@ -53,6 +53,7 @@ export const ResourceInfo: FC<TResourceInfoProps> = ({
|
||||
inside,
|
||||
customizationIdPrefix,
|
||||
}) => {
|
||||
const location = useLocation()
|
||||
const navigate = useNavigate()
|
||||
const params = useParams()
|
||||
const cluster = useSelector((state: RootState) => state.cluster.cluster)
|
||||
@@ -122,6 +123,13 @@ export const ResourceInfo: FC<TResourceInfoProps> = ({
|
||||
setSelectedRowsData([])
|
||||
}
|
||||
|
||||
const replaceValuesPartsOfUrls = location.pathname
|
||||
.split('/')
|
||||
.reduce<Record<string, string | undefined>>((acc, value, index) => {
|
||||
acc[index.toString()] = value
|
||||
return acc
|
||||
}, {})
|
||||
|
||||
return (
|
||||
<>
|
||||
{isPending && <Spin />}
|
||||
@@ -144,6 +152,7 @@ export const ResourceInfo: FC<TResourceInfoProps> = ({
|
||||
entryName: params.entryName,
|
||||
apiExtensionVersion: params.apiExtensionVersion,
|
||||
crdName: params.crdName,
|
||||
...replaceValuesPartsOfUrls,
|
||||
}}
|
||||
forceDefaultAdditionalPrinterColumns={crdAdditionalPrinterColumns}
|
||||
cluster={cluster}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable max-lines-per-function */
|
||||
import React, { FC, useState, useEffect } from 'react'
|
||||
import { useNavigate, useParams } from 'react-router-dom'
|
||||
import { useLocation, useNavigate, useParams } from 'react-router-dom'
|
||||
import { Spin, Alert, Button, Flex } from 'antd'
|
||||
import { PlusOutlined, ClearOutlined, MinusOutlined } from '@ant-design/icons'
|
||||
import { useSelector } from 'react-redux'
|
||||
@@ -43,6 +43,7 @@ export const TableNonCrdInfo: FC<TTableNonCrdInfoProps> = ({
|
||||
inside,
|
||||
customizationIdPrefix,
|
||||
}) => {
|
||||
const location = useLocation()
|
||||
const navigate = useNavigate()
|
||||
const params = useParams()
|
||||
const cluster = useSelector((state: RootState) => state.cluster.cluster)
|
||||
@@ -139,6 +140,13 @@ export const TableNonCrdInfo: FC<TTableNonCrdInfoProps> = ({
|
||||
setSelectedRowsData([])
|
||||
}
|
||||
|
||||
const replaceValuesPartsOfUrls = location.pathname
|
||||
.split('/')
|
||||
.reduce<Record<string, string | undefined>>((acc, value, index) => {
|
||||
acc[index.toString()] = value
|
||||
return acc
|
||||
}, {})
|
||||
|
||||
return (
|
||||
<>
|
||||
{isPending && <Spin />}
|
||||
@@ -161,6 +169,7 @@ export const TableNonCrdInfo: FC<TTableNonCrdInfoProps> = ({
|
||||
entryName: params.entryName,
|
||||
apiExtensionVersion: params.apiExtensionVersion,
|
||||
crdName: params.crdName,
|
||||
...replaceValuesPartsOfUrls,
|
||||
}}
|
||||
cluster={cluster}
|
||||
theme={theme}
|
||||
|
||||
Reference in New Issue
Block a user