Dataforth (projects/dataforth-dos/): - UI feature: row coloring + PUSH/RE-PUSH buttons + Website Status filter - Database dedup to one row per SN (2.89M -> 469K rows, UNIQUE constraint added) - Import logic handles FAIL -> PASS retest transition - Refactored upload-to-api.js to render datasheets in-memory (dropped For_Web filesystem dep) - Bulk pushed 170,984 records to Hoffman API - Statistical sanity check: 100/100 stamped SNs verified on Hoffman GuruRMM (projects/msp-tools/guru-rmm/): - ROADMAP.md: added Terminology (5-tier hierarchy), Tunnel Channels Phase 2, Logging/Audit/Observability, Multi-tenancy, Modular Architecture, Protocol Versioning, Certificates sections + Decisions Log - CONTEXT.md: hierarchy table, new anti-patterns (bootstrap sacred, no cross-module imports), revised next-steps priorities Session logs for both projects. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
28 lines
1.5 KiB
Python
28 lines
1.5 KiB
Python
import base64, paramiko, subprocess, yaml, os
|
|
pwd = yaml.safe_load(subprocess.run(['sops','-d','D:/vault/clients/dataforth/ad2.sops.yaml'],
|
|
capture_output=True, text=True, timeout=30, check=True).stdout)['credentials']['password']
|
|
c = paramiko.SSHClient(); c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect('192.168.0.6', username='sysadmin', password=pwd, timeout=30, look_for_keys=False, allow_agent=False)
|
|
|
|
def ps(cmd, to=60):
|
|
enc = base64.b64encode(cmd.encode('utf-16-le')).decode()
|
|
_, o, _ = c.exec_command(f'powershell -NoProfile -EncodedCommand {enc}', timeout=to)
|
|
return o.read().decode('utf-8','replace')
|
|
|
|
print('=== database folder ===')
|
|
print(ps(r'Get-ChildItem "C:\Shares\testdatadb\database" | Select Name,Length,LastWriteTime | Format-Table -AutoSize | Out-String'))
|
|
|
|
print('\n=== testdatadb root ===')
|
|
print(ps(r'Get-ChildItem "C:\Shares\testdatadb" | Select Name,Mode,Length | Format-Table -AutoSize | Out-String'))
|
|
|
|
print('\n=== .env ===')
|
|
print(ps(r'Get-Content "C:\Shares\testdatadb\.env" -Raw -ErrorAction SilentlyContinue'))
|
|
|
|
print('\n=== package.json deps ===')
|
|
print(ps(r'(Get-Content "C:\Shares\testdatadb\package.json" -Raw) -replace ".*dependencies", "dependencies"'))
|
|
|
|
print('\n=== schema (first 50 lines of schema-pg or schema.sql) ===')
|
|
print(ps(r'$f = @("C:\Shares\testdatadb\database\schema-pg.sql", "C:\Shares\testdatadb\database\schema.sql") | Where-Object { Test-Path $_ } | Select -First 1; "using: $f"; Get-Content $f | Select -First 80'))
|
|
|
|
c.close()
|