π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[logs-viewer] Display device info and RAM from log entries
ashilkne97a6fa420a0
diff --git a/infra/experiments/logs-viewer/index.html b/infra/experiments/logs-viewer/index.htmlindex c3867ccb03..b27152ee07 100644--- a/infra/experiments/logs-viewer/index.html+++ b/infra/experiments/logs-viewer/index.html@@ -72,6 +72,20 @@<!-- Main Content --><div class="main-content" id="main-content" style="display: none;">+ <!-- Device Info Section -->+ <div class="device-info-section" id="device-info-section" style="display: none;">+ <div class="device-info-item" style="display: none;">+ <span class="material-icons">smartphone</span>+ <span class="device-info-label">Device:</span>+ <span class="device-info-value" id="device-info-text"></span>+ </div>+ <div class="device-info-item" style="display: none;">+ <span class="material-icons">memory</span>+ <span class="device-info-label">RAM:</span>+ <span class="device-info-value" id="device-ram-text"></span>+ </div>+ </div>+<!-- Search Bar --><div class="search-section"><div class="search-bar mui-search-container">diff --git a/infra/experiments/logs-viewer/script.js b/infra/experiments/logs-viewer/script.jsindex bfcea60ee8..a38a00e093 100644--- a/infra/experiments/logs-viewer/script.js+++ b/infra/experiments/logs-viewer/script.js@@ -18,12 +18,16 @@ class LogViewer {this.currentOffset = 0;this.pageSize = 100;this.isLoading = false;-+// Context mode statethis.isContextMode = false;this.contextTargetLog = null;this.contextLogs = [];+ // Device information+ this.deviceInfo = null;+ this.deviceRAM = null;+this.initializeEventListeners();}@@ -160,11 +164,13 @@ class LogViewer {async processZipFile(file) {try {document.getElementById('loading').style.display = 'block';-+const zip = new JSZip();const contents = await zip.loadAsync(file);-+this.logs = [];+ this.deviceInfo = null;+ this.deviceRAM = null;let totalLogs = 0;// Process each file in the zip@@ -230,7 +236,14 @@ class LogViewer {this.finalizeLogEntry(currentLog, errorDetails);logs.push(currentLog);}-++ // Check for device info in the message+ if (logEntry.message.startsWith('Device Info:')) {+ this.deviceInfo = logEntry.message.substring('Device Info:'.length).trim();+ } else if (logEntry.message.startsWith('Device RAM:')) {+ this.deviceRAM = logEntry.message.substring('Device RAM:'.length).trim();+ }+currentLog = logEntry;currentLog.filename = filename;errorDetails = [];@@ -431,11 +444,44 @@ class LogViewer {showMainContent() {document.getElementById('upload-section').style.display = 'none';document.getElementById('main-content').style.display = 'block';-++ this.updateDeviceInfo();this.updateTimelineSection();this.updateStats();}+ updateDeviceInfo() {+ const deviceInfoSection = document.getElementById('device-info-section');+ if (!deviceInfoSection) return;++ const deviceInfoText = document.getElementById('device-info-text');+ const deviceRAMText = document.getElementById('device-ram-text');++ // Reset visibility for both items+ if (deviceInfoText) {+ deviceInfoText.parentElement.style.display = 'none';+ }+ if (deviceRAMText) {+ deviceRAMText.parentElement.style.display = 'none';+ }++ if (this.deviceInfo || this.deviceRAM) {+ if (this.deviceInfo && deviceInfoText) {+ deviceInfoText.textContent = this.deviceInfo;+ deviceInfoText.parentElement.style.display = 'flex';+ }++ if (this.deviceRAM && deviceRAMText) {+ deviceRAMText.textContent = this.deviceRAM;+ deviceRAMText.parentElement.style.display = 'flex';+ }++ deviceInfoSection.style.display = 'flex';+ } else {+ deviceInfoSection.style.display = 'none';+ }+ }+updateTimelineSection() {if (this.logs.length > 0) {const timelineSection = document.getElementById('timeline-section');diff --git a/infra/experiments/logs-viewer/styles.css b/infra/experiments/logs-viewer/styles.cssindex 00f3e48026..b717279855 100644--- a/infra/experiments/logs-viewer/styles.css+++ b/infra/experiments/logs-viewer/styles.css@@ -334,6 +334,42 @@ body {background: var(--ente-background-default);}+/* Device Info Section */+.device-info-section {+ display: flex;+ flex-wrap: wrap;+ gap: var(--ente-spacing-lg);+ padding: var(--ente-spacing-md) var(--ente-spacing-lg);+ margin-bottom: var(--ente-spacing-lg);+ background: var(--ente-fill-faint);+ border-radius: var(--ente-border-radius);+ border: 1px solid var(--ente-stroke-faint);+}++.device-info-item {+ display: flex;+ align-items: center;+ gap: var(--ente-spacing-sm);+ color: var(--ente-text-base);+ font-size: 14px;+}++.device-info-item .material-icons {+ font-size: 20px;+ color: var(--ente-color-accent-photos);+}++.device-info-label {+ font-weight: var(--ente-font-weight-medium);+ color: var(--ente-text-muted);+}++.device-info-value {+ font-weight: var(--ente-font-weight-regular);+ color: var(--ente-text-base);+ font-family: 'Roboto Mono', monospace;+}+/* Search Section */.search-section {margin-bottom: var(--ente-spacing-lg);