Skip to content

Commit 2f725d8

Browse files
committed
Remove actions for AppliedClusterResourceQuota
1 parent 353a6ad commit 2f725d8

File tree

5 files changed

+3
-127
lines changed

5 files changed

+3
-127
lines changed

frontend/packages/console-app/console-extensions.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -552,19 +552,6 @@
552552
"provider": { "$codeRef": "defaultProvider.useDefaultActionsProvider" }
553553
}
554554
},
555-
{
556-
"type": "console.action/resource-provider",
557-
"properties": {
558-
"model": {
559-
"group": "quota.openshift.io",
560-
"version": "v1",
561-
"kind": "AppliedClusterResourceQuota"
562-
},
563-
"provider": {
564-
"$codeRef": "appliedClusterResourceQuotaProvider.useAppliedClusterResourceQuotaActionsProvider"
565-
}
566-
}
567-
},
568555
{
569556
"type": "console.page/route",
570557
"properties": {

frontend/packages/console-app/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
"customResourceDefinitionProvider": "src/actions/providers/custom-resource-definition-provider.ts",
100100
"machineConfigPoolProvider": "src/actions/providers/machine-config-pool-provider.ts",
101101
"serviceMonitorProvider": "src/actions/providers/service-monitor-provider.ts",
102-
"appliedClusterResourceQuotaProvider": "src/actions/providers/applied-cluster-resource-quota-provider.ts",
103102
"userProvider": "src/actions/providers/user-provider.ts"
104103
}
105104
}

frontend/packages/console-app/src/actions/providers/applied-cluster-resource-quota-provider.ts

Lines changed: 0 additions & 80 deletions
This file was deleted.

frontend/public/components/resource-quota.jsx

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,20 @@ import {
5454
cellIsStickyProps,
5555
} from '@console/app/src/components/data-view/ConsoleDataView';
5656
import LazyActionMenu from '@console/shared/src/components/actions/LazyActionMenu';
57-
import { ActionMenuVariant } from '@console/shared/src/components/actions/types';
5857

5958
const isClusterQuota = (quota) => !quota.metadata.namespace;
6059

6160
const clusterQuotaReference = referenceForModel(ClusterResourceQuotaModel);
6261
const appliedClusterQuotaReference = referenceForModel(AppliedClusterResourceQuotaModel);
6362

64-
const quotaActions = (quota, namespace = undefined) => {
65-
if (quota.metadata.namespace) {
63+
const quotaActions = (quota) => {
64+
if (quota.kind === 'ResourceQuota') {
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

156150
const 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

816799
export 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
);

frontend/public/locales/en/public.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1733,7 +1733,6 @@
17331733
"Cancel build": "Cancel build",
17341734
"Impersonate Group {{name}}": "Impersonate Group {{name}}",
17351735
"Edit Machine count": "Edit Machine count",
1736-
"Edit AppliedClusterResourceQuota": "Edit AppliedClusterResourceQuota",
17371736
"Start build": "Start build",
17381737
"Start last run": "Start last run",
17391738
"Pause updates": "Pause updates",

0 commit comments

Comments
 (0)