added exclusion, fixed time display
This commit is contained in:
+6
-5
@@ -18,6 +18,7 @@ ALLOWED_KEYS = {
|
||||
"avg_time_coe",
|
||||
"avg_time_p2p",
|
||||
"avg_time_p3p",
|
||||
"scan_exclusions",
|
||||
"smb_username",
|
||||
"smb_password",
|
||||
"smb_domain",
|
||||
@@ -48,7 +49,7 @@ def _start_full_scan_background(target_dir, results_dir, results_dir_ref, source
|
||||
def _job():
|
||||
try:
|
||||
full_scan(target_dir, results_dir, results_dir_ref)
|
||||
start_watching(target_dir, results_dir)
|
||||
start_watching(target_dir, results_dir, results_dir_ref)
|
||||
tests = get_all_tests()
|
||||
completed = len([t for t in tests if t.get("completed")])
|
||||
print(f"[{source_label}] Scan complete -> {len(tests)} tests, {completed} completed")
|
||||
@@ -250,7 +251,7 @@ def set_config_route():
|
||||
if not isinstance(updates, dict):
|
||||
return jsonify({"error": "Request body must be a JSON object"}), 400
|
||||
|
||||
dirs_changed = False
|
||||
rescan_required = False
|
||||
|
||||
for key, value in updates.items():
|
||||
if key not in ALLOWED_KEYS:
|
||||
@@ -261,10 +262,10 @@ def set_config_route():
|
||||
else:
|
||||
set_config(key, str(value))
|
||||
|
||||
if key in {"target_dir", "results_dir", "results_dir_ref"}:
|
||||
dirs_changed = True
|
||||
if key in {"target_dir", "results_dir", "results_dir_ref", "scan_exclusions"}:
|
||||
rescan_required = True
|
||||
|
||||
if dirs_changed:
|
||||
if rescan_required:
|
||||
_apply_smb_env_from_config()
|
||||
target_dir = resolve_runtime_path(get_config("target_dir"))
|
||||
results_dir = resolve_runtime_path(get_config("results_dir"))
|
||||
|
||||
Reference in New Issue
Block a user