Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
b7021b5e
Commit
b7021b5e
authored
Sep 19, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 支持收集资产上的用户
parent
5464c884
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
236 additions
and
168 deletions
+236
-168
asset.py
apps/assets/api/asset.py
+1
-0
gathered_user.py
apps/assets/api/gathered_user.py
+2
-0
filters.py
apps/assets/filters.py
+28
-32
0041_gathereduser.py
apps/assets/migrations/0041_gathereduser.py
+2
-2
gathered_user.py
apps/assets/models/gathered_user.py
+2
-2
gathered_user.py
apps/assets/serializers/gathered_user.py
+6
-1
gather_asset_users.py
apps/assets/tasks/gather_asset_users.py
+2
-1
filters.py
apps/common/filters.py
+4
-2
django.mo
apps/locale/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/locale/zh/LC_MESSAGES/django.po
+161
-105
adhoc.py
apps/ops/models/adhoc.py
+20
-16
api.py
apps/orgs/mixins/api.py
+7
-6
mixin.py
apps/perms/api/user_permission/mixin.py
+1
-1
No files found.
apps/assets/api/asset.py
View file @
b7021b5e
...
@@ -36,6 +36,7 @@ class AssetViewSet(OrgBulkModelViewSet):
...
@@ -36,6 +36,7 @@ class AssetViewSet(OrgBulkModelViewSet):
serializer_class
=
serializers
.
AssetSerializer
serializer_class
=
serializers
.
AssetSerializer
permission_classes
=
(
IsOrgAdminOrAppUser
,)
permission_classes
=
(
IsOrgAdminOrAppUser
,)
extra_filter_backends
=
[
AssetByNodeFilterBackend
,
LabelFilterBackend
]
extra_filter_backends
=
[
AssetByNodeFilterBackend
,
LabelFilterBackend
]
custom_filter_fields
=
[
'admin_user_id'
]
def
set_assets_node
(
self
,
assets
):
def
set_assets_node
(
self
,
assets
):
if
not
isinstance
(
assets
,
list
):
if
not
isinstance
(
assets
,
list
):
...
...
apps/assets/api/gathered_user.py
View file @
b7021b5e
...
@@ -6,6 +6,7 @@ from assets.models import GatheredUser
...
@@ -6,6 +6,7 @@ from assets.models import GatheredUser
from
common.permissions
import
IsOrgAdmin
from
common.permissions
import
IsOrgAdmin
from
..serializers
import
GatheredUserSerializer
from
..serializers
import
GatheredUserSerializer
from
..filters
import
AssetRelatedByNodeFilterBackend
__all__
=
[
'GatheredUserViewSet'
]
__all__
=
[
'GatheredUserViewSet'
]
...
@@ -15,6 +16,7 @@ class GatheredUserViewSet(OrgModelViewSet):
...
@@ -15,6 +16,7 @@ class GatheredUserViewSet(OrgModelViewSet):
queryset
=
GatheredUser
.
objects
.
all
()
queryset
=
GatheredUser
.
objects
.
all
()
serializer_class
=
GatheredUserSerializer
serializer_class
=
GatheredUserSerializer
permission_classes
=
[
IsOrgAdmin
]
permission_classes
=
[
IsOrgAdmin
]
extra_filter_backends
=
[
AssetRelatedByNodeFilterBackend
]
filter_fields
=
[
'asset'
,
'username'
,
'present'
]
filter_fields
=
[
'asset'
,
'username'
,
'present'
]
search_fields
=
[
'username'
,
'asset__ip'
,
'asset__hostname'
]
search_fields
=
[
'username'
,
'asset__ip'
,
'asset__hostname'
]
...
...
apps/assets/filters.py
View file @
b7021b5e
...
@@ -12,63 +12,54 @@ from .models import Node, Label
...
@@ -12,63 +12,54 @@ from .models import Node, Label
class
AssetByNodeFilterBackend
(
filters
.
BaseFilterBackend
):
class
AssetByNodeFilterBackend
(
filters
.
BaseFilterBackend
):
fields
=
[
'node'
,
'all'
]
fields
=
[
'node'
,
'all'
]
# def filter_node(self, queryset):
# node_id = self.request.query_params.get("node_id")
# if not node_id:
# return queryset
#
# node = get_object_or_404(Node, id=node_id)
# show_current_asset = self.request.query_params.get("show_current_asset") in ('1', 'true')
#
# # 当前节点是顶层节点, 并且仅显示直接资产
# if node.is_org_root() and show_current_asset:
# queryset = queryset.filter(
# Q(nodes=node_id) | Q(nodes__isnull=True)
# ).distinct()
# # 当前节点是顶层节点,显示所有资产
# elif node.is_org_root() and not show_current_asset:
# return queryset
# # 当前节点不是鼎城节点,只显示直接资产
# elif not node.is_org_root() and show_current_asset:
# queryset = queryset.filter(nodes=node)
# else:
# children = node.get_all_children(with_self=True)
# queryset = queryset.filter(nodes__in=children).distinct()
# return queryset
def
get_schema_fields
(
self
,
view
):
def
get_schema_fields
(
self
,
view
):
return
[
return
[
coreapi
.
Field
(
coreapi
.
Field
(
name
=
field
,
location
=
'query'
,
required
=
False
,
name
=
field
,
location
=
'query'
,
required
=
False
,
type
=
'string'
,
example
=
''
,
description
=
''
type
=
'string'
,
example
=
''
,
description
=
''
,
schema
=
None
,
)
)
for
field
in
self
.
fields
for
field
in
self
.
fields
]
]
def
filter_queryset
(
self
,
request
,
queryset
,
view
):
@staticmethod
node_id
=
dict_get_any
(
request
.
query_params
,
[
'node'
,
'node_id'
])
def
is_query_all
(
request
):
if
not
node_id
:
return
queryset
query_all_arg
=
request
.
query_params
.
get
(
'all'
)
query_all_arg
=
request
.
query_params
.
get
(
'all'
)
show_current_asset_arg
=
request
.
query_params
.
get
(
'show_current_asset'
)
show_current_asset_arg
=
request
.
query_params
.
get
(
'show_current_asset'
)
query_all
=
query_all_arg
==
'1'
query_all
=
query_all_arg
==
'1'
if
show_current_asset_arg
is
not
None
:
if
show_current_asset_arg
is
not
None
:
query_all
=
show_current_asset_arg
!=
'1'
query_all
=
show_current_asset_arg
!=
'1'
return
query_all
@staticmethod
def
get_query_node
(
request
):
node_id
=
dict_get_any
(
request
.
query_params
,
[
'node'
,
'node_id'
])
if
not
node_id
:
return
None
,
False
if
is_uuid
(
node_id
):
if
is_uuid
(
node_id
):
node
=
get_object_or_none
(
Node
,
id
=
node_id
)
node
=
get_object_or_none
(
Node
,
id
=
node_id
)
else
:
else
:
node
=
get_object_or_none
(
Node
,
key
=
node_id
)
node
=
get_object_or_none
(
Node
,
key
=
node_id
)
return
node
,
True
if
not
node
:
@staticmethod
return
queryset
.
none
()
def
perform_query
(
pattern
,
queryset
):
return
queryset
.
filter
(
nodes__key__regex
=
pattern
)
def
filter_queryset
(
self
,
request
,
queryset
,
view
):
node
,
has_query_arg
=
self
.
get_query_node
(
request
)
if
not
has_query_arg
:
return
queryset
if
node
is
None
:
return
queryset
.
none
()
query_all
=
self
.
is_query_all
(
request
)
if
query_all
:
if
query_all
:
pattern
=
node
.
get_all_children_pattern
(
with_self
=
True
)
pattern
=
node
.
get_all_children_pattern
(
with_self
=
True
)
else
:
else
:
pattern
=
node
.
get_children_key_pattern
(
with_self
=
True
)
pattern
=
node
.
get_children_key_pattern
(
with_self
=
True
)
return
queryset
.
filter
(
nodes__key__regex
=
pattern
)
return
self
.
perform_query
(
pattern
,
queryset
)
class
LabelFilterBackend
(
filters
.
BaseFilterBackend
):
class
LabelFilterBackend
(
filters
.
BaseFilterBackend
):
...
@@ -117,3 +108,8 @@ class LabelFilterBackend(filters.BaseFilterBackend):
...
@@ -117,3 +108,8 @@ class LabelFilterBackend(filters.BaseFilterBackend):
return
queryset
return
queryset
class
AssetRelatedByNodeFilterBackend
(
AssetByNodeFilterBackend
):
@staticmethod
def
perform_query
(
pattern
,
queryset
):
return
queryset
.
filter
(
asset__nodes__key__regex
=
pattern
)
.
distinct
()
apps/assets/migrations/0041_gathereduser.py
View file @
b7021b5e
...
@@ -18,10 +18,10 @@ class Migration(migrations.Migration):
...
@@ -18,10 +18,10 @@ class Migration(migrations.Migration):
(
'org_id'
,
models
.
CharField
(
blank
=
True
,
db_index
=
True
,
default
=
''
,
max_length
=
36
,
verbose_name
=
'Organization'
)),
(
'org_id'
,
models
.
CharField
(
blank
=
True
,
db_index
=
True
,
default
=
''
,
max_length
=
36
,
verbose_name
=
'Organization'
)),
(
'id'
,
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
primary_key
=
True
,
serialize
=
False
)),
(
'id'
,
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
primary_key
=
True
,
serialize
=
False
)),
(
'username'
,
models
.
CharField
(
blank
=
True
,
db_index
=
True
,
max_length
=
32
,
verbose_name
=
'Username'
)),
(
'username'
,
models
.
CharField
(
blank
=
True
,
db_index
=
True
,
max_length
=
32
,
verbose_name
=
'Username'
)),
(
'present'
,
models
.
BooleanField
(
default
=
True
)),
(
'present'
,
models
.
BooleanField
(
default
=
True
,
verbose_name
=
'Present'
)),
(
'date_created'
,
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
'Date created'
)),
(
'date_created'
,
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
'Date created'
)),
(
'date_updated'
,
models
.
DateTimeField
(
auto_now
=
True
,
verbose_name
=
'Date updated'
)),
(
'date_updated'
,
models
.
DateTimeField
(
auto_now
=
True
,
verbose_name
=
'Date updated'
)),
(
'asset'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'assets.Asset'
)),
(
'asset'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'assets.Asset'
,
verbose_name
=
'Asset'
)),
],
],
options
=
{
'ordering'
:
[
'asset'
],
'verbose_name'
:
'GatherUser'
},
options
=
{
'ordering'
:
[
'asset'
],
'verbose_name'
:
'GatherUser'
},
),
),
...
...
apps/assets/models/gathered_user.py
View file @
b7021b5e
...
@@ -11,10 +11,10 @@ __all__ = ['GatheredUser']
...
@@ -11,10 +11,10 @@ __all__ = ['GatheredUser']
class
GatheredUser
(
OrgModelMixin
):
class
GatheredUser
(
OrgModelMixin
):
id
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
primary_key
=
True
)
id
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
primary_key
=
True
)
asset
=
models
.
ForeignKey
(
'assets.Asset'
,
on_delete
=
models
.
CASCADE
)
asset
=
models
.
ForeignKey
(
'assets.Asset'
,
on_delete
=
models
.
CASCADE
,
verbose_name
=
_
(
"Asset"
)
)
username
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
db_index
=
True
,
username
=
models
.
CharField
(
max_length
=
32
,
blank
=
True
,
db_index
=
True
,
verbose_name
=
_
(
'Username'
))
verbose_name
=
_
(
'Username'
))
present
=
models
.
BooleanField
(
default
=
True
)
present
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
_
(
"Present"
)
)
date_created
=
models
.
DateTimeField
(
auto_now_add
=
True
,
date_created
=
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
_
(
"Date created"
))
verbose_name
=
_
(
"Date created"
))
date_updated
=
models
.
DateTimeField
(
auto_now
=
True
,
date_updated
=
models
.
DateTimeField
(
auto_now
=
True
,
...
...
apps/assets/serializers/gathered_user.py
View file @
b7021b5e
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
#
from
..models
import
GatheredUser
from
django.utils.translation
import
ugettext_lazy
as
_
from
orgs.mixins.serializers
import
OrgResourceModelSerializerMixin
from
orgs.mixins.serializers
import
OrgResourceModelSerializerMixin
from
..models
import
GatheredUser
class
GatheredUserSerializer
(
OrgResourceModelSerializerMixin
):
class
GatheredUserSerializer
(
OrgResourceModelSerializerMixin
):
...
@@ -14,3 +15,7 @@ class GatheredUserSerializer(OrgResourceModelSerializerMixin):
...
@@ -14,3 +15,7 @@ class GatheredUserSerializer(OrgResourceModelSerializerMixin):
'present'
,
'date_created'
,
'date_updated'
'present'
,
'date_created'
,
'date_updated'
]
]
read_only_fields
=
fields
read_only_fields
=
fields
labels
=
{
'hostname'
:
_
(
"Hostname"
),
'ip'
:
"IP"
}
apps/assets/tasks/gather_asset_users.py
View file @
b7021b5e
...
@@ -116,8 +116,9 @@ def gather_asset_users(assets, task_name=None):
...
@@ -116,8 +116,9 @@ def gather_asset_users(assets, task_name=None):
for
k
,
value
in
hosts_category
.
items
():
for
k
,
value
in
hosts_category
.
items
():
if
not
value
[
'hosts'
]:
if
not
value
[
'hosts'
]:
continue
continue
_task_name
=
'{}: {}'
.
format
(
task_name
,
k
)
task
,
created
=
update_or_create_ansible_task
(
task
,
created
=
update_or_create_ansible_task
(
task_name
=
task_name
,
hosts
=
value
[
'hosts'
],
tasks
=
value
[
'tasks'
],
task_name
=
_
task_name
,
hosts
=
value
[
'hosts'
],
tasks
=
value
[
'tasks'
],
pattern
=
'all'
,
options
=
const
.
TASK_OPTIONS
,
pattern
=
'all'
,
options
=
const
.
TASK_OPTIONS
,
run_as_admin
=
True
,
created_by
=
value
[
'hosts'
][
0
]
.
org_id
,
run_as_admin
=
True
,
created_by
=
value
[
'hosts'
][
0
]
.
org_id
,
)
)
...
...
apps/common/filters.py
View file @
b7021b5e
...
@@ -70,7 +70,6 @@ class IDSpmFilter(filters.BaseFilterBackend):
...
@@ -70,7 +70,6 @@ class IDSpmFilter(filters.BaseFilterBackend):
class
CustomFilter
(
filters
.
BaseFilterBackend
):
class
CustomFilter
(
filters
.
BaseFilterBackend
):
custom_filter_fields
=
[]
# ["node", "asset"]
def
get_schema_fields
(
self
,
view
):
def
get_schema_fields
(
self
,
view
):
fields
=
[]
fields
=
[]
...
@@ -79,7 +78,10 @@ class CustomFilter(filters.BaseFilterBackend):
...
@@ -79,7 +78,10 @@ class CustomFilter(filters.BaseFilterBackend):
type
=
'string'
,
example
=
''
,
type
=
'string'
,
example
=
''
,
description
=
''
description
=
''
)
)
for
field
in
self
.
custom_filter_fields
:
if
not
hasattr
(
view
,
'custom_filter_fields'
):
return
[]
for
field
in
view
.
custom_filter_fields
:
if
isinstance
(
field
,
str
):
if
isinstance
(
field
,
str
):
defaults
[
'name'
]
=
field
defaults
[
'name'
]
=
field
elif
isinstance
(
field
,
dict
):
elif
isinstance
(
field
,
dict
):
...
...
apps/locale/zh/LC_MESSAGES/django.mo
View file @
b7021b5e
No preview for this file type
apps/locale/zh/LC_MESSAGES/django.po
View file @
b7021b5e
...
@@ -8,7 +8,7 @@ msgid ""
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-09-1
8 12:5
3+0800\n"
"POT-Creation-Date: 2019-09-1
9 14:4
3+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
...
@@ -77,8 +77,8 @@ msgstr "运行参数"
...
@@ -77,8 +77,8 @@ msgstr "运行参数"
#: applications/templates/applications/user_remote_app_list.html:18
#: applications/templates/applications/user_remote_app_list.html:18
#: assets/forms/domain.py:15 assets/forms/label.py:13
#: assets/forms/domain.py:15 assets/forms/label.py:13
#: assets/models/asset.py:295 assets/models/authbook.py:24
#: assets/models/asset.py:295 assets/models/authbook.py:24
#: assets/
serializers/admin_user.py:32 assets/serializers/asset_user.py:8
2
#: assets/
models/gathered_user.py:14 assets/serializers/admin_user.py:3
2
#: assets/serializers/system_user.py:31
#: assets/serializers/
asset_user.py:82 assets/serializers/
system_user.py:31
#: assets/templates/assets/admin_user_list.html:46
#: assets/templates/assets/admin_user_list.html:46
#: assets/templates/assets/domain_detail.html:60
#: assets/templates/assets/domain_detail.html:60
#: assets/templates/assets/domain_list.html:26
#: assets/templates/assets/domain_list.html:26
...
@@ -96,15 +96,13 @@ msgstr "运行参数"
...
@@ -96,15 +96,13 @@ msgstr "运行参数"
#: terminal/templates/terminal/session_list.html:28
#: terminal/templates/terminal/session_list.html:28
#: terminal/templates/terminal/session_list.html:72
#: terminal/templates/terminal/session_list.html:72
#: xpack/plugins/change_auth_plan/forms.py:121
#: xpack/plugins/change_auth_plan/forms.py:121
#: xpack/plugins/change_auth_plan/models.py:4
12
#: xpack/plugins/change_auth_plan/models.py:4
09
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:46
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:46
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:54
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:54
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:13
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:13
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:14
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:14
#: xpack/plugins/cloud/models.py:3
10
#: xpack/plugins/cloud/models.py:3
07
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:63
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:63
#: xpack/plugins/gathered_user/forms.py:13
#: xpack/plugins/gathered_user/forms.py:15
#: xpack/plugins/orgs/templates/orgs/org_list.html:16
#: xpack/plugins/orgs/templates/orgs/org_list.html:16
#: xpack/plugins/vault/forms.py:13 xpack/plugins/vault/forms.py:15
#: xpack/plugins/vault/forms.py:13 xpack/plugins/vault/forms.py:15
msgid "Asset"
msgid "Asset"
...
@@ -162,6 +160,8 @@ msgstr "资产"
...
@@ -162,6 +160,8 @@ msgstr "资产"
#: xpack/plugins/cloud/templates/cloud/account_list.html:12
#: xpack/plugins/cloud/templates/cloud/account_list.html:12
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:56
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:56
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:12
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:12
#: xpack/plugins/gathered_user/models.py:28
#: xpack/plugins/gathered_user/templates/gathered_user/task_list.html:16
#: xpack/plugins/orgs/templates/orgs/org_detail.html:52
#: xpack/plugins/orgs/templates/orgs/org_detail.html:52
#: xpack/plugins/orgs/templates/orgs/org_list.html:12
#: xpack/plugins/orgs/templates/orgs/org_list.html:12
msgid "Name"
msgid "Name"
...
@@ -202,6 +202,7 @@ msgstr "参数"
...
@@ -202,6 +202,7 @@ msgstr "参数"
#: xpack/plugins/change_auth_plan/models.py:105
#: xpack/plugins/change_auth_plan/models.py:105
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:113
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:113
#: xpack/plugins/cloud/models.py:80 xpack/plugins/cloud/models.py:179
#: xpack/plugins/cloud/models.py:80 xpack/plugins/cloud/models.py:179
#: xpack/plugins/gathered_user/models.py:46
msgid "Created by"
msgid "Created by"
msgstr "创建者"
msgstr "创建者"
...
@@ -268,6 +269,7 @@ msgstr "创建日期"
...
@@ -268,6 +269,7 @@ msgstr "创建日期"
#: xpack/plugins/cloud/templates/cloud/account_list.html:15
#: xpack/plugins/cloud/templates/cloud/account_list.html:15
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:105
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:105
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:18
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:18
#: xpack/plugins/gathered_user/models.py:42
#: xpack/plugins/orgs/templates/orgs/org_detail.html:64
#: xpack/plugins/orgs/templates/orgs/org_detail.html:64
#: xpack/plugins/orgs/templates/orgs/org_list.html:22
#: xpack/plugins/orgs/templates/orgs/org_list.html:22
msgid "Comment"
msgid "Comment"
...
@@ -316,7 +318,7 @@ msgstr "远程应用"
...
@@ -316,7 +318,7 @@ msgstr "远程应用"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:71
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:71
#: xpack/plugins/cloud/templates/cloud/account_create_update.html:33
#: xpack/plugins/cloud/templates/cloud/account_create_update.html:33
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:53
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:53
#: xpack/plugins/gathered_user/templates/gathered_user/
vault_create.html:45
#: xpack/plugins/gathered_user/templates/gathered_user/
task_create_update.html:44
#: xpack/plugins/interface/templates/interface/interface.html:72
#: xpack/plugins/interface/templates/interface/interface.html:72
#: xpack/plugins/vault/templates/vault/vault_create.html:45
#: xpack/plugins/vault/templates/vault/vault_create.html:45
msgid "Reset"
msgid "Reset"
...
@@ -355,7 +357,6 @@ msgstr "重置"
...
@@ -355,7 +357,6 @@ msgstr "重置"
#: users/templates/users/user_profile_update.html:68
#: users/templates/users/user_profile_update.html:68
#: users/templates/users/user_pubkey_update.html:81
#: users/templates/users/user_pubkey_update.html:81
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:72
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:72
#: xpack/plugins/gathered_user/templates/gathered_user/vault_create.html:46
#: xpack/plugins/interface/templates/interface/interface.html:74
#: xpack/plugins/interface/templates/interface/interface.html:74
#: xpack/plugins/vault/templates/vault/vault_create.html:46
#: xpack/plugins/vault/templates/vault/vault_create.html:46
msgid "Submit"
msgid "Submit"
...
@@ -429,6 +430,7 @@ msgstr "详情"
...
@@ -429,6 +430,7 @@ msgstr "详情"
#: xpack/plugins/cloud/templates/cloud/account_list.html:40
#: xpack/plugins/cloud/templates/cloud/account_list.html:40
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:29
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:29
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:57
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:57
#: xpack/plugins/gathered_user/templates/gathered_user/task_list.html:51
#: xpack/plugins/orgs/templates/orgs/org_detail.html:25
#: xpack/plugins/orgs/templates/orgs/org_detail.html:25
#: xpack/plugins/orgs/templates/orgs/org_list.html:88
#: xpack/plugins/orgs/templates/orgs/org_list.html:88
msgid "Update"
msgid "Update"
...
@@ -470,6 +472,7 @@ msgstr "更新"
...
@@ -470,6 +472,7 @@ msgstr "更新"
#: xpack/plugins/cloud/templates/cloud/account_list.html:42
#: xpack/plugins/cloud/templates/cloud/account_list.html:42
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:33
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:33
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:58
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:58
#: xpack/plugins/gathered_user/templates/gathered_user/task_list.html:52
#: xpack/plugins/orgs/templates/orgs/org_detail.html:29
#: xpack/plugins/orgs/templates/orgs/org_detail.html:29
#: xpack/plugins/orgs/templates/orgs/org_list.html:90
#: xpack/plugins/orgs/templates/orgs/org_list.html:90
msgid "Delete"
msgid "Delete"
...
@@ -528,6 +531,7 @@ msgstr "创建远程应用"
...
@@ -528,6 +531,7 @@ msgstr "创建远程应用"
#: xpack/plugins/cloud/templates/cloud/account_list.html:16
#: xpack/plugins/cloud/templates/cloud/account_list.html:16
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:72
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:72
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:19
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:19
#: xpack/plugins/gathered_user/templates/gathered_user/task_list.html:20
#: xpack/plugins/orgs/templates/orgs/org_list.html:23
#: xpack/plugins/orgs/templates/orgs/org_list.html:23
msgid "Action"
msgid "Action"
msgstr "动作"
msgstr "动作"
...
@@ -560,11 +564,6 @@ msgstr "远程应用详情"
...
@@ -560,11 +564,6 @@ msgstr "远程应用详情"
msgid "My RemoteApp"
msgid "My RemoteApp"
msgstr "我的远程应用"
msgstr "我的远程应用"
#: assets/api/asset.py:40
#, python-format
msgid "%(hostname)s was %(action)s successfully"
msgstr "%(hostname)s %(action)s成功"
#: assets/api/node.py:58
#: assets/api/node.py:58
msgid "You can't update the root node name"
msgid "You can't update the root node name"
msgstr "不能修改根节点名称"
msgstr "不能修改根节点名称"
...
@@ -590,6 +589,8 @@ msgstr "端口"
...
@@ -590,6 +589,8 @@ msgstr "端口"
#: assets/templates/assets/system_user_assets.html:83
#: assets/templates/assets/system_user_assets.html:83
#: perms/models/asset_permission.py:79
#: perms/models/asset_permission.py:79
#: xpack/plugins/change_auth_plan/models.py:71
#: xpack/plugins/change_auth_plan/models.py:71
#: xpack/plugins/gathered_user/models.py:31
#: xpack/plugins/gathered_user/templates/gathered_user/task_list.html:17
msgid "Nodes"
msgid "Nodes"
msgstr "节点"
msgstr "节点"
...
@@ -619,7 +620,7 @@ msgid "Domain"
...
@@ -619,7 +620,7 @@ msgid "Domain"
msgstr "网域"
msgstr "网域"
#: assets/forms/asset.py:68 assets/forms/asset.py:101 assets/forms/asset.py:114
#: assets/forms/asset.py:68 assets/forms/asset.py:101 assets/forms/asset.py:114
#: assets/forms/asset.py:149 assets/models/node.py:
393
#: assets/forms/asset.py:149 assets/models/node.py:
401
#: assets/templates/assets/asset_create.html:42
#: assets/templates/assets/asset_create.html:42
#: perms/forms/asset_permission.py:82 perms/forms/asset_permission.py:89
#: perms/forms/asset_permission.py:82 perms/forms/asset_permission.py:89
#: perms/templates/perms/asset_permission_list.html:53
#: perms/templates/perms/asset_permission_list.html:53
...
@@ -694,7 +695,7 @@ msgstr "SSH网关,支持代理SSH,RDP和VNC"
...
@@ -694,7 +695,7 @@ msgstr "SSH网关,支持代理SSH,RDP和VNC"
#: users/templates/users/user_profile.html:47
#: users/templates/users/user_profile.html:47
#: xpack/plugins/change_auth_plan/forms.py:106
#: xpack/plugins/change_auth_plan/forms.py:106
#: xpack/plugins/change_auth_plan/models.py:62
#: xpack/plugins/change_auth_plan/models.py:62
#: xpack/plugins/change_auth_plan/models.py:40
8
#: xpack/plugins/change_auth_plan/models.py:40
5
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:65
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:65
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:53
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:53
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:12
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:12
...
@@ -722,7 +723,7 @@ msgstr "密码或密钥密码"
...
@@ -722,7 +723,7 @@ msgstr "密码或密钥密码"
#: users/templates/users/user_pubkey_update.html:41
#: users/templates/users/user_pubkey_update.html:41
#: users/templates/users/user_update.html:20
#: users/templates/users/user_update.html:20
#: xpack/plugins/change_auth_plan/models.py:92
#: xpack/plugins/change_auth_plan/models.py:92
#: xpack/plugins/change_auth_plan/models.py:26
3
#: xpack/plugins/change_auth_plan/models.py:26
0
msgid "Password"
msgid "Password"
msgstr "密码"
msgstr "密码"
...
@@ -785,6 +786,7 @@ msgid "IP"
...
@@ -785,6 +786,7 @@ msgid "IP"
msgstr "IP"
msgstr "IP"
#: assets/models/asset.py:136 assets/serializers/asset_user.py:27
#: assets/models/asset.py:136 assets/serializers/asset_user.py:27
#: assets/serializers/gathered_user.py:19
#: assets/templates/assets/_asset_list_modal.html:46
#: assets/templates/assets/_asset_list_modal.html:46
#: assets/templates/assets/_asset_user_auth_update_modal.html:9
#: assets/templates/assets/_asset_user_auth_update_modal.html:9
#: assets/templates/assets/_asset_user_auth_view_modal.html:15
#: assets/templates/assets/_asset_user_auth_view_modal.html:15
...
@@ -914,12 +916,12 @@ msgid "AuthBook"
...
@@ -914,12 +916,12 @@ msgid "AuthBook"
msgstr ""
msgstr ""
#: assets/models/base.py:31 xpack/plugins/change_auth_plan/models.py:96
#: assets/models/base.py:31 xpack/plugins/change_auth_plan/models.py:96
#: xpack/plugins/change_auth_plan/models.py:2
70
#: xpack/plugins/change_auth_plan/models.py:2
67
msgid "SSH private key"
msgid "SSH private key"
msgstr "ssh密钥"
msgstr "ssh密钥"
#: assets/models/base.py:32 xpack/plugins/change_auth_plan/models.py:99
#: assets/models/base.py:32 xpack/plugins/change_auth_plan/models.py:99
#: xpack/plugins/change_auth_plan/models.py:26
6
#: xpack/plugins/change_auth_plan/models.py:26
3
msgid "SSH public key"
msgid "SSH public key"
msgstr "ssh公钥"
msgstr "ssh公钥"
...
@@ -1054,6 +1056,11 @@ msgstr "命令过滤规则"
...
@@ -1054,6 +1056,11 @@ msgstr "命令过滤规则"
msgid "Gateway"
msgid "Gateway"
msgstr "网关"
msgstr "网关"
#: assets/models/gathered_user.py:17
#: xpack/plugins/gathered_user/templates/gathered_user/gathered_user_list.html:75
msgid "Present"
msgstr "存在"
#: assets/models/gathered_user.py:32
#: assets/models/gathered_user.py:32
msgid "GatherUser"
msgid "GatherUser"
msgstr "收集用户"
msgstr "收集用户"
...
@@ -1096,7 +1103,7 @@ msgstr "默认资产组"
...
@@ -1096,7 +1103,7 @@ msgstr "默认资产组"
msgid "User"
msgid "User"
msgstr "用户"
msgstr "用户"
#: assets/models/label.py:19 assets/models/node.py:3
84
#: assets/models/label.py:19 assets/models/node.py:3
92
#: assets/templates/assets/label_list.html:15 settings/models.py:30
#: assets/templates/assets/label_list.html:15 settings/models.py:30
msgid "Value"
msgid "Value"
msgstr "值"
msgstr "值"
...
@@ -1105,19 +1112,19 @@ msgstr "值"
...
@@ -1105,19 +1112,19 @@ msgstr "值"
msgid "Category"
msgid "Category"
msgstr "分类"
msgstr "分类"
#: assets/models/node.py:2
22
#: assets/models/node.py:2
30
msgid "New node"
msgid "New node"
msgstr "新节点"
msgstr "新节点"
#: assets/models/node.py:3
08
#: assets/models/node.py:3
16
msgid "ungrouped"
msgid "ungrouped"
msgstr "未分组"
msgstr "未分组"
#: assets/models/node.py:31
0
#: assets/models/node.py:31
8
msgid "empty"
msgid "empty"
msgstr "空"
msgstr "空"
#: assets/models/node.py:3
83
#: assets/models/node.py:3
91
msgid "Key"
msgid "Key"
msgstr "键"
msgstr "键"
...
@@ -1291,7 +1298,7 @@ msgstr "测试资产可连接性: {}"
...
@@ -1291,7 +1298,7 @@ msgstr "测试资产可连接性: {}"
#: assets/tasks/asset_user_connectivity.py:27
#: assets/tasks/asset_user_connectivity.py:27
#: assets/tasks/push_system_user.py:130
#: assets/tasks/push_system_user.py:130
#: xpack/plugins/change_auth_plan/models.py:5
21
#: xpack/plugins/change_auth_plan/models.py:5
18
msgid "The asset {} system platform {} does not support run Ansible tasks"
msgid "The asset {} system platform {} does not support run Ansible tasks"
msgstr "资产 {} 系统平台 {} 不支持运行 Ansible 任务"
msgstr "资产 {} 系统平台 {} 不支持运行 Ansible 任务"
...
@@ -1311,7 +1318,7 @@ msgstr "更新资产硬件信息"
...
@@ -1311,7 +1318,7 @@ msgstr "更新资产硬件信息"
msgid "Update asset hardware info: {}"
msgid "Update asset hardware info: {}"
msgstr "更新资产硬件信息: {}"
msgstr "更新资产硬件信息: {}"
#: assets/tasks/gather_asset_users.py:9
5
#: assets/tasks/gather_asset_users.py:9
6
msgid "Gather assets users"
msgid "Gather assets users"
msgstr "收集资产上的用户"
msgstr "收集资产上的用户"
...
@@ -1536,6 +1543,7 @@ msgstr "重命名成功"
...
@@ -1536,6 +1543,7 @@ msgstr "重命名成功"
#: perms/templates/perms/remote_app_permission_create_update.html:39
#: perms/templates/perms/remote_app_permission_create_update.html:39
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:43
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:43
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:27
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:27
#: xpack/plugins/gathered_user/templates/gathered_user/task_create_update.html:27
msgid "Basic"
msgid "Basic"
msgstr "基本"
msgstr "基本"
...
@@ -1558,6 +1566,7 @@ msgstr "自动生成密钥"
...
@@ -1558,6 +1566,7 @@ msgstr "自动生成密钥"
#: terminal/templates/terminal/terminal_update.html:40
#: terminal/templates/terminal/terminal_update.html:40
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:67
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:67
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:48
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:48
#: xpack/plugins/gathered_user/templates/gathered_user/task_create_update.html:39
msgid "Other"
msgid "Other"
msgstr "其它"
msgstr "其它"
...
@@ -1609,12 +1618,13 @@ msgstr "替换资产的管理员"
...
@@ -1609,12 +1618,13 @@ msgstr "替换资产的管理员"
#: perms/templates/perms/asset_permission_asset.html:103
#: perms/templates/perms/asset_permission_asset.html:103
#: xpack/plugins/change_auth_plan/forms.py:116
#: xpack/plugins/change_auth_plan/forms.py:116
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:109
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:109
#: xpack/plugins/gathered_user/forms.py:36
msgid "Select nodes"
msgid "Select nodes"
msgstr "选择节点"
msgstr "选择节点"
#: assets/templates/assets/admin_user_detail.html:100
#: assets/templates/assets/admin_user_detail.html:100
#: assets/templates/assets/asset_detail.html:204
#: assets/templates/assets/asset_detail.html:204
#: assets/templates/assets/asset_list.html:4
18
#: assets/templates/assets/asset_list.html:4
22
#: assets/templates/assets/cmd_filter_detail.html:106
#: assets/templates/assets/cmd_filter_detail.html:106
#: assets/templates/assets/system_user_assets.html:97
#: assets/templates/assets/system_user_assets.html:97
#: assets/templates/assets/system_user_detail.html:182
#: assets/templates/assets/system_user_detail.html:182
...
@@ -1631,6 +1641,7 @@ msgstr "选择节点"
...
@@ -1631,6 +1641,7 @@ msgstr "选择节点"
#: users/templates/users/user_list.html:256
#: users/templates/users/user_list.html:256
#: xpack/plugins/cloud/templates/cloud/account_create_update.html:34
#: xpack/plugins/cloud/templates/cloud/account_create_update.html:34
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:54
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:54
#: xpack/plugins/gathered_user/templates/gathered_user/task_create_update.html:45
#: xpack/plugins/interface/templates/interface/interface.html:103
#: xpack/plugins/interface/templates/interface/interface.html:103
#: xpack/plugins/orgs/templates/orgs/org_create_update.html:33
#: xpack/plugins/orgs/templates/orgs/org_create_update.html:33
msgid "Confirm"
msgid "Confirm"
...
@@ -1678,8 +1689,8 @@ msgstr "创建管理用户"
...
@@ -1678,8 +1689,8 @@ msgstr "创建管理用户"
#: assets/templates/assets/admin_user_list.html:162
#: assets/templates/assets/admin_user_list.html:162
#: assets/templates/assets/admin_user_list.html:193
#: assets/templates/assets/admin_user_list.html:193
#: assets/templates/assets/asset_list.html:
299
#: assets/templates/assets/asset_list.html:
303
#: assets/templates/assets/asset_list.html:3
36
#: assets/templates/assets/asset_list.html:3
40
#: assets/templates/assets/system_user_list.html:192
#: assets/templates/assets/system_user_list.html:192
#: assets/templates/assets/system_user_list.html:223
#: assets/templates/assets/system_user_list.html:223
#: users/templates/users/user_group_list.html:164
#: users/templates/users/user_group_list.html:164
...
@@ -1797,31 +1808,31 @@ msgstr "禁用所选"
...
@@ -1797,31 +1808,31 @@ msgstr "禁用所选"
msgid "Active selected"
msgid "Active selected"
msgstr "激活所选"
msgstr "激活所选"
#: assets/templates/assets/asset_list.html:1
89
#: assets/templates/assets/asset_list.html:1
93
msgid "Add assets to node"
msgid "Add assets to node"
msgstr "添加资产到节点"
msgstr "添加资产到节点"
#: assets/templates/assets/asset_list.html:19
0
#: assets/templates/assets/asset_list.html:19
4
msgid "Move assets to node"
msgid "Move assets to node"
msgstr "移动资产到节点"
msgstr "移动资产到节点"
#: assets/templates/assets/asset_list.html:19
2
#: assets/templates/assets/asset_list.html:19
6
msgid "Refresh node hardware info"
msgid "Refresh node hardware info"
msgstr "更新节点资产硬件信息"
msgstr "更新节点资产硬件信息"
#: assets/templates/assets/asset_list.html:19
3
#: assets/templates/assets/asset_list.html:19
7
msgid "Test node connective"
msgid "Test node connective"
msgstr "测试节点资产可连接性"
msgstr "测试节点资产可连接性"
#: assets/templates/assets/asset_list.html:19
5
#: assets/templates/assets/asset_list.html:19
9
msgid "Display only current node assets"
msgid "Display only current node assets"
msgstr "仅显示当前节点资产"
msgstr "仅显示当前节点资产"
#: assets/templates/assets/asset_list.html:
196
#: assets/templates/assets/asset_list.html:
200
msgid "Displays all child node assets"
msgid "Displays all child node assets"
msgstr "显示所有子节点资产"
msgstr "显示所有子节点资产"
#: assets/templates/assets/asset_list.html:41
2
#: assets/templates/assets/asset_list.html:41
6
#: assets/templates/assets/system_user_list.html:133
#: assets/templates/assets/system_user_list.html:133
#: users/templates/users/user_detail.html:388
#: users/templates/users/user_detail.html:388
#: users/templates/users/user_detail.html:414
#: users/templates/users/user_detail.html:414
...
@@ -1832,11 +1843,11 @@ msgstr "显示所有子节点资产"
...
@@ -1832,11 +1843,11 @@ msgstr "显示所有子节点资产"
msgid "Are you sure?"
msgid "Are you sure?"
msgstr "你确认吗?"
msgstr "你确认吗?"
#: assets/templates/assets/asset_list.html:41
3
#: assets/templates/assets/asset_list.html:41
7
msgid "This will delete the selected assets !!!"
msgid "This will delete the selected assets !!!"
msgstr "删除选择资产"
msgstr "删除选择资产"
#: assets/templates/assets/asset_list.html:4
16
#: assets/templates/assets/asset_list.html:4
20
#: assets/templates/assets/system_user_list.html:137
#: assets/templates/assets/system_user_list.html:137
#: settings/templates/settings/terminal_setting.html:166
#: settings/templates/settings/terminal_setting.html:166
#: users/templates/users/user_detail.html:392
#: users/templates/users/user_detail.html:392
...
@@ -1850,16 +1861,16 @@ msgstr "删除选择资产"
...
@@ -1850,16 +1861,16 @@ msgstr "删除选择资产"
msgid "Cancel"
msgid "Cancel"
msgstr "取消"
msgstr "取消"
#: assets/templates/assets/asset_list.html:4
29
#: assets/templates/assets/asset_list.html:4
33
msgid "Asset Deleted."
msgid "Asset Deleted."
msgstr "已被删除"
msgstr "已被删除"
#: assets/templates/assets/asset_list.html:430
#: assets/templates/assets/asset_list.html:434
#: assets/templates/assets/asset_list.html:434
#: assets/templates/assets/asset_list.html:438
msgid "Asset Delete"
msgid "Asset Delete"
msgstr "删除"
msgstr "删除"
#: assets/templates/assets/asset_list.html:43
3
#: assets/templates/assets/asset_list.html:43
7
msgid "Asset Deleting failed."
msgid "Asset Deleting failed."
msgstr "删除失败"
msgstr "删除失败"
...
@@ -2179,7 +2190,6 @@ msgstr "成功"
...
@@ -2179,7 +2190,6 @@ msgstr "成功"
#: audits/models.py:32
#: audits/models.py:32
#: authentication/templates/authentication/_access_key_modal.html:38
#: authentication/templates/authentication/_access_key_modal.html:38
#: xpack/plugins/gathered_user/templates/gathered_user/gathered_user_list.html:48
#: xpack/plugins/vault/templates/vault/vault.html:46
#: xpack/plugins/vault/templates/vault/vault.html:46
msgid "Create"
msgid "Create"
msgstr "创建"
msgstr "创建"
...
@@ -2210,8 +2220,8 @@ msgstr "启用"
...
@@ -2210,8 +2220,8 @@ msgstr "启用"
msgid "-"
msgid "-"
msgstr ""
msgstr ""
#: audits/models.py:77 xpack/plugins/cloud/models.py:26
7
#: audits/models.py:77 xpack/plugins/cloud/models.py:26
4
#: xpack/plugins/cloud/models.py:2
90
#: xpack/plugins/cloud/models.py:2
87
msgid "Failed"
msgid "Failed"
msgstr "失败"
msgstr "失败"
...
@@ -2239,15 +2249,15 @@ msgid "MFA"
...
@@ -2239,15 +2249,15 @@ msgid "MFA"
msgstr "MFA"
msgstr "MFA"
#: audits/models.py:86 audits/templates/audits/login_log_list.html:63
#: audits/models.py:86 audits/templates/audits/login_log_list.html:63
#: xpack/plugins/change_auth_plan/models.py:41
6
#: xpack/plugins/change_auth_plan/models.py:41
3
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:15
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:15
#: xpack/plugins/cloud/models.py:2
81
#: xpack/plugins/cloud/models.py:2
78
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:69
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:69
msgid "Reason"
msgid "Reason"
msgstr "原因"
msgstr "原因"
#: audits/models.py:87 audits/templates/audits/login_log_list.html:64
#: audits/models.py:87 audits/templates/audits/login_log_list.html:64
#: xpack/plugins/cloud/models.py:27
8 xpack/plugins/cloud/models.py:313
#: xpack/plugins/cloud/models.py:27
5 xpack/plugins/cloud/models.py:310
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:70
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:70
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:65
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:65
msgid "Status"
msgid "Status"
...
@@ -2265,10 +2275,11 @@ msgstr "登录日期"
...
@@ -2265,10 +2275,11 @@ msgstr "登录日期"
#: perms/templates/perms/asset_permission_detail.html:86
#: perms/templates/perms/asset_permission_detail.html:86
#: perms/templates/perms/remote_app_permission_detail.html:78
#: perms/templates/perms/remote_app_permission_detail.html:78
#: terminal/models.py:165 terminal/templates/terminal/session_list.html:34
#: terminal/models.py:165 terminal/templates/terminal/session_list.html:34
#: xpack/plugins/change_auth_plan/models.py:24
9
#: xpack/plugins/change_auth_plan/models.py:24
6
#: xpack/plugins/change_auth_plan/models.py:41
9
#: xpack/plugins/change_auth_plan/models.py:41
6
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:59
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:59
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:17
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:17
#: xpack/plugins/gathered_user/models.py:143
msgid "Date start"
msgid "Date start"
msgstr "开始日期"
msgstr "开始日期"
...
@@ -2688,19 +2699,6 @@ msgstr ""
...
@@ -2688,19 +2699,6 @@ msgstr ""
msgid "Encrypt field using Secret Key"
msgid "Encrypt field using Secret Key"
msgstr ""
msgstr ""
#: common/mixins/api.py:64
#, python-format
msgid "%(name)s was %(action)s successfully"
msgstr "%(name)s %(action)s成功"
#: common/mixins/api.py:65
msgid "create"
msgstr "创建"
#: common/mixins/api.py:65
msgid "update"
msgstr "更新"
#: common/mixins/models.py:31
#: common/mixins/models.py:31
msgid "is discard"
msgid "is discard"
msgstr ""
msgstr ""
...
@@ -2800,54 +2798,55 @@ msgstr "Become"
...
@@ -2800,54 +2798,55 @@ msgstr "Become"
msgid "Create by"
msgid "Create by"
msgstr "创建者"
msgstr "创建者"
#: ops/models/adhoc.py:22
4
#: ops/models/adhoc.py:22
6
msgid "{} Start task: {}"
msgid "{} Start task: {}"
msgstr "{} 任务开始: {}"
msgstr "{} 任务开始: {}"
#: ops/models/adhoc.py:2
27
#: ops/models/adhoc.py:2
38
msgid "{} Task finish"
msgid "{} Task finish"
msgstr "{} 任务结束"
msgstr "{} 任务结束"
#: ops/models/adhoc.py:32
5
#: ops/models/adhoc.py:32
9
msgid "Start time"
msgid "Start time"
msgstr "开始时间"
msgstr "开始时间"
#: ops/models/adhoc.py:3
26
#: ops/models/adhoc.py:3
30
msgid "End time"
msgid "End time"
msgstr "完成时间"
msgstr "完成时间"
#: ops/models/adhoc.py:3
27
ops/templates/ops/adhoc_history.html:57
#: ops/models/adhoc.py:3
31
ops/templates/ops/adhoc_history.html:57
#: ops/templates/ops/task_history.html:63 ops/templates/ops/task_list.html:33
#: ops/templates/ops/task_history.html:63 ops/templates/ops/task_list.html:33
#: xpack/plugins/change_auth_plan/models.py:2
52
#: xpack/plugins/change_auth_plan/models.py:2
49
#: xpack/plugins/change_auth_plan/models.py:4
22
#: xpack/plugins/change_auth_plan/models.py:4
19
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:58
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:58
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:16
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:16
#: xpack/plugins/gathered_user/models.py:146
msgid "Time"
msgid "Time"
msgstr "时间"
msgstr "时间"
#: ops/models/adhoc.py:3
28
ops/templates/ops/adhoc_detail.html:106
#: ops/models/adhoc.py:3
32
ops/templates/ops/adhoc_detail.html:106
#: ops/templates/ops/adhoc_history.html:55
#: ops/templates/ops/adhoc_history.html:55
#: ops/templates/ops/adhoc_history_detail.html:69
#: ops/templates/ops/adhoc_history_detail.html:69
#: ops/templates/ops/task_detail.html:84 ops/templates/ops/task_history.html:61
#: ops/templates/ops/task_detail.html:84 ops/templates/ops/task_history.html:61
msgid "Is finished"
msgid "Is finished"
msgstr "是否完成"
msgstr "是否完成"
#: ops/models/adhoc.py:3
29
ops/templates/ops/adhoc_history.html:56
#: ops/models/adhoc.py:3
33
ops/templates/ops/adhoc_history.html:56
#: ops/templates/ops/task_history.html:62
#: ops/templates/ops/task_history.html:62
msgid "Is success"
msgid "Is success"
msgstr "是否成功"
msgstr "是否成功"
#: ops/models/adhoc.py:33
0
#: ops/models/adhoc.py:33
4
msgid "Adhoc raw result"
msgid "Adhoc raw result"
msgstr "结果"
msgstr "结果"
#: ops/models/adhoc.py:33
1
#: ops/models/adhoc.py:33
5
msgid "Adhoc result summary"
msgid "Adhoc result summary"
msgstr "汇总"
msgstr "汇总"
#: ops/models/command.py:22
#: ops/models/command.py:22
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:56
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:56
#: xpack/plugins/cloud/models.py:27
6
#: xpack/plugins/cloud/models.py:27
3
msgid "Result"
msgid "Result"
msgstr "结果"
msgstr "结果"
...
@@ -2882,6 +2881,7 @@ msgstr "运行用户"
...
@@ -2882,6 +2881,7 @@ msgstr "运行用户"
#: ops/templates/ops/adhoc_detail.html:94 ops/templates/ops/task_list.html:28
#: 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
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:18
#: xpack/plugins/gathered_user/templates/gathered_user/task_list.html:19
msgid "Run times"
msgid "Run times"
msgstr "执行次数"
msgstr "执行次数"
...
@@ -3049,6 +3049,7 @@ msgstr "版本"
...
@@ -3049,6 +3049,7 @@ msgstr "版本"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:54
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:54
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:141
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:141
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:55
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:55
#: xpack/plugins/gathered_user/templates/gathered_user/task_list.html:49
msgid "Run"
msgid "Run"
msgstr "执行"
msgstr "执行"
...
@@ -3067,6 +3068,7 @@ msgid "Ops"
...
@@ -3067,6 +3068,7 @@ msgid "Ops"
msgstr "作业中心"
msgstr "作业中心"
#: ops/views/adhoc.py:46 templates/_nav.html:115
#: ops/views/adhoc.py:46 templates/_nav.html:115
#: xpack/plugins/gathered_user/views.py:35
msgid "Task list"
msgid "Task list"
msgstr "任务列表"
msgstr "任务列表"
...
@@ -3377,21 +3379,21 @@ msgstr "连接LDAP成功"
...
@@ -3377,21 +3379,21 @@ msgstr "连接LDAP成功"
msgid "Match {} s users"
msgid "Match {} s users"
msgstr "匹配 {} 个用户"
msgstr "匹配 {} 个用户"
#: settings/api.py:1
59
#: settings/api.py:1
61
msgid "succeed: {} failed: {} total: {}"
msgid "succeed: {} failed: {} total: {}"
msgstr "成功:{} 失败:{} 总数:{}"
msgstr "成功:{} 失败:{} 总数:{}"
#: settings/api.py:18
1 settings/api.py:217
#: settings/api.py:18
3 settings/api.py:219
msgid ""
msgid ""
"Error: Account invalid (Please make sure the information such as Access key "
"Error: Account invalid (Please make sure the information such as Access key "
"or Secret key is correct)"
"or Secret key is correct)"
msgstr "错误:账户无效 (请确保 Access key 或 Secret key 等信息正确)"
msgstr "错误:账户无效 (请确保 Access key 或 Secret key 等信息正确)"
#: settings/api.py:18
7 settings/api.py:223
#: settings/api.py:18
9 settings/api.py:225
msgid "Create succeed"
msgid "Create succeed"
msgstr "创建成功"
msgstr "创建成功"
#: settings/api.py:20
5 settings/api.py:243
#: settings/api.py:20
7 settings/api.py:245
#: settings/templates/settings/terminal_setting.html:154
#: settings/templates/settings/terminal_setting.html:154
msgid "Delete succeed"
msgid "Delete succeed"
msgstr "删除成功"
msgstr "删除成功"
...
@@ -3850,7 +3852,7 @@ msgid "Endpoint suffix"
...
@@ -3850,7 +3852,7 @@ msgid "Endpoint suffix"
msgstr "端点后缀"
msgstr "端点后缀"
#: settings/templates/settings/replay_storage_create.html:136
#: settings/templates/settings/replay_storage_create.html:136
#: xpack/plugins/cloud/models.py:30
7
#: xpack/plugins/cloud/models.py:30
4
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:109
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:109
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:62
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:62
msgid "Region"
msgid "Region"
...
@@ -5444,7 +5446,7 @@ msgid "Password length"
...
@@ -5444,7 +5446,7 @@ msgid "Password length"
msgstr "密码长度"
msgstr "密码长度"
#: xpack/plugins/change_auth_plan/forms.py:51
#: xpack/plugins/change_auth_plan/forms.py:51
#: xpack/plugins/change_auth_plan/models.py:2
12
#: xpack/plugins/change_auth_plan/models.py:2
09
msgid "* For security, do not change {} user's password"
msgid "* For security, do not change {} user's password"
msgstr "* 为了安全,禁止更改 {} 用户的密码"
msgstr "* 为了安全,禁止更改 {} 用户的密码"
...
@@ -5465,6 +5467,9 @@ msgstr "* 请输入有效的 crontab 表达式"
...
@@ -5465,6 +5467,9 @@ msgstr "* 请输入有效的 crontab 表达式"
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:41
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:41
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:72
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:72
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:16
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:16
#: xpack/plugins/gathered_user/forms.py:13
#: xpack/plugins/gathered_user/forms.py:41
#: xpack/plugins/gathered_user/templates/gathered_user/task_create_update.html:32
msgid "Periodic perform"
msgid "Periodic perform"
msgstr "定时执行"
msgstr "定时执行"
...
@@ -5477,10 +5482,12 @@ msgstr ""
...
@@ -5477,10 +5482,12 @@ msgstr ""
"用户不存在,则创建用户。"
"用户不存在,则创建用户。"
#: xpack/plugins/change_auth_plan/forms.py:131 xpack/plugins/cloud/forms.py:90
#: xpack/plugins/change_auth_plan/forms.py:131 xpack/plugins/cloud/forms.py:90
#: xpack/plugins/gathered_user/forms.py:44
msgid "Tips: (Units: hour)"
msgid "Tips: (Units: hour)"
msgstr "提示:(单位: 时)"
msgstr "提示:(单位: 时)"
#: xpack/plugins/change_auth_plan/forms.py:132 xpack/plugins/cloud/forms.py:91
#: xpack/plugins/change_auth_plan/forms.py:132 xpack/plugins/cloud/forms.py:91
#: xpack/plugins/gathered_user/forms.py:45
msgid ""
msgid ""
"eg: Every Sunday 03:05 run <5 3 * * 0> <br> Tips: Using 5 digits linux "
"eg: Every Sunday 03:05 run <5 3 * * 0> <br> Tips: Using 5 digits linux "
"crontab expressions <min hour day month week> (<a href='https://tool.lu/"
"crontab expressions <min hour day month week> (<a href='https://tool.lu/"
...
@@ -5493,7 +5500,7 @@ msgstr ""
...
@@ -5493,7 +5500,7 @@ msgstr ""
#: xpack/plugins/change_auth_plan/meta.py:9
#: xpack/plugins/change_auth_plan/meta.py:9
#: xpack/plugins/change_auth_plan/models.py:113
#: xpack/plugins/change_auth_plan/models.py:113
#: xpack/plugins/change_auth_plan/models.py:25
6
#: xpack/plugins/change_auth_plan/models.py:25
3
#: xpack/plugins/change_auth_plan/views.py:33
#: xpack/plugins/change_auth_plan/views.py:33
#: xpack/plugins/change_auth_plan/views.py:50
#: xpack/plugins/change_auth_plan/views.py:50
#: xpack/plugins/change_auth_plan/views.py:72
#: xpack/plugins/change_auth_plan/views.py:72
...
@@ -5521,6 +5528,8 @@ msgstr "所有资产使用不同的随机密码"
...
@@ -5521,6 +5528,8 @@ msgstr "所有资产使用不同的随机密码"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:100
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:100
#: xpack/plugins/cloud/models.py:165 xpack/plugins/cloud/models.py:219
#: xpack/plugins/cloud/models.py:165 xpack/plugins/cloud/models.py:219
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:91
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:91
#: xpack/plugins/gathered_user/models.py:35
#: xpack/plugins/gathered_user/models.py:72
msgid "Cycle perform"
msgid "Cycle perform"
msgstr "周期执行"
msgstr "周期执行"
...
@@ -5529,6 +5538,8 @@ msgstr "周期执行"
...
@@ -5529,6 +5538,8 @@ msgstr "周期执行"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:92
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:92
#: xpack/plugins/cloud/models.py:170 xpack/plugins/cloud/models.py:217
#: xpack/plugins/cloud/models.py:170 xpack/plugins/cloud/models.py:217
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:83
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:83
#: xpack/plugins/gathered_user/models.py:40
#: xpack/plugins/gathered_user/models.py:70
msgid "Regularly perform"
msgid "Regularly perform"
msgstr "定期执行"
msgstr "定期执行"
...
@@ -5537,28 +5548,28 @@ msgstr "定期执行"
...
@@ -5537,28 +5548,28 @@ msgstr "定期执行"
msgid "Password rules"
msgid "Password rules"
msgstr "密码规则"
msgstr "密码规则"
#: xpack/plugins/change_auth_plan/models.py:21
6
#: xpack/plugins/change_auth_plan/models.py:21
3
msgid "Assets is empty, please add the asset"
msgid "Assets is empty, please add the asset"
msgstr "资产为空,请添加资产"
msgstr "资产为空,请添加资产"
#: xpack/plugins/change_auth_plan/models.py:2
60
#: xpack/plugins/change_auth_plan/models.py:2
57
msgid "Change auth plan snapshot"
msgid "Change auth plan snapshot"
msgstr "改密计划快照"
msgstr "改密计划快照"
#: xpack/plugins/change_auth_plan/models.py:27
5
#: xpack/plugins/change_auth_plan/models.py:27
2
#: xpack/plugins/change_auth_plan/models.py:42
6
#: xpack/plugins/change_auth_plan/models.py:42
3
msgid "Change auth plan execution"
msgid "Change auth plan execution"
msgstr "改密计划执行"
msgstr "改密计划执行"
#: xpack/plugins/change_auth_plan/models.py:43
5
#: xpack/plugins/change_auth_plan/models.py:43
2
msgid "Change auth plan execution subtask"
msgid "Change auth plan execution subtask"
msgstr "改密计划执行子任务"
msgstr "改密计划执行子任务"
#: xpack/plugins/change_auth_plan/models.py:45
3
#: xpack/plugins/change_auth_plan/models.py:45
0
msgid "Authentication failed"
msgid "Authentication failed"
msgstr "认证失败"
msgstr "认证失败"
#: xpack/plugins/change_auth_plan/models.py:45
5
#: xpack/plugins/change_auth_plan/models.py:45
2
msgid "Connection timeout"
msgid "Connection timeout"
msgstr "连接超时"
msgstr "连接超时"
...
@@ -5603,6 +5614,7 @@ msgstr "手动执行计划"
...
@@ -5603,6 +5614,7 @@ msgstr "手动执行计划"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:179
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:179
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:103
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:103
#: xpack/plugins/gathered_user/templates/gathered_user/task_list.html:96
msgid "Execute failed"
msgid "Execute failed"
msgstr "执行失败"
msgstr "执行失败"
...
@@ -5722,37 +5734,37 @@ msgstr "实例"
...
@@ -5722,37 +5734,37 @@ msgstr "实例"
msgid "Date last sync"
msgid "Date last sync"
msgstr "最后同步日期"
msgstr "最后同步日期"
#: xpack/plugins/cloud/models.py:187 xpack/plugins/cloud/models.py:27
4
#: xpack/plugins/cloud/models.py:187 xpack/plugins/cloud/models.py:27
1
msgid "Sync instance task"
msgid "Sync instance task"
msgstr "同步实例任务"
msgstr "同步实例任务"
#: xpack/plugins/cloud/models.py:26
8 xpack/plugins/cloud/models.py:291
#: xpack/plugins/cloud/models.py:26
5 xpack/plugins/cloud/models.py:288
msgid "Succeed"
msgid "Succeed"
msgstr "成功"
msgstr "成功"
#: xpack/plugins/cloud/models.py:26
9
#: xpack/plugins/cloud/models.py:26
6
msgid "Partial succeed"
msgid "Partial succeed"
msgstr ""
msgstr ""
#: xpack/plugins/cloud/models.py:28
4 xpack/plugins/cloud/models.py:316
#: xpack/plugins/cloud/models.py:28
1 xpack/plugins/cloud/models.py:313
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:71
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:71
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:66
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:66
msgid "Date sync"
msgid "Date sync"
msgstr "同步日期"
msgstr "同步日期"
#: xpack/plugins/cloud/models.py:2
92
#: xpack/plugins/cloud/models.py:2
89
msgid "Exist"
msgid "Exist"
msgstr "存在"
msgstr "存在"
#: xpack/plugins/cloud/models.py:29
7
#: xpack/plugins/cloud/models.py:29
4
msgid "Sync task"
msgid "Sync task"
msgstr "同步任务"
msgstr "同步任务"
#: xpack/plugins/cloud/models.py:
301
#: xpack/plugins/cloud/models.py:
298
msgid "Sync instance task history"
msgid "Sync instance task history"
msgstr "同步实例任务历史"
msgstr "同步实例任务历史"
#: xpack/plugins/cloud/models.py:30
4
#: xpack/plugins/cloud/models.py:30
1
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:117
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:117
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:61
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:61
msgid "Instance"
msgid "Instance"
...
@@ -5873,26 +5885,51 @@ msgid "Update sync Instance task"
...
@@ -5873,26 +5885,51 @@ msgid "Update sync Instance task"
msgstr "更新同步实例任务"
msgstr "更新同步实例任务"
#: xpack/plugins/gathered_user/meta.py:11
#: xpack/plugins/gathered_user/meta.py:11
#: xpack/plugins/gathered_user/views.py:22
#: xpack/plugins/gathered_user/views.py:21
#: xpack/plugins/gathered_user/views.py:34
msgid "Gathered user"
msgid "Gathered user"
msgstr "收集用户"
msgstr "收集用户"
#: xpack/plugins/gathered_user/templates/gathered_user/gathered_user_list.html:75
#: xpack/plugins/gathered_user/models.py:33
msgid "Present"
#: xpack/plugins/gathered_user/templates/gathered_user/task_list.html:18
msgstr "存在"
msgid "Periodic"
msgstr "定时执行"
#: xpack/plugins/gathered_user/models.py:57
#: xpack/plugins/gathered_user/templates/gathered_user/gathered_user_list.html:48
msgid "Gather user task"
msgstr "收集用户任务"
#: xpack/plugins/gathered_user/views.py:23
#: xpack/plugins/gathered_user/models.py:140
msgid "Task"
msgstr "任务"
#: xpack/plugins/gathered_user/models.py:152
msgid "gather user task execution"
msgstr "收集用户执行"
#: xpack/plugins/gathered_user/models.py:158
msgid "Assets is empty, please change nodes"
msgstr "资产为空,请更改节点"
#: xpack/plugins/gathered_user/templates/gathered_user/task_list.html:7
#: xpack/plugins/gathered_user/views.py:50
msgid "Create task"
msgstr "创建任务"
#: xpack/plugins/gathered_user/views.py:22
msgid "Gathered user list"
msgid "Gathered user list"
msgstr "收集用户列表"
msgstr "收集用户列表"
#: xpack/plugins/gathered_user/views.py:37 xpack/plugins/vault/meta.py:11
#: xpack/plugins/gathered_user/views.py:49
#: xpack/plugins/gathered_user/views.py:66 xpack/plugins/vault/meta.py:11
#: xpack/plugins/vault/views.py:23 xpack/plugins/vault/views.py:38
#: xpack/plugins/vault/views.py:23 xpack/plugins/vault/views.py:38
msgid "Vault"
msgid "Vault"
msgstr "密码匣子"
msgstr "密码匣子"
#: xpack/plugins/gathered_user/views.py:
38 xpack/plugins/vault/views.py:39
#: xpack/plugins/gathered_user/views.py:
67
msgid "
vault create
"
msgid "
Update task
"
msgstr "
创建
"
msgstr "
更新任务
"
#: xpack/plugins/interface/forms.py:17 xpack/plugins/interface/models.py:15
#: xpack/plugins/interface/forms.py:17 xpack/plugins/interface/models.py:15
msgid "Title of login page"
msgid "Title of login page"
...
@@ -6112,6 +6149,25 @@ msgstr "导入密码"
...
@@ -6112,6 +6149,25 @@ msgstr "导入密码"
msgid "vault list"
msgid "vault list"
msgstr "密码匣子"
msgstr "密码匣子"
#: xpack/plugins/vault/views.py:39
msgid "vault create"
msgstr "创建"
#~ msgid "Gather user plan"
#~ msgstr "收集用户计划"
#~ msgid "Task update"
#~ msgstr "更新"
#~ msgid "Task create"
#~ msgstr "创建"
#~ msgid "%(hostname)s was %(action)s successfully"
#~ msgstr "%(hostname)s %(action)s成功"
#~ msgid "%(name)s was %(action)s successfully"
#~ msgstr "%(name)s %(action)s成功"
#~ msgid "* For security, do not change {}'s password"
#~ msgid "* For security, do not change {}'s password"
#~ msgstr "* 为了安全,禁止更改 {} 的密码"
#~ msgstr "* 为了安全,禁止更改 {} 的密码"
...
...
apps/ops/models/adhoc.py
View file @
b7021b5e
...
@@ -218,28 +218,32 @@ class AdHoc(models.Model):
...
@@ -218,28 +218,32 @@ class AdHoc(models.Model):
hid
=
str
(
uuid
.
uuid4
())
hid
=
str
(
uuid
.
uuid4
())
history
=
AdHocRunHistory
(
id
=
hid
,
adhoc
=
self
,
task
=
self
.
task
)
history
=
AdHocRunHistory
(
id
=
hid
,
adhoc
=
self
,
task
=
self
.
task
)
time_start
=
time
.
time
()
time_start
=
time
.
time
()
date_start
=
timezone
.
now
()
is_success
=
False
try
:
try
:
date_start
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
date_start_s
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
history
.
date_start
=
timezone
.
now
()
print
(
_
(
"{} Start task: {}"
)
.
format
(
date_start_s
,
self
.
task
.
name
))
print
(
_
(
"{} Start task: {}"
)
.
format
(
date_start
,
self
.
task
.
name
))
raw
,
summary
=
self
.
_run_only
()
raw
,
summary
=
self
.
_run_only
()
date_end
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
is_success
=
summary
.
get
(
'success'
,
False
)
print
(
_
(
"{} Task finish"
)
.
format
(
date_end
))
history
.
is_finished
=
True
if
summary
.
get
(
'dark'
):
history
.
is_success
=
False
else
:
history
.
is_success
=
True
history
.
result
=
raw
history
.
summary
=
summary
return
raw
,
summary
return
raw
,
summary
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
error
(
e
,
exc_info
=
True
)
logger
.
error
(
e
,
exc_info
=
True
)
return
{},
{
"dark"
:
{
"all"
:
str
(
e
)},
"contacted"
:
[]}
summary
=
{}
raw
=
{
"dark"
:
{
"all"
:
str
(
e
)},
"contacted"
:
[]}
return
raw
,
summary
finally
:
finally
:
history
.
date_finished
=
timezone
.
now
()
date_end
=
timezone
.
now
()
history
.
timedelta
=
time
.
time
()
-
time_start
date_end_s
=
date_end
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
history
.
save
()
print
(
_
(
"{} Task finish"
)
.
format
(
date_end_s
))
print
(
'.
\n\n
.'
)
AdHocRunHistory
.
objects
.
filter
(
id
=
history
.
id
)
.
update
(
date_start
=
date_start
,
is_finished
=
True
,
is_success
=
is_success
,
date_finished
=
timezone
.
now
(),
timedelta
=
time
.
time
()
-
time_start
)
def
_run_only
(
self
):
def
_run_only
(
self
):
runner
=
AdHocRunner
(
self
.
inventory
,
options
=
self
.
options
)
runner
=
AdHocRunner
(
self
.
inventory
,
options
=
self
.
options
)
...
...
apps/orgs/mixins/api.py
View file @
b7021b5e
...
@@ -20,12 +20,7 @@ class RootOrgViewMixin:
...
@@ -20,12 +20,7 @@ class RootOrgViewMixin:
return
super
()
.
dispatch
(
request
,
*
args
,
**
kwargs
)
return
super
()
.
dispatch
(
request
,
*
args
,
**
kwargs
)
class
OrgModelViewSet
(
CommonApiMixin
,
ModelViewSet
):
class
OrgQuerySetMixin
:
def
get_queryset
(
self
):
return
super
()
.
get_queryset
()
.
all
()
class
OrgBulkModelViewSet
(
CommonApiMixin
,
BulkModelViewSet
):
def
get_queryset
(
self
):
def
get_queryset
(
self
):
queryset
=
super
()
.
get_queryset
()
.
all
()
queryset
=
super
()
.
get_queryset
()
.
all
()
if
hasattr
(
self
,
'swagger_fake_view'
):
if
hasattr
(
self
,
'swagger_fake_view'
):
...
@@ -36,6 +31,12 @@ class OrgBulkModelViewSet(CommonApiMixin, BulkModelViewSet):
...
@@ -36,6 +31,12 @@ class OrgBulkModelViewSet(CommonApiMixin, BulkModelViewSet):
queryset
=
self
.
serializer_class
.
setup_eager_loading
(
queryset
)
queryset
=
self
.
serializer_class
.
setup_eager_loading
(
queryset
)
return
queryset
return
queryset
class
OrgModelViewSet
(
CommonApiMixin
,
OrgQuerySetMixin
,
ModelViewSet
):
pass
class
OrgBulkModelViewSet
(
CommonApiMixin
,
OrgQuerySetMixin
,
BulkModelViewSet
):
def
allow_bulk_destroy
(
self
,
qs
,
filtered
):
def
allow_bulk_destroy
(
self
,
qs
,
filtered
):
if
qs
.
count
()
<=
filtered
.
count
():
if
qs
.
count
()
<=
filtered
.
count
():
return
False
return
False
...
...
apps/perms/api/user_permission/mixin.py
View file @
b7021b5e
...
@@ -7,7 +7,7 @@ from common.tree import TreeNodeSerializer
...
@@ -7,7 +7,7 @@ from common.tree import TreeNodeSerializer
class
UserAssetPermissionMixin
(
UserPermissionMixin
):
class
UserAssetPermissionMixin
(
UserPermissionMixin
):
util
=
AssetPermissionUtilV2
(
None
)
util
=
None
tree
=
None
tree
=
None
def
initial
(
self
,
*
args
,
**
kwargs
):
def
initial
(
self
,
*
args
,
**
kwargs
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment