Show More
@@ -0,0 +1,19 b'' | |||
|
1 | # -*- coding: utf-8 -*- | |
|
2 | ||
|
3 | # Copyright (C) 2016-2017 RhodeCode GmbH | |
|
4 | # | |
|
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 | |
|
7 | # (only), as published by the Free Software Foundation. | |
|
8 | # | |
|
9 | # This program is distributed in the hope that it will be useful, | |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
|
12 | # GNU General Public License for more details. | |
|
13 | # | |
|
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/>. | |
|
16 | # | |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ No newline at end of file |
@@ -1,192 +1,192 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | from rhodecode.apps.admin.navigation import NavigationRegistry |
|
23 | 23 | from rhodecode.config.routing import ADMIN_PREFIX |
|
24 | 24 | from rhodecode.lib.utils2 import str2bool |
|
25 | 25 | |
|
26 | 26 | |
|
27 | 27 | def admin_routes(config): |
|
28 | 28 | """ |
|
29 | 29 | Admin prefixed routes |
|
30 | 30 | """ |
|
31 | 31 | |
|
32 | 32 | config.add_route( |
|
33 | 33 | name='admin_audit_logs', |
|
34 | 34 | pattern='/audit_logs') |
|
35 | 35 | |
|
36 | 36 | config.add_route( |
|
37 | 37 | name='pull_requests_global_0', # backward compat |
|
38 | 38 | pattern='/pull_requests/{pull_request_id:\d+}') |
|
39 | 39 | config.add_route( |
|
40 | 40 | name='pull_requests_global_1', # backward compat |
|
41 | 41 | pattern='/pull-requests/{pull_request_id:\d+}') |
|
42 | 42 | config.add_route( |
|
43 | 43 | name='pull_requests_global', |
|
44 | 44 | pattern='/pull-request/{pull_request_id:\d+}') |
|
45 | 45 | |
|
46 | 46 | config.add_route( |
|
47 | 47 | name='admin_settings_open_source', |
|
48 | 48 | pattern='/settings/open_source') |
|
49 | 49 | config.add_route( |
|
50 | 50 | name='admin_settings_vcs_svn_generate_cfg', |
|
51 | 51 | pattern='/settings/vcs/svn_generate_cfg') |
|
52 | 52 | |
|
53 | 53 | config.add_route( |
|
54 | 54 | name='admin_settings_system', |
|
55 | 55 | pattern='/settings/system') |
|
56 | 56 | config.add_route( |
|
57 | 57 | name='admin_settings_system_update', |
|
58 | 58 | pattern='/settings/system/updates') |
|
59 | 59 | |
|
60 | 60 | config.add_route( |
|
61 | 61 | name='admin_settings_sessions', |
|
62 | 62 | pattern='/settings/sessions') |
|
63 | 63 | config.add_route( |
|
64 | 64 | name='admin_settings_sessions_cleanup', |
|
65 | 65 | pattern='/settings/sessions/cleanup') |
|
66 | 66 | |
|
67 | 67 | config.add_route( |
|
68 | 68 | name='admin_settings_process_management', |
|
69 | 69 | pattern='/settings/process_management') |
|
70 | 70 | config.add_route( |
|
71 | 71 | name='admin_settings_process_management_signal', |
|
72 | 72 | pattern='/settings/process_management/signal') |
|
73 | 73 | |
|
74 | 74 | # global permissions |
|
75 | 75 | |
|
76 | 76 | config.add_route( |
|
77 | 77 | name='admin_permissions_application', |
|
78 | 78 | pattern='/permissions/application') |
|
79 | 79 | config.add_route( |
|
80 | 80 | name='admin_permissions_application_update', |
|
81 | 81 | pattern='/permissions/application/update') |
|
82 | 82 | |
|
83 | 83 | config.add_route( |
|
84 | 84 | name='admin_permissions_global', |
|
85 | 85 | pattern='/permissions/global') |
|
86 | 86 | config.add_route( |
|
87 | 87 | name='admin_permissions_global_update', |
|
88 | 88 | pattern='/permissions/global/update') |
|
89 | 89 | |
|
90 | 90 | config.add_route( |
|
91 | 91 | name='admin_permissions_object', |
|
92 | 92 | pattern='/permissions/object') |
|
93 | 93 | config.add_route( |
|
94 | 94 | name='admin_permissions_object_update', |
|
95 | 95 | pattern='/permissions/object/update') |
|
96 | 96 | |
|
97 | 97 | config.add_route( |
|
98 | 98 | name='admin_permissions_ips', |
|
99 | 99 | pattern='/permissions/ips') |
|
100 | 100 | |
|
101 | 101 | config.add_route( |
|
102 | 102 | name='admin_permissions_overview', |
|
103 | 103 | pattern='/permissions/overview') |
|
104 | 104 | |
|
105 | 105 | config.add_route( |
|
106 | 106 | name='admin_permissions_auth_token_access', |
|
107 | 107 | pattern='/permissions/auth_token_access') |
|
108 | 108 | |
|
109 | 109 | # users admin |
|
110 | 110 | config.add_route( |
|
111 | 111 | name='users', |
|
112 | 112 | pattern='/users') |
|
113 | 113 | |
|
114 | 114 | config.add_route( |
|
115 | 115 | name='users_data', |
|
116 | 116 | pattern='/users_data') |
|
117 | 117 | |
|
118 | 118 | # user auth tokens |
|
119 | 119 | config.add_route( |
|
120 | 120 | name='edit_user_auth_tokens', |
|
121 | 121 | pattern='/users/{user_id:\d+}/edit/auth_tokens') |
|
122 | 122 | config.add_route( |
|
123 | 123 | name='edit_user_auth_tokens_add', |
|
124 | 124 | pattern='/users/{user_id:\d+}/edit/auth_tokens/new') |
|
125 | 125 | config.add_route( |
|
126 | 126 | name='edit_user_auth_tokens_delete', |
|
127 | 127 | pattern='/users/{user_id:\d+}/edit/auth_tokens/delete') |
|
128 | 128 | |
|
129 | 129 | # user emails |
|
130 | 130 | config.add_route( |
|
131 | 131 | name='edit_user_emails', |
|
132 | 132 | pattern='/users/{user_id:\d+}/edit/emails') |
|
133 | 133 | config.add_route( |
|
134 | 134 | name='edit_user_emails_add', |
|
135 | 135 | pattern='/users/{user_id:\d+}/edit/emails/new') |
|
136 | 136 | config.add_route( |
|
137 | 137 | name='edit_user_emails_delete', |
|
138 | 138 | pattern='/users/{user_id:\d+}/edit/emails/delete') |
|
139 | 139 | |
|
140 | 140 | # user IPs |
|
141 | 141 | config.add_route( |
|
142 | 142 | name='edit_user_ips', |
|
143 | 143 | pattern='/users/{user_id:\d+}/edit/ips') |
|
144 | 144 | config.add_route( |
|
145 | 145 | name='edit_user_ips_add', |
|
146 | 146 | pattern='/users/{user_id:\d+}/edit/ips/new') |
|
147 | 147 | config.add_route( |
|
148 | 148 | name='edit_user_ips_delete', |
|
149 | 149 | pattern='/users/{user_id:\d+}/edit/ips/delete') |
|
150 | 150 | |
|
151 | 151 | # user groups management |
|
152 | 152 | config.add_route( |
|
153 | 153 | name='edit_user_groups_management', |
|
154 | 154 | pattern='/users/{user_id:\d+}/edit/groups_management') |
|
155 | 155 | |
|
156 | 156 | config.add_route( |
|
157 | 157 | name='edit_user_groups_management_updates', |
|
158 | 158 | pattern='/users/{user_id:\d+}/edit/edit_user_groups_management/updates') |
|
159 | 159 | |
|
160 | 160 | # user audit logs |
|
161 | 161 | config.add_route( |
|
162 | 162 | name='edit_user_audit_logs', |
|
163 | 163 | pattern='/users/{user_id:\d+}/edit/audit') |
|
164 | 164 | |
|
165 | 165 | # user groups admin |
|
166 | 166 | config.add_route( |
|
167 | 167 | name='user_groups', |
|
168 | 168 | pattern='/user_groups') |
|
169 | 169 | |
|
170 | 170 | config.add_route( |
|
171 | 171 | name='user_groups_data', |
|
172 | 172 | pattern='/user_groups_data') |
|
173 | 173 | |
|
174 | 174 | config.add_route( |
|
175 | 175 | name='user_group_members_data', |
|
176 | 176 | pattern='/user_groups/{user_group_id:\d+}/members') |
|
177 | 177 | |
|
178 | 178 | |
|
179 | 179 | def includeme(config): |
|
180 | 180 | settings = config.get_settings() |
|
181 | 181 | |
|
182 | 182 | # Create admin navigation registry and add it to the pyramid registry. |
|
183 | 183 | labs_active = str2bool(settings.get('labs_settings_active', False)) |
|
184 | 184 | navigation_registry = NavigationRegistry(labs_active=labs_active) |
|
185 | 185 | config.registry.registerUtility(navigation_registry) |
|
186 | 186 | |
|
187 | 187 | # main admin routes |
|
188 | 188 | config.add_route(name='admin_home', pattern=ADMIN_PREFIX) |
|
189 | 189 | config.include(admin_routes, route_prefix=ADMIN_PREFIX) |
|
190 | 190 | |
|
191 | 191 | # Scan module for configuration decorators. |
|
192 | config.scan() | |
|
192 | config.scan('.views', ignore='.tests') |
@@ -1,90 +1,90 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2010-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | import os |
|
22 | 22 | |
|
23 | 23 | from pyramid.settings import asbool |
|
24 | 24 | |
|
25 | 25 | from rhodecode.config.routing import ADMIN_PREFIX |
|
26 | 26 | from rhodecode.lib.ext_json import json |
|
27 | 27 | |
|
28 | 28 | |
|
29 | 29 | def url_gen(request): |
|
30 | 30 | registry = request.registry |
|
31 | 31 | longpoll_url = registry.settings.get('channelstream.longpoll_url', '') |
|
32 | 32 | ws_url = registry.settings.get('channelstream.ws_url', '') |
|
33 | 33 | proxy_url = request.route_url('channelstream_proxy') |
|
34 | 34 | urls = { |
|
35 | 35 | 'connect': request.route_path('channelstream_connect'), |
|
36 | 36 | 'subscribe': request.route_path('channelstream_subscribe'), |
|
37 | 37 | 'longpoll': longpoll_url or proxy_url, |
|
38 | 38 | 'ws': ws_url or proxy_url.replace('http', 'ws') |
|
39 | 39 | } |
|
40 | 40 | return json.dumps(urls) |
|
41 | 41 | |
|
42 | 42 | |
|
43 | 43 | PLUGIN_DEFINITION = { |
|
44 | 44 | 'name': 'channelstream', |
|
45 | 45 | 'config': { |
|
46 | 46 | 'javascript': [], |
|
47 | 47 | 'css': [], |
|
48 | 48 | 'template_hooks': { |
|
49 | 49 | 'plugin_init_template': 'rhodecode:templates/channelstream/plugin_init.mako' |
|
50 | 50 | }, |
|
51 | 51 | 'url_gen': url_gen, |
|
52 | 52 | 'static': None, |
|
53 | 53 | 'enabled': False, |
|
54 | 54 | 'server': '', |
|
55 | 55 | 'secret': '' |
|
56 | 56 | } |
|
57 | 57 | } |
|
58 | 58 | |
|
59 | 59 | |
|
60 | 60 | def includeme(config): |
|
61 | 61 | settings = config.registry.settings |
|
62 | 62 | PLUGIN_DEFINITION['config']['enabled'] = asbool( |
|
63 | 63 | settings.get('channelstream.enabled')) |
|
64 | 64 | PLUGIN_DEFINITION['config']['server'] = settings.get( |
|
65 | 65 | 'channelstream.server', '') |
|
66 | 66 | PLUGIN_DEFINITION['config']['secret'] = settings.get( |
|
67 | 67 | 'channelstream.secret', '') |
|
68 | 68 | PLUGIN_DEFINITION['config']['history.location'] = settings.get( |
|
69 | 69 | 'channelstream.history.location', '') |
|
70 | 70 | config.register_rhodecode_plugin( |
|
71 | 71 | PLUGIN_DEFINITION['name'], |
|
72 | 72 | PLUGIN_DEFINITION['config'] |
|
73 | 73 | ) |
|
74 | 74 | # create plugin history location |
|
75 | 75 | history_dir = PLUGIN_DEFINITION['config']['history.location'] |
|
76 | 76 | if history_dir and not os.path.exists(history_dir): |
|
77 | 77 | os.makedirs(history_dir, 0750) |
|
78 | 78 | |
|
79 | 79 | config.add_route( |
|
80 | 80 | name='channelstream_connect', |
|
81 | 81 | pattern=ADMIN_PREFIX + '/channelstream/connect') |
|
82 | 82 | config.add_route( |
|
83 | 83 | name='channelstream_subscribe', |
|
84 | 84 | pattern=ADMIN_PREFIX + '/channelstream/subscribe') |
|
85 | 85 | config.add_route( |
|
86 | 86 | name='channelstream_proxy', |
|
87 | 87 | pattern=settings.get('channelstream.proxy_path') or '/_channelstream') |
|
88 | 88 | |
|
89 | 89 | # Scan module for configuration decorators. |
|
90 | config.scan() | |
|
90 | config.scan('.views', ignore='.tests') |
@@ -1,42 +1,42 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | from rhodecode.apps._base import ADMIN_PREFIX |
|
21 | 21 | from rhodecode.lib.utils2 import str2bool |
|
22 | 22 | |
|
23 | 23 | |
|
24 | 24 | def debug_style_enabled(info, request): |
|
25 | 25 | return str2bool(request.registry.settings.get('debug_style')) |
|
26 | 26 | |
|
27 | 27 | |
|
28 | 28 | def includeme(config): |
|
29 | 29 | config.add_route( |
|
30 | 30 | name='debug_style_home', |
|
31 | 31 | pattern=ADMIN_PREFIX + '/debug_style', |
|
32 | 32 | custom_predicates=(debug_style_enabled,)) |
|
33 | 33 | config.add_route( |
|
34 | 34 | name='debug_style_template', |
|
35 | 35 | pattern=ADMIN_PREFIX + '/debug_style/t/{t_path}', |
|
36 | 36 | custom_predicates=(debug_style_enabled,)) |
|
37 | 37 | |
|
38 | 38 | # Scan module for configuration decorators. |
|
39 | config.scan() | |
|
39 | config.scan('.views', ignore='.tests') | |
|
40 | 40 | |
|
41 | 41 | |
|
42 | 42 |
@@ -1,62 +1,62 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | from rhodecode.apps._base import ADMIN_PREFIX |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | def admin_routes(config): |
|
24 | 24 | config.add_route( |
|
25 | 25 | name='gists_show', pattern='/gists') |
|
26 | 26 | config.add_route( |
|
27 | 27 | name='gists_new', pattern='/gists/new') |
|
28 | 28 | config.add_route( |
|
29 | 29 | name='gists_create', pattern='/gists/create') |
|
30 | 30 | |
|
31 | 31 | config.add_route( |
|
32 | 32 | name='gist_show', pattern='/gists/{gist_id}') |
|
33 | 33 | |
|
34 | 34 | config.add_route( |
|
35 | 35 | name='gist_delete', pattern='/gists/{gist_id}/delete') |
|
36 | 36 | |
|
37 | 37 | config.add_route( |
|
38 | 38 | name='gist_edit', pattern='/gists/{gist_id}/edit') |
|
39 | 39 | |
|
40 | 40 | config.add_route( |
|
41 | 41 | name='gist_edit_check_revision', |
|
42 | 42 | pattern='/gists/{gist_id}/edit/check_revision') |
|
43 | 43 | |
|
44 | 44 | config.add_route( |
|
45 | 45 | name='gist_update', pattern='/gists/{gist_id}/update') |
|
46 | 46 | |
|
47 | 47 | config.add_route( |
|
48 | 48 | name='gist_show_rev', |
|
49 | 49 | pattern='/gists/{gist_id}/{revision}') |
|
50 | 50 | config.add_route( |
|
51 | 51 | name='gist_show_formatted', |
|
52 | 52 | pattern='/gists/{gist_id}/{revision}/{format}') |
|
53 | 53 | |
|
54 | 54 | config.add_route( |
|
55 | 55 | name='gist_show_formatted_path', |
|
56 | 56 | pattern='/gists/{gist_id}/{revision}/{format}/{f_path:.*}') |
|
57 | 57 | |
|
58 | 58 | |
|
59 | 59 | def includeme(config): |
|
60 | 60 | config.include(admin_routes, route_prefix=ADMIN_PREFIX) |
|
61 | 61 | # Scan module for configuration decorators. |
|
62 | config.scan() | |
|
62 | config.scan('.views', ignore='.tests') |
@@ -1,49 +1,49 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | from rhodecode.config import routing_links |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | def includeme(config): |
|
24 | 24 | |
|
25 | 25 | config.add_route( |
|
26 | 26 | name='home', |
|
27 | 27 | pattern='/') |
|
28 | 28 | |
|
29 | 29 | config.add_route( |
|
30 | 30 | name='user_autocomplete_data', |
|
31 | 31 | pattern='/_users') |
|
32 | 32 | |
|
33 | 33 | config.add_route( |
|
34 | 34 | name='user_group_autocomplete_data', |
|
35 | 35 | pattern='/_user_groups') |
|
36 | 36 | |
|
37 | 37 | config.add_route( |
|
38 | 38 | name='repo_list_data', |
|
39 | 39 | pattern='/_repos') |
|
40 | 40 | |
|
41 | 41 | config.add_route( |
|
42 | 42 | name='goto_switcher_data', |
|
43 | 43 | pattern='/_goto_data') |
|
44 | 44 | |
|
45 | 45 | # register our static links via redirection mechanism |
|
46 | 46 | routing_links.connect_redirection_links(config) |
|
47 | 47 | |
|
48 | 48 | # Scan module for configuration decorators. |
|
49 | config.scan() | |
|
49 | config.scan('.views', ignore='.tests') |
@@ -1,53 +1,53 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | from rhodecode.apps._base import ADMIN_PREFIX |
|
23 | 23 | |
|
24 | 24 | |
|
25 | 25 | def admin_routes(config): |
|
26 | 26 | |
|
27 | 27 | config.add_route( |
|
28 | 28 | name='journal', pattern='/journal') |
|
29 | 29 | config.add_route( |
|
30 | 30 | name='journal_rss', pattern='/journal/rss') |
|
31 | 31 | config.add_route( |
|
32 | 32 | name='journal_atom', pattern='/journal/atom') |
|
33 | 33 | |
|
34 | 34 | config.add_route( |
|
35 | 35 | name='journal_public', pattern='/public_journal') |
|
36 | 36 | config.add_route( |
|
37 | 37 | name='journal_public_atom', pattern='/public_journal/atom') |
|
38 | 38 | config.add_route( |
|
39 | 39 | name='journal_public_atom_old', pattern='/public_journal_atom') |
|
40 | 40 | |
|
41 | 41 | config.add_route( |
|
42 | 42 | name='journal_public_rss', pattern='/public_journal/rss') |
|
43 | 43 | config.add_route( |
|
44 | 44 | name='journal_public_rss_old', pattern='/public_journal_rss') |
|
45 | 45 | |
|
46 | 46 | config.add_route( |
|
47 | 47 | name='toggle_following', pattern='/toggle_following') |
|
48 | 48 | |
|
49 | 49 | |
|
50 | 50 | def includeme(config): |
|
51 | 51 | config.include(admin_routes, route_prefix=ADMIN_PREFIX) |
|
52 | 52 | # Scan module for configuration decorators. |
|
53 | config.scan() No newline at end of file | |
|
53 | config.scan('.views', ignore='.tests') |
@@ -1,44 +1,44 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | from rhodecode.config.routing import ADMIN_PREFIX |
|
23 | 23 | |
|
24 | 24 | |
|
25 | 25 | def includeme(config): |
|
26 | 26 | |
|
27 | 27 | config.add_route( |
|
28 | 28 | name='login', |
|
29 | 29 | pattern=ADMIN_PREFIX + '/login') |
|
30 | 30 | config.add_route( |
|
31 | 31 | name='logout', |
|
32 | 32 | pattern=ADMIN_PREFIX + '/logout') |
|
33 | 33 | config.add_route( |
|
34 | 34 | name='register', |
|
35 | 35 | pattern=ADMIN_PREFIX + '/register') |
|
36 | 36 | config.add_route( |
|
37 | 37 | name='reset_password', |
|
38 | 38 | pattern=ADMIN_PREFIX + '/password_reset') |
|
39 | 39 | config.add_route( |
|
40 | 40 | name='reset_password_confirmation', |
|
41 | 41 | pattern=ADMIN_PREFIX + '/password_reset_confirmation') |
|
42 | 42 | |
|
43 | 43 | # Scan module for configuration decorators. |
|
44 | config.scan() | |
|
44 | config.scan('.views', ignore='.tests') |
@@ -1,126 +1,126 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | from rhodecode.apps._base import ADMIN_PREFIX |
|
23 | 23 | |
|
24 | 24 | |
|
25 | 25 | def includeme(config): |
|
26 | 26 | |
|
27 | 27 | config.add_route( |
|
28 | 28 | name='my_account_profile', |
|
29 | 29 | pattern=ADMIN_PREFIX + '/my_account/profile') |
|
30 | 30 | |
|
31 | 31 | # my account edit details |
|
32 | 32 | config.add_route( |
|
33 | 33 | name='my_account_edit', |
|
34 | 34 | pattern=ADMIN_PREFIX + '/my_account/edit') |
|
35 | 35 | config.add_route( |
|
36 | 36 | name='my_account_update', |
|
37 | 37 | pattern=ADMIN_PREFIX + '/my_account/update') |
|
38 | 38 | |
|
39 | 39 | # my account password |
|
40 | 40 | config.add_route( |
|
41 | 41 | name='my_account_password', |
|
42 | 42 | pattern=ADMIN_PREFIX + '/my_account/password') |
|
43 | 43 | |
|
44 | 44 | config.add_route( |
|
45 | 45 | name='my_account_password_update', |
|
46 | 46 | pattern=ADMIN_PREFIX + '/my_account/password/update') |
|
47 | 47 | |
|
48 | 48 | # my account tokens |
|
49 | 49 | config.add_route( |
|
50 | 50 | name='my_account_auth_tokens', |
|
51 | 51 | pattern=ADMIN_PREFIX + '/my_account/auth_tokens') |
|
52 | 52 | config.add_route( |
|
53 | 53 | name='my_account_auth_tokens_add', |
|
54 | 54 | pattern=ADMIN_PREFIX + '/my_account/auth_tokens/new') |
|
55 | 55 | config.add_route( |
|
56 | 56 | name='my_account_auth_tokens_delete', |
|
57 | 57 | pattern=ADMIN_PREFIX + '/my_account/auth_tokens/delete') |
|
58 | 58 | |
|
59 | 59 | # my account emails |
|
60 | 60 | config.add_route( |
|
61 | 61 | name='my_account_emails', |
|
62 | 62 | pattern=ADMIN_PREFIX + '/my_account/emails') |
|
63 | 63 | config.add_route( |
|
64 | 64 | name='my_account_emails_add', |
|
65 | 65 | pattern=ADMIN_PREFIX + '/my_account/emails/new') |
|
66 | 66 | config.add_route( |
|
67 | 67 | name='my_account_emails_delete', |
|
68 | 68 | pattern=ADMIN_PREFIX + '/my_account/emails/delete') |
|
69 | 69 | |
|
70 | 70 | config.add_route( |
|
71 | 71 | name='my_account_repos', |
|
72 | 72 | pattern=ADMIN_PREFIX + '/my_account/repos') |
|
73 | 73 | |
|
74 | 74 | config.add_route( |
|
75 | 75 | name='my_account_watched', |
|
76 | 76 | pattern=ADMIN_PREFIX + '/my_account/watched') |
|
77 | 77 | |
|
78 | 78 | config.add_route( |
|
79 | 79 | name='my_account_perms', |
|
80 | 80 | pattern=ADMIN_PREFIX + '/my_account/perms') |
|
81 | 81 | |
|
82 | 82 | config.add_route( |
|
83 | 83 | name='my_account_notifications', |
|
84 | 84 | pattern=ADMIN_PREFIX + '/my_account/notifications') |
|
85 | 85 | |
|
86 | 86 | config.add_route( |
|
87 | 87 | name='my_account_notifications_toggle_visibility', |
|
88 | 88 | pattern=ADMIN_PREFIX + '/my_account/toggle_visibility') |
|
89 | 89 | |
|
90 | 90 | # my account pull requests |
|
91 | 91 | config.add_route( |
|
92 | 92 | name='my_account_pullrequests', |
|
93 | 93 | pattern=ADMIN_PREFIX + '/my_account/pull_requests') |
|
94 | 94 | config.add_route( |
|
95 | 95 | name='my_account_pullrequests_data', |
|
96 | 96 | pattern=ADMIN_PREFIX + '/my_account/pull_requests/data') |
|
97 | 97 | |
|
98 | 98 | # notifications |
|
99 | 99 | config.add_route( |
|
100 | 100 | name='notifications_show_all', |
|
101 | 101 | pattern=ADMIN_PREFIX + '/notifications') |
|
102 | 102 | |
|
103 | 103 | # notifications |
|
104 | 104 | config.add_route( |
|
105 | 105 | name='notifications_mark_all_read', |
|
106 | 106 | pattern=ADMIN_PREFIX + '/notifications/mark_all_read') |
|
107 | 107 | |
|
108 | 108 | config.add_route( |
|
109 | 109 | name='notifications_show', |
|
110 | 110 | pattern=ADMIN_PREFIX + '/notifications/{notification_id}') |
|
111 | 111 | |
|
112 | 112 | config.add_route( |
|
113 | 113 | name='notifications_update', |
|
114 | 114 | pattern=ADMIN_PREFIX + '/notifications/{notification_id}/update') |
|
115 | 115 | |
|
116 | 116 | config.add_route( |
|
117 | 117 | name='notifications_delete', |
|
118 | 118 | pattern=ADMIN_PREFIX + '/notifications/{notification_id}/delete') |
|
119 | 119 | |
|
120 | 120 | # channelstream test |
|
121 | 121 | config.add_route( |
|
122 | 122 | name='my_account_notifications_test_channelstream', |
|
123 | 123 | pattern=ADMIN_PREFIX + '/my_account/test_channelstream') |
|
124 | 124 | |
|
125 | 125 | # Scan module for configuration decorators. |
|
126 | config.scan() | |
|
126 | config.scan('.views', ignore='.tests') |
@@ -1,41 +1,41 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | from rhodecode.config.routing import ADMIN_PREFIX |
|
22 | 22 | |
|
23 | 23 | |
|
24 | 24 | def admin_routes(config): |
|
25 | 25 | config.add_route( |
|
26 | 26 | name='ops_ping', |
|
27 | 27 | pattern='/ping') |
|
28 | 28 | config.add_route( |
|
29 | 29 | name='ops_error_test', |
|
30 | 30 | pattern='/error') |
|
31 | 31 | config.add_route( |
|
32 | 32 | name='ops_redirect_test', |
|
33 | 33 | pattern='/redirect') |
|
34 | 34 | |
|
35 | 35 | |
|
36 | 36 | def includeme(config): |
|
37 | 37 | |
|
38 | 38 | config.include(admin_routes, route_prefix=ADMIN_PREFIX + '/ops') |
|
39 | 39 | |
|
40 | 40 | # Scan module for configuration decorators. |
|
41 | config.scan() | |
|
41 | config.scan('.views', ignore='.tests') |
@@ -1,33 +1,33 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | from rhodecode.apps._base import add_route_with_slash |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | def includeme(config): |
|
24 | 24 | |
|
25 | 25 | # Summary |
|
26 | 26 | add_route_with_slash( |
|
27 | 27 | config, |
|
28 | 28 | name='repo_group_home', |
|
29 | 29 | pattern='/{repo_group_name:.*?[^/]}', repo_group_route=True) |
|
30 | 30 | |
|
31 | 31 | # Scan module for configuration decorators. |
|
32 | config.scan() | |
|
32 | config.scan('.views', ignore='.tests') | |
|
33 | 33 |
@@ -1,387 +1,387 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | from rhodecode.apps._base import add_route_with_slash |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | def includeme(config): |
|
24 | 24 | |
|
25 | 25 | # repo creating checks, special cases that aren't repo routes |
|
26 | 26 | config.add_route( |
|
27 | 27 | name='repo_creating', |
|
28 | 28 | pattern='/{repo_name:.*?[^/]}/repo_creating') |
|
29 | 29 | |
|
30 | 30 | config.add_route( |
|
31 | 31 | name='repo_creating_check', |
|
32 | 32 | pattern='/{repo_name:.*?[^/]}/repo_creating_check') |
|
33 | 33 | |
|
34 | 34 | # Summary |
|
35 | 35 | # NOTE(marcink): one additional route is defined in very bottom, catch |
|
36 | 36 | # all pattern |
|
37 | 37 | config.add_route( |
|
38 | 38 | name='repo_summary_explicit', |
|
39 | 39 | pattern='/{repo_name:.*?[^/]}/summary', repo_route=True) |
|
40 | 40 | config.add_route( |
|
41 | 41 | name='repo_summary_commits', |
|
42 | 42 | pattern='/{repo_name:.*?[^/]}/summary-commits', repo_route=True) |
|
43 | 43 | |
|
44 | 44 | # Commits |
|
45 | 45 | config.add_route( |
|
46 | 46 | name='repo_commit', |
|
47 | 47 | pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}', repo_route=True) |
|
48 | 48 | |
|
49 | 49 | config.add_route( |
|
50 | 50 | name='repo_commit_children', |
|
51 | 51 | pattern='/{repo_name:.*?[^/]}/changeset_children/{commit_id}', repo_route=True) |
|
52 | 52 | |
|
53 | 53 | config.add_route( |
|
54 | 54 | name='repo_commit_parents', |
|
55 | 55 | pattern='/{repo_name:.*?[^/]}/changeset_parents/{commit_id}', repo_route=True) |
|
56 | 56 | |
|
57 | 57 | config.add_route( |
|
58 | 58 | name='repo_commit_raw', |
|
59 | 59 | pattern='/{repo_name:.*?[^/]}/changeset-diff/{commit_id}', repo_route=True) |
|
60 | 60 | |
|
61 | 61 | config.add_route( |
|
62 | 62 | name='repo_commit_patch', |
|
63 | 63 | pattern='/{repo_name:.*?[^/]}/changeset-patch/{commit_id}', repo_route=True) |
|
64 | 64 | |
|
65 | 65 | config.add_route( |
|
66 | 66 | name='repo_commit_download', |
|
67 | 67 | pattern='/{repo_name:.*?[^/]}/changeset-download/{commit_id}', repo_route=True) |
|
68 | 68 | |
|
69 | 69 | config.add_route( |
|
70 | 70 | name='repo_commit_data', |
|
71 | 71 | pattern='/{repo_name:.*?[^/]}/changeset-data/{commit_id}', repo_route=True) |
|
72 | 72 | |
|
73 | 73 | config.add_route( |
|
74 | 74 | name='repo_commit_comment_create', |
|
75 | 75 | pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/create', repo_route=True) |
|
76 | 76 | |
|
77 | 77 | config.add_route( |
|
78 | 78 | name='repo_commit_comment_preview', |
|
79 | 79 | pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/preview', repo_route=True) |
|
80 | 80 | |
|
81 | 81 | config.add_route( |
|
82 | 82 | name='repo_commit_comment_delete', |
|
83 | 83 | pattern='/{repo_name:.*?[^/]}/changeset/{commit_id}/comment/{comment_id}/delete', repo_route=True) |
|
84 | 84 | |
|
85 | 85 | # still working url for backward compat. |
|
86 | 86 | config.add_route( |
|
87 | 87 | name='repo_commit_raw_deprecated', |
|
88 | 88 | pattern='/{repo_name:.*?[^/]}/raw-changeset/{commit_id}', repo_route=True) |
|
89 | 89 | |
|
90 | 90 | # Files |
|
91 | 91 | config.add_route( |
|
92 | 92 | name='repo_archivefile', |
|
93 | 93 | pattern='/{repo_name:.*?[^/]}/archive/{fname}', repo_route=True) |
|
94 | 94 | |
|
95 | 95 | config.add_route( |
|
96 | 96 | name='repo_files_diff', |
|
97 | 97 | pattern='/{repo_name:.*?[^/]}/diff/{f_path:.*}', repo_route=True) |
|
98 | 98 | config.add_route( # legacy route to make old links work |
|
99 | 99 | name='repo_files_diff_2way_redirect', |
|
100 | 100 | pattern='/{repo_name:.*?[^/]}/diff-2way/{f_path:.*}', repo_route=True) |
|
101 | 101 | |
|
102 | 102 | config.add_route( |
|
103 | 103 | name='repo_files', |
|
104 | 104 | pattern='/{repo_name:.*?[^/]}/files/{commit_id}/{f_path:.*}', repo_route=True) |
|
105 | 105 | config.add_route( |
|
106 | 106 | name='repo_files:default_path', |
|
107 | 107 | pattern='/{repo_name:.*?[^/]}/files/{commit_id}/', repo_route=True) |
|
108 | 108 | config.add_route( |
|
109 | 109 | name='repo_files:default_commit', |
|
110 | 110 | pattern='/{repo_name:.*?[^/]}/files', repo_route=True) |
|
111 | 111 | |
|
112 | 112 | config.add_route( |
|
113 | 113 | name='repo_files:rendered', |
|
114 | 114 | pattern='/{repo_name:.*?[^/]}/render/{commit_id}/{f_path:.*}', repo_route=True) |
|
115 | 115 | |
|
116 | 116 | config.add_route( |
|
117 | 117 | name='repo_files:annotated', |
|
118 | 118 | pattern='/{repo_name:.*?[^/]}/annotate/{commit_id}/{f_path:.*}', repo_route=True) |
|
119 | 119 | config.add_route( |
|
120 | 120 | name='repo_files:annotated_previous', |
|
121 | 121 | pattern='/{repo_name:.*?[^/]}/annotate-previous/{commit_id}/{f_path:.*}', repo_route=True) |
|
122 | 122 | |
|
123 | 123 | config.add_route( |
|
124 | 124 | name='repo_nodetree_full', |
|
125 | 125 | pattern='/{repo_name:.*?[^/]}/nodetree_full/{commit_id}/{f_path:.*}', repo_route=True) |
|
126 | 126 | config.add_route( |
|
127 | 127 | name='repo_nodetree_full:default_path', |
|
128 | 128 | pattern='/{repo_name:.*?[^/]}/nodetree_full/{commit_id}/', repo_route=True) |
|
129 | 129 | |
|
130 | 130 | config.add_route( |
|
131 | 131 | name='repo_files_nodelist', |
|
132 | 132 | pattern='/{repo_name:.*?[^/]}/nodelist/{commit_id}/{f_path:.*}', repo_route=True) |
|
133 | 133 | |
|
134 | 134 | config.add_route( |
|
135 | 135 | name='repo_file_raw', |
|
136 | 136 | pattern='/{repo_name:.*?[^/]}/raw/{commit_id}/{f_path:.*}', repo_route=True) |
|
137 | 137 | |
|
138 | 138 | config.add_route( |
|
139 | 139 | name='repo_file_download', |
|
140 | 140 | pattern='/{repo_name:.*?[^/]}/download/{commit_id}/{f_path:.*}', repo_route=True) |
|
141 | 141 | config.add_route( # backward compat to keep old links working |
|
142 | 142 | name='repo_file_download:legacy', |
|
143 | 143 | pattern='/{repo_name:.*?[^/]}/rawfile/{commit_id}/{f_path:.*}', |
|
144 | 144 | repo_route=True) |
|
145 | 145 | |
|
146 | 146 | config.add_route( |
|
147 | 147 | name='repo_file_history', |
|
148 | 148 | pattern='/{repo_name:.*?[^/]}/history/{commit_id}/{f_path:.*}', repo_route=True) |
|
149 | 149 | |
|
150 | 150 | config.add_route( |
|
151 | 151 | name='repo_file_authors', |
|
152 | 152 | pattern='/{repo_name:.*?[^/]}/authors/{commit_id}/{f_path:.*}', repo_route=True) |
|
153 | 153 | |
|
154 | 154 | config.add_route( |
|
155 | 155 | name='repo_files_remove_file', |
|
156 | 156 | pattern='/{repo_name:.*?[^/]}/remove_file/{commit_id}/{f_path:.*}', |
|
157 | 157 | repo_route=True) |
|
158 | 158 | config.add_route( |
|
159 | 159 | name='repo_files_delete_file', |
|
160 | 160 | pattern='/{repo_name:.*?[^/]}/delete_file/{commit_id}/{f_path:.*}', |
|
161 | 161 | repo_route=True) |
|
162 | 162 | config.add_route( |
|
163 | 163 | name='repo_files_edit_file', |
|
164 | 164 | pattern='/{repo_name:.*?[^/]}/edit_file/{commit_id}/{f_path:.*}', |
|
165 | 165 | repo_route=True) |
|
166 | 166 | config.add_route( |
|
167 | 167 | name='repo_files_update_file', |
|
168 | 168 | pattern='/{repo_name:.*?[^/]}/update_file/{commit_id}/{f_path:.*}', |
|
169 | 169 | repo_route=True) |
|
170 | 170 | config.add_route( |
|
171 | 171 | name='repo_files_add_file', |
|
172 | 172 | pattern='/{repo_name:.*?[^/]}/add_file/{commit_id}/{f_path:.*}', |
|
173 | 173 | repo_route=True) |
|
174 | 174 | config.add_route( |
|
175 | 175 | name='repo_files_create_file', |
|
176 | 176 | pattern='/{repo_name:.*?[^/]}/create_file/{commit_id}/{f_path:.*}', |
|
177 | 177 | repo_route=True) |
|
178 | 178 | |
|
179 | 179 | # Refs data |
|
180 | 180 | config.add_route( |
|
181 | 181 | name='repo_refs_data', |
|
182 | 182 | pattern='/{repo_name:.*?[^/]}/refs-data', repo_route=True) |
|
183 | 183 | |
|
184 | 184 | config.add_route( |
|
185 | 185 | name='repo_refs_changelog_data', |
|
186 | 186 | pattern='/{repo_name:.*?[^/]}/refs-data-changelog', repo_route=True) |
|
187 | 187 | |
|
188 | 188 | config.add_route( |
|
189 | 189 | name='repo_stats', |
|
190 | 190 | pattern='/{repo_name:.*?[^/]}/repo_stats/{commit_id}', repo_route=True) |
|
191 | 191 | |
|
192 | 192 | # Changelog |
|
193 | 193 | config.add_route( |
|
194 | 194 | name='repo_changelog', |
|
195 | 195 | pattern='/{repo_name:.*?[^/]}/changelog', repo_route=True) |
|
196 | 196 | config.add_route( |
|
197 | 197 | name='repo_changelog_file', |
|
198 | 198 | pattern='/{repo_name:.*?[^/]}/changelog/{commit_id}/{f_path:.*}', repo_route=True) |
|
199 | 199 | config.add_route( |
|
200 | 200 | name='repo_changelog_elements', |
|
201 | 201 | pattern='/{repo_name:.*?[^/]}/changelog_elements', repo_route=True) |
|
202 | 202 | |
|
203 | 203 | # Compare |
|
204 | 204 | config.add_route( |
|
205 | 205 | name='repo_compare_select', |
|
206 | 206 | pattern='/{repo_name:.*?[^/]}/compare', repo_route=True) |
|
207 | 207 | |
|
208 | 208 | config.add_route( |
|
209 | 209 | name='repo_compare', |
|
210 | 210 | pattern='/{repo_name:.*?[^/]}/compare/{source_ref_type}@{source_ref:.*?}...{target_ref_type}@{target_ref:.*?}', repo_route=True) |
|
211 | 211 | |
|
212 | 212 | # Tags |
|
213 | 213 | config.add_route( |
|
214 | 214 | name='tags_home', |
|
215 | 215 | pattern='/{repo_name:.*?[^/]}/tags', repo_route=True) |
|
216 | 216 | |
|
217 | 217 | # Branches |
|
218 | 218 | config.add_route( |
|
219 | 219 | name='branches_home', |
|
220 | 220 | pattern='/{repo_name:.*?[^/]}/branches', repo_route=True) |
|
221 | 221 | |
|
222 | 222 | # Bookmarks |
|
223 | 223 | config.add_route( |
|
224 | 224 | name='bookmarks_home', |
|
225 | 225 | pattern='/{repo_name:.*?[^/]}/bookmarks', repo_route=True) |
|
226 | 226 | |
|
227 | 227 | # Forks |
|
228 | 228 | config.add_route( |
|
229 | 229 | name='repo_fork_new', |
|
230 | 230 | pattern='/{repo_name:.*?[^/]}/fork', repo_route=True, |
|
231 | 231 | repo_accepted_types=['hg', 'git']) |
|
232 | 232 | |
|
233 | 233 | config.add_route( |
|
234 | 234 | name='repo_fork_create', |
|
235 | 235 | pattern='/{repo_name:.*?[^/]}/fork/create', repo_route=True, |
|
236 | 236 | repo_accepted_types=['hg', 'git']) |
|
237 | 237 | |
|
238 | 238 | config.add_route( |
|
239 | 239 | name='repo_forks_show_all', |
|
240 | 240 | pattern='/{repo_name:.*?[^/]}/forks', repo_route=True, |
|
241 | 241 | repo_accepted_types=['hg', 'git']) |
|
242 | 242 | config.add_route( |
|
243 | 243 | name='repo_forks_data', |
|
244 | 244 | pattern='/{repo_name:.*?[^/]}/forks/data', repo_route=True, |
|
245 | 245 | repo_accepted_types=['hg', 'git']) |
|
246 | 246 | |
|
247 | 247 | # Pull Requests |
|
248 | 248 | config.add_route( |
|
249 | 249 | name='pullrequest_show', |
|
250 | 250 | pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}', |
|
251 | 251 | repo_route=True) |
|
252 | 252 | |
|
253 | 253 | config.add_route( |
|
254 | 254 | name='pullrequest_show_all', |
|
255 | 255 | pattern='/{repo_name:.*?[^/]}/pull-request', |
|
256 | 256 | repo_route=True, repo_accepted_types=['hg', 'git']) |
|
257 | 257 | |
|
258 | 258 | config.add_route( |
|
259 | 259 | name='pullrequest_show_all_data', |
|
260 | 260 | pattern='/{repo_name:.*?[^/]}/pull-request-data', |
|
261 | 261 | repo_route=True, repo_accepted_types=['hg', 'git']) |
|
262 | 262 | |
|
263 | 263 | config.add_route( |
|
264 | 264 | name='pullrequest_repo_refs', |
|
265 | 265 | pattern='/{repo_name:.*?[^/]}/pull-request/refs/{target_repo_name:.*?[^/]}', |
|
266 | 266 | repo_route=True) |
|
267 | 267 | |
|
268 | 268 | config.add_route( |
|
269 | 269 | name='pullrequest_repo_destinations', |
|
270 | 270 | pattern='/{repo_name:.*?[^/]}/pull-request/repo-destinations', |
|
271 | 271 | repo_route=True) |
|
272 | 272 | |
|
273 | 273 | config.add_route( |
|
274 | 274 | name='pullrequest_new', |
|
275 | 275 | pattern='/{repo_name:.*?[^/]}/pull-request/new', |
|
276 | 276 | repo_route=True, repo_accepted_types=['hg', 'git']) |
|
277 | 277 | |
|
278 | 278 | config.add_route( |
|
279 | 279 | name='pullrequest_create', |
|
280 | 280 | pattern='/{repo_name:.*?[^/]}/pull-request/create', |
|
281 | 281 | repo_route=True, repo_accepted_types=['hg', 'git']) |
|
282 | 282 | |
|
283 | 283 | config.add_route( |
|
284 | 284 | name='pullrequest_update', |
|
285 | 285 | pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/update', |
|
286 | 286 | repo_route=True) |
|
287 | 287 | |
|
288 | 288 | config.add_route( |
|
289 | 289 | name='pullrequest_merge', |
|
290 | 290 | pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/merge', |
|
291 | 291 | repo_route=True) |
|
292 | 292 | |
|
293 | 293 | config.add_route( |
|
294 | 294 | name='pullrequest_delete', |
|
295 | 295 | pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/delete', |
|
296 | 296 | repo_route=True) |
|
297 | 297 | |
|
298 | 298 | config.add_route( |
|
299 | 299 | name='pullrequest_comment_create', |
|
300 | 300 | pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/comment', |
|
301 | 301 | repo_route=True) |
|
302 | 302 | |
|
303 | 303 | config.add_route( |
|
304 | 304 | name='pullrequest_comment_delete', |
|
305 | 305 | pattern='/{repo_name:.*?[^/]}/pull-request/{pull_request_id:\d+}/comment/{comment_id}/delete', |
|
306 | 306 | repo_route=True, repo_accepted_types=['hg', 'git']) |
|
307 | 307 | |
|
308 | 308 | # Settings |
|
309 | 309 | config.add_route( |
|
310 | 310 | name='edit_repo', |
|
311 | 311 | pattern='/{repo_name:.*?[^/]}/settings', repo_route=True) |
|
312 | 312 | |
|
313 | 313 | # Settings advanced |
|
314 | 314 | config.add_route( |
|
315 | 315 | name='edit_repo_advanced', |
|
316 | 316 | pattern='/{repo_name:.*?[^/]}/settings/advanced', repo_route=True) |
|
317 | 317 | config.add_route( |
|
318 | 318 | name='edit_repo_advanced_delete', |
|
319 | 319 | pattern='/{repo_name:.*?[^/]}/settings/advanced/delete', repo_route=True) |
|
320 | 320 | config.add_route( |
|
321 | 321 | name='edit_repo_advanced_locking', |
|
322 | 322 | pattern='/{repo_name:.*?[^/]}/settings/advanced/locking', repo_route=True) |
|
323 | 323 | config.add_route( |
|
324 | 324 | name='edit_repo_advanced_journal', |
|
325 | 325 | pattern='/{repo_name:.*?[^/]}/settings/advanced/journal', repo_route=True) |
|
326 | 326 | config.add_route( |
|
327 | 327 | name='edit_repo_advanced_fork', |
|
328 | 328 | pattern='/{repo_name:.*?[^/]}/settings/advanced/fork', repo_route=True) |
|
329 | 329 | |
|
330 | 330 | # Caches |
|
331 | 331 | config.add_route( |
|
332 | 332 | name='edit_repo_caches', |
|
333 | 333 | pattern='/{repo_name:.*?[^/]}/settings/caches', repo_route=True) |
|
334 | 334 | |
|
335 | 335 | # Permissions |
|
336 | 336 | config.add_route( |
|
337 | 337 | name='edit_repo_perms', |
|
338 | 338 | pattern='/{repo_name:.*?[^/]}/settings/permissions', repo_route=True) |
|
339 | 339 | |
|
340 | 340 | # Repo Review Rules |
|
341 | 341 | config.add_route( |
|
342 | 342 | name='repo_reviewers', |
|
343 | 343 | pattern='/{repo_name:.*?[^/]}/settings/review/rules', repo_route=True) |
|
344 | 344 | |
|
345 | 345 | config.add_route( |
|
346 | 346 | name='repo_default_reviewers_data', |
|
347 | 347 | pattern='/{repo_name:.*?[^/]}/settings/review/default-reviewers', repo_route=True) |
|
348 | 348 | |
|
349 | 349 | # Maintenance |
|
350 | 350 | config.add_route( |
|
351 | 351 | name='repo_maintenance', |
|
352 | 352 | pattern='/{repo_name:.*?[^/]}/settings/maintenance', repo_route=True) |
|
353 | 353 | |
|
354 | 354 | config.add_route( |
|
355 | 355 | name='repo_maintenance_execute', |
|
356 | 356 | pattern='/{repo_name:.*?[^/]}/settings/maintenance/execute', repo_route=True) |
|
357 | 357 | |
|
358 | 358 | # Strip |
|
359 | 359 | config.add_route( |
|
360 | 360 | name='strip', |
|
361 | 361 | pattern='/{repo_name:.*?[^/]}/settings/strip', repo_route=True) |
|
362 | 362 | |
|
363 | 363 | config.add_route( |
|
364 | 364 | name='strip_check', |
|
365 | 365 | pattern='/{repo_name:.*?[^/]}/settings/strip_check', repo_route=True) |
|
366 | 366 | |
|
367 | 367 | config.add_route( |
|
368 | 368 | name='strip_execute', |
|
369 | 369 | pattern='/{repo_name:.*?[^/]}/settings/strip_execute', repo_route=True) |
|
370 | 370 | |
|
371 | 371 | # ATOM/RSS Feed |
|
372 | 372 | config.add_route( |
|
373 | 373 | name='rss_feed_home', |
|
374 | 374 | pattern='/{repo_name:.*?[^/]}/feed/rss', repo_route=True) |
|
375 | 375 | |
|
376 | 376 | config.add_route( |
|
377 | 377 | name='atom_feed_home', |
|
378 | 378 | pattern='/{repo_name:.*?[^/]}/feed/atom', repo_route=True) |
|
379 | 379 | |
|
380 | 380 | # NOTE(marcink): needs to be at the end for catch-all |
|
381 | 381 | add_route_with_slash( |
|
382 | 382 | config, |
|
383 | 383 | name='repo_summary', |
|
384 | 384 | pattern='/{repo_name:.*?[^/]}', repo_route=True) |
|
385 | 385 | |
|
386 | 386 | # Scan module for configuration decorators. |
|
387 | config.scan() | |
|
387 | config.scan('.views', ignore='.tests') |
@@ -1,44 +1,34 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | from rhodecode.apps._base import ADMIN_PREFIX |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | def includeme(config): |
|
24 | 24 | |
|
25 | 25 | config.add_route( |
|
26 | 26 | name='search', |
|
27 | 27 | pattern=ADMIN_PREFIX + '/search') |
|
28 | 28 | |
|
29 | 29 | config.add_route( |
|
30 | 30 | name='search_repo', |
|
31 | 31 | pattern='/{repo_name:.*?[^/]}/search', repo_route=True) |
|
32 | 32 | |
|
33 | 33 | # Scan module for configuration decorators. |
|
34 | config.scan() | |
|
35 | ||
|
36 | ||
|
37 | # # FULL TEXT SEARCH | |
|
38 | # rmap.connect('search', '%s/search' % (ADMIN_PREFIX,), | |
|
39 | # controller='search') | |
|
40 | # rmap.connect('search_repo_home', '/{repo_name}/search', | |
|
41 | # controller='search', | |
|
42 | # action='index', | |
|
43 | # conditions={'function': check_repo}, | |
|
44 | # requirements=URL_NAME_REQUIREMENTS) No newline at end of file | |
|
34 | config.scan('.views', ignore='.tests') |
@@ -1,28 +1,28 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | def includeme(config): |
|
23 | 23 | config.add_route( |
|
24 | 24 | name='user_profile', |
|
25 | 25 | pattern='/_profiles/{username}') |
|
26 | 26 | |
|
27 | 27 | # Scan module for configuration decorators. |
|
28 | config.scan() | |
|
28 | config.scan('.views', ignore='.tests') |
General Comments 0
You need to be logged in to leave comments.
Login now