Show More
@@ -1,406 +1,409 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | # Copyright (C) 2016-2018 RhodeCode GmbH |
|
3 | # Copyright (C) 2016-2018 RhodeCode GmbH | |
4 | # |
|
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify |
|
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
7 | # (only), as published by the Free Software Foundation. |
|
7 | # (only), as published by the Free Software Foundation. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU Affero General Public License |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | # |
|
16 | # | |
17 | # This program is dual-licensed. If you wish to learn more about the |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
20 |
|
20 | |||
21 |
|
21 | |||
22 | from rhodecode.apps._base import ADMIN_PREFIX |
|
22 | from rhodecode.apps._base import ADMIN_PREFIX | |
23 |
|
23 | |||
24 |
|
24 | |||
25 | def admin_routes(config): |
|
25 | def admin_routes(config): | |
26 | """ |
|
26 | """ | |
27 | Admin prefixed routes |
|
27 | Admin prefixed routes | |
28 | """ |
|
28 | """ | |
29 |
|
29 | |||
30 | config.add_route( |
|
30 | config.add_route( | |
31 | name='admin_audit_logs', |
|
31 | name='admin_audit_logs', | |
32 | pattern='/audit_logs') |
|
32 | pattern='/audit_logs') | |
33 |
|
33 | |||
34 | config.add_route( |
|
34 | config.add_route( | |
35 | name='admin_audit_log_entry', |
|
35 | name='admin_audit_log_entry', | |
36 | pattern='/audit_logs/{audit_log_id}') |
|
36 | pattern='/audit_logs/{audit_log_id}') | |
37 |
|
37 | |||
38 | config.add_route( |
|
38 | config.add_route( | |
39 | name='pull_requests_global_0', # backward compat |
|
39 | name='pull_requests_global_0', # backward compat | |
40 | pattern='/pull_requests/{pull_request_id:\d+}') |
|
40 | pattern='/pull_requests/{pull_request_id:\d+}') | |
41 | config.add_route( |
|
41 | config.add_route( | |
42 | name='pull_requests_global_1', # backward compat |
|
42 | name='pull_requests_global_1', # backward compat | |
43 | pattern='/pull-requests/{pull_request_id:\d+}') |
|
43 | pattern='/pull-requests/{pull_request_id:\d+}') | |
44 | config.add_route( |
|
44 | config.add_route( | |
45 | name='pull_requests_global', |
|
45 | name='pull_requests_global', | |
46 | pattern='/pull-request/{pull_request_id:\d+}') |
|
46 | pattern='/pull-request/{pull_request_id:\d+}') | |
47 |
|
47 | |||
48 | config.add_route( |
|
48 | config.add_route( | |
49 | name='admin_settings_open_source', |
|
49 | name='admin_settings_open_source', | |
50 | pattern='/settings/open_source') |
|
50 | pattern='/settings/open_source') | |
51 | config.add_route( |
|
51 | config.add_route( | |
52 | name='admin_settings_vcs_svn_generate_cfg', |
|
52 | name='admin_settings_vcs_svn_generate_cfg', | |
53 | pattern='/settings/vcs/svn_generate_cfg') |
|
53 | pattern='/settings/vcs/svn_generate_cfg') | |
54 |
|
54 | |||
55 | config.add_route( |
|
55 | config.add_route( | |
56 | name='admin_settings_system', |
|
56 | name='admin_settings_system', | |
57 | pattern='/settings/system') |
|
57 | pattern='/settings/system') | |
58 | config.add_route( |
|
58 | config.add_route( | |
59 | name='admin_settings_system_update', |
|
59 | name='admin_settings_system_update', | |
60 | pattern='/settings/system/updates') |
|
60 | pattern='/settings/system/updates') | |
61 |
|
61 | |||
62 | config.add_route( |
|
62 | config.add_route( | |
63 | name='admin_settings_sessions', |
|
63 | name='admin_settings_sessions', | |
64 | pattern='/settings/sessions') |
|
64 | pattern='/settings/sessions') | |
65 | config.add_route( |
|
65 | config.add_route( | |
66 | name='admin_settings_sessions_cleanup', |
|
66 | name='admin_settings_sessions_cleanup', | |
67 | pattern='/settings/sessions/cleanup') |
|
67 | pattern='/settings/sessions/cleanup') | |
68 |
|
68 | |||
69 | config.add_route( |
|
69 | config.add_route( | |
70 | name='admin_settings_process_management', |
|
70 | name='admin_settings_process_management', | |
71 | pattern='/settings/process_management') |
|
71 | pattern='/settings/process_management') | |
72 | config.add_route( |
|
72 | config.add_route( | |
73 | name='admin_settings_process_management_data', |
|
73 | name='admin_settings_process_management_data', | |
74 | pattern='/settings/process_management/data') |
|
74 | pattern='/settings/process_management/data') | |
75 | config.add_route( |
|
75 | config.add_route( | |
76 | name='admin_settings_process_management_signal', |
|
76 | name='admin_settings_process_management_signal', | |
77 | pattern='/settings/process_management/signal') |
|
77 | pattern='/settings/process_management/signal') | |
|
78 | config.add_route( | |||
|
79 | name='admin_settings_process_management_master_signal', | |||
|
80 | pattern='/settings/process_management/master_signal') | |||
78 |
|
81 | |||
79 | # default settings |
|
82 | # default settings | |
80 | config.add_route( |
|
83 | config.add_route( | |
81 | name='admin_defaults_repositories', |
|
84 | name='admin_defaults_repositories', | |
82 | pattern='/defaults/repositories') |
|
85 | pattern='/defaults/repositories') | |
83 | config.add_route( |
|
86 | config.add_route( | |
84 | name='admin_defaults_repositories_update', |
|
87 | name='admin_defaults_repositories_update', | |
85 | pattern='/defaults/repositories/update') |
|
88 | pattern='/defaults/repositories/update') | |
86 |
|
89 | |||
87 | # admin settings |
|
90 | # admin settings | |
88 |
|
91 | |||
89 | config.add_route( |
|
92 | config.add_route( | |
90 | name='admin_settings', |
|
93 | name='admin_settings', | |
91 | pattern='/settings') |
|
94 | pattern='/settings') | |
92 | config.add_route( |
|
95 | config.add_route( | |
93 | name='admin_settings_update', |
|
96 | name='admin_settings_update', | |
94 | pattern='/settings/update') |
|
97 | pattern='/settings/update') | |
95 |
|
98 | |||
96 | config.add_route( |
|
99 | config.add_route( | |
97 | name='admin_settings_global', |
|
100 | name='admin_settings_global', | |
98 | pattern='/settings/global') |
|
101 | pattern='/settings/global') | |
99 | config.add_route( |
|
102 | config.add_route( | |
100 | name='admin_settings_global_update', |
|
103 | name='admin_settings_global_update', | |
101 | pattern='/settings/global/update') |
|
104 | pattern='/settings/global/update') | |
102 |
|
105 | |||
103 | config.add_route( |
|
106 | config.add_route( | |
104 | name='admin_settings_vcs', |
|
107 | name='admin_settings_vcs', | |
105 | pattern='/settings/vcs') |
|
108 | pattern='/settings/vcs') | |
106 | config.add_route( |
|
109 | config.add_route( | |
107 | name='admin_settings_vcs_update', |
|
110 | name='admin_settings_vcs_update', | |
108 | pattern='/settings/vcs/update') |
|
111 | pattern='/settings/vcs/update') | |
109 | config.add_route( |
|
112 | config.add_route( | |
110 | name='admin_settings_vcs_svn_pattern_delete', |
|
113 | name='admin_settings_vcs_svn_pattern_delete', | |
111 | pattern='/settings/vcs/svn_pattern_delete') |
|
114 | pattern='/settings/vcs/svn_pattern_delete') | |
112 |
|
115 | |||
113 | config.add_route( |
|
116 | config.add_route( | |
114 | name='admin_settings_mapping', |
|
117 | name='admin_settings_mapping', | |
115 | pattern='/settings/mapping') |
|
118 | pattern='/settings/mapping') | |
116 | config.add_route( |
|
119 | config.add_route( | |
117 | name='admin_settings_mapping_update', |
|
120 | name='admin_settings_mapping_update', | |
118 | pattern='/settings/mapping/update') |
|
121 | pattern='/settings/mapping/update') | |
119 |
|
122 | |||
120 | config.add_route( |
|
123 | config.add_route( | |
121 | name='admin_settings_visual', |
|
124 | name='admin_settings_visual', | |
122 | pattern='/settings/visual') |
|
125 | pattern='/settings/visual') | |
123 | config.add_route( |
|
126 | config.add_route( | |
124 | name='admin_settings_visual_update', |
|
127 | name='admin_settings_visual_update', | |
125 | pattern='/settings/visual/update') |
|
128 | pattern='/settings/visual/update') | |
126 |
|
129 | |||
127 |
|
130 | |||
128 | config.add_route( |
|
131 | config.add_route( | |
129 | name='admin_settings_issuetracker', |
|
132 | name='admin_settings_issuetracker', | |
130 | pattern='/settings/issue-tracker') |
|
133 | pattern='/settings/issue-tracker') | |
131 | config.add_route( |
|
134 | config.add_route( | |
132 | name='admin_settings_issuetracker_update', |
|
135 | name='admin_settings_issuetracker_update', | |
133 | pattern='/settings/issue-tracker/update') |
|
136 | pattern='/settings/issue-tracker/update') | |
134 | config.add_route( |
|
137 | config.add_route( | |
135 | name='admin_settings_issuetracker_test', |
|
138 | name='admin_settings_issuetracker_test', | |
136 | pattern='/settings/issue-tracker/test') |
|
139 | pattern='/settings/issue-tracker/test') | |
137 | config.add_route( |
|
140 | config.add_route( | |
138 | name='admin_settings_issuetracker_delete', |
|
141 | name='admin_settings_issuetracker_delete', | |
139 | pattern='/settings/issue-tracker/delete') |
|
142 | pattern='/settings/issue-tracker/delete') | |
140 |
|
143 | |||
141 | config.add_route( |
|
144 | config.add_route( | |
142 | name='admin_settings_email', |
|
145 | name='admin_settings_email', | |
143 | pattern='/settings/email') |
|
146 | pattern='/settings/email') | |
144 | config.add_route( |
|
147 | config.add_route( | |
145 | name='admin_settings_email_update', |
|
148 | name='admin_settings_email_update', | |
146 | pattern='/settings/email/update') |
|
149 | pattern='/settings/email/update') | |
147 |
|
150 | |||
148 | config.add_route( |
|
151 | config.add_route( | |
149 | name='admin_settings_hooks', |
|
152 | name='admin_settings_hooks', | |
150 | pattern='/settings/hooks') |
|
153 | pattern='/settings/hooks') | |
151 | config.add_route( |
|
154 | config.add_route( | |
152 | name='admin_settings_hooks_update', |
|
155 | name='admin_settings_hooks_update', | |
153 | pattern='/settings/hooks/update') |
|
156 | pattern='/settings/hooks/update') | |
154 | config.add_route( |
|
157 | config.add_route( | |
155 | name='admin_settings_hooks_delete', |
|
158 | name='admin_settings_hooks_delete', | |
156 | pattern='/settings/hooks/delete') |
|
159 | pattern='/settings/hooks/delete') | |
157 |
|
160 | |||
158 | config.add_route( |
|
161 | config.add_route( | |
159 | name='admin_settings_search', |
|
162 | name='admin_settings_search', | |
160 | pattern='/settings/search') |
|
163 | pattern='/settings/search') | |
161 |
|
164 | |||
162 | config.add_route( |
|
165 | config.add_route( | |
163 | name='admin_settings_labs', |
|
166 | name='admin_settings_labs', | |
164 | pattern='/settings/labs') |
|
167 | pattern='/settings/labs') | |
165 | config.add_route( |
|
168 | config.add_route( | |
166 | name='admin_settings_labs_update', |
|
169 | name='admin_settings_labs_update', | |
167 | pattern='/settings/labs/update') |
|
170 | pattern='/settings/labs/update') | |
168 |
|
171 | |||
169 | # global permissions |
|
172 | # global permissions | |
170 |
|
173 | |||
171 | config.add_route( |
|
174 | config.add_route( | |
172 | name='admin_permissions_application', |
|
175 | name='admin_permissions_application', | |
173 | pattern='/permissions/application') |
|
176 | pattern='/permissions/application') | |
174 | config.add_route( |
|
177 | config.add_route( | |
175 | name='admin_permissions_application_update', |
|
178 | name='admin_permissions_application_update', | |
176 | pattern='/permissions/application/update') |
|
179 | pattern='/permissions/application/update') | |
177 |
|
180 | |||
178 | config.add_route( |
|
181 | config.add_route( | |
179 | name='admin_permissions_global', |
|
182 | name='admin_permissions_global', | |
180 | pattern='/permissions/global') |
|
183 | pattern='/permissions/global') | |
181 | config.add_route( |
|
184 | config.add_route( | |
182 | name='admin_permissions_global_update', |
|
185 | name='admin_permissions_global_update', | |
183 | pattern='/permissions/global/update') |
|
186 | pattern='/permissions/global/update') | |
184 |
|
187 | |||
185 | config.add_route( |
|
188 | config.add_route( | |
186 | name='admin_permissions_object', |
|
189 | name='admin_permissions_object', | |
187 | pattern='/permissions/object') |
|
190 | pattern='/permissions/object') | |
188 | config.add_route( |
|
191 | config.add_route( | |
189 | name='admin_permissions_object_update', |
|
192 | name='admin_permissions_object_update', | |
190 | pattern='/permissions/object/update') |
|
193 | pattern='/permissions/object/update') | |
191 |
|
194 | |||
192 | config.add_route( |
|
195 | config.add_route( | |
193 | name='admin_permissions_ips', |
|
196 | name='admin_permissions_ips', | |
194 | pattern='/permissions/ips') |
|
197 | pattern='/permissions/ips') | |
195 |
|
198 | |||
196 | config.add_route( |
|
199 | config.add_route( | |
197 | name='admin_permissions_overview', |
|
200 | name='admin_permissions_overview', | |
198 | pattern='/permissions/overview') |
|
201 | pattern='/permissions/overview') | |
199 |
|
202 | |||
200 | config.add_route( |
|
203 | config.add_route( | |
201 | name='admin_permissions_auth_token_access', |
|
204 | name='admin_permissions_auth_token_access', | |
202 | pattern='/permissions/auth_token_access') |
|
205 | pattern='/permissions/auth_token_access') | |
203 |
|
206 | |||
204 | config.add_route( |
|
207 | config.add_route( | |
205 | name='admin_permissions_ssh_keys', |
|
208 | name='admin_permissions_ssh_keys', | |
206 | pattern='/permissions/ssh_keys') |
|
209 | pattern='/permissions/ssh_keys') | |
207 | config.add_route( |
|
210 | config.add_route( | |
208 | name='admin_permissions_ssh_keys_data', |
|
211 | name='admin_permissions_ssh_keys_data', | |
209 | pattern='/permissions/ssh_keys/data') |
|
212 | pattern='/permissions/ssh_keys/data') | |
210 | config.add_route( |
|
213 | config.add_route( | |
211 | name='admin_permissions_ssh_keys_update', |
|
214 | name='admin_permissions_ssh_keys_update', | |
212 | pattern='/permissions/ssh_keys/update') |
|
215 | pattern='/permissions/ssh_keys/update') | |
213 |
|
216 | |||
214 | # users admin |
|
217 | # users admin | |
215 | config.add_route( |
|
218 | config.add_route( | |
216 | name='users', |
|
219 | name='users', | |
217 | pattern='/users') |
|
220 | pattern='/users') | |
218 |
|
221 | |||
219 | config.add_route( |
|
222 | config.add_route( | |
220 | name='users_data', |
|
223 | name='users_data', | |
221 | pattern='/users_data') |
|
224 | pattern='/users_data') | |
222 |
|
225 | |||
223 | config.add_route( |
|
226 | config.add_route( | |
224 | name='users_create', |
|
227 | name='users_create', | |
225 | pattern='/users/create') |
|
228 | pattern='/users/create') | |
226 |
|
229 | |||
227 | config.add_route( |
|
230 | config.add_route( | |
228 | name='users_new', |
|
231 | name='users_new', | |
229 | pattern='/users/new') |
|
232 | pattern='/users/new') | |
230 |
|
233 | |||
231 | # user management |
|
234 | # user management | |
232 | config.add_route( |
|
235 | config.add_route( | |
233 | name='user_edit', |
|
236 | name='user_edit', | |
234 | pattern='/users/{user_id:\d+}/edit', |
|
237 | pattern='/users/{user_id:\d+}/edit', | |
235 | user_route=True) |
|
238 | user_route=True) | |
236 | config.add_route( |
|
239 | config.add_route( | |
237 | name='user_edit_advanced', |
|
240 | name='user_edit_advanced', | |
238 | pattern='/users/{user_id:\d+}/edit/advanced', |
|
241 | pattern='/users/{user_id:\d+}/edit/advanced', | |
239 | user_route=True) |
|
242 | user_route=True) | |
240 | config.add_route( |
|
243 | config.add_route( | |
241 | name='user_edit_global_perms', |
|
244 | name='user_edit_global_perms', | |
242 | pattern='/users/{user_id:\d+}/edit/global_permissions', |
|
245 | pattern='/users/{user_id:\d+}/edit/global_permissions', | |
243 | user_route=True) |
|
246 | user_route=True) | |
244 | config.add_route( |
|
247 | config.add_route( | |
245 | name='user_edit_global_perms_update', |
|
248 | name='user_edit_global_perms_update', | |
246 | pattern='/users/{user_id:\d+}/edit/global_permissions/update', |
|
249 | pattern='/users/{user_id:\d+}/edit/global_permissions/update', | |
247 | user_route=True) |
|
250 | user_route=True) | |
248 | config.add_route( |
|
251 | config.add_route( | |
249 | name='user_update', |
|
252 | name='user_update', | |
250 | pattern='/users/{user_id:\d+}/update', |
|
253 | pattern='/users/{user_id:\d+}/update', | |
251 | user_route=True) |
|
254 | user_route=True) | |
252 | config.add_route( |
|
255 | config.add_route( | |
253 | name='user_delete', |
|
256 | name='user_delete', | |
254 | pattern='/users/{user_id:\d+}/delete', |
|
257 | pattern='/users/{user_id:\d+}/delete', | |
255 | user_route=True) |
|
258 | user_route=True) | |
256 | config.add_route( |
|
259 | config.add_route( | |
257 | name='user_force_password_reset', |
|
260 | name='user_force_password_reset', | |
258 | pattern='/users/{user_id:\d+}/password_reset', |
|
261 | pattern='/users/{user_id:\d+}/password_reset', | |
259 | user_route=True) |
|
262 | user_route=True) | |
260 | config.add_route( |
|
263 | config.add_route( | |
261 | name='user_create_personal_repo_group', |
|
264 | name='user_create_personal_repo_group', | |
262 | pattern='/users/{user_id:\d+}/create_repo_group', |
|
265 | pattern='/users/{user_id:\d+}/create_repo_group', | |
263 | user_route=True) |
|
266 | user_route=True) | |
264 |
|
267 | |||
265 | # user auth tokens |
|
268 | # user auth tokens | |
266 | config.add_route( |
|
269 | config.add_route( | |
267 | name='edit_user_auth_tokens', |
|
270 | name='edit_user_auth_tokens', | |
268 | pattern='/users/{user_id:\d+}/edit/auth_tokens', |
|
271 | pattern='/users/{user_id:\d+}/edit/auth_tokens', | |
269 | user_route=True) |
|
272 | user_route=True) | |
270 | config.add_route( |
|
273 | config.add_route( | |
271 | name='edit_user_auth_tokens_add', |
|
274 | name='edit_user_auth_tokens_add', | |
272 | pattern='/users/{user_id:\d+}/edit/auth_tokens/new', |
|
275 | pattern='/users/{user_id:\d+}/edit/auth_tokens/new', | |
273 | user_route=True) |
|
276 | user_route=True) | |
274 | config.add_route( |
|
277 | config.add_route( | |
275 | name='edit_user_auth_tokens_delete', |
|
278 | name='edit_user_auth_tokens_delete', | |
276 | pattern='/users/{user_id:\d+}/edit/auth_tokens/delete', |
|
279 | pattern='/users/{user_id:\d+}/edit/auth_tokens/delete', | |
277 | user_route=True) |
|
280 | user_route=True) | |
278 |
|
281 | |||
279 | # user ssh keys |
|
282 | # user ssh keys | |
280 | config.add_route( |
|
283 | config.add_route( | |
281 | name='edit_user_ssh_keys', |
|
284 | name='edit_user_ssh_keys', | |
282 | pattern='/users/{user_id:\d+}/edit/ssh_keys', |
|
285 | pattern='/users/{user_id:\d+}/edit/ssh_keys', | |
283 | user_route=True) |
|
286 | user_route=True) | |
284 | config.add_route( |
|
287 | config.add_route( | |
285 | name='edit_user_ssh_keys_generate_keypair', |
|
288 | name='edit_user_ssh_keys_generate_keypair', | |
286 | pattern='/users/{user_id:\d+}/edit/ssh_keys/generate', |
|
289 | pattern='/users/{user_id:\d+}/edit/ssh_keys/generate', | |
287 | user_route=True) |
|
290 | user_route=True) | |
288 | config.add_route( |
|
291 | config.add_route( | |
289 | name='edit_user_ssh_keys_add', |
|
292 | name='edit_user_ssh_keys_add', | |
290 | pattern='/users/{user_id:\d+}/edit/ssh_keys/new', |
|
293 | pattern='/users/{user_id:\d+}/edit/ssh_keys/new', | |
291 | user_route=True) |
|
294 | user_route=True) | |
292 | config.add_route( |
|
295 | config.add_route( | |
293 | name='edit_user_ssh_keys_delete', |
|
296 | name='edit_user_ssh_keys_delete', | |
294 | pattern='/users/{user_id:\d+}/edit/ssh_keys/delete', |
|
297 | pattern='/users/{user_id:\d+}/edit/ssh_keys/delete', | |
295 | user_route=True) |
|
298 | user_route=True) | |
296 |
|
299 | |||
297 | # user emails |
|
300 | # user emails | |
298 | config.add_route( |
|
301 | config.add_route( | |
299 | name='edit_user_emails', |
|
302 | name='edit_user_emails', | |
300 | pattern='/users/{user_id:\d+}/edit/emails', |
|
303 | pattern='/users/{user_id:\d+}/edit/emails', | |
301 | user_route=True) |
|
304 | user_route=True) | |
302 | config.add_route( |
|
305 | config.add_route( | |
303 | name='edit_user_emails_add', |
|
306 | name='edit_user_emails_add', | |
304 | pattern='/users/{user_id:\d+}/edit/emails/new', |
|
307 | pattern='/users/{user_id:\d+}/edit/emails/new', | |
305 | user_route=True) |
|
308 | user_route=True) | |
306 | config.add_route( |
|
309 | config.add_route( | |
307 | name='edit_user_emails_delete', |
|
310 | name='edit_user_emails_delete', | |
308 | pattern='/users/{user_id:\d+}/edit/emails/delete', |
|
311 | pattern='/users/{user_id:\d+}/edit/emails/delete', | |
309 | user_route=True) |
|
312 | user_route=True) | |
310 |
|
313 | |||
311 | # user IPs |
|
314 | # user IPs | |
312 | config.add_route( |
|
315 | config.add_route( | |
313 | name='edit_user_ips', |
|
316 | name='edit_user_ips', | |
314 | pattern='/users/{user_id:\d+}/edit/ips', |
|
317 | pattern='/users/{user_id:\d+}/edit/ips', | |
315 | user_route=True) |
|
318 | user_route=True) | |
316 | config.add_route( |
|
319 | config.add_route( | |
317 | name='edit_user_ips_add', |
|
320 | name='edit_user_ips_add', | |
318 | pattern='/users/{user_id:\d+}/edit/ips/new', |
|
321 | pattern='/users/{user_id:\d+}/edit/ips/new', | |
319 | user_route_with_default=True) # enabled for default user too |
|
322 | user_route_with_default=True) # enabled for default user too | |
320 | config.add_route( |
|
323 | config.add_route( | |
321 | name='edit_user_ips_delete', |
|
324 | name='edit_user_ips_delete', | |
322 | pattern='/users/{user_id:\d+}/edit/ips/delete', |
|
325 | pattern='/users/{user_id:\d+}/edit/ips/delete', | |
323 | user_route_with_default=True) # enabled for default user too |
|
326 | user_route_with_default=True) # enabled for default user too | |
324 |
|
327 | |||
325 | # user perms |
|
328 | # user perms | |
326 | config.add_route( |
|
329 | config.add_route( | |
327 | name='edit_user_perms_summary', |
|
330 | name='edit_user_perms_summary', | |
328 | pattern='/users/{user_id:\d+}/edit/permissions_summary', |
|
331 | pattern='/users/{user_id:\d+}/edit/permissions_summary', | |
329 | user_route=True) |
|
332 | user_route=True) | |
330 | config.add_route( |
|
333 | config.add_route( | |
331 | name='edit_user_perms_summary_json', |
|
334 | name='edit_user_perms_summary_json', | |
332 | pattern='/users/{user_id:\d+}/edit/permissions_summary/json', |
|
335 | pattern='/users/{user_id:\d+}/edit/permissions_summary/json', | |
333 | user_route=True) |
|
336 | user_route=True) | |
334 |
|
337 | |||
335 | # user user groups management |
|
338 | # user user groups management | |
336 | config.add_route( |
|
339 | config.add_route( | |
337 | name='edit_user_groups_management', |
|
340 | name='edit_user_groups_management', | |
338 | pattern='/users/{user_id:\d+}/edit/groups_management', |
|
341 | pattern='/users/{user_id:\d+}/edit/groups_management', | |
339 | user_route=True) |
|
342 | user_route=True) | |
340 |
|
343 | |||
341 | config.add_route( |
|
344 | config.add_route( | |
342 | name='edit_user_groups_management_updates', |
|
345 | name='edit_user_groups_management_updates', | |
343 | pattern='/users/{user_id:\d+}/edit/edit_user_groups_management/updates', |
|
346 | pattern='/users/{user_id:\d+}/edit/edit_user_groups_management/updates', | |
344 | user_route=True) |
|
347 | user_route=True) | |
345 |
|
348 | |||
346 | # user audit logs |
|
349 | # user audit logs | |
347 | config.add_route( |
|
350 | config.add_route( | |
348 | name='edit_user_audit_logs', |
|
351 | name='edit_user_audit_logs', | |
349 | pattern='/users/{user_id:\d+}/edit/audit', user_route=True) |
|
352 | pattern='/users/{user_id:\d+}/edit/audit', user_route=True) | |
350 |
|
353 | |||
351 | # user-groups admin |
|
354 | # user-groups admin | |
352 | config.add_route( |
|
355 | config.add_route( | |
353 | name='user_groups', |
|
356 | name='user_groups', | |
354 | pattern='/user_groups') |
|
357 | pattern='/user_groups') | |
355 |
|
358 | |||
356 | config.add_route( |
|
359 | config.add_route( | |
357 | name='user_groups_data', |
|
360 | name='user_groups_data', | |
358 | pattern='/user_groups_data') |
|
361 | pattern='/user_groups_data') | |
359 |
|
362 | |||
360 | config.add_route( |
|
363 | config.add_route( | |
361 | name='user_groups_new', |
|
364 | name='user_groups_new', | |
362 | pattern='/user_groups/new') |
|
365 | pattern='/user_groups/new') | |
363 |
|
366 | |||
364 | config.add_route( |
|
367 | config.add_route( | |
365 | name='user_groups_create', |
|
368 | name='user_groups_create', | |
366 | pattern='/user_groups/create') |
|
369 | pattern='/user_groups/create') | |
367 |
|
370 | |||
368 | # repos admin |
|
371 | # repos admin | |
369 | config.add_route( |
|
372 | config.add_route( | |
370 | name='repos', |
|
373 | name='repos', | |
371 | pattern='/repos') |
|
374 | pattern='/repos') | |
372 |
|
375 | |||
373 | config.add_route( |
|
376 | config.add_route( | |
374 | name='repo_new', |
|
377 | name='repo_new', | |
375 | pattern='/repos/new') |
|
378 | pattern='/repos/new') | |
376 |
|
379 | |||
377 | config.add_route( |
|
380 | config.add_route( | |
378 | name='repo_create', |
|
381 | name='repo_create', | |
379 | pattern='/repos/create') |
|
382 | pattern='/repos/create') | |
380 |
|
383 | |||
381 | # repo groups admin |
|
384 | # repo groups admin | |
382 | config.add_route( |
|
385 | config.add_route( | |
383 | name='repo_groups', |
|
386 | name='repo_groups', | |
384 | pattern='/repo_groups') |
|
387 | pattern='/repo_groups') | |
385 |
|
388 | |||
386 | config.add_route( |
|
389 | config.add_route( | |
387 | name='repo_group_new', |
|
390 | name='repo_group_new', | |
388 | pattern='/repo_group/new') |
|
391 | pattern='/repo_group/new') | |
389 |
|
392 | |||
390 | config.add_route( |
|
393 | config.add_route( | |
391 | name='repo_group_create', |
|
394 | name='repo_group_create', | |
392 | pattern='/repo_group/create') |
|
395 | pattern='/repo_group/create') | |
393 |
|
396 | |||
394 |
|
397 | |||
395 | def includeme(config): |
|
398 | def includeme(config): | |
396 | from rhodecode.apps.admin.navigation import includeme as nav_includeme |
|
399 | from rhodecode.apps.admin.navigation import includeme as nav_includeme | |
397 |
|
400 | |||
398 | # Create admin navigation registry and add it to the pyramid registry. |
|
401 | # Create admin navigation registry and add it to the pyramid registry. | |
399 | nav_includeme(config) |
|
402 | nav_includeme(config) | |
400 |
|
403 | |||
401 | # main admin routes |
|
404 | # main admin routes | |
402 | config.add_route(name='admin_home', pattern=ADMIN_PREFIX) |
|
405 | config.add_route(name='admin_home', pattern=ADMIN_PREFIX) | |
403 | config.include(admin_routes, route_prefix=ADMIN_PREFIX) |
|
406 | config.include(admin_routes, route_prefix=ADMIN_PREFIX) | |
404 |
|
407 | |||
405 | # Scan module for configuration decorators. |
|
408 | # Scan module for configuration decorators. | |
406 | config.scan('.views', ignore='.tests') |
|
409 | config.scan('.views', ignore='.tests') |
@@ -1,103 +1,133 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | # Copyright (C) 2016-2018 RhodeCode GmbH |
|
3 | # Copyright (C) 2016-2018 RhodeCode GmbH | |
4 | # |
|
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify |
|
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
7 | # (only), as published by the Free Software Foundation. |
|
7 | # (only), as published by the Free Software Foundation. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU Affero General Public License |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | # |
|
16 | # | |
17 | # This program is dual-licensed. If you wish to learn more about the |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
20 |
|
20 | |||
21 | import logging |
|
21 | import logging | |
22 |
|
22 | |||
23 | import psutil |
|
23 | import psutil | |
|
24 | import signal | |||
24 | from pyramid.view import view_config |
|
25 | from pyramid.view import view_config | |
25 |
|
26 | |||
26 | from rhodecode.apps._base import BaseAppView |
|
27 | from rhodecode.apps._base import BaseAppView | |
27 | from rhodecode.apps.admin.navigation import navigation_list |
|
28 | from rhodecode.apps.admin.navigation import navigation_list | |
28 | from rhodecode.lib.auth import ( |
|
29 | from rhodecode.lib.auth import ( | |
29 | LoginRequired, HasPermissionAllDecorator, CSRFRequired) |
|
30 | LoginRequired, HasPermissionAllDecorator, CSRFRequired) | |
30 | from rhodecode.lib.utils2 import safe_int |
|
31 | from rhodecode.lib.utils2 import safe_int | |
31 |
|
32 | |||
32 | log = logging.getLogger(__name__) |
|
33 | log = logging.getLogger(__name__) | |
33 |
|
34 | |||
34 |
|
35 | |||
35 | class AdminProcessManagementView(BaseAppView): |
|
36 | class AdminProcessManagementView(BaseAppView): | |
36 | def load_default_context(self): |
|
37 | def load_default_context(self): | |
37 | c = self._get_local_tmpl_context() |
|
38 | c = self._get_local_tmpl_context() | |
38 |
|
39 | |||
39 | return c |
|
40 | return c | |
40 |
|
41 | |||
41 | @LoginRequired() |
|
42 | @LoginRequired() | |
42 | @HasPermissionAllDecorator('hg.admin') |
|
43 | @HasPermissionAllDecorator('hg.admin') | |
43 | @view_config( |
|
44 | @view_config( | |
44 | route_name='admin_settings_process_management', request_method='GET', |
|
45 | route_name='admin_settings_process_management', request_method='GET', | |
45 | renderer='rhodecode:templates/admin/settings/settings.mako') |
|
46 | renderer='rhodecode:templates/admin/settings/settings.mako') | |
46 | def process_management(self): |
|
47 | def process_management(self): | |
47 | _ = self.request.translate |
|
48 | _ = self.request.translate | |
48 | c = self.load_default_context() |
|
49 | c = self.load_default_context() | |
49 |
|
50 | |||
50 | c.active = 'process_management' |
|
51 | c.active = 'process_management' | |
51 | c.navlist = navigation_list(self.request) |
|
52 | c.navlist = navigation_list(self.request) | |
52 | c.gunicorn_processes = ( |
|
53 | c.gunicorn_processes = ( | |
53 | p for p in psutil.process_iter() if 'gunicorn' in p.name()) |
|
54 | p for p in psutil.process_iter() if 'gunicorn' in p.name()) | |
54 | return self._get_template_context(c) |
|
55 | return self._get_template_context(c) | |
55 |
|
56 | |||
56 | @LoginRequired() |
|
57 | @LoginRequired() | |
57 | @HasPermissionAllDecorator('hg.admin') |
|
58 | @HasPermissionAllDecorator('hg.admin') | |
58 | @view_config( |
|
59 | @view_config( | |
59 | route_name='admin_settings_process_management_data', request_method='GET', |
|
60 | route_name='admin_settings_process_management_data', request_method='GET', | |
60 | renderer='rhodecode:templates/admin/settings/settings_process_management_data.mako') |
|
61 | renderer='rhodecode:templates/admin/settings/settings_process_management_data.mako') | |
61 | def process_management_data(self): |
|
62 | def process_management_data(self): | |
62 | _ = self.request.translate |
|
63 | _ = self.request.translate | |
63 | c = self.load_default_context() |
|
64 | c = self.load_default_context() | |
64 | c.gunicorn_processes = ( |
|
65 | c.gunicorn_processes = ( | |
65 | p for p in psutil.process_iter() if 'gunicorn' in p.name()) |
|
66 | p for p in psutil.process_iter() if 'gunicorn' in p.name()) | |
66 | return self._get_template_context(c) |
|
67 | return self._get_template_context(c) | |
67 |
|
68 | |||
68 | @LoginRequired() |
|
69 | @LoginRequired() | |
69 | @HasPermissionAllDecorator('hg.admin') |
|
70 | @HasPermissionAllDecorator('hg.admin') | |
70 | @CSRFRequired() |
|
71 | @CSRFRequired() | |
71 | @view_config( |
|
72 | @view_config( | |
72 | route_name='admin_settings_process_management_signal', |
|
73 | route_name='admin_settings_process_management_signal', | |
73 | request_method='POST', renderer='json_ext') |
|
74 | request_method='POST', renderer='json_ext') | |
74 | def process_management_signal(self): |
|
75 | def process_management_signal(self): | |
75 | pids = self.request.json.get('pids', []) |
|
76 | pids = self.request.json.get('pids', []) | |
76 | result = [] |
|
77 | result = [] | |
77 | def on_terminate(proc): |
|
78 | def on_terminate(proc): | |
78 | msg = "process `PID:{}` terminated with exit code {}".format( |
|
79 | msg = "process `PID:{}` terminated with exit code {}".format( | |
79 | proc.pid, proc.returncode) |
|
80 | proc.pid, proc.returncode) | |
80 | result.append(msg) |
|
81 | result.append(msg) | |
81 |
|
82 | |||
82 | procs = [] |
|
83 | procs = [] | |
83 | for pid in pids: |
|
84 | for pid in pids: | |
84 | pid = safe_int(pid) |
|
85 | pid = safe_int(pid) | |
85 | if pid: |
|
86 | if pid: | |
86 | try: |
|
87 | try: | |
87 | proc = psutil.Process(pid) |
|
88 | proc = psutil.Process(pid) | |
88 | except psutil.NoSuchProcess: |
|
89 | except psutil.NoSuchProcess: | |
89 | continue |
|
90 | continue | |
90 |
|
91 | |||
91 | children = proc.children(recursive=True) |
|
92 | children = proc.children(recursive=True) | |
92 | if children: |
|
93 | if children: | |
93 | print('Wont kill Master Process') |
|
94 | print('Wont kill Master Process') | |
94 | else: |
|
95 | else: | |
95 | procs.append(proc) |
|
96 | procs.append(proc) | |
96 |
|
97 | |||
97 | for p in procs: |
|
98 | for p in procs: | |
98 | p.terminate() |
|
99 | p.terminate() | |
99 | gone, alive = psutil.wait_procs(procs, timeout=10, callback=on_terminate) |
|
100 | gone, alive = psutil.wait_procs(procs, timeout=10, callback=on_terminate) | |
100 | for p in alive: |
|
101 | for p in alive: | |
101 | p.kill() |
|
102 | p.kill() | |
102 |
|
103 | |||
103 | return {'result': result} |
|
104 | return {'result': result} | |
|
105 | ||||
|
106 | @LoginRequired() | |||
|
107 | @HasPermissionAllDecorator('hg.admin') | |||
|
108 | @CSRFRequired() | |||
|
109 | @view_config( | |||
|
110 | route_name='admin_settings_process_management_master_signal', | |||
|
111 | request_method='POST', renderer='json_ext') | |||
|
112 | def process_management_master_signal(self): | |||
|
113 | pid_data = self.request.json.get('pid_data', {}) | |||
|
114 | pid = safe_int(pid_data['pid']) | |||
|
115 | action = pid_data['action'] | |||
|
116 | if pid: | |||
|
117 | try: | |||
|
118 | proc = psutil.Process(pid) | |||
|
119 | except psutil.NoSuchProcess: | |||
|
120 | return {'result': 'failure_no_such_process'} | |||
|
121 | ||||
|
122 | children = proc.children(recursive=True) | |||
|
123 | if children: | |||
|
124 | # master process | |||
|
125 | if action == '+' and len(children) <= 20: | |||
|
126 | proc.send_signal(signal.SIGTTIN) | |||
|
127 | elif action == '-' and len(children) >= 2: | |||
|
128 | proc.send_signal(signal.SIGTTOU) | |||
|
129 | else: | |||
|
130 | return {'result': 'failure_wrong_action'} | |||
|
131 | return {'result': 'success'} | |||
|
132 | ||||
|
133 | return {'result': 'failure_not_master'} |
@@ -1,318 +1,319 b'' | |||||
1 |
|
1 | |||
2 | /****************************************************************************** |
|
2 | /****************************************************************************** | |
3 | * * |
|
3 | * * | |
4 | * DO NOT CHANGE THIS FILE MANUALLY * |
|
4 | * DO NOT CHANGE THIS FILE MANUALLY * | |
5 | * * |
|
5 | * * | |
6 | * * |
|
6 | * * | |
7 | * This file is automatically generated when the app starts up with * |
|
7 | * This file is automatically generated when the app starts up with * | |
8 | * generate_js_files = true * |
|
8 | * generate_js_files = true * | |
9 | * * |
|
9 | * * | |
10 | * To add a route here pass jsroute=True to the route definition in the app * |
|
10 | * To add a route here pass jsroute=True to the route definition in the app * | |
11 | * * |
|
11 | * * | |
12 | ******************************************************************************/ |
|
12 | ******************************************************************************/ | |
13 | function registerRCRoutes() { |
|
13 | function registerRCRoutes() { | |
14 | // routes registration |
|
14 | // routes registration | |
15 | pyroutes.register('favicon', '/favicon.ico', []); |
|
15 | pyroutes.register('favicon', '/favicon.ico', []); | |
16 | pyroutes.register('robots', '/robots.txt', []); |
|
16 | pyroutes.register('robots', '/robots.txt', []); | |
17 | pyroutes.register('auth_home', '/_admin/auth*traverse', []); |
|
17 | pyroutes.register('auth_home', '/_admin/auth*traverse', []); | |
18 | pyroutes.register('global_integrations_new', '/_admin/integrations/new', []); |
|
18 | pyroutes.register('global_integrations_new', '/_admin/integrations/new', []); | |
19 | pyroutes.register('global_integrations_home', '/_admin/integrations', []); |
|
19 | pyroutes.register('global_integrations_home', '/_admin/integrations', []); | |
20 | pyroutes.register('global_integrations_list', '/_admin/integrations/%(integration)s', ['integration']); |
|
20 | pyroutes.register('global_integrations_list', '/_admin/integrations/%(integration)s', ['integration']); | |
21 | pyroutes.register('global_integrations_create', '/_admin/integrations/%(integration)s/new', ['integration']); |
|
21 | pyroutes.register('global_integrations_create', '/_admin/integrations/%(integration)s/new', ['integration']); | |
22 | pyroutes.register('global_integrations_edit', '/_admin/integrations/%(integration)s/%(integration_id)s', ['integration', 'integration_id']); |
|
22 | pyroutes.register('global_integrations_edit', '/_admin/integrations/%(integration)s/%(integration_id)s', ['integration', 'integration_id']); | |
23 | pyroutes.register('repo_group_integrations_home', '/%(repo_group_name)s/_settings/integrations', ['repo_group_name']); |
|
23 | pyroutes.register('repo_group_integrations_home', '/%(repo_group_name)s/_settings/integrations', ['repo_group_name']); | |
24 | pyroutes.register('repo_group_integrations_new', '/%(repo_group_name)s/_settings/integrations/new', ['repo_group_name']); |
|
24 | pyroutes.register('repo_group_integrations_new', '/%(repo_group_name)s/_settings/integrations/new', ['repo_group_name']); | |
25 | pyroutes.register('repo_group_integrations_list', '/%(repo_group_name)s/_settings/integrations/%(integration)s', ['repo_group_name', 'integration']); |
|
25 | pyroutes.register('repo_group_integrations_list', '/%(repo_group_name)s/_settings/integrations/%(integration)s', ['repo_group_name', 'integration']); | |
26 | pyroutes.register('repo_group_integrations_create', '/%(repo_group_name)s/_settings/integrations/%(integration)s/new', ['repo_group_name', 'integration']); |
|
26 | pyroutes.register('repo_group_integrations_create', '/%(repo_group_name)s/_settings/integrations/%(integration)s/new', ['repo_group_name', 'integration']); | |
27 | pyroutes.register('repo_group_integrations_edit', '/%(repo_group_name)s/_settings/integrations/%(integration)s/%(integration_id)s', ['repo_group_name', 'integration', 'integration_id']); |
|
27 | pyroutes.register('repo_group_integrations_edit', '/%(repo_group_name)s/_settings/integrations/%(integration)s/%(integration_id)s', ['repo_group_name', 'integration', 'integration_id']); | |
28 | pyroutes.register('repo_integrations_home', '/%(repo_name)s/settings/integrations', ['repo_name']); |
|
28 | pyroutes.register('repo_integrations_home', '/%(repo_name)s/settings/integrations', ['repo_name']); | |
29 | pyroutes.register('repo_integrations_new', '/%(repo_name)s/settings/integrations/new', ['repo_name']); |
|
29 | pyroutes.register('repo_integrations_new', '/%(repo_name)s/settings/integrations/new', ['repo_name']); | |
30 | pyroutes.register('repo_integrations_list', '/%(repo_name)s/settings/integrations/%(integration)s', ['repo_name', 'integration']); |
|
30 | pyroutes.register('repo_integrations_list', '/%(repo_name)s/settings/integrations/%(integration)s', ['repo_name', 'integration']); | |
31 | pyroutes.register('repo_integrations_create', '/%(repo_name)s/settings/integrations/%(integration)s/new', ['repo_name', 'integration']); |
|
31 | pyroutes.register('repo_integrations_create', '/%(repo_name)s/settings/integrations/%(integration)s/new', ['repo_name', 'integration']); | |
32 | pyroutes.register('repo_integrations_edit', '/%(repo_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_name', 'integration', 'integration_id']); |
|
32 | pyroutes.register('repo_integrations_edit', '/%(repo_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_name', 'integration', 'integration_id']); | |
33 | pyroutes.register('ops_ping', '/_admin/ops/ping', []); |
|
33 | pyroutes.register('ops_ping', '/_admin/ops/ping', []); | |
34 | pyroutes.register('ops_error_test', '/_admin/ops/error', []); |
|
34 | pyroutes.register('ops_error_test', '/_admin/ops/error', []); | |
35 | pyroutes.register('ops_redirect_test', '/_admin/ops/redirect', []); |
|
35 | pyroutes.register('ops_redirect_test', '/_admin/ops/redirect', []); | |
36 | pyroutes.register('ops_ping_legacy', '/_admin/ping', []); |
|
36 | pyroutes.register('ops_ping_legacy', '/_admin/ping', []); | |
37 | pyroutes.register('ops_error_test_legacy', '/_admin/error_test', []); |
|
37 | pyroutes.register('ops_error_test_legacy', '/_admin/error_test', []); | |
38 | pyroutes.register('admin_home', '/_admin', []); |
|
38 | pyroutes.register('admin_home', '/_admin', []); | |
39 | pyroutes.register('admin_audit_logs', '/_admin/audit_logs', []); |
|
39 | pyroutes.register('admin_audit_logs', '/_admin/audit_logs', []); | |
40 | pyroutes.register('admin_audit_log_entry', '/_admin/audit_logs/%(audit_log_id)s', ['audit_log_id']); |
|
40 | pyroutes.register('admin_audit_log_entry', '/_admin/audit_logs/%(audit_log_id)s', ['audit_log_id']); | |
41 | pyroutes.register('pull_requests_global_0', '/_admin/pull_requests/%(pull_request_id)s', ['pull_request_id']); |
|
41 | pyroutes.register('pull_requests_global_0', '/_admin/pull_requests/%(pull_request_id)s', ['pull_request_id']); | |
42 | pyroutes.register('pull_requests_global_1', '/_admin/pull-requests/%(pull_request_id)s', ['pull_request_id']); |
|
42 | pyroutes.register('pull_requests_global_1', '/_admin/pull-requests/%(pull_request_id)s', ['pull_request_id']); | |
43 | pyroutes.register('pull_requests_global', '/_admin/pull-request/%(pull_request_id)s', ['pull_request_id']); |
|
43 | pyroutes.register('pull_requests_global', '/_admin/pull-request/%(pull_request_id)s', ['pull_request_id']); | |
44 | pyroutes.register('admin_settings_open_source', '/_admin/settings/open_source', []); |
|
44 | pyroutes.register('admin_settings_open_source', '/_admin/settings/open_source', []); | |
45 | pyroutes.register('admin_settings_vcs_svn_generate_cfg', '/_admin/settings/vcs/svn_generate_cfg', []); |
|
45 | pyroutes.register('admin_settings_vcs_svn_generate_cfg', '/_admin/settings/vcs/svn_generate_cfg', []); | |
46 | pyroutes.register('admin_settings_system', '/_admin/settings/system', []); |
|
46 | pyroutes.register('admin_settings_system', '/_admin/settings/system', []); | |
47 | pyroutes.register('admin_settings_system_update', '/_admin/settings/system/updates', []); |
|
47 | pyroutes.register('admin_settings_system_update', '/_admin/settings/system/updates', []); | |
48 | pyroutes.register('admin_settings_sessions', '/_admin/settings/sessions', []); |
|
48 | pyroutes.register('admin_settings_sessions', '/_admin/settings/sessions', []); | |
49 | pyroutes.register('admin_settings_sessions_cleanup', '/_admin/settings/sessions/cleanup', []); |
|
49 | pyroutes.register('admin_settings_sessions_cleanup', '/_admin/settings/sessions/cleanup', []); | |
50 | pyroutes.register('admin_settings_process_management', '/_admin/settings/process_management', []); |
|
50 | pyroutes.register('admin_settings_process_management', '/_admin/settings/process_management', []); | |
51 | pyroutes.register('admin_settings_process_management_data', '/_admin/settings/process_management/data', []); |
|
51 | pyroutes.register('admin_settings_process_management_data', '/_admin/settings/process_management/data', []); | |
52 | pyroutes.register('admin_settings_process_management_signal', '/_admin/settings/process_management/signal', []); |
|
52 | pyroutes.register('admin_settings_process_management_signal', '/_admin/settings/process_management/signal', []); | |
|
53 | pyroutes.register('admin_settings_process_management_master_signal', '/_admin/settings/process_management/master_signal', []); | |||
53 | pyroutes.register('admin_defaults_repositories', '/_admin/defaults/repositories', []); |
|
54 | pyroutes.register('admin_defaults_repositories', '/_admin/defaults/repositories', []); | |
54 | pyroutes.register('admin_defaults_repositories_update', '/_admin/defaults/repositories/update', []); |
|
55 | pyroutes.register('admin_defaults_repositories_update', '/_admin/defaults/repositories/update', []); | |
55 | pyroutes.register('admin_settings', '/_admin/settings', []); |
|
56 | pyroutes.register('admin_settings', '/_admin/settings', []); | |
56 | pyroutes.register('admin_settings_update', '/_admin/settings/update', []); |
|
57 | pyroutes.register('admin_settings_update', '/_admin/settings/update', []); | |
57 | pyroutes.register('admin_settings_global', '/_admin/settings/global', []); |
|
58 | pyroutes.register('admin_settings_global', '/_admin/settings/global', []); | |
58 | pyroutes.register('admin_settings_global_update', '/_admin/settings/global/update', []); |
|
59 | pyroutes.register('admin_settings_global_update', '/_admin/settings/global/update', []); | |
59 | pyroutes.register('admin_settings_vcs', '/_admin/settings/vcs', []); |
|
60 | pyroutes.register('admin_settings_vcs', '/_admin/settings/vcs', []); | |
60 | pyroutes.register('admin_settings_vcs_update', '/_admin/settings/vcs/update', []); |
|
61 | pyroutes.register('admin_settings_vcs_update', '/_admin/settings/vcs/update', []); | |
61 | pyroutes.register('admin_settings_vcs_svn_pattern_delete', '/_admin/settings/vcs/svn_pattern_delete', []); |
|
62 | pyroutes.register('admin_settings_vcs_svn_pattern_delete', '/_admin/settings/vcs/svn_pattern_delete', []); | |
62 | pyroutes.register('admin_settings_mapping', '/_admin/settings/mapping', []); |
|
63 | pyroutes.register('admin_settings_mapping', '/_admin/settings/mapping', []); | |
63 | pyroutes.register('admin_settings_mapping_update', '/_admin/settings/mapping/update', []); |
|
64 | pyroutes.register('admin_settings_mapping_update', '/_admin/settings/mapping/update', []); | |
64 | pyroutes.register('admin_settings_visual', '/_admin/settings/visual', []); |
|
65 | pyroutes.register('admin_settings_visual', '/_admin/settings/visual', []); | |
65 | pyroutes.register('admin_settings_visual_update', '/_admin/settings/visual/update', []); |
|
66 | pyroutes.register('admin_settings_visual_update', '/_admin/settings/visual/update', []); | |
66 | pyroutes.register('admin_settings_issuetracker', '/_admin/settings/issue-tracker', []); |
|
67 | pyroutes.register('admin_settings_issuetracker', '/_admin/settings/issue-tracker', []); | |
67 | pyroutes.register('admin_settings_issuetracker_update', '/_admin/settings/issue-tracker/update', []); |
|
68 | pyroutes.register('admin_settings_issuetracker_update', '/_admin/settings/issue-tracker/update', []); | |
68 | pyroutes.register('admin_settings_issuetracker_test', '/_admin/settings/issue-tracker/test', []); |
|
69 | pyroutes.register('admin_settings_issuetracker_test', '/_admin/settings/issue-tracker/test', []); | |
69 | pyroutes.register('admin_settings_issuetracker_delete', '/_admin/settings/issue-tracker/delete', []); |
|
70 | pyroutes.register('admin_settings_issuetracker_delete', '/_admin/settings/issue-tracker/delete', []); | |
70 | pyroutes.register('admin_settings_email', '/_admin/settings/email', []); |
|
71 | pyroutes.register('admin_settings_email', '/_admin/settings/email', []); | |
71 | pyroutes.register('admin_settings_email_update', '/_admin/settings/email/update', []); |
|
72 | pyroutes.register('admin_settings_email_update', '/_admin/settings/email/update', []); | |
72 | pyroutes.register('admin_settings_hooks', '/_admin/settings/hooks', []); |
|
73 | pyroutes.register('admin_settings_hooks', '/_admin/settings/hooks', []); | |
73 | pyroutes.register('admin_settings_hooks_update', '/_admin/settings/hooks/update', []); |
|
74 | pyroutes.register('admin_settings_hooks_update', '/_admin/settings/hooks/update', []); | |
74 | pyroutes.register('admin_settings_hooks_delete', '/_admin/settings/hooks/delete', []); |
|
75 | pyroutes.register('admin_settings_hooks_delete', '/_admin/settings/hooks/delete', []); | |
75 | pyroutes.register('admin_settings_search', '/_admin/settings/search', []); |
|
76 | pyroutes.register('admin_settings_search', '/_admin/settings/search', []); | |
76 | pyroutes.register('admin_settings_labs', '/_admin/settings/labs', []); |
|
77 | pyroutes.register('admin_settings_labs', '/_admin/settings/labs', []); | |
77 | pyroutes.register('admin_settings_labs_update', '/_admin/settings/labs/update', []); |
|
78 | pyroutes.register('admin_settings_labs_update', '/_admin/settings/labs/update', []); | |
78 | pyroutes.register('admin_permissions_application', '/_admin/permissions/application', []); |
|
79 | pyroutes.register('admin_permissions_application', '/_admin/permissions/application', []); | |
79 | pyroutes.register('admin_permissions_application_update', '/_admin/permissions/application/update', []); |
|
80 | pyroutes.register('admin_permissions_application_update', '/_admin/permissions/application/update', []); | |
80 | pyroutes.register('admin_permissions_global', '/_admin/permissions/global', []); |
|
81 | pyroutes.register('admin_permissions_global', '/_admin/permissions/global', []); | |
81 | pyroutes.register('admin_permissions_global_update', '/_admin/permissions/global/update', []); |
|
82 | pyroutes.register('admin_permissions_global_update', '/_admin/permissions/global/update', []); | |
82 | pyroutes.register('admin_permissions_object', '/_admin/permissions/object', []); |
|
83 | pyroutes.register('admin_permissions_object', '/_admin/permissions/object', []); | |
83 | pyroutes.register('admin_permissions_object_update', '/_admin/permissions/object/update', []); |
|
84 | pyroutes.register('admin_permissions_object_update', '/_admin/permissions/object/update', []); | |
84 | pyroutes.register('admin_permissions_ips', '/_admin/permissions/ips', []); |
|
85 | pyroutes.register('admin_permissions_ips', '/_admin/permissions/ips', []); | |
85 | pyroutes.register('admin_permissions_overview', '/_admin/permissions/overview', []); |
|
86 | pyroutes.register('admin_permissions_overview', '/_admin/permissions/overview', []); | |
86 | pyroutes.register('admin_permissions_auth_token_access', '/_admin/permissions/auth_token_access', []); |
|
87 | pyroutes.register('admin_permissions_auth_token_access', '/_admin/permissions/auth_token_access', []); | |
87 | pyroutes.register('admin_permissions_ssh_keys', '/_admin/permissions/ssh_keys', []); |
|
88 | pyroutes.register('admin_permissions_ssh_keys', '/_admin/permissions/ssh_keys', []); | |
88 | pyroutes.register('admin_permissions_ssh_keys_data', '/_admin/permissions/ssh_keys/data', []); |
|
89 | pyroutes.register('admin_permissions_ssh_keys_data', '/_admin/permissions/ssh_keys/data', []); | |
89 | pyroutes.register('admin_permissions_ssh_keys_update', '/_admin/permissions/ssh_keys/update', []); |
|
90 | pyroutes.register('admin_permissions_ssh_keys_update', '/_admin/permissions/ssh_keys/update', []); | |
90 | pyroutes.register('users', '/_admin/users', []); |
|
91 | pyroutes.register('users', '/_admin/users', []); | |
91 | pyroutes.register('users_data', '/_admin/users_data', []); |
|
92 | pyroutes.register('users_data', '/_admin/users_data', []); | |
92 | pyroutes.register('users_create', '/_admin/users/create', []); |
|
93 | pyroutes.register('users_create', '/_admin/users/create', []); | |
93 | pyroutes.register('users_new', '/_admin/users/new', []); |
|
94 | pyroutes.register('users_new', '/_admin/users/new', []); | |
94 | pyroutes.register('user_edit', '/_admin/users/%(user_id)s/edit', ['user_id']); |
|
95 | pyroutes.register('user_edit', '/_admin/users/%(user_id)s/edit', ['user_id']); | |
95 | pyroutes.register('user_edit_advanced', '/_admin/users/%(user_id)s/edit/advanced', ['user_id']); |
|
96 | pyroutes.register('user_edit_advanced', '/_admin/users/%(user_id)s/edit/advanced', ['user_id']); | |
96 | pyroutes.register('user_edit_global_perms', '/_admin/users/%(user_id)s/edit/global_permissions', ['user_id']); |
|
97 | pyroutes.register('user_edit_global_perms', '/_admin/users/%(user_id)s/edit/global_permissions', ['user_id']); | |
97 | pyroutes.register('user_edit_global_perms_update', '/_admin/users/%(user_id)s/edit/global_permissions/update', ['user_id']); |
|
98 | pyroutes.register('user_edit_global_perms_update', '/_admin/users/%(user_id)s/edit/global_permissions/update', ['user_id']); | |
98 | pyroutes.register('user_update', '/_admin/users/%(user_id)s/update', ['user_id']); |
|
99 | pyroutes.register('user_update', '/_admin/users/%(user_id)s/update', ['user_id']); | |
99 | pyroutes.register('user_delete', '/_admin/users/%(user_id)s/delete', ['user_id']); |
|
100 | pyroutes.register('user_delete', '/_admin/users/%(user_id)s/delete', ['user_id']); | |
100 | pyroutes.register('user_force_password_reset', '/_admin/users/%(user_id)s/password_reset', ['user_id']); |
|
101 | pyroutes.register('user_force_password_reset', '/_admin/users/%(user_id)s/password_reset', ['user_id']); | |
101 | pyroutes.register('user_create_personal_repo_group', '/_admin/users/%(user_id)s/create_repo_group', ['user_id']); |
|
102 | pyroutes.register('user_create_personal_repo_group', '/_admin/users/%(user_id)s/create_repo_group', ['user_id']); | |
102 | pyroutes.register('edit_user_auth_tokens', '/_admin/users/%(user_id)s/edit/auth_tokens', ['user_id']); |
|
103 | pyroutes.register('edit_user_auth_tokens', '/_admin/users/%(user_id)s/edit/auth_tokens', ['user_id']); | |
103 | pyroutes.register('edit_user_auth_tokens_add', '/_admin/users/%(user_id)s/edit/auth_tokens/new', ['user_id']); |
|
104 | pyroutes.register('edit_user_auth_tokens_add', '/_admin/users/%(user_id)s/edit/auth_tokens/new', ['user_id']); | |
104 | pyroutes.register('edit_user_auth_tokens_delete', '/_admin/users/%(user_id)s/edit/auth_tokens/delete', ['user_id']); |
|
105 | pyroutes.register('edit_user_auth_tokens_delete', '/_admin/users/%(user_id)s/edit/auth_tokens/delete', ['user_id']); | |
105 | pyroutes.register('edit_user_ssh_keys', '/_admin/users/%(user_id)s/edit/ssh_keys', ['user_id']); |
|
106 | pyroutes.register('edit_user_ssh_keys', '/_admin/users/%(user_id)s/edit/ssh_keys', ['user_id']); | |
106 | pyroutes.register('edit_user_ssh_keys_generate_keypair', '/_admin/users/%(user_id)s/edit/ssh_keys/generate', ['user_id']); |
|
107 | pyroutes.register('edit_user_ssh_keys_generate_keypair', '/_admin/users/%(user_id)s/edit/ssh_keys/generate', ['user_id']); | |
107 | pyroutes.register('edit_user_ssh_keys_add', '/_admin/users/%(user_id)s/edit/ssh_keys/new', ['user_id']); |
|
108 | pyroutes.register('edit_user_ssh_keys_add', '/_admin/users/%(user_id)s/edit/ssh_keys/new', ['user_id']); | |
108 | pyroutes.register('edit_user_ssh_keys_delete', '/_admin/users/%(user_id)s/edit/ssh_keys/delete', ['user_id']); |
|
109 | pyroutes.register('edit_user_ssh_keys_delete', '/_admin/users/%(user_id)s/edit/ssh_keys/delete', ['user_id']); | |
109 | pyroutes.register('edit_user_emails', '/_admin/users/%(user_id)s/edit/emails', ['user_id']); |
|
110 | pyroutes.register('edit_user_emails', '/_admin/users/%(user_id)s/edit/emails', ['user_id']); | |
110 | pyroutes.register('edit_user_emails_add', '/_admin/users/%(user_id)s/edit/emails/new', ['user_id']); |
|
111 | pyroutes.register('edit_user_emails_add', '/_admin/users/%(user_id)s/edit/emails/new', ['user_id']); | |
111 | pyroutes.register('edit_user_emails_delete', '/_admin/users/%(user_id)s/edit/emails/delete', ['user_id']); |
|
112 | pyroutes.register('edit_user_emails_delete', '/_admin/users/%(user_id)s/edit/emails/delete', ['user_id']); | |
112 | pyroutes.register('edit_user_ips', '/_admin/users/%(user_id)s/edit/ips', ['user_id']); |
|
113 | pyroutes.register('edit_user_ips', '/_admin/users/%(user_id)s/edit/ips', ['user_id']); | |
113 | pyroutes.register('edit_user_ips_add', '/_admin/users/%(user_id)s/edit/ips/new', ['user_id']); |
|
114 | pyroutes.register('edit_user_ips_add', '/_admin/users/%(user_id)s/edit/ips/new', ['user_id']); | |
114 | pyroutes.register('edit_user_ips_delete', '/_admin/users/%(user_id)s/edit/ips/delete', ['user_id']); |
|
115 | pyroutes.register('edit_user_ips_delete', '/_admin/users/%(user_id)s/edit/ips/delete', ['user_id']); | |
115 | pyroutes.register('edit_user_perms_summary', '/_admin/users/%(user_id)s/edit/permissions_summary', ['user_id']); |
|
116 | pyroutes.register('edit_user_perms_summary', '/_admin/users/%(user_id)s/edit/permissions_summary', ['user_id']); | |
116 | pyroutes.register('edit_user_perms_summary_json', '/_admin/users/%(user_id)s/edit/permissions_summary/json', ['user_id']); |
|
117 | pyroutes.register('edit_user_perms_summary_json', '/_admin/users/%(user_id)s/edit/permissions_summary/json', ['user_id']); | |
117 | pyroutes.register('edit_user_groups_management', '/_admin/users/%(user_id)s/edit/groups_management', ['user_id']); |
|
118 | pyroutes.register('edit_user_groups_management', '/_admin/users/%(user_id)s/edit/groups_management', ['user_id']); | |
118 | pyroutes.register('edit_user_groups_management_updates', '/_admin/users/%(user_id)s/edit/edit_user_groups_management/updates', ['user_id']); |
|
119 | pyroutes.register('edit_user_groups_management_updates', '/_admin/users/%(user_id)s/edit/edit_user_groups_management/updates', ['user_id']); | |
119 | pyroutes.register('edit_user_audit_logs', '/_admin/users/%(user_id)s/edit/audit', ['user_id']); |
|
120 | pyroutes.register('edit_user_audit_logs', '/_admin/users/%(user_id)s/edit/audit', ['user_id']); | |
120 | pyroutes.register('user_groups', '/_admin/user_groups', []); |
|
121 | pyroutes.register('user_groups', '/_admin/user_groups', []); | |
121 | pyroutes.register('user_groups_data', '/_admin/user_groups_data', []); |
|
122 | pyroutes.register('user_groups_data', '/_admin/user_groups_data', []); | |
122 | pyroutes.register('user_groups_new', '/_admin/user_groups/new', []); |
|
123 | pyroutes.register('user_groups_new', '/_admin/user_groups/new', []); | |
123 | pyroutes.register('user_groups_create', '/_admin/user_groups/create', []); |
|
124 | pyroutes.register('user_groups_create', '/_admin/user_groups/create', []); | |
124 | pyroutes.register('repos', '/_admin/repos', []); |
|
125 | pyroutes.register('repos', '/_admin/repos', []); | |
125 | pyroutes.register('repo_new', '/_admin/repos/new', []); |
|
126 | pyroutes.register('repo_new', '/_admin/repos/new', []); | |
126 | pyroutes.register('repo_create', '/_admin/repos/create', []); |
|
127 | pyroutes.register('repo_create', '/_admin/repos/create', []); | |
127 | pyroutes.register('repo_groups', '/_admin/repo_groups', []); |
|
128 | pyroutes.register('repo_groups', '/_admin/repo_groups', []); | |
128 | pyroutes.register('repo_group_new', '/_admin/repo_group/new', []); |
|
129 | pyroutes.register('repo_group_new', '/_admin/repo_group/new', []); | |
129 | pyroutes.register('repo_group_create', '/_admin/repo_group/create', []); |
|
130 | pyroutes.register('repo_group_create', '/_admin/repo_group/create', []); | |
130 | pyroutes.register('channelstream_connect', '/_admin/channelstream/connect', []); |
|
131 | pyroutes.register('channelstream_connect', '/_admin/channelstream/connect', []); | |
131 | pyroutes.register('channelstream_subscribe', '/_admin/channelstream/subscribe', []); |
|
132 | pyroutes.register('channelstream_subscribe', '/_admin/channelstream/subscribe', []); | |
132 | pyroutes.register('channelstream_proxy', '/_channelstream', []); |
|
133 | pyroutes.register('channelstream_proxy', '/_channelstream', []); | |
133 | pyroutes.register('login', '/_admin/login', []); |
|
134 | pyroutes.register('login', '/_admin/login', []); | |
134 | pyroutes.register('logout', '/_admin/logout', []); |
|
135 | pyroutes.register('logout', '/_admin/logout', []); | |
135 | pyroutes.register('register', '/_admin/register', []); |
|
136 | pyroutes.register('register', '/_admin/register', []); | |
136 | pyroutes.register('reset_password', '/_admin/password_reset', []); |
|
137 | pyroutes.register('reset_password', '/_admin/password_reset', []); | |
137 | pyroutes.register('reset_password_confirmation', '/_admin/password_reset_confirmation', []); |
|
138 | pyroutes.register('reset_password_confirmation', '/_admin/password_reset_confirmation', []); | |
138 | pyroutes.register('home', '/', []); |
|
139 | pyroutes.register('home', '/', []); | |
139 | pyroutes.register('user_autocomplete_data', '/_users', []); |
|
140 | pyroutes.register('user_autocomplete_data', '/_users', []); | |
140 | pyroutes.register('user_group_autocomplete_data', '/_user_groups', []); |
|
141 | pyroutes.register('user_group_autocomplete_data', '/_user_groups', []); | |
141 | pyroutes.register('repo_list_data', '/_repos', []); |
|
142 | pyroutes.register('repo_list_data', '/_repos', []); | |
142 | pyroutes.register('goto_switcher_data', '/_goto_data', []); |
|
143 | pyroutes.register('goto_switcher_data', '/_goto_data', []); | |
143 | pyroutes.register('journal', '/_admin/journal', []); |
|
144 | pyroutes.register('journal', '/_admin/journal', []); | |
144 | pyroutes.register('journal_rss', '/_admin/journal/rss', []); |
|
145 | pyroutes.register('journal_rss', '/_admin/journal/rss', []); | |
145 | pyroutes.register('journal_atom', '/_admin/journal/atom', []); |
|
146 | pyroutes.register('journal_atom', '/_admin/journal/atom', []); | |
146 | pyroutes.register('journal_public', '/_admin/public_journal', []); |
|
147 | pyroutes.register('journal_public', '/_admin/public_journal', []); | |
147 | pyroutes.register('journal_public_atom', '/_admin/public_journal/atom', []); |
|
148 | pyroutes.register('journal_public_atom', '/_admin/public_journal/atom', []); | |
148 | pyroutes.register('journal_public_atom_old', '/_admin/public_journal_atom', []); |
|
149 | pyroutes.register('journal_public_atom_old', '/_admin/public_journal_atom', []); | |
149 | pyroutes.register('journal_public_rss', '/_admin/public_journal/rss', []); |
|
150 | pyroutes.register('journal_public_rss', '/_admin/public_journal/rss', []); | |
150 | pyroutes.register('journal_public_rss_old', '/_admin/public_journal_rss', []); |
|
151 | pyroutes.register('journal_public_rss_old', '/_admin/public_journal_rss', []); | |
151 | pyroutes.register('toggle_following', '/_admin/toggle_following', []); |
|
152 | pyroutes.register('toggle_following', '/_admin/toggle_following', []); | |
152 | pyroutes.register('repo_creating', '/%(repo_name)s/repo_creating', ['repo_name']); |
|
153 | pyroutes.register('repo_creating', '/%(repo_name)s/repo_creating', ['repo_name']); | |
153 | pyroutes.register('repo_creating_check', '/%(repo_name)s/repo_creating_check', ['repo_name']); |
|
154 | pyroutes.register('repo_creating_check', '/%(repo_name)s/repo_creating_check', ['repo_name']); | |
154 | pyroutes.register('repo_summary_explicit', '/%(repo_name)s/summary', ['repo_name']); |
|
155 | pyroutes.register('repo_summary_explicit', '/%(repo_name)s/summary', ['repo_name']); | |
155 | pyroutes.register('repo_summary_commits', '/%(repo_name)s/summary-commits', ['repo_name']); |
|
156 | pyroutes.register('repo_summary_commits', '/%(repo_name)s/summary-commits', ['repo_name']); | |
156 | pyroutes.register('repo_commit', '/%(repo_name)s/changeset/%(commit_id)s', ['repo_name', 'commit_id']); |
|
157 | pyroutes.register('repo_commit', '/%(repo_name)s/changeset/%(commit_id)s', ['repo_name', 'commit_id']); | |
157 | pyroutes.register('repo_commit_children', '/%(repo_name)s/changeset_children/%(commit_id)s', ['repo_name', 'commit_id']); |
|
158 | pyroutes.register('repo_commit_children', '/%(repo_name)s/changeset_children/%(commit_id)s', ['repo_name', 'commit_id']); | |
158 | pyroutes.register('repo_commit_parents', '/%(repo_name)s/changeset_parents/%(commit_id)s', ['repo_name', 'commit_id']); |
|
159 | pyroutes.register('repo_commit_parents', '/%(repo_name)s/changeset_parents/%(commit_id)s', ['repo_name', 'commit_id']); | |
159 | pyroutes.register('repo_commit_raw', '/%(repo_name)s/changeset-diff/%(commit_id)s', ['repo_name', 'commit_id']); |
|
160 | pyroutes.register('repo_commit_raw', '/%(repo_name)s/changeset-diff/%(commit_id)s', ['repo_name', 'commit_id']); | |
160 | pyroutes.register('repo_commit_patch', '/%(repo_name)s/changeset-patch/%(commit_id)s', ['repo_name', 'commit_id']); |
|
161 | pyroutes.register('repo_commit_patch', '/%(repo_name)s/changeset-patch/%(commit_id)s', ['repo_name', 'commit_id']); | |
161 | pyroutes.register('repo_commit_download', '/%(repo_name)s/changeset-download/%(commit_id)s', ['repo_name', 'commit_id']); |
|
162 | pyroutes.register('repo_commit_download', '/%(repo_name)s/changeset-download/%(commit_id)s', ['repo_name', 'commit_id']); | |
162 | pyroutes.register('repo_commit_data', '/%(repo_name)s/changeset-data/%(commit_id)s', ['repo_name', 'commit_id']); |
|
163 | pyroutes.register('repo_commit_data', '/%(repo_name)s/changeset-data/%(commit_id)s', ['repo_name', 'commit_id']); | |
163 | pyroutes.register('repo_commit_comment_create', '/%(repo_name)s/changeset/%(commit_id)s/comment/create', ['repo_name', 'commit_id']); |
|
164 | pyroutes.register('repo_commit_comment_create', '/%(repo_name)s/changeset/%(commit_id)s/comment/create', ['repo_name', 'commit_id']); | |
164 | pyroutes.register('repo_commit_comment_preview', '/%(repo_name)s/changeset/%(commit_id)s/comment/preview', ['repo_name', 'commit_id']); |
|
165 | pyroutes.register('repo_commit_comment_preview', '/%(repo_name)s/changeset/%(commit_id)s/comment/preview', ['repo_name', 'commit_id']); | |
165 | pyroutes.register('repo_commit_comment_delete', '/%(repo_name)s/changeset/%(commit_id)s/comment/%(comment_id)s/delete', ['repo_name', 'commit_id', 'comment_id']); |
|
166 | pyroutes.register('repo_commit_comment_delete', '/%(repo_name)s/changeset/%(commit_id)s/comment/%(comment_id)s/delete', ['repo_name', 'commit_id', 'comment_id']); | |
166 | pyroutes.register('repo_commit_raw_deprecated', '/%(repo_name)s/raw-changeset/%(commit_id)s', ['repo_name', 'commit_id']); |
|
167 | pyroutes.register('repo_commit_raw_deprecated', '/%(repo_name)s/raw-changeset/%(commit_id)s', ['repo_name', 'commit_id']); | |
167 | pyroutes.register('repo_archivefile', '/%(repo_name)s/archive/%(fname)s', ['repo_name', 'fname']); |
|
168 | pyroutes.register('repo_archivefile', '/%(repo_name)s/archive/%(fname)s', ['repo_name', 'fname']); | |
168 | pyroutes.register('repo_files_diff', '/%(repo_name)s/diff/%(f_path)s', ['repo_name', 'f_path']); |
|
169 | pyroutes.register('repo_files_diff', '/%(repo_name)s/diff/%(f_path)s', ['repo_name', 'f_path']); | |
169 | pyroutes.register('repo_files_diff_2way_redirect', '/%(repo_name)s/diff-2way/%(f_path)s', ['repo_name', 'f_path']); |
|
170 | pyroutes.register('repo_files_diff_2way_redirect', '/%(repo_name)s/diff-2way/%(f_path)s', ['repo_name', 'f_path']); | |
170 | pyroutes.register('repo_files', '/%(repo_name)s/files/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
171 | pyroutes.register('repo_files', '/%(repo_name)s/files/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
171 | pyroutes.register('repo_files:default_path', '/%(repo_name)s/files/%(commit_id)s/', ['repo_name', 'commit_id']); |
|
172 | pyroutes.register('repo_files:default_path', '/%(repo_name)s/files/%(commit_id)s/', ['repo_name', 'commit_id']); | |
172 | pyroutes.register('repo_files:default_commit', '/%(repo_name)s/files', ['repo_name']); |
|
173 | pyroutes.register('repo_files:default_commit', '/%(repo_name)s/files', ['repo_name']); | |
173 | pyroutes.register('repo_files:rendered', '/%(repo_name)s/render/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
174 | pyroutes.register('repo_files:rendered', '/%(repo_name)s/render/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
174 | pyroutes.register('repo_files:annotated', '/%(repo_name)s/annotate/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
175 | pyroutes.register('repo_files:annotated', '/%(repo_name)s/annotate/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
175 | pyroutes.register('repo_files:annotated_previous', '/%(repo_name)s/annotate-previous/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
176 | pyroutes.register('repo_files:annotated_previous', '/%(repo_name)s/annotate-previous/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
176 | pyroutes.register('repo_nodetree_full', '/%(repo_name)s/nodetree_full/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
177 | pyroutes.register('repo_nodetree_full', '/%(repo_name)s/nodetree_full/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
177 | pyroutes.register('repo_nodetree_full:default_path', '/%(repo_name)s/nodetree_full/%(commit_id)s/', ['repo_name', 'commit_id']); |
|
178 | pyroutes.register('repo_nodetree_full:default_path', '/%(repo_name)s/nodetree_full/%(commit_id)s/', ['repo_name', 'commit_id']); | |
178 | pyroutes.register('repo_files_nodelist', '/%(repo_name)s/nodelist/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
179 | pyroutes.register('repo_files_nodelist', '/%(repo_name)s/nodelist/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
179 | pyroutes.register('repo_file_raw', '/%(repo_name)s/raw/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
180 | pyroutes.register('repo_file_raw', '/%(repo_name)s/raw/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
180 | pyroutes.register('repo_file_download', '/%(repo_name)s/download/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
181 | pyroutes.register('repo_file_download', '/%(repo_name)s/download/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
181 | pyroutes.register('repo_file_download:legacy', '/%(repo_name)s/rawfile/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
182 | pyroutes.register('repo_file_download:legacy', '/%(repo_name)s/rawfile/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
182 | pyroutes.register('repo_file_history', '/%(repo_name)s/history/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
183 | pyroutes.register('repo_file_history', '/%(repo_name)s/history/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
183 | pyroutes.register('repo_file_authors', '/%(repo_name)s/authors/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
184 | pyroutes.register('repo_file_authors', '/%(repo_name)s/authors/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
184 | pyroutes.register('repo_files_remove_file', '/%(repo_name)s/remove_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
185 | pyroutes.register('repo_files_remove_file', '/%(repo_name)s/remove_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
185 | pyroutes.register('repo_files_delete_file', '/%(repo_name)s/delete_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
186 | pyroutes.register('repo_files_delete_file', '/%(repo_name)s/delete_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
186 | pyroutes.register('repo_files_edit_file', '/%(repo_name)s/edit_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
187 | pyroutes.register('repo_files_edit_file', '/%(repo_name)s/edit_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
187 | pyroutes.register('repo_files_update_file', '/%(repo_name)s/update_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
188 | pyroutes.register('repo_files_update_file', '/%(repo_name)s/update_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
188 | pyroutes.register('repo_files_add_file', '/%(repo_name)s/add_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
189 | pyroutes.register('repo_files_add_file', '/%(repo_name)s/add_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
189 | pyroutes.register('repo_files_create_file', '/%(repo_name)s/create_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
190 | pyroutes.register('repo_files_create_file', '/%(repo_name)s/create_file/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
190 | pyroutes.register('repo_refs_data', '/%(repo_name)s/refs-data', ['repo_name']); |
|
191 | pyroutes.register('repo_refs_data', '/%(repo_name)s/refs-data', ['repo_name']); | |
191 | pyroutes.register('repo_refs_changelog_data', '/%(repo_name)s/refs-data-changelog', ['repo_name']); |
|
192 | pyroutes.register('repo_refs_changelog_data', '/%(repo_name)s/refs-data-changelog', ['repo_name']); | |
192 | pyroutes.register('repo_stats', '/%(repo_name)s/repo_stats/%(commit_id)s', ['repo_name', 'commit_id']); |
|
193 | pyroutes.register('repo_stats', '/%(repo_name)s/repo_stats/%(commit_id)s', ['repo_name', 'commit_id']); | |
193 | pyroutes.register('repo_changelog', '/%(repo_name)s/changelog', ['repo_name']); |
|
194 | pyroutes.register('repo_changelog', '/%(repo_name)s/changelog', ['repo_name']); | |
194 | pyroutes.register('repo_changelog_file', '/%(repo_name)s/changelog/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
195 | pyroutes.register('repo_changelog_file', '/%(repo_name)s/changelog/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
195 | pyroutes.register('repo_changelog_elements', '/%(repo_name)s/changelog_elements', ['repo_name']); |
|
196 | pyroutes.register('repo_changelog_elements', '/%(repo_name)s/changelog_elements', ['repo_name']); | |
196 | pyroutes.register('repo_changelog_elements_file', '/%(repo_name)s/changelog_elements/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
197 | pyroutes.register('repo_changelog_elements_file', '/%(repo_name)s/changelog_elements/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
197 | pyroutes.register('repo_compare_select', '/%(repo_name)s/compare', ['repo_name']); |
|
198 | pyroutes.register('repo_compare_select', '/%(repo_name)s/compare', ['repo_name']); | |
198 | pyroutes.register('repo_compare', '/%(repo_name)s/compare/%(source_ref_type)s@%(source_ref)s...%(target_ref_type)s@%(target_ref)s', ['repo_name', 'source_ref_type', 'source_ref', 'target_ref_type', 'target_ref']); |
|
199 | pyroutes.register('repo_compare', '/%(repo_name)s/compare/%(source_ref_type)s@%(source_ref)s...%(target_ref_type)s@%(target_ref)s', ['repo_name', 'source_ref_type', 'source_ref', 'target_ref_type', 'target_ref']); | |
199 | pyroutes.register('tags_home', '/%(repo_name)s/tags', ['repo_name']); |
|
200 | pyroutes.register('tags_home', '/%(repo_name)s/tags', ['repo_name']); | |
200 | pyroutes.register('branches_home', '/%(repo_name)s/branches', ['repo_name']); |
|
201 | pyroutes.register('branches_home', '/%(repo_name)s/branches', ['repo_name']); | |
201 | pyroutes.register('bookmarks_home', '/%(repo_name)s/bookmarks', ['repo_name']); |
|
202 | pyroutes.register('bookmarks_home', '/%(repo_name)s/bookmarks', ['repo_name']); | |
202 | pyroutes.register('repo_fork_new', '/%(repo_name)s/fork', ['repo_name']); |
|
203 | pyroutes.register('repo_fork_new', '/%(repo_name)s/fork', ['repo_name']); | |
203 | pyroutes.register('repo_fork_create', '/%(repo_name)s/fork/create', ['repo_name']); |
|
204 | pyroutes.register('repo_fork_create', '/%(repo_name)s/fork/create', ['repo_name']); | |
204 | pyroutes.register('repo_forks_show_all', '/%(repo_name)s/forks', ['repo_name']); |
|
205 | pyroutes.register('repo_forks_show_all', '/%(repo_name)s/forks', ['repo_name']); | |
205 | pyroutes.register('repo_forks_data', '/%(repo_name)s/forks/data', ['repo_name']); |
|
206 | pyroutes.register('repo_forks_data', '/%(repo_name)s/forks/data', ['repo_name']); | |
206 | pyroutes.register('pullrequest_show', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']); |
|
207 | pyroutes.register('pullrequest_show', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']); | |
207 | pyroutes.register('pullrequest_show_all', '/%(repo_name)s/pull-request', ['repo_name']); |
|
208 | pyroutes.register('pullrequest_show_all', '/%(repo_name)s/pull-request', ['repo_name']); | |
208 | pyroutes.register('pullrequest_show_all_data', '/%(repo_name)s/pull-request-data', ['repo_name']); |
|
209 | pyroutes.register('pullrequest_show_all_data', '/%(repo_name)s/pull-request-data', ['repo_name']); | |
209 | pyroutes.register('pullrequest_repo_refs', '/%(repo_name)s/pull-request/refs/%(target_repo_name)s', ['repo_name', 'target_repo_name']); |
|
210 | pyroutes.register('pullrequest_repo_refs', '/%(repo_name)s/pull-request/refs/%(target_repo_name)s', ['repo_name', 'target_repo_name']); | |
210 | pyroutes.register('pullrequest_repo_destinations', '/%(repo_name)s/pull-request/repo-destinations', ['repo_name']); |
|
211 | pyroutes.register('pullrequest_repo_destinations', '/%(repo_name)s/pull-request/repo-destinations', ['repo_name']); | |
211 | pyroutes.register('pullrequest_new', '/%(repo_name)s/pull-request/new', ['repo_name']); |
|
212 | pyroutes.register('pullrequest_new', '/%(repo_name)s/pull-request/new', ['repo_name']); | |
212 | pyroutes.register('pullrequest_create', '/%(repo_name)s/pull-request/create', ['repo_name']); |
|
213 | pyroutes.register('pullrequest_create', '/%(repo_name)s/pull-request/create', ['repo_name']); | |
213 | pyroutes.register('pullrequest_update', '/%(repo_name)s/pull-request/%(pull_request_id)s/update', ['repo_name', 'pull_request_id']); |
|
214 | pyroutes.register('pullrequest_update', '/%(repo_name)s/pull-request/%(pull_request_id)s/update', ['repo_name', 'pull_request_id']); | |
214 | pyroutes.register('pullrequest_merge', '/%(repo_name)s/pull-request/%(pull_request_id)s/merge', ['repo_name', 'pull_request_id']); |
|
215 | pyroutes.register('pullrequest_merge', '/%(repo_name)s/pull-request/%(pull_request_id)s/merge', ['repo_name', 'pull_request_id']); | |
215 | pyroutes.register('pullrequest_delete', '/%(repo_name)s/pull-request/%(pull_request_id)s/delete', ['repo_name', 'pull_request_id']); |
|
216 | pyroutes.register('pullrequest_delete', '/%(repo_name)s/pull-request/%(pull_request_id)s/delete', ['repo_name', 'pull_request_id']); | |
216 | pyroutes.register('pullrequest_comment_create', '/%(repo_name)s/pull-request/%(pull_request_id)s/comment', ['repo_name', 'pull_request_id']); |
|
217 | pyroutes.register('pullrequest_comment_create', '/%(repo_name)s/pull-request/%(pull_request_id)s/comment', ['repo_name', 'pull_request_id']); | |
217 | pyroutes.register('pullrequest_comment_delete', '/%(repo_name)s/pull-request/%(pull_request_id)s/comment/%(comment_id)s/delete', ['repo_name', 'pull_request_id', 'comment_id']); |
|
218 | pyroutes.register('pullrequest_comment_delete', '/%(repo_name)s/pull-request/%(pull_request_id)s/comment/%(comment_id)s/delete', ['repo_name', 'pull_request_id', 'comment_id']); | |
218 | pyroutes.register('edit_repo', '/%(repo_name)s/settings', ['repo_name']); |
|
219 | pyroutes.register('edit_repo', '/%(repo_name)s/settings', ['repo_name']); | |
219 | pyroutes.register('edit_repo_advanced', '/%(repo_name)s/settings/advanced', ['repo_name']); |
|
220 | pyroutes.register('edit_repo_advanced', '/%(repo_name)s/settings/advanced', ['repo_name']); | |
220 | pyroutes.register('edit_repo_advanced_delete', '/%(repo_name)s/settings/advanced/delete', ['repo_name']); |
|
221 | pyroutes.register('edit_repo_advanced_delete', '/%(repo_name)s/settings/advanced/delete', ['repo_name']); | |
221 | pyroutes.register('edit_repo_advanced_locking', '/%(repo_name)s/settings/advanced/locking', ['repo_name']); |
|
222 | pyroutes.register('edit_repo_advanced_locking', '/%(repo_name)s/settings/advanced/locking', ['repo_name']); | |
222 | pyroutes.register('edit_repo_advanced_journal', '/%(repo_name)s/settings/advanced/journal', ['repo_name']); |
|
223 | pyroutes.register('edit_repo_advanced_journal', '/%(repo_name)s/settings/advanced/journal', ['repo_name']); | |
223 | pyroutes.register('edit_repo_advanced_fork', '/%(repo_name)s/settings/advanced/fork', ['repo_name']); |
|
224 | pyroutes.register('edit_repo_advanced_fork', '/%(repo_name)s/settings/advanced/fork', ['repo_name']); | |
224 | pyroutes.register('edit_repo_caches', '/%(repo_name)s/settings/caches', ['repo_name']); |
|
225 | pyroutes.register('edit_repo_caches', '/%(repo_name)s/settings/caches', ['repo_name']); | |
225 | pyroutes.register('edit_repo_perms', '/%(repo_name)s/settings/permissions', ['repo_name']); |
|
226 | pyroutes.register('edit_repo_perms', '/%(repo_name)s/settings/permissions', ['repo_name']); | |
226 | pyroutes.register('edit_repo_maintenance', '/%(repo_name)s/settings/maintenance', ['repo_name']); |
|
227 | pyroutes.register('edit_repo_maintenance', '/%(repo_name)s/settings/maintenance', ['repo_name']); | |
227 | pyroutes.register('edit_repo_maintenance_execute', '/%(repo_name)s/settings/maintenance/execute', ['repo_name']); |
|
228 | pyroutes.register('edit_repo_maintenance_execute', '/%(repo_name)s/settings/maintenance/execute', ['repo_name']); | |
228 | pyroutes.register('edit_repo_fields', '/%(repo_name)s/settings/fields', ['repo_name']); |
|
229 | pyroutes.register('edit_repo_fields', '/%(repo_name)s/settings/fields', ['repo_name']); | |
229 | pyroutes.register('edit_repo_fields_create', '/%(repo_name)s/settings/fields/create', ['repo_name']); |
|
230 | pyroutes.register('edit_repo_fields_create', '/%(repo_name)s/settings/fields/create', ['repo_name']); | |
230 | pyroutes.register('edit_repo_fields_delete', '/%(repo_name)s/settings/fields/%(field_id)s/delete', ['repo_name', 'field_id']); |
|
231 | pyroutes.register('edit_repo_fields_delete', '/%(repo_name)s/settings/fields/%(field_id)s/delete', ['repo_name', 'field_id']); | |
231 | pyroutes.register('repo_edit_toggle_locking', '/%(repo_name)s/settings/toggle_locking', ['repo_name']); |
|
232 | pyroutes.register('repo_edit_toggle_locking', '/%(repo_name)s/settings/toggle_locking', ['repo_name']); | |
232 | pyroutes.register('edit_repo_remote', '/%(repo_name)s/settings/remote', ['repo_name']); |
|
233 | pyroutes.register('edit_repo_remote', '/%(repo_name)s/settings/remote', ['repo_name']); | |
233 | pyroutes.register('edit_repo_remote_pull', '/%(repo_name)s/settings/remote/pull', ['repo_name']); |
|
234 | pyroutes.register('edit_repo_remote_pull', '/%(repo_name)s/settings/remote/pull', ['repo_name']); | |
234 | pyroutes.register('edit_repo_statistics', '/%(repo_name)s/settings/statistics', ['repo_name']); |
|
235 | pyroutes.register('edit_repo_statistics', '/%(repo_name)s/settings/statistics', ['repo_name']); | |
235 | pyroutes.register('edit_repo_statistics_reset', '/%(repo_name)s/settings/statistics/update', ['repo_name']); |
|
236 | pyroutes.register('edit_repo_statistics_reset', '/%(repo_name)s/settings/statistics/update', ['repo_name']); | |
236 | pyroutes.register('edit_repo_issuetracker', '/%(repo_name)s/settings/issue_trackers', ['repo_name']); |
|
237 | pyroutes.register('edit_repo_issuetracker', '/%(repo_name)s/settings/issue_trackers', ['repo_name']); | |
237 | pyroutes.register('edit_repo_issuetracker_test', '/%(repo_name)s/settings/issue_trackers/test', ['repo_name']); |
|
238 | pyroutes.register('edit_repo_issuetracker_test', '/%(repo_name)s/settings/issue_trackers/test', ['repo_name']); | |
238 | pyroutes.register('edit_repo_issuetracker_delete', '/%(repo_name)s/settings/issue_trackers/delete', ['repo_name']); |
|
239 | pyroutes.register('edit_repo_issuetracker_delete', '/%(repo_name)s/settings/issue_trackers/delete', ['repo_name']); | |
239 | pyroutes.register('edit_repo_issuetracker_update', '/%(repo_name)s/settings/issue_trackers/update', ['repo_name']); |
|
240 | pyroutes.register('edit_repo_issuetracker_update', '/%(repo_name)s/settings/issue_trackers/update', ['repo_name']); | |
240 | pyroutes.register('edit_repo_vcs', '/%(repo_name)s/settings/vcs', ['repo_name']); |
|
241 | pyroutes.register('edit_repo_vcs', '/%(repo_name)s/settings/vcs', ['repo_name']); | |
241 | pyroutes.register('edit_repo_vcs_update', '/%(repo_name)s/settings/vcs/update', ['repo_name']); |
|
242 | pyroutes.register('edit_repo_vcs_update', '/%(repo_name)s/settings/vcs/update', ['repo_name']); | |
242 | pyroutes.register('edit_repo_vcs_svn_pattern_delete', '/%(repo_name)s/settings/vcs/svn_pattern/delete', ['repo_name']); |
|
243 | pyroutes.register('edit_repo_vcs_svn_pattern_delete', '/%(repo_name)s/settings/vcs/svn_pattern/delete', ['repo_name']); | |
243 | pyroutes.register('repo_reviewers', '/%(repo_name)s/settings/review/rules', ['repo_name']); |
|
244 | pyroutes.register('repo_reviewers', '/%(repo_name)s/settings/review/rules', ['repo_name']); | |
244 | pyroutes.register('repo_default_reviewers_data', '/%(repo_name)s/settings/review/default-reviewers', ['repo_name']); |
|
245 | pyroutes.register('repo_default_reviewers_data', '/%(repo_name)s/settings/review/default-reviewers', ['repo_name']); | |
245 | pyroutes.register('edit_repo_strip', '/%(repo_name)s/settings/strip', ['repo_name']); |
|
246 | pyroutes.register('edit_repo_strip', '/%(repo_name)s/settings/strip', ['repo_name']); | |
246 | pyroutes.register('strip_check', '/%(repo_name)s/settings/strip_check', ['repo_name']); |
|
247 | pyroutes.register('strip_check', '/%(repo_name)s/settings/strip_check', ['repo_name']); | |
247 | pyroutes.register('strip_execute', '/%(repo_name)s/settings/strip_execute', ['repo_name']); |
|
248 | pyroutes.register('strip_execute', '/%(repo_name)s/settings/strip_execute', ['repo_name']); | |
248 | pyroutes.register('edit_repo_audit_logs', '/%(repo_name)s/settings/audit_logs', ['repo_name']); |
|
249 | pyroutes.register('edit_repo_audit_logs', '/%(repo_name)s/settings/audit_logs', ['repo_name']); | |
249 | pyroutes.register('rss_feed_home', '/%(repo_name)s/feed/rss', ['repo_name']); |
|
250 | pyroutes.register('rss_feed_home', '/%(repo_name)s/feed/rss', ['repo_name']); | |
250 | pyroutes.register('atom_feed_home', '/%(repo_name)s/feed/atom', ['repo_name']); |
|
251 | pyroutes.register('atom_feed_home', '/%(repo_name)s/feed/atom', ['repo_name']); | |
251 | pyroutes.register('repo_summary', '/%(repo_name)s', ['repo_name']); |
|
252 | pyroutes.register('repo_summary', '/%(repo_name)s', ['repo_name']); | |
252 | pyroutes.register('repo_summary_slash', '/%(repo_name)s/', ['repo_name']); |
|
253 | pyroutes.register('repo_summary_slash', '/%(repo_name)s/', ['repo_name']); | |
253 | pyroutes.register('edit_repo_group', '/%(repo_group_name)s/_edit', ['repo_group_name']); |
|
254 | pyroutes.register('edit_repo_group', '/%(repo_group_name)s/_edit', ['repo_group_name']); | |
254 | pyroutes.register('edit_repo_group_advanced', '/%(repo_group_name)s/_settings/advanced', ['repo_group_name']); |
|
255 | pyroutes.register('edit_repo_group_advanced', '/%(repo_group_name)s/_settings/advanced', ['repo_group_name']); | |
255 | pyroutes.register('edit_repo_group_advanced_delete', '/%(repo_group_name)s/_settings/advanced/delete', ['repo_group_name']); |
|
256 | pyroutes.register('edit_repo_group_advanced_delete', '/%(repo_group_name)s/_settings/advanced/delete', ['repo_group_name']); | |
256 | pyroutes.register('edit_repo_group_perms', '/%(repo_group_name)s/_settings/permissions', ['repo_group_name']); |
|
257 | pyroutes.register('edit_repo_group_perms', '/%(repo_group_name)s/_settings/permissions', ['repo_group_name']); | |
257 | pyroutes.register('edit_repo_group_perms_update', '/%(repo_group_name)s/_settings/permissions/update', ['repo_group_name']); |
|
258 | pyroutes.register('edit_repo_group_perms_update', '/%(repo_group_name)s/_settings/permissions/update', ['repo_group_name']); | |
258 | pyroutes.register('repo_group_home', '/%(repo_group_name)s', ['repo_group_name']); |
|
259 | pyroutes.register('repo_group_home', '/%(repo_group_name)s', ['repo_group_name']); | |
259 | pyroutes.register('repo_group_home_slash', '/%(repo_group_name)s/', ['repo_group_name']); |
|
260 | pyroutes.register('repo_group_home_slash', '/%(repo_group_name)s/', ['repo_group_name']); | |
260 | pyroutes.register('user_group_members_data', '/_admin/user_groups/%(user_group_id)s/members', ['user_group_id']); |
|
261 | pyroutes.register('user_group_members_data', '/_admin/user_groups/%(user_group_id)s/members', ['user_group_id']); | |
261 | pyroutes.register('edit_user_group_perms_summary', '/_admin/user_groups/%(user_group_id)s/edit/permissions_summary', ['user_group_id']); |
|
262 | pyroutes.register('edit_user_group_perms_summary', '/_admin/user_groups/%(user_group_id)s/edit/permissions_summary', ['user_group_id']); | |
262 | pyroutes.register('edit_user_group_perms_summary_json', '/_admin/user_groups/%(user_group_id)s/edit/permissions_summary/json', ['user_group_id']); |
|
263 | pyroutes.register('edit_user_group_perms_summary_json', '/_admin/user_groups/%(user_group_id)s/edit/permissions_summary/json', ['user_group_id']); | |
263 | pyroutes.register('edit_user_group', '/_admin/user_groups/%(user_group_id)s/edit', ['user_group_id']); |
|
264 | pyroutes.register('edit_user_group', '/_admin/user_groups/%(user_group_id)s/edit', ['user_group_id']); | |
264 | pyroutes.register('user_groups_update', '/_admin/user_groups/%(user_group_id)s/update', ['user_group_id']); |
|
265 | pyroutes.register('user_groups_update', '/_admin/user_groups/%(user_group_id)s/update', ['user_group_id']); | |
265 | pyroutes.register('edit_user_group_global_perms', '/_admin/user_groups/%(user_group_id)s/edit/global_permissions', ['user_group_id']); |
|
266 | pyroutes.register('edit_user_group_global_perms', '/_admin/user_groups/%(user_group_id)s/edit/global_permissions', ['user_group_id']); | |
266 | pyroutes.register('edit_user_group_global_perms_update', '/_admin/user_groups/%(user_group_id)s/edit/global_permissions/update', ['user_group_id']); |
|
267 | pyroutes.register('edit_user_group_global_perms_update', '/_admin/user_groups/%(user_group_id)s/edit/global_permissions/update', ['user_group_id']); | |
267 | pyroutes.register('edit_user_group_perms', '/_admin/user_groups/%(user_group_id)s/edit/permissions', ['user_group_id']); |
|
268 | pyroutes.register('edit_user_group_perms', '/_admin/user_groups/%(user_group_id)s/edit/permissions', ['user_group_id']); | |
268 | pyroutes.register('edit_user_group_perms_update', '/_admin/user_groups/%(user_group_id)s/edit/permissions/update', ['user_group_id']); |
|
269 | pyroutes.register('edit_user_group_perms_update', '/_admin/user_groups/%(user_group_id)s/edit/permissions/update', ['user_group_id']); | |
269 | pyroutes.register('edit_user_group_advanced', '/_admin/user_groups/%(user_group_id)s/edit/advanced', ['user_group_id']); |
|
270 | pyroutes.register('edit_user_group_advanced', '/_admin/user_groups/%(user_group_id)s/edit/advanced', ['user_group_id']); | |
270 | pyroutes.register('edit_user_group_advanced_sync', '/_admin/user_groups/%(user_group_id)s/edit/advanced/sync', ['user_group_id']); |
|
271 | pyroutes.register('edit_user_group_advanced_sync', '/_admin/user_groups/%(user_group_id)s/edit/advanced/sync', ['user_group_id']); | |
271 | pyroutes.register('user_groups_delete', '/_admin/user_groups/%(user_group_id)s/delete', ['user_group_id']); |
|
272 | pyroutes.register('user_groups_delete', '/_admin/user_groups/%(user_group_id)s/delete', ['user_group_id']); | |
272 | pyroutes.register('search', '/_admin/search', []); |
|
273 | pyroutes.register('search', '/_admin/search', []); | |
273 | pyroutes.register('search_repo', '/%(repo_name)s/search', ['repo_name']); |
|
274 | pyroutes.register('search_repo', '/%(repo_name)s/search', ['repo_name']); | |
274 | pyroutes.register('user_profile', '/_profiles/%(username)s', ['username']); |
|
275 | pyroutes.register('user_profile', '/_profiles/%(username)s', ['username']); | |
275 | pyroutes.register('my_account_profile', '/_admin/my_account/profile', []); |
|
276 | pyroutes.register('my_account_profile', '/_admin/my_account/profile', []); | |
276 | pyroutes.register('my_account_edit', '/_admin/my_account/edit', []); |
|
277 | pyroutes.register('my_account_edit', '/_admin/my_account/edit', []); | |
277 | pyroutes.register('my_account_update', '/_admin/my_account/update', []); |
|
278 | pyroutes.register('my_account_update', '/_admin/my_account/update', []); | |
278 | pyroutes.register('my_account_password', '/_admin/my_account/password', []); |
|
279 | pyroutes.register('my_account_password', '/_admin/my_account/password', []); | |
279 | pyroutes.register('my_account_password_update', '/_admin/my_account/password/update', []); |
|
280 | pyroutes.register('my_account_password_update', '/_admin/my_account/password/update', []); | |
280 | pyroutes.register('my_account_auth_tokens', '/_admin/my_account/auth_tokens', []); |
|
281 | pyroutes.register('my_account_auth_tokens', '/_admin/my_account/auth_tokens', []); | |
281 | pyroutes.register('my_account_auth_tokens_add', '/_admin/my_account/auth_tokens/new', []); |
|
282 | pyroutes.register('my_account_auth_tokens_add', '/_admin/my_account/auth_tokens/new', []); | |
282 | pyroutes.register('my_account_auth_tokens_delete', '/_admin/my_account/auth_tokens/delete', []); |
|
283 | pyroutes.register('my_account_auth_tokens_delete', '/_admin/my_account/auth_tokens/delete', []); | |
283 | pyroutes.register('my_account_ssh_keys', '/_admin/my_account/ssh_keys', []); |
|
284 | pyroutes.register('my_account_ssh_keys', '/_admin/my_account/ssh_keys', []); | |
284 | pyroutes.register('my_account_ssh_keys_generate', '/_admin/my_account/ssh_keys/generate', []); |
|
285 | pyroutes.register('my_account_ssh_keys_generate', '/_admin/my_account/ssh_keys/generate', []); | |
285 | pyroutes.register('my_account_ssh_keys_add', '/_admin/my_account/ssh_keys/new', []); |
|
286 | pyroutes.register('my_account_ssh_keys_add', '/_admin/my_account/ssh_keys/new', []); | |
286 | pyroutes.register('my_account_ssh_keys_delete', '/_admin/my_account/ssh_keys/delete', []); |
|
287 | pyroutes.register('my_account_ssh_keys_delete', '/_admin/my_account/ssh_keys/delete', []); | |
287 | pyroutes.register('my_account_user_group_membership', '/_admin/my_account/user_group_membership', []); |
|
288 | pyroutes.register('my_account_user_group_membership', '/_admin/my_account/user_group_membership', []); | |
288 | pyroutes.register('my_account_emails', '/_admin/my_account/emails', []); |
|
289 | pyroutes.register('my_account_emails', '/_admin/my_account/emails', []); | |
289 | pyroutes.register('my_account_emails_add', '/_admin/my_account/emails/new', []); |
|
290 | pyroutes.register('my_account_emails_add', '/_admin/my_account/emails/new', []); | |
290 | pyroutes.register('my_account_emails_delete', '/_admin/my_account/emails/delete', []); |
|
291 | pyroutes.register('my_account_emails_delete', '/_admin/my_account/emails/delete', []); | |
291 | pyroutes.register('my_account_repos', '/_admin/my_account/repos', []); |
|
292 | pyroutes.register('my_account_repos', '/_admin/my_account/repos', []); | |
292 | pyroutes.register('my_account_watched', '/_admin/my_account/watched', []); |
|
293 | pyroutes.register('my_account_watched', '/_admin/my_account/watched', []); | |
293 | pyroutes.register('my_account_perms', '/_admin/my_account/perms', []); |
|
294 | pyroutes.register('my_account_perms', '/_admin/my_account/perms', []); | |
294 | pyroutes.register('my_account_notifications', '/_admin/my_account/notifications', []); |
|
295 | pyroutes.register('my_account_notifications', '/_admin/my_account/notifications', []); | |
295 | pyroutes.register('my_account_notifications_toggle_visibility', '/_admin/my_account/toggle_visibility', []); |
|
296 | pyroutes.register('my_account_notifications_toggle_visibility', '/_admin/my_account/toggle_visibility', []); | |
296 | pyroutes.register('my_account_pullrequests', '/_admin/my_account/pull_requests', []); |
|
297 | pyroutes.register('my_account_pullrequests', '/_admin/my_account/pull_requests', []); | |
297 | pyroutes.register('my_account_pullrequests_data', '/_admin/my_account/pull_requests/data', []); |
|
298 | pyroutes.register('my_account_pullrequests_data', '/_admin/my_account/pull_requests/data', []); | |
298 | pyroutes.register('notifications_show_all', '/_admin/notifications', []); |
|
299 | pyroutes.register('notifications_show_all', '/_admin/notifications', []); | |
299 | pyroutes.register('notifications_mark_all_read', '/_admin/notifications/mark_all_read', []); |
|
300 | pyroutes.register('notifications_mark_all_read', '/_admin/notifications/mark_all_read', []); | |
300 | pyroutes.register('notifications_show', '/_admin/notifications/%(notification_id)s', ['notification_id']); |
|
301 | pyroutes.register('notifications_show', '/_admin/notifications/%(notification_id)s', ['notification_id']); | |
301 | pyroutes.register('notifications_update', '/_admin/notifications/%(notification_id)s/update', ['notification_id']); |
|
302 | pyroutes.register('notifications_update', '/_admin/notifications/%(notification_id)s/update', ['notification_id']); | |
302 | pyroutes.register('notifications_delete', '/_admin/notifications/%(notification_id)s/delete', ['notification_id']); |
|
303 | pyroutes.register('notifications_delete', '/_admin/notifications/%(notification_id)s/delete', ['notification_id']); | |
303 | pyroutes.register('my_account_notifications_test_channelstream', '/_admin/my_account/test_channelstream', []); |
|
304 | pyroutes.register('my_account_notifications_test_channelstream', '/_admin/my_account/test_channelstream', []); | |
304 | pyroutes.register('gists_show', '/_admin/gists', []); |
|
305 | pyroutes.register('gists_show', '/_admin/gists', []); | |
305 | pyroutes.register('gists_new', '/_admin/gists/new', []); |
|
306 | pyroutes.register('gists_new', '/_admin/gists/new', []); | |
306 | pyroutes.register('gists_create', '/_admin/gists/create', []); |
|
307 | pyroutes.register('gists_create', '/_admin/gists/create', []); | |
307 | pyroutes.register('gist_show', '/_admin/gists/%(gist_id)s', ['gist_id']); |
|
308 | pyroutes.register('gist_show', '/_admin/gists/%(gist_id)s', ['gist_id']); | |
308 | pyroutes.register('gist_delete', '/_admin/gists/%(gist_id)s/delete', ['gist_id']); |
|
309 | pyroutes.register('gist_delete', '/_admin/gists/%(gist_id)s/delete', ['gist_id']); | |
309 | pyroutes.register('gist_edit', '/_admin/gists/%(gist_id)s/edit', ['gist_id']); |
|
310 | pyroutes.register('gist_edit', '/_admin/gists/%(gist_id)s/edit', ['gist_id']); | |
310 | pyroutes.register('gist_edit_check_revision', '/_admin/gists/%(gist_id)s/edit/check_revision', ['gist_id']); |
|
311 | pyroutes.register('gist_edit_check_revision', '/_admin/gists/%(gist_id)s/edit/check_revision', ['gist_id']); | |
311 | pyroutes.register('gist_update', '/_admin/gists/%(gist_id)s/update', ['gist_id']); |
|
312 | pyroutes.register('gist_update', '/_admin/gists/%(gist_id)s/update', ['gist_id']); | |
312 | pyroutes.register('gist_show_rev', '/_admin/gists/%(gist_id)s/%(revision)s', ['gist_id', 'revision']); |
|
313 | pyroutes.register('gist_show_rev', '/_admin/gists/%(gist_id)s/%(revision)s', ['gist_id', 'revision']); | |
313 | pyroutes.register('gist_show_formatted', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s', ['gist_id', 'revision', 'format']); |
|
314 | pyroutes.register('gist_show_formatted', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s', ['gist_id', 'revision', 'format']); | |
314 | pyroutes.register('gist_show_formatted_path', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s/%(f_path)s', ['gist_id', 'revision', 'format', 'f_path']); |
|
315 | pyroutes.register('gist_show_formatted_path', '/_admin/gists/%(gist_id)s/%(revision)s/%(format)s/%(f_path)s', ['gist_id', 'revision', 'format', 'f_path']); | |
315 | pyroutes.register('debug_style_home', '/_admin/debug_style', []); |
|
316 | pyroutes.register('debug_style_home', '/_admin/debug_style', []); | |
316 | pyroutes.register('debug_style_template', '/_admin/debug_style/t/%(t_path)s', ['t_path']); |
|
317 | pyroutes.register('debug_style_template', '/_admin/debug_style/t/%(t_path)s', ['t_path']); | |
317 | pyroutes.register('apiv2', '/_admin/api', []); |
|
318 | pyroutes.register('apiv2', '/_admin/api', []); | |
318 | } |
|
319 | } |
@@ -1,109 +1,138 b'' | |||||
1 |
|
1 | |||
2 | <div id="update_notice" style="display: none; margin: -40px 0px 20px 0px"> |
|
2 | <div id="update_notice" style="display: none; margin: -40px 0px 20px 0px"> | |
3 | <div>${_('Checking for updates...')}</div> |
|
3 | <div>${_('Checking for updates...')}</div> | |
4 | </div> |
|
4 | </div> | |
5 |
|
5 | |||
6 |
|
6 | |||
7 | <div class="panel panel-default"> |
|
7 | <div class="panel panel-default"> | |
8 | <div class="panel-heading"> |
|
8 | <div class="panel-heading"> | |
9 | <h3 class="panel-title">${_('Gunicorn process management')}</h3> |
|
9 | <h3 class="panel-title">${_('Gunicorn process management')}</h3> | |
10 | <div class="pull-right"> |
|
10 | <div class="pull-right"> | |
11 | <a id="autoRefreshEnable" href="#autoRefreshEnable" onclick="enableAutoRefresh(); return false">${_('start auto refresh')}</a> |
|
11 | <a id="autoRefreshEnable" href="#autoRefreshEnable" onclick="enableAutoRefresh(); return false">${_('start auto refresh')}</a> | |
12 | <a id="autoRefreshDisable" href="#autoRefreshDisable" onclick="disableAutoRefresh(); return false" style="display: none">${_('stop auto refresh')}</a> |
|
12 | <a id="autoRefreshDisable" href="#autoRefreshDisable" onclick="disableAutoRefresh(); return false" style="display: none">${_('stop auto refresh')}</a> | |
13 | </div> |
|
13 | </div> | |
14 | </div> |
|
14 | </div> | |
15 | <div class="panel-body" id="app"> |
|
15 | <div class="panel-body" id="app"> | |
16 | <h3>List of Gunicorn processes on this machine</h3> |
|
16 | <h3>List of Gunicorn processes on this machine</h3> | |
17 | <% |
|
17 | <% | |
18 | def get_name(proc): |
|
18 | def get_name(proc): | |
19 | cmd = ' '.join(proc.cmdline()) |
|
19 | cmd = ' '.join(proc.cmdline()) | |
20 | if 'vcsserver.ini' in cmd: |
|
20 | if 'vcsserver.ini' in cmd: | |
21 | return 'VCSServer' |
|
21 | return 'VCSServer' | |
22 | elif 'rhodecode.ini' in cmd: |
|
22 | elif 'rhodecode.ini' in cmd: | |
23 | return 'RhodeCode' |
|
23 | return 'RhodeCode' | |
24 | return proc.name() |
|
24 | return proc.name() | |
25 | %> |
|
25 | %> | |
26 | <%include file='settings_process_management_data.mako'/> |
|
26 | <%include file='settings_process_management_data.mako'/> | |
27 | </div> |
|
27 | </div> | |
28 | </div> |
|
28 | </div> | |
29 |
|
29 | |||
30 | <script> |
|
30 | <script> | |
31 |
|
31 | |||
32 |
|
32 | |||
33 | restart = function(elem, pid) { |
|
33 | restart = function(elem, pid) { | |
34 |
|
34 | |||
35 | if ($(elem).hasClass('disabled')){ |
|
35 | if ($(elem).hasClass('disabled')){ | |
36 | return; |
|
36 | return; | |
37 | } |
|
37 | } | |
38 | $(elem).addClass('disabled'); |
|
38 | $(elem).addClass('disabled'); | |
39 | $(elem).html('processing...'); |
|
39 | $(elem).html('processing...'); | |
40 |
|
40 | |||
41 | $.ajax({ |
|
41 | $.ajax({ | |
42 | url: pyroutes.url('admin_settings_process_management_signal'), |
|
42 | url: pyroutes.url('admin_settings_process_management_signal'), | |
43 | headers: { |
|
43 | headers: { | |
44 | "X-CSRF-Token": CSRF_TOKEN, |
|
44 | "X-CSRF-Token": CSRF_TOKEN, | |
45 | }, |
|
45 | }, | |
46 | data: JSON.stringify({'pids': [pid]}), |
|
46 | data: JSON.stringify({'pids': [pid]}), | |
47 | dataType: 'json', |
|
47 | dataType: 'json', | |
48 | type: 'POST', |
|
48 | type: 'POST', | |
49 | contentType: "application/json; charset=utf-8", |
|
49 | contentType: "application/json; charset=utf-8", | |
50 | success: function (data) { |
|
50 | success: function (data) { | |
51 | $(elem).html(data.result); |
|
51 | $(elem).html(data.result); | |
52 | $(elem).removeClass('disabled'); |
|
52 | $(elem).removeClass('disabled'); | |
53 | }, |
|
53 | }, | |
54 | failure: function (data) { |
|
54 | failure: function (data) { | |
55 | $(elem).text('FAILED TO LOAD RESULT'); |
|
55 | $(elem).text('FAILED TO LOAD RESULT'); | |
56 | $(elem).removeClass('disabled'); |
|
56 | $(elem).removeClass('disabled'); | |
57 | }, |
|
57 | }, | |
58 | error: function (data) { |
|
58 | error: function (data) { | |
59 | $(elem).text('FAILED TO LOAD RESULT'); |
|
59 | $(elem).text('FAILED TO LOAD RESULT'); | |
60 | $(elem).removeClass('disabled'); |
|
60 | $(elem).removeClass('disabled'); | |
61 | } |
|
61 | } | |
62 | }) |
|
62 | }) | |
63 | }; |
|
63 | }; | |
64 |
|
64 | |||
65 | var intervalID = null; |
|
65 | var intervalID = null; | |
66 | var currentRequest = null; |
|
66 | var currentRequest = null; | |
67 |
|
67 | |||
68 | autoRefresh = function(value) { |
|
68 | autoRefresh = function(value) { | |
69 | var url = pyroutes.url('admin_settings_process_management_data'); |
|
69 | var url = pyroutes.url('admin_settings_process_management_data'); | |
70 | var loadData = function() { |
|
70 | var loadData = function() { | |
71 | currentRequest = $.get(url) |
|
71 | currentRequest = $.get(url) | |
72 | .done(function(data) { |
|
72 | .done(function(data) { | |
73 | currentRequest = null; |
|
73 | currentRequest = null; | |
74 | $('#procList').html(data); |
|
74 | $('#procList').html(data); | |
75 | timeagoActivate(); |
|
75 | timeagoActivate(); | |
76 | var beat = function(doCallback) { |
|
76 | var beat = function(doCallback) { | |
77 | var callback = function () {}; |
|
77 | var callback = function () {}; | |
78 | if (doCallback){ |
|
78 | if (doCallback){ | |
79 | var callback = function () {beat(false)}; |
|
79 | var callback = function () {beat(false)}; | |
80 | } |
|
80 | } | |
81 | $('#processTimeStamp').animate({ |
|
81 | $('#processTimeStamp').animate({ | |
82 | opacity: $('#processTimeStamp').css('opacity') == '1' ? '0.3' : '1' |
|
82 | opacity: $('#processTimeStamp').css('opacity') == '1' ? '0.3' : '1' | |
83 | }, 500, callback); |
|
83 | }, 500, callback); | |
84 | }; |
|
84 | }; | |
85 | beat(true) |
|
85 | beat(true) | |
86 | }); |
|
86 | }); | |
87 | }; |
|
87 | }; | |
88 |
|
88 | |||
89 | if (value) { |
|
89 | if (value) { | |
90 | intervalID = setInterval(loadData, 5000); |
|
90 | intervalID = setInterval(loadData, 5000); | |
91 | } else { |
|
91 | } else { | |
92 | clearInterval(intervalID); |
|
92 | clearInterval(intervalID); | |
93 | } |
|
93 | } | |
94 | }; |
|
94 | }; | |
95 |
|
95 | |||
96 | enableAutoRefresh = function() { |
|
96 | enableAutoRefresh = function() { | |
97 | $('#autoRefreshEnable').hide(); |
|
97 | $('#autoRefreshEnable').hide(); | |
98 | $('#autoRefreshDisable').show(); |
|
98 | $('#autoRefreshDisable').show(); | |
99 | autoRefresh(true) |
|
99 | autoRefresh(true) | |
100 | }; |
|
100 | }; | |
101 |
|
101 | |||
102 | disableAutoRefresh = function() { |
|
102 | disableAutoRefresh = function() { | |
103 | $('#autoRefreshEnable').show(); |
|
103 | $('#autoRefreshEnable').show(); | |
104 | $('#autoRefreshDisable').hide(); |
|
104 | $('#autoRefreshDisable').hide(); | |
105 | autoRefresh(false) |
|
105 | autoRefresh(false) | |
106 | }; |
|
106 | }; | |
107 |
|
107 | |||
|
108 | masterAction = function(pid, action) { | |||
|
109 | $.ajax({ | |||
|
110 | url: pyroutes.url('admin_settings_process_management_master_signal'), | |||
|
111 | headers: { | |||
|
112 | "X-CSRF-Token": CSRF_TOKEN, | |||
|
113 | }, | |||
|
114 | data: JSON.stringify({'pid_data': {'pid': pid, 'action': action}}), | |||
|
115 | dataType: 'json', | |||
|
116 | type: 'POST', | |||
|
117 | contentType: "application/json; charset=utf-8", | |||
|
118 | success: function (data) { | |||
|
119 | ||||
|
120 | }, | |||
|
121 | failure: function (data) { | |||
|
122 | ||||
|
123 | }, | |||
|
124 | error: function (data) { | |||
|
125 | ||||
|
126 | } | |||
|
127 | }) | |||
|
128 | }; | |||
|
129 | ||||
|
130 | addWorker = function(pid) { | |||
|
131 | masterAction(pid, '+'); | |||
|
132 | }; | |||
|
133 | ||||
|
134 | removeWorker = function(pid) { | |||
|
135 | masterAction(pid, '-'); | |||
|
136 | }; | |||
108 |
|
137 | |||
109 | </script> |
|
138 | </script> |
@@ -1,93 +1,95 b'' | |||||
1 |
|
1 | |||
2 | <table id="procList"> |
|
2 | <table id="procList"> | |
3 | <% |
|
3 | <% | |
4 | def get_name(proc): |
|
4 | def get_name(proc): | |
5 | cmd = ' '.join(proc.cmdline()) |
|
5 | cmd = ' '.join(proc.cmdline()) | |
6 | if 'vcsserver.ini' in cmd: |
|
6 | if 'vcsserver.ini' in cmd: | |
7 | return 'VCSServer' |
|
7 | return 'VCSServer' | |
8 | elif 'rhodecode.ini' in cmd: |
|
8 | elif 'rhodecode.ini' in cmd: | |
9 | return 'RhodeCode' |
|
9 | return 'RhodeCode' | |
10 | return proc.name() |
|
10 | return proc.name() | |
11 | %> |
|
11 | %> | |
12 | <tr> |
|
12 | <tr> | |
13 | <td colspan="8"> |
|
13 | <td colspan="8"> | |
14 | <span id="processTimeStamp">${h.format_date(h.datetime.now())}</span> |
|
14 | <span id="processTimeStamp">${h.format_date(h.datetime.now())}</span> | |
15 | </td> |
|
15 | </td> | |
16 | </tr> |
|
16 | </tr> | |
17 | % for proc in c.gunicorn_processes: |
|
17 | % for proc in c.gunicorn_processes: | |
18 | <% mem = proc.memory_info()%> |
|
18 | <% mem = proc.memory_info()%> | |
19 | <% children = proc.children(recursive=True) %> |
|
19 | <% children = proc.children(recursive=True) %> | |
20 | % if children: |
|
20 | % if children: | |
21 |
|
21 | |||
22 | <tr> |
|
22 | <tr> | |
23 | <td> |
|
23 | <td> | |
24 | <code> |
|
24 | <code> | |
25 | ${proc.pid} - ${get_name(proc)} |
|
25 | ${proc.pid} - ${get_name(proc)} | |
26 | </code> |
|
26 | </code> | |
27 | </td> |
|
27 | </td> | |
28 | <td> |
|
28 | <td> | |
29 | <a href="#showCommand" onclick="$('#pid'+${proc.pid}).toggle();return false"> command </a> |
|
29 | <a href="#showCommand" onclick="$('#pid'+${proc.pid}).toggle();return false"> command </a> | |
30 | <code id="pid${proc.pid}" style="display: none"> |
|
30 | <code id="pid${proc.pid}" style="display: none"> | |
31 | ${' '.join(proc.cmdline())} |
|
31 | ${' '.join(proc.cmdline())} | |
32 | </code> |
|
32 | </code> | |
33 | </td> |
|
33 | </td> | |
34 | <td></td> |
|
34 | <td></td> | |
35 | <td> |
|
35 | <td> | |
36 | RSS:${h.format_byte_size_binary(mem.rss)} |
|
36 | RSS:${h.format_byte_size_binary(mem.rss)} | |
37 | </td> |
|
37 | </td> | |
38 | <td> |
|
38 | <td> | |
39 | VMS:${h.format_byte_size_binary(mem.vms)} |
|
39 | VMS:${h.format_byte_size_binary(mem.vms)} | |
40 | </td> |
|
40 | </td> | |
41 | <td> |
|
41 | <td> | |
42 | AGE: ${h.age_component(h.time_to_utcdatetime(proc.create_time()))} |
|
42 | AGE: ${h.age_component(h.time_to_utcdatetime(proc.create_time()))} | |
43 | </td> |
|
43 | </td> | |
44 | <td> |
|
44 | <td> | |
45 | MASTER |
|
45 | MASTER | |
|
46 | % if request.GET.get('dev'): | |||
|
47 | | <a href="#addWorker" onclick="addWorker(${proc.pid}); return false">ADD</a> | <a href="#removeWorker" onclick="removeWorker(${proc.pid}); return false">REMOVE</a> | |||
|
48 | % endif | |||
46 | </td> |
|
49 | </td> | |
47 | </tr> |
|
50 | </tr> | |
48 | <% mem_sum = 0 %> |
|
51 | <% mem_sum = 0 %> | |
49 | % for proc_child in children: |
|
52 | % for proc_child in children: | |
50 | <% mem = proc_child.memory_info()%> |
|
53 | <% mem = proc_child.memory_info()%> | |
51 | <tr> |
|
54 | <tr> | |
52 | <td> |
|
55 | <td> | |
53 | <code> |
|
56 | <code> | |
54 | | ${proc_child.pid} - ${get_name(proc_child)} |
|
57 | | ${proc_child.pid} - ${get_name(proc_child)} | |
55 | </code> |
|
58 | </code> | |
56 | </td> |
|
59 | </td> | |
57 | <td> |
|
60 | <td> | |
58 | <a href="#showCommand" onclick="$('#pid'+${proc_child.pid}).toggle();return false"> command </a> |
|
61 | <a href="#showCommand" onclick="$('#pid'+${proc_child.pid}).toggle();return false"> command </a> | |
59 | <code id="pid${proc_child.pid}" style="display: none"> |
|
62 | <code id="pid${proc_child.pid}" style="display: none"> | |
60 | ${' '.join(proc_child.cmdline())} |
|
63 | ${' '.join(proc_child.cmdline())} | |
61 | </code> |
|
64 | </code> | |
62 | </td> |
|
65 | </td> | |
63 | <td> |
|
66 | <td> | |
64 | CPU: ${proc_child.cpu_percent()} % |
|
67 | CPU: ${proc_child.cpu_percent()} % | |
65 | </td> |
|
68 | </td> | |
66 | <td> |
|
69 | <td> | |
67 | RSS:${h.format_byte_size_binary(mem.rss)} |
|
70 | RSS:${h.format_byte_size_binary(mem.rss)} | |
68 | <% mem_sum += mem.rss %> |
|
71 | <% mem_sum += mem.rss %> | |
69 | </td> |
|
72 | </td> | |
70 | <td> |
|
73 | <td> | |
71 | VMS:${h.format_byte_size_binary(mem.vms)} |
|
74 | VMS:${h.format_byte_size_binary(mem.vms)} | |
72 | </td> |
|
75 | </td> | |
73 | <td> |
|
76 | <td> | |
74 | AGE: ${h.age_component(h.time_to_utcdatetime(proc_child.create_time()))} |
|
77 | AGE: ${h.age_component(h.time_to_utcdatetime(proc_child.create_time()))} | |
75 | </td> |
|
78 | </td> | |
76 | <td> |
|
79 | <td> | |
77 | <a href="#restartProcess" onclick="restart(this, ${proc_child.pid});return false"> |
|
80 | <a href="#restartProcess" onclick="restart(this, ${proc_child.pid});return false"> | |
78 | restart |
|
81 | restart | |
79 | </a> |
|
82 | </a> | |
80 | </td> |
|
83 | </td> | |
81 | </tr> |
|
84 | </tr> | |
82 | % endfor |
|
85 | % endfor | |
83 | <tr> |
|
86 | <tr> | |
84 | <td colspan="2"><code>| total processes: ${len(children)}</code></td> |
|
87 | <td colspan="2"><code>| total processes: ${len(children)}</code></td> | |
85 | <td></td> |
|
88 | <td></td> | |
86 | <td><strong>RSS:${h.format_byte_size_binary(mem_sum)}</strong></td> |
|
89 | <td><strong>RSS:${h.format_byte_size_binary(mem_sum)}</strong></td> | |
87 | <td></td> |
|
90 | <td></td> | |
88 | </tr> |
|
91 | </tr> | |
89 | <tr><td> <code> -- </code> </td></tr> |
|
92 | <tr><td> <code> -- </code> </td></tr> | |
90 |
|
||||
91 | % endif |
|
93 | % endif | |
92 | % endfor |
|
94 | % endfor | |
93 | </table> |
|
95 | </table> |
General Comments 0
You need to be logged in to leave comments.
Login now