Browse Source

Merge pull request #11100 from rusikv/bug/empty-string-attr

Disabled filtering of attributes with empty string values for attribute table
pull/11124/head
Igor Kulikov 2 years ago
committed by GitHub
parent
commit
27c7f12fb1
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html
  2. 2
      ui-ngx/src/app/modules/home/models/datasource/attribute-datasource.ts

1
ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html

@ -186,6 +186,7 @@
<div fxFlex fxLayout="row" style="overflow: hidden; align-items: center;">
<span class="ellipsis">{{attribute.value | tbJson}}</span>
<tb-copy-button
*ngIf="attribute.value !== ''"
class="attribute-copy"
[disabled]="isLoading$ | async"
[copyText]="attribute.value | tbJson"

2
ui-ngx/src/app/modules/home/models/datasource/attribute-datasource.ts

@ -89,7 +89,7 @@ export class AttributeDatasource implements DataSource<AttributeData> {
pageLink: PageLink): Observable<PageData<AttributeData>> {
return this.getAllAttributes(entityId, attributesScope).pipe(
map((data) => {
const filteredData = data.filter(attrData => attrData.lastUpdateTs !== 0 && attrData.value !== '');
const filteredData = data.filter(attrData => attrData.lastUpdateTs !== 0);
return pageLink.filterData(filteredData);
})
);

Loading…
Cancel
Save