 + ') | ';
+ musicianHtml += '<' + val.name + ' | ';
instrumentHtml = '';
if (val.instruments) { // @FIXME: edge case for Test user that has no instruments?
@@ -75,6 +75,8 @@
});
$(hoverSelector).append(' Band Detail' + bandHtml);
+
+ context.JK.bindProfileClickEvents(hoverSelector);
configureActionButtons(response);
})
.fail(function(xhr) {
diff --git a/web/app/assets/javascripts/hoverFan.js b/web/app/assets/javascripts/hoverFan.js
index a68f65204..7bf13ec1c 100644
--- a/web/app/assets/javascripts/hoverFan.js
+++ b/web/app/assets/javascripts/hoverFan.js
@@ -36,19 +36,21 @@
followingHtml += ' ';
}
- var avatarUrl, profilePath;
+ var avatarUrl, attrId, type;
if (val.type === "band") {
avatarUrl = context.JK.resolveBandAvatarUrl(val.photo_url);
- profilePath = "bandProfile";
+ attrId = "band-id";
+ type = "band";
}
else {
avatarUrl = context.JK.resolveAvatarUrl(val.photo_url);
- profilePath = "profile";
+ attrId = "user-id";
+ type = "musician";
}
- followingHtml += ' | ';
- followingHtml += '' + val.name + ' | ';
+ followingHtml += ' | ';
+ followingHtml += '' + val.name + ' | ';
if (index % 2 > 0) {
followingHtml += ' ';
@@ -76,6 +78,8 @@
});
$(hoverSelector).append(' Fan Detail' + fanHtml);
+
+ context.JK.bindProfileClickEvents(hoverSelector);
configureActionButtons(response);
})
.fail(function(xhr) {
diff --git a/web/app/assets/javascripts/hoverMusician.js b/web/app/assets/javascripts/hoverMusician.js
index 360bc664d..985da502b 100644
--- a/web/app/assets/javascripts/hoverMusician.js
+++ b/web/app/assets/javascripts/hoverMusician.js
@@ -42,19 +42,21 @@
followingHtml += ' ';
}
- var avatarUrl, profilePath;
+ var avatarUrl, attrId, type;
if (val.type === "band") {
avatarUrl = context.JK.resolveBandAvatarUrl(val.photo_url);
- profilePath = "bandProfile";
+ attrId = "band-id";
+ type = "band";
}
else {
avatarUrl = context.JK.resolveAvatarUrl(val.photo_url);
- profilePath = "profile";
+ attrId = "user-id";
+ type = "musician";
}
- followingHtml += ' | ';
- followingHtml += '' + val.name + ' | ';
+ followingHtml += ' | ';
+ followingHtml += '' + val.name + ' | ';
if (index % 2 > 0) {
followingHtml += ' ';
@@ -101,6 +103,8 @@
});
$(hoverSelector).append(' Musician Detail' + musicianHtml);
+
+ context.JK.bindProfileClickEvents(hoverSelector);
configureActionButtons(response);
})
.fail(function(xhr) {
diff --git a/web/app/assets/javascripts/jam_rest.js b/web/app/assets/javascripts/jam_rest.js
index aa59990f7..3334d5c38 100644
--- a/web/app/assets/javascripts/jam_rest.js
+++ b/web/app/assets/javascripts/jam_rest.js
@@ -34,6 +34,30 @@
});
}
+ function legacyCreateSession(options) {
+ return $.ajax({
+ type: "POST",
+ dataType: "json",
+ contentType: 'application/json',
+ url: "/api/sessions/legacy",
+ processData:false,
+ data: JSON.stringify(options)});
+ }
+
+ function legacyJoinSession(options) {
+ var sessionId = options["session_id"];
+ delete options["session_id"];
+
+ return $.ajax({
+ type: "POST",
+ dataType: "json",
+ contentType: 'application/json',
+ url: "/api/sessions/" + sessionId + "/participants/legacy",
+ data: JSON.stringify(options),
+ processData:false
+ });
+ }
+
function findSessions(query) {
return $.ajax({
type: "GET",
@@ -109,7 +133,7 @@
function addPlayablePlay(playableId, playableType, claimedRecordingId, userId) {
if (playableType == 'JamRuby::Recording') {
context.JK.GA.trackRecordingPlay();
- } else if (playableType == 'JamRuby::MusicSessionHistory') {
+ } else if (playableType == 'JamRuby::MusicSession') {
context.JK.GA.trackSessionPlay();
}
return $.ajax({
@@ -961,6 +985,16 @@
url: '/api/sessions/' + musciSessionId + '/chats?' + $.param(options),
dataType: "json",
contentType: 'application/json'
+ })
+ };
+
+ function createDiagnostic(options) {
+ return $.ajax({
+ type: "POST",
+ url: '/api/diagnostics',
+ dataType: "json",
+ contentType: 'application/json',
+ data: JSON.stringify(options)
});
}
@@ -970,6 +1004,8 @@
// Expose publics
this.initialize = initialize;
+ this.legacyCreateSession = legacyCreateSession;
+ this.legacyJoinSession = legacyJoinSession;
this.getUserDetail = getUserDetail;
this.getCities = getCities;
this.getRegions = getRegions;
@@ -1048,6 +1084,7 @@
this.getNotifications = getNotifications;
this.createChatMessage = createChatMessage;
this.getChatMessages = getChatMessages;
+ this.createDiagnostic = createDiagnostic;
return this;
};
diff --git a/web/app/assets/javascripts/joinSession.js b/web/app/assets/javascripts/joinSession.js
index 25c3e3300..6de6ee73c 100644
--- a/web/app/assets/javascripts/joinSession.js
+++ b/web/app/assets/javascripts/joinSession.js
@@ -35,7 +35,7 @@
as_musician: true,
tracks: [ track ]
};
- var url = "/api/sessions/" + session_id + "/participants";
+ var url = "/api/sessions/" + session_id + "/participants/legacy";
$.ajax({
type: "POST",
dataType: "json",
diff --git a/web/app/assets/javascripts/jquery.listenbroadcast.js b/web/app/assets/javascripts/jquery.listenbroadcast.js
index fbbc090c7..5468a3236 100644
--- a/web/app/assets/javascripts/jquery.listenbroadcast.js
+++ b/web/app/assets/javascripts/jquery.listenbroadcast.js
@@ -92,7 +92,7 @@
// keep this after transition, because any transition clears this timer
waitForBufferingTimeout = setTimeout(noBuffer, WAIT_FOR_BUFFER_TIMEOUT);
- rest.addPlayablePlay(musicSessionId, 'JamRuby::MusicSessionHistory', null, context.JK.currentUserId);
+ rest.addPlayablePlay(musicSessionId, 'JamRuby::MusicSession', null, context.JK.currentUserId);
}
})
}
diff --git a/web/app/assets/javascripts/rateSessionDialog.js b/web/app/assets/javascripts/rateSessionDialog.js
new file mode 100644
index 000000000..644585bb5
--- /dev/null
+++ b/web/app/assets/javascripts/rateSessionDialog.js
@@ -0,0 +1,123 @@
+(function(context,$) {
+
+ "use strict";
+
+ context.JK = context.JK || {};
+ context.JK.RateSessionDialog = function(app) {
+ var logger = context.JK.logger;
+ var dialogId = 'rate-session-dialog';
+ var $scopeSelector = "[layout-id='rate-session-dialog']";
+ var clientId = context.JK.JamServer.clientID;
+
+ function reset() {
+ clientId = context.JK.JamServer.clientID;
+ $('#btn-rate-session-up', $scopeSelector).removeClass('selected');
+ $('#btn-rate-session-down', $scopeSelector).removeClass('selected');
+ $('#txt-rate-session-comment',"[layout-id='rate-session-dialog']").val('');
+ }
+
+ function showDialog() {
+ if (clientId) {
+ reset();
+ $.ajax({
+ type: "GET",
+ url: "/api/participant_histories/"+clientId
+ }).done(function (response) {
+ if (response &&
+ response.hasOwnProperty('should_rate_session') &&
+ true==response['should_rate_session']) {
+ app.layout.showDialog(dialogId);
+ }
+ });
+ return true;
+ }
+ return false;
+ }
+
+ function closeDialog() {
+ app.layout.closeDialog(dialogId);
+ }
+
+ function getRating() {
+ if ($('#btn-rate-session-down', $scopeSelector).hasClass('selected')) {
+ return -1;
+ } else if ($('#btn-rate-session-up', $scopeSelector).hasClass('selected')) {
+ return 1;
+ }
+ return 0;
+ }
+
+ function getComment() {
+ return $('#txt-rate-session-comment',"[layout-id='rate-session-dialog']").val();
+ }
+
+ function events() {
+ $('#btn-rate-session-cancel', $scopeSelector).click(function(evt) {
+ closeDialog();
+ });
+ $('#btn-rate-session-up', $scopeSelector).click(function(evt) {
+ if ($(this).hasClass('selected')) {
+ $(this).removeClass('selected')
+ } else {
+ $(this).addClass('selected');
+ }
+ if ($('#btn-rate-session-down').hasClass('selected')) {
+ $('#btn-rate-session-down').removeClass('selected')
+ }
+ return false;
+ });
+ $('#btn-rate-session-down', $scopeSelector).click(function(evt) {
+ if ($(this).hasClass('selected')) {
+ $(this).removeClass('selected')
+ } else {
+ $(this).addClass('selected');
+ }
+ if ($('#btn-rate-session-up').hasClass('selected')) {
+ $('#btn-rate-session-up').removeClass('selected')
+ }
+ return false;
+ });
+ $('#btn-rate-session-send', $scopeSelector).click(function(evt) {
+ var rr = getRating(), cc = getComment();
+ if (0 == rr && 0 == cc.length) {
+ closeDialog();
+ return false;
+ }
+ var url = "/api/participant_histories/"+clientId+"/rating";
+ $.ajax({
+ type: "POST",
+ url: url,
+ data: { rating: getRating(), comment: getComment() }
+ }).done(function (response) {
+ var qq = getRating();
+ if (0 < qq) {
+ context.JK.GA.trackSessionQuality(context.JK.GA.SessionQualityTypes.good);
+ } else if (0 > qq){
+ context.JK.GA.trackSessionQuality(context.JK.GA.SessionQualityTypes.poor);
+ }
+ closeDialog();
+ });
+ return false;
+ });
+ }
+
+ function beforeShow(data) {
+ // confirm user should see dialog
+ }
+
+ function afterShow(data) {
+ }
+
+ function initialize() {
+ var dialogBindings = {
+ 'beforeShow' : beforeShow,
+ 'afterShow' : afterShow
+ };
+ app.bindDialog(dialogId, dialogBindings);
+ events();
+ }
+
+ this.initialize = initialize;
+ this.showDialog = showDialog;
+ };
+})(window,jQuery);
diff --git a/web/app/assets/javascripts/session.js b/web/app/assets/javascripts/session.js
index e667e27c0..8f9da6756 100644
--- a/web/app/assets/javascripts/session.js
+++ b/web/app/assets/javascripts/session.js
@@ -31,6 +31,7 @@
var playbackControls = null;
var promptLeave = false;
var backendMixerAlertThrottleTimer = null;
+ var rateSessionDialog = null;
var rest = context.JK.Rest();
@@ -1305,15 +1306,27 @@
}
}
+ function bailOut() {
+ promptLeave = false;
+ context.window.location = '/client#/home';
+ }
+
function sessionLeave(evt) {
evt.preventDefault();
-
- promptLeave = false;
- context.window.location = '/client#/home';
-
+ rateSession();
+ bailOut();
return false;
}
+ function rateSession() {
+ if (rateSessionDialog === null) {
+ rateSessionDialog = new context.JK.RateSessionDialog(context.JK.app);
+ rateSessionDialog.initialize();
+ }
+ rateSessionDialog.showDialog();
+ return true;
+ }
+
function sessionResync(evt) {
evt.preventDefault();
var response = context.jamClient.SessionAudioResync();
diff --git a/web/app/assets/javascripts/sessionModel.js b/web/app/assets/javascripts/sessionModel.js
index abdabe683..791503e06 100644
--- a/web/app/assets/javascripts/sessionModel.js
+++ b/web/app/assets/javascripts/sessionModel.js
@@ -361,17 +361,11 @@
client_id: clientId,
ip_address: server.publicIP,
as_musician: true,
- tracks: tracks
+ tracks: tracks,
+ session_id: sessionId
};
- var url = "/api/sessions/" + sessionId + "/participants";
- return $.ajax({
- type: "POST",
- dataType: "json",
- contentType: 'application/json',
- url: url,
- data: JSON.stringify(data),
- processData:false
- });
+
+ return rest.legacyJoinSession(data);
}
function leaveSessionRest(sessionId) {
diff --git a/web/app/assets/javascripts/utils.js b/web/app/assets/javascripts/utils.js
index 0140c1b9f..fd689608d 100644
--- a/web/app/assets/javascripts/utils.js
+++ b/web/app/assets/javascripts/utils.js
@@ -607,6 +607,9 @@
doneYet();
};
+ context.JK.clientType = function () {
+ return context.jamClient.IsNativeClient() ? 'client' : 'browser';
+ }
/**
* Returns 'MacOSX' if the os appears to be macintosh,
* 'Win32' if the os appears to be windows,
diff --git a/web/app/assets/javascripts/web/recordings.js b/web/app/assets/javascripts/web/recordings.js
index 1fecac65b..c83b42007 100644
--- a/web/app/assets/javascripts/web/recordings.js
+++ b/web/app/assets/javascripts/web/recordings.js
@@ -94,6 +94,7 @@
$(".landing-comment-scroller").prepend(commentHtml);
}
+ context.JK.bindProfileClickEvents();
context.JK.bindHoverEvents();
}
diff --git a/web/app/assets/javascripts/web/sessions.js b/web/app/assets/javascripts/web/sessions.js
index c31bd62c7..66fadcbfb 100644
--- a/web/app/assets/javascripts/web/sessions.js
+++ b/web/app/assets/javascripts/web/sessions.js
@@ -49,6 +49,7 @@
$(".landing-comment-scroller").prepend(commentHtml);
}
+ context.JK.bindProfileClickEvents();
context.JK.bindHoverEvents();
}
@@ -129,7 +130,6 @@
$("#btnLike").click(like);
$playButton.trigger('click');
-
pollForUpdates(musicSessionId);
}
diff --git a/web/app/assets/stylesheets/client/gearWizard.css.scss b/web/app/assets/stylesheets/client/gearWizard.css.scss
index f2c635714..aa2ac4bf6 100644
--- a/web/app/assets/stylesheets/client/gearWizard.css.scss
+++ b/web/app/assets/stylesheets/client/gearWizard.css.scss
@@ -207,6 +207,39 @@
font-size:15px;
@include border_box_sizing;
height:64px;
+
+ &.good {
+ background-color:#72a43b;
+ }
+ &.acceptable {
+ background-color:#cc9900;
+ }
+ &.bad, &.skip {
+ background-color:#660000;
+ }
+ &.unknown {
+ background-color:#999;
+ }
+ }
+
+ .io-countdown {
+ display:none;
+ padding-left:19px;
+ position:relative;
+
+ .secs {
+ position:absolute;
+ width:19px;
+ left:0;
+ }
+ }
+
+ .io-skip-msg {
+ display:none;
+
+ .scoring-section.skip & {
+ display:inline;
+ }
}
}
diff --git a/web/app/assets/stylesheets/client/session.css.scss b/web/app/assets/stylesheets/client/session.css.scss
index cd389c60f..387352b0d 100644
--- a/web/app/assets/stylesheets/client/session.css.scss
+++ b/web/app/assets/stylesheets/client/session.css.scss
@@ -727,4 +727,26 @@ table.vu td {
#update-session-invite-musicians {
margin: 10px;
-}
\ No newline at end of file
+}
+
+.rate-thumbsup {
+ width:64px;
+ height:64px;
+ display:inline-block;
+ background-image:url('/assets/content/icon_thumbsup_big_off.png');
+}
+
+.rate-thumbsup.selected {
+ background-image:url('/assets/content/icon_thumbsup_big_on.png');
+}
+
+.rate-thumbsdown {
+ width:64px;
+ height:64px;
+ display:inline-block;
+ background-image:url('/assets/content/icon_thumbsdown_big_off.png');
+}
+
+.rate-thumbsdown.selected {
+ background-image:url('/assets/content/icon_thumbsdown_big_on.png');
+}
diff --git a/web/app/controllers/api_chats_controller.rb b/web/app/controllers/api_chats_controller.rb
index 9f1e1d491..4a58fd164 100644
--- a/web/app/controllers/api_chats_controller.rb
+++ b/web/app/controllers/api_chats_controller.rb
@@ -25,7 +25,7 @@ class ApiChatsController < ApiController
end
def check_session
- @music_session = MusicSession.find(params[:music_session])
+ @music_session = ActiveMusicSession.find(params[:music_session])
if @music_session.nil?
raise ArgumentError, 'specified session not found'
end
diff --git a/web/app/controllers/api_diagnostics_controller.rb b/web/app/controllers/api_diagnostics_controller.rb
new file mode 100644
index 000000000..ac8a17ce9
--- /dev/null
+++ b/web/app/controllers/api_diagnostics_controller.rb
@@ -0,0 +1,16 @@
+class ApiDiagnosticsController < ApiController
+
+ before_filter :api_signed_in_user
+ respond_to :json
+
+ def create
+ @diagnostic = Diagnostic.new
+ @diagnostic.type = params[:type]
+ @diagnostic.data = params[:data].to_json if params[:data]
+ @diagnostic.user = current_user
+ @diagnostic.creator = Diagnostic::CLIENT
+ @diagnostic.save
+
+ respond_with_model(@diagnostic, new: true)
+ end
+end
diff --git a/web/app/controllers/api_music_sessions_controller.rb b/web/app/controllers/api_music_sessions_controller.rb
index a7d96b3d1..1f5929394 100644
--- a/web/app/controllers/api_music_sessions_controller.rb
+++ b/web/app/controllers/api_music_sessions_controller.rb
@@ -22,7 +22,7 @@ class ApiMusicSessionsController < ApiController
# Importantly, friends_only and my_bands_only are ORed not ANDed. So, if you specify both as true, you'll get more
# results than if only one or the other is true, not fewer. if either is true you won't see the "everything else"
# sessions.
- @music_sessions = MusicSession.index(current_user,
+ @music_sessions = ActiveMusicSession.index(current_user,
participants: params[:participants],
genres: params[:genres],
friends_only: params[:friends_only],
@@ -48,7 +48,7 @@ class ApiMusicSessionsController < ApiController
# Importantly, friends_only and my_bands_only are ORed not ANDed. So, if you specify both as true, you'll get more
# results than if only one or the other is true, not fewer. if either is true you won't see the "everything else"
# sessions.
- @music_sessions = MusicSession.nindex(current_user,
+ @music_sessions = ActiveMusicSession.nindex(current_user,
client_id: params[:client_id],
participants: params[:participants],
genres: params[:genres],
@@ -60,39 +60,68 @@ class ApiMusicSessionsController < ApiController
limit: params[:limit])
end
- def create
+ def create_legacy
client_id = params[:client_id]
if client_id.nil?
raise JamArgumentError, "client_id must be specified"
end
- if !params[:intellectual_property]
+ unless params[:intellectual_property]
raise JamArgumentError, "You must agree to the intellectual property terms"
end
band = Band.find(params[:band]) unless params[:band].nil?
- @music_session = MusicSessionManager.new.create(
- current_user,
- client_id,
- params[:description],
- params[:musician_access],
- params[:approval_required],
- params[:fan_chat],
- params[:fan_access],
- band,
- params[:genres],
- params[:tracks],
- params[:legal_terms])
+ # creating the MusicSession right here was added as part of the scheduled sessions changes
+ # Why? The new order of things is to always have a MusicSession before a ActiveMusicSession
+ # So, we have to make MusicSession, and pass in it's .id to MusicSessionManager.new.create()
+ # so that the ActiveMusicSession can have the same .id as the MusicSession
+ history = MusicSession.new
+ history.name = params[:description][0..40]
+ history.description = params[:description]
+ history.musician_access = params[:musician_access]
+ history.approval_required = params[:approval_required]
+ history.fan_chat = params[:fan_chat]
+ history.fan_access = params[:fan_access]
+ history.band = band
+ history.genre_id = (params[:genres].length > 0 ? params[:genres][0] : nil) if params[:genres]
+ history.legal_terms = params[:legal_terms]
+ history.language = 'english'
+ history.legal_policy = 'standard'
+ history.creator = current_user
+ history.save
- if @music_session.errors.any?
- # we have to do this because api_session_detail_url will fail with a bad @music_session
+ if history.errors.any?
+ @music_session = history
response.status = :unprocessable_entity
respond_with @music_session
else
- respond_with @music_session, responder: ApiResponder, :location => api_session_detail_url(@music_session)
+ history.reload # to get .id back
+ @music_session = MusicSessionManager.new.create(
+ history,
+ current_user,
+ client_id,
+ params[:description],
+ params[:musician_access],
+ params[:approval_required],
+ params[:fan_chat],
+ params[:fan_access],
+ band,
+ params[:genres],
+ params[:tracks],
+ params[:legal_terms])
+
+ if @music_session.errors.any?
+ response.status = :unprocessable_entity
+ respond_with @music_session
+ else
+ respond_with @music_session, responder: ApiResponder, :location => api_session_detail_url(@music_session)
+ end
end
+
+
+
end
def show
@@ -103,7 +132,7 @@ class ApiMusicSessionsController < ApiController
def update
@music_session = MusicSessionManager.new.update(
- @music_session,
+ @music_session.music_session,
params[:description],
params[:genres],
params[:musician_access],
@@ -124,7 +153,7 @@ class ApiMusicSessionsController < ApiController
@connection = Connection.find_by_client_id(params[:id])
end
- def participant_create
+ def participant_create_legacy
@connection = MusicSessionManager.new.participant_create(
current_user,
params[:id],
@@ -144,23 +173,34 @@ class ApiMusicSessionsController < ApiController
client_id = params[:id]
if client_id.present? && client_id != 'undefined'
@connection = Connection.find_by_client_id!(client_id)
- music_session = MusicSession.find(@connection.music_session_id)
+ music_session = ActiveMusicSession.find(@connection.music_session_id)
MusicSessionManager.new.participant_delete(current_user, @connection, music_session)
end
respond_with @connection, responder: ApiResponder
end
def participant_rating
- @history = MusicSessionUserHistory.find(params[:id])
- @history.rating = params[:rating]
- @history.save
+ if @history = MusicSessionUserHistory.latest_history(params[:client_id])
+ if request.post?
+ @history.add_rating(params[:rating], params[:comment])
+ @history.save
- if @history.errors.any?
- response.status = :unprocessable_entity
- respond_with @history
- else
- render :json => {}, :status => :ok
+ if @history.errors.any?
+ response.status = :unprocessable_entity
+ respond_with @history
+ else
+ if @history.good_rating? && @history.user.first_good_music_session_at.nil?
+ @history.user.first_good_music_session_at = Time.now
+ @history.user.save
+ end
+ render :json => {}, :status => :ok
+ end
+ elsif request.get?
+ render :json => { :should_rate_session => @history.should_rate_session? }, :status => :ok
end
+ else
+ render :json => { :message => ValidationMessages::SESSION_NOT_FOUND }, :status => 404
+ end
end
def track_index
@@ -231,12 +271,12 @@ class ApiMusicSessionsController < ApiController
# example of using curl to access this API:
# curl -L -T some_file -X PUT http://localhost:3000/api/sessions/[SESSION_ID]/perf.json?client_id=[CLIENT_ID]
- music_session_history = MusicSessionHistory.find(params[:id])
+ music_session = MusicSession.find(params[:id])
msuh = MusicSessionUserHistory.find_by_client_id(params[:client_id])
@perfdata = MusicSessionPerfData.new
@perfdata.client_id = params[:client_id]
- @perfdata.music_session_history = music_session_history
+ @perfdata.music_session = music_session
unless @perfdata.save
# we have to do this because api_session_detail_url will fail with a bad @music_session
response.status = :unprocessable_entity
@@ -329,7 +369,7 @@ class ApiMusicSessionsController < ApiController
end
def history_show
- @history = MusicSessionHistory.find(params[:id])
+ @history = MusicSession.find(params[:id])
end
def claimed_recording_start
@@ -359,7 +399,7 @@ class ApiMusicSessionsController < ApiController
private
def lookup_session
- @music_session = MusicSession.find(params[:id])
+ @music_session = ActiveMusicSession.find(params[:id])
end
end
diff --git a/web/app/controllers/api_recordings_controller.rb b/web/app/controllers/api_recordings_controller.rb
index a694d7403..478a3aeee 100644
--- a/web/app/controllers/api_recordings_controller.rb
+++ b/web/app/controllers/api_recordings_controller.rb
@@ -48,12 +48,10 @@ class ApiRecordingsController < ApiController
else
render :json => { :message => "download limit surpassed" }, :status => 404
end
-
-
end
def start
- music_session = MusicSession.find(params[:music_session_id])
+ music_session = ActiveMusicSession.find(params[:music_session_id])
raise PermissionError, ValidationMessages::PERMISSION_VALIDATION_ERROR unless music_session.users.exists?(current_user)
diff --git a/web/app/controllers/api_users_controller.rb b/web/app/controllers/api_users_controller.rb
index 97fb849c7..56b408ea5 100644
--- a/web/app/controllers/api_users_controller.rb
+++ b/web/app/controllers/api_users_controller.rb
@@ -555,14 +555,14 @@ class ApiUsersController < ApiController
def share_session
provider = params[:provider]
music_session_id = params[:music_session]
- history = MusicSessionHistory.find(music_session_id)
+ history = MusicSession.find(music_session_id)
if provider == 'facebook'
render json: {
- description: view_context.description_for_music_session_history(history),
- title: view_context.title_for_music_session_history(history, current_user),
- photo_url: view_context.facebook_image_for_music_session_history(history),
+ description: view_context.description_for_music_session(history),
+ title: view_context.title_for_music_session(history, current_user),
+ photo_url: view_context.facebook_image_for_music_session(history),
url: share_token_url(history.share_token.token),
caption: 'www.jamkazam.com'
}, status: 200
@@ -570,7 +570,7 @@ class ApiUsersController < ApiController
elsif provider == 'twitter'
render json: {
- message: view_context.title_for_music_session_history(history, current_user)
+ message: view_context.title_for_music_session(history, current_user)
}, status: 200
else
diff --git a/web/app/controllers/music_sessions_controller.rb b/web/app/controllers/music_sessions_controller.rb
index b40914178..d25749826 100644
--- a/web/app/controllers/music_sessions_controller.rb
+++ b/web/app/controllers/music_sessions_controller.rb
@@ -3,7 +3,7 @@ class MusicSessionsController < ApplicationController
respond_to :html
def show
- @music_session = MusicSessionHistory.find(params[:id])
+ @music_session = MusicSession.find(params[:id])
render :layout => "web"
end
diff --git a/web/app/controllers/ping_controller.rb b/web/app/controllers/ping_controller.rb
index fb1fdea5b..b307de35f 100644
--- a/web/app/controllers/ping_controller.rb
+++ b/web/app/controllers/ping_controller.rb
@@ -28,4 +28,9 @@ class PingController < ApplicationController
render 'pingvz.jnlp', :content_type => JNLP
end
+ def icon
+ redirect_to '/assets/isps/ping-icon.jpg'
+ #send_file Rails.root.join("app", "assets", "images", "isps", "ping-icon.jpg"), type: "image/jpg", disposition: "inline"
+ end
+
end
diff --git a/web/app/controllers/spikes_controller.rb b/web/app/controllers/spikes_controller.rb
index 29bc4337b..75cde8a49 100644
--- a/web/app/controllers/spikes_controller.rb
+++ b/web/app/controllers/spikes_controller.rb
@@ -16,7 +16,7 @@ class SpikesController < ApplicationController
end
#as_musician = false is the critical search criteria for sessions to list correctly
- @music_sessions = MusicSession.index(current_user, as_musician: false)
+ @music_sessions = ActiveMusicSession.index(current_user, as_musician: false)
render :layout => 'web'
end
diff --git a/web/app/helpers/event_session_helper.rb b/web/app/helpers/event_session_helper.rb
index 2e9fb3f1d..71ac4a38b 100644
--- a/web/app/helpers/event_session_helper.rb
+++ b/web/app/helpers/event_session_helper.rb
@@ -44,7 +44,7 @@ module EventSessionHelper
# if so, then we are playing.
# if there has been none, we say it's still coming,
# if there has been at least one, and it's over, we say session over
- query = MusicSessionHistory.where(fan_access: true).where(created_at: (event_session.starts_at - 12.hours)..(event_session.ends_at + 12.hours))
+ query = MusicSession.where(fan_access: true).where(created_at: (event_session.starts_at - 12.hours)..(event_session.ends_at + 12.hours))
if event_session.user_id
query = query.where(user_id: event_session.user_id)
elsif event_session.band_id
@@ -62,14 +62,14 @@ module EventSessionHelper
state = event_session.pinned_state if event_session.pinned_state
if state
- music_session_history = fetch_last_session(event_session)
+ music_session = fetch_last_session(event_session)
elsif !state && (event_session.starts_at && event_session.ends_at && (event_session.user_id || event_session.band_id))
- music_session_history = fetch_last_session(event_session)
+ music_session = fetch_last_session(event_session)
- if music_session_history
- if music_session_history.session_removed_at
+ if music_session
+ if music_session.session_removed_at
state = 'over'
else
state = 'playing'
@@ -80,9 +80,9 @@ module EventSessionHelper
end
if state == 'over'
- content_tag(:a, 'SESSION ENDED', href: music_session_history.nil? ? '#' : music_session_detail_path(music_session_history.id), class: 'button-grey')
+ content_tag(:a, 'SESSION ENDED', href: music_session.nil? ? '#' : music_session_detail_path(music_session.id), class: 'button-grey')
elsif state == 'playing'
- content_tag(:a, '', href: music_session_detail_path(music_session_history.id), class: 'button-orange') do
+ content_tag(:a, '', href: music_session_detail_path(music_session.id), class: 'button-orange') do
content_tag(:span, image_tag('content/icon_playbutton.png', :width => 20, height: 20, align: 'absmiddle', class:'listen-now-play') + 'LISTEN NOW')
end
elsif state == 'not_started'
diff --git a/web/app/helpers/feeds_helper.rb b/web/app/helpers/feeds_helper.rb
index 2929b89e2..1f9f135b6 100644
--- a/web/app/helpers/feeds_helper.rb
+++ b/web/app/helpers/feeds_helper.rb
@@ -1,42 +1,42 @@
module FeedsHelper
- def session_artist_name(music_session_history)
- (music_session_history.band.nil? ? nil : music_session_history.band.name) || music_session_history.user.name
+ def session_artist_name(music_session)
+ (music_session.band.nil? ? nil : music_session.band.name) || music_session.creator.name
end
- def session_artist_id(music_session_history)
- (music_session_history.band.nil? ? nil : music_session_history.band.id) || music_session_history.user.id
+ def session_artist_id(music_session)
+ (music_session.band.nil? ? nil : music_session.band.id) || music_session.creator.id
end
- def session_artist_hoveraction(music_session_history)
- music_session_history.band.nil? ? 'musician' : 'band'
+ def session_artist_hoveraction(music_session)
+ music_session.band.nil? ? 'musician' : 'band'
end
- def session_artist_datakey(music_session_history)
- music_session_history.band.nil? ? 'user-id' : 'band-id'
+ def session_artist_datakey(music_session)
+ music_session.band.nil? ? 'user-id' : 'band-id'
end
- def session_avatar(music_session_history)
- image_tag resolve_avatarables(music_session_history.band, music_session_history.user)
+ def session_avatar(music_session)
+ image_tag resolve_avatarables(music_session.band, music_session.creator)
end
- def session_duration_value(music_session_history)
- if music_session_history.session_removed_at.nil?
- Time.now - music_session_history.created_at
+ def session_duration_value(music_session)
+ if music_session.session_removed_at.nil?
+ Time.now - music_session.created_at
else
- music_session_history.session_removed_at - music_session_history.created_at
+ music_session.session_removed_at - music_session.created_at
end
end
- def session_duration(music_session_history, options={})
- duration(session_duration_value(music_session_history), options)
+ def session_duration(music_session, options={})
+ duration(session_duration_value(music_session), options)
end
- def session_text(music_session_history)
- if music_session_history.is_over?
+ def session_text(music_session)
+ if music_session.is_over?
'SESSION ENDED'
else
- if music_session_history.fan_access
- if music_session_history.music_session && music_session_history.music_session.mount
+ if music_session.fan_access
+ if music_session.active_music_session && music_session.active_music_session.mount
'SESSION IN PROGRESS'
else
'BROADCASTING OFFLINE' # if you see this in development, you need to set up icecast. If you see this in production, it's not healthy
@@ -47,15 +47,13 @@ module FeedsHelper
end
end
- def session_description(music_session_history)
- music_session_history.description
+ def session_description(music_session)
+ music_session.description
end
# grabs 1st genre
- def session_genre(music_session_history)
- genres_array = music_session_history.genres.nil? ? [] : music_session_history.genres.split(MusicSessionHistory::SEPARATOR)
- genre = genres_array.length > 0 ? Genre.find_by_id(genres_array[0]) : nil
- genre.nil? ? '' : genre.description
+ def session_genre(music_session)
+ music_session.genre.description
end
def recording_artist_name(recording)
diff --git a/web/app/helpers/music_session_helper.rb b/web/app/helpers/music_session_helper.rb
index a9e733f40..de1956c25 100644
--- a/web/app/helpers/music_session_helper.rb
+++ b/web/app/helpers/music_session_helper.rb
@@ -1,6 +1,6 @@
module MusicSessionHelper
- def facebook_image_for_music_session_history(music_session)
+ def facebook_image_for_music_session(music_session)
if music_session.band
path = !music_session.band.large_photo_url.blank? ? music_session.band.large_photo_url : "/assets/web/logo-256.png"
else
@@ -10,8 +10,8 @@ module MusicSessionHelper
request.protocol + request.host_with_port + path
end
- # careful; this mirrors logic of facebook_image_for_music_session_history
- def facebook_image_size_for_music_session_history(music_session)
+ # careful; this mirrors logic of facebook_image_for_music_session
+ def facebook_image_size_for_music_session(music_session)
if music_session.band
!music_session.band.large_photo_url.blank? ? 200 : 256
else
@@ -19,7 +19,7 @@ module MusicSessionHelper
end
end
- def title_for_music_session_history(music_session, sharer = nil)
+ def title_for_music_session(music_session, sharer = nil)
if music_session.band
"LIVE SESSION: #{music_session.band.name}"
else
@@ -27,7 +27,7 @@ module MusicSessionHelper
if sharer && unique_users.exists?(sharer)
"LIVE SESSION: #{sharer.name}#{additional_member_count(unique_users)}"
else
- "LIVE SESSION: #{music_session.user.name}#{additional_member_count(unique_users)}"
+ "LIVE SESSION: #{music_session.creator.name}#{additional_member_count(unique_users)}"
end
end
@@ -42,7 +42,7 @@ module MusicSessionHelper
end
end
- def description_for_music_session_history(music_session)
+ def description_for_music_session(music_session)
truncate(music_session.description, length:250)
end
end
diff --git a/web/app/helpers/recording_helper.rb b/web/app/helpers/recording_helper.rb
index d443c475d..0c7b4030d 100644
--- a/web/app/helpers/recording_helper.rb
+++ b/web/app/helpers/recording_helper.rb
@@ -10,7 +10,7 @@ module RecordingHelper
request.protocol + request.host_with_port + path
end
- # careful; this mirrors logic of facebook_image_for_music_session_history
+ # careful; this mirrors logic of facebook_image_for_music_session
def facebook_image_size_for_claimed_recording(claimed_recording)
if claimed_recording.recording.band
!claimed_recording.recording.band.large_photo_url.blank? ? 200 : 256
diff --git a/web/app/views/api_feeds/show.rabl b/web/app/views/api_feeds/show.rabl
index eaa514c05..03a8ad2c5 100644
--- a/web/app/views/api_feeds/show.rabl
+++ b/web/app/views/api_feeds/show.rabl
@@ -1,10 +1,10 @@
object @feed
-glue :music_session_history do
+glue :music_session do
node :type do |i|
- 'music_session_history'
+ 'music_session'
end
attributes :id, :description, :genres, :created_at, :session_removed_at, :comment_count, :like_count, :play_count, :fan_access, :is_over?, :has_mount?
@@ -12,7 +12,7 @@ glue :music_session_history do
node do |history|
{
helpers: {
- avatar: asset_path(resolve_avatarables(history.band, history.user)),
+ avatar: asset_path(resolve_avatarables(history.band, history.creator)),
artist_name: session_artist_name(history),
artist_id: session_artist_id(history),
artist_datakey: session_artist_datakey(history),
@@ -27,7 +27,7 @@ glue :music_session_history do
}
end
- child(:user => :creator) {
+ child(:creator => :creator) {
attributes :id, :first_name, :last_name, :photo_url
}
@@ -60,7 +60,7 @@ glue :music_session_history do
attributes :id, :name, :location, :photo_url
}
- child(:music_session => :music_session) do
+ child(:active_music_session => :music_session) do
# only show mount info if fan_access is public. Eventually we'll also need to show this in other scenarios, like if invited
child({:mount => :mount}, :if => lambda { |music_session| music_session.fan_access}) {
attributes :id, :name, :sourced, :listeners, :bitrate, :subtype, :url
diff --git a/web/app/views/api_music_sessions/claimed_recording_start.rabl b/web/app/views/api_music_sessions/claimed_recording_start.rabl
new file mode 100644
index 000000000..e34b6943d
--- /dev/null
+++ b/web/app/views/api_music_sessions/claimed_recording_start.rabl
@@ -0,0 +1,3 @@
+object @music_session
+
+extends "api_music_sessions/show"
\ No newline at end of file
diff --git a/web/app/views/api_music_sessions/claimed_recording_stop.rabl b/web/app/views/api_music_sessions/claimed_recording_stop.rabl
new file mode 100644
index 000000000..e34b6943d
--- /dev/null
+++ b/web/app/views/api_music_sessions/claimed_recording_stop.rabl
@@ -0,0 +1,3 @@
+object @music_session
+
+extends "api_music_sessions/show"
\ No newline at end of file
diff --git a/web/app/views/api_music_sessions/create_legacy.rabl b/web/app/views/api_music_sessions/create_legacy.rabl
new file mode 100644
index 000000000..e34b6943d
--- /dev/null
+++ b/web/app/views/api_music_sessions/create_legacy.rabl
@@ -0,0 +1,3 @@
+object @music_session
+
+extends "api_music_sessions/show"
\ No newline at end of file
diff --git a/web/app/views/api_music_sessions/history_show.rabl b/web/app/views/api_music_sessions/history_show.rabl
index 9d22fd4ab..40a5bbc52 100644
--- a/web/app/views/api_music_sessions/history_show.rabl
+++ b/web/app/views/api_music_sessions/history_show.rabl
@@ -1,33 +1,146 @@
object @history
-attributes :id, :music_session_id, :description, :fan_access, :genres, :like_count, :comment_count, :created_at
+if !current_user
+ # there should be more data returned, but we need to think very carefully about what data is public for a music session
+ attributes :id
-node :share_url do |history|
- unless history.share_token.nil?
- share_token_url(history.share_token.token)
+ child(:active_music_session => :active_music_session) {
+ node do |music_session|
+ child({:mount => :mount}, :if => lambda { |music_session| music_session.fan_access}) {
+ attributes :id, :name, :sourced, :listeners, :bitrate, :subtype, :url
+ node(:mime_type) { |mount| mount.resolve_string(:mime_type) }
+ node(:bitrate) { |mount| mount.resolve_string(:bitrate) }
+ node(:subtype) { |mount| mount.resolve_string(:subtype) }
+ }
+ end
+ }
+else
+
+ attributes :id, :music_session_id, :description, :musician_access, :approval_required, :fan_access, :fan_chat,
+ :band_id, :user_id, :genre_id, :created_at, :like_count, :comment_count
+
+ node :share_url do |history|
+ unless history.share_token.nil?
+ share_token_url(history.share_token.token)
+ end
end
-end
-child(:user => :creator) {
- attributes :name, :photo_url
-}
-
-child(:band => :band) {
- attributes :name, :photo_url
-}
-
-child(:music_session_user_histories => :users) {
- attributes :instruments
-
- child(:user => :user) {
+ child(:creator => :creator) {
attributes :name, :photo_url
}
-}
-child(:comments => :comments) {
- attributes :comment, :created_at
-
- child(:user => :creator) {
- attributes :id, :first_name, :last_name, :name, :photo_url, :musician
+ child(:band => :band) {
+ attributes :name, :photo_url
}
-}
\ No newline at end of file
+
+ child(:music_session_user_histories => :users) {
+ attributes :instruments
+
+ child(:user => :user) {
+ attributes :name, :photo_url
+ }
+ }
+
+ child(:comments => :comments) {
+ attributes :comment, :created_at
+
+ child(:user => :creator) {
+ attributes :id, :first_name, :last_name, :name, :photo_url, :musician
+ }
+ }
+
+ child(:active_music_session => :active_music_session) {
+ attributes :claimed_recording_initiator_id, :track_changes_counter
+
+ node :genres do |item|
+ [item.genre.description] # XXX: need to return single genre; not array
+ end
+
+ if :is_recording?
+ node do |music_session|
+ { :recording => partial("api_recordings/show", :object => music_session.recording) }
+ end
+ end
+
+ node :share_url do |music_session|
+ unless music_session.music_session.share_token.nil?
+ share_token_url(music_session.music_session.share_token.token)
+ end
+ end
+
+ child(:connections => :participants) {
+ collection @music_sessions, :object_root => false
+ attributes :ip_address, :client_id, :joined_session_at
+
+ node :user do |connection|
+ { :id => connection.user.id, :photo_url => connection.user.photo_url, :name => connection.user.name, :is_friend => connection.user.friends?(current_user), :connection_state => connection.aasm_state }
+ end
+
+ child(:tracks => :tracks) {
+ attributes :id, :connection_id, :instrument_id, :sound, :client_track_id, :updated_at
+ }
+ }
+
+
+ child({:invitations => :invitations}) {
+ attributes :id, :sender_id, :receiver_id
+ }
+
+ # only show join_requests if the current_user is in the session
+ node(:join_requests, :if => lambda { |music_session| music_session.users.exists?(current_user) } ) do |music_session|
+ child(:join_requests => :join_requests) {
+ attributes :id, :text
+ child(:user => :user) {
+ attributes :id, :name
+ }
+ }
+ end
+
+ # only show currently playing recording data if the current_user is in the session
+ node(:claimed_recording, :if => lambda { |music_session| music_session.users.exists?(current_user) } ) do |music_session|
+
+ child(:claimed_recording => :claimed_recording) {
+ attributes :id, :name, :description, :is_public
+
+ child(:recording => :recording) {
+ attributes :id, :created_at, :duration
+ child(:band => :band) {
+ attributes :id, :name
+ }
+
+ child(:mixes => :mixes) {
+ attributes :id, :is_completed
+
+ node :mp3_url do |mix|
+ mix[:mp3_url]
+ end
+
+ node :ogg_url do |mix|
+ mix[:ogg_url]
+ end
+ }
+
+ child(:recorded_tracks => :recorded_tracks) {
+ attributes :id, :fully_uploaded, :client_track_id, :client_id, :instrument_id
+
+ node :url do |recorded_track|
+ recorded_track[:url]
+ end
+
+ child(:user => :user) {
+ attributes :id, :first_name, :last_name, :city, :state, :country, :photo_url
+ }
+ }
+ }
+ }
+ end
+
+ # only show mount info if fan_access is public. Eventually we'll also need to show this in other scenarios, like if invited
+ child({:mount => :mount}, :if => lambda { |music_session| music_session.fan_access}) {
+ attributes :id, :name, :sourced, :listeners, :bitrate, :subtype, :url
+ node(:mime_type) { |mount| mount.resolve_string(:mime_type) }
+ node(:bitrate) { |mount| mount.resolve_string(:bitrate) }
+ node(:subtype) { |mount| mount.resolve_string(:subtype) }
+ }
+ }
+end
\ No newline at end of file
diff --git a/web/app/views/api_music_sessions/show.rabl b/web/app/views/api_music_sessions/show.rabl
index 0b1c30540..87fcfc683 100644
--- a/web/app/views/api_music_sessions/show.rabl
+++ b/web/app/views/api_music_sessions/show.rabl
@@ -16,7 +16,7 @@ else
attributes :id, :description, :musician_access, :approval_required, :fan_access, :fan_chat, :band_id, :user_id, :claimed_recording_initiator_id, :track_changes_counter, :max_score
node :genres do |item|
- item.genres.map(&:description)
+ [item.genre.description] # XXX: need to return single genre; not array
end
if :is_recording?
@@ -26,8 +26,8 @@ else
end
node :share_url do |music_session|
- unless music_session.music_session_history.share_token.nil?
- share_token_url(music_session.music_session_history.share_token.token)
+ unless music_session.music_session.share_token.nil?
+ share_token_url(music_session.music_session.share_token.token)
end
end
diff --git a/web/app/views/clients/_rateSession.html.erb b/web/app/views/clients/_rateSession.html.erb
new file mode 100644
index 000000000..fa87832f5
--- /dev/null
+++ b/web/app/views/clients/_rateSession.html.erb
@@ -0,0 +1,17 @@
+
+
+
+ <%= image_tag "shared/icon_session.png", {:height => 19, :width => 19, :class => "content-icon"} %>
+ please rate your session
+
+
+
+
diff --git a/web/app/views/clients/gear/_gear_wizard.html.haml b/web/app/views/clients/gear/_gear_wizard.html.haml
index fbeffefbd..57f0ef1f8 100644
--- a/web/app/views/clients/gear/_gear_wizard.html.haml
+++ b/web/app/views/clients/gear/_gear_wizard.html.haml
@@ -83,13 +83,18 @@
.wizard-step-column
%h2 Test Results
.ftue-box.results
- .left.w50.gold-fill.center.white.scoring-section
+ .left.w50.center.white.scoring-section.latency-score-section
.p5
.latency LATENCY
%span.latency-score
- .left.w50.green-fill.center.white.scoring-section
+ .left.w50.center.white.scoring-section.io-score-section
.p5
.io I/O
+ %span.io-skip-msg
+ Skipped
+ %span.io-countdown
+ %span.secs
+ seconds left
%span.io-rate-score
%span.io-var-score
diff --git a/web/app/views/clients/index.html.erb b/web/app/views/clients/index.html.erb
index dd8d91baa..28836cda8 100644
--- a/web/app/views/clients/index.html.erb
+++ b/web/app/views/clients/index.html.erb
@@ -21,6 +21,7 @@
<%= render "clients/gear/gear_wizard" %>
<%= render "terms" %>
<%= render "leaveSessionWarning" %>
+<%= render "rateSession" %>
<%= render "alert" %>
<%= render "sidebar" %>
<%= render "createSession" %>
@@ -304,7 +305,6 @@
window.jamClient = interceptedJamClient;
-
}
// Let's get things rolling...
diff --git a/web/app/views/layouts/ping.jnlp.erb b/web/app/views/layouts/ping.jnlp.erb
index 3fc4fbeea..dc2c8adc1 100644
--- a/web/app/views/layouts/ping.jnlp.erb
+++ b/web/app/views/layouts/ping.jnlp.erb
@@ -1,20 +1,25 @@
- Ping
- JamKazam
+ JamKazam Ping
+ JamKazam, Inc.
+
+
-
+
-
+
- da1-cc=50.242.148.38:4442
+ <%= yield(:hosts) %>
-u<%= ApplicationHelper.base_uri(request) %>/api/users/isp_scoring
-i<%= yield(:provider) %>
-a
+
+
+
\ No newline at end of file
diff --git a/web/app/views/music_sessions/show.html.erb b/web/app/views/music_sessions/show.html.erb
index 9b3c3a56c..d55ab1f11 100644
--- a/web/app/views/music_sessions/show.html.erb
+++ b/web/app/views/music_sessions/show.html.erb
@@ -2,18 +2,18 @@
<% content_for :social_meta do %>
-
+
-
-
-
-
+
+
+
+
-
-
+
+
<% end %>
@@ -30,13 +30,13 @@
<%= @music_session.band.name %>
<% else %>
- <% unless @music_session.user.photo_url.blank? %>
- <%= image_tag "#{@music_session.user.photo_url}", {:alt => ""} %>
+ <% unless @music_session.creator.photo_url.blank? %>
+ <%= image_tag "#{@music_session.creator.photo_url}", {:alt => ""} %>
<% else %>
<%= image_tag "shared/avatar_generic.png", {:alt => ""} %>
<% end %>
- <%= @music_session.user.name %>
+ <%= @music_session.creator.name %>
<% end %>
@@ -56,9 +56,9 @@
- <%= @music_session.genres.split('|').first.capitalize unless @music_session.genres.blank? %>
+ <%= @music_session.genre.description %>
@@ -111,7 +111,7 @@
<% unless @music_session.band.nil? %>
<%= render :partial => "shared/landing_sidebar", :locals => {:user => @music_session.band, :recent_history => @music_session.band.recent_history} %>
<% else %>
- <%= render :partial => "shared/landing_sidebar", :locals => {:user => @music_session.user, :recent_history => @music_session.user.recent_history} %>
+ <%= render :partial => "shared/landing_sidebar", :locals => {:user => @music_session.creator, :recent_history => @music_session.creator.recent_history} %>
<% end %>
<% else %>
<%= render :partial => "shared/cta_sidebar" %>
diff --git a/web/app/views/ping/ping.html.erb b/web/app/views/ping/ping.html.erb
index 4f6bf6bb7..d2e8dcda2 100644
--- a/web/app/views/ping/ping.html.erb
+++ b/web/app/views/ping/ping.html.erb
@@ -1,25 +1,69 @@
Test Internet Latency
+
- Test Internet Latency
- Select the link corresponding to your internet service provider.
- This will launch an applet to test the performance of your connection.
- My ISP is AT&T
- Click <%= link_to 'here', '/ping/pingat.jnlp' %>.
+ Internet Speed Test
+
- My ISP is Comcast
- Click <%= link_to 'here', '/ping/pingcc.jnlp' %>.
+ Welcome, and thank you for helping us by running this quick latency test application. The app may just run, or you might need to install or update the version of Java on your computer. It will take just one minute if you have Java already installed and up-to-date, or less than five minutes if you have to install or update Java on your computer.
- My ISP is Time Warner
- Click <%= link_to 'here', '/ping/pingtw.jnlp' %>.
+ Following are step-by-step directions to run this test:
+
+ - Please run this test app from your home, not from a business or coffee shop or anywhere else - only from your home, as we need the data collected from home environments.
-My ISP is Verizon
-Click <%= link_to 'here', '/ping/pingvz.jnlp' %>.
+ - Please run this test app on a Windows computer. It’s too hard to get it to run on a Mac, even though it’s theoretically possible.
-My ISP is none of the above.
-Click <%= link_to 'here', '/ping/pingno.jnlp' %>.
+ - Please connect your Windows computer to your home router with an Ethernet cable rather than connecting wirelessly via WiFi. This is important to the accuracy of the data being collected, thank you!
+
+ - To start the test, please click the Run Test button on the right side of this page next to the ISP that provides Internet service to your home.
+
+ - When you click the Run Test button, a file will start to download in your browser. It may display a message like “This type of file can harm your computer. Do you want to keep it anyway?”. Please click the button that lets your browser go ahead and download and save the file. It’s just a little test app we wrote ourselves, so we know it’s safe, but we did not sign the app with a certificate, so you may get this warning message.
+
+ - When the file is downloaded, please click on the file to open and run it. If your version of Java is up-to-date, the app will run as described in step 8 below. If you get a message that Java is not up-to-date on your computer, please follow step 7 below to update Java on your computer.
+
+ - Click the prompt button to update Java. You are taken to the Java website. Click the red Free Java Download button. Then click the Agree & Start Free Download button. When the file is downloaded, click on the file to open/run it, and then follow the on-screen instructions to install the Java update. (Note: Watch out during the installation for the McAfee option, and uncheck that one to avoid getting McAfee installed on your computer.) After the Java update has installed, go back to the JamKazam test app webpage, and click on the Run Test button again next to the ISP that provides Internet service to your home.
+
+ - When you run the test app, a window will open and you’ll be prompted “Do you want this app to run?”. Please answer yes to let the app run. Then you’ll see a small window open, and you’ll see the test app running. This will take less than a minute. When it’s finished, it displays “Results posted, thank you for your time!”. You can close the window, and you are all done.
+
+
+ Thanks again very much for helping us collect this Internet latency data!
+
+ Regards,
+ The JamKazam Team
+
+
+ Select the link corresponding to your internet service provider.
+ This will launch an applet to test the performance of your connection.
+
+ AT&T <%= link_to 'Run Test', '/ping/pingat.jnlp', :class=>'button' %>
+
+ Comcast <%= link_to 'Run Test', '/ping/pingcc.jnlp', :class=>'button' %>
+
+ Time Warner <%= link_to 'Run Test', '/ping/pingtw.jnlp', :class=>'button' %>
+
+ Verizon <%= link_to 'Run Test', '/ping/pingvz.jnlp', :class=>'button' %>
+
+ None Of The Above <%= link_to 'Run Test', '/ping/pingno.jnlp', :class=>'button' %>
+
-
\ No newline at end of file
+ |