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

[Enterprise Search] Added Logic for the Credentials View #77626

Merged
merged 35 commits into from
Sep 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7641d56
Add Logic for the Credentials View
JasonStoltz Sep 16, 2020
91392ae
TS fixes
JasonStoltz Sep 17, 2020
3e1fe7d
Removed keyHelpText
JasonStoltz Sep 21, 2020
1fa29d5
Whitespace adjustments in credentials test
JasonStoltz Sep 21, 2020
d1c2444
Removed apiUrl from credentials logic
JasonStoltz Sep 21, 2020
8ba4cee
Prefer arrow syntax and inlined declarations
JasonStoltz Sep 21, 2020
b2eec73
Removed unused code
JasonStoltz Sep 21, 2020
b8a77a2
Removed unused apiTokenSort
JasonStoltz Sep 21, 2020
b6d0fb5
Removed TODOs about flashMessages
JasonStoltz Sep 21, 2020
08ab4f7
Fixed bad delete route
JasonStoltz Sep 21, 2020
33cc9d5
Move credentials constants to /credentials
JasonStoltz Sep 21, 2020
c80e0c8
Moved format_api_name
JasonStoltz Sep 21, 2020
18dd7ef
Apply suggestions from code review
JasonStoltz Sep 21, 2020
844f6e2
Apply suggestions from code review
JasonStoltz Sep 21, 2020
0ede789
Merge branch 'master' into credentials-logic
JasonStoltz Sep 21, 2020
77e519b
Suggestion edits and error handling
JasonStoltz Sep 22, 2020
4ff917d
Updated formatApiName tests
JasonStoltz Sep 22, 2020
c715de8
Updated formatApiName implementation
JasonStoltz Sep 22, 2020
a0d519e
Prefer arrow syntax in flushPromises
JasonStoltz Sep 22, 2020
fb3d159
Accepted suggestions for constants file
JasonStoltz Sep 22, 2020
75eb3c4
Moved types to public
JasonStoltz Sep 22, 2020
a83ca06
Create ITokenReadWrite type
JasonStoltz Sep 22, 2020
9111c36
Removed unnecessary comment
JasonStoltz Sep 22, 2020
6347c61
Removed 'Should not change tests'
JasonStoltz Sep 22, 2020
b7349e5
Dry up tests
JasonStoltz Sep 22, 2020
4e1d616
Revert "Dry up tests"
JasonStoltz Sep 23, 2020
c58121b
Changed the meta type to Partial<IMeta>
JasonStoltz Sep 23, 2020
175198d
Adjusted space for consistency and readability
JasonStoltz Sep 23, 2020
585f6e6
Removed flushPromise
JasonStoltz Sep 24, 2020
5a46c08
PR Feedback and Coverage
JasonStoltz Sep 24, 2020
1cd6812
Loosened up test types
JasonStoltz Sep 24, 2020
defa75f
Moved ICredentialsDetails
JasonStoltz Sep 24, 2020
a7db3ed
Merge branch 'master' into credentials-logic
JasonStoltz Sep 24, 2020
7422f90
Moved IApiToken type
JasonStoltz Sep 24, 2020
5437fbd
Moved error expectations
JasonStoltz Sep 24, 2020
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
11 changes: 11 additions & 0 deletions x-pack/plugins/enterprise_search/common/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,14 @@ export interface IConfiguredLimits {
appSearch: IAppSearchConfiguredLimits;
workplaceSearch: IWorkplaceSearchConfiguredLimits;
}

export interface IMetaPage {
current: number;
size: number;
total_pages: number;
total_results: number;
}

export interface IMeta {
page: IMetaPage;
}
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] },
];
Loading