Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 140d1d803f | |||
| ef2ea6eedd | |||
| b790be713a |
@ -84,6 +84,15 @@ class History(Tab):
|
||||
el.JsonEditor(properties=properties)
|
||||
with ui.tab_panel(response_tab):
|
||||
response = e.args["data"]["response"]
|
||||
lines = response.splitlines()
|
||||
response_lines = []
|
||||
for line in lines:
|
||||
if line.strip().startswith("root_password"):
|
||||
response_lines.append('root_password = "SECRET"')
|
||||
else:
|
||||
response_lines.append(line)
|
||||
|
||||
response = "\n".join(response_lines)
|
||||
ui.code(response).tailwind.height("[320px]").width("[640px]")
|
||||
|
||||
with el.WRow() as row:
|
||||
|
||||
@ -66,7 +66,7 @@ class Setting(Tab):
|
||||
control = el.FInput(
|
||||
label=key,
|
||||
password=True if key == "root_password" else False,
|
||||
password_toggle_button=True if key == "root_password" else False,
|
||||
password_toggle_button=False,
|
||||
on_change=lambda e, key=key: self.set_key(key, e.value),
|
||||
)
|
||||
self._elements[key] = {
|
||||
@ -162,6 +162,7 @@ class Global(Setting):
|
||||
"mailto": {"description": "The default email address for the user root."},
|
||||
"timezone": {"description": "The timezone in tzdata format. For example, Europe/Vienna or America/New_York."},
|
||||
"root_password": {"description": "The password for the root user.", "type": "str"},
|
||||
"root-password-hashed": {"description": "The pre-hashed password for the root user, which will be written verbatim to /etc/passwd. May be used instead of root_password and can be generated using the mkpasswd tool, for example.", "type": "str"},
|
||||
"root_ssh_keys": {"description": "Optional. SSH public keys to add to the root users authorized_keys file after the installation."},
|
||||
"reboot_on_error": {
|
||||
"description": "If set to true, the installer will reboot automatically when an error is encountered. The default behavior is to wait to give the administrator a chance to investigate why the installation failed."
|
||||
|
||||
2
main.py
2
main.py
@ -102,7 +102,7 @@ async def post_answer(request: Request) -> PlainTextResponse:
|
||||
if "network" in default_data and "network" in answer_data:
|
||||
default_data["network"].update(answer_data["network"])
|
||||
if "disk-setup" in default_data and "disk-setup" in answer_data:
|
||||
if any("filter" in k for k in answer_data["disk-setup"]):
|
||||
if any("filter" in k for k in answer_data["disk-setup"]) and "disk_list" in default_data["disk-setup"]:
|
||||
del default_data["disk-setup"]["disk_list"]
|
||||
if "disk_list" in answer_data["disk-setup"]:
|
||||
for key in list(default_data["disk-setup"].keys()):
|
||||
|
||||
Reference in New Issue
Block a user