From 65f189d7a235d253b2f9dc89f75e0d8b5e6c2c8a Mon Sep 17 00:00:00 2001 From: "L. Bradley LaBoon" Date: Wed, 14 Sep 2022 22:33:35 -0400 Subject: [PATCH] Add date to scheduled maintenance notifs --- linodes/dashboard/dashboard.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linodes/dashboard/dashboard.js b/linodes/dashboard/dashboard.js index fae3137..7655746 100644 --- a/linodes/dashboard/dashboard.js +++ b/linodes/dashboard/dashboard.js @@ -627,6 +627,12 @@ import { settings, elements, apiDelete, apiGet, apiPost, eventTitles, parseParam data.notifications[i].message += " For more information, please see your open support tickets."; } + if (data.notifications[i].type == "migration_scheduled") { + var now = new Date(); + var migrateStart = new Date(data.notifications[i].when + "Z"); + data.notifications[i].message += " If no action is taken, the migration will start automatically on " + migrateStart.toLocaleString() + " (in " + timeString(migrateStart - now, false) + ")."; + } + var notification = document.createElement("div"); notification.className = elements.notification; var header = document.createElement("h1");