v1.0 - Version stable: multi-PC, détection UI-DETR-1, 3 modes exécution
- Frontend v4 accessible sur réseau local (192.168.1.40) - Ports ouverts: 3002 (frontend), 5001 (backend), 5004 (dashboard) - Ollama GPU fonctionnel - Self-healing interactif - Dashboard confiance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
123
test_dashboard_fix.py
Normal file
123
test_dashboard_fix.py
Normal file
@@ -0,0 +1,123 @@
|
||||
at.")formthe correct and are in s existlen fif sessiok i Checnt("ri
|
||||
p")nds fouession s No"❌ ISSUE: print( lse:
|
||||
|
||||
eted.")star once reessionsal']} slt['tothow {resuld sshoue dashboard nt(f" Th pri
|
||||
ctly!")ded correloand and ons fouSS: Sessint("✅ SUCCE pri
|
||||
> 0:['total'] sultf re
|
||||
i * 60)=""\n" + "t( prin
|
||||
_logic()
|
||||
ard_sessionshbost_datet =
|
||||
resul * 60)
|
||||
"=" print(
|
||||
ix")ng Fssion Loadishboard Seing Da"🧪 Testnt(
|
||||
pri__main__":_ == "if __name_
|
||||
|
||||
ltsureturn re
|
||||
)
|
||||
} MB"mb']ssion['size_ts | 💾 {se} screenshount']ts_cohoens'scren[essios | 📸 {sunt']} event['events_coionss{sef" 🎬 print( ate}")
|
||||
ning} | 📅 {d 🏷️ {trai} | 👤 {user(f" print")
|
||||
']}'session_idon[essi - {sf"t( prin
|
||||
:%M')
|
||||
%m-%d %H('%Y-strftime0:00')).e('Z', '+0'].replac['started_atssionisoformat(seomtetime.frdate = da
|
||||
o context'xt'] else 'Nn['contesioeslabel') if s', 'No abelining_lt'].get('traon['contexsiesraining = s t
|
||||
'Unknown'ser'] else sion['uf ses) iwn'), 'Unkno('id'r'].getion['use, sessabel'('lser'].geton['u = sessi user :
|
||||
:5]']['sessionsin result[r session fo
|
||||
ssions:") Recent se(f" nt prisions']:
|
||||
seslt['esuif r
|
||||
otal']}")
|
||||
{result['tions: al sesst(f" Totin prult:")
|
||||
Final Resrint(f"\n📊
|
||||
|
||||
p)
|
||||
}sions: len(sesotal' 't
|
||||
s,s': sessionionsess
|
||||
'ult = {
|
||||
res se=True)
|
||||
revertarted_at'],'s x: x[lambda(key=essions.sort s
|
||||
|
||||
inue cont
|
||||
{e}")}: ath.namen_pg {jsorror loadinf" ❌ Ent( pri
|
||||
as e:eptionexcept Exc
|
||||
")
|
||||
ize_mb}MBe: {s Siz)},t_filescreenshohots: {len(sScreensents)}, n.evsessiolen(s: { Event " print(f on_id}")
|
||||
ssion.sessi{se: on loaded ✅ Sessi" (f print
|
||||
|
||||
}) path)
|
||||
: str(json_n_path' 'jso t),
|
||||
h.parenon_patr(js 'path': st b,
|
||||
ize_m': s 'size_mb
|
||||
ntext,ssion.co': sentext 'co er,
|
||||
session.us: 'user' _files),
|
||||
otn(screenshnt': le_coueenshots 'scr events),
|
||||
ion.essnt': len(sevents_cou ' None,
|
||||
ed_at elsesion.endif ses) ormat(t.isofion.ended_ad_at': sessende ' ),
|
||||
oformat(.is.started_at': sessionted_at 'star _id,
|
||||
sessionession.d': sssion_i 'se
|
||||
{.append( sessions
|
||||
|
||||
024), 2)(1024 * 1/ bytes (size_undb = roze_m si
|
||||
|
||||
().st_size_file.stat+= imgs yte size_b es:
|
||||
enshot_filcremg_file in s for i
|
||||
tsenshole des screr la tail # Ajoute
|
||||
)
|
||||
s/"in shotscreenshots ')))} lob('*.pngshots_dir.gn(list(Found {le 📸 f" print(
|
||||
png')))r.glob('*.ots_dit(shtend(lisexfiles.hot_ screens ():
|
||||
istsdir.exts_if sho /")
|
||||
creenshotss in sshoten)} scre'))*.pngglob('s_dir.hotlist(screenslen(📸 Found { t(f" rin p .png')))
|
||||
r.glob('*_direenshotssct(nd(lis_files.exteeenshot scr ):
|
||||
xists(s_dir.ehotreens if sc = []
|
||||
hot_files screens
|
||||
nt_v0
|
||||
cture age # Stru" / "shotssession_dirts_dir = sho dard
|
||||
ucture stanots" # Strscreenshion_dir / " = sessdirnshots_ scree ossibles
|
||||
placements ps emférentdans difcreenshots s srcher le # Che
|
||||
|
||||
().st_sizen_path.statbytes = jsoe_ siz JSON
|
||||
hier u ficla taille d # Calculer
|
||||
|
||||
e(json_path)m_fiload_froion.lSessn = Rawsessio }")
|
||||
namepath.ng: {json_dioant(f" 📄 L pri :
|
||||
try _files:
|
||||
n json_path ir json fo
|
||||
séparéession mme une seco JSON fichierer chaque # Trait
|
||||
continue
|
||||
|
||||
json_files: if not
|
||||
|
||||
ON files"))} JSesn_filen(jsoound {l Ff" int(
|
||||
prson'))lob('*/*.jon_dir.glist(session')) + js.glob('*.(session_dirst_files = li jsons
|
||||
oireéperts-rses soutoire et éper rs leON danchiers JSr les fihe # Cherc
|
||||
|
||||
ame}")on_dir.nessitory: {secking direcf"📁 Ch print(
|
||||
ontinue
|
||||
cr():
|
||||
on_dir.is_diif not sessi
|
||||
ir():terd_PATH.iSESSIONS_dir in sion for ses
|
||||
|
||||
H}")S_PATSSIONSEs in: {ionng sess(f"🔍 Scanni
|
||||
print 0}
|
||||
otal':, 'ts': []sionurn {'ses ret")
|
||||
xistot eoes nns path d"❌ Sessiont( pri):
|
||||
TH.exists(IONS_PAf not SESS
|
||||
i[]
|
||||
ssions =
|
||||
seons")ining/sessirah("data/t= PatH ONS_PAT SESSIng logic
|
||||
ession loadi s'sdashboard the teimula # S"
|
||||
|
||||
ogic.""on loading lsiashboard sesd dthe fixeTest """ c():
|
||||
ogiession_loard_sashbt_d
|
||||
|
||||
def tesRawSessionmport s i core.model))
|
||||
|
||||
from).parent(__file__(0, str(Pathpath.insertath
|
||||
sys.ectory to pdirt dd parenetime
|
||||
|
||||
# Art datime impoom datet
|
||||
frPathib import
|
||||
from pathlort sys""
|
||||
|
||||
imprectly
|
||||
"dilogic g the ix by runninading fsession loe dashboard ""
|
||||
Test thhon3
|
||||
"n/env pytsr/bi#!/u
|
||||
Reference in New Issue
Block a user