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

[Feature Anywhere] Add a augment-vis saved object type #2893

Closed
7 tasks
ohltyler opened this issue Nov 18, 2022 · 1 comment · Fixed by #3109
Closed
7 tasks

[Feature Anywhere] Add a augment-vis saved object type #2893

ohltyler opened this issue Nov 18, 2022 · 1 comment · Fixed by #3109
Assignees

Comments

@ohltyler
Copy link
Member

ohltyler commented Nov 18, 2022

As part of #2880, we propose to create a new saved object type called augment-vis. The purpose of this new type will be to store the relationships between a plugin resource (e.g., anomaly detector or alerting monitor) to a visualization. The main components/fields include:

  1. Plugin resource ID (e.g., detector id)
  2. A reference to a vis_layer expression function, including the name of the function and the args needed (for more details on this expression function, see [Feature Anywhere] Add a vis_layers expression function type #2894)
  3. A reference to the visualization that can be stored in the references field.

To create and register this new type, we can do the following:
Client/public-side:

  • Create a saved object class that extends SavedObjectClass
  • Create a saved object loader that extends SavedObjectLoader to use as a wrapper for performing CRUD operations on the new saved object class / type
  • Create extractReferences/injectReferences helper fns for creating and parsing the stored references to the saved objects
  • Instantiate the loader in the start lifecycle of dependent plugins (e.g., visualizations plugin, downstream plugins like Anomaly Detection), such that they can use the loader for creating/fetching the saved objects
  • Register in the saved_objects_management plugin (this may not be needed)

Server-side:

  • Create a saved objects type that extends SavedObjectsType, used for defining how the object as managed, and how the particular mappings will be stored in the system index
  • Register this type in the setup lifecycle of the plugin

Open questions:

  1. Should this new type be registered & integrated with the saved_objects_management plugin? This will allow visibility into what is stored in the saved objects, but ideally users don't need or want access to it. Making changes to it may result in weird behavior UPDATE: yes we will support it see here
  2. Should this new type be created in a standalone plugin, or in an existing plugin? If in an existing plugin, such as Visualizations, it allows for less boilerplate code, but may not be logical if the feature-anywhere type is used for integration with other saved objects in the future, such as dashboards, saved searches, index patterns, other new saved object types, etc. UPDATE: it will live in a standalone plugin - see [Feature Anywhere] Introduce a new Feature-Anywhere plugin #2958
@ohltyler ohltyler changed the title [Feature anywhere] Add a feature-anywhere saved object type [Feature Anywhere] Add a feature-anywhere saved object type Nov 18, 2022
@ohltyler ohltyler added the visualizations Issues and PRs related to visualizations label Nov 18, 2022
@joshuarrrr joshuarrrr added unified visualization UX feature-anywhere v2.5.0 'Issues and PRs related to version v2.5.0' labels Nov 21, 2022
@joshuarrrr joshuarrrr added v2.6.0 and removed v2.5.0 'Issues and PRs related to version v2.5.0' labels Jan 9, 2023
@ohltyler ohltyler changed the title [Feature Anywhere] Add a feature-anywhere saved object type [Feature Anywhere] Add a augment-vis saved object type Feb 4, 2023
@ohltyler
Copy link
Member Author

ohltyler commented Feb 9, 2023

PR has merged. Closing

@ohltyler ohltyler closed this as completed Feb 9, 2023
@joshuarrrr joshuarrrr added v2.7.0 and removed v2.6.0 labels Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants