File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
src/components/ControlPlane Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { YamlViewButton } from '../Yaml/YamlViewButton.tsx';
1111import { useMemo } from 'react' ;
1212import StatusFilter from '../Shared/StatusFilter/StatusFilter.tsx' ;
1313import { ResourceStatusCell } from '../Shared/ResourceStatusCell.tsx' ;
14+ import { Resource } from '../../utils/removeManagedFieldsAndFilterData.ts' ;
1415
1516export function GitRepositories ( ) {
1617 const { data, error, isLoading } = useApiResource ( FluxRequest ) ; //404 if component not enabled
@@ -75,7 +76,7 @@ export function GitRepositories() {
7576 accessor : 'yaml' ,
7677 disableFilters : true ,
7778 Cell : ( cellData : CellData < KustomizationsResponse [ 'items' ] > ) => (
78- < YamlViewButton resourceObject = { cellData . cell . row . original ?. item } />
79+ < YamlViewButton variant = "resource" resource = { cellData . cell . row . original ?. item as Resource } />
7980 ) ,
8081 } ,
8182 ] ,
@@ -112,7 +113,7 @@ export function GitRepositories() {
112113 header = {
113114 < Toolbar >
114115 < Title > { t ( 'common.resourcesCount' , { count : rows . length } ) } </ Title >
115- < YamlViewButton resourceObject = { data } />
116+ < YamlViewButton variant = "resource" resource = { data as unknown as Resource } />
116117 < ToolbarSpacer />
117118 </ Toolbar >
118119 }
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { YamlViewButton } from '../Yaml/YamlViewButton.tsx';
1010import { useMemo } from 'react' ;
1111import StatusFilter from '../Shared/StatusFilter/StatusFilter.tsx' ;
1212import { ResourceStatusCell } from '../Shared/ResourceStatusCell.tsx' ;
13+ import { Resource } from '../../utils/removeManagedFieldsAndFilterData.ts' ;
1314
1415export function Kustomizations ( ) {
1516 const { data, error, isLoading } = useApiResource ( FluxKustomization ) ; //404 if component not enabled
@@ -70,7 +71,9 @@ export function Kustomizations() {
7071 width : 75 ,
7172 accessor : 'yaml' ,
7273 disableFilters : true ,
73- Cell : ( cellData : CellData < FluxRow > ) => < YamlViewButton resourceObject = { cellData . cell . row . original ?. item } /> ,
74+ Cell : ( cellData : CellData < FluxRow > ) => (
75+ < YamlViewButton variant = "resource" resource = { cellData . cell . row . original ?. item as Resource } />
76+ ) ,
7477 } ,
7578 ] ,
7679 [ t ] ,
@@ -105,7 +108,7 @@ export function Kustomizations() {
105108 header = {
106109 < Toolbar >
107110 < Title > { t ( 'common.resourcesCount' , { count : rows . length } ) } </ Title >
108- < YamlViewButton resourceObject = { data } />
111+ < YamlViewButton variant = "resource" resource = { data as unknown as Resource } />
109112 < ToolbarSpacer />
110113 </ Toolbar >
111114 }
You can’t perform that action at this time.
0 commit comments