ndt-project / ndt

Network Diagnostic Tool
Other
178 stars 45 forks source link

Decouple Websocket code from HTML front end #205

Closed nkinkade closed 8 years ago

nkinkade commented 8 years ago

The change set in this PR is intended to do a little better job of not making assumptions about the HTML front-end in the back-end javascript code. The goal is to allow anyone to reuse the back-end code mostly unaltered (perhaps as a git submodule) while having relative freedom to control the user interface. One specific use case for these changes will be on the M-Lab website (www.measurementlab.net), where a bit more stylistic control is needed for the UI. One non goal of this PR is that anything should change about the current behavior of the backed test or UI when run via fakewww in any deployment.

aaronmbr commented 8 years ago

This looks good. Thanks! A few minor comments, would it make sense to pass a URL around instead of just the hostname/port/protocol/path? Also, there are some "typeof == undefined" checks, would it make sense to ensure those variables always exist with some sane defaults?

Cheers, Aaron

nkinkade commented 8 years ago

Hi, Aaron. Sorry I missed your comments. Even though the PR is merged and closed, I wanted to address them for the sake of history.

Thanks!

Nathan