Skip to content

Commit

Permalink
code review comments (ash)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-tavares committed Jul 12, 2023
1 parent 9b1e5a9 commit 312ebc2
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { useTestIdGenerator } from '../../../../../../hooks/use_test_id_generator';
import { SettingCard } from '../setting_card';
import { NotifyUserOption } from '../notify_user_option';
import { DetectPreventProtectionLevel } from '../detect_prevent_protection_lavel';
import { DetectPreventProtectionLevel } from '../detect_prevent_protection_level';
import { ProtectionSettingCardSwitch } from '../protection_setting_card_switch';
import type { Immutable } from '../../../../../../../../common/endpoint/types';
import { PolicyOperatingSystem } from '../../../../../../../../common/endpoint/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import type { MalwareProtectionOSes } from '../../../../types';
import { LinkToApp } from '../../../../../../../common/components/endpoint/link_to_app';
import type { ProtectionSettingCardSwitchProps } from '../protection_setting_card_switch';
import { ProtectionSettingCardSwitch } from '../protection_setting_card_switch';
import { DetectPreventProtectionLevel } from '../detect_prevent_protection_lavel';
import { DetectPreventProtectionLevel } from '../detect_prevent_protection_level';
import { useTestIdGenerator } from '../../../../../../hooks/use_test_id_generator';

const BLOCKLIST_ENABLED_LABEL = i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { EuiCallOut, EuiSpacer } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { useTestIdGenerator } from '../../../../../../hooks/use_test_id_generator';
import { NotifyUserOption } from '../notify_user_option';
import { DetectPreventProtectionLevel } from '../detect_prevent_protection_lavel';
import { DetectPreventProtectionLevel } from '../detect_prevent_protection_level';
import { ProtectionSettingCardSwitch } from '../protection_setting_card_switch';
import { SettingLockedCard } from '../setting_locked_card';
import type { Immutable } from '../../../../../../../../common/endpoint/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { useTestIdGenerator } from '../../../../../../hooks/use_test_id_generator';
import { ProtectionSettingCardSwitch } from '../protection_setting_card_switch';
import { NotifyUserOption } from '../notify_user_option';
import { DetectPreventProtectionLevel } from '../detect_prevent_protection_lavel';
import { DetectPreventProtectionLevel } from '../detect_prevent_protection_level';
import { SettingCard } from '../setting_card';
import type { PolicyFormComponentCommonProps } from '../../types';
import type { Immutable } from '../../../../../../../../common/endpoint/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const DetectPreventProtectionLevel = memo<DetectPreventProtectionLavelPro
const isEditMode = mode === 'edit';
const getTestId = useTestIdGenerator(dataTestSubj);

// FIXME:PT remove this. Make it module global const
const radios: Immutable<
Array<{
id: ProtectionModes;
Expand Down Expand Up @@ -170,10 +169,8 @@ const ProtectionRadio = React.memo(
onChange({ isValid: true, updatedPolicy: newPayload });
}, [isPlatinumPlus, onChange, osList, policy, protection, protectionMode]);

// FIXME:PT Why is this className being used below? can it be removed?
return (
<EuiRadio
className="policyDetailsProtectionRadio"
label={label}
id={radioButtonId}
checked={selected === protectionMode}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const PolicySettingsForm = memo<PolicySettingsFormProps>((props) => {
});
PolicySettingsForm.displayName = 'PolicySettingsForm';

export const FormSectionTitle = memo(({ children }) => {
const FormSectionTitle = memo(({ children }) => {
return (
<EuiText size="xs" color="subdued">
<h4>{children}</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import type { PolicyConfig } from '../../../../../../common/endpoint/types';
export interface PolicyFormComponentCommonProps {
policy: PolicyConfig;
onChange: (options: { isValid: boolean; updatedPolicy: PolicyConfig }) => void;
mode?: 'edit' | 'view';
mode: 'edit' | 'view';
'data-test-subj'?: string;
}

0 comments on commit 312ebc2

Please sign in to comment.