- Implemented Docker container scanning and periodic updates in the Server initialization. - Added new RPC endpoints for managing Docker containers, including start, stop, and restart functionalities. - Updated the API to handle package management for Docker-based applications. - Improved environment variable handling for user-specific configurations in Podman and Docker clients. - Enhanced the development startup script to include Docker container management and provide clearer instructions for full stack setup.
406 lines
11 KiB
HTML
406 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Bitcoin Core - Archipelago</title>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css">
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
min-height: 100vh;
|
|
background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 50%, #16213e 100%);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 2rem;
|
|
color: white;
|
|
}
|
|
|
|
/* Use Archipelago's glass-card style */
|
|
.glass-card {
|
|
background-color: rgba(0, 0, 0, 0.65);
|
|
backdrop-filter: blur(18px);
|
|
-webkit-backdrop-filter: blur(18px);
|
|
border: 1px solid rgba(255, 255, 255, 0.18);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
|
|
border-radius: 1rem;
|
|
max-width: 900px;
|
|
width: 100%;
|
|
padding: 3rem;
|
|
overflow: visible;
|
|
}
|
|
|
|
/* Logo container like onboarding */
|
|
.logo-gradient-border {
|
|
background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
|
|
padding: 3px;
|
|
border-radius: 24px;
|
|
display: inline-block;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
.logo-gradient-border img {
|
|
display: block;
|
|
background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
|
|
border-radius: 22px;
|
|
width: 80px;
|
|
height: 80px;
|
|
padding: 16px;
|
|
}
|
|
|
|
.header {
|
|
text-align: center;
|
|
margin-bottom: 3rem;
|
|
position: relative;
|
|
}
|
|
|
|
.header-logo {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 2.5rem;
|
|
font-weight: 700;
|
|
margin-bottom: 0.5rem;
|
|
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.subtitle {
|
|
color: rgba(255, 255, 255, 0.7);
|
|
font-size: 1.1rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.status-badge {
|
|
display: inline-block;
|
|
padding: 0.5rem 1.5rem;
|
|
border-radius: 20px;
|
|
font-weight: 600;
|
|
font-size: 0.95rem;
|
|
background: rgba(0, 0, 0, 0.4);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.status-running {
|
|
background: rgba(16, 185, 129, 0.15);
|
|
border-color: rgba(16, 185, 129, 0.3);
|
|
color: #10b981;
|
|
}
|
|
|
|
.status-stopped {
|
|
background: rgba(239, 68, 68, 0.15);
|
|
border-color: rgba(239, 68, 68, 0.3);
|
|
color: #ef4444;
|
|
}
|
|
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
gap: 1.5rem;
|
|
margin-bottom: 2.5rem;
|
|
}
|
|
|
|
.stat-card {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
border-radius: 12px;
|
|
padding: 1.5rem;
|
|
text-align: center;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.stat-card:hover {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border-color: rgba(255, 255, 255, 0.2);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 0.875rem;
|
|
color: rgba(255, 255, 255, 0.6);
|
|
margin-bottom: 0.75rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 1.75rem;
|
|
font-weight: 700;
|
|
color: #fff;
|
|
}
|
|
|
|
.info-section {
|
|
margin-bottom: 2.5rem;
|
|
}
|
|
|
|
.info-section h2 {
|
|
font-size: 1.5rem;
|
|
margin-bottom: 1rem;
|
|
color: #fff;
|
|
}
|
|
|
|
.info-section p {
|
|
color: rgba(255, 255, 255, 0.75);
|
|
line-height: 1.7;
|
|
margin-bottom: 1.5rem;
|
|
font-size: 1.05rem;
|
|
}
|
|
|
|
.connection-info {
|
|
background: rgba(255, 255, 255, 0.04);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
border-radius: 12px;
|
|
padding: 1.75rem;
|
|
margin-top: 1.5rem;
|
|
}
|
|
|
|
.connection-info h3 {
|
|
font-size: 1.15rem;
|
|
margin-bottom: 1.25rem;
|
|
color: #fff;
|
|
}
|
|
|
|
.detail-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 1rem 0;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
|
}
|
|
|
|
.detail-row:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.detail-row .label {
|
|
color: rgba(255, 255, 255, 0.65);
|
|
font-weight: 500;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.detail-row code {
|
|
background: rgba(0, 0, 0, 0.4);
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 8px;
|
|
color: #10b981;
|
|
font-family: 'Courier New', monospace;
|
|
font-size: 0.9rem;
|
|
border: 1px solid rgba(16, 185, 129, 0.2);
|
|
}
|
|
|
|
.actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
/* Use Archipelago's glass-button style */
|
|
.glass-button {
|
|
flex: 1;
|
|
min-width: 180px;
|
|
padding: 1rem 1.75rem;
|
|
background-color: rgba(0, 0, 0, 0.6);
|
|
backdrop-filter: blur(18px);
|
|
-webkit-backdrop-filter: blur(18px);
|
|
border: 1px solid rgba(255, 255, 255, 0.18);
|
|
color: rgba(255, 255, 255, 0.9);
|
|
border-radius: 12px;
|
|
font-weight: 600;
|
|
font-size: 1rem;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.glass-button:hover {
|
|
background-color: rgba(0, 0, 0, 0.7);
|
|
border-color: rgba(255, 255, 255, 0.3);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
.glass-button.primary {
|
|
background: linear-gradient(135deg, rgba(247, 147, 26, 0.3) 0%, rgba(255, 107, 53, 0.3) 100%);
|
|
border-color: rgba(247, 147, 26, 0.4);
|
|
}
|
|
|
|
.glass-button.primary:hover {
|
|
background: linear-gradient(135deg, rgba(247, 147, 26, 0.4) 0%, rgba(255, 107, 53, 0.4) 100%);
|
|
border-color: rgba(247, 147, 26, 0.6);
|
|
}
|
|
|
|
.loading {
|
|
text-align: center;
|
|
padding: 3rem;
|
|
color: rgba(255, 255, 255, 0.6);
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
body {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.glass-card {
|
|
padding: 2rem;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.stats-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.actions {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.glass-button {
|
|
width: 100%;
|
|
min-width: auto;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="glass-card">
|
|
<div id="loading" class="loading">
|
|
<p>Loading Bitcoin Core data...</p>
|
|
</div>
|
|
|
|
<div id="content" style="display: none;">
|
|
<!-- Header with Logo -->
|
|
<div class="header">
|
|
<div class="header-logo">
|
|
<div class="logo-gradient-border">
|
|
<img src="/assets/img/app-icons/bitcoin.svg" alt="Bitcoin Core" />
|
|
</div>
|
|
</div>
|
|
<h1>Bitcoin Core</h1>
|
|
<p class="subtitle">Full Bitcoin Node - Regtest Mode</p>
|
|
<div class="status-badge status-running" id="statusBadge">
|
|
Running
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Stats Grid -->
|
|
<div class="stats-grid">
|
|
<div class="stat-card">
|
|
<div class="stat-label">Network</div>
|
|
<div class="stat-value">Regtest</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-label">RPC Port</div>
|
|
<div class="stat-value">18443</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-label">P2P Port</div>
|
|
<div class="stat-value">18444</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-label">Status</div>
|
|
<div class="stat-value" id="containerStatus">Running</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Info Section -->
|
|
<div class="info-section">
|
|
<h2>About Bitcoin Core</h2>
|
|
<p>
|
|
Bitcoin Core is the reference implementation of the Bitcoin protocol. This instance is running in
|
|
<strong>regtest mode</strong> for local development and testing without syncing the full blockchain.
|
|
</p>
|
|
|
|
<div class="connection-info">
|
|
<h3>Connection Details</h3>
|
|
<div class="detail-row">
|
|
<span class="label">RPC Endpoint:</span>
|
|
<code>http://localhost:18443</code>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="label">P2P Endpoint:</span>
|
|
<code>localhost:18444</code>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="label">Data Directory:</span>
|
|
<code>/data/.bitcoin</code>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Action Buttons -->
|
|
<div class="actions">
|
|
<a href="https://developer.bitcoin.org/reference/rpc/" target="_blank" class="glass-button primary">
|
|
<i class="mdi mdi-book-open-variant"></i>
|
|
RPC Documentation
|
|
</a>
|
|
<button class="glass-button" onclick="alert('Logs viewer coming soon!')">
|
|
<i class="mdi mdi-file-document-outline"></i>
|
|
View Logs
|
|
</button>
|
|
<a href="http://localhost:8100/dashboard/apps" class="glass-button">
|
|
<i class="mdi mdi-arrow-left"></i>
|
|
Back to My Apps
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Fetch Bitcoin Core status from backend
|
|
async function loadBitcoinStatus() {
|
|
try {
|
|
const response = await fetch('http://localhost:5959/rpc/v1', {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify({ method: 'db.dump' })
|
|
});
|
|
|
|
const data = await response.json();
|
|
const bitcoin = data.result?.['package-data']?.bitcoin;
|
|
|
|
if (bitcoin) {
|
|
const state = bitcoin.state || 'unknown';
|
|
const status = bitcoin.installed?.status || 'unknown';
|
|
|
|
document.getElementById('statusBadge').textContent =
|
|
state.charAt(0).toUpperCase() + state.slice(1);
|
|
document.getElementById('statusBadge').className =
|
|
'status-badge ' + (state === 'running' ? 'status-running' : 'status-stopped');
|
|
document.getElementById('containerStatus').textContent =
|
|
status.charAt(0).toUpperCase() + status.slice(1);
|
|
}
|
|
|
|
document.getElementById('loading').style.display = 'none';
|
|
document.getElementById('content').style.display = 'block';
|
|
} catch (error) {
|
|
console.error('Failed to load Bitcoin status:', error);
|
|
document.getElementById('loading').innerHTML =
|
|
'<p>Failed to connect to backend. Is the backend running?</p>';
|
|
}
|
|
}
|
|
|
|
// Load on page load
|
|
loadBitcoinStatus();
|
|
|
|
// Refresh every 5 seconds
|
|
setInterval(loadBitcoinStatus, 5000);
|
|
</script>
|
|
</body>
|
|
</html>
|