aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/common/activity-log/ActivityLogView.jsx
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2017-12-20 14:30:43 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-21 11:12:33 +0000
commit8e9c0653dd6c6862123c9609ae34e1206d86456e (patch)
tree5eeef00ec0677133baa439ca8d7ffd7aca4804b6 /openecomp-ui/src/sdc-app/common/activity-log/ActivityLogView.jsx
parent785ebcc95de3e064e843bec04ba7a209d854fc7c (diff)
Add collaboration feature
Issue-ID: SDC-767 Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/common/activity-log/ActivityLogView.jsx')
-rw-r--r--openecomp-ui/src/sdc-app/common/activity-log/ActivityLogView.jsx13
1 files changed, 7 insertions, 6 deletions
diff --git a/openecomp-ui/src/sdc-app/common/activity-log/ActivityLogView.jsx b/openecomp-ui/src/sdc-app/common/activity-log/ActivityLogView.jsx
index 9abddea542..5b8c29b719 100644
--- a/openecomp-ui/src/sdc-app/common/activity-log/ActivityLogView.jsx
+++ b/openecomp-ui/src/sdc-app/common/activity-log/ActivityLogView.jsx
@@ -67,9 +67,9 @@ export function ActivityListItem({activity, isHeader, isDes, onSort}) {
return (
<li className={`activity-list-item ${isHeader ? 'header' : ''}`} data-test-id='activity-list-item'>
<div className='table-cell activity-date' data-test-id='activity-date'><ActivityLogSortableCellHeader isHeader={isHeader} data={timestamp} isDes={isDes} onSort={onSort}/></div>
- <div className='table-cell activity-action' data-test-id='activity-action'>{type}</div>
- <div className='table-cell activity-comment' title={comment} data-test-id='activity-comment'><span>{comment}</span></div>
- <div className='table-cell activity-username' data-test-id='activity-username'>{user}</div>
+ <div className='table-cell activity-action' data-test-id='activity-action'>{i18n(type)}</div>
+ <div className='table-cell activity-comment' title={isHeader ? '' : comment} data-test-id='activity-comment'><span>{i18n(comment)}</span></div>
+ <div className='table-cell activity-username' data-test-id='activity-username'>{isHeader ? i18n(activity.user) : `${i18n(user.name)} (${user.id})`}</div>
<div className='table-cell activity-status' data-test-id='activity-status'><ActivityLogStatus isHeader={isHeader} status={status}/></div>
</li>
);
@@ -91,10 +91,10 @@ class ActivityLogView extends Component {
filterValue={this.state.localFilter}
onFilter={filter => this.setState({localFilter: filter})}>
<ActivityListItem
- isHeader={true}
activity={{timestamp: 'Date', type: 'Action', comment: 'Comment', user: 'Username', status: 'Status'}}
isDes={this.state.sortDescending}
- onSort={() => this.setState({sortDescending: !this.state.sortDescending})}/>
+ onSort={() => this.setState({sortDescending: !this.state.sortDescending})}
+ isHeader/>
{this.sortActivities(this.filterActivities(), this.state.sortDescending).map(activity => <ActivityListItem key={activity.id} activity={activity}/>)}
</ListEditorView>
</div>
@@ -106,7 +106,8 @@ class ActivityLogView extends Component {
let {localFilter} = this.state;
if (localFilter.trim()) {
const filter = new RegExp(escape(localFilter), 'i');
- return activities.filter(({user = '', comment = '', type = ''}) => escape(user).match(filter) || escape(comment).match(filter) || escape(type).match(filter));
+ return activities.filter(({user = {id: '', name: ''}, comment = '', type = ''}) =>
+ escape(user.id).match(filter) || escape(user.name).match(filter) || escape(comment).match(filter) || escape(type).match(filter));
}
else {
return activities;