mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-21 19:38:07 +00:00
Add command list
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import base64
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
@@ -68,6 +69,10 @@ class CommandLog(models.Model):
|
||||
def __unicode__(self):
|
||||
return '%s: %s' % (self.id, self.command)
|
||||
|
||||
@property
|
||||
def output_decode(self):
|
||||
return base64.b64decode(self.output).replace('\n', '<br />')
|
||||
|
||||
class Meta:
|
||||
db_table = 'command_log'
|
||||
ordering = ['command_no', 'command']
|
||||
|
Reference in New Issue
Block a user