Commit 1d92158ca876a2805a4f46ab5f7984e941a271c3

Authored by Sergio Oliveira
1 parent 2be27bf9

Moved gitlab, jenkins and redmine to django apps

src/proxy/admin.py
... ... @@ -1,3 +0,0 @@
1   -from django.contrib import admin
2   -
3   -# Register your models here.
src/proxy/gitlab/__init__.py 0 → 100644
src/proxy/gitlab/admin.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.contrib import admin
  2 +
  3 +# Register your models here.
... ...
src/proxy/gitlab/models.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.db import models
  2 +
  3 +# Create your models here.
... ...
src/proxy/gitlab/tests.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.test import TestCase
  2 +
  3 +# Create your tests here.
... ...
src/proxy/gitlab/urls.py 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +
  2 +from django.conf.urls import patterns, url
  3 +
  4 +from .views import GitlabProxyView
  5 +
  6 +
  7 +urlpatterns = patterns('',
  8 + # Gitlab URLs
  9 + url(r'^gitlab/(?P<path>.*)$', GitlabProxyView.as_view()),
  10 +)
... ...
src/proxy/gitlab/views.py 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +
  2 +from django.conf import settings
  3 +
  4 +from ..utils import ColabProxyView
  5 +
  6 +
  7 +class GitlabProxyView(ColabProxyView):
  8 + upstream = settings.COLAB_GITLAB_URL
  9 + diazo_theme_template = 'proxy/gitlab.html'
... ...
src/proxy/jenkins/__init__.py 0 → 100644
src/proxy/jenkins/admin.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.contrib import admin
  2 +
  3 +# Register your models here.
... ...
src/proxy/jenkins/models.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.db import models
  2 +
  3 +# Create your models here.
... ...
src/proxy/jenkins/tests.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.test import TestCase
  2 +
  3 +# Create your tests here.
... ...
src/proxy/jenkins/urls.py 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +
  2 +from django.conf.urls import patterns, url
  3 +
  4 +from .views import JenkinsProxyView
  5 +
  6 +
  7 +urlpatterns = patterns('',
  8 + # Jenkins URLs
  9 + url(r'^ci/(?P<path>.*)$', JenkinsProxyView.as_view()),
  10 +)
... ...
src/proxy/jenkins/views.py 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +
  2 +from django.conf import settings
  3 +
  4 +from ..utils import ColabProxyView
  5 +
  6 +
  7 +class JenkinsProxyView(ColabProxyView):
  8 + upstream = settings.COLAB_CI_URL
... ...
src/proxy/redmine/__init__.py 0 → 100644
src/proxy/redmine/admin.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.contrib import admin
  2 +
  3 +# Register your models here.
... ...
src/proxy/redmine/models.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.db import models
  2 +
  3 +# Create your models here.
... ...
src/proxy/redmine/tests.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.test import TestCase
  2 +
  3 +# Create your tests here.
... ...
src/proxy/redmine/urls.py 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +
  2 +from django.conf.urls import patterns, url
  3 +
  4 +from .views import RedmineProxyView
  5 +
  6 +
  7 +urlpatterns = patterns('',
  8 + # RedmineProxyView URLs
  9 + url(r'^redmine/(?P<path>.*)$', RedmineProxyView.as_view()),
  10 +)
... ...
src/proxy/redmine/views.py 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +
  2 +from django.conf import settings
  3 +
  4 +from ..utils import ColabProxyView
  5 +
  6 +
  7 +class RedmineProxyView(ColabProxyView):
  8 + upstream = settings.COLAB_REDMINE_URL
  9 + diazo_theme_template = 'proxy/redmine.html'
... ...
src/proxy/tests.py
... ... @@ -1,3 +0,0 @@
1   -from django.test import TestCase
2   -
3   -# Create your tests here.
src/proxy/urls.py
... ... @@ -1,16 +0,0 @@
1   -
2   -from django.conf.urls import patterns, include, url
3   -
4   -from .views import JenkinsProxyView, GitlabProxyView, RedmineProxyView
5   -
6   -
7   -urlpatterns = patterns('',
8   - # Jenkins URLs
9   - url(r'^ci/(?P<path>.*)$', JenkinsProxyView.as_view()),
10   -
11   - # Gitlab
12   - url(r'^gitlab/(?P<path>.*)$', GitlabProxyView.as_view()),
13   -
14   - # Redmine
15   - url(r'^redmine/(?P<path>.*)$', RedmineProxyView.as_view())
16   -)
src/proxy/views.py
... ... @@ -1,33 +0,0 @@
1   -
2   -import os
3   -
4   -from django.conf import settings
5   -
6   -from revproxy.views import ProxyView
7   -
8   -
9   -CWD = os.path.abspath(os.path.dirname(__file__))
10   -DIAZO_RULES_DIR = os.path.join(CWD, 'diazo')
11   -
12   -
13   -class JenkinsProxyView(ProxyView):
14   - base_url = settings.COLAB_CI_URL
15   - add_remote_user = settings.REVPROXY_ADD_REMOTE_USER
16   - diazo_theme_template = 'base.html'
17   - diazo_rules = os.path.join(DIAZO_RULES_DIR, 'jenkins.xml')
18   - html5 = True
19   -
20   -class GitlabProxyView(ProxyView):
21   - base_url = settings.COLAB_GITLAB_URL
22   - add_remote_user = settings.REVPROXY_ADD_REMOTE_USER
23   - diazo_theme_template = 'proxy/gitlab.html'
24   - diazo_rules = os.path.join(DIAZO_RULES_DIR, 'gitlab.xml')
25   - html5 = True
26   -
27   -class RedmineProxyView(ProxyView):
28   - base_url = settings.COLAB_REDMINE_URL
29   - add_remote_user = settings.REVPROXY_ADD_REMOTE_USER
30   - diazo_theme_template = 'proxy/redmine.html'
31   - diazo_rules = os.path.join(DIAZO_RULES_DIR, 'redmine.xml')
32   - html5 = True
33   -