Rename Resource Name to Instance ID
All checks were successful
Tests / test (push) Successful in 35s
All checks were successful
Tests / test (push) Successful in 35s
This commit is contained in:
parent
820de7e470
commit
f3986a875a
5 changed files with 7 additions and 7 deletions
|
|
@ -27,7 +27,7 @@ class Migration(migrations.Migration):
|
|||
field=models.CharField(
|
||||
max_length=63,
|
||||
validators=[servala.core.validators.kubernetes_name_validator],
|
||||
verbose_name="Resource Name",
|
||||
verbose_name="Instance ID",
|
||||
),
|
||||
),
|
||||
# Add display_name field with a temporary default
|
||||
|
|
|
|||
|
|
@ -620,7 +620,7 @@ class ServiceInstance(ServalaModelMixin, models.Model):
|
|||
# creation and is auto-generated for new instances. Do not modify directly!
|
||||
name = models.CharField(
|
||||
max_length=63,
|
||||
verbose_name=_("Resource Name"),
|
||||
verbose_name=_("Instance ID"),
|
||||
validators=[kubernetes_name_validator],
|
||||
)
|
||||
display_name = models.CharField(
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class ServiceInstanceFilterForm(forms.Form):
|
|||
|
||||
class ServiceInstanceDeleteForm(forms.ModelForm):
|
||||
name = forms.CharField(
|
||||
label=_("Resource Name"),
|
||||
label=_("Instance ID"),
|
||||
max_length=63,
|
||||
widget=forms.TextInput(attrs={"class": "form-control"}),
|
||||
)
|
||||
|
|
@ -132,7 +132,7 @@ class ServiceInstanceDeleteForm(forms.ModelForm):
|
|||
kwargs["initial"] = {"name": ""}
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields["name"].help_text = _(
|
||||
"To confirm deletion, please type the resource name: <strong>{instance_name}</strong>"
|
||||
"To confirm deletion, please type the instance ID: <strong>{instance_name}</strong>"
|
||||
).format(instance_name=self.instance.name)
|
||||
|
||||
def clean_name(self):
|
||||
|
|
@ -140,7 +140,7 @@ class ServiceInstanceDeleteForm(forms.ModelForm):
|
|||
if entered_name != self.instance.name:
|
||||
raise forms.ValidationError(
|
||||
_(
|
||||
"The entered name does not match the resource name. Deletion not confirmed."
|
||||
"The entered name does not match the instance ID. Deletion not confirmed."
|
||||
)
|
||||
)
|
||||
return entered_name
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-sm-4">{% translate "Resource Name" %}</dt>
|
||||
<dt class="col-sm-4">{% translate "Instance ID" %}</dt>
|
||||
<dd class="col-sm-8">
|
||||
<code>{{ instance.name }}</code>
|
||||
</dd>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th>{% translate "Name" %}</th>
|
||||
<th>{% translate "Resource Name" %}</th>
|
||||
<th>{% translate "Instance ID" %}</th>
|
||||
<th>{% translate "Service" %}</th>
|
||||
<th>{% translate "Service Provider" %}</th>
|
||||
<th>{% translate "Service Provider Zone" %}</th>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue