chore: enhance .gitignore and remove obsolete documentation files

- Reorganize .gitignore with categorized sections for better maintainability
- Add comprehensive ignore patterns for Python, Node.js, databases, logs, and build artifacts
- Add project-specific ignore rules for coordinator, explorer, and deployment files
- Remove outdated documentation: BITCOIN-WALLET-SETUP.md, LOCAL_ASSETS_SUMMARY.md, README-CONTAINER-DEPLOYMENT.md, README-DOMAIN-DEPLOYMENT.md
```
This commit is contained in:
oib
2026-01-24 14:44:51 +01:00
parent 99bf335970
commit 9b9c5beb23
214 changed files with 25558 additions and 171 deletions

View File

@@ -0,0 +1,253 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC Admin Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<style>
.card {
transition: all 0.3s ease;
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.stat-card {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
</style>
</head>
<body class="bg-gray-50">
<!-- Header -->
<header class="bg-white shadow-sm border-b">
<div class="container mx-auto px-4 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-3">
<i data-lucide="shield-check" class="w-8 h-8 text-purple-600"></i>
<h1 class="text-2xl font-bold">AITBC Admin Dashboard</h1>
</div>
<div class="flex items-center space-x-4">
<span class="text-sm text-gray-500">Last updated: <span id="lastUpdate">Just now</span></span>
<button onclick="refreshData()" class="bg-purple-600 text-white px-4 py-2 rounded-lg hover:bg-purple-700 transition flex items-center">
<i data-lucide="refresh-cw" class="w-4 h-4 mr-2"></i>Refresh
</button>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8">
<!-- Stats Overview -->
<section class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="stat-card text-white rounded-lg p-6 card">
<div class="flex items-center justify-between">
<div>
<p class="text-white/80 text-sm">Total Jobs</p>
<p class="text-3xl font-bold" id="totalJobs">0</p>
</div>
<i data-lucide="briefcase" class="w-10 h-10 text-white/50"></i>
</div>
</div>
<div class="stat-card text-white rounded-lg p-6 card">
<div class="flex items-center justify-between">
<div>
<p class="text-white/80 text-sm">Active Jobs</p>
<p class="text-3xl font-bold" id="activeJobs">0</p>
</div>
<i data-lucide="activity" class="w-10 h-10 text-white/50"></i>
</div>
</div>
<div class="stat-card text-white rounded-lg p-6 card">
<div class="flex items-center justify-between">
<div>
<p class="text-white/80 text-sm">Online Miners</p>
<p class="text-3xl font-bold" id="onlineMiners">0</p>
</div>
<i data-lucide="cpu" class="w-10 h-10 text-white/50"></i>
</div>
</div>
<div class="stat-card text-white rounded-lg p-6 card">
<div class="flex items-center justify-between">
<div>
<p class="text-white/80 text-sm">Avg Duration</p>
<p class="text-3xl font-bold" id="avgDuration">0ms</p>
</div>
<i data-lucide="clock" class="w-10 h-10 text-white/50"></i>
</div>
</div>
</section>
<!-- Quick Actions -->
<section class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
<div class="bg-white rounded-lg shadow-lg p-6">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="zap" class="w-5 h-5 mr-2 text-yellow-500"></i>
Quick Actions
</h2>
<div class="grid grid-cols-2 gap-4">
<button onclick="syncOffers()" class="bg-blue-600 text-white px-4 py-3 rounded-lg hover:bg-blue-700 transition flex items-center justify-center">
<i data-lucide="refresh-cw" class="w-4 h-4 mr-2"></i>Sync Offers
</button>
<button onclick="viewMiners()" class="bg-green-600 text-white px-4 py-3 rounded-lg hover:bg-green-700 transition flex items-center justify-center">
<i data-lucide="users" class="w-4 h-4 mr-2"></i>View Miners
</button>
<button onclick="viewJobs()" class="bg-purple-600 text-white px-4 py-3 rounded-lg hover:bg-purple-700 transition flex items-center justify-center">
<i data-lucide="list" class="w-4 h-4 mr-2"></i>View Jobs
</button>
<button onclick="viewMarketplace()" class="bg-orange-600 text-white px-4 py-3 rounded-lg hover:bg-orange-700 transition flex items-center justify-center">
<i data-lucide="store" class="w-4 h-4 mr-2"></i>Marketplace
</button>
</div>
</div>
<div class="bg-white rounded-lg shadow-lg p-6">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="link" class="w-5 h-5 mr-2 text-blue-500"></i>
Quick Links
</h2>
<div class="space-y-3">
<a href="/Marketplace" target="_blank" class="block bg-gray-50 p-3 rounded-lg hover:bg-gray-100 transition">
<div class="flex items-center justify-between">
<span class="font-medium">Marketplace UI</span>
<i data-lucide="external-link" class="w-4 h-4 text-gray-400"></i>
</div>
</a>
<a href="/Exchange" target="_blank" class="block bg-gray-50 p-3 rounded-lg hover:bg-gray-100 transition">
<div class="flex items-center justify-between">
<span class="font-medium">Trade Exchange</span>
<i data-lucide="external-link" class="w-4 h-4 text-gray-400"></i>
</div>
</a>
<a href="/api/docs" target="_blank" class="block bg-gray-50 p-3 rounded-lg hover:bg-gray-100 transition">
<div class="flex items-center justify-between">
<span class="font-medium">API Documentation</span>
<i data-lucide="external-link" class="w-4 h-4 text-gray-400"></i>
</div>
</a>
</div>
</div>
</section>
<!-- Recent Activity -->
<section class="bg-white rounded-lg shadow-lg p-6">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="activity" class="w-5 h-5 mr-2 text-green-500"></i>
System Status
</h2>
<div id="systemStatus" class="space-y-4">
<div class="flex items-center justify-between p-3 bg-green-50 rounded-lg">
<div class="flex items-center">
<i data-lucide="check-circle" class="w-5 h-5 text-green-600 mr-3"></i>
<span>Coordinator API</span>
</div>
<span class="text-green-600 font-medium">Online</span>
</div>
<div class="flex items-center justify-between p-3 bg-green-50 rounded-lg">
<div class="flex items-center">
<i data-lucide="check-circle" class="w-5 h-5 text-green-600 mr-3"></i>
<span>Blockchain Node</span>
</div>
<span class="text-green-600 font-medium">Online</span>
</div>
<div class="flex items-center justify-between p-3 bg-green-50 rounded-lg">
<div class="flex items-center">
<i data-lucide="check-circle" class="w-5 h-5 text-green-600 mr-3"></i>
<span>Marketplace</span>
</div>
<span class="text-green-600 font-medium">Active</span>
</div>
</div>
</section>
</main>
<!-- Toast Notification -->
<div id="toast" class="fixed bottom-4 right-4 bg-green-500 text-white px-6 py-3 rounded-lg shadow-lg transform translate-y-full transition-transform duration-300">
<span id="toastMessage"></span>
</div>
<script>
const API_BASE = '/api';
const ADMIN_API_KEY = 'REDACTED_ADMIN_KEY';
const headers = { 'X-Api-Key': ADMIN_API_KEY };
// Initialize
document.addEventListener('DOMContentLoaded', () => {
lucide.createIcons();
refreshData();
// Auto-refresh every 30 seconds
setInterval(refreshData, 30000);
});
// Refresh data
async function refreshData() {
try {
// Get stats
const response = await axios.get(`${API_BASE}/admin/stats`, { headers });
const stats = response.data;
document.getElementById('totalJobs').textContent = stats.total_jobs || 0;
document.getElementById('activeJobs').textContent = stats.active_jobs || 0;
document.getElementById('onlineMiners').textContent = stats.online_miners || 0;
document.getElementById('avgDuration').textContent = (stats.avg_miner_job_duration_ms || 0) + 'ms';
document.getElementById('lastUpdate').textContent = new Date().toLocaleTimeString();
} catch (error) {
console.error('Failed to fetch stats:', error);
showToast('Failed to fetch stats', 'error');
}
}
// Sync offers
async function syncOffers() {
try {
showToast('Syncing offers...');
const response = await axios.post(`${API_BASE}/marketplace/sync-offers`, {}, { headers });
showToast(`Synced ${response.data.created_offers} offers`);
refreshData();
} catch (error) {
console.error('Failed to sync offers:', error);
showToast('Failed to sync offers', 'error');
}
}
// View miners
async function viewMiners() {
window.open('/admin/miners', '_blank');
}
// View jobs
async function viewJobs() {
window.open('/admin/jobs', '_blank');
}
// View marketplace
function viewMarketplace() {
window.open('/Marketplace', '_blank');
}
// Show toast notification
function showToast(message, type = 'success') {
const toast = document.getElementById('toast');
const toastMessage = document.getElementById('toastMessage');
toastMessage.textContent = message;
toast.className = `fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-lg transform transition-transform duration-300 ${
type === 'error' ? 'bg-red-500' : 'bg-green-500'
} text-white`;
toast.style.transform = 'translateY(0)';
setTimeout(() => {
toast.style.transform = 'translateY(100%)';
}, 3000);
}
</script>
</body>
</html>

View File

@@ -0,0 +1,210 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC GPU Miner Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@keyframes pulse-green {
0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
50% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
}
.gpu-gradient { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.status-active { animation: pulse-green 2s infinite; }
</style>
</head>
<body class="bg-gray-900 text-white min-h-screen">
<!-- Header -->
<header class="bg-gray-800 shadow-xl">
<div class="container mx-auto px-6 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-4">
<i class="fas fa-microchip text-4xl text-purple-500"></i>
<div>
<h1 class="text-3xl font-bold">AITBC GPU Miner Dashboard</h1>
<p class="text-green-400">✓ Running on HOST with direct GPU access</p>
</div>
</div>
<div class="flex items-center space-x-4">
<span class="flex items-center bg-green-900/50 px-3 py-1 rounded-full">
<span class="w-3 h-3 bg-green-500 rounded-full status-active mr-2"></span>
<span>GPU Online</span>
</span>
<button onclick="location.reload()" class="bg-purple-600 hover:bg-purple-700 px-4 py-2 rounded-lg transition">
<i class="fas fa-sync-alt mr-2"></i>Refresh
</button>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-6 py-8">
<!-- GPU Status Card -->
<div class="gpu-gradient rounded-xl p-8 mb-8 text-white shadow-2xl">
<div class="flex items-center justify-between mb-6">
<div>
<h2 class="text-3xl font-bold mb-2">NVIDIA GeForce RTX 4060 Ti</h2>
<p class="text-purple-200">Real-time GPU Performance Monitor</p>
</div>
<div class="text-right">
<div class="text-5xl font-bold" id="gpuUtil">0%</div>
<div class="text-purple-200">GPU Utilization</div>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<div class="bg-white/10 backdrop-blur rounded-lg p-4">
<div class="flex items-center justify-between">
<div>
<p class="text-purple-200 text-sm">Temperature</p>
<p class="text-2xl font-bold" id="gpuTemp">43°C</p>
</div>
<i class="fas fa-thermometer-half text-3xl text-orange-400"></i>
</div>
</div>
<div class="bg-white/10 backdrop-blur rounded-lg p-4">
<div class="flex items-center justify-between">
<div>
<p class="text-purple-200 text-sm">Power Usage</p>
<p class="text-2xl font-bold" id="gpuPower">18W</p>
</div>
<i class="fas fa-bolt text-3xl text-yellow-400"></i>
</div>
</div>
<div class="bg-white/10 backdrop-blur rounded-lg p-4">
<div class="flex items-center justify-between">
<div>
<p class="text-purple-200 text-sm">Memory Used</p>
<p class="text-2xl font-bold" id="gpuMem">2.9GB</p>
</div>
<i class="fas fa-memory text-3xl text-blue-400"></i>
</div>
</div>
<div class="bg-white/10 backdrop-blur rounded-lg p-4">
<div class="flex items-center justify-between">
<div>
<p class="text-purple-200 text-sm">Performance</p>
<p class="text-2xl font-bold" id="gpuPerf">P8</p>
</div>
<i class="fas fa-tachometer-alt text-3xl text-green-400"></i>
</div>
</div>
</div>
</div>
<!-- Mining Operations -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-8">
<!-- Active Jobs -->
<div class="bg-gray-800 rounded-xl p-6">
<h3 class="text-xl font-bold mb-4 flex items-center">
<i class="fas fa-tasks mr-3 text-green-500"></i>
Mining Operations
<span class="ml-auto text-sm text-gray-400">0 active jobs</span>
</h3>
<div class="text-center py-8">
<i class="fas fa-pause-circle text-6xl text-yellow-500 mb-4"></i>
<p class="text-xl font-semibold text-yellow-500">Miner Idle</p>
<p class="text-gray-400 mt-2">Ready to accept mining jobs</p>
</div>
</div>
<!-- GPU Services -->
<div class="bg-gray-800 rounded-xl p-6">
<h3 class="text-xl font-bold mb-4 flex items-center">
<i class="fas fa-server mr-3 text-blue-500"></i>
GPU Services Status
</h3>
<div class="space-y-3">
<div class="bg-gray-700 rounded-lg p-4 flex justify-between items-center hover:bg-gray-600 transition">
<div class="flex items-center">
<i class="fas fa-cube text-purple-400 mr-3"></i>
<div>
<p class="font-semibold">CUDA Computing</p>
<p class="text-sm text-gray-400">4352 CUDA cores available</p>
</div>
</div>
<span class="bg-green-600 px-3 py-1 rounded-full text-sm">Active</span>
</div>
<div class="bg-gray-700 rounded-lg p-4 flex justify-between items-center hover:bg-gray-600 transition">
<div class="flex items-center">
<i class="fas fa-project-diagram text-blue-400 mr-3"></i>
<div>
<p class="font-semibold">Parallel Processing</p>
<p class="text-sm text-gray-400">Multi-threaded operations</p>
</div>
</div>
<span class="bg-green-600 px-3 py-1 rounded-full text-sm">Active</span>
</div>
<div class="bg-gray-700 rounded-lg p-4 flex justify-between items-center hover:bg-gray-600 transition">
<div class="flex items-center">
<i class="fas fa-hashtag text-green-400 mr-3"></i>
<div>
<p class="font-semibold">Hash Generation</p>
<p class="text-sm text-gray-400">Proof-of-work computation</p>
</div>
</div>
<span class="bg-yellow-600 px-3 py-1 rounded-full text-sm">Standby</span>
</div>
<div class="bg-gray-700 rounded-lg p-4 flex justify-between items-center hover:bg-gray-600 transition">
<div class="flex items-center">
<i class="fas fa-brain text-pink-400 mr-3"></i>
<div>
<p class="font-semibold">AI Model Training</p>
<p class="text-sm text-gray-400">Machine learning operations</p>
</div>
</div>
<span class="bg-gray-600 px-3 py-1 rounded-full text-sm">Available</span>
</div>
</div>
</div>
</div>
<!-- System Info -->
<div class="bg-gray-800 rounded-xl p-6">
<h3 class="text-xl font-bold mb-4">System Information</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="bg-gray-700 rounded-lg p-4 text-center">
<i class="fas fa-desktop text-3xl text-blue-400 mb-2"></i>
<p class="text-sm text-gray-400">Host System</p>
<p class="font-semibold text-green-400">at1/localhost</p>
</div>
<div class="bg-gray-700 rounded-lg p-4 text-center">
<i class="fas fa-microchip text-3xl text-purple-400 mb-2"></i>
<p class="text-sm text-gray-400">GPU Access</p>
<p class="font-semibold text-green-400">Direct</p>
</div>
<div class="bg-gray-700 rounded-lg p-4 text-center">
<i class="fas fa-cube text-3xl text-red-400 mb-2"></i>
<p class="text-sm text-gray-400">Container</p>
<p class="font-semibold text-red-400">Not Used</p>
</div>
</div>
</div>
</main>
<script>
// Update GPU metrics
function updateGPU() {
// Simulate GPU metrics
const util = Math.random() * 15;
const temp = 43 + Math.random() * 10;
const power = 18 + util * 0.5;
const mem = 2.9 + Math.random() * 0.5;
document.getElementById('gpuUtil').textContent = Math.round(util) + '%';
document.getElementById('gpuTemp').textContent = Math.round(temp) + '°C';
document.getElementById('gpuPower').textContent = Math.round(power) + 'W';
document.getElementById('gpuMem').textContent = mem.toFixed(1) + 'GB';
}
// Initialize
document.addEventListener('DOMContentLoaded', () => {
updateGPU();
setInterval(updateGPU, 3000);
});
</script>
</body>
</html>