Maintenance announcement (#7372)

* chore(news): announce downtime

* fix(news): tweaks and corrections

* fix: Update maintenance page to use dynamic date
This commit is contained in:
Sabe Jones
2016-05-19 22:28:13 -05:00
parent 18a3024aea
commit d221bcc84c
6 changed files with 124 additions and 16 deletions

View File

@@ -0,0 +1,34 @@
{
"habiticaBackSoon": "Don't worry, Habitica will be back soon!",
"importantMaintenance": "We are doing important maintenance that we estimate will last until <%= localDate %> in your timezone.",
"maintenance": "Maintenance",
"maintenanceMoreInfo": "Want more information about the maintenance? <%= linkStart %>Check out our info page<%= linkEnd %>.",
"noDamageKeepStreaks": "You will NOT take damage or lose streaks!",
"thanksForPatience": "Thanks for your patience!",
"twitterMaintenanceUpdates": "For the most recent updates, watch our <a href='https://twitter.com/habitica'>Twitter</a>, where we will be posting status information.",
"veteranPetAward": "At the end, you will receive a Veteran pet!",
"maintenanceInfoTitle": "Information about Upcoming Maintenance to Habitica",
"maintenanceInfoWhat": "What is happening?",
"maintenanceInfoWhatText": "On May 21, Habitica will be down for maintenance for most of the day. You will not take any damage or have your account harmed during that weekend, even if you cant log in to check off your Dailies in time! We will be working very hard to make the downtime as short as possible, and will be posting regular updates on <a href='https://twitter.com/habitica' target='_blank'>our Twitter account</a>. At the end of the downtime, to thank everyone for their patience, you will all receive a rare pet!",
"maintenanceInfoWhy": "Why is this happening?",
"maintenanceInfoWhyText": "For the past several months, we have been thoroughly revamping Habitica behind-the-scenes. Specifically, we have rewritten the API. While it may not look much different on the surface, its a whole new world underneath. This will allow us WAY more flexibility when we want to build features in the future, and lead to improved performance!",
"maintenanceInfoTechDetails": "Want more details on the technical side of the process? Visit <a href='http://devs.habitica.com/' target='_blank'>The Forge, our dev blog</a>.",
"maintenanceInfoMore": "More Information",
"maintenanceInfoAccountChanges": "What changes will I see to my account after the rewrite is complete?",
"maintenanceInfoAccountChangesText": "At first, there wont be any notable changes aside from performance improvements for features such as Challenges. If you notice any changes that shouldnt be there, email us at <a href='mailto:admin@habitica.com'>admin@habitica.com</a> and we will investigate them for you!",
"maintenanceInfoAddFeatures": "What kind of features will this allow Habitica to add?",
"maintenanceInfoAddFeaturesText": "Completing this rewrite will allow us to start building out group plans, improved chat and Guilds, and additional productivity features like Monthlies and the ability to record yesterdays activity! Those are all involved features on their own, so it will take time to build them, but until we were finished with this rewrite, there was no way we could start them.",
"maintenanceInfoHowLong": "How long will the maintenance take?",
"maintenanceInfoHowLongText": "We have to migrate tasks and data for all 1.3 million Habitica users -- not an easy task! We anticipate that it will take place between approximately <%= localStartTime %> and <%= localEndTime %>. Rest assured that were doing everything we can to make it go as quickly as possible! You can follow <a href='https://twitter.com/habitica' target='_blank'>updates on our Twitter</a>.",
"maintenanceInfoStatsAffected": "How will my Dailies, Streaks, Buffs, and Quests be affected?",
"maintenanceInfoStatsAffectedText1": "You will NOT take any damage or lose any streaks that weekend, but otherwise, your day will reset normally! Dailies that you checked will become unchecked, buffs will reset, etc. If you are in a Collection Quest, you will still find items. If you are in a Boss Battle, you will still deal damage to the Boss, but the Boss will not deal damage to you. (Even monsters need a break!)",
"maintenanceInfoStatsAffectedText2": "After a lot of thought, our team concluded that this was the most fair way to handle the fact that many users will not be able to check off their Dailies normally during the maintenance. Were sorry for any inconvenience this causes!",
"maintenanceInfoSeeTasks": "What if I need to see my task list?",
"maintenanceInfoSeeTasksText": "If you know that you will need to see your task list on Saturday to remind yourself what you have to do, we recommend that before the maintenance begins, you take a screenshot of your tasks so that you can use it as a reference.",
"maintenanceInfoRarePet": "What kind of rare pet will I receive?",
"maintenanceInfoRarePetText": "To thank you for your patience during the downtime, everyone will get a rare Veteran Pet. If youve never received a Veteran Pet before, you will receive a Veteran Wolf. If you already have a Veteran Wolf, you will receive a Veteran Tiger. And if you already have a Veteran Wolf and a Veteran Tiger, you will receive a never-before-seen Veteran pet! After the migration is completed, it may take several hours for your pet to show up, but never fear, everyone will get one.",
"maintenanceInfoWho": "Who worked on this massive project?",
"maintenanceInfoWhoText": "Were glad you asked! It was spearheaded by our amazing contributor paglias, with lots of help from Blade, TheHollidayInn, SabreCat, Victor Pudeyev, TheUnknown, and Alys.",
"maintenanceInfoTesting": "The new version was also tirelessly tested by a bunch of our amazing open-source volunteers. Thank you -- we couldn't have done this without you."
}

View File

@@ -73,5 +73,7 @@
"APP": "app-name", "APP": "app-name",
"SECRET": "secret", "SECRET": "secret",
"ENABLED": "false" "ENABLED": "false"
} },
"MAINTENANCE_START": "Sat May 21 2016 20:00:00 UTC",
"MAINTENANCE_END": "Sat May 22 2016 5:00:00 UTC"
} }

