aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/ContentView/ContentErrors.jsx
diff options
context:
space:
mode:
authorJason <jason.daurus@gmail.com>2016-06-17 21:54:31 +0800
committerJason <jason.daurus@gmail.com>2016-06-17 21:54:31 +0800
commite4addd60f1ffbb445a8c05f3fb2b6c6e61bd7b93 (patch)
treecb5e3be10e8bb813c1ade3aa88204460317d2548 /web/src/js/components/ContentView/ContentErrors.jsx
parent16a28eca258e07d45c7e2a8ee95368d4eb077d4d (diff)
parent9c6199db9be34fad18eaedb86463333671ae190a (diff)
downloadmitmproxy-e4addd60f1ffbb445a8c05f3fb2b6c6e61bd7b93.tar.gz
mitmproxy-e4addd60f1ffbb445a8c05f3fb2b6c6e61bd7b93.tar.bz2
mitmproxy-e4addd60f1ffbb445a8c05f3fb2b6c6e61bd7b93.zip
Merge branch 'master' into websocket
Conflicts: mitmproxy/web/static/app.css mitmproxy/web/static/app.js web/src/js/components/ProxyApp.jsx
Diffstat (limited to 'web/src/js/components/ContentView/ContentErrors.jsx')
-rw-r--r--web/src/js/components/ContentView/ContentErrors.jsx28
1 files changed, 28 insertions, 0 deletions
diff --git a/web/src/js/components/ContentView/ContentErrors.jsx b/web/src/js/components/ContentView/ContentErrors.jsx
new file mode 100644
index 00000000..11594c7f
--- /dev/null
+++ b/web/src/js/components/ContentView/ContentErrors.jsx
@@ -0,0 +1,28 @@
+import React from 'react'
+import { ViewImage } from './ContentViews'
+import {formatSize} from '../../utils.js'
+
+export function ContentEmpty({ flow, message }) {
+ return (
+ <div className="alert alert-info">
+ No {flow.request === message ? 'request' : 'response'} content.
+ </div>
+ )
+}
+
+export function ContentMissing({ flow, message }) {
+ return (
+ <div className="alert alert-info">
+ {flow.request === message ? 'Request' : 'Response'} content missing.
+ </div>
+ )
+}
+
+export function ContentTooLarge({ message, onClick }) {
+ return (
+ <div className="alert alert-warning">
+ <button onClick={onClick} className="btn btn-xs btn-warning pull-right">Display anyway</button>
+ {formatSize(message.contentLength)} content size.
+ </div>
+ )
+}