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

Saved object management - add plugin contract functionality for displaying SO relationships in other management screens #132466

Closed
mattkime opened this issue May 18, 2022 · 4 comments
Labels
Feature:Saved Objects Management Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@mattkime
Copy link
Contributor

This topic is drawn from #132385 - displaying SO relationships in data view management

There are two questions data view management would like to answer for users - Are there any saved objects using a particular data view? Which saved objects depend upon a given data view? These questions are important when considering the impact of data view changes and removal.

I assume there are other saved objects which have a similar relationship to other saved objects although I'm not sure what they are. Data views are uniquely central to kibana.

While this information is available in saved object management, its not where people go when managing data views. The info is much more useful in the correct context.

Much of the behavior between the general SO relationship viewer and the data view specific version is basically identical therefore some shared code is expected -

APIs (on plugin contract)

  • getAllowedTypes
  • getRelationships

Functions (via import)

  • getSavedObjectLabel
  • getDefaultTitle

Types

  • SavedObjectManagementTypeInfo

There are a number of ways this problem could be solved. I'm aiming for something that is relatively quick and simple rather than aiming for an ideal implementation. We could reevaluate later if more specific instances of relationship display are created.

@botelastic botelastic bot added the needs-team Issues missing a team label label May 18, 2022
@mattkime mattkime added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label May 18, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@botelastic botelastic bot removed the needs-team Issues missing a team label label May 18, 2022
@pgayvallet
Copy link
Contributor

pgayvallet commented May 18, 2022

Use some of the currently internal SOM features by exposing them from the SOM plugin contract

No objection, glad to allow the SO management APIs to be used elsewhere.

exporting some static utility functions

I have no problem exposing utils such as getSavedObjectLabel, but with the global package architecture coming, we should ihmo avoid exposing static exports and always using plugin contracts instead (or create a package, but that probably don't make much sense here). Would it be fine if those utils were exposed from the contract instead, as for the APIs listed previously?

types

All types used by the exposed contract will for sure be exported too.

BTW, you're planning on re-implementing the UI components used to display the relationships on your page? It's not the best in term of re-usability, but realistically given the state of the code of the SOM UI components, that's the quickest and easiest for sure.

@mattkime
Copy link
Contributor Author

Would it be fine if those utils were exposed from the contract instead

👍

BTW, you're planning on re-implementing the UI components used to display the relationships on your page? It's not the best in term of re-usability, but realistically given the state of the code of the SOM UI components, that's the quickest and easiest for sure.

Yeah, right now quick and easy works for me. I could see some sort of shared component being created for this but we could do that later if we see the need.

@mattkime
Copy link
Contributor Author

Closing this as it was implemented as part of #132385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Saved Objects Management Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

3 participants