195 lines
10 KiB
HTML
195 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>SPORE UI</title>
|
|
<link rel="stylesheet" href="styles/main.css">
|
|
<link rel="stylesheet" href="styles/theme.css?v=1757159926">
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<div class="main-navigation">
|
|
<button class="burger-btn" id="burger-btn" aria-label="Menu" title="Menu">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M3 6h18M3 12h18M3 18h18" />
|
|
</svg>
|
|
</button>
|
|
<div class="nav-left">
|
|
<button class="nav-tab active" data-view="cluster">🌐 Cluster</button>
|
|
<button class="nav-tab" data-view="topology">🔗 Topology</button>
|
|
<button class="nav-tab" data-view="monitoring">📊 Monitoring</button>
|
|
<button class="nav-tab" data-view="firmware">📦 Firmware</button>
|
|
</div>
|
|
<div class="nav-right">
|
|
<div class="theme-switcher">
|
|
<button class="theme-toggle" id="theme-toggle" title="Toggle theme">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="12" cy="12" r="5"/>
|
|
<path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<div class="cluster-status">🚀 Cluster Online</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="cluster-view" class="view-content active">
|
|
<div class="cluster-section">
|
|
<div class="cluster-header">
|
|
<div class="cluster-header-left">
|
|
<div class="primary-node-info">
|
|
<span class="primary-node-label">Primary Node:</span>
|
|
<span class="primary-node-ip" id="primary-node-ip">Discovering...</span>
|
|
<button class="primary-node-refresh" id="select-random-primary-btn"
|
|
title="🎲 Select random primary node">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="14"
|
|
height="14">
|
|
<path d="M1 4v6h6M23 20v-6h-6" />
|
|
<path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<button class="refresh-btn" id="refresh-cluster-btn">
|
|
<svg class="refresh-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
stroke-width="2">
|
|
<path d="M1 4v6h6M23 20v-6h-6" />
|
|
<path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15" />
|
|
</svg>
|
|
Refresh
|
|
</button>
|
|
</div>
|
|
|
|
<div id="cluster-members-container">
|
|
<div class="loading">
|
|
<div>Loading cluster members...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="topology-view" class="view-content">
|
|
<div id="topology-graph-container">
|
|
<div class="loading">
|
|
<div>Loading network topology...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="firmware-view" class="view-content">
|
|
<div class="firmware-section">
|
|
<div id="firmware-container">
|
|
<div class="firmware-overview">
|
|
<div class="firmware-actions">
|
|
<div class="action-group">
|
|
<h3>🚀 Firmware Update</h3>
|
|
<div class="firmware-upload-compact">
|
|
<div class="compact-upload-row">
|
|
<div class="file-upload-area">
|
|
<div class="target-options">
|
|
<label class="target-option">
|
|
<input type="radio" name="target-type" value="all" checked>
|
|
<span class="radio-custom"></span>
|
|
<span class="target-label">All Nodes</span>
|
|
</label>
|
|
<label class="target-option specific-node-option">
|
|
<input type="radio" name="target-type" value="specific">
|
|
<span class="radio-custom"></span>
|
|
<span class="target-label">Specific Node</span>
|
|
<select id="specific-node-select" class="node-select">
|
|
<option value="">Select a node...</option>
|
|
</select>
|
|
</label>
|
|
<label class="target-option by-label-option">
|
|
<input type="radio" name="target-type" value="labels">
|
|
<span class="radio-custom"></span>
|
|
<span class="target-label">By Label</span>
|
|
<select id="label-select" class="label-select"
|
|
style="min-width: 220px; display: inline-block; vertical-align: middle;">
|
|
<option value="">Select a label...</option>
|
|
</select>
|
|
<div id="selected-labels-container" class="selected-labels"></div>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="file-input-wrapper">
|
|
<input type="file" id="global-firmware-file" accept=".bin,.hex"
|
|
style="display: none;">
|
|
<button class="upload-btn-compact"
|
|
onclick="document.getElementById('global-firmware-file').click()">
|
|
📁 Choose File
|
|
</button>
|
|
<span class="file-info" id="file-info">No file selected</span>
|
|
</div>
|
|
</div>
|
|
|
|
<button class="deploy-btn" id="deploy-btn" disabled>🚀 Deploy</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="firmware-nodes-list" id="firmware-nodes-list">
|
|
<!-- Nodes will be populated here -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="monitoring-view" class="view-content">
|
|
<div class="monitoring-view-section">
|
|
<div class="monitoring-header">
|
|
<h2>📊 Monitoring</h2>
|
|
<button class="refresh-btn" id="refresh-monitoring-btn">
|
|
<svg class="refresh-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M1 4v6h6M23 20v-6h-6" />
|
|
<path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15" />
|
|
</svg>
|
|
Refresh
|
|
</button>
|
|
</div>
|
|
|
|
<div class="monitoring-content">
|
|
<div class="cluster-summary" id="cluster-summary">
|
|
<div class="loading">
|
|
<div>Loading cluster resource summary...</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="nodes-monitoring" id="nodes-monitoring">
|
|
<div class="loading">
|
|
<div>Loading node resource data...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="./vendor/d3.v7.min.js"></script>
|
|
<script src="./scripts/constants.js"></script>
|
|
<script src="./scripts/framework.js"></script>
|
|
<script src="./scripts/api-client.js"></script>
|
|
<script src="./scripts/view-models.js"></script>
|
|
<!-- Base/leaf components first -->
|
|
<script src="./scripts/components/DrawerComponent.js"></script>
|
|
<script src="./scripts/components/PrimaryNodeComponent.js"></script>
|
|
<script src="./scripts/components/NodeDetailsComponent.js"></script>
|
|
<script src="./scripts/components/ClusterMembersComponent.js"></script>
|
|
<script src="./scripts/components/FirmwareComponent.js"></script>
|
|
<!-- Container/view components after their deps -->
|
|
<script src="./scripts/components/FirmwareViewComponent.js"></script>
|
|
<script src="./scripts/components/ClusterViewComponent.js"></script>
|
|
<script src="./scripts/components/ClusterStatusComponent.js"></script>
|
|
<script src="./scripts/components/TopologyGraphComponent.js"></script>
|
|
<script src="./scripts/components/MonitoringViewComponent.js"></script>
|
|
<script src="./scripts/components/ComponentsLoader.js"></script>
|
|
<script src="./scripts/theme-manager.js"></script>
|
|
<script src="./scripts/app.js"></script>
|
|
</body>
|
|
|
|
</html> |