diff --git a/admin/spec/support/utilities.rb b/admin/spec/support/utilities.rb
index 2055c9495..fa3b3c840 100644
--- a/admin/spec/support/utilities.rb
+++ b/admin/spec/support/utilities.rb
@@ -8,7 +8,7 @@ def sign_in(user)
visit new_user_session_path # login page
fill_in "Email", with: user.email
fill_in "Password", with: user.password
- click_button "Sign in"
+ click_button "Log in"
# Sign in when not using Capybara as well.
#cookie_jar[:remember_token] = user.remember_token
diff --git a/web/README.md b/web/README.md
index 03b796614..81ad6e3d8 100644
--- a/web/README.md
+++ b/web/README.md
@@ -11,3 +11,4 @@ $ rake jasmine
Open browser to localhost:8888
+
diff --git a/web/app/assets/javascripts/hoverMusician.js b/web/app/assets/javascripts/hoverMusician.js
index 985da502b..70f688d35 100644
--- a/web/app/assets/javascripts/hoverMusician.js
+++ b/web/app/assets/javascripts/hoverMusician.js
@@ -95,7 +95,8 @@
session_display: sessionDisplayStyle,
join_display: joinDisplayStyle,
sessionId: sessionId,
- friendAction: response.is_friend ? "removeMusicianFriend" : (response.pending_friend_request ? "" : "sendMusicianFriendRequest"),
+ //friendAction: response.is_friend ? "removeMusicianFriend" : (response.pending_friend_request ? "" : "sendMusicianFriendRequest"),
+ friendAction: response.is_friend ? "" : (response.pending_friend_request ? "" : "sendMusicianFriendRequest"),
followAction: response.is_following ? "removeMusicianFollowing" : "addMusicianFollowing",
biography: response.biography,
followings: response.followings && response.followings.length > 0 ? followingHtml : "
| N/A |
",
@@ -133,13 +134,16 @@
}
else {
if (user.is_friend) {
- $(btnFriendSelector, hoverSelector).html('DISCONNECT');
+ $(btnFriendSelector, hoverSelector).html('CONNECTED');
+ $(btnFriendSelector, hoverSelector).addClass('disabled');
}
if (user.is_following) {
$(btnFollowSelector, hoverSelector).html('UNFOLLOW');
}
if (user.pending_friend_request) {
- $(btnFriendSelector, hoverSelector).hide();
+ //$(btnFriendSelector, hoverSelector).hide();
+ $(btnFriendSelector, hoverSelector).html('REQUEST SENT');
+ $(btnFriendSelector, hoverSelector).addClass('disabled');
}
}
diff --git a/web/app/assets/javascripts/networkTestHelper.js b/web/app/assets/javascripts/networkTestHelper.js
index f8acf0107..1f9260790 100644
--- a/web/app/assets/javascripts/networkTestHelper.js
+++ b/web/app/assets/javascripts/networkTestHelper.js
@@ -16,6 +16,7 @@
var STARTING_NUM_CLIENTS = 4;
var PAYLOAD_SIZE = gon.global.ftue_network_test_packet_size;
var MINIMUM_ACCEPTABLE_SESSION_SIZE = 2;
+ var RETRY_THRESHOLD = 2;
var gearUtils = context.JK.GearUtils;
var rest = context.JK.Rest();
@@ -291,6 +292,45 @@
return testSummary.attempts[testSummary.attempts.length - 1];
}
+ function isFirstAttempt() {
+ return testSummary.attempts.length == 0 || testSummary.attempts.length == 1;
+ }
+
+ // is this a retry attempt? If so, how many times now has it been.
+ // 0 = this is the 1st attempt
+ // > 0 indicates the number of retries.
+ function numRetryAttempts() {
+ // starting at the end of the attempts array, see how many have the same session count, which is implicitely
+ // indicative of a retry
+ var i = 0;
+ var testSessionSize = null;
+ var numSameSizeTests = 0;
+
+ for(i = testSummary.attempts.length - 1; i >= 0; i--) {
+ var attempt = testSummary.attempts[i];
+
+ if(testSessionSize === null) {
+ // this is the 1st loop through. just recording the testSessionSize
+ testSessionSize = attempt.num_clients;
+ }
+ else {
+ if(testSessionSize == attempt.num_clients) {
+ numSameSizeTests++;
+ }
+ else {
+ break; // different size session found, so we are digging back into non-retry territory. bail out
+ }
+ }
+ }
+ return numSameSizeTests;
+ }
+
+ function hasTooManyRetries() {
+ return numRetryAttempts() >= RETRY_THRESHOLD;
+
+ return false;
+ }
+
function primeTimedOut() {
logger.warn("backend never completed priming pump phase");
scoring = false;
@@ -358,7 +398,7 @@
NETWORK_TEST_TYPES.PktTest400LowLatency,
gon.ftue_network_test_duration,
numClientsToTest - 1,
- PAYLOAD_SIZE);
+ PAYLOAD_SIZE, gon.global.ftue_network_test_backend_retries);
}
// you have to score a little to 'prime' the logic to know whether it's on wireless or not
@@ -372,7 +412,7 @@
NETWORK_TEST_TYPES.PktTest400LowLatency,
1, // minimum time needed to prime pump
2,
- PAYLOAD_SIZE);
+ PAYLOAD_SIZE, gon.global.ftue_network_test_backend_retries);
return primeDeferred;
@@ -503,7 +543,11 @@
var attempt = getCurrentAttempt();
function refineTest(up) {
- if (up) {
+ if (up === null) {
+ logger.debug("retrying test at size: " + numClientsToTest);
+ setTimeout(attemptTestPass, 500); // wait a second to avoid race conditions with client/server comm
+ }
+ else if (up) {
if (numClientsToTest == gon.ftue_network_test_max_clients) {
attempt.reason = "success";
testFinished();
@@ -564,8 +608,7 @@
logger.debug("network test pass completed. data: ", data);
if (data.reason == "unreachable") {
- // STUN
- logger.debug("network test: unreachable (STUN issue or similar)");
+ logger.debug("network test: unreachable (STUN issue or similar)")
attempt.reason = data.reason;
testFinished();
}
diff --git a/web/app/assets/stylesheets/client/sidebar.css.scss b/web/app/assets/stylesheets/client/sidebar.css.scss
index f934b0cf3..09c4a4585 100644
--- a/web/app/assets/stylesheets/client/sidebar.css.scss
+++ b/web/app/assets/stylesheets/client/sidebar.css.scss
@@ -181,7 +181,11 @@
display: block;
overflow: auto;
margin: 0px 15px;
- height: 210px;
+ /*height: 210px;*/
+ height: 73%;
+ }
+ .chart-text-section {
+
}
.btn-send-chat-message {
@@ -232,6 +236,8 @@
position: absolute;
bottom: 10px;
padding: 0px 15px;
+ height: 20%;
+ min-height: 69px;
}
em {
diff --git a/web/app/views/clients/_hoverMusician.html.erb b/web/app/views/clients/_hoverMusician.html.erb
index 818ea56a4..0a1d882ca 100644
--- a/web/app/views/clients/_hoverMusician.html.erb
+++ b/web/app/views/clients/_hoverMusician.html.erb
@@ -171,7 +171,9 @@
function sendMusicianFriendRequest(userId) {
rest.sendFriendRequest(JK.app, userId);
- $("#btnFriend", "#musician-hover").hide();
+ //$("#btnFriend", "#musician-hover").hide();
+ $("#btnFriend").html('REQUEST SENT');
+ $("#btnFriend").addClass('disabled');
}
function removeMusicianFriend(userId) {
diff --git a/web/app/views/clients/_sidebar.html.erb b/web/app/views/clients/_sidebar.html.erb
index a0b37fe1f..b488db763 100644
--- a/web/app/views/clients/_sidebar.html.erb
+++ b/web/app/views/clients/_sidebar.html.erb
@@ -104,10 +104,12 @@
Chat is available when in session.
+
+