Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] fix edit rule for detections (#56333) #56405

Merged
merged 1 commit into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ export const RedirectToEditRulePage = ({
location: { search },
}: DetectionEngineComponentProps) => {
return (
<RedirectWrapper
to={`/${DETECTION_ENGINE_PAGE_NAME}/rules/rule-details/${detailName}${search}/edit`}
/>
<RedirectWrapper to={`/${DETECTION_ENGINE_PAGE_NAME}/rules/id/${detailName}/edit${search}`} />
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ export const duplicateRules = async ({ rules }: DuplicateRulesProps): Promise<Ru
immutable: undefined,
last_success_at: undefined,
last_success_message: undefined,
last_failure_at: undefined,
last_failure_message: undefined,
status: undefined,
status_date: undefined,
}))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const getDescriptionItem = (
indexPatterns?: IIndexPattern
): ListItems[] => {
if (field === 'queryBar') {
const filters = addFilterStateIfNotThere(get('queryBar.filters', value));
const filters = addFilterStateIfNotThere(get('queryBar.filters', value) ?? []);
const query = get('queryBar.query', value) as Query;
const savedId = get('queryBar.saved_id', value);
return buildQueryBarDescription({
Expand Down