-
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
Dashboard #194
Conversation
Updates the router to handle `/dashboard` which will house the UI for toxiproxy.
It's not pretty but it works.
@@ -389,6 +392,16 @@ func (server *ApiServer) Version(response http.ResponseWriter, request *http.Req | |||
} | |||
} | |||
|
|||
func (server *ApiServer) Dashboard(response http.ResponseWriter, request *http.Request) { | |||
var dashboardData []proxyToxics |
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.
Instead of trying to map this out myself, just reuse a combinaton of the `server.Collection.Proxies()` with `proxyWithToxics` to iterate over the available proxies and their toxics.
b4da338
to
f14b8e3
Compare
buffer: {{ .BufferSize }} | ||
</td><td> | ||
</td><td> | ||
{{ if eq .Type "latency" }} |
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.
these if
blocks will probably go away once the updating work comes into it.
Closing this as #218 is further along |
This is the start of a UI for Toxiproxy ripped heavily from the existing Shopify app but built into Toxiproxy core instead of an add-on.
Checklist
This is still verrrry WIP however I thought I would PR this early in case I either don't end up finishing it or anyone has any input during the journey.
Fixes #192