View File

@@ -9,6 +9,10 @@ var forceRefresh = require('./forceRefresh');
var tavernQuest = require('../models/group').tavernQuest; var tavernQuest = require('../models/group').tavernQuest;
var mods = require('../models/user').mods; var mods = require('../models/user').mods;
// TODO Remove once v3 maintenance is done
const MAINTENANCE_START = nconf.get('MAINTENANCE_START');
const MAINTENANCE_END = nconf.get('MAINTENANCE_END');
// To avoid stringifying more data then we need, // To avoid stringifying more data then we need,
// items from `env` used on the client will have to be specified in this array // items from `env` used on the client will have to be specified in this array
var clientVars = ['language', 'isStaticPage', 'avalaibleLanguages', 'translations', var clientVars = ['language', 'isStaticPage', 'avalaibleLanguages', 'translations',
@@ -55,6 +59,9 @@ module.exports = function(req, res, next) {
// Defined here and not outside of the middleware because tavernQuest might be an // Defined here and not outside of the middleware because tavernQuest might be an
// empty object until the query to fetch it finishes // empty object until the query to fetch it finishes
worldDmg: (tavernQuest && tavernQuest.extra && tavernQuest.extra.worldDmg) || {}, worldDmg: (tavernQuest && tavernQuest.extra && tavernQuest.extra.worldDmg) || {},
// TODO Remove once v3 maintenance is done
maintenanceStart: MAINTENANCE_START,
maintenanceEnd: MAINTENANCE_END,
}); });
// Put query-string party (& guild but use partyInvite for backward compatibility) // Put query-string party (& guild but use partyInvite for backward compatibility)

View File

