Commit 9aae1069 authored by ibuler's avatar ibuler

Merge branch 'dev' of github.com:jumpserver/jumpserver into dev

parents c82044f6 e4e6f595
import uuid
from django.db import models
from django.db.models import Q
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
......@@ -100,5 +101,22 @@ class UserLoginLog(models.Model):
status = models.BooleanField(max_length=2, default=True, choices=STATUS_CHOICE, verbose_name=_('Status'))
datetime = models.DateTimeField(default=timezone.now, verbose_name=_('Date login'))
@classmethod
def get_login_logs(cls, date_form=None, date_to=None, user=None, keyword=None):
login_logs = cls.objects.all()
if date_form and date_to:
login_logs = login_logs.filter(
datetime__gt=date_form, datetime__lt=date_to
)
if user:
login_logs = login_logs.filter(username=user)
if keyword:
login_logs = login_logs.filter(
Q(ip__contains=keyword) |
Q(city__contains=keyword) |
Q(username__contains=keyword)
)
return login_logs
class Meta:
ordering = ['-datetime', 'username']
......@@ -17,10 +17,10 @@
<div class="form-group" id="date">
<div class="input-daterange input-group" id="datepicker">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" class="input-sm form-control" style="width: 100px;" name="date_from" value="{{ date_from|date:'Y-m-d'}}">
<input type="text" id="id_date_from" class="input-sm form-control" style="width: 100px;" name="date_from" value="{{ date_from|date:'Y-m-d'}}">
{# <input type="text" class="input-sm form-control" style="width: 100px;" name="date_from" >#}
<span class="input-group-addon">to</span>
<input type="text" class="input-sm form-control" style="width: 100px;" name="date_to" value="{{ date_to|date:'Y-m-d'}}">
<input type="text" id="id_date_to" class="input-sm form-control" style="width: 100px;" name="date_to" value="{{ date_to|date:'Y-m-d'}}">
</div>
</div>
<div class="input-group">
......@@ -32,7 +32,7 @@
</select>
</div>
<div class="input-group">
<input type="text" class="form-control input-sm" name="keyword" placeholder="{% trans 'Search' %}" value="{{ keyword }}">
<input type="text" id="search" class="form-control input-sm" name="keyword" placeholder="{% trans 'Search' %}" value="{{ keyword }}">
</div>
<div class="input-group">
<div class="input-group-btn">
......@@ -43,39 +43,58 @@
</div>
</form>
{% endblock %}
{% block table_container %}
<table class="table table-striped table-bordered table-hover " id="login_log_table" >
<thead>
<tr>
<th class="text-center">{% trans 'ID' %}</th>
<th class="text-center">{% trans 'Username' %}</th>
<th class="text-center">{% trans 'Type' %}</th>
<th class="text-center">{% trans 'UA' %}</th>
<th class="text-center">{% trans 'IP' %}</th>
<th class="text-center">{% trans 'City' %}</th>
<th class="text-center">{% trans 'MFA' %}</th>
<th class="text-center">{% trans 'Reason' %}</th>
<th class="text-center">{% trans 'Status' %}</th>
<th class="text-center">{% trans 'Date' %}</th>
</tr>
<thead>
{% block table_head %}
<th class="text-center">{% trans 'ID' %}</th>
<th class="text-center">{% trans 'Username' %}</th>
<th class="text-center">{% trans 'Type' %}</th>
<th class="text-center">{% trans 'UA' %}</th>
<th class="text-center">{% trans 'IP' %}</th>
<th class="text-center">{% trans 'City' %}</th>
<th class="text-center">{% trans 'MFA' %}</th>
<th class="text-center">{% trans 'Reason' %}</th>
<th class="text-center">{% trans 'Status' %}</th>
<th class="text-center">{% trans 'Date' %}</th>
{% endblock %}
<tbody>
{% for login_log in object_list %}
<tr class="gradeX">
<td class="text-center">{{ forloop.counter }}</td>
<td class="text-center">{{ login_log.username }}</td>
<td class="text-center">{{ login_log.get_type_display }}</td>
<td class="text-center">
<span href="javascript:void(0);" data-toggle="tooltips" title="{{ login_log.user_agent }}">{{ login_log.user_agent | truncatechars:20 }}</span>
</td>
<td class="text-center">{{ login_log.ip }}</td>
<td class="text-center">{{ login_log.city }}</td>
<td class="text-center">{{ login_log.get_mfa_display }}</td>
<td class="text-center">{{ login_log.get_reason_display }}</td>
<td class="text-center">{{ login_log.get_status_display }}</td>
<td class="text-center">{{ login_log.datetime }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div id="actions" class="" style="margin-top: -20px">
<div class="input-group">
<select class="form-control m-b" style="width: auto" id="slct_bulk_update">
<option value="export">{% trans 'Export login log' %}</option>
</select>
<div class="input-group-btn pull-left" style="padding-left: 5px;">
<button id='btn_bulk_update' style="height: 32px;" class="btn btn-sm btn-primary btn_export">
{% trans 'Submit' %}
</button>
</div>
</div>
</div>
{% block table_body %}
{% for login_log in object_list %}
<tr class="gradeX">
<td class="text-center">{{ forloop.counter }}</td>
<td class="text-center">{{ login_log.username }}</td>
<td class="text-center">{{ login_log.get_type_display }}</td>
<td class="text-center">
<span href="javascript:void(0);" data-toggle="tooltips" title="{{ login_log.user_agent }}">{{ login_log.user_agent | truncatechars:20 }}</span>
</td>
<td class="text-center">{{ login_log.ip }}</td>
<td class="text-center">{{ login_log.city }}</td>
<td class="text-center">{{ login_log.get_mfa_display }}</td>
<td class="text-center">{{ login_log.get_reason_display }}</td>
<td class="text-center">{{ login_log.get_status_display }}</td>
<td class="text-center">{{ login_log.datetime }}</td>
</tr>
{% endfor %}
{% endblock %}
{% block custom_foot_js %}
<script src="{% static 'js/plugins/datepicker/bootstrap-datepicker.js' %}"></script>
<script>
......@@ -95,6 +114,29 @@
width: 'auto'
});
})
.on('click', '.btn_export', function () {
var date_form = $('#id_date_from').val();
var date_to = $('#id_date_to').val();
var user = $('.select2 option:selected').val();
var keyword = $('#search').val();
$.ajax({
url: "{% url "audits:login-log-export" %}",
method: 'POST',
data: JSON.stringify({
'date_form':date_form,
'date_to':date_to,
'user':user,
'keyword':keyword
}),
dataType: "json",
success: function (data, textStatus) {
window.open(data.redirect)
},
error: function () {
toastr.error('Export failed');
}
})
})
</script>
{% endblock %}
......@@ -14,4 +14,5 @@ urlpatterns = [
path('operate-log/', views.OperateLogListView.as_view(), name='operate-log-list'),
path('password-change-log/', views.PasswordChangeLogList.as_view(), name='password-change-log-list'),
path('command-execution-log/', views.CommandExecutionListView.as_view(), name='command-execution-log-list'),
path('login-log/export/', views.LoginLogExportView.as_view(), name='login-log-export'),
]
import csv
import codecs
from django.http import HttpResponse
def get_excel_response(filename):
excel_response = HttpResponse(content_type='text/csv')
excel_response[
'Content-Disposition'] = 'attachment; filename="%s"' % filename
excel_response.write(codecs.BOM_UTF8)
return excel_response
def write_content_to_excel(response, header=None, login_logs=None, fields=None):
writer = csv.writer(response, dialect='excel', quoting=csv.QUOTE_MINIMAL)
if header:
writer.writerow(header)
if login_logs:
for log in login_logs:
data = [getattr(log, field.name) for field in fields]
writer.writerow(data)
return response
\ No newline at end of file
import csv
import json
import uuid
import codecs
from django.conf import settings
from django.urls import reverse
from django.utils import timezone
from django.core.cache import cache
from django.http import HttpResponse, JsonResponse
from django.utils.decorators import method_decorator
from django.views import View
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import ListView
from django.utils.translation import ugettext as _
from django.contrib.auth.mixins import LoginRequiredMixin
from django.db.models import Q
from audits.utils import get_excel_response, write_content_to_excel
from common.mixins import DatetimeSearchMixin
from common.permissions import AdminUserRequiredMixin
......@@ -232,3 +247,38 @@ class CommandExecutionListView(UserCommandExecutionListView):
}
kwargs.update(context)
return super().get_context_data(**kwargs)
@method_decorator(csrf_exempt, name='dispatch')
class LoginLogExportView(LoginRequiredMixin, View):
def get(self, request):
fields = [
field for field in UserLoginLog._meta.fields
]
filename = 'login-logs-{}.csv'.format(
timezone.localtime(timezone.now()).strftime('%Y-%m-%d_%H-%M-%S')
)
excel_response = get_excel_response(filename)
header = [field.verbose_name for field in fields]
login_logs = cache.get(request.GET.get('spm', ''), [])
response = write_content_to_excel(excel_response, login_logs=login_logs,
header=header, fields=fields)
return response
def post(self, request):
try:
date_form = json.loads(request.body).get('date_form', [])
date_to = json.loads(request.body).get('date_to', [])
user = json.loads(request.body).get('user', [])
keyword = json.loads(request.body).get('keyword', [])
login_logs = UserLoginLog.get_login_logs(
date_form=date_form, date_to=date_to, user=user, keyword=keyword)
except ValueError:
return HttpResponse('Json object not valid', status=400)
spm = uuid.uuid4().hex
cache.set(spm, login_logs, 300)
url = reverse('audits:login-log-export') + '?spm=%s' % spm
return JsonResponse({'redirect': url})
\ No newline at end of file
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-19 14:59+0800\n"
"POT-Creation-Date: 2019-03-22 00:30+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
......@@ -33,6 +33,7 @@ msgstr "测试节点下资产是否可连接: {}"
#: assets/templates/assets/asset_detail.html:194
#: assets/templates/assets/asset_detail.html:202
#: assets/templates/assets/system_user_asset.html:95 perms/models.py:31
#: xpack/plugins/change_auth_plan/models.py:67
msgid "Nodes"
msgstr "节点管理"
......@@ -72,6 +73,9 @@ msgstr "网域"
#: perms/templates/perms/asset_permission_list.html:57
#: perms/templates/perms/asset_permission_list.html:78
#: perms/templates/perms/asset_permission_list.html:128
#: xpack/plugins/change_auth_plan/forms.py:36
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:55
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:15
#: xpack/plugins/cloud/models.py:123
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:63
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:66
......@@ -98,6 +102,8 @@ msgstr "如果有多个的互相隔离的网络,设置资产属于的网域,
#: assets/forms/asset.py:92 assets/forms/asset.py:96 assets/forms/domain.py:17
#: assets/forms/label.py:15
#: perms/templates/perms/asset_permission_asset.html:88
#: xpack/plugins/change_auth_plan/forms.py:32
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:84
msgid "Select assets"
msgstr "选择资产"
......@@ -119,6 +125,13 @@ msgstr "选择资产"
#: terminal/templates/terminal/command_list.html:73
#: terminal/templates/terminal/session_list.html:41
#: terminal/templates/terminal/session_list.html:72
#: xpack/plugins/change_auth_plan/forms.py:30
#: xpack/plugins/change_auth_plan/models.py:63
#: xpack/plugins/change_auth_plan/models.py:417
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:40
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:54
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:13
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:14
#: xpack/plugins/cloud/models.py:187
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:65
#: xpack/plugins/orgs/templates/orgs/org_list.html:16
......@@ -157,7 +170,7 @@ msgstr "SSH网关,支持代理SSH,RDP和VNC"
#: settings/templates/settings/replay_storage_create.html:44
#: settings/templates/settings/terminal_setting.html:80
#: settings/templates/settings/terminal_setting.html:102 terminal/models.py:22
#: terminal/models.py:233 terminal/templates/terminal/terminal_detail.html:43
#: terminal/models.py:241 terminal/templates/terminal/terminal_detail.html:43
#: terminal/templates/terminal/terminal_list.html:29 users/models/group.py:14
#: users/models/user.py:54 users/templates/users/_select_user_modal.html:13
#: users/templates/users/user_detail.html:63
......@@ -166,6 +179,10 @@ msgstr "SSH网关,支持代理SSH,RDP和VNC"
#: users/templates/users/user_list.html:23
#: users/templates/users/user_profile.html:51
#: users/templates/users/user_pubkey_update.html:53
#: xpack/plugins/change_auth_plan/forms.py:102
#: xpack/plugins/change_auth_plan/models.py:56
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:61
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:12
#: xpack/plugins/cloud/models.py:49 xpack/plugins/cloud/models.py:119
#: xpack/plugins/cloud/templates/cloud/account_detail.html:52
#: xpack/plugins/cloud/templates/cloud/account_list.html:12
......@@ -193,6 +210,8 @@ msgstr "名称"
#: users/templates/users/user_detail.html:67
#: users/templates/users/user_list.html:24
#: users/templates/users/user_profile.html:47
#: xpack/plugins/change_auth_plan/forms.py:103
#: xpack/plugins/change_auth_plan/models.py:414
msgid "Username"
msgstr "用户名"
......@@ -213,11 +232,15 @@ msgstr "密码或密钥密码"
#: users/templates/users/user_profile_update.html:40
#: users/templates/users/user_pubkey_update.html:40
#: users/templates/users/user_update.html:20
#: xpack/plugins/change_auth_plan/forms.py:23
#: xpack/plugins/change_auth_plan/models.py:86
#: xpack/plugins/change_auth_plan/models.py:326
#: xpack/plugins/change_auth_plan/serializers.py:19
msgid "Password"
msgstr "密码"
#: assets/forms/user.py:29 assets/serializers/asset_user.py:27
#: users/models/user.py:81
#: users/models/user.py:81 xpack/plugins/change_auth_plan/serializers.py:27
msgid "Private key"
msgstr "ssh私钥"
......@@ -274,6 +297,7 @@ msgstr "使用逗号分隔多个命令,如: /bin/whoami,/sbin/ifconfig"
#: perms/templates/perms/asset_permission_asset.html:55 settings/forms.py:133
#: users/templates/users/user_granted_asset.html:45
#: users/templates/users/user_group_granted_asset.html:45
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:51
msgid "IP"
msgstr "IP"
......@@ -289,6 +313,7 @@ msgstr "IP"
#: perms/templates/perms/asset_permission_list.html:77 settings/forms.py:132
#: users/templates/users/user_granted_asset.html:44
#: users/templates/users/user_group_granted_asset.html:44
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:50
msgid "Hostname"
msgstr "主机名"
......@@ -407,6 +432,8 @@ msgstr "标签管理"
#: ops/templates/ops/adhoc_detail.html:86 orgs/models.py:15 perms/models.py:36
#: perms/models.py:89 perms/templates/perms/asset_permission_detail.html:98
#: users/models/user.py:95 users/templates/users/user_detail.html:111
#: xpack/plugins/change_auth_plan/models.py:99
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:113
#: xpack/plugins/cloud/models.py:55 xpack/plugins/cloud/models.py:127
msgid "Created by"
msgstr "创建者"
......@@ -422,6 +449,7 @@ msgstr "创建者"
#: perms/templates/perms/asset_permission_detail.html:94
#: terminal/templates/terminal/terminal_detail.html:59 users/models/group.py:17
#: users/templates/users/user_group_detail.html:63
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:105
#: xpack/plugins/cloud/models.py:56 xpack/plugins/cloud/models.py:128
#: xpack/plugins/cloud/templates/cloud/account_detail.html:68
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:79
......@@ -452,8 +480,11 @@ msgstr "创建日期"
#: users/templates/users/user_detail.html:127
#: users/templates/users/user_group_detail.html:67
#: users/templates/users/user_group_list.html:14
#: users/templates/users/user_profile.html:134 xpack/plugins/cloud/models.py:54
#: xpack/plugins/cloud/models.py:125
#: users/templates/users/user_profile.html:134
#: xpack/plugins/change_auth_plan/models.py:95
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:117
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:19
#: xpack/plugins/cloud/models.py:54 xpack/plugins/cloud/models.py:125
#: xpack/plugins/cloud/templates/cloud/account_detail.html:72
#: xpack/plugins/cloud/templates/cloud/account_list.html:15
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:71
......@@ -501,11 +532,13 @@ msgstr "版本"
msgid "AuthBook"
msgstr ""
#: assets/models/base.py:29
#: assets/models/base.py:29 xpack/plugins/change_auth_plan/models.py:90
#: xpack/plugins/change_auth_plan/models.py:330
msgid "SSH private key"
msgstr "ssh密钥"
#: assets/models/base.py:30
#: assets/models/base.py:30 xpack/plugins/change_auth_plan/models.py:93
#: xpack/plugins/change_auth_plan/models.py:333
msgid "SSH public key"
msgstr "ssh公钥"
......@@ -645,6 +678,9 @@ msgstr "每行一个命令"
#: terminal/templates/terminal/terminal_list.html:36
#: users/templates/users/user_group_list.html:15
#: users/templates/users/user_list.html:29
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:60
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:18
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:20
#: xpack/plugins/cloud/templates/cloud/account_list.html:16
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:18
#: xpack/plugins/orgs/templates/orgs/org_list.html:23
......@@ -792,6 +828,7 @@ msgstr "%(value)s is not an even number"
#: users/templates/users/user_profile.html:68
#: users/templates/users/user_profile_update.html:43
#: users/templates/users/user_pubkey_update.html:43
#: xpack/plugins/change_auth_plan/serializers.py:23
msgid "Public key"
msgstr "ssh公钥"
......@@ -944,6 +981,7 @@ msgstr "如果使用了nat端口映射,请设置为ssh真实监听的端口"
#: assets/templates/assets/asset_update.html:21
#: assets/templates/assets/gateway_create_update.html:37
#: perms/templates/perms/asset_permission_create_update.html:38
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:37
msgid "Basic"
msgstr "基本"
......@@ -965,6 +1003,7 @@ msgstr "自动生成密钥"
#: assets/templates/assets/gateway_create_update.html:53
#: perms/templates/perms/asset_permission_create_update.html:50
#: terminal/templates/terminal/terminal_update.html:40
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:61
msgid "Other"
msgstr "其它"
......@@ -995,6 +1034,7 @@ msgstr "其它"
#: users/templates/users/user_profile_update.html:63
#: users/templates/users/user_pubkey_update.html:70
#: users/templates/users/user_pubkey_update.html:76
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:65
#: xpack/plugins/cloud/templates/cloud/account_create_update.html:33
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create.html:35
#: xpack/plugins/interface/templates/interface/interface.html:88
......@@ -1021,7 +1061,7 @@ msgstr "重置"
#: settings/templates/settings/security_setting.html:71
#: settings/templates/settings/terminal_setting.html:70
#: terminal/templates/terminal/command_list.html:103
#: terminal/templates/terminal/session_list.html:127
#: terminal/templates/terminal/session_list.html:126
#: terminal/templates/terminal/terminal_update.html:46
#: users/templates/users/_user.html:51
#: users/templates/users/forgot_password.html:49
......@@ -1030,6 +1070,7 @@ msgstr "重置"
#: users/templates/users/user_password_update.html:72
#: users/templates/users/user_profile_update.html:64
#: users/templates/users/user_pubkey_update.html:77
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:66
#: xpack/plugins/interface/templates/interface/interface.html:89
msgid "Submit"
msgstr "提交"
......@@ -1059,6 +1100,7 @@ msgstr "关闭"
#: perms/templates/perms/asset_permission_asset.html:18
#: perms/templates/perms/asset_permission_detail.html:18
#: perms/templates/perms/asset_permission_user.html:18
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:106
msgid "Detail"
msgstr "详情"
......@@ -1069,6 +1111,7 @@ msgstr "资产列表"
#: assets/templates/assets/admin_user_assets.html:29
#: perms/templates/perms/asset_permission_asset.html:35
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:31
msgid "Asset list of "
msgstr "资产列表"
......@@ -1143,6 +1186,8 @@ msgstr "更新失败"
#: users/templates/users/user_profile.html:177
#: users/templates/users/user_profile.html:187
#: users/templates/users/user_profile.html:196
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:29
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:54
#: xpack/plugins/cloud/templates/cloud/account_detail.html:25
#: xpack/plugins/cloud/templates/cloud/account_list.html:38
#: xpack/plugins/orgs/templates/orgs/org_detail.html:25
......@@ -1175,6 +1220,8 @@ msgstr "更新"
#: users/templates/users/user_group_list.html:45
#: users/templates/users/user_list.html:84
#: users/templates/users/user_list.html:88
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:33
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:56
#: xpack/plugins/cloud/templates/cloud/account_detail.html:29
#: xpack/plugins/cloud/templates/cloud/account_list.html:40
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:32
......@@ -1190,6 +1237,8 @@ msgstr "替换资产的管理员"
#: assets/templates/assets/admin_user_detail.html:91
#: perms/templates/perms/asset_permission_asset.html:116
#: xpack/plugins/change_auth_plan/forms.py:38
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:112
msgid "Select nodes"
msgstr "选择节点"
......@@ -1256,6 +1305,7 @@ msgstr "资产用户"
#: assets/templates/assets/asset_asset_user_list.html:51
#: assets/templates/assets/cmd_filter_detail.html:73
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:109
msgid "Date updated"
msgstr "更新日期"
......@@ -1264,6 +1314,7 @@ msgstr "更新日期"
#: terminal/templates/terminal/session_detail.html:81
#: users/templates/users/user_detail.html:138
#: users/templates/users/user_profile.html:146
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:128
#: xpack/plugins/license/templates/license/license_detail.html:93
msgid "Quick modify"
msgstr "快速修改"
......@@ -1797,7 +1848,9 @@ msgstr "文件名"
#: audits/templates/audits/ftp_log_list.html:76
#: ops/templates/ops/command_execution_list.html:64
#: ops/templates/ops/task_list.html:31
#: users/templates/users/user_detail.html:458 xpack/plugins/cloud/api.py:62
#: users/templates/users/user_detail.html:458
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:14
#: xpack/plugins/cloud/api.py:62
msgid "Success"
msgstr "成功"
......@@ -1875,6 +1928,8 @@ msgid "MFA"
msgstr "MFA"
#: audits/models.py:99 audits/templates/audits/login_log_list.html:55
#: xpack/plugins/change_auth_plan/models.py:421
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:15
#: xpack/plugins/cloud/models.py:172
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:69
msgid "Reason"
......@@ -1898,6 +1953,10 @@ msgstr "登录日期"
#: ops/templates/ops/task_history.html:58 perms/models.py:34
#: perms/templates/perms/asset_permission_detail.html:86 terminal/models.py:165
#: terminal/templates/terminal/session_list.html:78
#: xpack/plugins/change_auth_plan/models.py:312
#: xpack/plugins/change_auth_plan/models.py:424
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:59
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:17
msgid "Date start"
msgstr "开始日期"
......@@ -2160,7 +2219,7 @@ msgstr "Crontab"
#: ops/models/adhoc.py:39
msgid "5 * * * *"
msgstr ""
msgstr "5 * * * *"
#: ops/models/adhoc.py:41
msgid "Callback"
......@@ -2225,6 +2284,10 @@ msgstr "完成时间"
#: ops/models/adhoc.py:326 ops/templates/ops/adhoc_history.html:57
#: ops/templates/ops/task_history.html:63 ops/templates/ops/task_list.html:33
#: xpack/plugins/change_auth_plan/models.py:315
#: xpack/plugins/change_auth_plan/models.py:427
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:58
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:16
msgid "Time"
msgstr "时间"
......@@ -2248,7 +2311,9 @@ msgstr "结果"
msgid "Adhoc result summary"
msgstr "汇总"
#: ops/models/command.py:22 xpack/plugins/cloud/models.py:170
#: ops/models/command.py:22
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:56
#: xpack/plugins/cloud/models.py:170
msgid "Result"
msgstr "结果"
......@@ -2282,6 +2347,7 @@ msgid "Run as"
msgstr "运行用户"
#: ops/templates/ops/adhoc_detail.html:94 ops/templates/ops/task_list.html:28
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:18
msgid "Run times"
msgstr "执行次数"
......@@ -2440,6 +2506,7 @@ msgid "Versions"
msgstr "版本"
#: ops/templates/ops/task_list.html:63
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:52
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:52
msgid "Run"
msgstr "执行"
......@@ -2515,6 +2582,9 @@ msgstr "用户或用户组"
#: perms/templates/perms/asset_permission_asset.html:27
#: perms/templates/perms/asset_permission_detail.html:27
#: perms/templates/perms/asset_permission_user.html:27
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:20
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:23
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:20
msgid "Assets and node"
msgstr "资产或节点"
......@@ -2529,6 +2599,7 @@ msgstr "添加资产"
#: settings/templates/settings/terminal_setting.html:95
#: settings/templates/settings/terminal_setting.html:117
#: users/templates/users/user_group_detail.html:95
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:93
#: xpack/plugins/orgs/templates/orgs/org_detail.html:93
#: xpack/plugins/orgs/templates/orgs/org_detail.html:130
msgid "Add"
......@@ -2540,6 +2611,7 @@ msgstr "添加节点"
#: perms/templates/perms/asset_permission_asset.html:125
#: users/templates/users/user_detail.html:230
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:121
msgid "Join"
msgstr "加入"
......@@ -3491,7 +3563,7 @@ msgstr "最后活跃日期"
msgid "Date end"
msgstr "结束日期"
#: terminal/models.py:234
#: terminal/models.py:242
msgid "Args"
msgstr "参数"
......@@ -3537,28 +3609,24 @@ msgstr "登录来源"
msgid "Duration"
msgstr "时长"
#: terminal/templates/terminal/session_list.html:106
msgid "Monitor"
msgstr "监控"
#: terminal/templates/terminal/session_list.html:108
#: terminal/templates/terminal/session_list.html:110
#: terminal/templates/terminal/session_list.html:107
#: terminal/templates/terminal/session_list.html:109
msgid "Terminate"
msgstr "终断"
#: terminal/templates/terminal/session_list.html:122
#: terminal/templates/terminal/session_list.html:121
msgid "Terminate selected"
msgstr "终断所选"
#: terminal/templates/terminal/session_list.html:123
#: terminal/templates/terminal/session_list.html:122
msgid "Confirm finished"
msgstr "确认已完成"
#: terminal/templates/terminal/session_list.html:143
#: terminal/templates/terminal/session_list.html:142
msgid "Terminate task send, waiting ..."
msgstr "终断任务已发送,请等待"
#: terminal/templates/terminal/session_list.html:156
#: terminal/templates/terminal/session_list.html:155
msgid "Finish session success"
msgstr "标记会话完成成功"
......@@ -4604,6 +4672,192 @@ msgstr "MFA 解绑成功"
msgid "MFA disable success, return login page"
msgstr "MFA 解绑成功,返回登录页面"
#: xpack/plugins/change_auth_plan/forms.py:19
#: xpack/plugins/change_auth_plan/models.py:71
#: xpack/plugins/change_auth_plan/models.py:148
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:100
msgid "Cycle perform"
msgstr "周期执行"
#: xpack/plugins/change_auth_plan/forms.py:19
msgid "Tips: (Units: hour)"
msgstr "提示:(单位: 时)"
#: xpack/plugins/change_auth_plan/forms.py:27
msgid "Password length"
msgstr "密码长度"
#: xpack/plugins/change_auth_plan/forms.py:59
msgid "* Please enter custom password"
msgstr "* 请输入自定义密码"
#: xpack/plugins/change_auth_plan/forms.py:69
msgid "* Please enter a valid crontab expression"
msgstr "* 请输入有效的 crontab 表达式"
#: xpack/plugins/change_auth_plan/forms.py:107
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:54
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:81
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:17
msgid "Timing perform"
msgstr "定时执行"
#: xpack/plugins/change_auth_plan/forms.py:110
msgid ""
"eg: Every Sunday 03:05 run (5 3 * * 0) <br> Tips: Using 5 digits linux "
"crontab expressions (<a href='https://tool.lu/crontab/' "
"target='_blank'>Online tools</a>) <br>Note: If both Regularly perform and "
"Cycle perform are set, give priority to Regularly perform"
msgstr ""
"eg:每周日 03:05 执行(5 3 * * 0) <br> 提示: 使用5位 Linux crontab 表达式"
"(<a href='https://tool.lu/crontab/' target='_blank'>在线工具</a>) <br>注"
"意: 如果同时设置了定期执行和周期执行,优先使用定期执行"
#: xpack/plugins/change_auth_plan/meta.py:9
#: xpack/plugins/change_auth_plan/models.py:106
#: xpack/plugins/change_auth_plan/models.py:319
#: xpack/plugins/change_auth_plan/views.py:32
#: xpack/plugins/change_auth_plan/views.py:48
#: xpack/plugins/change_auth_plan/views.py:69
#: xpack/plugins/change_auth_plan/views.py:83
#: xpack/plugins/change_auth_plan/views.py:110
#: xpack/plugins/change_auth_plan/views.py:126
#: xpack/plugins/change_auth_plan/views.py:140
msgid "Change auth plan"
msgstr "改密计划"
#: xpack/plugins/change_auth_plan/models.py:50
msgid "Custom password"
msgstr "自定义密码"
#: xpack/plugins/change_auth_plan/models.py:51
msgid "All assets use the same random password"
msgstr "所有资产使用相同的随机密码"
#: xpack/plugins/change_auth_plan/models.py:52
msgid "All assets use different random password"
msgstr "所有资产使用不同的随机密码"
#: xpack/plugins/change_auth_plan/models.py:58
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:65
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:53
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:12
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:13
msgid "Asset username"
msgstr "资产用户名"
#: xpack/plugins/change_auth_plan/models.py:75
#: xpack/plugins/change_auth_plan/models.py:146
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:92
msgid "Regularly perform"
msgstr "定期执行"
#: xpack/plugins/change_auth_plan/models.py:79
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:45
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:69
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:57
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:16
msgid "Password strategy"
msgstr "密码策略"
#: xpack/plugins/change_auth_plan/models.py:83
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:74
msgid "Password rules"
msgstr "密码规则"
#: xpack/plugins/change_auth_plan/models.py:323
msgid "Change auth plan snapshot"
msgstr "改密计划快照"
#: xpack/plugins/change_auth_plan/models.py:338
#: xpack/plugins/change_auth_plan/models.py:431
msgid "Change auth plan history"
msgstr "改密计划历史"
#: xpack/plugins/change_auth_plan/models.py:440
msgid "Change auth plan task"
msgstr "改密计划任务"
#: xpack/plugins/change_auth_plan/models.py:458
msgid "Authentication failed"
msgstr "认证失败"
#: xpack/plugins/change_auth_plan/models.py:460
msgid "Connection timeout"
msgstr "连接超时"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:17
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:20
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:17
#: xpack/plugins/change_auth_plan/views.py:84
msgid "Plan detail"
msgstr "计划详情"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:23
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:26
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:23
#: xpack/plugins/change_auth_plan/views.py:127
msgid "Run history list"
msgstr "执行历史列表"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:76
msgid "Add asset to this plan"
msgstr "添加资产"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:104
msgid "Add node to this plan"
msgstr "添加节点"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:76
msgid "Length"
msgstr "长度"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:84
msgid "Yes"
msgstr "是"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:86
msgid "No"
msgstr "否"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:31
msgid "History of plan"
msgstr "执行历史"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:104
msgid "Log"
msgstr "日志"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:61
msgid "Retry"
msgstr "重试"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:96
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:101
msgid "Run failed"
msgstr "执行失败"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:5
#: xpack/plugins/change_auth_plan/views.py:49
msgid "Create plan"
msgstr "创建计划"
#: xpack/plugins/change_auth_plan/views.py:33
msgid "Plan list"
msgstr "计划列表"
#: xpack/plugins/change_auth_plan/views.py:70
msgid "Update plan"
msgstr "更新计划"
#: xpack/plugins/change_auth_plan/views.py:111
msgid "plan asset list"
msgstr "计划资产列表"
#: xpack/plugins/change_auth_plan/views.py:141
msgid "Run history task list"
msgstr "执行历史任务列表"
#: xpack/plugins/cloud/api.py:61 xpack/plugins/cloud/providers/base.py:84
msgid "Account unavailable"
msgstr "账户无效"
......@@ -4640,7 +4894,7 @@ msgstr "选择管理员"
#: xpack/plugins/cloud/views.py:41 xpack/plugins/cloud/views.py:57
#: xpack/plugins/cloud/views.py:71 xpack/plugins/cloud/views.py:84
#: xpack/plugins/cloud/views.py:100 xpack/plugins/cloud/views.py:121
#: xpack/plugins/cloud/views.py:136 xpack/plugins/cloud/views.py:187
#: xpack/plugins/cloud/views.py:136 xpack/plugins/cloud/views.py:179
msgid "Cloud center"
msgstr "云管中心"
......@@ -4771,7 +5025,7 @@ msgstr "同步历史列表"
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:28
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:31
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:29
#: xpack/plugins/cloud/views.py:188
#: xpack/plugins/cloud/views.py:180
msgid "Sync instance list"
msgstr "同步实例列表"
......@@ -5011,6 +5265,13 @@ msgstr "创建组织"
msgid "Update org"
msgstr "更新组织"
#~ msgid ""
#~ "* When selecting a custom password strategy, please enter the password"
#~ msgstr "* 选择自定义密码策略时,请输入密码"
#~ msgid "Monitor"
#~ msgstr "监控"
#~ msgid "Invalid private key"
#~ msgstr "ssh密钥不合法"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment