-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into issue_156630
- Loading branch information
Showing
110 changed files
with
2,990 additions
and
2,691 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
...nterprise_search/public/applications/applications/api/engines/delete_engines_api_logic.ts
This file was deleted.
Oops, something went wrong.
34 changes: 0 additions & 34 deletions
34
...public/applications/applications/api/engines/fetch_engine_field_capabilities_api_logic.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
.../applications/applications/api/search_applications/delete_search_application_api_logic.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
import { Actions, createApiLogic } from '../../../shared/api_logic/create_api_logic'; | ||
import { HttpLogic } from '../../../shared/http'; | ||
|
||
export interface DeleteSearchApplicationApiLogicArguments { | ||
searchApplicationName: string; | ||
} | ||
export interface DeleteSearchApplicationApiLogicResponse { | ||
searchApplicationName: string; | ||
} | ||
|
||
export const deleteSearchApplication = async ({ | ||
searchApplicationName, | ||
}: DeleteSearchApplicationApiLogicArguments): Promise<DeleteSearchApplicationApiLogicResponse> => { | ||
const route = `/internal/enterprise_search/search_applications/${searchApplicationName}`; | ||
await HttpLogic.values.http.delete<DeleteSearchApplicationApiLogicResponse>(route); | ||
return { searchApplicationName }; | ||
}; | ||
export const DeleteSearchApplicationAPILogic = createApiLogic( | ||
['search_applications', 'delete_search_application_api_logic'], | ||
deleteSearchApplication, | ||
{ | ||
showSuccessFlashFn: ({ searchApplicationName }) => | ||
i18n.translate( | ||
'xpack.enterpriseSearch.searchApplications.list.deleteSearchApplication.successToast.title', | ||
{ | ||
defaultMessage: '{searchApplicationName} has been deleted', | ||
values: { | ||
searchApplicationName, | ||
}, | ||
} | ||
), | ||
} | ||
); | ||
|
||
export type DeleteSearchApplicationApiLogicActions = Actions< | ||
DeleteSearchApplicationApiLogicArguments, | ||
DeleteSearchApplicationApiLogicResponse | ||
>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.