|
30 | 30 | QLineEdit, QGridLayout, QTableWidget, QAbstractItemView, QTableWidgetItem, QHeaderView, |
31 | 31 | QGroupBox, QDialog, QProgressDialog, QInputDialog, QCheckBox, |
32 | 32 | QTextEdit, QFontComboBox, QGraphicsOpacityEffect, QTextBrowser, QDialogButtonBox, |
33 | | - QScrollArea, QProgressBar) |
| 33 | + QScrollArea) |
34 | 34 |
|
35 | 35 | if platform.system() == "Darwin": |
36 | 36 | extra_paths = [ |
@@ -393,49 +393,6 @@ def cleanup(): |
393 | 393 | worker.start() |
394 | 394 | return worker |
395 | 395 |
|
396 | | -def calculate_score(avg, jitter, loss): |
397 | | - if avg is None: |
398 | | - return 999999 |
399 | | - |
400 | | - return ( |
401 | | - avg |
402 | | - + (jitter * 1.5) |
403 | | - + (loss * 12) |
404 | | - ) |
405 | | - |
406 | | -def _status_from_metrics(avg, loss): |
407 | | - if avg is None: |
408 | | - return "Blocked" |
409 | | - if loss >= 50: |
410 | | - return "Unstable" |
411 | | - if avg > 300: |
412 | | - return "Slow" |
413 | | - return "OK" |
414 | | - |
415 | | -def _mark_recommended(results): |
416 | | - candidates = [ |
417 | | - r for r in results |
418 | | - if r.protocol and r.status == "OK" |
419 | | - ] |
420 | | - if not candidates: |
421 | | - return |
422 | | - |
423 | | - best = min( |
424 | | - candidates, |
425 | | - key=lambda r: r.avg_latency_ms or 9999 |
426 | | - ) |
427 | | - best.recommended = True |
428 | | - |
429 | | -def verify_live_connection(timeout=7): |
430 | | - start_time = time.time() |
431 | | - while time.time() - start_time < timeout: |
432 | | - res = run_warp_command("warp-cli", "status") |
433 | | - if res.returncode == 0: |
434 | | - if "Connected" in res.stdout: |
435 | | - return True |
436 | | - time.sleep(1.0) |
437 | | - return False |
438 | | - |
439 | 396 | # ----------------------------------------------------- |
440 | 397 |
|
441 | 398 | @dataclass |
@@ -937,8 +894,7 @@ def run(self): |
937 | 894 | total_tasks = len(tasks) |
938 | 895 | successful_profiles = [] |
939 | 896 |
|
940 | | - self.log_signal.emit( |
941 | | - f"<span style='color: #58a6ff; font-weight:bold;'>[SYS]</span> Initializing Hardware Network Diagnostics...") |
| 897 | + self.log_signal.emit("<span style='color: #58a6ff; font-weight:bold;'>[SYS]</span> Initializing Hardware Network Diagnostics...") |
942 | 898 | self.log_signal.emit( |
943 | 899 | f"<span style='color: #58a6ff; font-weight:bold;'>[SYS]</span> Queued {total_tasks} routing payload configurations.<br>") |
944 | 900 | time.sleep(1.0) |
|
0 commit comments