[Update] audits 模块为一些 models 字段添加 verbose 信息

This commit is contained in:
xinwen
2020-05-09 11:28:39 +08:00
parent 9fa31be4bf
commit 3ee051303a
8 changed files with 704 additions and 1076 deletions

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from terminal.models import Session
@@ -61,3 +61,7 @@ class CommandExecutionSerializer(serializers.ModelSerializer):
'hosts', 'run_as', 'command', 'user', 'is_finished',
'date_start', 'result', 'is_success'
)
extra_kwargs = {
'result': {'label': _('Result')},
'is_success': {'label': _('Is success')},
}