// Analytics Implementation Verification Script console.log('=== Analytics Implementation Verification ==='); // Check if the main HTML file contains the analytics button function checkAnalyticsButton() { console.log('\n1. Checking Analytics Button Implementation:'); try { const fs = require('fs'); const htmlContent = fs.readFileSync('index.html', 'utf8'); const hasAnalyticsBtn = htmlContent.includes('id="analyticsBtn"'); const hasCorrectClasses = htmlContent.includes('btn btn-info') && htmlContent.includes('analyticsBtn'); const hasAriaLabel = htmlContent.includes('aria-label="View detailed analytics dashboard"'); console.log(` ✓ Analytics button in HTML: ${hasAnalyticsBtn ? 'FOUND' : 'MISSING'}`); console.log(` ✓ Correct button classes: ${hasCorrectClasses ? 'FOUND' : 'MISSING'}`); console.log(` ✓ Accessibility label: ${hasAriaLabel ? 'FOUND' : 'MISSING'}`); return hasAnalyticsBtn && hasCorrectClasses && hasAriaLabel; } catch (error) { console.log(` ✗ Error checking HTML: ${error.message}`); return false; } } // Check if the analytics modal is properly implemented function checkAnalyticsModal() { console.log('\n2. Checking Analytics Modal Implementation:'); try { const fs = require('fs'); const htmlContent = fs.readFileSync('index.html', 'utf8'); const hasAnalyticsModal = htmlContent.includes('id="analyticsModal"'); const hasModalContent = htmlContent.includes('analytics-modal-content'); const hasTabs = htmlContent.includes('analytics-tabs'); const hasTabContents = htmlContent.includes('analytics-tab-content'); // Check for all 4 tabs const hasOverviewTab = htmlContent.includes('data-tab="overview"'); const hasTrendsTab = htmlContent.includes('data-tab="trends"'); const hasHealthTab = htmlContent.includes('data-tab="health"'); const hasUsageTab = htmlContent.includes('data-tab="usage"'); // Check for key elements const hasSummaryCards = htmlContent.includes('summary-cards'); const hasChartContainers = htmlContent.includes('chart-container'); const hasCanvasElements = htmlContent.includes('