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

[Asset Manager] Create TS assetClient (server and browser), add methods for getting host assets #167075

Closed
Tracked by #154078 ...
jasonrhodes opened this issue Sep 22, 2023 · 1 comment · Fixed by #167191
Assignees
Labels
Feature:Asset Manager Team:Observed Asset Management Label used for engineers working on various parts of observed asset management

Comments

@jasonrhodes
Copy link
Member

jasonrhodes commented Sep 22, 2023

Acceptance Criteria

  • assetsClient available to dependees, on server and browser
  • assetsClient.getHosts method exists (accepting the same parameters as the associated REST API)
  • assetsClient.getHost method exists (accepting the same parameters as the associated REST API) pushed to later
  • Plugin docs updated to reflect new API availability
  • Plugin docs updated to reflect all available configurations for this plugin, introduced in the past few weeks

Notes:

  • server client should be used by the REST API endpoints
  • browser client will internally call the REST API endpoints
@jasonrhodes jasonrhodes added Team:Observed Asset Management Label used for engineers working on various parts of observed asset management Feature:Asset Manager labels Sep 22, 2023
@jasonrhodes jasonrhodes self-assigned this Sep 22, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/observability-asset-management (Team:Observed Asset Management)

@jasonrhodes jasonrhodes changed the title [Asset Manager] Create TS method (server and client) for getting host assets [Asset Manager] Create TS assetClient (server and browser), add methods for getting host assets Sep 22, 2023
jasonrhodes added a commit that referenced this issue Sep 28, 2023
…c plugins (#167191)

Closes #167075 

## Summary

Adds a public asset client available in the `setup` lifecycle hook for
plugins that depend on this one. `getHosts` is the only method available
on this client for now.

TODO, before merge:
- [x] Add docs for the server client
- [x] Add docs for the public client
- [x] Remove REST docs from plugin docs, not needed
- [x] Add unit tests for public client


### Testing this PR

One way of testing this new client is to apply the attached
test-assets.patch file locally, adjust the date range in the getHosts
query that is added in the infra plugin, and then start Kibana and
navigate to the infra app. You should see print out in the browser
console.


[test-assets.patch](https://github.com/elastic/kibana/files/12718693/test-assets.patch)

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Asset Manager Team:Observed Asset Management Label used for engineers working on various parts of observed asset management
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants