diff --git a/ui-ngx/src/app/core/http/entity.service.ts b/ui-ngx/src/app/core/http/entity.service.ts index 41b5360b7a..8bc8bfe3f2 100644 --- a/ui-ngx/src/app/core/http/entity.service.ts +++ b/ui-ngx/src/app/core/http/entity.service.ts @@ -41,7 +41,7 @@ import { AttributeScope, DataKeyType } from '@shared/models/telemetry/telemetry. import { defaultHttpOptionsFromConfig, RequestConfig } from '@core/http/http-utils'; import { RuleChainService } from '@core/http/rule-chain.service'; import { AliasInfo, StateParams, SubscriptionInfo } from '@core/api/widget-api.models'; -import { DataKey, Datasource, DatasourceType, KeyInfo } from '@app/shared/models/widget.models'; +import { DataKey, Datasource, DatasourceType, DeprecatedFilter, KeyInfo } from '@app/shared/models/widget.models'; import { UtilsService } from '@core/services/utils.service'; import { AliasFilterType, @@ -65,7 +65,9 @@ import { Device, DeviceCredentialsType } from '@shared/models/device.models'; import { AttributeService } from '@core/http/attribute.service'; import { AlarmData, - AlarmDataQuery, AlarmFilter, AlarmFilterConfig, + AlarmDataQuery, + AlarmFilter, + AlarmFilterConfig, createDefaultEntityDataPageLink, EntityData, EntityDataQuery, @@ -418,7 +420,11 @@ export class EntityService { break; case EntityType.WIDGETS_BUNDLE: pageLink.sortOrder.property = 'title'; - entitiesObservable = this.widgetService.getWidgetBundles(pageLink, false, config); + entitiesObservable = this.widgetService.getWidgetBundles(pageLink, false, true, config); + break; + case EntityType.WIDGET_TYPE: + pageLink.sortOrder.property = 'name'; + entitiesObservable = this.widgetService.getWidgetTypes(pageLink, true, false, DeprecatedFilter.ALL, null, config); break; case EntityType.NOTIFICATION_TARGET: pageLink.sortOrder.property = 'name'; diff --git a/ui-ngx/src/app/core/http/widget.service.ts b/ui-ngx/src/app/core/http/widget.service.ts index 6b53e4d0cb..6905a0f594 100644 --- a/ui-ngx/src/app/core/http/widget.service.ts +++ b/ui-ngx/src/app/core/http/widget.service.ts @@ -85,9 +85,12 @@ export class WidgetService { ); } - public getWidgetBundles(pageLink: PageLink, fullSearch = false, config?: RequestConfig): Observable> { - return this.http.get>(`/api/widgetsBundles${pageLink.toQuery()}&fullSearch=${fullSearch}`, - defaultHttpOptionsFromConfig(config)); + public getWidgetBundles(pageLink: PageLink, fullSearch = false, + tenantOnly = false, config?: RequestConfig): Observable> { + return this.http.get>( + `/api/widgetsBundles${pageLink.toQuery()}&tenantOnly=${tenantOnly}&fullSearch=${fullSearch}`, + defaultHttpOptionsFromConfig(config) + ); } public getWidgetsBundle(widgetsBundleId: string, diff --git a/ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.scss b/ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.scss index 9b0c323a40..16a2f43006 100644 --- a/ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.scss +++ b/ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.scss @@ -40,6 +40,9 @@ tb-entity-subtype-list { flex: 1; width: 180px; + .mdc-evolution-chip-set__chips { + width: 100%; + } } .mat-mdc-chip { diff --git a/ui-ngx/src/app/modules/home/components/alarm/alarm-table-config.ts b/ui-ngx/src/app/modules/home/components/alarm/alarm-table-config.ts index 15e3fb1952..865a1b8c8b 100644 --- a/ui-ngx/src/app/modules/home/components/alarm/alarm-table-config.ts +++ b/ui-ngx/src/app/modules/home/components/alarm/alarm-table-config.ts @@ -319,9 +319,7 @@ export class AlarmTableConfig extends EntityTableConfig if ($event) { $event.stopPropagation(); } - const unacknowledgedAlarms = alarms.filter(alarm => { - return alarm.status === AlarmStatus.CLEARED_UNACK || alarm.status === AlarmStatus.ACTIVE_UNACK; - }) + const unacknowledgedAlarms = alarms.filter(alarm => !alarm.acknowledged); let title = ''; let content = ''; if (!unacknowledgedAlarms.length) { @@ -356,9 +354,7 @@ export class AlarmTableConfig extends EntityTableConfig if ($event) { $event.stopPropagation(); } - const activeAlarms = alarms.filter(alarm => { - return alarm.status === AlarmStatus.ACTIVE_ACK || alarm.status === AlarmStatus.ACTIVE_UNACK; - }) + const activeAlarms = alarms.filter(alarm => !alarm.cleared); let title = ''; let content = ''; if (!activeAlarms.length) { diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html index 166e359799..a388f69252 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html @@ -15,7 +15,7 @@ limitations under the License. --> -
-
- - - - - {{ column.title | translate}} - - {{ 'event.all-events' | translate}} - - {{ value }} - - - - - - - {{ column.title | translate}} - - - {{ 'event.min-value' | translate }} - - - - - - {{ 'event.has-error' | translate }} - - - - - {{ column.title | translate}} - - - - - - {{ column.title | translate}} - - + +
+ + + + + {{ column.title | translate}} + + {{ 'event.all-events' | translate}} + + {{ value }} + + + + + + + {{ column.title | translate}} + + + {{ 'event.min-value' | translate }} + + + + + + {{ 'event.has-error' | translate }} + + + + + {{ column.title | translate}} + + + + + + {{ column.title | translate}} + + + - -
+
+