aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js
diff options
context:
space:
mode:
authorClemens <cle1000.cb@gmail.com>2016-06-07 00:40:36 +0200
committerClemens <cle1000.cb@gmail.com>2016-06-07 11:07:25 +0200
commit1aac283e2309339877907d2e08e79a06fbea1898 (patch)
tree585efd70cf9b7436c5fef2fddc7d0fb4a9ee9f46 /web/src/js
parentff2129773fba4cbcaca93f2c604a2fa72955868f (diff)
downloadmitmproxy-1aac283e2309339877907d2e08e79a06fbea1898.tar.gz
mitmproxy-1aac283e2309339877907d2e08e79a06fbea1898.tar.bz2
mitmproxy-1aac283e2309339877907d2e08e79a06fbea1898.zip
moved redux state injection closer to child
Diffstat (limited to 'web/src/js')
-rw-r--r--web/src/js/components/flowtable.js6
-rw-r--r--web/src/js/components/mainview.js4
2 files changed, 6 insertions, 4 deletions
diff --git a/web/src/js/components/flowtable.js b/web/src/js/components/flowtable.js
index 89bcfc39..23469827 100644
--- a/web/src/js/components/flowtable.js
+++ b/web/src/js/components/flowtable.js
@@ -9,6 +9,7 @@ import AutoScroll from "./helpers/AutoScroll";
import {calcVScroll} from "./helpers/VirtualScroll";
import flowtable_columns from "./flowtable-columns.js";
import Filt from "../filt/filt";
+import {setSort} from "../ducks/flows";
FlowRow.propTypes = {
@@ -94,8 +95,11 @@ FlowTableHead.propTypes = {
};
const FlowTableHeadContainer = connect(
- (state) => ({
+ state => ({
sort: state.flows.sort
+ }),
+ dispatch => ({
+ loc: (sort) => dispatch(setSort(sort)),
})
)(FlowTableHead)
diff --git a/web/src/js/components/mainview.js b/web/src/js/components/mainview.js
index 5237bddb..dae2856e 100644
--- a/web/src/js/components/mainview.js
+++ b/web/src/js/components/mainview.js
@@ -7,7 +7,7 @@ import {Splitter} from "./common.js"
import FlowTable from "./flowtable.js";
import FlowView from "./flowview/index.js";
import {connect} from 'react-redux'
-import {selectFlow, setFilter, setHighlight, setSort} from "../ducks/flows";
+import {selectFlow, setFilter, setHighlight} from "../ducks/flows";
var MainView = React.createClass({
@@ -158,7 +158,6 @@ var MainView = React.createClass({
<div className="main-view">
<FlowTable ref="flowTable"
selectFlow={this.selectFlow}
- setSort={this.props.setSort}
selected={this.props.selectedFlow} />
{details}
</div>
@@ -177,7 +176,6 @@ const MainViewContainer = connect(
dispatch => ({
selectFlow: flowId => dispatch(selectFlow(flowId)),
setFilter: filter => dispatch(setFilter(filter)),
- setSort: (sort) => dispatch(setSort(sort)),
setHighlight: highlight => dispatch(setHighlight(highlight))
}),
undefined,
>225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337