From 0af904f0e510c12b204a885b48b931e8e160a91a Mon Sep 17 00:00:00 2001 From: sagIoTPower Date: Wed, 22 Nov 2023 15:13:54 +0100 Subject: [PATCH] add column with entension name --- src/analytics/list/block.component.ts | 11 ++++++++++- src/shared/analytics.model.ts | 1 + src/shared/analytics.service.ts | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/analytics/list/block.component.ts b/src/analytics/list/block.component.ts index 5a22409..ee5d44d 100644 --- a/src/analytics/list/block.component.ts +++ b/src/analytics/list/block.component.ts @@ -55,7 +55,7 @@ export class BlockGridComponent implements OnInit { path: "name", filterable: false, dataType: ColumnDataType.TextShort, - gridTrackSize: '15%', + gridTrackSize: '10%', visible: true, }, { @@ -82,6 +82,15 @@ export class BlockGridComponent implements OnInit { filterable: true, sortable: true, }, + { + header: "Extension Name", + name: "extension", + path: "extension", + gridTrackSize: '15%', + + filterable: true, + sortable: true, + }, ]; pagination: Pagination = { diff --git a/src/shared/analytics.model.ts b/src/shared/analytics.model.ts index c228802..b5220f2 100644 --- a/src/shared/analytics.model.ts +++ b/src/shared/analytics.model.ts @@ -62,6 +62,7 @@ export interface CEP_Block { producesOutput: string; description: string; custom: boolean; + extension: string; name: string; category: Category; } diff --git a/src/shared/analytics.service.ts b/src/shared/analytics.service.ts index dae7fb1..ca50bfc 100644 --- a/src/shared/analytics.service.ts +++ b/src/shared/analytics.service.ts @@ -92,11 +92,13 @@ export class AnalyticsService { const extension: CEP_Extension = await this.getCEP_Extension( extensionName ); + const extensionNameAbbreviated = extensionName.match(/(.+?)(\.[^.]*$|$)/)[1]; extension.analytics.forEach((block) => { //result.push({ name: block.name, category: block.category }); const cepBlock = block as CEP_Block; //console.log(block.id); - cepBlock.custom = !block.id.startsWith('apama.analyticsbuilder.blocks') && !block.id.startsWith('apama.analyticskit.blocks.core') ; + cepBlock.custom = !block.id.startsWith('apama.analyticsbuilder.blocks') && !block.id.startsWith('apama.analyticskit.blocks.core'); + cepBlock.extension = extensionNameAbbreviated; result.push(cepBlock); }); }