-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathindex.tsx
More file actions
74 lines (66 loc) · 1.96 KB
/
index.tsx
File metadata and controls
74 lines (66 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import React from 'react';
import { Card, CardBody } from '@patternfly/react-core';
import { useAppSelector } from '@/store/hooks';
import { selectIsImageMode, selectIsOnPremise } from '@/store/slices';
import {
Filesystem,
Firewall,
Firstboot,
Hostname,
Kernel,
Locale,
Services,
Timezone,
Users,
} from './components';
import { ReviewCardHeader, ReviewList } from '../shared';
import { ReviewCardProps } from '../types';
type OscapServices = {
enabled: string[];
disabled: string[];
masked: string[];
};
type AdvancedSettingsOverviewProps = ReviewCardProps & {
oscapKernelArgs?: string[];
oscapServices?: OscapServices;
};
const AdvancedSettingsOverview = ({
restrictions,
oscapKernelArgs = [],
oscapServices,
}: AdvancedSettingsOverviewProps) => {
const isOnPremise = useAppSelector(selectIsOnPremise);
const isImageMode = useAppSelector(selectIsImageMode);
return (
<Card>
<ReviewCardHeader
title='Advanced settings'
stepId='advanced-settings-step'
/>
<CardBody>
<ReviewList>
<Filesystem shouldHide={restrictions.filesystem.shouldHide} />
<Timezone shouldHide={restrictions.timezone.shouldHide} />
<Locale shouldHide={restrictions.locale.shouldHide} />
<Hostname shouldHide={restrictions.hostname.shouldHide} />
<Kernel
shouldHide={restrictions.kernel.shouldHide}
oscapKernelArgs={oscapKernelArgs}
/>
<Services
shouldHide={restrictions.services.shouldHide}
oscapServices={oscapServices}
/>
<Firewall shouldHide={restrictions.firewall.shouldHide} />
<Users
shouldHide={
restrictions.users.shouldHide || (isOnPremise && isImageMode)
}
/>
<Firstboot shouldHide={restrictions.firstBoot.shouldHide} />
</ReviewList>
</CardBody>
</Card>
);
};
export default AdvancedSettingsOverview;