viberadar 0.3.186 → 0.3.187
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/probe/runner.d.ts.map +1 -1
- package/dist/probe/runner.js +59 -14
- package/dist/probe/runner.js.map +1 -1
- package/dist/probe/types.d.ts +1 -0
- package/dist/probe/types.d.ts.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +19 -0
- package/dist/server/index.js.map +1 -1
- package/dist/ui/dashboard.html +31 -0
- package/package.json +1 -1
package/dist/ui/dashboard.html
CHANGED
|
@@ -1612,6 +1612,13 @@
|
|
|
1612
1612
|
.probe-step-type { font-size: 10px; font-weight: 600; color: var(--blue); background: rgba(88,166,255,0.1); padding: 1px 5px; border-radius: 3px; min-width: 80px; text-align: center; }
|
|
1613
1613
|
.probe-step-val { color: var(--text); font-family: monospace; }
|
|
1614
1614
|
.probe-output-box { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 11px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; white-space: pre-wrap; overflow-x: auto; max-height: 360px; overflow-y: auto; color: var(--text); line-height: 1.5; margin-top: 8px; }
|
|
1615
|
+
.probe-screenshots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
|
|
1616
|
+
.probe-screenshot-thumb { position: relative; cursor: pointer; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); transition: border-color 0.15s; flex-shrink: 0; }
|
|
1617
|
+
.probe-screenshot-thumb:hover { border-color: var(--blue); }
|
|
1618
|
+
.probe-screenshot-thumb img { display: block; width: 180px; height: 110px; object-fit: cover; }
|
|
1619
|
+
.probe-screenshot-thumb .probe-screenshot-label { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.65); font-size: 10px; color: var(--muted); padding: 3px 6px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1620
|
+
.probe-screenshot-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 99999; cursor: zoom-out; }
|
|
1621
|
+
.probe-screenshot-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.6); }
|
|
1615
1622
|
|
|
1616
1623
|
</style>
|
|
1617
1624
|
</head>
|
|
@@ -3564,6 +3571,17 @@ function renderProbeDetail(c) {
|
|
|
3564
3571
|
? `<div style="font-size:12px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;margin-top:20px;margin-bottom:6px">Ошибка</div>
|
|
3565
3572
|
<div class="probe-output-box" style="color:var(--red)">${escapeHtml(result.error)}</div>` : '';
|
|
3566
3573
|
|
|
3574
|
+
const screenshots = result?.screenshotFiles || [];
|
|
3575
|
+
const screenshotsHtml = screenshots.length
|
|
3576
|
+
? `<div style="font-size:12px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;margin-top:20px;margin-bottom:6px">📸 Скриншоты (${screenshots.length})</div>
|
|
3577
|
+
<div class="probe-screenshots">
|
|
3578
|
+
${screenshots.map((f, i) => `
|
|
3579
|
+
<div class="probe-screenshot-thumb" onclick="probeShowScreenshot('/api/probe/screenshot/${escapeHtml(f)}')">
|
|
3580
|
+
<img src="/api/probe/screenshot/${escapeHtml(f)}" alt="step ${i+1}" loading="lazy">
|
|
3581
|
+
<div class="probe-screenshot-label">${escapeHtml(f.replace(/^(dsl|pw)-[^-]+-/, '').replace(/-\d{4}-\d{2}-\d{2}.*/, ''))}</div>
|
|
3582
|
+
</div>`).join('')}
|
|
3583
|
+
</div>` : '';
|
|
3584
|
+
|
|
3567
3585
|
c.innerHTML = `
|
|
3568
3586
|
<div class="probe-detail">
|
|
3569
3587
|
<div class="probe-back" onclick="probeDetailCheck=null;renderContent()">← Назад к проверкам</div>
|
|
@@ -3585,11 +3603,24 @@ function renderProbeDetail(c) {
|
|
|
3585
3603
|
|
|
3586
3604
|
${stepsHtml}
|
|
3587
3605
|
${fileHtml}
|
|
3606
|
+
${screenshotsHtml}
|
|
3588
3607
|
${outputHtml}
|
|
3589
3608
|
${errorHtml}
|
|
3590
3609
|
</div>`;
|
|
3591
3610
|
}
|
|
3592
3611
|
|
|
3612
|
+
function probeShowScreenshot(url) {
|
|
3613
|
+
let lb = document.getElementById('probeScreenshotLb');
|
|
3614
|
+
if (lb) lb.remove();
|
|
3615
|
+
lb = document.createElement('div');
|
|
3616
|
+
lb.id = 'probeScreenshotLb';
|
|
3617
|
+
lb.className = 'probe-screenshot-lightbox';
|
|
3618
|
+
lb.innerHTML = `<img src="${url}" alt="screenshot">`;
|
|
3619
|
+
lb.addEventListener('click', () => lb.remove());
|
|
3620
|
+
document.addEventListener('keydown', function esc(e) { if (e.key === 'Escape') { lb.remove(); document.removeEventListener('keydown', esc); } });
|
|
3621
|
+
document.body.appendChild(lb);
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3593
3624
|
async function probeRunNow() {
|
|
3594
3625
|
probeRunning = true;
|
|
3595
3626
|
renderContent();
|