summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasco Kaliyamoorthy <masco.kaliyamoorthy@enovance.com>2015-04-09 15:13:51 +0530
committerMasco Kaliyamoorthy <masco.kaliyamoorthy@enovance.com>2015-04-09 15:13:51 +0530
commit5ea6c57fac05d9c516216619983805e666d3edc3 (patch)
tree311fe2b34efd1093493601dff4b5f3c05f73887a
parent68b2a05b58cfbb38d5ec0c182d6fe3859d18fcea (diff)
downloadhorizon-5ea6c57fac05d9c516216619983805e666d3edc3.tar.gz
added network id field in update network model
In update network model, only name field is shown. Since duplicate name is allowed, it is difficult to differentiate the two with same name. This patch adding the readonly text input to show the network id. Change-Id: I15096b65d6b410e36d7eb5d99c767b9dc8e801a1 Closes-Bug: #1442031
-rw-r--r--openstack_dashboard/dashboards/project/networks/forms.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/openstack_dashboard/dashboards/project/networks/forms.py b/openstack_dashboard/dashboards/project/networks/forms.py
index 2c151c768..480fda2f0 100644
--- a/openstack_dashboard/dashboards/project/networks/forms.py
+++ b/openstack_dashboard/dashboards/project/networks/forms.py
@@ -34,6 +34,9 @@ LOG = logging.getLogger(__name__)
class UpdateNetwork(forms.SelfHandlingForm):
name = forms.CharField(label=_("Name"), required=False)
tenant_id = forms.CharField(widget=forms.HiddenInput)
+ network_id = forms.CharField(label=_("ID"),
+ widget=forms.TextInput(
+ attrs={'readonly': 'readonly'}))
admin_state = forms.ChoiceField(choices=[(True, _('UP')),
(False, _('DOWN'))],
label=_("Admin State"))
@@ -44,7 +47,7 @@ class UpdateNetwork(forms.SelfHandlingForm):
params = {'admin_state_up': (data['admin_state'] == 'True'),
'name': data['name']}
network = api.neutron.network_update(request,
- self.initial['network_id'],
+ data['network_id'],
**params)
msg = _('Network %s was successfully updated.') % data['name']
LOG.debug(msg)