@@ -23,7 +23,7 @@ router.get('/', i18n.getUserLanguage, locals, function(req, res) {
// -------- Static Pages -------- // -------- Static Pages --------
var pages = ['front', 'privacy', 'terms', 'api', 'features', 'videos', 'contact', 'plans', 'new-stuff', 'community-guidelines', 'old-news', 'press-kit', 'faq', 'overview', 'apps', 'clear-browser-data', 'merch']; var pages = ['front', 'privacy', 'terms', 'api', 'features', 'videos', 'contact', 'plans', 'new-stuff', 'community-guidelines', 'old-news', 'press-kit', 'faq', 'overview', 'apps', 'clear-browser-data', 'merch', 'maintenance-info'];
_.each(pages, function(name){ _.each(pages, function(name){
router.get('/static/' + name, i18n.getUserLanguage, locals, function(req, res) { router.get('/static/' + name, i18n.getUserLanguage, locals, function(req, res) {

View File

@@ -1,5 +1,27 @@
h2 5/17/2016 - TREELING PET QUEST AND CHALLENGE SPOTLIGHT! h2 5/19/2016 - IMPORTANT: UPCOMING MAINTENANCE!
hr hr
tr
td
h3 Maintenance to Take Place May 21
p This Saturday, we will be performing important maintenance on Habitica to build out the groundwork for some exciting upcoming features! We'll be doing everything we can to make this as smooth as possible, but unfortunately, there will be significant downtime for much of the day.
br
p.strong We expect that on Saturday, May 21st, Habitica will be unavailable between <a href='http://www.worldtimebuddy.com/?pl=1&lid=5368361,100&h=5368361' target='_blank'>1 PM and 10 PM Pacific Time (8 pm - 5 am UTC)</a>.
ul
li Don't worry, <strong>you will NOT lose any streaks or take any damage during this weekend, not even from Bosses!</strong> This maintenance will not harm your accounts.
li If you will need to see your task list on Saturday, <strong>we recommend taking a screenshot of your tasks before the maintenance begins</strong> so that you can use them as a reference during downtime.
li At the end of the maintenance, to thank people for their patience, <strong>everyone will receive a rare Veteran pet!</strong>
li This maintenance should not result in any major visible differences to the site; it's all behind-the-scenes work. However, <strong>at the end of it, we will release new updates to the mobile apps, which will be required in order for the apps to work properly with the new changes!</strong> Be sure to download those updates on Saturday as soon as they are released.
li For more information, please <strong>check out our detailed <a href='/static/maintenance-info'>info page</a> about the maintenance!</strong> And if you have any further questions or concerns, feel free to reach out to Leslie (<a href='mailto:leslie@habitica.com' target='_blank'>leslie@habitica.com</a>), and she will be happy to help you.
p We understand that it's very frustrating to have Habitica unavailable for such a long part of the day. Rest assured that we'll be doing everything we can to make the maintenance go as quickly as possible, but with over a million Habitican accounts to migrate, this is a hefty task! During the maintenance on Saturday we will be posting regular status reports on our <a href='https://twitter.com/habitica' target='_blank'>Twitter account</a>, so you can follow us for the most accurate updates.
br
p Thank you for your patience, and for using Habitica!
if menuItem !== 'oldNews'
hr
a(href='/static/old-news', target='_blank') Read older news
mixin oldNews
h2 5/17/2016 - TREELING PET QUEST AND CHALLENGE SPOTLIGHT!
tr tr
td td
.Pet-Treeling-Base.pull-right .Pet-Treeling-Base.pull-right
@@ -16,12 +38,6 @@ h2 5/17/2016 - TREELING PET QUEST AND CHALLENGE SPOTLIGHT!
p Have you made a Challenge that you think deserves to be in the spotlight? <a href='https://docs.google.com/forms/d/1Wb0TJaZrMA3URdANqoNjnhi_EfFTwfZ0WwteB8IU5E8/viewform' target='_blank'>Submit it to be featured on our blog!</a> Any Challenge with a Gem prize and a concrete end date is eligible. And feel free to tell us what you think about this month's spotlight in the comments, or on <a href='https://twitter.com/habitica' target='_blank'>Twitter</a>, <a href='https://www.facebook.com/Habitica' target='_blank'>Facebook</a>, or <a href='http://habitica.tumblr.com/' target='_blank'>Tumblr</a>. Enjoy! p Have you made a Challenge that you think deserves to be in the spotlight? <a href='https://docs.google.com/forms/d/1Wb0TJaZrMA3URdANqoNjnhi_EfFTwfZ0WwteB8IU5E8/viewform' target='_blank'>Submit it to be featured on our blog!</a> Any Challenge with a Gem prize and a concrete end date is eligible. And feel free to tell us what you think about this month's spotlight in the comments, or on <a href='https://twitter.com/habitica' target='_blank'>Twitter</a>, <a href='https://www.facebook.com/Habitica' target='_blank'>Facebook</a>, or <a href='http://habitica.tumblr.com/' target='_blank'>Tumblr</a>. Enjoy!
p.small.muted by redphoenix p.small.muted by redphoenix
p.small.muted Challenges by ArynChris, Janelle Rowe, and BeanieB p.small.muted Challenges by ArynChris, Janelle Rowe, and BeanieB
if menuItem !== 'oldNews'
hr
a(href='/static/old-news', target='_blank') Read older news
mixin oldNews
h2 5/14/2016 - IMPORTANT ANDROID UPDATE AND HABITICA ON SOCIAL MEDIA h2 5/14/2016 - IMPORTANT ANDROID UPDATE AND HABITICA ON SOCIAL MEDIA
tr tr
td td

View File

@@ -0,0 +1,49 @@
- var t = t || env.t;
- var maintenanceStart = maintenanceStart || env.maintenanceStart;
- var maintenanceEnd = maintenanceEnd || env.maintenanceEnd;
title Habitica &VerticalLine;&nbsp;
=t('maintenance')
head
link(rel='stylesheet', type='text/css', href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/css/bootstrap.min.css')
body
.container
h1.text-center=t('maintenanceInfoTitle')
img.img-rendering-auto.center-block.img-responsive(src='https://d2afqr2xdmyzvu.cloudfront.net/assets/scene_maintenance.png')
h2=t('maintenanceInfoWhat')
p!=t('maintenanceInfoWhatText')
img.pull-left(src='https://d2afqr2xdmyzvu.cloudfront.net/assets/scene_new.png')
h2=t('maintenanceInfoWhy')
p=t('maintenanceInfoWhyText')
p!=t('maintenanceInfoTechDetails')
h2=t('maintenanceInfoMore')
h3=t('maintenanceInfoAccountChanges')
p!=t('maintenanceInfoAccountChangesText')
h3=t('maintenanceInfoAddFeatures')
p=t('maintenanceInfoAddFeaturesText')
h3=t('maintenanceInfoHowLong')
img.pull-right(src='https://d2afqr2xdmyzvu.cloudfront.net/assets/scene_chatter.png')
p!=t('maintenanceInfoHowLongText', {localStartTime: '<span id="start-time">' + maintenanceStart + '</span>', localEndTime: '<span id="end-time">' + maintenanceEnd + '</span>'})
h3=t('maintenanceInfoStatsAffected')
p=t('maintenanceInfoStatsAffectedText1')
p=t('maintenanceInfoStatsAffectedText2')
h3=t('maintenanceInfoSeeTasks')
p=t('maintenanceInfoSeeTasksText')
h3=t('maintenanceInfoRarePet')
p=t('maintenanceInfoRarePetText')
img.pull-left(src='https://d2afqr2xdmyzvu.cloudfront.net/assets/scene_coding.png')
h3=t('maintenanceInfoWho')
p=t('maintenanceInfoWhoText')
p=t('maintenanceInfoTesting')
script.
var startTime = document.getElementById('start-time');
var endTime = document.getElementById('end-time');
var startUtc = startTime.innerHTML;
var endUtc = endTime.innerHTML;
startTime.innerHTML = new Date(startUtc).toLocaleString();
endTime.innerHTML = new Date(endUtc).toLocaleString();