diff --git a/computes/forms.py b/computes/forms.py index a626106..7dfcbe6 100644 --- a/computes/forms.py +++ b/computes/forms.py @@ -149,6 +149,8 @@ class ComputeEditHostForm(forms.Form): class ComputeAddSocketForm(forms.Form): name = forms.CharField(error_messages={'required': _('No hostname has been entered')}, max_length=20) + details = forms.CharField(error_messages={'required': _('No details has been entred')}, + max_length=50) def clean_name(self): name = self.cleaned_data['name'] diff --git a/computes/migrations/0002_compute_details.py b/computes/migrations/0002_compute_details.py new file mode 100644 index 0000000..1e0fdf5 --- /dev/null +++ b/computes/migrations/0002_compute_details.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + +class Migration(migrations.Migration): + + dependencies = [ + ('computes', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='Compute', + name='details', + field=models.CharField(max_length=50, null=True, blank=True), + ), + ] diff --git a/computes/models.py b/computes/models.py index 6ee7de8..df9bf02 100644 --- a/computes/models.py +++ b/computes/models.py @@ -6,6 +6,7 @@ class Compute(models.Model): hostname = models.CharField(max_length=20) login = models.CharField(max_length=20) password = models.CharField(max_length=14, blank=True, null=True) + details = models.CharField(max_length=50, null=True, blank=True) type = models.IntegerField() def __unicode__(self): diff --git a/computes/templates/computes.html b/computes/templates/computes.html index 7c1c28f..2ffc6f4 100644 --- a/computes/templates/computes.html +++ b/computes/templates/computes.html @@ -45,6 +45,11 @@ {% else %}
{% trans "Not Connected" %}
{% endif %} + {% if compute.details %} +{% trans compute.details %}
+ {% else %} +{% trans "No details available" %}
+ {% endif %} diff --git a/computes/templates/create_comp_block.html b/computes/templates/create_comp_block.html index 57e327a..9e9a965 100644 --- a/computes/templates/create_comp_block.html +++ b/computes/templates/create_comp_block.html @@ -141,6 +141,14 @@ + +{% trans "Logical CPUs" %}
{% trans "Processor" %}
{% trans "Connection" %}
+{% trans "Details" %}
{{ hostname }}
@@ -49,6 +50,7 @@{{ logical_cpu }}
{{ model_cpu }}
{{ uri_conn }}
+{{ compute.details }}