Commit 9d290dd68a8665dc4a460543c4cb0df1a1fe4bac
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
3 changed files
with
27 additions
and
2 deletions
Show diff stats
src/colab/local_settings-dev.py
@@ -32,7 +32,7 @@ DATABASES['trac']['HOST'] = 'localhost' | @@ -32,7 +32,7 @@ DATABASES['trac']['HOST'] = 'localhost' | ||
32 | 32 | ||
33 | HAYSTACK_CONNECTIONS['default']['URL'] = 'http://localhost:8983/solr/' | 33 | HAYSTACK_CONNECTIONS['default']['URL'] = 'http://localhost:8983/solr/' |
34 | 34 | ||
35 | -COLAB_TRAC_URL = 'http://localhost:5000/' | 35 | +COLAB_TRAC_URL = 'http://localhost:5000/trac/' |
36 | COLAB_CI_URL = 'http://localhost:8080/ci/' | 36 | COLAB_CI_URL = 'http://localhost:8080/ci/' |
37 | COLAB_GITLAB_URL = 'http://localhost:8090/gitlab/' | 37 | COLAB_GITLAB_URL = 'http://localhost:8090/gitlab/' |
38 | COLAB_REDMINE_URL = 'http://localhost:9080/redmine/' | 38 | COLAB_REDMINE_URL = 'http://localhost:9080/redmine/' |
src/proxy/urls.py
1 | 1 | ||
2 | from django.conf.urls import patterns, include, url | 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, TracProxyView |
5 | 5 | ||
6 | 6 | ||
7 | urlpatterns = patterns('', | 7 | urlpatterns = patterns('', |
@@ -11,4 +11,14 @@ urlpatterns = patterns('', | @@ -11,4 +11,14 @@ urlpatterns = patterns('', | ||
11 | 11 | ||
12 | # Jenkins URLs | 12 | # Jenkins URLs |
13 | url(r'^ci/(?P<path>.*)$', JenkinsProxyView.as_view()), | 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,3 +55,18 @@ class JenkinsProxyView(ProxyView): | ||
55 | diazo_theme_template = 'base.html' | 55 | diazo_theme_template = 'base.html' |
56 | diazo_rules = os.path.join(DIAZO_RULES_DIR, 'jenkins.xml') | 56 | diazo_rules = os.path.join(DIAZO_RULES_DIR, 'jenkins.xml') |
57 | html5 = True | 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 | + |