forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📃 Redesign doc header (airbytehq#30475)
- Loading branch information
Tim Roes
authored
Sep 18, 2023
1 parent
2e014a1
commit 9751703
Showing
5 changed files
with
126 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment"; | ||
|
||
if (ExecutionEnvironment.canUseDOM) { | ||
function updateCloudStatus() { | ||
// Load status from instatus and attach page status as CSS class | ||
// https://instatus.com/help/widgets/custom | ||
fetch("https://status.airbyte.com/summary.json") | ||
.then((resp) => resp.json()) | ||
.then((summary) => { | ||
const status = summary.page.status; | ||
const el = document.getElementById("cloudStatusLink"); | ||
el.classList.forEach((className) => { | ||
if (className.startsWith("status-")) { | ||
el.classList.remove(className); | ||
} | ||
}); | ||
el.classList.add(`status-${status.toLowerCase()}`) | ||
}); | ||
} | ||
|
||
setInterval(() => { | ||
// Check Cloud status every 10 minutes | ||
updateCloudStatus(); | ||
}, 10 * 60 * 1000); | ||
|
||
setTimeout(() => { | ||
// Wait 1 execution slot for first status load, since the navigation bar might not have rendered yet | ||
updateCloudStatus(); | ||
}); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.