Skip to content

Commit

Permalink
update typing
Browse files Browse the repository at this point in the history
  • Loading branch information
yctercero committed Jun 9, 2020
1 parent 6027cbb commit 2f8eb18
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
*/
import { ReactNode } from 'react';

import { NamespaceType, ExceptionList } from '../../../lists_plugin_deps';
import {
NamespaceType,
ExceptionList,
ExceptionListItemSchema as ExceptionItem,
} from '../../../lists_plugin_deps';

export interface OperatorOption {
message: string;
Expand Down Expand Up @@ -77,7 +81,7 @@ export interface Filter {

export interface SetExceptionsProps {
lists: ExceptionList[];
exceptions: ExceptionListItemSchema[];
exceptions: ExceptionItem[];
pagination: Pagination;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const ExceptionsViewerComponent = ({
dispatch,
] = useReducer(allExceptionItemsReducer(), initialState);

// TODO: Update icky typing once api updated
const setExceptions = useCallback(
({
lists: newLists,
Expand All @@ -137,7 +138,7 @@ const ExceptionsViewerComponent = ({
dispatch({
type: 'setExceptions',
lists: newLists,
exceptions: newExceptions,
exceptions: (newExceptions as unknown) as ExceptionListItemSchema[],
pagination: newPagination,
});
},
Expand Down Expand Up @@ -274,13 +275,13 @@ const ExceptionsViewerComponent = ({
if (filterOptions.showEndpointList) {
return (
<FormattedMessage
id="xpack.siem.exceptions.viewer.exceptionEndpointDetailsDescription"
id="xpack.securitySolution.exceptions.viewer.exceptionEndpointDetailsDescription"
defaultMessage="All exceptions to this rule are applied to the endpoint and the detection rule. View {ruleSettings} for more details."
values={{
ruleSettings: (
<EuiLink href={ruleSettingsUrl} target="_blank">
<FormattedMessage
id="xpack.siem.exceptions.viewer.exceptionEndpointDetailsDescription.ruleSettingsLink"
id="xpack.securitySolution.exceptions.viewer.exceptionEndpointDetailsDescription.ruleSettingsLink"
defaultMessage="rule settings"
/>
</EuiLink>
Expand All @@ -291,13 +292,13 @@ const ExceptionsViewerComponent = ({
} else if (filterOptions.showDetectionsList) {
return (
<FormattedMessage
id="xpack.siem.exceptions.viewer.exceptionDetectionDetailsDescription"
id="xpack.securitySolution.exceptions.viewer.exceptionDetectionDetailsDescription"
defaultMessage="All exceptions to this rule are applied to the detection rule, not the endpoint. View {ruleSettings} for more details."
values={{
ruleSettings: (
<EuiLink href={ruleSettingsUrl} target="_blank">
<FormattedMessage
id="xpack.siem.exceptions.viewer.exceptionDetectionDetailsDescription.ruleSettingsLink"
id="xpack.securitySolution.exceptions.viewer.exceptionDetectionDetailsDescription.ruleSettingsLink"
defaultMessage="rule settings"
/>
</EuiLink>
Expand Down

0 comments on commit 2f8eb18

Please sign in to comment.