garm/webapp/assets/index.html
Gabriel Adrian Samfira b600a21980 Add rate limits metrics and credentials details page
This change adds metrics for rate limits. Rate limits are now recorded
via a rate limit check loop (as before), but in addition, we are now
taking the rate limit info that gets returned in all github responses
and we're recording that as it happens as opposed to every 30 seconds.

The loop remains to update rate limits even for credentials that are
used rarely.

This change also adds a credentials details page in the webUI.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2026-02-10 12:34:35 +02:00

106 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- Light theme icon -->
<link rel="icon" href="/ui/favicon-light.png" media="(prefers-color-scheme: light)" id="favicon-light" />
<!-- Dark theme icon -->
<link rel="icon" href="/ui/favicon-dark.png" media="(prefers-color-scheme: dark)" id="favicon-dark" />
<!-- Fallback favicon -->
<link rel="icon" href="/ui/favicon-light.png" id="favicon-fallback" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
// Theme management - apply system theme or saved preference
(function() {
function applyTheme() {
const savedTheme = localStorage.getItem('theme');
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
// Determine if we should use dark mode
const useDarkMode = savedTheme === 'dark' ||
(!savedTheme && prefersDark) ||
(savedTheme === 'system' && prefersDark);
// Apply the theme class to document
if (useDarkMode) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
}
function updateFavicon() {
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
const savedTheme = localStorage.getItem('theme');
const useDarkMode = savedTheme === 'dark' ||
(!savedTheme && prefersDark) ||
(savedTheme === 'system' && prefersDark);
const fallbackIcon = document.getElementById('favicon-fallback');
if (useDarkMode) {
fallbackIcon.href = '/ui/favicon-dark.png';
} else {
fallbackIcon.href = '/ui/favicon-light.png';
}
}
// Apply theme and favicon on load
applyTheme();
updateFavicon();
// Listen for system theme changes
if (window.matchMedia) {
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
const handleChange = function(e) {
const savedTheme = localStorage.getItem('theme');
// Only update if using system theme (no saved preference or explicit 'system')
if (!savedTheme || savedTheme === 'system') {
applyTheme();
updateFavicon();
}
};
// Modern browsers
if (mediaQuery.addEventListener) {
mediaQuery.addEventListener('change', handleChange);
} else {
// Older browsers
mediaQuery.addListener(handleChange);
}
}
})();
</script>
<link rel="modulepreload" href="/ui/_app/immutable/entry/start._V-crH9D.js">
<link rel="modulepreload" href="/ui/_app/immutable/chunks/BcoJ4GZv.js">
<link rel="modulepreload" href="/ui/_app/immutable/chunks/DUMcBckj.js">
<link rel="modulepreload" href="/ui/_app/immutable/chunks/rDPsLaF8.js">
<link rel="modulepreload" href="/ui/_app/immutable/chunks/CnZ9nHem.js">
<link rel="modulepreload" href="/ui/_app/immutable/entry/app.D2Xi_Pte.js">
<link rel="modulepreload" href="/ui/_app/immutable/chunks/o8CdT7B0.js">
<link rel="modulepreload" href="/ui/_app/immutable/chunks/i7pKks78.js">
<link rel="modulepreload" href="/ui/_app/immutable/chunks/B-bv0ihJ.js">
<link rel="modulepreload" href="/ui/_app/immutable/chunks/DwF0DbKK.js">
</head>
<body data-sveltekit-preload-data="hover" class="bg-gray-100 dark:bg-gray-900">
<div style="display: contents">
<script>
{
__sveltekit_135p731 = {
base: "/ui",
assets: "/ui"
};
const element = document.currentScript.parentElement;
Promise.all([
import("/ui/_app/immutable/entry/start._V-crH9D.js"),
import("/ui/_app/immutable/entry/app.D2Xi_Pte.js")
]).then(([kit, app]) => {
kit.start(app, element);
});
}
</script>
</div>
</body>
</html>