@@ -54,25 +54,20 @@ import {
5454 cellIsStickyProps ,
5555} from '@console/app/src/components/data-view/ConsoleDataView' ;
5656import LazyActionMenu from '@console/shared/src/components/actions/LazyActionMenu' ;
57- import { ActionMenuVariant } from '@console/shared/src/components/actions/types' ;
5857
5958const isClusterQuota = ( quota ) => ! quota . metadata . namespace ;
6059
6160const clusterQuotaReference = referenceForModel ( ClusterResourceQuotaModel ) ;
6261const appliedClusterQuotaReference = referenceForModel ( AppliedClusterResourceQuotaModel ) ;
6362
64- const quotaActions = ( quota , namespace = undefined ) => {
63+ const quotaActions = ( quota ) => {
6564 if ( quota . metadata . namespace ) {
6665 return < LazyActionMenu context = { { [ referenceForModel ( ResourceQuotaModel ) ] : quota } } /> ;
6766 }
6867
6968 if ( quota . kind === 'ClusterResourceQuota' ) {
7069 return < LazyActionMenu context = { { [ clusterQuotaReference ] : quota } } /> ;
7170 }
72-
73- if ( quota . kind === 'AppliedClusterResourceQuota' ) {
74- return < LazyActionMenu context = { { [ appliedClusterQuotaReference ] : { quota, namespace } } } /> ;
75- }
7671 return null ;
7772} ;
7873
@@ -150,7 +145,6 @@ const appliedClusterResourceQuotaTableColumnInfo = [
150145 { id : 'projectAnnotations' } ,
151146 { id : 'status' } ,
152147 { id : 'created' } ,
153- { id : 'actions' } ,
154148] ;
155149
156150const QuotaStatus = ( { resourcesAtQuota } ) => {
@@ -455,7 +449,7 @@ const getResourceQuotaDataViewRows = (data, columns, namespace) => {
455449 cell : < Timestamp timestamp = { metadata . creationTimestamp } /> ,
456450 } ,
457451 [ resourceQuotaTableColumnInfo [ 6 ] . id ] : {
458- cell : quotaActions ( obj , namespace ) ,
452+ cell : quotaActions ( obj ) ,
459453 props : actionsCellProps ,
460454 } ,
461455 } ;
@@ -517,10 +511,6 @@ const getAppliedClusterResourceQuotaDataViewRows = (data, columns, namespace) =>
517511 [ appliedClusterResourceQuotaTableColumnInfo [ 4 ] . id ] : {
518512 cell : < Timestamp timestamp = { metadata . creationTimestamp } /> ,
519513 } ,
520- [ appliedClusterResourceQuotaTableColumnInfo [ 5 ] . id ] : {
521- cell : quotaActions ( obj , namespace ) ,
522- props : actionsCellProps ,
523- } ,
524514 } ;
525515
526516 return columns . map ( ( { id } ) => {
@@ -667,13 +657,6 @@ const useAppliedClusterResourceQuotaColumns = () => {
667657 modifier : 'nowrap' ,
668658 } ,
669659 } ,
670- {
671- title : '' ,
672- id : appliedClusterResourceQuotaTableColumnInfo [ 5 ] . id ,
673- props : {
674- ...cellIsStickyProps ,
675- } ,
676- } ,
677660 ] ,
678661 [ t ] ,
679662 ) ;
@@ -814,22 +797,10 @@ export const ResourceQuotasDetailsPage = (props) => {
814797} ;
815798
816799export const AppliedClusterResourceQuotasDetailsPage = ( props ) => {
817- const params = useParams ( ) ;
818800 return (
819801 < DetailsPage
820802 { ...props }
821803 kind = { appliedClusterQuotaReference }
822- customActionMenu = { ( k8sObj , obj ) => (
823- < LazyActionMenu
824- context = { {
825- [ appliedClusterQuotaReference ] : {
826- quota : obj ,
827- namespace : params ?. ns ,
828- } ,
829- } }
830- variant = { ActionMenuVariant . DROPDOWN }
831- />
832- ) }
833804 pages = { [ navFactory . details ( Details ) , navFactory . editYaml ( ) ] }
834805 />
835806 ) ;
0 commit comments