m-lab / ndt

Network Diagnostic Tool
Other
11 stars 7 forks source link

Removes Java option from HTML interface served by NDT sliver #73

Closed nkinkade closed 7 years ago

nkinkade commented 7 years ago

M-Lab hasn't supported the Java NDT test for a long time. We no longer even sign the Java applet that is deployed with NDT. However, the webserver built into NDT still serves a page which gives the user the option to run a test using either the Java applet or the WebSocket client, additionally adding a scary red warning that the WebSocket client is "beta".

This PR removes both the Java and WebSocket buttons, leaving on a single "Start Test" button. If the user's browser doesn't support WebSockets a red warning message is displayed and the "Start Test" button is effectively disabled.

I'm sure that a vanishingly small number of people or things run NDT tests directly from the NDT sliver (e.g., http://ndt.iupui.mlab1.den01.measurement-lab.org:7123), so this PR should be safe, and additionally inline with how we run the rest of the platform.

Additionally, the presence of the Java bits in the HTML interface interfere with stress and E2E testing in the testbed, requiring the Ops person running the tests to manually edit the HTML files in the NDT sliver. Not only this error prone, but modifying files deployed by the RPM package will cause the slicectrl init script to fail to restart the NDT service when it notices that files have been changed.

To see what these change look like on a live server, go to http://ndt.iupui.mlab1.lga0t.measurement-lab.org:7123/


This change is Reviewable

nkinkade commented 7 years ago

I fixed one unnecessary bit of indirection that Collin pointed out, and made a few other changes to script.js. Most prominently, I had previously failed to prevent the script from appending the Java applet to the DOM. Additionally, I was disabling the click on the "Start Test" button at one point in the code, but later on the click() even was being registered on the "Start Test" button, so clicking the button didn't appear to do much but it was actually launching the Java applet in the background. This should be cleared up now.