-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
9e19d91
commit 6c4651c
Showing
10 changed files
with
1,650 additions
and
57 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
41 changes: 41 additions & 0 deletions
41
...gins/enterprise_search/public/applications/app_search/components/credentials/constants.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,41 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const ADMIN = 'admin'; | ||
export const PRIVATE = 'private'; | ||
export const SEARCH = 'search'; | ||
|
||
export const TOKEN_TYPE_DESCRIPTION = { | ||
[SEARCH]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.search.description', { | ||
defaultMessage: 'Public Search Keys are used for search endpoints only.', | ||
}), | ||
[PRIVATE]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.private.description', { | ||
defaultMessage: | ||
'Private API Keys are used for read and/or write access on one or more Engines.', | ||
}), | ||
[ADMIN]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.admin.description', { | ||
defaultMessage: 'Private Admin Keys are used to interact with the Credentials API.', | ||
}), | ||
}; | ||
|
||
export const TOKEN_TYPE_DISPLAY_NAMES = { | ||
[SEARCH]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.search.name', { | ||
defaultMessage: 'Public Search Key', | ||
}), | ||
[PRIVATE]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.private.name', { | ||
defaultMessage: 'Private API Key', | ||
}), | ||
[ADMIN]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.admin.name', { | ||
defaultMessage: 'Private Admin Key', | ||
}), | ||
}; | ||
|
||
export const TOKEN_TYPE_INFO = [ | ||
{ value: SEARCH, text: TOKEN_TYPE_DISPLAY_NAMES[SEARCH] }, | ||
{ value: PRIVATE, text: TOKEN_TYPE_DISPLAY_NAMES[PRIVATE] }, | ||
{ value: ADMIN, text: TOKEN_TYPE_DISPLAY_NAMES[ADMIN] }, | ||
]; |
Oops, something went wrong.