added exclusion, fixed time display
This commit is contained in:
@@ -24,6 +24,7 @@ export default function ConfigModal({ onClose }) {
|
||||
target_dir: config.target_dir ?? '',
|
||||
results_dir: config.results_dir ?? '',
|
||||
results_dir_ref: config.results_dir_ref ?? '',
|
||||
scan_exclusions: config.scan_exclusions ?? '',
|
||||
avg_time_coe: config.avg_time_coe ? fmtSeconds(config.avg_time_coe) : '',
|
||||
avg_time_p2p: config.avg_time_p2p ? fmtSeconds(config.avg_time_p2p) : '',
|
||||
avg_time_p3p: config.avg_time_p3p ? fmtSeconds(config.avg_time_p3p) : '',
|
||||
@@ -41,6 +42,7 @@ export default function ConfigModal({ onClose }) {
|
||||
target_dir: form.target_dir || null,
|
||||
results_dir: form.results_dir || null,
|
||||
results_dir_ref: form.results_dir_ref || null,
|
||||
scan_exclusions: form.scan_exclusions || null,
|
||||
// Convert minutes → seconds; empty/null clears the override
|
||||
avg_time_coe: form.avg_time_coe ? String(parseFloat(form.avg_time_coe) * 60) : null,
|
||||
avg_time_p2p: form.avg_time_p2p ? String(parseFloat(form.avg_time_p2p) * 60) : null,
|
||||
@@ -165,6 +167,19 @@ export default function ConfigModal({ onClose }) {
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
<div>
|
||||
<label className="text-slate-400 text-xs block mb-1">Excluded Test Rules (comma-separated)</label>
|
||||
<input
|
||||
type="text"
|
||||
value={form.scan_exclusions ?? ''}
|
||||
onChange={e => setForm(f => ({ ...f, scan_exclusions: e.target.value }))}
|
||||
placeholder="SP, BW320, CGW452_P3P, CGW452_COE, P3P_ROT2, P3P_ROT3"
|
||||
className="w-full bg-slate-800 border border-slate-700 text-slate-200 text-sm rounded-lg px-3 py-2 focus:outline-none focus:border-blue-500"
|
||||
/>
|
||||
<p className="text-slate-500 text-xs mt-1">
|
||||
Case-insensitive. Rules are split by commas.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ export default function TestTable({ tests = [], allTests = [], isLoading }) {
|
||||
{isOpen ? '▾' : '▸'}
|
||||
</td>
|
||||
<td className="px-3 py-2 text-xs text-slate-200 whitespace-nowrap">
|
||||
{test.filename ?? '—'}
|
||||
{test.filename.replace(".ini", "") ?? '—'}
|
||||
</td>
|
||||
<td className="px-3 py-2 whitespace-nowrap">
|
||||
<StatusBadge completed={test.completed} />
|
||||
|
||||
@@ -6,7 +6,7 @@ function fmt(seconds) {
|
||||
return `${m}m`
|
||||
}
|
||||
|
||||
function estimateDays(seconds) {
|
||||
function estimateTime(seconds) {
|
||||
const s = Number(seconds)
|
||||
if (!Number.isFinite(s) || s < 0) return null
|
||||
|
||||
@@ -26,7 +26,8 @@ function estimateDays(seconds) {
|
||||
|
||||
function fmtDaysLabel(days) {
|
||||
if (days == null || !Number.isFinite(days)) return null
|
||||
return days < 1 ? `${(days * 24).toFixed(1)}h` : `${days.toFixed(1)}d`
|
||||
const h = parseInt(days % 1 * 24)
|
||||
return days < 1 ? `${(days * 24).toFixed(1)}h` : `${parseInt(days)}d ${h}h`
|
||||
}
|
||||
|
||||
function fmtCompletionDate(days) {
|
||||
@@ -43,7 +44,7 @@ export default function TimeDisplay({ elapsedSeconds, estimatedRemainingSeconds,
|
||||
.map(([t]) => t)
|
||||
: []
|
||||
|
||||
const estimatedDays = estimateDays(estimatedRemainingSeconds)
|
||||
const estimatedDays = estimateTime(estimatedRemainingSeconds)
|
||||
const daysLabel = fmtDaysLabel(estimatedDays)
|
||||
const completionDate = fmtCompletionDate(estimatedDays)
|
||||
|
||||
@@ -59,11 +60,8 @@ export default function TimeDisplay({ elapsedSeconds, estimatedRemainingSeconds,
|
||||
<div>
|
||||
<p className="text-slate-400 text-xs uppercase tracking-widest">Est. Time Remaining</p>
|
||||
<p className={`text-2xl font-bold mt-0.5 ${estimatedRemainingSeconds != null ? 'text-slate-100' : 'text-amber-400'}`}>
|
||||
{estimatedRemainingSeconds != null ? fmt(estimatedRemainingSeconds) : '—'}
|
||||
{daysLabel != null ? daysLabel : '—'}
|
||||
</p>
|
||||
{daysLabel && (
|
||||
<p className="text-slate-400 text-xs mt-0.5">{daysLabel}</p>
|
||||
)}
|
||||
</div>
|
||||
{completionDate && (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user