mitmproxy/mitmproxy — pull request #414 by mhils (2014-11-28 16:25:23+00:00)
Title: Flowviews2

libmproxy:
- Clarify State behaviour: `add_request/add_response/add_error` -> `add_flow` and `update_flow`.
- Introduction of FlowStore and FlowView, both implementing FlowList (=mostly behave like a list):
- FlowStore replaces `state._flow_list` and keeps all flows in a list memory. It provides add/update/remove methods.
- FlowView is a filtered view on a store (*no* sorting or paging), basically replacing `state.view`.
- Separating Flow Storage and Views from the state adds a bit of boilerplate for now, but I believe we can benefit from this in the long term (e.g. a FlowStore implementation that doesn't require to keep the flows in memory). For now, `State` still provides the same methods as before.
- Provide web API for flows. `/flows` returns all existing flows, `/flows/update` is a websocket stream that broadcasts updates (Message types: `add/update/remove/recalculate`, the latter instructing the client to re-fetch all flows.).

web:

- Update to latest React and React-Router
- Client-Side FlowStore implementation.
- Virtual Scrolling for the flow table