mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-21 05:41:54 +02:00
show original section titles in config admin ui
This commit is contained in:
@@ -455,7 +455,7 @@ def live_config_list_view(request: HttpRequest, **kwargs) -> TableContext:
|
|||||||
|
|
||||||
for section in CONFIG_SCHEMA.keys():
|
for section in CONFIG_SCHEMA.keys():
|
||||||
for key in CONFIG_SCHEMA[section].keys():
|
for key in CONFIG_SCHEMA[section].keys():
|
||||||
rows['Section'].append(section.replace('_', ' ').title().replace(' Config', ''))
|
rows['Section'].append(section) # section.replace('_', ' ').title().replace(' Config', '')
|
||||||
rows['Key'].append(ItemLink(key, key=key))
|
rows['Key'].append(ItemLink(key, key=key))
|
||||||
rows['Type'].append(mark_safe(f'<code>{find_config_type(key)}</code>'))
|
rows['Type'].append(mark_safe(f'<code>{find_config_type(key)}</code>'))
|
||||||
rows['Value'].append(mark_safe(f'<code>{CONFIG[key]}</code>') if key_is_safe(key) else '******** (redacted)')
|
rows['Value'].append(mark_safe(f'<code>{CONFIG[key]}</code>') if key_is_safe(key) else '******** (redacted)')
|
||||||
@@ -465,7 +465,7 @@ def live_config_list_view(request: HttpRequest, **kwargs) -> TableContext:
|
|||||||
|
|
||||||
section = 'DYNAMIC'
|
section = 'DYNAMIC'
|
||||||
for key in DYNAMIC_CONFIG_SCHEMA.keys():
|
for key in DYNAMIC_CONFIG_SCHEMA.keys():
|
||||||
rows['Section'].append(section.replace('_', ' ').title().replace(' Config', ''))
|
rows['Section'].append(section) # section.replace('_', ' ').title().replace(' Config', '')
|
||||||
rows['Key'].append(ItemLink(key, key=key))
|
rows['Key'].append(ItemLink(key, key=key))
|
||||||
rows['Type'].append(mark_safe(f'<code>{find_config_type(key)}</code>'))
|
rows['Type'].append(mark_safe(f'<code>{find_config_type(key)}</code>'))
|
||||||
rows['Value'].append(mark_safe(f'<code>{CONFIG[key]}</code>') if key_is_safe(key) else '******** (redacted)')
|
rows['Value'].append(mark_safe(f'<code>{CONFIG[key]}</code>') if key_is_safe(key) else '******** (redacted)')
|
||||||
|
Reference in New Issue
Block a user