diff --git a/frontend/public/components/resource-quota.jsx b/frontend/public/components/resource-quota.jsx index 50773cb27ed..3c101ceaf1e 100644 --- a/frontend/public/components/resource-quota.jsx +++ b/frontend/public/components/resource-quota.jsx @@ -1,6 +1,6 @@ import { useMemo, Suspense } from 'react'; import * as _ from 'lodash'; -import { useParams } from 'react-router-dom-v5-compat'; +import { useParams, Link } from 'react-router-dom-v5-compat'; import { Table as PfTable, Thead, Tbody, Tr, Th, Td } from '@patternfly/react-table'; import { OutlinedCircleIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-circle-icon'; import { ResourcesAlmostEmptyIcon } from '@patternfly/react-icons/dist/esm/icons/resources-almost-empty-icon'; @@ -8,13 +8,14 @@ import { ResourcesAlmostFullIcon } from '@patternfly/react-icons/dist/esm/icons/ import { ResourcesFullIcon } from '@patternfly/react-icons/dist/esm/icons/resources-full-icon'; import { UnknownIcon } from '@patternfly/react-icons/dist/esm/icons/unknown-icon'; -import { useTranslation } from 'react-i18next'; +import { Trans, useTranslation } from 'react-i18next'; import AppliedClusterResourceQuotaCharts from '@console/app/src/components/resource-quota/AppliedClusterResourceQuotaCharts'; import ResourceQuotaCharts from '@console/app/src/components/resource-quota/ResourceQuotaCharts'; import ClusterResourceQuotaCharts from '@console/app/src/components/resource-quota/ClusterResourceQuotaCharts'; import PaneBody from '@console/shared/src/components/layout/PaneBody'; import { FLAGS } from '@console/shared/src/constants/common'; +import { useFlag } from '@console/shared/src/hooks/flag'; import { YellowExclamationTriangleIcon } from '@console/shared/src/components/status/icons'; import { DASH } from '@console/shared/src/constants/ui'; import { DetailsPage, MultiListPage } from './factory'; @@ -696,6 +697,13 @@ export const flatten = (resources) => _.flatMap(resources, (resource) => _.compa export const ResourceQuotasPage = connectToFlags(FLAGS.OPENSHIFT)( ({ namespace, flags, mock, showTitle }) => { const { t } = useTranslation(); + const kubevirtFeature = useFlag('KUBEVIRT_DYNAMIC'); + const isKubevirtPluginActive = + Array.isArray(window.SERVER_FLAGS.consolePlugins) && + window.SERVER_FLAGS.consolePlugins.includes('kubevirt-plugin') && + kubevirtFeature; + const quotasFeature = useFlag('KUBEVIRT_QUOTAS'); + const resources = [{ kind: 'ResourceQuota', namespaced: true }]; let rowFilters = null; @@ -757,6 +765,31 @@ export const ResourceQuotasPage = connectToFlags(FLAGS.OPENSHIFT)( namespace={namespace} flatten={flatten} title={t(ResourceQuotaModel.labelPluralKey)} + helpText={ +
+ {t( + 'public~Manage project capacity by limiting the number of objects and total compute resources available.', + )} + {isKubevirtPluginActive && ( + + {' '} + Use standard quotas for general container workloads. If you are running OpenShift + Virtualization, it is recommended to use{' '} + + Application-Aware Quota + {' '} + to handle VM infrastructure overhead and live migrations without service + interruption. + + )} +
+ } rowFilters={rowFilters} mock={mock} showTitle={showTitle} diff --git a/frontend/public/locales/en/public.json b/frontend/public/locales/en/public.json index 2884855fcee..6c176197b18 100644 --- a/frontend/public/locales/en/public.json +++ b/frontend/public/locales/en/public.json @@ -1285,6 +1285,8 @@ "Cluster-wide {{resource}}": "Cluster-wide {{resource}}", "Namespace {{resource}}": "Namespace {{resource}}", "Create ResourceQuota": "Create ResourceQuota", + "Manage project capacity by limiting the number of objects and total compute resources available.": "Manage project capacity by limiting the number of objects and total compute resources available.", + " Use standard quotas for general container workloads. If you are running OpenShift Virtualization, it is recommended to use <3>Application-Aware Quota to handle VM infrastructure overhead and live migrations without service interruption.": " Use standard quotas for general container workloads. If you are running OpenShift Virtualization, it is recommended to use <3>Application-Aware Quota to handle VM infrastructure overhead and live migrations without service interruption.", "Select all filters": "Select all filters", "{{selectedCount}} of {{itemCount}}": "{{selectedCount}} of {{itemCount}}", "Item_one": "Item",