VRFS-351: integrated isp scoring artifacts

This commit is contained in:
Jonathan Kolyer 2013-06-09 09:12:03 -05:00
parent c5f79ecdaa
commit ecd7a1ecff
6 changed files with 72 additions and 0 deletions

View File

@ -177,6 +177,10 @@ class UsersController < ApplicationController
render :layout => 'landing'
end
def isp
render :layout => "landing"
end
private
def correct_user

View File

@ -0,0 +1,24 @@
<html>
<head>
<title>Test Internet Latency</title>
<script src="http://www.java.com/js/deployJava.js"></script>
</head>
<body>
<h1>My ISP is Time Warner</h1>
<script>
// using JavaScript to get location of JNLP
// file relative to HTML page
var dir = location.href.substring(0, location.href.lastIndexOf('/')+1);
var url = dir + "pingtw.jnlp";
deployJava.createWebStartLaunchButton(url, '1.6.0');
</script>
<h1>My ISP is Verizon</h1>
<script>
// using JavaScript to get location of JNLP
// file relative to HTML page
var dir = location.href.substring(0, location.href.lastIndexOf('/')+1);
var url = dir + "pingvz.jnlp";
deployJava.createWebStartLaunchButton(url, '1.6.0');
</script>
</body>
</html>

View File

@ -26,6 +26,8 @@ SampleApp::Application.routes.draw do
match '/auth/:provider/callback', :to => 'sessions#create_oauth'
match '/auth/failure', :to => 'sessions#failure'
match '/isp', :to => 'users#isp'
match '/help', to: 'static_pages#help'
match '/about', to: 'static_pages#about'
match '/contact', to: 'static_pages#contact'

BIN
public/ping.jar Normal file

Binary file not shown.

21
public/pingtw.jnlp Normal file
View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" href="pingtw.jnlp" codebase="https://dl.dropboxusercontent.com/u/5471230/ping">
<information>
<title>Ping</title>
<vendor>JamKazam</vendor>
</information>
<resources>
<!-- Application Resources -->
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="ping.jar" main="true"/>
</resources>
<application-desc name="Ping" main-class="com.jamkazam.ping.Ping" width="400" height="600">
<!-- usage: Ping [label=]addr[:port] ... [-c <count>] [-s <size>] -u <url> -i <isp> [-a] -->
<argument>foo=etch.dyndns.org:4442</argument>
<argument>bar=etch.dyndns.org:4442</argument>
<argument>-uhttp://www.jamkazam.com/api/users/isp_scoring</argument>
<argument>-itw</argument>
<argument>-a</argument>
</application-desc>
<update check="background"/>
</jnlp>

21
public/pingvz.jnlp Normal file
View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" href="pingvz.jnlp" codebase="https://dl.dropboxusercontent.com/u/5471230/ping">
<information>
<title>Ping</title>
<vendor>JamKazam</vendor>
</information>
<resources>
<!-- Application Resources -->
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="ping.jar" main="true"/>
</resources>
<application-desc name="Ping" main-class="com.jamkazam.ping.Ping" width="400" height="600">
<!-- usage: Ping [label=]addr[:port] ... [-c <count>] [-s <size>] -u <url> -i <isp> [-a] -->
<argument>foo=etch.dyndns.org:4442</argument>
<argument>bar=etch.dyndns.org:4442</argument>
<argument>-uhttp://www.jamkazam.com/api/users/isp_scoring</argument>
<argument>-ivz</argument>
<argument>-a</argument>
</application-desc>
<update check="background"/>
</jnlp>