diff --git a/reports/access_points_page.py b/reports/access_points_page.py index b22163c..30da4da 100644 --- a/reports/access_points_page.py +++ b/reports/access_points_page.py @@ -1161,6 +1161,501 @@ def render_observation_table(observations): """ +def render_wifi_connection_card(ap, credentials): + is_open = ap["encryption"] == "OPEN" + + password_states = {} + + for credential in credentials: + password = credential["password"] + + if not password: + continue + + if password not in password_states: + password_states[password] = bool( + credential["verified"] + ) + elif credential["verified"]: + password_states[password] = True + + credential_rows = [] + + for password, verified in password_states.items(): + if verified: + verify_button = """ + +""" + connect_disabled = "" + status_text = "Пароль успешно проверен" + else: + verify_button = """ + +""" + connect_disabled = "disabled" + status_text = "Пароль ещё не проверен" + + credential_rows.append( + f""" +
{esc(password)}
+ + Эта точка доступа не использует пароль. + Проверка пароля не требуется. +
+ + +