-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CNV-33063: Add KSM to Cluster settings
Add KSM (Kernel Samepage Merging) configuration to Cluster settings, under "Resource management" expandable section. Fixes https://issues.redhat.com/browse/CNV-33063
- Loading branch information
Hilda Stastna
committed
Oct 2, 2023
1 parent
cc1fa30
commit f6d53ff
Showing
7 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...SettingsTab/ClusterTab/components/ResourceManagementSection/ResourceManagementSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React, { FC } from 'react'; | ||
|
||
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation'; | ||
|
||
import ExpandSection from '../../../ExpandSection/ExpandSection'; | ||
|
||
import KernelSamepageMerging from './components/KernelSamepageMerging/KernelSamepageMerging'; | ||
|
||
const ResourceManagementSection: FC = () => { | ||
const { t } = useKubevirtTranslation(); | ||
|
||
return ( | ||
<ExpandSection toggleText={t('Resource management')}> | ||
<KernelSamepageMerging /> | ||
</ExpandSection> | ||
); | ||
}; | ||
|
||
export default ResourceManagementSection; |
15 changes: 15 additions & 0 deletions
15
...nts/ResourceManagementSection/components/KernelSamepageMerging/KernelSamepageMerging.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.KernelSamepageMerging { | ||
&__ExpandSection { | ||
padding-left: var(--pf-global--spacer--lg); | ||
} | ||
|
||
&__HelpIcon { | ||
color: var(--pf-global--Color--100); | ||
} | ||
|
||
&__HelpTextIcon { | ||
.pf-c-popover__content { | ||
width: 400px; | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...ents/ResourceManagementSection/components/KernelSamepageMerging/KernelSamepageMerging.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React, { FC } from 'react'; | ||
import ExpandSection from 'src/views/clusteroverview/SettingsTab/ExpandSection/ExpandSection'; | ||
|
||
import HelpTextIcon from '@kubevirt-utils/components/HelpTextIcon/HelpTextIcon'; | ||
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation'; | ||
import { PopoverPosition } from '@patternfly/react-core'; | ||
|
||
import NodeSelectorConfiguration from './components/NodeSelectorConfiguration'; | ||
|
||
import './KernelSamepageMerging.scss'; | ||
|
||
const KernelSamepageMerging: FC = () => { | ||
const { t } = useKubevirtTranslation(); | ||
|
||
return ( | ||
<ExpandSection | ||
toggleContent={ | ||
<> | ||
{t('Kernel Samepage Merging (KSM)')}{' '} | ||
<HelpTextIcon | ||
bodyContent={t( | ||
'KSM is a memory-saving de-duplication feature designed to fit more VirtualMachines into physical memory by sharing the data common between them.', | ||
)} | ||
className="KernelSamepageMerging__HelpTextIcon" | ||
helpIconClassName="KernelSamepageMerging__HelpIcon" | ||
position={PopoverPosition.right} | ||
/> | ||
</> | ||
} | ||
className="KernelSamepageMerging__ExpandSection" | ||
> | ||
<NodeSelectorConfiguration /> | ||
</ExpandSection> | ||
); | ||
}; | ||
|
||
export default KernelSamepageMerging; |
5 changes: 5 additions & 0 deletions
5
...agementSection/components/KernelSamepageMerging/components/NodeSelectorConfiguration.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.KernelSamepageMerging { | ||
&__ExpandSection > * { | ||
padding-left: var(--pf-global--spacer--lg); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...nagementSection/components/KernelSamepageMerging/components/NodeSelectorConfiguration.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React, { FC } from 'react'; | ||
|
||
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation'; | ||
import { Button } from '@patternfly/react-core'; | ||
import { PencilAltIcon } from '@patternfly/react-icons'; | ||
|
||
import './NodeSelectorConfiguration.scss'; | ||
|
||
const NodeSelectorConfiguration: FC = () => { | ||
const { t } = useKubevirtTranslation(); | ||
|
||
return ( | ||
<Button | ||
// className="NodeSelectorConfiguration__ExpandSection" | ||
isInline | ||
// onClick={onClick} | ||
variant="link" | ||
> | ||
{t('Node selector configuration')} | ||
<PencilAltIcon alt={t('Edit')} className="co-icon-space-l pf-c-button-icon--plain" /> | ||
</Button> | ||
); | ||
}; | ||
|
||
export default NodeSelectorConfiguration; |