diff --git a/ui-ngx/src/app/modules/home/components/entity/entities-table.component.html b/ui-ngx/src/app/modules/home/components/entity/entities-table.component.html
index a6b204b279..c56aae3476 100644
--- a/ui-ngx/src/app/modules/home/components/entity/entities-table.component.html
+++ b/ui-ngx/src/app/modules/home/components/entity/entities-table.component.html
@@ -192,7 +192,8 @@
(click)="$event.stopPropagation();">
-
+
diff --git a/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.ts b/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.ts
index 6aad28c638..ebece2186b 100644
--- a/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.ts
+++ b/ui-ngx/src/app/modules/home/components/entity/entity-chips.component.ts
@@ -18,7 +18,7 @@ import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { BaseData } from '@shared/models/base-data';
import { EntityId } from '@shared/models/id/entity-id';
import { baseDetailsPageByEntityType, EntityType } from '@app/shared/public-api';
-import { isEqual, isObject } from '@core/utils';
+import { isEqual, isNotEmptyStr, isObject } from '@core/utils';
@Component({
selector: 'tb-entity-chips',
@@ -33,6 +33,9 @@ export class EntityChipsComponent implements OnChanges {
@Input()
key: string;
+ @Input()
+ detailsPagePrefixUrl: string;
+
entityDetailsPrefixUrl: string;
subEntities: Array> = [];
@@ -52,7 +55,9 @@ export class EntityChipsComponent implements OnChanges {
if (isObject(entitiesList) && !Array.isArray(entitiesList)) {
entitiesList = [entitiesList];
}
- if (Array.isArray(entitiesList)) {
+ if (isNotEmptyStr(this.detailsPagePrefixUrl)) {
+ this.entityDetailsPrefixUrl = this.detailsPagePrefixUrl;
+ } else if (Array.isArray(entitiesList)) {
if (entitiesList.length) {
this.entityDetailsPrefixUrl = baseDetailsPageByEntityType.get(entitiesList[0].id.entityType as EntityType);
}
diff --git a/ui-ngx/src/app/modules/home/models/entity/entities-table-config.models.ts b/ui-ngx/src/app/modules/home/models/entity/entities-table-config.models.ts
index dbdcdcd61e..7e1a25d61a 100644
--- a/ui-ngx/src/app/modules/home/models/entity/entities-table-config.models.ts
+++ b/ui-ngx/src/app/modules/home/models/entity/entities-table-config.models.ts
@@ -144,7 +144,8 @@ export class DateEntityTableColumn> extends EntityTabl
export class EntityChipsEntityTableColumn> extends BaseEntityTableColumn {
constructor(public key: string,
public title: string,
- public width: string = '0px') {
+ public width: string = '0px',
+ public entityURL?: (entity) => string) {
super('entityChips', key, title, width, false);
}
}
diff --git a/ui-ngx/src/app/modules/home/pages/widget/widget-types-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/widget/widget-types-table-config.resolver.ts
index eac0817875..60b6f70ac7 100644
--- a/ui-ngx/src/app/modules/home/pages/widget/widget-types-table-config.resolver.ts
+++ b/ui-ngx/src/app/modules/home/pages/widget/widget-types-table-config.resolver.ts
@@ -20,6 +20,7 @@ import { Router } from '@angular/router';
import {
checkBoxCell,
DateEntityTableColumn,
+ EntityChipsEntityTableColumn,
EntityTableColumn,
EntityTableConfig
} from '@home/models/entity/entities-table-config.models';
@@ -75,7 +76,9 @@ export class WidgetTypesTableConfigResolver {
this.config.columns.push(
new DateEntityTableColumn('createdTime', 'common.created-time', this.datePipe, '150px'),
- new EntityTableColumn('name', 'widget.title', '100%'),
+ new EntityTableColumn('name', 'widget.title', '60%'),
+ new EntityChipsEntityTableColumn( 'bundles', 'entity.type-widgets-bundles', '40%',
+ () => '/resources/widgets-library/widgets-bundles'),
new EntityTableColumn('widgetType', 'widget.type', '150px', entity =>
entity?.widgetType ? this.translate.instant(widgetTypesData.get(entity.widgetType).name) : '', undefined, false),
new EntityTableColumn('tenantId', 'widget.system', '60px',
diff --git a/ui-ngx/src/app/shared/models/widget.models.ts b/ui-ngx/src/app/shared/models/widget.models.ts
index 5950dcf911..6e45e8705a 100644
--- a/ui-ngx/src/app/shared/models/widget.models.ts
+++ b/ui-ngx/src/app/shared/models/widget.models.ts
@@ -41,7 +41,7 @@ import { isNotEmptyStr, mergeDeepIgnoreArray } from '@core/utils';
import { WidgetConfigComponentData } from '@home/models/widget-component.models';
import { ComponentStyle, Font, TimewindowStyle } from '@shared/models/widget-settings.models';
import { NULL_UUID } from '@shared/models/id/has-uuid';
-import { HasTenantId, HasVersion } from '@shared/models/entity.models';
+import { EntityInfoData, HasTenantId, HasVersion } from '@shared/models/entity.models';
import { DataKeysCallbacks, DataKeySettingsFunction } from '@home/components/widget/config/data-keys.component.models';
import { WidgetConfigCallbacks } from '@home/components/widget/config/widget-config.component.models';
import { TbFunction } from '@shared/models/js-function.models';
@@ -270,6 +270,7 @@ export interface WidgetTypeInfo extends BaseWidgetType {
description: string;
tags: string[];
widgetType: widgetType;
+ bundles?: EntityInfoData[];
}
export interface WidgetTypeDetails extends WidgetType, ExportableEntity {