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
Support changes for pipeline processor simulator #2320
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lets other stores receiving messages to format them in the same way.
As we don't use Immutable.js in new components, convert received props to not break old components used by MessageShow.
Message simulations will not be persisted, so we remove most of the actions and links, and adapt some texts.
When displaying a message, use a string representation of fields. This allows us to render "true" and "false" values, for instance.
To avoid tying the main component to something that still lives on a plugin, we remove the `isSimulation` prop, and all references to simulation. Instead, we are adding the `disableMessageActions` prop to make possible to hide the message actions. We also display some text when the message index is not set, to let the user know that the message is not persisted.
We generate two URLs to the message inside the `MessageDetail` component, and we should do it in the same way to avoid inconsistencies.
possiblyHighlight(fieldName) { | ||
// No highlighting for the message details view. | ||
return this.props.message.fields[fieldName]; | ||
return String(this.props.message.fields[fieldName]); | ||
}, | ||
render() { | ||
return ( | ||
<div className="row content"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you replace this with a Row
-component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are required changes in common components being used in the first version of the message pipeline processor simulator, in summary:
LoaderTabs
to control whether the loaded message should be display or notMessageDetail
to disable all links and buttons when showing message simulationsMessageShow
to ensure the props it receives are instances of immutable.js objects, so other components using it don't need to care about itChanges required for Graylog2/graylog-plugin-pipeline-processor#34