Skip to content

Commit 4e8ea09

Browse files
author
Paul C
committed
Add settings page to change monitoring credentials
- New /settings page with credential change form - Updates saved to wolfproxy.toml file - Requires current password verification - Forces re-login after password change
1 parent 2b39ac7 commit 4e8ea09

4 files changed

Lines changed: 394 additions & 5 deletions

File tree

.codewolf/conversation_codewolf.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,28 @@
429429
"role": "system",
430430
"content": "\n╔═══════════════════════════════════════╗\n║ 🐺 CODEWOLF DIAGNOSTICS ║\n╚═══════════════════════════════════════╝\n\n📁 WORKSPACE\n 1. wolfproxy (/home/paulc/NetBeansProjects/wolfproxy)\n\n💾 DATABASE CONFIG\n Host: 127.0.0.1\n Database: firestorm\n Username: lone\n Project: codewolf\n\n🔄 TRANSLATION/REWRITING MODE\n From: c\n To: web application with php, html and javascript\n Source dir: /home/paulc/NetBeansProjects/firestorm/viewercode/\n Dest dir: /home/paulc/NetBeansProjects/firestorm/wolfstorm/\n ⚠️ Will examine source files first\n Context: This is a rewrite of the Firestorm OpenSim/Second Life viewer from c# to a beaut...\n\n🤖 AI MODELS CONFIG\n AI-1: local/gemini-2.5-flash\n AI-2: local/gemini-2.5-flash\n\n🔍 CONNECTIVITY TESTS\n ⚠️ AI-1: Error: Ollama/Local AI request failed: Ollama request failed: Not Found\n\nPossible causes:\n• Ollama server not running (start with: ollama serve)\n• Incorrect host URL in settings\n• Model not pulled (run: ollama pull <model>)\n• Network connectivity issues\n• Port conflict or firewall blocking\n\nCheck settings: AI-1/AI-2 Provider and Local AI Host\n ⚠️ AI-2: Error: Ollama/Local AI request failed: Ollama request failed: Not Found\n\nPossible causes:\n• Ollama server not running (start with: ollama serve)\n• Incorrect host URL in settings\n• Model not pulled (run: ollama pull <model>)\n• Network connectivity issues\n• Port conflict or firewall blocking\n\nCheck settings: AI-1/AI-2 Provider and Local AI Host\n\n💾 DATABASE STRUCTURE & CONTENTS\n ✅ Connection: Successful\n 📋 Database Tables (All Projects):\n • code_entities: 17186 total records\n • code_relationships: 9085 total records\n • indexed_files: 1739 files\n\n 📂 SOURCE PROJECT: \"codewolf\"\n • Entities indexed: 10038\n • Relationships: 9085\n • Files indexed: 1739\n\n 📑 Source Entity Types:\n • class: 6788\n • function: 3250\n\n 🔤 Source Languages:\n • c: 8190 entities\n • cpp: 1441 entities\n • python: 338 entities\n • r: 64 entities\n • shell: 5 entities\n\n ✅ Source code indexed with 10038 entities!\n\n 🎯 DESTINATION PROJECT: \"codewolf-dest\"\n • Entities indexed: 119\n • Relationships: 0\n • Files indexed: 98\n\n 📑 Destination Entity Types:\n • class: 103\n • function: 16\n\n 🔤 Destination Languages:\n • javascript: 104 entities\n • php: 8 entities\n • python: 7 entities\n\n ✅ Destination code indexed with 119 entities!\n\n⚠️ Some systems need attention\n\nTroubleshooting:\n• Check API keys: Ctrl+, → Search \"AI Code Assistant\"\n• Verify database: sudo systemctl status mariadb\n• Run indexer: python3 code_indexer.py\n• Check logs: View > Output > CodeWolf\n• Restart diagnostics: Ctrl+Shift+P → \"Run System Diagnostics\"\n\n",
431431
"timestamp": "2026-01-18T17:57:04.032Z"
432+
},
433+
{
434+
"role": "system",
435+
"content": "🔍 Testing AI-1 (Architect)...",
436+
"timestamp": "2026-01-18T18:11:25.615Z"
437+
},
438+
{
439+
"role": "system",
440+
"content": "🔍 Testing AI-2 (Implementer)...",
441+
"timestamp": "2026-01-18T18:11:25.670Z"
442+
},
443+
{
444+
"role": "system",
445+
"content": "🔍 Testing database connection and scanning indexed code...",
446+
"timestamp": "2026-01-18T18:11:25.704Z"
447+
},
448+
{
449+
"role": "system",
450+
"content": "\n╔═══════════════════════════════════════╗\n║ 🐺 CODEWOLF DIAGNOSTICS ║\n╚═══════════════════════════════════════╝\n\n📁 WORKSPACE\n 1. wolfproxy (/home/paulc/NetBeansProjects/wolfproxy)\n\n💾 DATABASE CONFIG\n Host: 127.0.0.1\n Database: firestorm\n Username: lone\n Project: codewolf\n\n🔄 TRANSLATION/REWRITING MODE\n From: c\n To: web application with php, html and javascript\n Source dir: /home/paulc/NetBeansProjects/firestorm/viewercode/\n Dest dir: /home/paulc/NetBeansProjects/firestorm/wolfstorm/\n ⚠️ Will examine source files first\n Context: This is a rewrite of the Firestorm OpenSim/Second Life viewer from c# to a beaut...\n\n🤖 AI MODELS CONFIG\n AI-1: local/gemini-2.5-flash\n AI-2: local/gemini-2.5-flash\n\n🔍 CONNECTIVITY TESTS\n ⚠️ AI-1: Error: Ollama/Local AI request failed: Ollama request failed: Not Found\n\nPossible causes:\n• Ollama server not running (start with: ollama serve)\n• Incorrect host URL in settings\n• Model not pulled (run: ollama pull <model>)\n• Network connectivity issues\n• Port conflict or firewall blocking\n\nCheck settings: AI-1/AI-2 Provider and Local AI Host\n ⚠️ AI-2: Error: Ollama/Local AI request failed: Ollama request failed: Not Found\n\nPossible causes:\n• Ollama server not running (start with: ollama serve)\n• Incorrect host URL in settings\n• Model not pulled (run: ollama pull <model>)\n• Network connectivity issues\n• Port conflict or firewall blocking\n\nCheck settings: AI-1/AI-2 Provider and Local AI Host\n\n💾 DATABASE STRUCTURE & CONTENTS\n ✅ Connection: Successful\n 📋 Database Tables (All Projects):\n • code_entities: 17186 total records\n • code_relationships: 9085 total records\n • indexed_files: 1739 files\n\n 📂 SOURCE PROJECT: \"codewolf\"\n • Entities indexed: 10038\n • Relationships: 9085\n • Files indexed: 1739\n\n 📑 Source Entity Types:\n • class: 6788\n • function: 3250\n\n 🔤 Source Languages:\n • c: 8190 entities\n • cpp: 1441 entities\n • python: 338 entities\n • r: 64 entities\n • shell: 5 entities\n\n ✅ Source code indexed with 10038 entities!\n\n 🎯 DESTINATION PROJECT: \"codewolf-dest\"\n • Entities indexed: 119\n • Relationships: 0\n • Files indexed: 98\n\n 📑 Destination Entity Types:\n • class: 103\n • function: 16\n\n 🔤 Destination Languages:\n • javascript: 104 entities\n • php: 8 entities\n • python: 7 entities\n\n ✅ Destination code indexed with 119 entities!\n\n⚠️ Some systems need attention\n\nTroubleshooting:\n• Check API keys: Ctrl+, → Search \"AI Code Assistant\"\n• Verify database: sudo systemctl status mariadb\n• Run indexer: python3 code_indexer.py\n• Check logs: View > Output > CodeWolf\n• Restart diagnostics: Ctrl+Shift+P → \"Run System Diagnostics\"\n\n",
451+
"timestamp": "2026-01-18T18:11:25.770Z"
432452
}
433453
],
434454
"context": null,
435-
"lastUpdated": "2026-01-18T17:57:04.044Z"
455+
"lastUpdated": "2026-01-18T18:11:25.771Z"
436456
}

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ http-body-util = "0.1"
3030
serde = { version = "1", features = ["derive"] }
3131
serde_json = "1"
3232
toml = "0.8"
33+
toml_edit = "0.22"
3334
base64 = "0.22"
3435

3536
# TLS/SSL

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,12 @@ password = "admin"
414414
let monitoring_host = host_ip.clone();
415415
let monitoring_upstreams = upstreams_arc.clone();
416416
let monitoring_stats = traffic_stats.clone();
417+
let config_path = "wolfproxy.toml".to_string();
417418
tasks.push(tokio::spawn(async move {
418419
monitoring::start_monitoring_server(
419420
&monitoring_host,
420421
monitoring_config,
422+
config_path,
421423
monitoring_upstreams,
422424
monitoring_stats,
423425
vhost_count,

0 commit comments

Comments
 (0)