vrfs-360: isp ping test page

This commit is contained in:
Jonathan Kolyer 2013-06-15 05:46:30 -05:00
parent a2bec565a7
commit a80bee8310
7 changed files with 16 additions and 10 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -218,11 +218,11 @@ class UsersController < ApplicationController
def isp
@isps = {
'tw' => 'Time Warner',
'vz' => 'Verizon',
'att' => 'AT&T',
'cc' => 'Comcast',
'other' => 'Other'
'tw' => ['Time Warner', 'tw.jpg'],
'vz' => ['Verizon', 'vz.png'],
'att' => ['AT&T', 'att.png'],
'cc' => ['Comcast', 'cc.png'],
'other' => ['Other', 'other.jpg']
}
render :layout => "landing"
end

View File

@ -1,13 +1,19 @@
<%= content_for(:title) { 'Internet Latency Test' }%>
<script src="http://www.java.com/js/deployJava.js"></script>
<% @isps.each do |isp_id, isp_name| %>
<div style='margin-bottom: 20px'>
<h1>My ISP is <%= isp_name %></h1>
<h1 style="text-align:center">JamKazam Internet Latency Test: Select your Internet Service Provider</h1>
<h2 style="text-align:center">Java must be installed to run this tool. Please select logo corresponding to your ISP, or if you're not sure, choose "Other". OSX not currently supported.</h2>
<div style="overflow:scroll; margin-left: 20px; margin-top: 20px; ">
<% @isps.each do |isp_id, isp_data| %>
<div style='margin-bottom: 30px; '>
<div>
<%= content_tag(:div, "My ISP is #{isp_data[0]}:") %>
<%= image_tag("isps/#{isp_data[1]}") %>
</div>
<script>
var url = "<%= isp_ping_url(:isp => isp_id, :format => :jnlp) %>";
deployJava.createWebStartLaunchButton(url, '1.6.0');
</script>
<p>Or click <%= link_to('here',isp_ping_url(isp_id)) %></p>
<!--<p>Or click <a href="http://192.168.1.10:3001/isp/ping<%=isp_id%>.jnlp">here</a>.</p>-->
<p>Or click <%= link_to('here',isp_ping_url(:isp => isp_id, :format => :jnlp)) %></p>
</div>
<% end %>
</div>