forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[9.0] [Synthetics] introduce new spaces field for synthetics api keys (…
…elastic#211816) (elastic#212150) # Backport This will backport the following commits from `main` to `9.0`: - [[Synthetics] introduce new spaces field for synthetics api keys (elastic#211816)](elastic#211816) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Bailey Cash","email":"bailey.cash@elastic.co"},"sourceCommit":{"committedDate":"2025-02-21T19:25:54Z","message":"[Synthetics] introduce new spaces field for synthetics api keys (elastic#211816)\n\n### Summary\n\n- Resolves elastic#211049\n- Adds the ability for a user to create an API Key in synthetics\nsettings that applies to specified space(s)\n- Reuses existing spaces combo box from private locations, enhances the\ncomponent to incorporate a generic interface and help text prop to\nenable additional uses\n- Modifies functionality of Generate API Key button to consider a blank\nspaces field before creating the key\n- Currently, in private locations, if the spaces field is blank, the\nsave button has no functionality, so this was copied here.\n\n\n\n\n\n### Release Notes\nAdds the ability for a user to create an API Key in synthetics settings\nthat applies only to specified space(s)\n\n---------\n\nCo-authored-by: Shahzad <shahzad31comp@gmail.com>","sha":"de7d33dec296a491ae9abd9f3b74859c0c8e78c7","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v9.0.0","backport:prev-minor","Team:obs-ux-management","v9.1.0","v8.19.0"],"title":"[Synthetics] introduce new spaces field for synthetics api keys","number":211816,"url":"https://github.com/elastic/kibana/pull/211816","mergeCommit":{"message":"[Synthetics] introduce new spaces field for synthetics api keys (elastic#211816)\n\n### Summary\n\n- Resolves elastic#211049\n- Adds the ability for a user to create an API Key in synthetics\nsettings that applies to specified space(s)\n- Reuses existing spaces combo box from private locations, enhances the\ncomponent to incorporate a generic interface and help text prop to\nenable additional uses\n- Modifies functionality of Generate API Key button to consider a blank\nspaces field before creating the key\n- Currently, in private locations, if the spaces field is blank, the\nsave button has no functionality, so this was copied here.\n\n\n\n\n\n### Release Notes\nAdds the ability for a user to create an API Key in synthetics settings\nthat applies only to specified space(s)\n\n---------\n\nCo-authored-by: Shahzad <shahzad31comp@gmail.com>","sha":"de7d33dec296a491ae9abd9f3b74859c0c8e78c7"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211816","number":211816,"mergeCommit":{"message":"[Synthetics] introduce new spaces field for synthetics api keys (elastic#211816)\n\n### Summary\n\n- Resolves elastic#211049\n- Adds the ability for a user to create an API Key in synthetics\nsettings that applies to specified space(s)\n- Reuses existing spaces combo box from private locations, enhances the\ncomponent to incorporate a generic interface and help text prop to\nenable additional uses\n- Modifies functionality of Generate API Key button to consider a blank\nspaces field before creating the key\n- Currently, in private locations, if the spaces field is blank, the\nsave button has no functionality, so this was copied here.\n\n\n\n\n\n### Release Notes\nAdds the ability for a user to create an API Key in synthetics settings\nthat applies only to specified space(s)\n\n---------\n\nCo-authored-by: Shahzad <shahzad31comp@gmail.com>","sha":"de7d33dec296a491ae9abd9f3b74859c0c8e78c7"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Bailey Cash <bailey.cash@elastic.co>
- Loading branch information
1 parent
7711ae2
commit b8a0cef
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.