feat: migrate cluster.html to wd-* design system
This commit is contained in:
parent
06551c66a6
commit
87da3c0b58
1 changed files with 37 additions and 37 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
<title>Cluster — Dragonflight</title>
|
<title>Cluster — Dragonflight</title>
|
||||||
<link rel="stylesheet" href="css/common.css">
|
<link rel="stylesheet" href="/dist/app.css">
|
||||||
<style>
|
<style>
|
||||||
.page-body {
|
.page-body {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
@ -132,92 +132,92 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="shell">
|
<div class="wd-shell" style="display:flex;min-height:100vh;">
|
||||||
<nav class="sidebar" aria-label="Main navigation">
|
<nav class="wd-sidebar" aria-label="Main navigation">
|
||||||
<div class="sidebar-brand">
|
<div class="wd-sidebar-header">
|
||||||
<img src="img/dragon-logo.png?v=1" alt="Dragonflight" class="sidebar-logo">
|
<img src="img/dragon-logo.png?v=1" alt="Dragonflight" style="width:18px;height:18px;">
|
||||||
<span class="sidebar-brand-name">Dragonflight</span>
|
<span class="wd-sidebar-brand">Dragonflight</span>
|
||||||
</div>
|
</div>
|
||||||
<nav class="sidebar-nav">
|
<div class="wd-sidebar-nav">
|
||||||
<a href="home.html" class="nav-item">
|
<a href="home.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 7l6-5 6 5v7a1 1 0 0 1-1 1h-3v-5H6v5H3a1 1 0 0 1-1-1z"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 7l6-5 6 5v7a1 1 0 0 1-1 1h-3v-5H6v5H3a1 1 0 0 1-1-1z"/></svg>
|
||||||
Home
|
Home
|
||||||
</a>
|
</a>
|
||||||
<a href="index.html" class="nav-item">
|
<a href="index.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1" y="1" width="6" height="6" rx="1"/><rect x="9" y="1" width="6" height="6" rx="1"/><rect x="1" y="9" width="6" height="6" rx="1"/><rect x="9" y="9" width="6" height="6" rx="1"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1" y="1" width="6" height="6" rx="1"/><rect x="9" y="1" width="6" height="6" rx="1"/><rect x="1" y="9" width="6" height="6" rx="1"/><rect x="9" y="9" width="6" height="6" rx="1"/></svg>
|
||||||
Library
|
Library
|
||||||
</a>
|
</a>
|
||||||
<a href="projects.html" class="nav-item">
|
<a href="projects.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M1 4a1 1 0 0 1 1-1h4l2 2h5a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1z"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M1 4a1 1 0 0 1 1-1h4l2 2h5a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1z"/></svg>
|
||||||
Projects
|
Projects
|
||||||
</a>
|
</a>
|
||||||
<a href="upload.html" class="nav-item">
|
<a href="upload.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 11V3M5 6l3-3 3 3"/><path d="M2 13h12"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 11V3M5 6l3-3 3 3"/><path d="M2 13h12"/></svg>
|
||||||
Ingest
|
Ingest
|
||||||
</a>
|
</a>
|
||||||
<a href="recorders.html" class="nav-item">
|
<a href="recorders.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1" y="4" width="10" height="8" rx="1"/><path d="M11 7l4-2v6l-4-2"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1" y="4" width="10" height="8" rx="1"/><path d="M11 7l4-2v6l-4-2"/></svg>
|
||||||
Recorders
|
Recorders
|
||||||
</a>
|
</a>
|
||||||
<a href="capture.html" class="nav-item">
|
<a href="capture.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="8" cy="8" r="3"/><circle cx="8" cy="8" r="6.5"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="8" cy="8" r="3"/><circle cx="8" cy="8" r="6.5"/></svg>
|
||||||
Capture
|
Capture
|
||||||
</a>
|
</a>
|
||||||
<a href="jobs.html" class="nav-item">
|
<a href="jobs.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 4h12M2 8h8M2 12h5"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 4h12M2 8h8M2 12h5"/></svg>
|
||||||
Jobs
|
Jobs
|
||||||
</a>
|
</a>
|
||||||
<a href="editor.html" class="nav-item">
|
<a href="editor.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 13l1.5-3.5L11 2l3 3-7.5 7.5L3 14zM10 3l3 3"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 13l1.5-3.5L11 2l3 3-7.5 7.5L3 14zM10 3l3 3"/></svg>
|
||||||
Editor
|
Editor
|
||||||
</a>
|
</a>
|
||||||
<div class="sidebar-section-label">Admin</div>
|
<div class="wd-sidebar-section">Admin</div>
|
||||||
<a href="users.html" class="nav-item">
|
<a href="users.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="6" cy="5" r="2.5"/><path d="M1 13c0-2.8 2.2-5 5-5s5 2.2 5 5"/><circle cx="12" cy="5" r="2"/><path d="M15 12c0-1.9-1.3-3.5-3-4"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="6" cy="5" r="2.5"/><path d="M1 13c0-2.8 2.2-5 5-5s5 2.2 5 5"/><circle cx="12" cy="5" r="2"/><path d="M15 12c0-1.9-1.3-3.5-3-4"/></svg>
|
||||||
Users
|
Users
|
||||||
</a>
|
</a>
|
||||||
<a href="tokens.html" class="nav-item">
|
<a href="tokens.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="6" cy="10" r="3.5"/><path d="M8.7 7.3L13 3M11.5 3.5l1.5 1.5M13.5 2.5l1 1"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="6" cy="10" r="3.5"/><path d="M8.7 7.3L13 3M11.5 3.5l1.5 1.5M13.5 2.5l1 1"/></svg>
|
||||||
Tokens
|
Tokens
|
||||||
</a>
|
</a>
|
||||||
<a href="containers.html" class="nav-item">
|
<a href="containers.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1" y="5" width="14" height="4" rx="1"/><rect x="1" y="10" width="14" height="4" rx="1"/><path d="M4 7h1M4 12h1"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1" y="5" width="14" height="4" rx="1"/><rect x="1" y="10" width="14" height="4" rx="1"/><path d="M4 7h1M4 12h1"/></svg>
|
||||||
Containers
|
Containers
|
||||||
</a>
|
</a>
|
||||||
<a href="cluster.html" class="nav-item active">
|
<a href="cluster.html" class="wd-nav-item is-active">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="8" cy="8" r="2"/><circle cx="2" cy="3" r="1.5"/><circle cx="14" cy="3" r="1.5"/><circle cx="2" cy="13" r="1.5"/><circle cx="14" cy="13" r="1.5"/><path d="M3.1 4.1L6.5 6.5M12.9 4.1L9.5 6.5M3.1 11.9L6.5 9.5M12.9 11.9L9.5 9.5"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="8" cy="8" r="2"/><circle cx="2" cy="3" r="1.5"/><circle cx="14" cy="3" r="1.5"/><circle cx="2" cy="13" r="1.5"/><circle cx="14" cy="13" r="1.5"/><path d="M3.1 4.1L6.5 6.5M12.9 4.1L9.5 6.5M3.1 11.9L6.5 9.5M12.9 11.9L9.5 9.5"/></svg>
|
||||||
Cluster
|
Cluster
|
||||||
</a>
|
</a>
|
||||||
<a href="settings.html" class="nav-item">
|
<a href="settings.html" class="wd-nav-item">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="8" cy="8" r="2.5"/><path d="M8 1v1.5M8 13.5V15M1 8h1.5M13.5 8H15M2.9 2.9l1.1 1.1M12 12l1.1 1.1M2.9 13.1L4 12M12 4l1.1-1.1"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="8" cy="8" r="2.5"/><path d="M8 1v1.5M8 13.5V15M1 8h1.5M13.5 8H15M2.9 2.9l1.1 1.1M12 12l1.1 1.1M2.9 13.1L4 12M12 4l1.1-1.1"/></svg>
|
||||||
Settings
|
Settings
|
||||||
</a>
|
</a>
|
||||||
</nav>
|
</div>
|
||||||
<div class="sidebar-footer">
|
<div class="wd-sidebar-footer">
|
||||||
<div class="sidebar-user">
|
<div class="wd-sidebar-user">
|
||||||
<div class="sidebar-user-avatar" id="userAvatar">?</div>
|
<div class="wd-sidebar-user-avatar" id="userAvatar">?</div>
|
||||||
<div class="sidebar-user-info">
|
<div class="wd-sidebar-user-info">
|
||||||
<div class="sidebar-user-name" id="userName">—</div>
|
<div class="wd-sidebar-user-name" id="userName">—</div>
|
||||||
<div class="sidebar-user-role" id="userRole"></div>
|
<div class="wd-sidebar-user-role" id="userRole"></div>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-ghost" id="logoutBtn" title="Sign out" style="padding:0;width:24px;height:24px;flex-shrink:0;">
|
<button class="wd-btn wd-btn--ghost wd-btn--sm wd-btn--icon wd-sidebar-user-logout" id="logoutBtn" title="Sign out">
|
||||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" width="14" height="14"><path d="M10 8H3M6 5l-3 3 3 3"/><path d="M7 3h5a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H7"/></svg>
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" width="14" height="14"><path d="M10 8H3M6 5l-3 3 3 3"/><path d="M7 3h5a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H7"/></svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="main">
|
<div style="flex:1;display:flex;flex-direction:column;">
|
||||||
<header class="topbar">
|
<header class="wd-topbar">
|
||||||
<div class="topbar-left">
|
<div class="wd-topbar-left">
|
||||||
<span class="page-title">Cluster</span>
|
<span class="page-title">Cluster</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="topbar-right">
|
<div class="wd-topbar-right">
|
||||||
<div class="refresh-indicator">
|
<div class="refresh-indicator">
|
||||||
<span class="refresh-dot" id="refreshDot"></span>
|
<span class="refresh-dot" id="refreshDot"></span>
|
||||||
<span id="refreshText">Loading…</span>
|
<span id="refreshText">Loading…</span>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-ghost btn-sm" id="refreshBtn" style="margin-left:8px;">Refresh</button>
|
<button class="wd-btn wd-btn--ghost wd-btn--sm" id="refreshBtn" style="margin-left:8px;">Refresh</button>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
@ -259,7 +259,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="toast-container" id="toastContainer" aria-live="polite"></div>
|
<div class="wd-toast-container" id="toastContainer" aria-live="polite"></div>
|
||||||
|
|
||||||
<script src="js/api.js?v=6"></script>
|
<script src="js/api.js?v=6"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -335,7 +335,7 @@ function renderNodes() {
|
||||||
<td style="font-family:var(--font-mono);font-size:11px;">${esc(n.version || '—')}</td>
|
<td style="font-family:var(--font-mono);font-size:11px;">${esc(n.version || '—')}</td>
|
||||||
<td style="font-size:11px;color:var(--text-tertiary);">${relTime(n.last_seen)}</td>
|
<td style="font-size:11px;color:var(--text-tertiary);">${relTime(n.last_seen)}</td>
|
||||||
<td style="text-align:right">
|
<td style="text-align:right">
|
||||||
<button class="btn btn-ghost btn-sm"
|
<button class="wd-btn wd-btn--ghost wd-btn--sm"
|
||||||
style="${n.role === 'primary' ? 'opacity:0.4;' : ''}"
|
style="${n.role === 'primary' ? 'opacity:0.4;' : ''}"
|
||||||
onclick="removeNode('${esc(n.id)}','${esc(n.hostname)}',this)"
|
onclick="removeNode('${esc(n.id)}','${esc(n.hostname)}',this)"
|
||||||
${n.role === 'primary' ? 'title="Cannot remove the primary node"' : 'title="Remove node"'}>
|
${n.role === 'primary' ? 'title="Cannot remove the primary node"' : 'title="Remove node"'}>
|
||||||
|
|
@ -372,7 +372,7 @@ function setDot(state, label) {
|
||||||
|
|
||||||
function toast(title, msg, type) {
|
function toast(title, msg, type) {
|
||||||
const el = document.createElement('div');
|
const el = document.createElement('div');
|
||||||
el.className = 'toast toast--' + (type || 'info');
|
el.className = 'wd-toast wd-toast--' + (type || 'info');
|
||||||
el.innerHTML = '<div class="toast-body"><div class="toast-title">' + esc(title) + '</div>' +
|
el.innerHTML = '<div class="toast-body"><div class="toast-title">' + esc(title) + '</div>' +
|
||||||
(msg ? '<div class="toast-msg">' + esc(msg) + '</div>' : '') + '</div>';
|
(msg ? '<div class="toast-msg">' + esc(msg) + '</div>' : '') + '</div>';
|
||||||
document.getElementById('toastContainer').appendChild(el);
|
document.getElementById('toastContainer').appendChild(el);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue