Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user