v0.1.19 - Lots of remote hosting fixes

This commit is contained in:
Your Name
2025-12-13 14:53:25 -04:00
parent a5f92e4da3
commit a5880ebdf6
21 changed files with 16122 additions and 6358 deletions

View File

@@ -4143,12 +4143,32 @@ function populateStatsOverview(data) {
if (!data) return;
// Update individual cells with flash animation for changed values
// Backend sends: total_bytes, total_blobs, first_upload, last_upload
// Backend sends: total_bytes, total_blobs, first_upload, last_upload, version, process_id, memory_mb, cpu_core, fs_blob_count, fs_blob_size_mb
updateStatsCell('db-size', data.total_bytes ? formatFileSize(data.total_bytes) : '-');
updateStatsCell('total-size', data.total_bytes ? formatFileSize(data.total_bytes) : '-');
updateStatsCell('total-events', data.total_blobs || '-');
updateStatsCell('oldest-event', data.first_upload ? formatTimestamp(data.first_upload) : '-');
updateStatsCell('newest-event', data.last_upload ? formatTimestamp(data.last_upload) : '-');
// System metrics from system table
if (data.version) {
updateStatsCell('version', data.version);
}
if (data.process_id) {
updateStatsCell('process-id', data.process_id);
}
if (data.memory_mb) {
updateStatsCell('memory-usage', data.memory_mb + ' MB');
}
if (data.cpu_core) {
updateStatsCell('cpu-core', 'Core ' + data.cpu_core);
}
if (data.fs_blob_count !== undefined) {
updateStatsCell('fs-blob-count', data.fs_blob_count);
}
if (data.fs_blob_size_mb !== undefined) {
updateStatsCell('fs-blob-size', data.fs_blob_size_mb + ' MB');
}
}
// Populate event kinds distribution table
@@ -4526,6 +4546,14 @@ function updateStatsCell(cellId, newValue) {
// Start polling for statistics (every 10 seconds)
function startStatsPolling() {
console.log('=== STARTING STATISTICS POLLING ===');
// Initialize the event rate chart if not already initialized
if (!eventRateChart) {
console.log('Initializing event rate chart from startStatsPolling...');
setTimeout(() => {
initializeEventRateChart();
}, 1000); // Delay to ensure text_graph.js is loaded
}
console.log('Current page:', currentPage);
console.log('Is logged in:', isLoggedIn);
console.log('User pubkey:', userPubkey);