##// END OF EJS Templates
system-info: expose data about vcsserver.
dan -
r3943:2703bca5 default
parent child Browse files
Show More
@@ -155,6 +155,10 b' class AdminSystemInfoSettingsView(BaseAp'
155
155
156 ]
156 ]
157
157
158 c.vcsserver_data_items = [
159 (k, v) for k,v in (val('vcs_server_config') or {}).items()
160 ]
161
158 if snapshot:
162 if snapshot:
159 if c.allowed_to_snapshot:
163 if c.allowed_to_snapshot:
160 c.data_items.pop(0) # remove server info
164 c.data_items.pop(0) # remove server info
@@ -594,6 +594,23 b' def vcs_server():'
594 return SysInfoRes(value=value, state=state, human_value=human_value)
594 return SysInfoRes(value=value, state=state, human_value=human_value)
595
595
596
596
597 def vcs_server_config():
598 from rhodecode.lib.vcs.backends import get_vcsserver_service_data
599 state = STATE_OK_DEFAULT
600
601 value = {}
602 try:
603 data = get_vcsserver_service_data()
604 value = data['app_config']
605 except Exception as e:
606 state = {'message': str(e), 'type': STATE_ERR}
607
608 human_value = value.copy()
609 human_value['text'] = 'VCS Server config'
610
611 return SysInfoRes(value=value, state=state, human_value=human_value)
612
613
597 def rhodecode_app_info():
614 def rhodecode_app_info():
598 import rhodecode
615 import rhodecode
599 edition = rhodecode.CONFIG.get('rhodecode.edition')
616 edition = rhodecode.CONFIG.get('rhodecode.edition')
@@ -771,6 +788,8 b' def get_system_info(environ):'
771 'vcs_backends': SysInfo(vcs_backends)(),
788 'vcs_backends': SysInfo(vcs_backends)(),
772 'vcs_server': SysInfo(vcs_server)(),
789 'vcs_server': SysInfo(vcs_server)(),
773
790
791 'vcs_server_config': SysInfo(vcs_server_config)(),
792
774 'git': SysInfo(git_info)(),
793 'git': SysInfo(git_info)(),
775 'hg': SysInfo(hg_info)(),
794 'hg': SysInfo(hg_info)(),
776 'svn': SysInfo(svn_info)(),
795 'svn': SysInfo(svn_info)(),
@@ -29,6 +29,20 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>
33 </div>
34 <div class="panel-body">
35 <dl class="dl-horizontal settings">
36 % for dt, dd in c.vcsserver_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">
32 <h3 class="panel-title">${_('Python Packages')}</h3>
46 <h3 class="panel-title">${_('Python Packages')}</h3>
33 </div>
47 </div>
34 <div class="panel-body">
48 <div class="panel-body">
General Comments 0
You need to be logged in to leave comments. Login now