UI: Refactoring attribute-datasource
This commit is contained in:
parent
07824ed50c
commit
00167d5872
@ -89,12 +89,7 @@ export class AttributeDatasource implements DataSource<AttributeData> {
|
|||||||
pageLink: PageLink): Observable<PageData<AttributeData>> {
|
pageLink: PageLink): Observable<PageData<AttributeData>> {
|
||||||
return this.getAllAttributes(entityId, attributesScope).pipe(
|
return this.getAllAttributes(entityId, attributesScope).pipe(
|
||||||
map((data) => {
|
map((data) => {
|
||||||
let filteredData = [];
|
const filteredData = data.filter(attrData => attrData.lastUpdateTs !== 0 && attrData.value !== null);
|
||||||
for(let key in data) {
|
|
||||||
if(data[key]['value'] !== null) {
|
|
||||||
filteredData.push(data[key]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return pageLink.filterData(filteredData);
|
return pageLink.filterData(filteredData);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user