diff --git a/hobo/environment/forms.py b/hobo/environment/forms.py index 804b96c..ca81df9 100644 --- a/hobo/environment/forms.py +++ b/hobo/environment/forms.py @@ -4,7 +4,7 @@ from django.template.defaultfilters import slugify from django.utils.crypto import get_random_string from django.utils.translation import ugettext_lazy as _ -from .models import Authentic, Wcs, Passerelle, Variable +from .models import Authentic, Wcs, Passerelle, Variable, Combo SECRET_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)' EXCLUDED_FIELDS = ('slug', 'last_operational_check_timestamp', @@ -74,6 +74,12 @@ class PasserelleForm(BaseForm): exclude = EXCLUDED_FIELDS +class ComboForm(BaseForm): + class Meta: + model = Combo + exclude = EXCLUDED_FIELDS + + class VariableForm(forms.ModelForm): class Meta: model = Variable diff --git a/hobo/environment/models.py b/hobo/environment/models.py index f32aeb9..f13b42b 100644 --- a/hobo/environment/models.py +++ b/hobo/environment/models.py @@ -167,7 +167,21 @@ class Passerelle(ServiceBase): Zone(self.title, 'webservices', self.base_url + '/manage/') ] -AVAILABLE_SERVICES = [Authentic, Wcs, Passerelle] + +class Combo(ServiceBase): + class Meta: + verbose_name = _('Combo Portal') + verbose_name_plural = _('Combo Portals') + + class Extra: + service_id = 'combo' + + def get_admin_zones(self): + return [ + Zone(self.title, 'portal', self.base_url + '/manage/') + ] + +AVAILABLE_SERVICES = [Authentic, Wcs, Passerelle, Combo] @receiver(post_save) diff --git a/hobo/environment/views.py b/hobo/environment/views.py index 334128f..ed85b61 100644 --- a/hobo/environment/views.py +++ b/hobo/environment/views.py @@ -8,7 +8,7 @@ from django.shortcuts import get_object_or_404 from django.views.generic.base import TemplateView from django.views.generic.edit import CreateView, UpdateView, DeleteView -from .models import Variable, Authentic, Wcs, Passerelle, AVAILABLE_SERVICES +from .models import Variable, Authentic, Wcs, Passerelle, Combo, AVAILABLE_SERVICES from . import forms, utils @@ -140,7 +140,8 @@ def operational_check_view(request, service, slug, **kwargs): klass = { 'wcs': Wcs, 'authentic': Authentic, - 'passerelle': Passerelle + 'passerelle': Passerelle, + 'combo': Combo, }.get(service) if klass is None: diff --git a/hobo/static/css/style.css b/hobo/static/css/style.css index 364e822..81af1ca 100644 --- a/hobo/static/css/style.css +++ b/hobo/static/css/style.css @@ -13,6 +13,9 @@ li.zone-webforms a:hover { background-image: url(../img/icon-webforms-hover.png) li.zone-webservices a { background-image: url(../img/icon-webservices.png); } li.zone-webservices a:hover { background-image: url(../img/icon-webservices-hover.png); } +li.zone-portal a { background-image: url(../img/icon-portal.png); } +li.zone-portal a:hover { background-image: url(../img/icon-portal-hover.png); } + p.being-deployed { background: url(indicator.gif) no-repeat; padding-left: 2em; @@ -55,4 +58,4 @@ ul.login li ul.errorlist { ul.login label { float: left; width: 10em; -} \ No newline at end of file +} diff --git a/hobo/static/img/icon-portal-hover.png b/hobo/static/img/icon-portal-hover.png new file mode 100644 index 0000000..67bebfd Binary files /dev/null and b/hobo/static/img/icon-portal-hover.png differ diff --git a/hobo/static/img/icon-portal.png b/hobo/static/img/icon-portal.png new file mode 100644 index 0000000..a3b7c19 Binary files /dev/null and b/hobo/static/img/icon-portal.png differ