##// END OF EJS Templates
feat(system-info): expose rhodecode config for better visibility of set settings
super-admin -
r5552:f3356a66 default
parent child Browse files
Show More
@@ -199,8 +199,12 b' class AdminSystemInfoSettingsView(BaseAp'
199
199
200 ]
200 ]
201
201
202 c.rhodecode_data_items = [
203 (k, v) for k, v in sorted((val('rhodecode_server_config') or {}).items(), key=lambda x: x[0].lower())
204 ]
205
202 c.vcsserver_data_items = [
206 c.vcsserver_data_items = [
203 (k, v) for k, v in (val('vcs_server_config') or {}).items()
207 (k, v) for k, v in sorted((val('vcs_server_config') or {}).items(), key=lambda x: x[0].lower())
204 ]
208 ]
205
209
206 if snapshot:
210 if snapshot:
@@ -665,6 +665,32 b' def vcs_server_config():'
665
665
666 return SysInfoRes(value=value, state=state, human_value=human_value)
666 return SysInfoRes(value=value, state=state, human_value=human_value)
667
667
668 @register_sysinfo
669 def rhodecode_server_config():
670 import rhodecode
671
672 state = STATE_OK_DEFAULT
673 config = rhodecode.CONFIG.copy()
674
675 secrets_lits = [
676 f'rhodecode_{LicenseModel.LICENSE_DB_KEY}',
677 'sqlalchemy.db1.url',
678 'channelstream.secret',
679 'beaker.session.secret',
680 'rhodecode.encrypted_values.secret',
681 'appenlight.api_key',
682 'smtp_password',
683 'file_store.objectstore.secret',
684 'archive_cache.objectstore.secret',
685 'app.service_api.token',
686 ]
687 for k in secrets_lits:
688 if k in config:
689 config[k] = '**OBFUSCATED**'
690
691 value = human_value = config
692 return SysInfoRes(value=value, state=state, human_value=human_value)
693
668
694
669 @register_sysinfo
695 @register_sysinfo
670 def rhodecode_app_info():
696 def rhodecode_app_info():
@@ -851,6 +877,7 b' def get_system_info(environ):'
851 'vcs_server': SysInfo(vcs_server)(),
877 'vcs_server': SysInfo(vcs_server)(),
852
878
853 'vcs_server_config': SysInfo(vcs_server_config)(),
879 'vcs_server_config': SysInfo(vcs_server_config)(),
880 'rhodecode_server_config': SysInfo(rhodecode_server_config)(),
854
881
855 'git': SysInfo(git_info)(),
882 'git': SysInfo(git_info)(),
856 'hg': SysInfo(hg_info)(),
883 'hg': SysInfo(hg_info)(),
@@ -29,7 +29,21 b''
29
29
30 <div class="panel panel-default">
30 <div class="panel panel-default">
31 <div class="panel-heading">
31 <div class="panel-heading">
32 <h3 class="panel-title">${_('VCS Server')}</h3>
32 <h3 class="panel-title">${_('RhodeCode Server Config')}</h3>
33 </div>
34 <div class="panel-body">
35 <dl class="dl-horizontal settings dt-400">
36 % for dt, dd in c.rhodecode_data_items:
37 <dt>${dt}${':' if dt else '---'}</dt>
38 <dd>${dd}${'' if dt else '---'}</dd>
39 % endfor
40 </dl>
41 </div>
42 </div>
43
44 <div class="panel panel-default">
45 <div class="panel-heading">
46 <h3 class="panel-title">${_('VCS Server Config')}</h3>
33 </div>
47 </div>
34 <div class="panel-body">
48 <div class="panel-body">
35 <dl class="dl-horizontal settings dt-400">
49 <dl class="dl-horizontal settings dt-400">
General Comments 0
You need to be logged in to leave comments. Login now