|
39 | 39 | get_cli_profiles, |
40 | 40 | get_current_user_info, |
41 | 41 | get_host, |
42 | | - get_local_token, |
43 | 42 | get_workspace_name, |
44 | 43 | make_api_call, |
45 | 44 | resolve_local_connection, |
@@ -522,7 +521,6 @@ def _sso_try_cached(host: str) -> Optional[str]: |
522 | 521 |
|
523 | 522 |
|
524 | 523 | # ── Background SSO browser flow ────────────────────────────────────── |
525 | | -import threading |
526 | 524 |
|
527 | 525 | _sso_result: Dict[str, Any] = {} # host → {"token": ..., "error": ..., "done": bool} |
528 | 526 | _sso_lock = threading.Lock() |
@@ -623,10 +621,14 @@ def build_response_panel( |
623 | 621 | A Dash ``html.Div`` component tree. |
624 | 622 | """ |
625 | 623 | code, ms, data = result["status_code"], result["elapsed_ms"], result["data"] |
626 | | - if 200 <= code < 300: status_color, icon = "success", "bi-check-circle-fill" |
627 | | - elif code == 0: status_color, icon = "danger", "bi-x-octagon-fill" |
628 | | - elif 400 <= code < 500: status_color, icon = "danger", "bi-x-circle-fill" |
629 | | - else: status_color, icon = "warning", "bi-exclamation-circle-fill" |
| 624 | + if 200 <= code < 300: |
| 625 | + status_color, icon = "success", "bi-check-circle-fill" |
| 626 | + elif code == 0: |
| 627 | + status_color, icon = "danger", "bi-x-octagon-fill" |
| 628 | + elif 400 <= code < 500: |
| 629 | + status_color, icon = "danger", "bi-x-circle-fill" |
| 630 | + else: |
| 631 | + status_color, icon = "warning", "bi-exclamation-circle-fill" |
630 | 632 |
|
631 | 633 | item_count = "" |
632 | 634 | if isinstance(data, list): |
@@ -2448,7 +2450,7 @@ def update_curl_display(last_req, conn_config): |
2448 | 2450 | full_url = f"{base_url}?{urlencode(query_params)}" if query_params else base_url |
2449 | 2451 |
|
2450 | 2452 | lines = [f"curl -X {method} \\", f" '{full_url}' \\", f" -H 'Authorization: Bearer {token}' \\", |
2451 | | - f" -H 'Content-Type: application/json'"] |
| 2453 | + " -H 'Content-Type: application/json'"] |
2452 | 2454 | if body: |
2453 | 2455 | lines[-1] += " \\" |
2454 | 2456 | lines.append(f" -d '{json.dumps(body, separators=(',', ':'))}'") |
|
0 commit comments