Add regex search to logs plugin

Summary:
Adds regex support to the logs plugin.

You can now do the same for any other SearchableTable, just by adding the prop `regexSupported={true}`

For other types of searchables, like maybe the layout hierarchy, we'll need to modify the class that does the filtering for that type.

I've done what I can with the UI to make it usable, though it would be awesome to have some proper regex syntax parsing and highlighting going on. It will go red if it's not valid at least.

Reviewed By: danielbuechele

Differential Revision: D15898806

fbshipit-source-id: 425edb1834dcc14ca741ac7fc8d566b4f2763c63
This commit is contained in:
John Knox
2019-06-20 02:42:56 -07:00
committed by Facebook Github Bot
parent 5a6d978536
commit b7229b40ac
4 changed files with 115 additions and 23 deletions

View File

@@ -637,6 +637,7 @@ export default class LogTable extends FlipperDevicePlugin<
defaultFilters={DEFAULT_FILTERS}
zebra={false}
actions={<Button onClick={this.clearLogs}>Clear Logs</Button>}
regexSupported={true}
// If the logs is opened through deeplink, then don't scroll as the row is highlighted
stickyBottom={
!(this.props.deepLinkPayload && this.state.highlightedRows.size > 0)