[Update] 完善 作业中心/任务列表 (#4105)

This commit is contained in:
xinwen
2020-06-15 19:42:36 +08:00
committed by GitHub
parent 5bea782b9f
commit c5a9a85818
3 changed files with 56 additions and 17 deletions

View File

@@ -150,6 +150,10 @@ class AdHoc(OrgModelMixin):
created_by = models.CharField(max_length=64, default='', blank=True, null=True, verbose_name=_('Create by'))
date_created = models.DateTimeField(auto_now_add=True, db_index=True)
@lazyproperty
def run_times(self):
return self.execution.count()
@property
def inventory(self):
if self.become: