diff --git a/main.go b/main.go index bd6bd86..9783ade 100644 --- a/main.go +++ b/main.go @@ -359,25 +359,99 @@ var page = template.Must(template.New("index").Parse(` Windows Systeminfo @@ -429,28 +503,28 @@ var page = template.Must(template.New("index").Parse(` -
-
Installierte Programme
-
- - - -
-
- - - - - - - - - - -
NameVersionPublisherQuelle
-
-
+
+
Installierte Programme
+
+ + + +
+
+ + + + + + + + + + +
NameVersionPublisherQuelle
+
+
@@ -466,7 +540,7 @@ async function load(){ const j = await r.json(); document.getElementById('hostname').textContent = j.hostname || '-'; - document.getElementById('hostname2').textContent = j.hostname || '-'; + document.getElementById('hostname2').textContent = j.hostname || '-'; document.getElementById('username').textContent = j.username || '-'; document.getElementById('uptime').textContent = hms(j.uptime_seconds); document.getElementById('boottime').textContent = j.boot_time ? new Date(j.boot_time).toLocaleString() : '-'; @@ -492,14 +566,13 @@ async function load(){ (j.interfaces||[]).forEach(n=>{ const div = document.createElement('div'); div.innerHTML = '
'+n.name+'
'+(n.mac||'-')+'
'; - if (n.profile) { - const p = document.createElement('span'); - p.className = 'pill2'; - p.textContent = n.profile; - div.appendChild(p); - } + if (n.profile) { + const p = document.createElement('span'); + p.className = 'pill2'; + p.textContent = n.profile; + div.appendChild(p); + } (n.addresses||[]).forEach(ip=>{ const span=document.createElement('span'); span.className='pill mono'; span.textContent=ip; div.appendChild(span); }); - wrap.appendChild(div); }); @@ -523,10 +596,10 @@ function renderApps(list){ (list||[]).forEach(a=>{ const tr = document.createElement('tr'); tr.innerHTML = - ''+(a.name||'-')+''+ - ''+(a.version||'')+''+ - ''+(a.publisher||'')+''+ - ''+(a.source||'')+''; + ''+(a.name||'-')+''+ + ''+(a.version||'')+''+ + ''+(a.publisher||'')+''+ + ''+(a.source||'')+''; tbody.appendChild(tr); }); const c = document.getElementById('appsCount'); @@ -534,7 +607,7 @@ function renderApps(list){ } async function loadAppsOnce(){ - if(appsCache) return; // schon geladen + if(appsCache) return; try{ const r = await fetch('/api/apps'); appsCache = await r.json(); @@ -562,10 +635,10 @@ document.addEventListener('DOMContentLoaded', ()=>{ }); } }); - -`)) + +`)) func indexHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/html; charset=utf-8") @@ -595,7 +668,7 @@ func runHTTP(ctx context.Context) error { mux.HandleFunc("/api/apps", appsHandler) mux.HandleFunc("/api/summary", apiHandler) - addr := ":24000" + addr := "127.0.0.1:24000" srv := &http.Server{ Addr: addr, diff --git a/pcinfo.exe b/pcinfo.exe index cc2b40d..8d68942 100644 Binary files a/pcinfo.exe and b/pcinfo.exe differ