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

[EPM] Allow Canvas Workpad Template asset type to Integrations #71267

Closed
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe('Ingest Manager - packageToConfig', () => {
search: [],
'index-pattern': [],
map: [],
'canvas-workpad-template': [],
},
},
status: InstallationStatus.notInstalled,
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/ingest_manager/common/types/models/epm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export enum KibanaAssetType {
search = 'search',
indexPattern = 'index-pattern',
map = 'map',
'canvas-workpad-template' = 'canvas-workpad-template',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have this camel-cased here, so canvasWorkpadTemplate, following the indexPattern two lines above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skh I think there might be a bug here that prevents this. (But I might be misunderstanding how a package should be structured).

If the file (in this case) is package-version/kibana/canvas-workpad-template/whatever.json then the type will be canvas-workpad-template and the in KibanaAssetType check here would fail if KibanaAssetType had the camel cased key.

So I guess the question is should the types in the package match what's defined in this KibanaAssetType or match the actual Kibana Saved Object Type?

I could not find any example packages that actually had an "index-pattern" or "indexPattern" folder, but the examples in the package-registry repo uses "index-pattern" for the folder name, which would fail to have those assets show up.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid you're right. Thanks for spotting this, I need to look into it.

}

export enum ElasticsearchAssetType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const AssetTitleMap: Record<AssetType, string> = {
'index-pattern': 'Index Pattern',
index_template: 'Index Template',
component_template: 'Component Template',
'canvas-workpad-template': 'Canvas Template',
search: 'Saved Search',
visualization: 'Visualization',
input: 'Agent input',
Expand All @@ -39,6 +40,7 @@ export const AssetIcons: Record<KibanaAssetType, IconType> = {
search: 'searchProfilerApp',
visualization: 'visualizeApp',
map: 'mapApp',
'canvas-workpad-template': 'canvasApp',
};

export const ServiceIcons: Record<ServiceName, IconType> = {
Expand Down