CINXE.COM
NVIDIA Training Solutions | NVIDIA
<!DOCTYPE html> <html lang="en"> <head> <title>NVIDIA Training Solutions | NVIDIA</title> <meta charset="utf-8" /> <link rel="shortcut icon" href="https://www.nvidia.com/favicon.ico" /> <style> body { height: 80vh; width: 100vw; display: flex; flex-direction: column; margin: 0; font-family: NVIDIA, Arial, Helvetica, Sans-Serif; } .flex-column { display: flex; flex-direction: column; gap: 0.2em; } .flex-row { display: flex; flex-direction: row; gap: 0.2em; } .page-content { height: 100%; width: 80%; align-self: center; margin-top: 5em; } .header-bar { height: 2em; margin: 0.2em; } .nvidia-icon-container { height: 4em; align-self: center; margin: 0.5em 0; } .nvidia-icon { max-height: 100%; background-color: #76b900; } .page-body { margin-top: 5em; text-align: center; } .hidden { display: none; } </style> </head> <body> <div class="flex-column page-content"> <div class="nvidia-icon-container"> <a href="https://www.nvidia.com/en-us/training/"> <img class="nvidia-icon" src="https://s3.amazonaws.com/cms.ipressroom.com/219/files/20149/544a6120f6091d588d000048_NVLogo_2D_H/NVLogo_2D_H_0b8ebd28-4ba6-403f-864b-f5b4712a5ad6-prv.jpg" /> </a> </div> <div id="page-body" class="flex-column page-body"> <div id="maintenance-message" class="hidden"> Hello! DLI is currently down for maintenance while we perform an upgrade, and will return shortly. </div> <div id="redirect-message" class="hidden"> Hello! The page you're looking for has moved. <br /><br /> You should be redirected to its new location shortly. If you have this page bookmarked, we recommend that you update the bookmark after you are redirected. </div> </div> </div> <script> const MAINTENANCE_TEST_URL = "https://profile.courses.nvidia.com/client-v2/profile.html"; const REDIRECT_WAIT_MS = 5000; function web_get(url) { // This returns the raw fetch response return new Promise((resolve, reject) => { if (!url) { reject("URL missing."); } fetch(url, { method: "GET" }) .then((response) => { if (!response.ok) { reject(response); } else { resolve(response); } }) .catch((err) => { console.log(err); console.log(`Error fetching data from ${url}`); reject(err); }); }); } function get_maintenance_mode() { return new Promise((resolve, reject) => { web_get(MAINTENANCE_TEST_URL) .then((response) => { resolve(false); }) .catch((err) => { console.log(err); resolve(true); }); }); } function display_maintenance_message() { document.getElementById("redirect-message").classList.add("hidden"); document .getElementById("maintenance-message") .classList.remove("hidden"); } function display_redirect_message() { document.getElementById("maintenance-message").classList.add("hidden"); document.getElementById("redirect-message").classList.remove("hidden"); } function immediate_domain_redirect(domain) { window.location.hostname = domain; } function immediate_redirect(url) { window.location = url; } function redirect_to_domain(domain, timeout = REDIRECT_WAIT_MS) { // In most cases, we just want to replace the hostname setTimeout(() => { immediate_domain_redirect(domain); }, timeout); return true; } function redirect_to_url(url, timeout = REDIRECT_WAIT_MS) { setTimeout(() => { immediate_redirect(url); }, timeout); return true; } function get_new_domain_mapping(current_hostname) { let mappings = { "courses.nvidia.com": "learn.nvidia.com", "learn.next.courses.nvidia.com": "learn.learn.nvidia.com", "studio.learn.next.courses.nvidia.com": "studio.learn.learn.nvidia.com", "base.manager.next.courses.nvidia.com": "base.manager.learn.nvidia.com", }; if (current_hostname in mappings) { return mappings[current_hostname]; } if (!current_hostname) { console.log("Hostname missing"); } else { console.log(`Unknown domain: ${current_hostname}`); } } function handle_special_cases(location) { const { hostname, pathname } = location; if (hostname == "courses.nvidia.com") { let pathname_parts = pathname.split("/").slice(1); switch (pathname_parts[0]) { case "courses": return immediate_redirect( `https://learn.nvidia.com/courses/course-detail?course_id=${pathname_parts[1]}` ); case "certificates": { // Sometimes these had a trailing slash. Handle generously certificate_id = pathname_parts[1]; return immediate_redirect( `https://learn.nvidia.com/certificates?id=${certificate_id}` ); } case "in": return redirect_to_url("https://developer.nvidia.com/account"); // former profile page case "dashboard": return redirect_to_url("https://learn.nvidia.com/my-learning"); // former dashboard // Doesn't work with a trailing slash case "dli-event": return redirect_to_url("https://learn.nvidia.com/dli-event"); // Common suffix block, but handle as special case to skip the nag screen because these URLs case "join": return redirect_to_domain("learn.nvidia.com"); } } return false; } function redirect() { let { location } = window; let { hostname } = location; let special_case = handle_special_cases(location); if (special_case) { return; } let domain_mapping = get_new_domain_mapping(hostname); if (domain_mapping) { redirect_to_domain(domain_mapping); } } function get_maintenance_loop() { get_maintenance_mode() .then((maintenance_mode) => { if (maintenance_mode) { display_maintenance_message(); console.debug( "Currently in maintenance mode, checking again in 60 seconds." ); setTimeout(get_maintenance_loop, 60000); } else { display_redirect_message(); return redirect(); } }) .catch((err) => { console.log(err); console.log("Retrying in 60 seconds."); setTimeout(get_maintenance_loop, 60000); }); } display_redirect_message(); redirect(); </script> </body> </html>