Skip to content

Commit 36b3ce2

Browse files
authored
Merge pull request #192 from PRO-Robotech/feature/dev
table prepare wip
2 parents 23b3ebb + f3cd072 commit 36b3ce2

File tree

2 files changed

+29
-14
lines changed

2 files changed

+29
-14
lines changed

src/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/EnrichedTableProvider.tsx

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ export type TEnrichedTableProviderProps = {
1818
dataItems: TJSON[]
1919
resourceSchema?: TJSON
2020

21-
isNamespaced?: boolean
22-
isNamespacedLoading?: boolean
21+
k8sResource?: {
22+
resource: string
23+
apiGroup?: string
24+
apiVersion: string
25+
}
26+
// isNamespaced?: boolean
27+
// isNamespacedLoading?: boolean
2328

2429
dataForControls?: {
2530
cluster: string
@@ -61,8 +66,9 @@ export const EnrichedTableProvider: FC<TEnrichedTableProviderProps> = ({
6166
baseprefix,
6267
dataItems,
6368
resourceSchema,
64-
isNamespaced,
65-
isNamespacedLoading,
69+
k8sResource,
70+
// isNamespaced,
71+
// isNamespacedLoading,
6672
dataForControls,
6773
dataForControlsInternal,
6874
customizationId,
@@ -103,7 +109,9 @@ export const EnrichedTableProvider: FC<TEnrichedTableProviderProps> = ({
103109
customizationId,
104110
tableMappingsReplaceValues,
105111
forceDefaultAdditionalPrinterColumns,
106-
namespaceScopedWithoutNamespace: isNamespaced && !namespace,
112+
namespace,
113+
k8sResource,
114+
// namespaceScopedWithoutNamespace: isNamespaced && !namespace,
107115
}
108116
axios
109117
.post<TPrepareTableRes>(`/api/clusters/${cluster}/openapi-bff/tables/tablePrepare/prepareTableProps`, payload)
@@ -122,17 +130,18 @@ export const EnrichedTableProvider: FC<TEnrichedTableProviderProps> = ({
122130
customizationId,
123131
tableMappingsReplaceValues,
124132
forceDefaultAdditionalPrinterColumns,
125-
isNamespaced,
126133
namespace,
134+
k8sResource,
135+
// isNamespaced,
127136
])
128137

129-
if (isNamespacedLoading) {
130-
return (
131-
<Flex justify="center">
132-
<Spin />
133-
</Flex>
134-
)
135-
}
138+
// if (isNamespacedLoading) {
139+
// return (
140+
// <Flex justify="center">
141+
// <Spin />
142+
// </Flex>
143+
// )
144+
// }
136145

137146
if (!preparedProps && isLoading) {
138147
return (

src/localTypes/bff/table.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ export type TPrepareTableReq = {
1010
customizationId?: string
1111
tableMappingsReplaceValues?: Record<string, string | undefined>
1212
forceDefaultAdditionalPrinterColumns?: TAdditionalPrinterColumns
13-
namespaceScopedWithoutNamespace?: boolean
13+
namespace?: string
14+
k8sResource?: {
15+
resource: string
16+
apiGroup?: string
17+
apiVersion: string
18+
}
19+
// namespaceScopedWithoutNamespace?: boolean
1420
}
1521

1622
export type TPrepareTableRes = {

0 commit comments

Comments
 (0)