mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
[web] Add a TFlow class to js/ducks/tutils.js
Many Components requires a flow object when being rendered, so we put a TFlow class here, currently has the minimize structure, only contains the attributes we needed in the components to be tested.
This commit is contained in:
parent
204dea4a2e
commit
22a1709c8b
@ -7,3 +7,30 @@ export function createStore(parts) {
|
|||||||
applyMiddleware(...[thunk])
|
applyMiddleware(...[thunk])
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function TFlow(intercepted=false, marked=false, modified=false) {
|
||||||
|
return {
|
||||||
|
intercepted : intercepted,
|
||||||
|
marked : marked,
|
||||||
|
modified: modified,
|
||||||
|
id: "foo",
|
||||||
|
request: {
|
||||||
|
scheme: 'http',
|
||||||
|
is_replay: true,
|
||||||
|
method: 'GET',
|
||||||
|
contentLength: 100
|
||||||
|
},
|
||||||
|
response: {
|
||||||
|
status_code: 200,
|
||||||
|
headers: [["Content-Type", 'text/html']],
|
||||||
|
timestamp_end: 200
|
||||||
|
},
|
||||||
|
error: {
|
||||||
|
msg: ''
|
||||||
|
},
|
||||||
|
server_conn: {
|
||||||
|
timestamp_start: 100
|
||||||
|
},
|
||||||
|
type: 'http'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user