Add eDNC-Fix API endpoints and displaypc.asp integration
API endpoints: - logDNCEvent: Log events from eDNC-Fix PowerShell script - getDNCStats: Get all eDNC installations and stats Database tables (sql/ednc_tables.sql): - ednc_logs: Event log entries - ednc_installations: Per-hostname tracking displaypc.asp: - Shows eDNC-Fix stats in Applications tab if installed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
41
sql/ednc_tables.sql
Normal file
41
sql/ednc_tables.sql
Normal file
@@ -0,0 +1,41 @@
|
||||
-- ============================================================================
|
||||
-- eDNC Special Character Fix - Database Tables
|
||||
-- Run on PRODUCTION database to enable eDNC logging
|
||||
-- Created: 2025-12-12
|
||||
-- ============================================================================
|
||||
|
||||
-- Log individual events (cleaned, failed, started, stopped, etc.)
|
||||
CREATE TABLE IF NOT EXISTS ednc_logs (
|
||||
logid INT AUTO_INCREMENT PRIMARY KEY,
|
||||
hostname VARCHAR(50) NOT NULL,
|
||||
filename VARCHAR(255) NOT NULL,
|
||||
action ENUM('cleaned', 'ok', 'failed', 'error', 'started', 'stopped') NOT NULL,
|
||||
bytes_removed INT DEFAULT 0,
|
||||
version VARCHAR(20),
|
||||
message VARCHAR(500),
|
||||
created DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
INDEX idx_hostname (hostname),
|
||||
INDEX idx_created (created),
|
||||
INDEX idx_action (action)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- Track installations per PC
|
||||
CREATE TABLE IF NOT EXISTS ednc_installations (
|
||||
installid INT AUTO_INCREMENT PRIMARY KEY,
|
||||
hostname VARCHAR(50) NOT NULL UNIQUE,
|
||||
version VARCHAR(20),
|
||||
watch_folder VARCHAR(255),
|
||||
file_filter VARCHAR(50),
|
||||
first_seen DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
last_seen DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
is_active TINYINT(1) DEFAULT 1,
|
||||
total_cleaned INT DEFAULT 0,
|
||||
total_failed INT DEFAULT 0,
|
||||
INDEX idx_hostname (hostname),
|
||||
INDEX idx_active (is_active)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- Verify tables created
|
||||
SELECT 'ednc_logs' AS table_name, COUNT(*) AS row_count FROM ednc_logs
|
||||
UNION ALL
|
||||
SELECT 'ednc_installations', COUNT(*) FROM ednc_installations;
|
||||
Reference in New Issue
Block a user