mirror of
https://github.com/Retropex/custom-ocean.xyz-dashboard.git
synced 2025-05-12 19:20:45 +02:00
1071 lines
34 KiB
HTML
1071 lines
34 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<!-- Custom Fonts -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=VT323&display=swap" rel="stylesheet">
|
|
<!-- Retro Floating Refresh Bar -->
|
|
<link rel="stylesheet" href="/static/css/retro-refresh.css">
|
|
<!-- Meta viewport for responsive scaling -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Ocean.xyz Pool Mining Dashboard v 0.2</title>
|
|
<!-- Font Awesome CDN for icon support -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<style>
|
|
:root {
|
|
--bg-color: #0a0a0a;
|
|
--bg-gradient: linear-gradient(135deg, #0a0a0a, #1a1a1a);
|
|
--primary-color: #f7931a;
|
|
--accent-color: #00ffff;
|
|
--text-color: #ffffff;
|
|
--card-padding: 0.5rem;
|
|
--text-size-base: 16px;
|
|
--terminal-font: 'VT323', monospace;
|
|
--header-font: 'Orbitron', sans-serif;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
:root {
|
|
--card-padding: 0.75rem;
|
|
--text-size-base: 18px;
|
|
}
|
|
}
|
|
|
|
/* CRT Screen Effect */
|
|
body::before {
|
|
content: " ";
|
|
display: block;
|
|
position: fixed;
|
|
top: 0; left: 0; bottom: 0; right: 0;
|
|
background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
|
|
linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.03));
|
|
background-size: 100% 2px, 3px 100%;
|
|
pointer-events: none;
|
|
z-index: 2;
|
|
opacity: 0.15;
|
|
}
|
|
|
|
/* Flicker Animation */
|
|
@keyframes flicker {
|
|
0% { opacity: 0.97; }
|
|
5% { opacity: 0.95; }
|
|
10% { opacity: 0.97; }
|
|
15% { opacity: 0.94; }
|
|
20% { opacity: 0.98; }
|
|
50% { opacity: 0.95; }
|
|
80% { opacity: 0.96; }
|
|
90% { opacity: 0.94; }
|
|
100% { opacity: 0.98; }
|
|
}
|
|
|
|
body {
|
|
background: var(--bg-gradient);
|
|
color: var(--text-color);
|
|
padding-top: 0.5rem;
|
|
font-size: var(--text-size-base);
|
|
font-family: var(--terminal-font);
|
|
text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
h1 {
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
color: var(--primary-color);
|
|
font-family: var(--header-font);
|
|
letter-spacing: 1px;
|
|
text-shadow: 0 0 10px var(--primary-color);
|
|
animation: flicker 4s infinite;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
h1 {
|
|
font-size: 26px;
|
|
}
|
|
}
|
|
|
|
.card,
|
|
.card-header,
|
|
.card-body,
|
|
.card-footer {
|
|
border-radius: 0 !important;
|
|
}
|
|
|
|
/* Enhanced card with scanlines */
|
|
.card {
|
|
background-color: var(--bg-color);
|
|
border: 1px solid var(--primary-color);
|
|
margin-bottom: 0.5rem;
|
|
padding: var(--card-padding);
|
|
flex: 1;
|
|
position: relative;
|
|
overflow: hidden;
|
|
box-shadow: 0 0 5px rgba(247, 147, 26, 0.3);
|
|
}
|
|
|
|
/* Scanline effect for cards */
|
|
.card::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: repeating-linear-gradient(
|
|
0deg,
|
|
rgba(0, 0, 0, 0.05),
|
|
rgba(0, 0, 0, 0.05) 1px,
|
|
transparent 1px,
|
|
transparent 2px
|
|
);
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Override for Payout & Misc card */
|
|
#payoutMiscCard {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.card-header {
|
|
background-color: #000;
|
|
color: var(--primary-color);
|
|
font-weight: bold;
|
|
padding: 0.3rem 0.5rem;
|
|
font-size: 1.1rem;
|
|
border-bottom: 1px solid var(--primary-color);
|
|
text-shadow: 0 0 5px var(--primary-color);
|
|
animation: flicker 4s infinite;
|
|
font-family: var(--header-font);
|
|
}
|
|
|
|
.card-body hr {
|
|
border-top: 1px solid var(--primary-color);
|
|
margin: 0.25rem 0;
|
|
}
|
|
|
|
.arrow {
|
|
display: inline-block;
|
|
font-weight: bold;
|
|
margin-left: 0.5rem;
|
|
}
|
|
|
|
/* Bounce Up Animation for Up Chevron */
|
|
@keyframes bounceUp {
|
|
0% { transform: translateY(0); }
|
|
25% { transform: translateY(-2px); }
|
|
50% { transform: translateY(0); }
|
|
75% { transform: translateY(-2px); }
|
|
100% { transform: translateY(0); }
|
|
}
|
|
|
|
/* Bounce Down Animation for Down Chevron */
|
|
@keyframes bounceDown {
|
|
0% { transform: translateY(0); }
|
|
25% { transform: translateY(2px); }
|
|
50% { transform: translateY(0); }
|
|
75% { transform: translateY(2px); }
|
|
100% { transform: translateY(0); }
|
|
}
|
|
|
|
/* Apply bounce animations */
|
|
.bounce-up {
|
|
animation: bounceUp 1s infinite;
|
|
}
|
|
|
|
.bounce-down {
|
|
animation: bounceDown 1s infinite;
|
|
}
|
|
|
|
/* Make chevrons slightly smaller */
|
|
.chevron {
|
|
font-size: 0.8rem;
|
|
position: relative;
|
|
top: 3px;
|
|
}
|
|
|
|
/* Enhanced Online dot with more glow */
|
|
.online-dot {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
background: #32CD32;
|
|
border-radius: 50%;
|
|
margin-left: 0.5em;
|
|
position: relative;
|
|
top: -2px;
|
|
animation: glow 1s infinite;
|
|
box-shadow: 0 0 10px #32CD32, 0 0 20px #32CD32;
|
|
}
|
|
|
|
@keyframes glow {
|
|
0%, 100% { box-shadow: 0 0 10px #32CD32, 0 0 15px #32CD32; }
|
|
50% { box-shadow: 0 0 15px #32CD32, 0 0 25px #32CD32; }
|
|
}
|
|
|
|
/* Enhanced Offline dot with more glow */
|
|
.offline-dot {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
background: red;
|
|
border-radius: 50%;
|
|
margin-left: 0.5em;
|
|
animation: glowRed 1s infinite;
|
|
box-shadow: 0 0 10px red, 0 0 20px red;
|
|
}
|
|
|
|
@keyframes glowRed {
|
|
0%, 100% { box-shadow: 0 0 10px red, 0 0 15px red; }
|
|
50% { box-shadow: 0 0 15px red, 0 0 25px red; }
|
|
}
|
|
|
|
@keyframes glowPulse {
|
|
0%, 100% { text-shadow: 0 0 5px #32CD32; }
|
|
50% { text-shadow: 0 0 10px #32CD32; }
|
|
}
|
|
|
|
#graphContainer {
|
|
background-color: #000;
|
|
padding: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
height: 230px;
|
|
border: 1px solid var(--primary-color);
|
|
box-shadow: 0 0 10px rgba(247, 147, 26, 0.2);
|
|
position: relative;
|
|
}
|
|
|
|
/* Add scanline effect to graph */
|
|
#graphContainer::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: repeating-linear-gradient(
|
|
0deg,
|
|
rgba(0, 0, 0, 0.1),
|
|
rgba(0, 0, 0, 0.1) 1px,
|
|
transparent 1px,
|
|
transparent 2px
|
|
);
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Refresh timer container */
|
|
#refreshUptime {
|
|
text-align: center;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
#refreshContainer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Enhance metric value styling with consistent glow */
|
|
.metric-value {
|
|
color: var(--text-color);
|
|
font-weight: bold;
|
|
text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
|
|
}
|
|
|
|
/* Standardized glow effects for all metrics */
|
|
/* Yellow color family (BTC price, sats metrics, time to payout) */
|
|
#btc_price,
|
|
#daily_mined_sats,
|
|
#monthly_mined_sats,
|
|
#estimated_earnings_per_day_sats,
|
|
#estimated_earnings_next_block_sats,
|
|
#estimated_rewards_in_window_sats,
|
|
#est_time_to_payout {
|
|
color: #ffd700;
|
|
text-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
|
|
}
|
|
|
|
/* Green color family (profits, earnings) */
|
|
#unpaid_earnings,
|
|
#daily_revenue,
|
|
#daily_profit_usd,
|
|
#monthly_profit_usd {
|
|
color: #32CD32;
|
|
text-shadow: 0 0 6px rgba(50, 205, 50, 0.6);
|
|
}
|
|
|
|
/* Red color family (costs) */
|
|
#daily_power_cost {
|
|
color: #ff5555 !important;
|
|
text-shadow: 0 0 6px rgba(255, 85, 85, 0.6);
|
|
}
|
|
|
|
/* White metrics (general stats) */
|
|
.metric-value.white,
|
|
#block_number,
|
|
#network_hashrate,
|
|
#difficulty,
|
|
#workers_hashing,
|
|
#last_share,
|
|
#blocks_found,
|
|
#last_block_height {
|
|
color: #ffffff;
|
|
text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
|
|
}
|
|
|
|
/* Blue metrics (time data) */
|
|
#last_block_time {
|
|
color: #00dfff;
|
|
text-shadow: 0 0 6px rgba(0, 223, 255, 0.6);
|
|
}
|
|
|
|
/* Special stronger glow only for online/offline indicators */
|
|
.status-green {
|
|
color: #39ff14 !important;
|
|
text-shadow: 0 0 10px #39ff14, 0 0 20px #39ff14;
|
|
}
|
|
|
|
.status-red {
|
|
color: #ff2d2d !important;
|
|
text-shadow: 0 0 10px #ff2d2d, 0 0 20px #ff2d2d;
|
|
}
|
|
|
|
.card-body strong {
|
|
color: var(--primary-color);
|
|
margin-right: 0.25rem;
|
|
text-shadow: 0 0 2px var(--primary-color);
|
|
}
|
|
|
|
.card-body p {
|
|
margin: 0.25rem 0;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
a.btn-primary {
|
|
background-color: var(--primary-color);
|
|
border-color: var(--primary-color);
|
|
color: #000;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.row.equal-height {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.row.equal-height > [class*="col-"] {
|
|
display: flex;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.row.equal-height > [class*="col-"] .card {
|
|
width: 100%;
|
|
}
|
|
|
|
.container-fluid {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding-left: 1rem;
|
|
padding-right: 1rem;
|
|
position: relative;
|
|
}
|
|
|
|
#topRightLink {
|
|
position: absolute;
|
|
top: 10px;
|
|
right: 10px;
|
|
color: grey;
|
|
text-decoration: none;
|
|
font-size: 0.9rem;
|
|
text-shadow: 0 0 5px grey;
|
|
}
|
|
|
|
#uptimeTimer strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
#uptimeTimer {
|
|
margin-top: 0;
|
|
}
|
|
|
|
/* Connection status indicator */
|
|
#connectionStatus {
|
|
display: none;
|
|
position: fixed;
|
|
top: 10px;
|
|
right: 10px;
|
|
background: rgba(255,0,0,0.7);
|
|
color: white;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
z-index: 9999;
|
|
font-size: 0.9rem;
|
|
text-shadow: 0 0 5px rgba(255, 0, 0, 0.8);
|
|
box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
|
|
}
|
|
|
|
/* Bitcoin Progress Bar Styles */
|
|
.bitcoin-progress-container {
|
|
width: 100%;
|
|
max-width: 300px;
|
|
height: 20px;
|
|
background-color: #111;
|
|
border: 1px solid var(--primary-color);
|
|
border-radius: 0;
|
|
margin: 0.5rem auto;
|
|
position: relative;
|
|
overflow: hidden;
|
|
box-shadow: 0 0 8px rgba(247, 147, 26, 0.5);
|
|
align-self: center;
|
|
}
|
|
|
|
.bitcoin-progress-inner {
|
|
height: 100%;
|
|
width: 0;
|
|
background: linear-gradient(90deg, #f7931a, #ffa500);
|
|
border-radius: 0;
|
|
transition: width 0.3s ease;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.bitcoin-progress-inner::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(90deg,
|
|
rgba(255, 255, 255, 0.1) 0%,
|
|
rgba(255, 255, 255, 0.2) 20%,
|
|
rgba(255, 255, 255, 0.1) 40%);
|
|
animation: shimmer 2s infinite;
|
|
}
|
|
|
|
@keyframes shimmer {
|
|
0% { transform: translateX(-100%); }
|
|
100% { transform: translateX(100%); }
|
|
}
|
|
|
|
.bitcoin-icons {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 0;
|
|
width: 100%;
|
|
transform: translateY(-50%);
|
|
display: flex;
|
|
justify-content: space-around;
|
|
font-size: 12px;
|
|
color: rgba(0, 0, 0, 0.7);
|
|
}
|
|
|
|
.glow-effect {
|
|
box-shadow: 0 0 15px #f7931a, 0 0 25px #f7931a;
|
|
animation: pulse 1s infinite;
|
|
}
|
|
|
|
/* Extra styling for when server update is late */
|
|
.waiting-for-update {
|
|
animation: waitingPulse 2s infinite !important;
|
|
}
|
|
|
|
@keyframes waitingPulse {
|
|
0%, 100% { box-shadow: 0 0 10px #f7931a, 0 0 15px #f7931a; opacity: 0.8; }
|
|
50% { box-shadow: 0 0 20px #f7931a, 0 0 35px #f7931a; opacity: 1; }
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.8; }
|
|
}
|
|
|
|
#progress-text {
|
|
font-size: 1rem;
|
|
color: var(--primary-color);
|
|
margin-top: 0.3rem;
|
|
text-shadow: 0 0 5px var(--primary-color);
|
|
text-align: center;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Last Updated text with subtle animation */
|
|
#lastUpdated {
|
|
animation: flicker 5s infinite;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Define color classes with consistent glow for all elements */
|
|
.green {
|
|
color: #39ff14 !important;
|
|
text-shadow: 0 0 6px #39ff14, 0 0 12px #39ff14;
|
|
}
|
|
|
|
.blue {
|
|
color: #00dfff !important;
|
|
text-shadow: 0 0 6px #00dfff, 0 0 12px #00dfff;
|
|
}
|
|
|
|
.yellow {
|
|
color: #ffd700 !important;
|
|
text-shadow: 0 0 6px #ffd700, 0 0 12px #ffd700;
|
|
}
|
|
|
|
.white {
|
|
color: #ffffff !important;
|
|
text-shadow: 0 0 6px #ffffff, 0 0 12px #ffffff;
|
|
}
|
|
|
|
.red {
|
|
color: #ff2d2d !important;
|
|
text-shadow: 0 0 6px #ff2d2d, 0 0 12px #ff2d2d;
|
|
}
|
|
|
|
.magenta {
|
|
color: #ff2d95 !important;
|
|
text-shadow: 0 0 6px #ff2d95, 0 0 12px #ff2d95;
|
|
}
|
|
|
|
/* Special stronger glow classes for miner status */
|
|
.status-green {
|
|
color: #39ff14 !important;
|
|
text-shadow: 0 0 10px #39ff14, 0 0 20px #39ff14;
|
|
}
|
|
|
|
.status-red {
|
|
color: #ff2d2d !important;
|
|
text-shadow: 0 0 10px #ff2d2d, 0 0 20px #ff2d2d;
|
|
}
|
|
|
|
/* Cursor blink for terminal feel */
|
|
#terminal-cursor {
|
|
display: inline-block;
|
|
width: 10px;
|
|
height: 16px;
|
|
background-color: #f7931a;
|
|
margin-left: 2px;
|
|
animation: blink 1s step-end infinite;
|
|
vertical-align: middle;
|
|
box-shadow: 0 0 5px rgba(247, 147, 26, 0.8);
|
|
}
|
|
|
|
@keyframes blink {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0; }
|
|
}
|
|
|
|
/* Mobile responsiveness improvements */
|
|
@media (max-width: 576px) {
|
|
.container-fluid {
|
|
padding-left: 0.5rem;
|
|
padding-right: 0.5rem;
|
|
}
|
|
|
|
.card-body {
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
#graphContainer {
|
|
height: 200px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 22px;
|
|
}
|
|
|
|
.card-header {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
#topRightLink {
|
|
position: static;
|
|
display: block;
|
|
text-align: right;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
}
|
|
|
|
/* Navigation links */
|
|
.navigation-links {
|
|
display: flex;
|
|
justify-content: center;
|
|
margin-top: 10px;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.nav-link {
|
|
padding: 5px 15px;
|
|
margin: 0 10px;
|
|
background-color: var(--bg-color);
|
|
border: 1px solid var(--primary-color);
|
|
color: var(--primary-color);
|
|
text-decoration: none;
|
|
font-family: var(--terminal-font);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.nav-link:hover {
|
|
background-color: var(--primary-color);
|
|
color: var(--bg-color);
|
|
box-shadow: 0 0 10px rgba(247, 147, 26, 0.5);
|
|
}
|
|
|
|
.nav-link.active {
|
|
background-color: var(--primary-color);
|
|
color: var(--bg-color);
|
|
box-shadow: 0 0 10px rgba(247, 147, 26, 0.5);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container-fluid">
|
|
<!-- Connection status indicator -->
|
|
<div id="connectionStatus"></div>
|
|
|
|
<!-- Top right link -->
|
|
<a href="https://x.com/DJObleezy" id="topRightLink" target="_blank" rel="noopener noreferrer">Made by @DJO₿leezy</a>
|
|
|
|
<h1 class="text-center"><a href="/" style="text-decoration:none; color:inherit;">Ocean.xyz Pool Mining Dashboard v 0.2</a></h1>
|
|
<p class="text-center" id="lastUpdated"><strong>Last Updated:</strong> {{ current_time }}<span id="terminal-cursor"></span></p>
|
|
|
|
<div class="navigation-links">
|
|
<a href="/dashboard" class="nav-link active">Main Dashboard</a>
|
|
<a href="/workers" class="nav-link">Workers Overview</a>
|
|
</div>
|
|
|
|
<!-- Graph Container -->
|
|
<div id="graphContainer" class="mb-2">
|
|
<canvas id="trendGraph" style="width: 100%; height: 100%; position: relative; z-index: 2;"></canvas>
|
|
</div>
|
|
|
|
<!-- Miner Status -->
|
|
<div class="row mb-2 equal-height">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">Miner Status</div>
|
|
<div class="card-body">
|
|
<p>
|
|
<strong>Status:</strong>
|
|
<span id="miner_status" class="metric-value">
|
|
{% if metrics and metrics.workers_hashing and metrics.workers_hashing > 0 %}
|
|
<span class="status-green">ONLINE</span> <span class="online-dot"></span>
|
|
{% else %}
|
|
<span class="status-red">OFFLINE</span> <span class="offline-dot"></span>
|
|
{% endif %}
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<strong>Workers Hashing:</strong>
|
|
<span id="workers_hashing" class="metric-value">{{ metrics.workers_hashing or 0 }}</span>
|
|
<span id="indicator_workers_hashing"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Last Share:</strong>
|
|
<span id="last_share" class="metric-value">{{ metrics.total_last_share or "N/A" }}</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Pool Hashrates and Bitcoin Network Stats -->
|
|
<div class="row equal-height">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">Pool Hashrates</div>
|
|
<div class="card-body">
|
|
<p>
|
|
<strong>Pool Total Hashrate:</strong>
|
|
<span id="pool_total_hashrate" class="metric-value white">
|
|
{% if metrics and metrics.pool_total_hashrate and metrics.pool_total_hashrate_unit %}
|
|
{{ metrics.pool_total_hashrate }} {{ metrics.pool_total_hashrate_unit[:-2]|upper ~ metrics.pool_total_hashrate_unit[-2:] }}
|
|
{% else %}
|
|
N/A
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_pool_total_hashrate"></span>
|
|
</p>
|
|
<hr>
|
|
<p>
|
|
<strong>24hr Avg Hashrate:</strong>
|
|
<span id="hashrate_24hr" class="metric-value white">
|
|
{% if metrics and metrics.hashrate_24hr %}
|
|
{{ metrics.hashrate_24hr }}
|
|
{% if metrics.hashrate_24hr_unit %}
|
|
{{ metrics.hashrate_24hr_unit[:-2]|upper ~ metrics.hashrate_24hr_unit[-2:] }}
|
|
{% else %}
|
|
TH/s
|
|
{% endif %}
|
|
{% else %}
|
|
N/A
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_hashrate_24hr"></span>
|
|
</p>
|
|
<p>
|
|
<strong>3hr Avg Hashrate:</strong>
|
|
<span id="hashrate_3hr" class="metric-value white">
|
|
{% if metrics and metrics.hashrate_3hr %}
|
|
{{ metrics.hashrate_3hr }}
|
|
{% if metrics.hashrate_3hr_unit %}
|
|
{{ metrics.hashrate_3hr_unit[:-2]|upper ~ metrics.hashrate_3hr_unit[-2:] }}
|
|
{% else %}
|
|
TH/s
|
|
{% endif %}
|
|
{% else %}
|
|
N/A
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_hashrate_3hr"></span>
|
|
</p>
|
|
<p>
|
|
<strong>10min Avg Hashrate:</strong>
|
|
<span id="hashrate_10min" class="metric-value white">
|
|
{% if metrics and metrics.hashrate_10min %}
|
|
{{ metrics.hashrate_10min }}
|
|
{% if metrics.hashrate_10min_unit %}
|
|
{{ metrics.hashrate_10min_unit[:-2]|upper ~ metrics.hashrate_10min_unit[-2:] }}
|
|
{% else %}
|
|
TH/s
|
|
{% endif %}
|
|
{% else %}
|
|
N/A
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_hashrate_10min"></span>
|
|
</p>
|
|
<p>
|
|
<strong>60sec Avg Hashrate:</strong>
|
|
<span id="hashrate_60sec" class="metric-value white">
|
|
{% if metrics and metrics.hashrate_60sec %}
|
|
{{ metrics.hashrate_60sec }}
|
|
{% if metrics.hashrate_60sec_unit %}
|
|
{{ metrics.hashrate_60sec_unit[:-2]|upper ~ metrics.hashrate_60sec_unit[-2:] }}
|
|
{% else %}
|
|
TH/s
|
|
{% endif %}
|
|
{% else %}
|
|
N/A
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_hashrate_60sec"></span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">Bitcoin Network Stats</div>
|
|
<div class="card-body">
|
|
<p>
|
|
<strong>Block Number:</strong>
|
|
<span id="block_number" class="metric-value white">
|
|
{% if metrics and metrics.block_number %}
|
|
{{ metrics.block_number|commafy }}
|
|
{% else %}
|
|
N/A
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_block_number"></span>
|
|
</p>
|
|
<p>
|
|
<strong>BTC Price:</strong>
|
|
<span id="btc_price" class="metric-value yellow">
|
|
{% if metrics and metrics.btc_price %}
|
|
${{ "%.2f"|format(metrics.btc_price) }}
|
|
{% else %}
|
|
$0.00
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_btc_price"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Network Hashrate:</strong>
|
|
<span id="network_hashrate" class="metric-value white">
|
|
{% if metrics and metrics.network_hashrate %}
|
|
{{ metrics.network_hashrate|round|commafy }} EH/s
|
|
{% else %}
|
|
N/A
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_network_hashrate"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Difficulty:</strong>
|
|
<span id="difficulty" class="metric-value white">
|
|
{% if metrics and metrics.difficulty %}
|
|
{{ metrics.difficulty|round|commafy }}
|
|
{% else %}
|
|
N/A
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_difficulty"></span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Satoshi and USD Metrics -->
|
|
<div class="row equal-height">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">Satoshi Metrics</div>
|
|
<div class="card-body">
|
|
<p>
|
|
<strong>Daily Mined (Net):</strong>
|
|
<span id="daily_mined_sats" class="metric-value yellow">
|
|
{% if metrics and metrics.daily_mined_sats %}
|
|
{{ metrics.daily_mined_sats|commafy }} sats
|
|
{% else %}
|
|
0 sats
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_daily_mined_sats"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Monthly Mined (Net):</strong>
|
|
<span id="monthly_mined_sats" class="metric-value yellow">
|
|
{% if metrics and metrics.monthly_mined_sats %}
|
|
{{ metrics.monthly_mined_sats|commafy }} sats
|
|
{% else %}
|
|
0 sats
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_monthly_mined_sats"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Est. Earnings/Day:</strong>
|
|
<span id="estimated_earnings_per_day_sats" class="metric-value yellow">
|
|
{% if metrics and metrics.estimated_earnings_per_day_sats %}
|
|
{{ metrics.estimated_earnings_per_day_sats|commafy }} sats
|
|
{% else %}
|
|
0 sats
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_estimated_earnings_per_day_sats"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Est. Earnings/Block:</strong>
|
|
<span id="estimated_earnings_next_block_sats" class="metric-value yellow">
|
|
{% if metrics and metrics.estimated_earnings_next_block_sats %}
|
|
{{ metrics.estimated_earnings_next_block_sats|commafy }} sats
|
|
{% else %}
|
|
0 sats
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_estimated_earnings_next_block_sats"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Est. Rewards in Window:</strong>
|
|
<span id="estimated_rewards_in_window_sats" class="metric-value yellow">
|
|
{% if metrics and metrics.estimated_rewards_in_window_sats %}
|
|
{{ metrics.estimated_rewards_in_window_sats|commafy }} sats
|
|
{% else %}
|
|
0 sats
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_estimated_rewards_in_window_sats"></span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">USD Metrics</div>
|
|
<div class="card-body">
|
|
<p>
|
|
<strong>Daily Revenue:</strong>
|
|
<span id="daily_revenue" class="metric-value green">
|
|
{% if metrics and metrics.daily_revenue is defined and metrics.daily_revenue is not none %}
|
|
${{ "%.2f"|format(metrics.daily_revenue) }}
|
|
{% else %}
|
|
$0.00
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_daily_revenue"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Daily Power Cost:</strong>
|
|
<span id="daily_power_cost" class="metric-value red">
|
|
{% if metrics and metrics.daily_power_cost is defined and metrics.daily_power_cost is not none %}
|
|
${{ "%.2f"|format(metrics.daily_power_cost) }}
|
|
{% else %}
|
|
$0.00
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_daily_power_cost"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Daily Profit (USD):</strong>
|
|
<span id="daily_profit_usd" class="metric-value green">
|
|
{% if metrics and metrics.daily_profit_usd is defined and metrics.daily_profit_usd is not none %}
|
|
${{ "%.2f"|format(metrics.daily_profit_usd) }}
|
|
{% else %}
|
|
$0.00
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_daily_profit_usd"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Monthly Profit (USD):</strong>
|
|
<span id="monthly_profit_usd" class="metric-value green">
|
|
{% if metrics and metrics.monthly_profit_usd is defined and metrics.monthly_profit_usd is not none %}
|
|
${{ "%.2f"|format(metrics.monthly_profit_usd) }}
|
|
{% else %}
|
|
$0.00
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_monthly_profit_usd"></span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Payout & Misc -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card" id="payoutMiscCard">
|
|
<div class="card-header">Payout & Misc</div>
|
|
<div class="card-body">
|
|
<p>
|
|
<strong>Unpaid Earnings:</strong>
|
|
<span id="unpaid_earnings" class="metric-value green">
|
|
{% if metrics and metrics.unpaid_earnings %}
|
|
{{ metrics.unpaid_earnings }} BTC
|
|
{% else %}
|
|
0 BTC
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_unpaid_earnings"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Last Block:</strong>
|
|
<span id="last_block_height" class="metric-value white">
|
|
{{ metrics.last_block_height if metrics and metrics.last_block_height else "N/A" }}
|
|
</span>
|
|
—
|
|
<span id="last_block_time" class="metric-value blue">
|
|
{{ metrics.last_block_time if metrics and metrics.last_block_time else "N/A" }}
|
|
</span>
|
|
—
|
|
<span class="green">
|
|
{% if metrics and metrics.last_block_earnings %}
|
|
+{{ metrics.last_block_earnings|int|commafy }} sats
|
|
{% else %}
|
|
+0 sats
|
|
{% endif %}
|
|
</span>
|
|
<span id="indicator_last_block"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Est. Time to Payout:</strong>
|
|
<span id="est_time_to_payout" class="metric-value yellow">
|
|
{{ metrics.est_time_to_payout if metrics and metrics.est_time_to_payout else "N/A" }}
|
|
</span>
|
|
<span id="indicator_est_time_to_payout"></span>
|
|
</p>
|
|
<p>
|
|
<strong>Blocks Found:</strong>
|
|
<span id="blocks_found" class="metric-value white">
|
|
{{ metrics.blocks_found if metrics and metrics.blocks_found else "0" }}
|
|
</span>
|
|
<span id="indicator_blocks_found"></span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bitcoin-themed Progress Bar and Uptime -->
|
|
<div id="refreshUptime" class="text-center">
|
|
<div id="refreshContainer">
|
|
<!-- Bitcoin-themed progress bar -->
|
|
<div class="bitcoin-progress-container">
|
|
<div id="bitcoin-progress-inner" class="bitcoin-progress-inner">
|
|
<!-- Small Bitcoin icons inside the bar -->
|
|
<div class="bitcoin-icons">
|
|
<i class="fab fa-bitcoin"></i>
|
|
<i class="fab fa-bitcoin"></i>
|
|
<i class="fab fa-bitcoin"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- <div id="progress-text">60s to next update</div> -->
|
|
</div>
|
|
<div id="uptimeTimer"><strong>Uptime:</strong> 0h 0m 0s</div>
|
|
</div>
|
|
|
|
<!-- Hidden Congrats Message -->
|
|
<div id="congratsMessage" style="display:none; position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; background: #f7931a; color: #000; padding: 10px; border-radius: 5px; box-shadow: 0 0 15px rgba(247, 147, 26, 0.7);"></div>
|
|
|
|
</div>
|
|
|
|
<!-- External JavaScript libraries -->
|
|
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-annotation@1.1.0"></script>
|
|
<!-- External JavaScript file with our application logic -->
|
|
<script src="/static/js/main.js"></script>
|
|
|
|
<script>
|
|
// Additional script for retro terminal effects
|
|
$(document).ready(function() {
|
|
// Update color classes when data refreshes
|
|
$(document).on('dataRefreshed', function() {
|
|
// Add enhanced glow effects only for online/offline status elements
|
|
$(".online-dot").parent().addClass("status-green");
|
|
$(".offline-dot").parent().addClass("status-red");
|
|
|
|
// Keep cursor blinking
|
|
if ($("#terminal-cursor").length === 0) {
|
|
$("#lastUpdated").append('<span id="terminal-cursor"></span>');
|
|
}
|
|
});
|
|
|
|
// Modify chart options for retro look
|
|
if (window.trendChart) {
|
|
// Try to update chart styling once it's initialized
|
|
const checkChart = setInterval(function() {
|
|
if (window.trendChart) {
|
|
try {
|
|
// Make line thicker and more visible
|
|
window.trendChart.data.datasets[0].borderWidth = 2;
|
|
window.trendChart.data.datasets[0].borderColor = '#39ff14';
|
|
window.trendChart.data.datasets[0].backgroundColor = 'rgba(57, 255, 20, 0.1)';
|
|
|
|
// Update average line to be more visible
|
|
if (window.trendChart.options.plugins &&
|
|
window.trendChart.options.plugins.annotation &&
|
|
window.trendChart.options.plugins.annotation.annotations) {
|
|
const avgLine = window.trendChart.options.plugins.annotation.annotations.averageLine;
|
|
if (avgLine) {
|
|
avgLine.borderColor = '#f7931a';
|
|
avgLine.borderWidth = 2;
|
|
avgLine.label.backgroundColor = 'rgba(0,0,0,0.7)';
|
|
avgLine.label.color = '#f7931a';
|
|
}
|
|
}
|
|
|
|
window.trendChart.update('none');
|
|
clearInterval(checkChart);
|
|
} catch (e) {
|
|
console.log("Chart not fully initialized yet");
|
|
}
|
|
}
|
|
}, 500);
|
|
}
|
|
});
|
|
</script>
|
|
<!-- Retro Floating Refresh Bar -->
|
|
<script src="/static/js/retro-refresh.js"></script>
|
|
</body>
|
|
</html>
|