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):
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)
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ł"