Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use index and message_id as message identifier #2804

Merged
merged 1 commit into from Sep 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -65,7 +65,7 @@ const MessageTableEntry = React.createClass({
}
},
_toggleDetail() {
this.props.toggleDetail(this.props.message.id);
this.props.toggleDetail(`${this.props.message.index}-${this.props.message.id}`);
},
render() {
const colSpanFixup = this.props.selectedFields.size + 1;
Expand Down
6 changes: 3 additions & 3 deletions graylog2-web-interface/src/components/search/ResultTable.jsx
Expand Up @@ -78,7 +78,7 @@ const ResultTable = React.createClass({
const expandedChangeRatio = (this.props.messages.length - this.state.expandedMessages.size) / 100;
const renderLoadingIndicator = expandedChangeRatio > 0.3;

const newSet = Immutable.Set(this.props.messages.map((message) => message.id));
const newSet = Immutable.Set(this.props.messages.map((message) => `${message.index}-${message.id}`));
this.setState({ expandedMessages: newSet, expandAllRenderAsync: renderLoadingIndicator });
},
collapseAll() {
Expand Down Expand Up @@ -160,11 +160,11 @@ const ResultTable = React.createClass({
</thead>
{this.props.messages.map((message) => {
return (
<MessageTableEntry key={message.id}
<MessageTableEntry key={`${message.index}-${message.id}`}
message={message}
showMessageRow={this.props.selectedFields.contains('message')}
selectedFields={selectedColumns}
expanded={this.state.expandedMessages.contains(message.id)}
expanded={this.state.expandedMessages.contains(`${message.index}-${message.id}`)}
toggleDetail={this._toggleMessageDetail}
inputs={this.props.inputs}
streams={this.props.streams}
Expand Down