Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 140d1d803f | |||
| ef2ea6eedd |
@ -84,6 +84,15 @@ class History(Tab):
|
|||||||
el.JsonEditor(properties=properties)
|
el.JsonEditor(properties=properties)
|
||||||
with ui.tab_panel(response_tab):
|
with ui.tab_panel(response_tab):
|
||||||
response = e.args["data"]["response"]
|
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]")
|
ui.code(response).tailwind.height("[320px]").width("[640px]")
|
||||||
|
|
||||||
with el.WRow() as row:
|
with el.WRow() as row:
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class Setting(Tab):
|
|||||||
control = el.FInput(
|
control = el.FInput(
|
||||||
label=key,
|
label=key,
|
||||||
password=True if key == "root_password" else False,
|
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),
|
on_change=lambda e, key=key: self.set_key(key, e.value),
|
||||||
)
|
)
|
||||||
self._elements[key] = {
|
self._elements[key] = {
|
||||||
@ -162,6 +162,7 @@ class Global(Setting):
|
|||||||
"mailto": {"description": "The default email address for the user root."},
|
"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."},
|
"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": {"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."},
|
"root_ssh_keys": {"description": "Optional. SSH public keys to add to the root users authorized_keys file after the installation."},
|
||||||
"reboot_on_error": {
|
"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."
|
"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."
|
||||||
|
|||||||
Reference in New Issue
Block a user