mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-18 16:39:28 +00:00
feat: 添加批量命令的relation
This commit is contained in:
@@ -9,7 +9,7 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ugettext
|
||||
from django.db import models
|
||||
|
||||
|
||||
from common.utils import lazyproperty
|
||||
from orgs.models import Organization
|
||||
from orgs.mixins.models import OrgModelMixin
|
||||
from ..ansible.runner import CommandRunner
|
||||
@@ -40,6 +40,14 @@ class CommandExecution(OrgModelMixin):
|
||||
inv = JMSInventory(self.hosts.all(), run_as=username)
|
||||
return inv
|
||||
|
||||
@lazyproperty
|
||||
def run_as_display(self):
|
||||
return str(self.run_as)
|
||||
|
||||
@lazyproperty
|
||||
def user_display(self):
|
||||
return str(self.user)
|
||||
|
||||
@property
|
||||
def result(self):
|
||||
if self._result:
|
||||
|
Reference in New Issue
Block a user