##// END OF EJS Templates
repositories: handle vcs backend unavailable correctly in advanced settings.
marcink -
r3382:f260e60e default
parent child Browse files
Show More
@@ -73,6 +73,8 b' class RepoSettingsView(RepoAppView):'
73 'repository.write', 'repository.read', 'repository.admin')(
73 'repository.write', 'repository.read', 'repository.admin')(
74 self.db_repo.fork.repo_name, 'repo set as fork page')
74 self.db_repo.fork.repo_name, 'repo set as fork page')
75
75
76 c.ver_info_dict = self.rhodecode_vcs_repo.get_hooks_info()
77
76 return self._get_template_context(c)
78 return self._get_template_context(c)
77
79
78 @LoginRequired()
80 @LoginRequired()
@@ -118,23 +118,26 b''
118 <h3 class="panel-title">${_('Hooks')} <a class="permalink" href="#advanced-hooks"> ΒΆ</a></h3>
118 <h3 class="panel-title">${_('Hooks')} <a class="permalink" href="#advanced-hooks"> ΒΆ</a></h3>
119 </div>
119 </div>
120 <div class="panel-body">
120 <div class="panel-body">
121 <% ver_info_dict = c.rhodecode_db_repo.scm_instance().get_hooks_info() %>
122
123 <table class="rctable">
121 <table class="rctable">
124 <th>${_('Hook type')}</th>
122 <th>${_('Hook type')}</th>
125 <th>${_('Hook version')}</th>
123 <th>${_('Hook version')}</th>
126 <th>${_('Current version')}</th>
124 <th>${_('Current version')}</th>
127
125 % if c.ver_info_dict:
128 <tr>
126 <tr>
129 <td>${_('PRE HOOK')}</td>
127 <td>${_('PRE HOOK')}</td>
130 <td>${ver_info_dict['pre_version']}</td>
128 <td>${c.ver_info_dict['pre_version']}</td>
131 <td>${c.rhodecode_version}</td>
129 <td>${c.rhodecode_version}</td>
132 </tr>
130 </tr>
133 <tr>
131 <tr>
134 <td>${_('POST HOOK')}</td>
132 <td>${_('POST HOOK')}</td>
135 <td>${ver_info_dict['post_version']}</td>
133 <td>${c.ver_info_dict['post_version']}</td>
136 <td>${c.rhodecode_version}</td>
134 <td>${c.rhodecode_version}</td>
137 </tr>
135 </tr>
136 % else:
137 <tr>
138 <td>${_('Unable to read hook information from VCS Server')}</td>
139 </tr>
140 % endif
138 </table>
141 </table>
139
142
140 <a href="${h.route_path('edit_repo_advanced_hooks', repo_name=c.repo_name)}"
143 <a href="${h.route_path('edit_repo_advanced_hooks', repo_name=c.repo_name)}"
General Comments 0
You need to be logged in to leave comments. Login now