diff --git a/x-pack/plugins/security_solution/public/graphql/introspection.json b/x-pack/plugins/security_solution/public/graphql/introspection.json index f40161ff9b4c2..84096e242cbbd 100644 --- a/x-pack/plugins/security_solution/public/graphql/introspection.json +++ b/x-pack/plugins/security_solution/public/graphql/introspection.json @@ -256,12 +256,6 @@ "type": { "kind": "ENUM", "name": "TimelineType", "ofType": null }, "defaultValue": null }, - { - "name": "templateTimelineType", - "description": "", - "type": { "kind": "ENUM", "name": "TemplateTimelineType", "ofType": null }, - "defaultValue": null - }, { "name": "status", "description": "", @@ -10981,24 +10975,6 @@ ], "possibleTypes": null }, - { - "kind": "ENUM", - "name": "TemplateTimelineType", - "description": "", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "elastic", - "description": "", - "isDeprecated": false, - "deprecationReason": null - }, - { "name": "custom", "description": "", "isDeprecated": false, "deprecationReason": null } - ], - "possibleTypes": null - }, { "kind": "OBJECT", "name": "ResponseTimelines", @@ -13166,6 +13142,24 @@ "interfaces": null, "enumValues": null, "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TemplateTimelineType", + "description": "", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "elastic", + "description": "", + "isDeprecated": false, + "deprecationReason": null + }, + { "name": "custom", "description": "", "isDeprecated": false, "deprecationReason": null } + ], + "possibleTypes": null } ], "directives": [ diff --git a/x-pack/plugins/security_solution/public/graphql/types.ts b/x-pack/plugins/security_solution/public/graphql/types.ts index d7a2535fb1f54..90d1b8bd54df5 100644 --- a/x-pack/plugins/security_solution/public/graphql/types.ts +++ b/x-pack/plugins/security_solution/public/graphql/types.ts @@ -397,11 +397,6 @@ export enum SortFieldTimeline { created = 'created', } -export enum TemplateTimelineType { - elastic = 'elastic', - custom = 'custom', -} - export enum NetworkDirectionEcs { inbound = 'inbound', outbound = 'outbound', @@ -428,6 +423,11 @@ export enum FlowDirection { biDirectional = 'biDirectional', } +export enum TemplateTimelineType { + elastic = 'elastic', + custom = 'custom', +} + export type ToStringArrayNoNullable = any; export type ToIFieldSubTypeNonNullable = any; @@ -2334,8 +2334,6 @@ export interface GetAllTimelineQueryArgs { timelineType?: Maybe; - templateTimelineType?: Maybe; - status?: Maybe; } export interface AuthenticationsSourceArgs { @@ -4435,7 +4433,6 @@ export namespace GetAllTimeline { sort?: Maybe; onlyUserFavorite?: Maybe; timelineType?: Maybe; - templateTimelineType?: Maybe; status?: Maybe; }; diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/index.tsx index 4f9784b1f84bf..9f37153941a8f 100644 --- a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/index.tsx @@ -85,7 +85,7 @@ const StatefulRecentTimelinesComponent = React.memo( const { fetchAllTimeline, timelines, loading } = useGetAllTimeline(); const timelineType = TimelineType.default; - const { templateTimelineType, timelineStatus } = useTimelineStatus({ timelineType }); + const { timelineStatus } = useTimelineStatus({ timelineType }); useEffect(() => { fetchAllTimeline({ pageInfo: { @@ -100,9 +100,8 @@ const StatefulRecentTimelinesComponent = React.memo( onlyUserFavorite: filterBy === 'favorites', status: timelineStatus, timelineType, - templateTimelineType, }); - }, [fetchAllTimeline, filterBy, timelineStatus, timelineType, templateTimelineType]); + }, [fetchAllTimeline, filterBy, timelineStatus, timelineType]); return ( <> diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx index d2ddaae47d1e3..188b8979f613c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx @@ -126,7 +126,6 @@ export const StatefulOpenTimelineComponent = React.memo( }); const { timelineStatus, - templateTimelineType, templateTimelineFilter, installPrepackagedTimelines, } = useTimelineStatus({ @@ -147,7 +146,6 @@ export const StatefulOpenTimelineComponent = React.memo( }, onlyUserFavorite: onlyFavorites, timelineType, - templateTimelineType, status: timelineStatus, }); }, [ @@ -159,7 +157,6 @@ export const StatefulOpenTimelineComponent = React.memo( sortDirection, timelineType, timelineStatus, - templateTimelineType, onlyFavorites, ]); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx index 6bea5a7b7635e..b64ca0ccc0b35 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx @@ -93,7 +93,6 @@ describe('SelectableTimeline', () => { status: null, onlyUserFavorite: false, timelineType: TimelineType.default, - templateTimelineType: null, }; beforeAll(() => { mount(); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx index 7ecbc9a53cb21..ff103aa7d2c5a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx @@ -263,7 +263,6 @@ const SelectableTimelineComponent: React.FC = ({ onlyUserFavorite: onlyFavorites, status: null, timelineType, - templateTimelineType: null, }); }, [fetchAllTimeline, onlyFavorites, pageSize, searchTimelineValue, timelineType]); diff --git a/x-pack/plugins/security_solution/public/timelines/containers/all/index.gql_query.ts b/x-pack/plugins/security_solution/public/timelines/containers/all/index.gql_query.ts index cd03e43938b44..b06f0ed4f25f7 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/all/index.gql_query.ts +++ b/x-pack/plugins/security_solution/public/timelines/containers/all/index.gql_query.ts @@ -13,7 +13,6 @@ export const allTimelinesQuery = gql` $sort: SortTimeline $onlyUserFavorite: Boolean $timelineType: TimelineType - $templateTimelineType: TemplateTimelineType $status: TimelineStatus ) { getAllTimeline( @@ -22,7 +21,6 @@ export const allTimelinesQuery = gql` sort: $sort onlyUserFavorite: $onlyUserFavorite timelineType: $timelineType - templateTimelineType: $templateTimelineType status: $status ) { totalCount diff --git a/x-pack/plugins/security_solution/public/timelines/containers/all/index.tsx b/x-pack/plugins/security_solution/public/timelines/containers/all/index.tsx index 3cf33048007e3..59d7fd6945637 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/all/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/containers/all/index.tsx @@ -26,7 +26,6 @@ import { TimelineType, TimelineTypeLiteralWithNull, TimelineStatusLiteralWithNull, - TemplateTimelineTypeLiteralWithNull, } from '../../../../common/types/timeline'; export interface AllTimelinesArgs { @@ -55,7 +54,6 @@ export interface AllTimelinesVariables { sort: SortTimeline; status: TimelineStatusLiteralWithNull; timelineType: TimelineTypeLiteralWithNull; - templateTimelineType: TemplateTimelineTypeLiteralWithNull; } export const ALL_TIMELINE_QUERY_ID = 'FETCH_ALL_TIMELINES'; @@ -121,7 +119,6 @@ export const useGetAllTimeline = (): AllTimelinesArgs => { sort, status, timelineType, - templateTimelineType, }: AllTimelinesVariables) => { let didCancel = false; const abortCtrl = new AbortController(); @@ -138,7 +135,6 @@ export const useGetAllTimeline = (): AllTimelinesArgs => { sort, status, timelineType, - templateTimelineType, }; const response = await apolloClient.query< GetAllTimeline.Query, diff --git a/x-pack/plugins/security_solution/server/graphql/timeline/resolvers.ts b/x-pack/plugins/security_solution/server/graphql/timeline/resolvers.ts index ab729bae6474d..f4a18a40f7d4b 100644 --- a/x-pack/plugins/security_solution/server/graphql/timeline/resolvers.ts +++ b/x-pack/plugins/security_solution/server/graphql/timeline/resolvers.ts @@ -54,8 +54,7 @@ export const createTimelineResolvers = ( args.search || null, args.sort || null, args.status || null, - args.timelineType || null, - args.templateTimelineType || null + args.timelineType || null ); }, }, diff --git a/x-pack/plugins/security_solution/server/graphql/timeline/schema.gql.ts b/x-pack/plugins/security_solution/server/graphql/timeline/schema.gql.ts index fce81e2f0dce0..58a13a7115b72 100644 --- a/x-pack/plugins/security_solution/server/graphql/timeline/schema.gql.ts +++ b/x-pack/plugins/security_solution/server/graphql/timeline/schema.gql.ts @@ -142,11 +142,6 @@ export const timelineSchema = gql` immutable } - enum TemplateTimelineType { - elastic - custom - } - enum RowRendererId { auditd auditd_file @@ -321,7 +316,7 @@ export const timelineSchema = gql` extend type Query { getOneTimeline(id: ID!): TimelineResult! - getAllTimeline(pageInfo: PageInfoTimeline, search: String, sort: SortTimeline, onlyUserFavorite: Boolean, timelineType: TimelineType, templateTimelineType: TemplateTimelineType, status: TimelineStatus): ResponseTimelines! + getAllTimeline(pageInfo: PageInfoTimeline, search: String, sort: SortTimeline, onlyUserFavorite: Boolean, timelineType: TimelineType, status: TimelineStatus): ResponseTimelines! } extend type Mutation { diff --git a/x-pack/plugins/security_solution/server/graphql/types.ts b/x-pack/plugins/security_solution/server/graphql/types.ts index 1e397a4e6bb6c..ca0732816aa4d 100644 --- a/x-pack/plugins/security_solution/server/graphql/types.ts +++ b/x-pack/plugins/security_solution/server/graphql/types.ts @@ -399,11 +399,6 @@ export enum SortFieldTimeline { created = 'created', } -export enum TemplateTimelineType { - elastic = 'elastic', - custom = 'custom', -} - export enum NetworkDirectionEcs { inbound = 'inbound', outbound = 'outbound', @@ -430,6 +425,11 @@ export enum FlowDirection { biDirectional = 'biDirectional', } +export enum TemplateTimelineType { + elastic = 'elastic', + custom = 'custom', +} + export type ToStringArrayNoNullable = any; export type ToIFieldSubTypeNonNullable = any; @@ -2336,8 +2336,6 @@ export interface GetAllTimelineQueryArgs { timelineType?: Maybe; - templateTimelineType?: Maybe; - status?: Maybe; } export interface AuthenticationsSourceArgs { @@ -2814,8 +2812,6 @@ export namespace QueryResolvers { timelineType?: Maybe; - templateTimelineType?: Maybe; - status?: Maybe; } } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/timelines/find_timeline_by_filter.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/timelines/find_timeline_by_filter.sh index c267b4d9f36d5..3dd8e7f1097f4 100755 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/timelines/find_timeline_by_filter.sh +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/timelines/find_timeline_by_filter.sh @@ -12,23 +12,22 @@ set -e # Uses a default if no argument is specified STATUS=${1:-active} TIMELINE_TYPE=${2:-default} -TEMPLATE_TIMELINE_TYPE=${3:-custom} # Example get all timelines: # ./timelines/find_timeline_by_filter.sh active # Example get all prepackaged timeline templates: -# ./timelines/find_timeline_by_filter.sh immutable template elastic +# ./timelines/find_timeline_by_filter.sh immutable template # Example get all custom timeline templates: -# ./timelines/find_timeline_by_filter.sh active template custom +# ./timelines/find_timeline_by_filter.sh active template curl -s -k \ -H "Content-Type: application/json" \ -H 'kbn-xsrf: 123' \ -u ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD} \ -X POST "${KIBANA_URL}${SPACE_URL}/api/solutions/security/graphql" \ - -d '{"operationName":"GetAllTimeline","variables":{"onlyUserFavorite":false,"pageInfo":{"pageIndex":1,"pageSize":10},"search":"","sort":{"sortField":"updated","sortOrder":"desc"},"status":"'$STATUS'","timelineType":"'$TIMELINE_TYPE'","templateTimelineType":"'$TEMPLATE_TIMELINE_TYPE'"},"query":"query GetAllTimeline($pageInfo: PageInfoTimeline!, $search: String, $sort: SortTimeline, $onlyUserFavorite: Boolean, $timelineType: TimelineType, $templateTimelineType: TemplateTimelineType, $status: TimelineStatus) {\n getAllTimeline(pageInfo: $pageInfo, search: $search, sort: $sort, onlyUserFavorite: $onlyUserFavorite, timelineType: $timelineType, templateTimelineType: $templateTimelineType, status: $status) {\n totalCount\n defaultTimelineCount\n templateTimelineCount\n elasticTemplateTimelineCount\n customTemplateTimelineCount\n favoriteCount\n timeline {\n savedObjectId\n description\n favorite {\n fullName\n userName\n favoriteDate\n __typename\n }\n eventIdToNoteIds {\n eventId\n note\n timelineId\n noteId\n created\n createdBy\n timelineVersion\n updated\n updatedBy\n version\n __typename\n }\n notes {\n eventId\n note\n timelineId\n timelineVersion\n noteId\n created\n createdBy\n updated\n updatedBy\n version\n __typename\n }\n noteIds\n pinnedEventIds\n status\n title\n timelineType\n templateTimelineId\n templateTimelineVersion\n created\n createdBy\n updated\n updatedBy\n version\n __typename\n }\n __typename\n }\n}\n"}' \ + -d '{"operationName":"GetAllTimeline","variables":{"onlyUserFavorite":false,"pageInfo":{"pageIndex":1,"pageSize":10},"search":"","sort":{"sortField":"updated","sortOrder":"desc"},"status":"'$STATUS'","timelineType":"'$TIMELINE_TYPE'"},"query":"query GetAllTimeline($pageInfo: PageInfoTimeline!, $search: String, $sort: SortTimeline, $onlyUserFavorite: Boolean, $timelineType: TimelineType, $status: TimelineStatus) {\n getAllTimeline(pageInfo: $pageInfo, search: $search, sort: $sort, onlyUserFavorite: $onlyUserFavorite, timelineType: $timelineType, status: $status) {\n totalCount\n defaultTimelineCount\n templateTimelineCount\n elasticTemplateTimelineCount\n customTemplateTimelineCount\n favoriteCount\n timeline {\n savedObjectId\n description\n favorite {\n fullName\n userName\n favoriteDate\n __typename\n }\n eventIdToNoteIds {\n eventId\n note\n timelineId\n noteId\n created\n createdBy\n timelineVersion\n updated\n updatedBy\n version\n __typename\n }\n notes {\n eventId\n note\n timelineId\n timelineVersion\n noteId\n created\n createdBy\n updated\n updatedBy\n version\n __typename\n }\n noteIds\n pinnedEventIds\n status\n title\n timelineType\n templateTimelineId\n templateTimelineVersion\n created\n createdBy\n updated\n updatedBy\n version\n __typename\n }\n __typename\n }\n}\n"}' \ | jq . diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/timelines/get_all_timelines.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/timelines/get_all_timelines.sh index f58632c7cbbe3..335d1b8c86696 100755 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/timelines/get_all_timelines.sh +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/timelines/get_all_timelines.sh @@ -29,9 +29,8 @@ curl -s -k \ "sortOrder": "desc" }, "status": "active", - "timelineType": null, - "templateTimelineType": null + "timelineType": null }, - "query": "query GetAllTimeline($pageInfo: PageInfoTimeline!, $search: String, $sort: SortTimeline, $onlyUserFavorite: Boolean, $timelineType: TimelineType, $templateTimelineType: TemplateTimelineType, $status: TimelineStatus) {\n getAllTimeline(pageInfo: $pageInfo, search: $search, sort: $sort, onlyUserFavorite: $onlyUserFavorite, timelineType: $timelineType, templateTimelineType: $templateTimelineType, status: $status) {\n totalCount\n defaultTimelineCount\n templateTimelineCount\n elasticTemplateTimelineCount\n customTemplateTimelineCount\n favoriteCount\n timeline {\n savedObjectId\n description\n favorite {\n fullName\n userName\n favoriteDate\n __typename\n }\n eventIdToNoteIds {\n eventId\n note\n timelineId\n noteId\n created\n createdBy\n timelineVersion\n updated\n updatedBy\n version\n __typename\n }\n notes {\n eventId\n note\n timelineId\n timelineVersion\n noteId\n created\n createdBy\n updated\n updatedBy\n version\n __typename\n }\n noteIds\n pinnedEventIds\n status\n title\n timelineType\n templateTimelineId\n templateTimelineVersion\n created\n createdBy\n updated\n updatedBy\n version\n __typename\n }\n __typename\n }\n}\n" + "query": "query GetAllTimeline($pageInfo: PageInfoTimeline!, $search: String, $sort: SortTimeline, $onlyUserFavorite: Boolean, $timelineType: TimelineType, $status: TimelineStatus) {\n getAllTimeline(pageInfo: $pageInfo, search: $search, sort: $sort, onlyUserFavorite: $onlyUserFavorite, timelineType: $timelineType, status: $status) {\n totalCount\n defaultTimelineCount\n templateTimelineCount\n elasticTemplateTimelineCount\n customTemplateTimelineCount\n favoriteCount\n timeline {\n savedObjectId\n description\n favorite {\n fullName\n userName\n favoriteDate\n __typename\n }\n eventIdToNoteIds {\n eventId\n note\n timelineId\n noteId\n created\n createdBy\n timelineVersion\n updated\n updatedBy\n version\n __typename\n }\n notes {\n eventId\n note\n timelineId\n timelineVersion\n noteId\n created\n createdBy\n updated\n updatedBy\n version\n __typename\n }\n noteIds\n pinnedEventIds\n status\n title\n timelineType\n templateTimelineId\n templateTimelineVersion\n created\n createdBy\n updated\n updatedBy\n version\n __typename\n }\n __typename\n }\n}\n" }' | jq . diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object.ts index b50195219f993..6bc0ca64ae33f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object.ts @@ -16,8 +16,6 @@ import { TimelineTypeLiteralWithNull, ExportTimelineNotFoundError, TimelineStatusLiteralWithNull, - TemplateTimelineTypeLiteralWithNull, - TemplateTimelineType, } from '../../../common/types/timeline'; import { ResponseTimeline, @@ -69,8 +67,7 @@ export interface Timeline { search: string | null, sort: SortTimeline | null, status: TimelineStatusLiteralWithNull, - timelineType: TimelineTypeLiteralWithNull, - templateTimelineType: TemplateTimelineTypeLiteralWithNull + timelineType: TimelineTypeLiteralWithNull ) => Promise; persistFavorite: ( @@ -121,7 +118,6 @@ export const getTimelineByTemplateTimelineId = async ( * which has no timelineType exists in the savedObject */ const getTimelineTypeFilter = ( timelineType: TimelineTypeLiteralWithNull, - templateTimelineType: TemplateTimelineTypeLiteralWithNull, status: TimelineStatusLiteralWithNull ) => { const typeFilter = @@ -149,14 +145,7 @@ const getTimelineTypeFilter = ( ? `siem-ui-timeline.attributes.status: ${TimelineStatus.immutable}` : `not siem-ui-timeline.attributes.status: ${TimelineStatus.immutable}`; - const templateTimelineTypeFilter = - templateTimelineType == null - ? null - : templateTimelineType === TemplateTimelineType.elastic - ? `siem-ui-timeline.attributes.createdBy: "Elastic"` - : `not siem-ui-timeline.attributes.createdBy: "Elastic"`; - - const filters = [typeFilter, draftFilter, immutableFilter, templateTimelineTypeFilter]; + const filters = [typeFilter, draftFilter, immutableFilter]; return filters.filter((f) => f != null).join(' and '); }; @@ -177,11 +166,7 @@ export const getExistingPrepackagedTimelines = async ( const elasticTemplateTimelineOptions = { type: timelineSavedObjectType, ...queryPageInfo, - filter: getTimelineTypeFilter( - TimelineType.template, - TemplateTimelineType.elastic, - TimelineStatus.immutable - ), + filter: getTimelineTypeFilter(TimelineType.template, TimelineStatus.immutable), }; return getAllSavedTimeline(request, elasticTemplateTimelineOptions); @@ -194,8 +179,7 @@ export const getAllTimeline = async ( search: string | null, sort: SortTimeline | null, status: TimelineStatusLiteralWithNull, - timelineType: TimelineTypeLiteralWithNull, - templateTimelineType: TemplateTimelineTypeLiteralWithNull + timelineType: TimelineTypeLiteralWithNull ): Promise => { const options: SavedObjectsFindOptions = { type: timelineSavedObjectType, @@ -205,7 +189,7 @@ export const getAllTimeline = async ( searchFields: onlyUserFavorite ? ['title', 'description', 'favorite.keySearch'] : ['title', 'description'], - filter: getTimelineTypeFilter(timelineType, templateTimelineType, status), + filter: getTimelineTypeFilter(timelineType, status), sortField: sort != null ? sort.sortField : undefined, sortOrder: sort != null ? sort.sortOrder : undefined, }; @@ -214,25 +198,21 @@ export const getAllTimeline = async ( type: timelineSavedObjectType, perPage: 1, page: 1, - filter: getTimelineTypeFilter(TimelineType.default, null, TimelineStatus.active), + filter: getTimelineTypeFilter(TimelineType.default, TimelineStatus.active), }; const templateTimelineOptions = { type: timelineSavedObjectType, perPage: 1, page: 1, - filter: getTimelineTypeFilter(TimelineType.template, null, null), + filter: getTimelineTypeFilter(TimelineType.template, null), }; const customTemplateTimelineOptions = { type: timelineSavedObjectType, perPage: 1, page: 1, - filter: getTimelineTypeFilter( - TimelineType.template, - TemplateTimelineType.custom, - TimelineStatus.active - ), + filter: getTimelineTypeFilter(TimelineType.template, TimelineStatus.active), }; const favoriteTimelineOptions = { @@ -240,7 +220,7 @@ export const getAllTimeline = async ( searchFields: ['title', 'description', 'favorite.keySearch'], perPage: 1, page: 1, - filter: getTimelineTypeFilter(timelineType, null, TimelineStatus.active), + filter: getTimelineTypeFilter(timelineType, TimelineStatus.active), }; const result = await Promise.all([ @@ -269,11 +249,7 @@ export const getDraftTimeline = async ( const options: SavedObjectsFindOptions = { type: timelineSavedObjectType, perPage: 1, - filter: getTimelineTypeFilter( - timelineType, - timelineType === TimelineType.template ? TemplateTimelineType.custom : null, - TimelineStatus.draft - ), + filter: getTimelineTypeFilter(timelineType, TimelineStatus.draft), sortField: 'created', sortOrder: 'desc', }; @@ -567,7 +543,6 @@ export const getTimelines = async (request: FrameworkRequest, timelineIds?: stri null, null, TimelineStatus.active, - null, null ); exportedIds = savedAllTimelines.map((t) => t.savedObjectId);