elastic / elastic/package-spec
[Change Proposal] Add Saved UI Views asset type(s)
- Dominant language
- Go
- Stars
- 20
- Forks
- 93
- Avg merge
- 15h 10m
- Merged PRs (30d)
- 12
Description
# Saved UI Views Asset Type(s)
When a user installs a package/integration today, that package may install 0 to many assets, including ingest pipelines, visualizations, and dashboards. However, there isn't a simple way to save a set of configuration settings that are specific to a given curated solution UI so that we can load a curated UI focused in on the data collected for a given integration/package.
We'd like to be able to include this type of asset as part of an integration/package. There are two ways we could do this:
(1) Create a single asset type called "Saved UI View", add a folder just for that type, and define a consistent schema for what this saved object should be. That schema would include top level shared keys like "type", "app", etc., and then a black box JSON field for the package to store all of the required saved config. Based on the value of the "app" and/or "type" field, we can choose the correct type for the config JSON that would get loaded.
(2) Alternatively, we could register individual folders for each "app"/"type" that opts into this kind of asset. So a top level "Saved UI Views" folder with individual folders inside of it, such as "logs", "infrastructure", etc. Each of these could define their own saved object completely, and not rely on any kind of shared schema.
Based on other assets in the spec already, this is what (2) would look like. (1) would be the same but without the subfolders for "logs" and "infrastructure" inside of "saved_ui_views":
```yaml
- description: Folder containing Saved UI View assets
type: folder
name: saved_ui_views
required: false
contents:
- description: Folder containing logs saved view files
type: folder
name: logs
required: false
contents:
- description: A Logs Saved UI View file
type: file
contentMediaType: "application/json"
pattern: '^{PACKAGE_NAME}-.+\.json$'
forbiddenPatterns:
- '^.+-(ecs|ECS)\.json$' # ECS suffix is forbidden
- description: Folder containing infrastructure saved view files
type: folder
name: infrastructure
required: false
contents:
- description: An Infrastructure Saved UI View file
type: file
contentMediaType: "application/json"
pattern: '^{PACKAGE_NAME}-.+\.json$'
forbiddenPatterns:
- '^.+-(ecs|ECS)\.json$' # ECS suffix is forbidden
```
Contributor guide
Assessment
This issue has not been assessed yet.