-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Fleet] Support new subscription and license fields #137799
Conversation
Pinging @elastic/fleet (Team:Fleet) |
type: string | ||
enum: | ||
- Apache-2.0 | ||
- Elastic-2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these the only possible values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -392,3 +392,15 @@ export function getNoticePath(paths: string[]): string | undefined { | |||
|
|||
return undefined; | |||
} | |||
|
|||
export function getLicensePath(paths: string[]): string | undefined { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice to unit test this function
// Simulate a long text while loading | ||
<> | ||
<p> | ||
<EuiLoadingContent lines={5} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i copied this from the notice_modal that we already had in the same directory... can't take too much credit :D
<EuiModal maxWidth={true} onClose={onClose}> | ||
<EuiModalHeader> | ||
<EuiModalHeaderTitle> | ||
<h1>LICENSE.txt</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we display the file name from license field, I think it is not always LICENSE.txt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the file is always LICENSE.txt but yes we should display the name of the license instead (like Apache 2.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added a few comments
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
History
To update your PR or re-run it, just comment with: cc @jen-huang |
Summary
Part of elastic/package-spec#298. This PR adds support for the new
source.license
andconditions.elastic.subscription
fields in packages:source.license
is a new field containing the name of the license of the package, i.e.Apache 2.0
LICENSE.txt
file lives at the root of the package. This PR adjusts the package info endpoint to return the path to the license file. The package details UI surfaces the license contents in a modalconditions.elastic.subscription
is a field reflecting the necessary Elastic subscription needed to install the package, it replaced the now deprecated top-levellicense
fieldlicense
when the new field is not availableTesting
elastic-package
to buildgood
packagegood
package to{package registry root}/testdata/package
good
package and verify that subscription and license information exists. Check details of any other package and verify that subscription details are as expected.Screenshots