From 8d8be9165370f1ec007d70de89018cf80fdf0030 Mon Sep 17 00:00:00 2001 From: chriskari Date: Fri, 13 Sep 2024 17:14:21 +0200 Subject: [PATCH] feat: added yaml upload button --- .../Namespaces/AllNamespacesDetails.js | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/resources/Namespaces/AllNamespacesDetails.js b/src/resources/Namespaces/AllNamespacesDetails.js index aedd63a677..e248f78a8d 100644 --- a/src/resources/Namespaces/AllNamespacesDetails.js +++ b/src/resources/Namespaces/AllNamespacesDetails.js @@ -3,16 +3,19 @@ import { DynamicPageComponent } from 'shared/components/DynamicPageComponent/Dyn import { NamespaceWorkloads } from './NamespaceWorkloads/NamespaceWorkloads'; import { ResourcesUsage } from './ResourcesUsage'; import { spacing } from '@ui5/webcomponents-react-base'; -import { Title } from '@ui5/webcomponents-react'; +import { Button, Title } from '@ui5/webcomponents-react'; import LimitRangeList from 'resources/LimitRanges/LimitRangeList'; import { EventsList } from 'shared/components/EventsList'; import { ResourceQuotasList as ResourceQuotaListComponent } from 'resources/ResourceQuotas/ResourceQuotasList'; import { EVENT_MESSAGE_TYPE } from 'hooks/useMessageList'; import { createPortal } from 'react-dom'; import YamlUploadDialog from './YamlUpload/YamlUploadDialog'; +import { useSetRecoilState } from 'recoil'; +import { showYamlUploadDialogState } from 'state/showYamlUploadDialogAtom'; export function AllNamespacesDetails() { const { t } = useTranslation(); + const setShowAdd = useSetRecoilState(showYamlUploadDialogState); const limitRangesParams = { hasDetailsView: true, @@ -41,6 +44,20 @@ export function AllNamespacesDetails() { const Events = ; + const headerActions = ( + <> + + {createPortal(, document.body)} + + ); + return ( <> } - actions={createPortal(, document.body)} + actions={headerActions} /> );