From 1b70e08f82fe17ea4705c4232811b194ff47b062 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Fri, 18 Dec 2015 09:55:24 +0000 Subject: [PATCH 1/2] reinstate the chaosmonkey --- .../public/coffee/ide/editor/Document.coffee | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/services/web/public/coffee/ide/editor/Document.coffee b/services/web/public/coffee/ide/editor/Document.coffee index 1927b791da..719865e49e 100644 --- a/services/web/public/coffee/ide/editor/Document.coffee +++ b/services/web/public/coffee/ide/editor/Document.coffee @@ -116,6 +116,26 @@ define [ flush: () -> @doc?.flushPendingOps() + chaosMonkey: (line = 0, char = "a") -> + orig = char + copy = null + pos = 0 + timer = () => + unless copy? and copy.length + copy = orig.slice() + ' ' + new Date() + '\n' + line += if Math.random() > 0.1 then 1 else -2 + line = 0 if line < 0 + pos = 0 + char = copy[0] + copy = copy.slice(1) + @ace.session.insert({row: line, column: pos}, char) + pos += 1 + @_cm = setTimeout timer, 100 + if Math.random() < 0.1 then 1000 else 0 + @_cm = timer() + + clearChaosMonkey: () -> + clearTimeout @_cm + pollSavedStatus: () -> # returns false if doc has ops waiting to be acknowledged or # sent that haven't changed since the last time we checked. From 134e733b01c6600b5edfc67cc1fe4cb73196687f Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Mon, 21 Dec 2015 10:23:42 +0000 Subject: [PATCH 2/2] change succesful subscription message --- .../views/subscriptions/successful_subscription.jade | 10 +++++++--- .../public/coffee/main/subscription-dashboard.coffee | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/services/web/app/views/subscriptions/successful_subscription.jade b/services/web/app/views/subscriptions/successful_subscription.jade index 8b66dec6c9..8764f3f3c8 100644 --- a/services/web/app/views/subscriptions/successful_subscription.jade +++ b/services/web/app/views/subscriptions/successful_subscription.jade @@ -10,9 +10,13 @@ block content h2 #{translate("thanks_for_subscribing")} .alert.alert-success p !{translate("next_payment_of_x_collectected_on_y", {paymentAmmount:""+subscription.price+"", collectionDate:""+subscription.nextPaymentDueAt+""})} - p #{translate("if_you_dont_want_to_be_charged")} - a(href="/user/subscription") #{translate("click_here_to_cancel")}. - + span(sixpack-switch="upgrade-success-message") + span(sixpack-default) + p #{translate("if_you_dont_want_to_be_charged")} + a(href="/user/subscription") #{translate("click_here_to_cancel")}. + span(sixpack-when="manage-subscription") + p #{translate("to_modify_your_subscription_go_to")} + a(href="/user/subscription") #{translate("manage_subscription")}. p - if (subscription.groupPlan == true) a.btn.btn-success.btn-large(href="/subscription/group") #{translate("add_your_first_group_member_now")} diff --git a/services/web/public/coffee/main/subscription-dashboard.coffee b/services/web/public/coffee/main/subscription-dashboard.coffee index 6572458d99..7898472b9b 100644 --- a/services/web/public/coffee/main/subscription-dashboard.coffee +++ b/services/web/public/coffee/main/subscription-dashboard.coffee @@ -124,7 +124,8 @@ define [ $http.post("/user/subscription/cancel", body) .success -> sixpack.convert 'cancelation-options-view', -> - location.reload() + sixpack.convert 'upgrade-success-message', -> + location.reload() .error -> console.log "something went wrong changing plan"