mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 11:47:30 +01:00
dashboard: split dashboard web server code into its own module (#5770)
This commit is contained in:
parent
4ce627b4ee
commit
c795dbde26
@ -514,7 +514,7 @@ def command_clean(args, config):
|
||||
def command_dashboard(args):
|
||||
from esphome.dashboard import dashboard
|
||||
|
||||
return dashboard.start_web_server(args)
|
||||
return dashboard.start_dashboard(args)
|
||||
|
||||
|
||||
def command_update_all(args):
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -29,15 +29,15 @@ class DashboardSettings:
|
||||
] = {}
|
||||
|
||||
def parse_args(self, args):
|
||||
self.on_ha_addon = args.ha_addon
|
||||
password = args.password or os.getenv("PASSWORD", "")
|
||||
self.on_ha_addon: bool = args.ha_addon
|
||||
password: str = args.password or os.getenv("PASSWORD", "")
|
||||
if not self.on_ha_addon:
|
||||
self.username = args.username or os.getenv("USERNAME", "")
|
||||
self.username: str = args.username or os.getenv("USERNAME", "")
|
||||
self.using_password = bool(password)
|
||||
if self.using_password:
|
||||
self.password_hash = password_hash(password)
|
||||
self.config_dir = args.configuration
|
||||
self.absolute_config_dir = Path(self.config_dir).resolve()
|
||||
self.config_dir: str = args.configuration
|
||||
self.absolute_config_dir: Path = Path(self.config_dir).resolve()
|
||||
CORE.config_path = os.path.join(self.config_dir, ".")
|
||||
|
||||
@property
|
||||
|
1069
esphome/dashboard/web_server.py
Normal file
1069
esphome/dashboard/web_server.py
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user