X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=qcg%2Fmodels.py;h=8c2be2db61fe9c21985f03f3118b59e4d22d5e0b;hb=063e6b5a3e9c75e43c93bbcf06424181dd4ad894;hp=e2fd198cadcdc6432340c9d8191031b97fe47ff9;hpb=6af898e13eeaa3be720dced9e818422d6fdcdde6;p=qcg-portal.git diff --git a/qcg/models.py b/qcg/models.py index e2fd198..8c2be2d 100644 --- a/qcg/models.py +++ b/qcg/models.py @@ -168,8 +168,8 @@ class Task(models.Model): self.reserved_time_start, self.reserved_time_finish = value @property - def hosts(self): - return {alloc.host_name for alloc in self.allocations.all()} + def short_host_names(self): + return {alloc.host_name.split('.')[0] for alloc in self.allocations.all()} class Allocation(models.Model): @@ -177,8 +177,8 @@ class Allocation(models.Model): host_name = models.CharField(u"Host", max_length=100) status_description = models.TextField(u"Opis statusu", blank=True, default='') - processes_count = models.PositiveIntegerField(u"Liczba procesorów") - slots_count = models.PositiveIntegerField(u"Liczba slotów") + processes_count = models.PositiveIntegerField(u"Liczba procesów") + slots_count = models.PositiveIntegerField(u"Liczba rdzeni") processes_group_id = models.TextField(u"Identyfikator grupy procesów", blank=True, default='') submission_time = models.DateTimeField(u"Data wysłania") estimated_start_time = models.DateTimeField(u"Przewidywana data rozpoczęcia", blank=True, null=True) @@ -211,7 +211,7 @@ class NodeInfo(models.Model): allocation = models.ForeignKey(Allocation, verbose_name=u"Alokacja", related_name='nodes') name = models.CharField(u"Nazwa", max_length=32) - count = models.PositiveSmallIntegerField(u"Liczba slotów", blank=True, null=True) + count = models.PositiveSmallIntegerField(u"Liczba rdzeni", blank=True, null=True) class Meta: verbose_name = u"Węzeł"