@@ -12,13 +12,19 @@ import {
1212 TableVariant ,
1313} from '@patternfly/react-table' ;
1414import { useTranslation } from 'react-i18next' ;
15- import { WatchK8sResource } from '@console/dynamic-plugin-sdk' ;
15+ import { useAccessReview , WatchK8sResource } from '@console/dynamic-plugin-sdk' ;
1616import { breadcrumbsForGlobalConfig } from '@console/internal/components/cluster-settings/global-config' ;
1717import { DetailsForKind } from '@console/internal/components/default-resource' ;
1818import { DetailsPage } from '@console/internal/components/factory' ;
19- import { EmptyBox , LoadingBox , navFactory , ResourceLink } from '@console/internal/components/utils' ;
19+ import {
20+ asAccessReview ,
21+ EmptyBox ,
22+ KebabAction ,
23+ LoadingBox ,
24+ navFactory ,
25+ ResourceLink ,
26+ } from '@console/internal/components/utils' ;
2027import { useK8sWatchResource } from '@console/internal/components/utils/k8s-watch-hook' ;
21- import { useAccessReview } from '@console/internal/components/utils/rbac' ;
2228import { ConsoleOperatorConfigModel , ConsolePluginModel } from '@console/internal/models' ;
2329import {
2430 ConsolePluginKind ,
@@ -197,11 +203,27 @@ export const ConsoleOperatorConfigDetailsPage: React.FC<React.ComponentProps<
197203 } ,
198204 ] ;
199205
206+ const menuActions : KebabAction [ ] = [
207+ ( ) => ( {
208+ // t('console-app~Customize')
209+ labelKey : 'console-app~Customize' ,
210+ labelKind : { kind : ConsoleOperatorConfigModel . kind } ,
211+ dataTest : `Customize` ,
212+ href : '/cluster-configuration' ,
213+ accessReview : asAccessReview (
214+ ConsoleOperatorConfigModel ,
215+ { spec : { name : 'cluster' } } ,
216+ 'patch' ,
217+ ) ,
218+ } ) ,
219+ ] ;
220+
200221 return (
201222 < DetailsPage
202223 { ...props }
203224 kind = { consoleOperatorConfigReference }
204225 pages = { pages }
226+ menuActions = { menuActions }
205227 breadcrumbsFor = { ( ) =>
206228 breadcrumbsForGlobalConfig ( ConsoleOperatorConfigModel . label , props . match . url )
207229 }
0 commit comments