Add bwtester dials and tabs GUI#37
Conversation
|
@mwfarb It works really well! Some feedback/ideas for improvement:
|
|
@chaehni Thanks for taking a look and finding these issues.
|
|
@chaehni I've addressed your comments and fixed a few other issues. Let me know if you have time for another look and review. Thanks! |
|
@chaehni Sorry to add another commit to your review. The scionlab environment appears not to have |
|
@mwfarb I had another look and my comments from above are addressed. I like that the apps are now installed instead of compiled for every run. I talked to Juan and we want to pre-install the apps in the VMs and run your webapp automatically. So we might only need to check if the apps are installed. (see netsec-ethz/scion-coord#228) |
|
The knob library has a non-standard way of displaying the text input box. Have you already tried to click on the number of packets and type in the number you want? If that is the root of setting the number of packets, I should change the display to look more like a standard input box. |
|
I didn't know you can enter it like this. |
|
@chaehni I'd like to update the dial visually in another PR. Ultimately I'd like hash marks for the range of values on the dial, and an input box that is more intuitive to edit. For now, I've added a line of instruction above the dials making it clear that numbers can be typed, edited, clicked, or scrolled to change. Integrating a new dial library now may drag use of other improvements out more weeks. |
chaehni
left a comment
There was a problem hiding this comment.
I went through the code and left some minor comments.
Also, I can not see where the timeDurationEst() function is used.
webapp/webapp.go
Outdated
| } | ||
|
|
||
| // Queries network interfaces and writes local client SCION addresses as json | ||
| func genClientNodeDefults(cli_fp string) { |
| } | ||
|
|
||
| // Handles loading index.html for user at root. | ||
| func mainHandler(w http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
In case of an error reading the index.html there is no response back to the browser. The request just times out.
There was a problem hiding this comment.
The same happens in the image handler when the file is not found. I think we should respond with an appropriate error code.
|
@mwfarb Thanks for your work. I think the instructions are good enough for now. We don't need to change the dials in this PR. |
|
OK, sounds good. I've removed the unused code and added the error messaging. |
webapp/webapp.go
Outdated
| data, err := ioutil.ReadFile(filepath) | ||
| if err != nil { | ||
| log.Fatal("ioutil.ReadFile() error: " + err.Error()) | ||
| fmt.Fprint(w, "Error: Unable to read "+filepath) |
There was a problem hiding this comment.
We should return here to ensure we don't have multiple writes to w.
Also, we could use the convenience function Error() to send the error. (https://golang.org/pkg/net/http/#Error)
There was a problem hiding this comment.
Great! Thanks for the tip to use http.Error() as well. Let me know if there are any more issues before merging.
There was a problem hiding this comment.
Looks good to me.
I think we can merge it.
- Added tabs for each app. - Moved client/server input into color static svg/inputs. - Moved css and js into separate files. - Added color arrows showing directionality of tests/content. - Moved console output into scrollable window. - Added bwtester tab with dials for each parameter/direction. - Fixed bwtester command arg formatting issue. - Added bwtester radio icon lock for each parameter. - Added bwtester feedback to alter non-locked dials on change. - Added bwtester feedback when change exceeds max on non-locked dial. - Added camerapp content over arrow, scaled to fit. - Added camerapp ability to click and expand image. - Added button disable when app is running. - Updated readme with new directions and screenshots. - Added tooltip note over args input about formatting. - Added red error message when user exceeds dial limits. - Restored html field validation for client and server. - Added select box preloading of known servers for each app. - Added select box preloading of local client network interfaces. - Adjusted default bind addresses to 0.0.0.0 where needed. - Mitgated issue with stale cached file browsing directory in Chrome. - Add go-watcher notes to readme. - Added install check for all apps on startup, prevents recompiling - Adjusted app calls to run locally. - Removed redundant client/server tests, which... - Resolved issue #36. - Updated readme with new build instructions. - Added bwtester instruction line to help editing understanding. - Addressed comments/code reviews.
dial.