diff options
Diffstat (limited to 'web/src/js/components')
-rw-r--r-- | web/src/js/components/eventlog.jsx.js | 13 | ||||
-rw-r--r-- | web/src/js/components/mainview.jsx.js | 41 | ||||
-rw-r--r-- | web/src/js/components/proxyapp.jsx.js | 3 |
3 files changed, 33 insertions, 24 deletions
diff --git a/web/src/js/components/eventlog.jsx.js b/web/src/js/components/eventlog.jsx.js index e3b029ed..462b197a 100644 --- a/web/src/js/components/eventlog.jsx.js +++ b/web/src/js/components/eventlog.jsx.js @@ -1,3 +1,8 @@ +var React = require("react"); +var utils = require("./utils.jsx.js"); +var VirtualScrollMixin = require("./virtualscroll.jsx.js"); +var views = require("../store/view.js"); + var LogMessage = React.createClass({ render: function () { var entry = this.props.entry; @@ -24,7 +29,7 @@ var LogMessage = React.createClass({ }); var EventLogContents = React.createClass({ - mixins: [AutoScrollMixin, VirtualScrollMixin], + mixins: [utils.AutoScrollMixin, VirtualScrollMixin], getInitialState: function () { return { log: [] @@ -37,7 +42,7 @@ var EventLogContents = React.createClass({ this.closeView(); }, openView: function (store) { - var view = new StoreView(store, function (entry) { + var view = new views.StoreView(store, function (entry) { return this.props.filter[entry.level]; }.bind(this)); this.setState({ @@ -145,4 +150,6 @@ var EventLog = React.createClass({ </div> ); } -});
\ No newline at end of file +}); + +module.exports = EventLog;
\ No newline at end of file diff --git a/web/src/js/components/mainview.jsx.js b/web/src/js/components/mainview.jsx.js index 5661ab1d..d2b4d2f9 100644 --- a/web/src/js/components/mainview.jsx.js +++ b/web/src/js/components/mainview.jsx.js @@ -1,6 +1,7 @@ var React = require("react"); var utils = require("./utils.jsx.js"); +var toputils = require("../utils.js"); var views = require("../store/view.js"); var Filt = require("../filt/filt.js"); FlowTable = require("./flowtable.jsx.js"); @@ -126,49 +127,49 @@ var MainView = React.createClass({ return; } switch (e.keyCode) { - case Key.K: - case Key.UP: + case toputils.Key.K: + case toputils.Key.UP: this.selectFlowRelative(-1); break; - case Key.J: - case Key.DOWN: + case toputils.Key.J: + case toputils.Key.DOWN: this.selectFlowRelative(+1); break; - case Key.SPACE: - case Key.PAGE_DOWN: + case toputils.Key.SPACE: + case toputils.Key.PAGE_DOWN: this.selectFlowRelative(+10); break; - case Key.PAGE_UP: + case toputils.Key.PAGE_UP: this.selectFlowRelative(-10); break; - case Key.END: + case toputils.Key.END: this.selectFlowRelative(+1e10); break; - case Key.HOME: + case toputils.Key.HOME: this.selectFlowRelative(-1e10); break; - case Key.ESC: + case toputils.Key.ESC: this.selectFlow(null); break; - case Key.H: - case Key.LEFT: + case toputils.Key.H: + case toputils.Key.LEFT: if (this.refs.flowDetails) { this.refs.flowDetails.nextTab(-1); } break; - case Key.L: - case Key.TAB: - case Key.RIGHT: + case toputils.Key.L: + case toputils.Key.TAB: + case toputils.Key.RIGHT: if (this.refs.flowDetails) { this.refs.flowDetails.nextTab(+1); } break; - case Key.C: + case toputils.Key.C: if (e.shiftKey) { FlowActions.clear(); } break; - case Key.D: + case toputils.Key.D: if (flow) { if (e.shiftKey) { FlowActions.duplicate(flow); @@ -177,19 +178,19 @@ var MainView = React.createClass({ } } break; - case Key.A: + case toputils.Key.A: if (e.shiftKey) { FlowActions.accept_all(); } else if (flow && flow.intercepted) { FlowActions.accept(flow); } break; - case Key.R: + case toputils.Key.R: if (!e.shiftKey && flow) { FlowActions.replay(flow); } break; - case Key.V: + case toputils.Key.V: if(e.shiftKey && flow && flow.modified) { FlowActions.revert(flow); } diff --git a/web/src/js/components/proxyapp.jsx.js b/web/src/js/components/proxyapp.jsx.js index 2431ad46..ce313f78 100644 --- a/web/src/js/components/proxyapp.jsx.js +++ b/web/src/js/components/proxyapp.jsx.js @@ -6,6 +6,7 @@ var utils = require("./utils.jsx.js"); var MainView = require("./mainview.jsx.js"); var Footer = require("./footer.jsx.js"); var header = require("./header.jsx.js"); +var EventLog = require("./eventlog.jsx.js"); var store = require("../store/store.js"); @@ -50,7 +51,7 @@ var ProxyAppMain = React.createClass({ var eventlog; if (this.getQuery()[Query.SHOW_EVENTLOG]) { eventlog = [ - <Splitter key="splitter" axis="y"/>, + <utils.Splitter key="splitter" axis="y"/>, <EventLog key="eventlog" eventStore={this.state.eventStore}/> ]; } else { |