diff --git a/dashboard/system.py b/dashboard/system.py index 9ed6c3e..f9ae0f5 100644 --- a/dashboard/system.py +++ b/dashboard/system.py @@ -10,9 +10,15 @@ import time from enum import Enum from typing import List +import requests, urllib3 + from .mixins import PingableMixin, WakeOnLanMixin +# don't need the warning, bc. ssl verification needs to be disabled explicitly +urllib3.disable_warnings(category=urllib3.connectionpool.InsecureRequestWarning) + + # base classes and types and stuff @@ -110,12 +116,6 @@ class PingableWOLSystem(WakeOnLanMixin, PingableSystem): # HTTP Server System -import requests, urllib3 - -# don't need the warning, bc. ssl verification needs to be disabled explicitly -urllib3.disable_warnings(category=urllib3.connectionpool.InsecureRequestWarning) - - class HTTPServer(System): def __init__(self, name, description, url: str, expected_status_code: int = 200, allow_self_signed_cert: bool = False): diff --git a/dashboard/ui.py b/dashboard/ui.py index e870a64..b332edd 100644 --- a/dashboard/ui.py +++ b/dashboard/ui.py @@ -39,6 +39,7 @@ def init_ui( if t.state_verbose != "": html.pre(t.state_verbose).classes("opacity-50 text-xs text-wrap") actions = t.get_actions() + assert actions != None if len(actions) > 0: if t.description != "" or t.state_verbose != "": ui.separator().style("margin-top: auto;") diff --git a/requirements.txt b/requirements.txt index cdf2536..94b3c8a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ nicegui~=2.11.1 +requests