Commit 677567b648a8da82fefec1a750f8249c15e8b447
1 parent
612163db
Exists in
master
and in
39 other branches
Add routes and proxyViews for Redmine and Gitlab
-Signed-off-by: Lucas Kanashiro <kanashiro.duarte@gmail.com -Signed-off-by: Charles Oliveira <18oliveira.charles@gmail> -Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Showing
2 changed files
with
26 additions
and
1 deletions
Show diff stats
src/proxy/urls.py
1 | 1 | |
2 | 2 | from django.conf.urls import patterns, include, url |
3 | 3 | |
4 | -from .views import TracProxyView, JenkinsProxyView | |
4 | +from .views import ProxyView, JenkinsProxyView, GitlabProxyView, RedmineProxyView | |
5 | 5 | |
6 | 6 | |
7 | 7 | urlpatterns = patterns('', |
... | ... | @@ -11,4 +11,14 @@ urlpatterns = patterns('', |
11 | 11 | |
12 | 12 | # Jenkins URLs |
13 | 13 | url(r'^ci/(?P<path>.*)$', JenkinsProxyView.as_view()), |
14 | + | |
15 | + # Trac | |
16 | + url(r'^trac/(?P<path>.*)$', TracProxyView.as_view()), | |
17 | + | |
18 | + # Gitlab | |
19 | + url(r'^gitlab/(?P<path>.*)$', GitlabProxyView.as_view()), | |
20 | + | |
21 | + # Redmine | |
22 | + url(r'^redmine/(?P<path>.*)$', RedmineProxyView.as_view()) | |
23 | + | |
14 | 24 | ) | ... | ... |
src/proxy/views.py
... | ... | @@ -55,3 +55,18 @@ class JenkinsProxyView(ProxyView): |
55 | 55 | diazo_theme_template = 'base.html' |
56 | 56 | diazo_rules = os.path.join(DIAZO_RULES_DIR, 'jenkins.xml') |
57 | 57 | html5 = True |
58 | + | |
59 | +class GitlabProxyView(ProxyView): | |
60 | + base_url = settings.COLAB_GITLAB_URL | |
61 | + add_remote_user = settings.REVPROXY_ADD_REMOTE_USER | |
62 | + diazo_theme_template = 'proxy/gitlab.html' | |
63 | + diazo_rules = os.path.join(DIAZO_RULES_DIR, 'gitlab.xml') | |
64 | + html5 = True | |
65 | + | |
66 | +class RedmineProxyView(ProxyView): | |
67 | + base_url = settings.COLAB_REDMINE_URL | |
68 | + add_remote_user = settings.REVPROXY_ADD_REMOTE_USER | |
69 | + diazo_theme_template = 'proxy/redmine.html' | |
70 | + diazo_rules = os.path.join(DIAZO_RULES_DIR, 'redmine.xml') | |
71 | + html5 = True | |
72 | + | ... | ... |