V2Wizard: Add masked services to the "Disabled services" code block

Fixes #1985

This concatenates masked service to the disabled services so both get rendered in the "Disabled service" code block.

Test to check this was also added.
This commit is contained in:
regexowl 2024-04-25 10:06:32 +02:00 committed by Lucas Garfield
parent 45be93db11
commit b6041d2022
4 changed files with 22 additions and 11 deletions

View file

@ -40,8 +40,12 @@ export const OscapProfileInformation = (): JSX.Element => {
const enabledServicesDisplayString =
oscapProfileInfo?.services?.enabled?.join(' ');
const disableServicesDisplayString =
oscapProfileInfo?.services?.disabled?.join(' ');
const disabledAndMaskedServices = [
...(oscapProfileInfo?.services?.disabled ?? []),
...(oscapProfileInfo?.services?.masked ?? []),
];
const disabledAndMaskedServicesDisplayString =
disabledAndMaskedServices.join(' ');
return (
<>
@ -99,7 +103,9 @@ export const OscapProfileInformation = (): JSX.Element => {
</TextListItem>
<TextListItem component={TextListItemVariants.dd}>
<CodeBlock>
<CodeBlockCode>{disableServicesDisplayString}</CodeBlockCode>
<CodeBlockCode>
{disabledAndMaskedServicesDisplayString}
</CodeBlockCode>
</CodeBlock>
</TextListItem>
<TextListItem