-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard #194
Closed
Closed
Dashboard #194
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
dff330a
Add test coverage for dashboard route
jacobbednarz bf8ba98
Expose `/dashboard` route
jacobbednarz 62d0bcb
Bypass `StopBrowsersMiddleware` checks for the dashboard
jacobbednarz 0a591a0
Verrrry basic UI for displaying all proxies
jacobbednarz 56ebb3f
Swap to using `proxyWithToxics` for Toxics data
jacobbednarz 5788b5c
Fancy up the dashboard with all the available keys
jacobbednarz f14b8e3
Add the values into text inputs
jacobbednarz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<table> | ||
{{ range . }} | ||
<tr> | ||
<td><strong>{{ .Proxy.Name }}</strong> listen: {{ .Proxy.Listen }} upstream: {{ .Proxy.Upstream }} | ||
Enabled? <input type="checkbox" {{ if .Proxy.Enabled }} checked{{ end }} /></td> | ||
</tr> | ||
{{ range .Toxics }} | ||
<tr> | ||
<td> | ||
name: {{ .Name }} | ||
</td><td> | ||
type: {{ .Type }} | ||
</td><td> | ||
stream: {{ .Stream }} | ||
</td><td> | ||
toxicity: {{ .Toxicity }} | ||
</td><td> | ||
direction: {{ .Direction }} | ||
</td><td> | ||
index: {{ .Index }} | ||
</td><td> | ||
buffer: {{ .BufferSize }} | ||
</td><td> | ||
</td><td> | ||
{{ if eq .Type "latency" }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these |
||
jitter: <input type="text" name="jitter" value="{{ .Toxic.Jitter }}" size="6" />ms<br> | ||
latency: <input type="text" name="latency" value="{{ .Toxic.Latency}}" size="6" />ms | ||
{{ end }} | ||
|
||
{{ if eq .Type "bandwidth" }} | ||
rate: <input type="text" name="bandwidth_rate" value="{{ .Toxic.Rate }}" size="6" />KB/s | ||
{{ end }} | ||
|
||
{{ if eq .Type "limit_data" }} | ||
bytes: <input type="text" name="limit_data_bytes" value="{{ .Toxic.Bytes }}" size="6" /> bytes | ||
{{ end }} | ||
|
||
{{ if eq .Type "slicer" }} | ||
average size: <input type="text" name="slicer_average_size" value="{{ .Toxic.AverageSize }}" size="6" /> bytes<br> | ||
size variation: <input type="text" name="slicer_size_variation" value="{{ .Toxic.SizeVariation }}" size="6" /> bytes<br> | ||
delay: <input type="text" name="slicer_delay" value="{{ .Toxic.Delay }}" size="6" /> microseconds | ||
{{ end }} | ||
|
||
{{ if eq .Type "slow_close" }} | ||
delay: <input type="text" name="slow_close_delay" value="{{ .Toxic.Delay }}" size="6" />ms | ||
{{ end }} | ||
|
||
{{ if eq .Type "timeout" }} | ||
timeout: <input type="text" name="timeout" value="{{ .Toxic.Timeout }}" size="6" />ms | ||
{{ end }} | ||
</td> | ||
{{ end }} | ||
{{ end }} | ||
</tr> | ||
</table> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a decision early on to not use the existing HTTP API for these since we already have a couple of functions handy for fetching them.