-
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.
[Synthetics] introduce new spaces field for synthetics api keys (#211816
) ### Summary - Resolves #211049 - Adds the ability for a user to create an API Key in synthetics settings that applies to specified space(s) - Reuses existing spaces combo box from private locations, enhances the component to incorporate a generic interface and help text prop to enable additional uses - Modifies functionality of Generate API Key button to consider a blank spaces field before creating the key - Currently, in private locations, if the spaces field is blank, the save button has no functionality, so this was copied here.   ### Release Notes Adds the ability for a user to create an API Key in synthetics settings that applies only to specified space(s) --------- Co-authored-by: Shahzad <shahzad31comp@gmail.com>
- Loading branch information
1 parent
ef2ec69
commit de7d33d
Showing
10 changed files
with
153 additions
and
88 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
x-pack/solutions/observability/plugins/synthetics/common/runtime_types/settings/api_key.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,14 @@ | ||
/* | ||
* 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 * as t from 'io-ts'; | ||
|
||
export const APIKeyCodec = t.type({ | ||
spaces: t.array(t.string), | ||
}); | ||
|
||
export type SyntheticsProjectAPIKey = t.TypeOf<typeof APIKeyCodec>; |
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
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.