Fix Compose Service appearance.
And add validation to full_service_name field. Only alphanumeric and dots are allowed. Change-Id: I61e3ed8b5ec4d04eb39dc6cf210c5d1b9c2bb1d1
This commit is contained in:
parent
023675ff92
commit
4b070eaa46
|
@ -15,7 +15,7 @@
|
|||
import logging
|
||||
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.forms import MediaDefiningClass
|
||||
from django.forms import MediaDefiningClass, RegexField
|
||||
from .utils import Action, CheckboxInput, FILE_STEPS
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
|
@ -29,7 +29,8 @@ log = logging.getLogger(__name__)
|
|||
class EditManifest(Action):
|
||||
service_display_name = forms.CharField(label=_('Service Name'),
|
||||
required=True)
|
||||
full_service_name = forms.CharField(
|
||||
full_service_name = forms.RegexField(
|
||||
r'^[a-zA-Z0-9.]+$',
|
||||
label=_('Fully Qualified Service Name'), required=True)
|
||||
version = forms.CharField(label=_('Version'), initial='1')
|
||||
enabled = forms.BooleanField(label=_('Active'), initial=True,
|
||||
|
|
|
@ -1,2 +1,7 @@
|
|||
{% load i18n %}
|
||||
<p>{% blocktrans %} Here will be some info about manifest fields.{% endblocktrans %}</p>
|
||||
<p>{% blocktrans %}<strong>Service Name:</strong> is a human-readable service name.
|
||||
{% endblocktrans %}</p>
|
||||
<p>{% blocktrans %}<strong>Fully Qualified Service Name:</strong> is an internal service name. It should be unique and can contain only alphanumeric symbols and dots.{% endblocktrans %}</p>
|
||||
<p>{% blocktrans %}<strong>Version:</strong> is a service version.{% endblocktrans %}</p>
|
||||
<p>{% blocktrans %}<strong>Active:</strong> whether this service should be visible for users or not.{% endblocktrans %}</p>
|
||||
<p>{% blocktrans %}<strong>Description:</strong> add text information about service. It will appear in service creation form in the Environments panel.{% endblocktrans %}</p>
|
||||
|
|
Loading…
Reference in New Issue