add combo services (#6461)
This commit is contained in:
parent
0f080ad8d1
commit
74673fa6fa
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Loading…
Reference in New Issue