Skip to content
Snippets Groups Projects
Commit 8a2a0dbe authored by Mathis Neumann's avatar Mathis Neumann
Browse files

ignore changelogSequence and revisionNumber in entity-details

parent 96ffc049
No related branches found
No related tags found
No related merge requests found
import Ember from 'ember';
const { computed } = Ember;
export default Ember.Component.extend({
entity: null,
ignoredProperties: [
'Id$',
'timeSeries',
'statusInformations',
'revisionNumber',
'changelogSequence'
],
filteredProperties: Ember.computed('entity', 'entity._updated', function(){
this.debug('entity', this.get('entity'));
const properties = [];
const entity = this.get('entity');
entity.eachAttribute(property => {
// do not show internal relations, also timeSeries gets plotted
if(property.indexOf('Id') < 0 && property !== 'timeSeries' && property !== 'statusInformations') {
if(!this.get('ignoredRegexp').some(regex => regex.test(property))) {
properties.push({key: property, value: entity.get(property)});
}
});
this.debug('properties', properties);
return properties;
}),
ignoredRegexp: computed('ignoredProperties', function() {
return this.get('ignoredProperties').map(prop => new RegExp(prop));
})
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment