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
2cd092af
Commit
2cd092af
authored
Jun 19, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改资产创建格式
parent
10616b8d
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
225 additions
and
270 deletions
+225
-270
asset.py
apps/assets/api/asset.py
+2
-2
asset_user.py
apps/assets/api/asset_user.py
+1
-1
asset.py
apps/assets/models/asset.py
+1
-1
base.py
apps/assets/models/base.py
+2
-2
asset.py
apps/assets/serializers/asset.py
+24
-3
asset_user.py
apps/assets/serializers/asset_user.py
+0
-1
_asset_user_auth_view_modal.html
.../assets/templates/assets/_asset_user_auth_view_modal.html
+1
-21
_asset_user_list.html
apps/assets/templates/assets/_asset_user_list.html
+17
-0
asset_create.html
apps/assets/templates/assets/asset_create.html
+9
-11
asset_detail.html
apps/assets/templates/assets/asset_detail.html
+1
-2
asset_update.html
apps/assets/templates/assets/asset_update.html
+3
-41
_mfa_confirm_modal.html
...tication/templates/authentication/_mfa_confirm_modal.html
+0
-26
mixins.py
apps/common/mixins.py
+3
-0
django.mo
apps/locale/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/locale/zh/LC_MESSAGES/django.po
+155
-155
tasks.py
apps/ops/tasks.py
+4
-3
mixins.py
apps/orgs/mixins.py
+2
-1
No files found.
apps/assets/api/asset.py
View file @
2cd092af
...
@@ -40,8 +40,8 @@ class AssetViewSet(IDInCacheFilterMixin, LabelFilter, ApiMessageMixin, BulkModel
...
@@ -40,8 +40,8 @@ class AssetViewSet(IDInCacheFilterMixin, LabelFilter, ApiMessageMixin, BulkModel
"""
"""
API endpoint that allows Asset to be viewed or edited.
API endpoint that allows Asset to be viewed or edited.
"""
"""
filter_fields
=
(
"hostname"
,
"ip"
)
filter_fields
=
(
"hostname"
,
"ip"
,
"systemuser__id"
,
"admin_user__id"
)
search_fields
=
filter_fields
search_fields
=
(
"hostname"
,
"ip"
)
ordering_fields
=
(
"hostname"
,
"ip"
,
"port"
,
"cpu_cores"
)
ordering_fields
=
(
"hostname"
,
"ip"
,
"port"
,
"cpu_cores"
)
queryset
=
Asset
.
objects
.
all
()
queryset
=
Asset
.
objects
.
all
()
serializer_class
=
serializers
.
AssetSerializer
serializer_class
=
serializers
.
AssetSerializer
...
...
apps/assets/api/asset_user.py
View file @
2cd092af
...
@@ -96,7 +96,7 @@ class AssetUserViewSet(IDInCacheFilterMixin, BulkModelViewSet):
...
@@ -96,7 +96,7 @@ class AssetUserViewSet(IDInCacheFilterMixin, BulkModelViewSet):
assets
=
[
asset
]
assets
=
[
asset
]
elif
node_id
:
elif
node_id
:
node
=
get_object_or_404
(
Node
,
id
=
node_id
)
node
=
get_object_or_404
(
Node
,
id
=
node_id
)
assets
=
node
.
assets
.
all
()
assets
=
node
.
get_all_assets
()
if
username
:
if
username
:
kwargs
[
'username'
]
=
username
kwargs
[
'username'
]
=
username
...
...
apps/assets/models/asset.py
View file @
2cd092af
...
@@ -74,7 +74,7 @@ class Protocol(models.Model):
...
@@ -74,7 +74,7 @@ class Protocol(models.Model):
validators
=
PORT_VALIDATORS
)
validators
=
PORT_VALIDATORS
)
def
__str__
(
self
):
def
__str__
(
self
):
return
"{}
:
{}"
.
format
(
self
.
name
,
self
.
port
)
return
"{}
/
{}"
.
format
(
self
.
name
,
self
.
port
)
class
Asset
(
OrgModelMixin
):
class
Asset
(
OrgModelMixin
):
...
...
apps/assets/models/base.py
View file @
2cd092af
...
@@ -30,8 +30,8 @@ class AssetUser(OrgModelMixin):
...
@@ -30,8 +30,8 @@ class AssetUser(OrgModelMixin):
_private_key
=
models
.
TextField
(
max_length
=
4096
,
blank
=
True
,
null
=
True
,
verbose_name
=
_
(
'SSH private key'
),
validators
=
[
private_key_validator
,
])
_private_key
=
models
.
TextField
(
max_length
=
4096
,
blank
=
True
,
null
=
True
,
verbose_name
=
_
(
'SSH private key'
),
validators
=
[
private_key_validator
,
])
_public_key
=
models
.
TextField
(
max_length
=
4096
,
blank
=
True
,
verbose_name
=
_
(
'SSH public key'
))
_public_key
=
models
.
TextField
(
max_length
=
4096
,
blank
=
True
,
verbose_name
=
_
(
'SSH public key'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'Comment'
))
date_created
=
models
.
DateTimeField
(
auto_now_add
=
True
)
date_created
=
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
_
(
"Date created"
)
)
date_updated
=
models
.
DateTimeField
(
auto_now
=
True
)
date_updated
=
models
.
DateTimeField
(
auto_now
=
True
,
verbose_name
=
_
(
"Date updated"
)
)
created_by
=
models
.
CharField
(
max_length
=
128
,
null
=
True
,
verbose_name
=
_
(
'Created by'
))
created_by
=
models
.
CharField
(
max_length
=
128
,
null
=
True
,
verbose_name
=
_
(
'Created by'
))
UNREACHABLE
,
REACHABLE
,
UNKNOWN
=
range
(
0
,
3
)
UNREACHABLE
,
REACHABLE
,
UNKNOWN
=
range
(
0
,
3
)
...
...
apps/assets/serializers/asset.py
View file @
2cd092af
...
@@ -22,8 +22,25 @@ class ProtocolSerializer(serializers.ModelSerializer):
...
@@ -22,8 +22,25 @@ class ProtocolSerializer(serializers.ModelSerializer):
fields
=
[
"name"
,
"port"
]
fields
=
[
"name"
,
"port"
]
class
ProtocolsRelatedField
(
serializers
.
RelatedField
):
def
to_representation
(
self
,
value
):
return
str
(
value
)
def
to_internal_value
(
self
,
data
):
if
'/'
not
in
data
:
raise
ValidationError
(
"protocol not contain /: {}"
.
format
(
data
))
v
=
data
.
split
(
"/"
)
if
len
(
v
)
!=
2
:
raise
ValidationError
(
"protocol format should be name/port: {}"
.
format
(
data
))
name
,
port
=
v
cleaned_data
=
{
"name"
:
name
,
"port"
:
port
}
return
cleaned_data
class
AssetSerializer
(
BulkOrgResourceModelSerializer
):
class
AssetSerializer
(
BulkOrgResourceModelSerializer
):
protocols
=
ProtocolSerializer
(
many
=
True
)
protocols
=
ProtocolsRelatedField
(
many
=
True
,
queryset
=
Protocol
.
objects
.
all
(),
label
=
_
(
"Protocols"
)
)
"""
"""
资产的数据结构
资产的数据结构
...
@@ -47,6 +64,8 @@ class AssetSerializer(BulkOrgResourceModelSerializer):
...
@@ -47,6 +64,8 @@ class AssetSerializer(BulkOrgResourceModelSerializer):
'created_by'
,
'date_created'
,
'created_by'
,
'date_created'
,
)
)
extra_kwargs
=
{
extra_kwargs
=
{
'protocol'
:
{
'write_only'
:
True
},
'port'
:
{
'write_only'
:
True
},
'hardware_info'
:
{
'label'
:
_
(
'Hardware info'
)},
'hardware_info'
:
{
'label'
:
_
(
'Hardware info'
)},
'connectivity'
:
{
'label'
:
_
(
'Connectivity'
)},
'connectivity'
:
{
'label'
:
_
(
'Connectivity'
)},
'org_name'
:
{
'label'
:
_
(
'Org name'
)}
'org_name'
:
{
'label'
:
_
(
'Org name'
)}
...
@@ -61,6 +80,8 @@ class AssetSerializer(BulkOrgResourceModelSerializer):
...
@@ -61,6 +80,8 @@ class AssetSerializer(BulkOrgResourceModelSerializer):
@staticmethod
@staticmethod
def
validate_protocols
(
attr
):
def
validate_protocols
(
attr
):
protocols_serializer
=
ProtocolSerializer
(
data
=
attr
,
many
=
True
)
protocols_serializer
.
is_valid
(
raise_exception
=
True
)
protocols_name
=
[
i
.
get
(
"name"
,
"ssh"
)
for
i
in
attr
]
protocols_name
=
[
i
.
get
(
"name"
,
"ssh"
)
for
i
in
attr
]
errors
=
[{}
for
i
in
protocols_name
]
errors
=
[{}
for
i
in
protocols_name
]
for
i
,
name
in
enumerate
(
protocols_name
):
for
i
,
name
in
enumerate
(
protocols_name
):
...
@@ -71,7 +92,7 @@ class AssetSerializer(BulkOrgResourceModelSerializer):
...
@@ -71,7 +92,7 @@ class AssetSerializer(BulkOrgResourceModelSerializer):
return
attr
return
attr
def
create
(
self
,
validated_data
):
def
create
(
self
,
validated_data
):
protocols_data
=
validated_data
.
pop
(
"protocols"
)
protocols_data
=
validated_data
.
pop
(
"protocols"
,
[]
)
# 兼容老的api
# 兼容老的api
protocol
=
validated_data
.
get
(
"protocol"
)
protocol
=
validated_data
.
get
(
"protocol"
)
...
@@ -91,7 +112,7 @@ class AssetSerializer(BulkOrgResourceModelSerializer):
...
@@ -91,7 +112,7 @@ class AssetSerializer(BulkOrgResourceModelSerializer):
return
instance
return
instance
def
update
(
self
,
instance
,
validated_data
):
def
update
(
self
,
instance
,
validated_data
):
protocols_data
=
validated_data
.
pop
(
"protocols"
,
None
)
protocols_data
=
validated_data
.
pop
(
"protocols"
,
[]
)
# 兼容老的api
# 兼容老的api
protocol
=
validated_data
.
get
(
"protocol"
)
protocol
=
validated_data
.
get
(
"protocol"
)
...
...
apps/assets/serializers/asset_user.py
View file @
2cd092af
...
@@ -7,7 +7,6 @@ from rest_framework import serializers
...
@@ -7,7 +7,6 @@ from rest_framework import serializers
from
..models
import
AuthBook
,
Asset
from
..models
import
AuthBook
,
Asset
from
..backends
import
AssetUserManager
from
..backends
import
AssetUserManager
from
common.utils
import
validate_ssh_private_key
from
common.utils
import
validate_ssh_private_key
from
common.mixins
import
BulkSerializerMixin
from
common.serializers
import
AdaptedBulkListSerializer
from
common.serializers
import
AdaptedBulkListSerializer
from
orgs.mixins
import
BulkOrgResourceModelSerializer
from
orgs.mixins
import
BulkOrgResourceModelSerializer
...
...
apps/assets/templates/assets/_asset_user_auth_view_modal.html
View file @
2cd092af
...
@@ -35,11 +35,10 @@
...
@@ -35,11 +35,10 @@
</div>
</div>
</div>
</div>
</form>
</form>
{% include 'authentication/_mfa_confirm_modal.html' %}
<script
src=
"{% static "
js
/
plugins
/
clipboard
/
clipboard
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
js
/
plugins
/
clipboard
/
clipboard
.
min
.
js
"
%}"
></script>
<script>
<script>
var
showPassword
=
false
;
var
showPassword
=
false
;
var
lastMFATime
=
"{{ request.session.OTP_LAST_VERIFY_TIME }}"
;
var
authAssetId
=
""
;
var
authAssetId
=
""
;
var
authHostname
=
""
;
var
authHostname
=
""
;
var
authUsername
=
""
;
var
authUsername
=
""
;
...
@@ -90,25 +89,6 @@ $(document).ready(function () {
...
@@ -90,25 +89,6 @@ $(document).ready(function () {
$
(
"#id_password_view"
).
attr
(
"type"
,
"password"
)
$
(
"#id_password_view"
).
attr
(
"type"
,
"password"
)
}
}
}).
on
(
"show.bs.modal"
,
"#asset_user_auth_view"
,
function
()
{
}).
on
(
"show.bs.modal"
,
"#asset_user_auth_view"
,
function
()
{
var
now
=
new
Date
();
if
(
lastMFATime
===
""
)
{
lastMFATime
=
0
}
var
nowTime
=
now
.
getTime
()
/
1000
;
if
(
nowTime
-
lastMFATime
>
60
*
10
)
{
setTimeout
(
function
()
{
$
(
"#asset_user_auth_view"
).
modal
(
"hide"
);
},
100
);
mfaFor
=
"viewAuth"
;
$
(
"#mfa_auth_confirm"
).
modal
(
"show"
);
}
else
{
showAuth
();
}
}).
on
(
"success"
,
'#mfa_auth_confirm'
,
function
()
{
if
(
mfaFor
!==
"viewAuth"
)
{
return
}
$
(
"#asset_user_auth_view"
).
modal
(
"show"
);
showAuth
();
showAuth
();
})
})
</script>
</script>
...
...
apps/assets/templates/assets/_asset_user_list.html
View file @
2cd092af
...
@@ -25,12 +25,14 @@
...
@@ -25,12 +25,14 @@
</table>
</table>
{% include 'assets/_asset_user_auth_update_modal.html' %}
{% include 'assets/_asset_user_auth_update_modal.html' %}
{% include 'assets/_asset_user_auth_view_modal.html' %}
{% include 'assets/_asset_user_auth_view_modal.html' %}
{% include 'authentication/_mfa_confirm_modal.html' %}
<script>
<script>
var
assetUserListUrl
=
"{% url "
api
-
assets
:
asset
-
user
-
list
" %}"
;
var
assetUserListUrl
=
"{% url "
api
-
assets
:
asset
-
user
-
list
" %}"
;
var
assetUserTable
;
var
assetUserTable
;
var
needPush
=
false
;
var
needPush
=
false
;
var
prefer
=
null
;
var
prefer
=
null
;
var
lastMFATime
=
"{{ request.session.OTP_LAST_VERIFY_TIME }}"
;
function
initAssetUserTable
()
{
function
initAssetUserTable
()
{
var
options
=
{
var
options
=
{
...
@@ -98,7 +100,20 @@ $(document).ready(function(){
...
@@ -98,7 +100,20 @@ $(document).ready(function(){
authAssetId
=
$
(
this
).
data
(
"asset"
)
;
authAssetId
=
$
(
this
).
data
(
"asset"
)
;
authHostname
=
$
(
this
).
data
(
"hostname"
);
authHostname
=
$
(
this
).
data
(
"hostname"
);
authUsername
=
$
(
this
).
data
(
'user'
);
authUsername
=
$
(
this
).
data
(
'user'
);
var
now
=
new
Date
();
var
nowTime
=
now
.
getTime
()
/
1000
;
if
(
nowTime
-
lastMFATime
>
60
*
10
)
{
mfaFor
=
"viewAuth"
;
$
(
"#mfa_auth_confirm"
).
modal
(
"show"
);
}
else
{
$
(
"#asset_user_auth_view"
).
modal
(
'show'
);
$
(
"#asset_user_auth_view"
).
modal
(
'show'
);
}
})
.
on
(
"success"
,
'#mfa_auth_confirm'
,
function
()
{
if
(
mfaFor
!==
"viewAuth"
)
{
return
}
$
(
"#asset_user_auth_view"
).
modal
(
"show"
);
})
})
.
on
(
'click'
,
'.btn-update-auth'
,
function
()
{
.
on
(
'click'
,
'.btn-update-auth'
,
function
()
{
authUsername
=
$
(
this
).
data
(
"user"
)
;
authUsername
=
$
(
this
).
data
(
"user"
)
;
...
@@ -126,4 +141,5 @@ $(document).ready(function(){
...
@@ -126,4 +141,5 @@ $(document).ready(function(){
});
});
})
})
</script>
</script>
\ No newline at end of file
apps/assets/templates/assets/asset_create.html
View file @
2cd092af
...
@@ -201,15 +201,13 @@ $(document).ready(function () {
...
@@ -201,15 +201,13 @@ $(document).ready(function () {
}
}
$
(
this
).
parent
().
parent
().
find
(
".protocol-port"
).
val
(
port
);
$
(
this
).
parent
().
parent
().
find
(
".protocol-port"
).
val
(
port
);
})
})
</script>
.
on
(
"submit"
,
"form"
,
function
(
evt
)
{
{% block form_submit %}
<script>
$
(
document
).
ready
(
function
()
{
})
.
on
(
"submit"
,
"form"
,
function
(
evt
)
{
evt
.
preventDefault
();
evt
.
preventDefault
();
{
%
block
formUrl
%
}
var
the_url
=
'{% url '
api
-
assets
:
asset
-
list
' %}'
;
var
the_url
=
'{% url '
api
-
assets
:
asset
-
list
' %}'
;
var
redirect_to
=
'{% url "assets:asset-list" %}'
;
var
redirect_to
=
'{% url "assets:asset-list" %}'
;
var
method
=
"POST"
;
{
%
endblock
%
}
var
form
=
$
(
"form"
);
var
form
=
$
(
"form"
);
var
protocols
=
{};
var
protocols
=
{};
var
data
=
form
.
serializeObject
();
var
data
=
form
.
serializeObject
();
...
@@ -225,8 +223,9 @@ $(document).ready(function () {
...
@@ -225,8 +223,9 @@ $(document).ready(function () {
protocols
[
formName
][
key
]
=
v
protocols
[
formName
][
key
]
=
v
}
}
});
});
protocols
=
$
.
map
(
protocols
,
function
(
v
)
{
return
v
protocols
=
$
.
map
(
protocols
,
function
(
v
)
{
return
v
.
name
+
'/'
+
v
.
port
});
});
data
[
"protocols"
]
=
protocols
;
data
[
"protocols"
]
=
protocols
;
if
(
typeof
data
.
labels
===
"string"
)
{
if
(
typeof
data
.
labels
===
"string"
)
{
...
@@ -238,12 +237,11 @@ $(document).ready(function () {
...
@@ -238,12 +237,11 @@ $(document).ready(function () {
var
props
=
{
var
props
=
{
url
:
the_url
,
url
:
the_url
,
data
:
data
,
data
:
data
,
method
:
"POST"
,
method
:
method
,
form
:
form
,
form
:
form
,
redirect_to
:
redirect_to
redirect_to
:
redirect_to
};
};
formSubmit
(
props
);
formSubmit
(
props
);
})
})
</script>
</script>
{% endblock %}
{% endblock %}
{% endblock %}
apps/assets/templates/assets/asset_detail.html
View file @
2cd092af
...
@@ -72,8 +72,7 @@
...
@@ -72,8 +72,7 @@
<td>
{% trans 'Protocol' %}
</td>
<td>
{% trans 'Protocol' %}
</td>
<td>
<td>
{% for protocol in asset.protocols.all %}
{% for protocol in asset.protocols.all %}
<b>
{{ protocol.name }}:
</b>
<b>
{{ protocol }}
</b>
{{ protocol.port }}
{% endfor %}
{% endfor %}
</td>
</td>
</tr>
</tr>
...
...
apps/assets/templates/assets/asset_update.html
View file @
2cd092af
...
@@ -8,47 +8,8 @@
...
@@ -8,47 +8,8 @@
{% bootstrap_field form.number layout="horizontal" %}
{% bootstrap_field form.number layout="horizontal" %}
{% endblock %}
{% endblock %}
{% block form_submit %}
{% block formUrl %}
<script>
$
(
document
).
ready
(
function
()
{
})
.
on
(
"submit"
,
"form"
,
function
(
evt
)
{
evt
.
preventDefault
();
var the_url = '{% url 'api-assets:asset-detail' pk=object.id %}';
var the_url = '{% url 'api-assets:asset-detail' pk=object.id %}';
var redirect_to = '{% url "assets:asset-list" %}';
var redirect_to = '{% url "assets:asset-list" %}';
var
form
=
$
(
"form"
);
var method = 'PUT';
var
protocols
=
{};
var
data
=
form
.
serializeObject
();
$
.
each
(
data
,
function
(
k
,
v
)
{
if
(
k
.
startsWith
(
"form"
)){
delete
data
[
k
];
var
_k
=
k
.
split
(
"-"
);
var
formName
=
_k
.
slice
(
0
,
2
).
join
(
"-"
);
var
key
=
_k
[
_k
.
length
-
1
];
if
(
!
protocols
[
formName
])
{
protocols
[
formName
]
=
{}
}
protocols
[
formName
][
key
]
=
v
}
});
protocols
=
$
.
map
(
protocols
,
function
(
v
)
{
return
v
});
data
[
"protocols"
]
=
protocols
;
if
(
typeof
data
.
labels
===
"string"
)
{
data
[
"labels"
]
=
[
data
[
"labels"
]];
}
if
(
typeof
data
[
"nodes"
]
==
"string"
)
{
data
[
"nodes"
]
=
[
data
[
"nodes"
]]
}
var
props
=
{
url
:
the_url
,
data
:
data
,
method
:
"PUT"
,
form
:
form
,
redirect_to
:
redirect_to
};
formSubmit
(
props
);
});
</script>
{% endblock %}
{% endblock %}
\ No newline at end of file
apps/authentication/templates/authentication/_mfa_confirm_modal.html
View file @
2cd092af
...
@@ -22,32 +22,6 @@
...
@@ -22,32 +22,6 @@
</div>
</div>
</form>
</form>
<script>
<script>
var
lastMFATime
=
"{{ request.session.OTP_LAST_VERIFY_TIME }}"
;
function
showAuth
()
{
$
(
".mfa-field"
).
hide
();
$
(
".auth-field"
).
show
();
var
url
=
"{% url "
api
-
assets
:
asset
-
user
-
auth
-
info
" %}?asset_id="
+
asset_id
+
"&username="
+
username
;
$
(
"#id_username_view"
).
html
(
username
);
$
(
"#id_hostname_view"
).
html
(
host
);
var
success
=
function
(
data
)
{
var
password
=
data
.
password
;
$
(
"#id_password_view"
).
val
(
password
);
};
var
error
=
function
()
{
var
msg
=
"{% trans 'Get auth info error' %}"
;
toastr
.
error
(
msg
)
};
APIUpdateAttr
({
url
:
url
,
method
:
"GET"
,
success
:
success
,
flash_message
:
false
,
error
:
error
})
}
var
codeError
=
"{% trans 'Code error' %}"
;
var
codeError
=
"{% trans 'Code error' %}"
;
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
...
...
apps/common/mixins.py
View file @
2cd092af
...
@@ -216,7 +216,10 @@ class ApiMessageMixin:
...
@@ -216,7 +216,10 @@ class ApiMessageMixin:
data
=
{
k
:
v
for
k
,
v
in
cleaned_data
.
items
()}
data
=
{
k
:
v
for
k
,
v
in
cleaned_data
.
items
()}
action
=
getattr
(
self
,
"action"
,
"create"
)
action
=
getattr
(
self
,
"action"
,
"create"
)
data
[
"action"
]
=
self
.
_action_map
.
get
(
action
)
data
[
"action"
]
=
self
.
_action_map
.
get
(
action
)
try
:
message
=
self
.
success_message
%
data
message
=
self
.
success_message
%
data
except
:
message
=
''
return
message
return
message
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
...
...
apps/locale/zh/LC_MESSAGES/django.mo
View file @
2cd092af
No preview for this file type
apps/locale/zh/LC_MESSAGES/django.po
View file @
2cd092af
...
@@ -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-06-19 1
0:59
+0800\n"
"POT-Creation-Date: 2019-06-19 1
8:16
+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,7 +77,7 @@ msgstr "运行参数"
...
@@ -77,7 +77,7 @@ 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:315 assets/models/authbook.py:27
#: assets/models/asset.py:315 assets/models/authbook.py:27
#: assets/serializers/admin_user.py:2
3
assets/serializers/asset_user.py:105
#: assets/serializers/admin_user.py:2
4
assets/serializers/asset_user.py:105
#: assets/serializers/system_user.py:28
#: assets/serializers/system_user.py:28
#: assets/templates/assets/admin_user_list.html:49
#: assets/templates/assets/admin_user_list.html:49
#: assets/templates/assets/domain_detail.html:60
#: assets/templates/assets/domain_detail.html:60
...
@@ -218,7 +218,7 @@ msgstr "参数"
...
@@ -218,7 +218,7 @@ msgstr "参数"
#: perms/models/asset_permission.py:62 perms/models/base.py:41
#: perms/models/asset_permission.py:62 perms/models/base.py:41
#: perms/templates/perms/asset_permission_detail.html:98
#: perms/templates/perms/asset_permission_detail.html:98
#: perms/templates/perms/remote_app_permission_detail.html:90
#: perms/templates/perms/remote_app_permission_detail.html:90
#: users/models/user.py:104 users/serializers/v1.py:7
2
#: users/models/user.py:104 users/serializers/v1.py:7
3
#: users/templates/users/user_detail.html:111
#: users/templates/users/user_detail.html:111
#: xpack/plugins/change_auth_plan/models.py:106
#: xpack/plugins/change_auth_plan/models.py:106
#: 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
...
@@ -230,9 +230,10 @@ msgstr "创建者"
...
@@ -230,9 +230,10 @@ msgstr "创建者"
# msgstr "创建者"
# msgstr "创建者"
#: applications/models/remote_app.py:46
#: applications/models/remote_app.py:46
#: applications/templates/applications/remote_app_detail.html:73
#: applications/templates/applications/remote_app_detail.html:73
#: assets/models/asset.py:133 assets/models/cluster.py:26
#: assets/models/asset.py:133 assets/models/base.py:33
#: assets/models/domain.py:23 assets/models/group.py:22
#: assets/models/cluster.py:26 assets/models/domain.py:23
#: assets/models/label.py:25 assets/serializers/admin_user.py:37
#: assets/models/group.py:22 assets/models/label.py:25
#: assets/serializers/admin_user.py:38
#: assets/templates/assets/admin_user_detail.html:64
#: assets/templates/assets/admin_user_detail.html:64
#: assets/templates/assets/cmd_filter_detail.html:69
#: assets/templates/assets/cmd_filter_detail.html:69
#: assets/templates/assets/domain_detail.html:68
#: assets/templates/assets/domain_detail.html:68
...
@@ -405,13 +406,13 @@ msgstr "提交"
...
@@ -405,13 +406,13 @@ msgstr "提交"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:20
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:20
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:17
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:17
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:106
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:106
#: xpack/plugins/change_auth_plan/views.py:8
3
#: xpack/plugins/change_auth_plan/views.py:8
8
msgid "Detail"
msgid "Detail"
msgstr "详情"
msgstr "详情"
#: applications/templates/applications/remote_app_detail.html:21
#: applications/templates/applications/remote_app_detail.html:21
#: applications/templates/applications/remote_app_list.html:56
#: applications/templates/applications/remote_app_list.html:56
#: assets/templates/assets/_asset_user_list.html:6
0
#: assets/templates/assets/_asset_user_list.html:6
2
#: assets/templates/assets/admin_user_detail.html:24
#: assets/templates/assets/admin_user_detail.html:24
#: assets/templates/assets/admin_user_list.html:29
#: assets/templates/assets/admin_user_list.html:29
#: assets/templates/assets/admin_user_list.html:112
#: assets/templates/assets/admin_user_list.html:112
...
@@ -508,7 +509,7 @@ msgid "Download application loader"
...
@@ -508,7 +509,7 @@ msgid "Download application loader"
msgstr "下载应用加载器"
msgstr "下载应用加载器"
#: applications/templates/applications/remote_app_list.html:12
#: applications/templates/applications/remote_app_list.html:12
#: applications/views/remote_app.py:4
9
#: applications/views/remote_app.py:4
8
msgid "Create RemoteApp"
msgid "Create RemoteApp"
msgstr "创建远程应用"
msgstr "创建远程应用"
...
@@ -555,17 +556,17 @@ msgstr "动作"
...
@@ -555,17 +556,17 @@ msgstr "动作"
msgid "Connect"
msgid "Connect"
msgstr "连接"
msgstr "连接"
#: applications/views/remote_app.py:3
2 applications/views/remote_app.py:48
#: applications/views/remote_app.py:3
1 applications/views/remote_app.py:47
#: applications/views/remote_app.py:
70 applications/views/remote_app.py:88
#: applications/views/remote_app.py:
69 applications/views/remote_app.py:87
#: assets/models/user.py:135
#: assets/models/user.py:135
#: assets/templates/assets/_asset_group_bulk_update_modal.html:11
#: assets/templates/assets/_asset_group_bulk_update_modal.html:11
#: assets/templates/assets/system_user_asset.html:22
#: assets/templates/assets/system_user_asset.html:22
#: assets/templates/assets/system_user_detail.html:22
#: assets/templates/assets/system_user_detail.html:22
#: assets/views/admin_user.py:30 assets/views/admin_user.py:49
#: assets/views/admin_user.py:30 assets/views/admin_user.py:49
#: assets/views/admin_user.py:66 assets/views/admin_user.py:82
#: assets/views/admin_user.py:66 assets/views/admin_user.py:82
#: assets/views/admin_user.py:107 assets/views/asset.py:5
3
#: assets/views/admin_user.py:107 assets/views/asset.py:5
2
#: assets/views/asset.py:
70
assets/views/asset.py:128 assets/views/asset.py:171
#: assets/views/asset.py:
69
assets/views/asset.py:128 assets/views/asset.py:171
#: assets/views/asset.py:199 assets/views/asset.py:22
5
#: assets/views/asset.py:199 assets/views/asset.py:22
6
#: assets/views/cmd_filter.py:31 assets/views/cmd_filter.py:48
#: assets/views/cmd_filter.py:31 assets/views/cmd_filter.py:48
#: assets/views/cmd_filter.py:65 assets/views/cmd_filter.py:82
#: assets/views/cmd_filter.py:65 assets/views/cmd_filter.py:82
#: assets/views/cmd_filter.py:102 assets/views/cmd_filter.py:136
#: assets/views/cmd_filter.py:102 assets/views/cmd_filter.py:136
...
@@ -580,15 +581,15 @@ msgstr "连接"
...
@@ -580,15 +581,15 @@ msgstr "连接"
msgid "Assets"
msgid "Assets"
msgstr "资产管理"
msgstr "资产管理"
#: applications/views/remote_app.py:3
3
#: applications/views/remote_app.py:3
2
msgid "RemoteApp list"
msgid "RemoteApp list"
msgstr "远程应用列表"
msgstr "远程应用列表"
#: applications/views/remote_app.py:7
1
#: applications/views/remote_app.py:7
0
msgid "Update RemoteApp"
msgid "Update RemoteApp"
msgstr "更新远程应用"
msgstr "更新远程应用"
#: applications/views/remote_app.py:8
9
#: applications/views/remote_app.py:8
8
msgid "RemoteApp detail"
msgid "RemoteApp detail"
msgstr "远程应用详情"
msgstr "远程应用详情"
...
@@ -624,7 +625,7 @@ msgstr "测试节点下资产是否可连接: {}"
...
@@ -624,7 +625,7 @@ msgstr "测试节点下资产是否可连接: {}"
#: perms/models/asset_permission.py:38
#: perms/models/asset_permission.py:38
#: xpack/plugins/change_auth_plan/models.py:72
#: xpack/plugins/change_auth_plan/models.py:72
msgid "Nodes"
msgid "Nodes"
msgstr "节点
管理
"
msgstr "节点"
#: assets/forms/asset.py:48 assets/forms/asset.py:83 assets/models/asset.py:107
#: assets/forms/asset.py:48 assets/forms/asset.py:83 assets/models/asset.py:107
#: assets/models/cluster.py:19 assets/models/user.py:92
#: assets/models/cluster.py:19 assets/models/user.py:92
...
@@ -738,7 +739,7 @@ msgid "Password or private key passphrase"
...
@@ -738,7 +739,7 @@ msgid "Password or private key passphrase"
msgstr "密码或密钥密码"
msgstr "密码或密钥密码"
#: assets/forms/user.py:26 assets/models/base.py:29
#: assets/forms/user.py:26 assets/models/base.py:29
#: assets/serializers/admin_user.py:2
0
assets/serializers/asset_user.py:33
#: assets/serializers/admin_user.py:2
1
assets/serializers/asset_user.py:33
#: assets/serializers/asset_user.py:86 assets/serializers/system_user.py:16
#: assets/serializers/asset_user.py:86 assets/serializers/system_user.py:16
#: assets/templates/assets/_asset_user_auth_update_modal.html:21
#: assets/templates/assets/_asset_user_auth_update_modal.html:21
#: assets/templates/assets/_asset_user_auth_view_modal.html:27
#: assets/templates/assets/_asset_user_auth_view_modal.html:27
...
@@ -941,14 +942,14 @@ msgid "Labels"
...
@@ -941,14 +942,14 @@ msgid "Labels"
msgstr "标签管理"
msgstr "标签管理"
#: assets/models/asset.py:140 assets/models/base.py:39
#: assets/models/asset.py:140 assets/models/base.py:39
#: assets/serializers/admin_user.py:2
2
assets/serializers/system_user.py:19
#: assets/serializers/admin_user.py:2
3
assets/serializers/system_user.py:19
#: assets/templates/assets/admin_user_list.html:51
#: assets/templates/assets/admin_user_list.html:51
#: assets/templates/assets/system_user_list.html:57
#: assets/templates/assets/system_user_list.html:57
msgid "Unreachable"
msgid "Unreachable"
msgstr "不可达"
msgstr "不可达"
#: assets/models/asset.py:141 assets/models/base.py:40
#: assets/models/asset.py:141 assets/models/base.py:40
#: assets/serializers/admin_user.py:2
4
assets/serializers/system_user.py:27
#: assets/serializers/admin_user.py:2
5
assets/serializers/system_user.py:27
#: assets/templates/assets/admin_user_list.html:50
#: assets/templates/assets/admin_user_list.html:50
#: assets/templates/assets/asset_list.html:107
#: assets/templates/assets/asset_list.html:107
#: assets/templates/assets/system_user_list.html:56
#: assets/templates/assets/system_user_list.html:56
...
@@ -987,6 +988,12 @@ msgstr "ssh密钥"
...
@@ -987,6 +988,12 @@ msgstr "ssh密钥"
msgid "SSH public key"
msgid "SSH public key"
msgstr "ssh公钥"
msgstr "ssh公钥"
#: assets/models/base.py:34 assets/serializers/admin_user.py:39
#: 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 "更新日期"
#: assets/models/cluster.py:20
#: assets/models/cluster.py:20
msgid "Bandwidth"
msgid "Bandwidth"
msgstr "带宽"
msgstr "带宽"
...
@@ -1141,9 +1148,9 @@ msgstr "默认资产组"
...
@@ -1141,9 +1148,9 @@ msgstr "默认资产组"
#: terminal/templates/terminal/command_list.html:72
#: terminal/templates/terminal/command_list.html:72
#: terminal/templates/terminal/session_list.html:33
#: terminal/templates/terminal/session_list.html:33
#: terminal/templates/terminal/session_list.html:71 users/forms.py:301
#: terminal/templates/terminal/session_list.html:71 users/forms.py:301
#: users/models/user.py:37 users/models/user.py:473 users/serializers/v1.py:6
1
#: users/models/user.py:37 users/models/user.py:473 users/serializers/v1.py:6
2
#: users/templates/users/user_group_detail.html:78
#: users/templates/users/user_group_detail.html:78
#: users/templates/users/user_group_list.html:36 users/views/user.py:40
6
#: users/templates/users/user_group_list.html:36 users/views/user.py:40
7
#: xpack/plugins/orgs/forms.py:26
#: xpack/plugins/orgs/forms.py:26
#: xpack/plugins/orgs/templates/orgs/org_detail.html:113
#: xpack/plugins/orgs/templates/orgs/org_detail.html:113
#: xpack/plugins/orgs/templates/orgs/org_list.html:14
#: xpack/plugins/orgs/templates/orgs/org_list.html:14
...
@@ -1199,11 +1206,9 @@ msgstr "登录模式"
...
@@ -1199,11 +1206,9 @@ msgstr "登录模式"
msgid "%(value)s is not an even number"
msgid "%(value)s is not an even number"
msgstr "%(value)s is not an even number"
msgstr "%(value)s is not an even number"
#: assets/serializers/admin_user.py:38
#: assets/serializers/asset.py:26 assets/templates/assets/asset_create.html:24
#: assets/templates/assets/cmd_filter_detail.html:73
msgid "Protocols"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:109
msgstr "协议组"
msgid "Date updated"
msgstr "更新日期"
#: assets/serializers/asset.py:52
#: assets/serializers/asset.py:52
msgid "Hardware info"
msgid "Hardware info"
...
@@ -1214,9 +1219,9 @@ msgstr "硬件信息"
...
@@ -1214,9 +1219,9 @@ msgstr "硬件信息"
msgid "Connectivity"
msgid "Connectivity"
msgstr "连接"
msgstr "连接"
#: assets/serializers/asset.py:54
#: assets/serializers/asset.py:54
orgs/mixins.py:223
msgid "Org name"
msgid "Org name"
msgstr "组织名"
msgstr "组织名
称
"
#: assets/serializers/asset.py:70
#: assets/serializers/asset.py:70
msgid "Protocol duplicate: {}"
msgid "Protocol duplicate: {}"
...
@@ -1234,7 +1239,7 @@ msgstr "ssh公钥"
...
@@ -1234,7 +1239,7 @@ msgstr "ssh公钥"
#: assets/serializers/asset_user.py:43
#: assets/serializers/asset_user.py:43
msgid "Backend"
msgid "Backend"
msgstr ""
msgstr "
后端
"
#: assets/serializers/asset_user.py:65
#: assets/serializers/asset_user.py:65
msgid "private key invalid"
msgid "private key invalid"
...
@@ -1376,8 +1381,8 @@ msgstr "启用MFA"
...
@@ -1376,8 +1381,8 @@ msgstr "启用MFA"
msgid "Import assets"
msgid "Import assets"
msgstr "导入资产"
msgstr "导入资产"
#: assets/templates/assets/_asset_list_modal.html:7 assets/views/asset.py:5
4
#: assets/templates/assets/_asset_list_modal.html:7 assets/views/asset.py:5
3
#: templates/_nav.html:22 xpack/plugins/change_auth_plan/views.py:11
0
#: templates/_nav.html:22 xpack/plugins/change_auth_plan/views.py:11
6
msgid "Asset list"
msgid "Asset list"
msgstr "资产列表"
msgstr "资产列表"
...
@@ -1398,7 +1403,7 @@ msgstr "请输入密码"
...
@@ -1398,7 +1403,7 @@ msgstr "请输入密码"
#: assets/templates/assets/asset_detail.html:312
#: assets/templates/assets/asset_detail.html:312
#: users/templates/users/user_detail.html:307
#: users/templates/users/user_detail.html:307
#: users/templates/users/user_detail.html:334
#: users/templates/users/user_detail.html:334
#: xpack/plugins/interface/views.py:3
4
#: xpack/plugins/interface/views.py:3
5
msgid "Update successfully!"
msgid "Update successfully!"
msgstr "更新成功"
msgstr "更新成功"
...
@@ -1406,18 +1411,17 @@ msgstr "更新成功"
...
@@ -1406,18 +1411,17 @@ msgstr "更新成功"
msgid "Asset user auth"
msgid "Asset user auth"
msgstr "资产用户信息"
msgstr "资产用户信息"
#: assets/templates/assets/_asset_user_auth_view_modal.html:5
5
#: assets/templates/assets/_asset_user_auth_view_modal.html:5
4
msgid "Copy success"
msgid "Copy success"
msgstr "复制成功"
msgstr "复制成功"
#: assets/templates/assets/_asset_user_auth_view_modal.html:71
#: assets/templates/assets/_asset_user_auth_view_modal.html:70
#: authentication/templates/authentication/_mfa_confirm_modal.html:39
msgid "Get auth info error"
msgid "Get auth info error"
msgstr "获取认证信息错误"
msgstr "获取认证信息错误"
#: assets/templates/assets/_asset_user_auth_view_modal.html:
11
7
#: assets/templates/assets/_asset_user_auth_view_modal.html:
9
7
#: assets/templates/assets/_user_asset_detail_modal.html:23
#: assets/templates/assets/_user_asset_detail_modal.html:23
#: authentication/templates/authentication/_mfa_confirm_modal.html:
79
#: authentication/templates/authentication/_mfa_confirm_modal.html:
53
#: settings/templates/settings/_ldap_list_users_modal.html:99
#: settings/templates/settings/_ldap_list_users_modal.html:99
#: templates/_modal.html:22
#: templates/_modal.html:22
msgid "Close"
msgid "Close"
...
@@ -1432,13 +1436,13 @@ msgstr "关闭"
...
@@ -1432,13 +1436,13 @@ msgstr "关闭"
msgid "Datetime"
msgid "Datetime"
msgstr "日期"
msgstr "日期"
#: assets/templates/assets/_asset_user_list.html:
59
#: assets/templates/assets/_asset_user_list.html:
61
#, fuzzy
#, fuzzy
#| msgid "View auth"
#| msgid "View auth"
msgid "View"
msgid "View"
msgstr "查看认证"
msgstr "查看认证"
#: assets/templates/assets/_asset_user_list.html:6
1
#: assets/templates/assets/_asset_user_list.html:6
3
#: assets/templates/assets/admin_user_assets.html:61
#: assets/templates/assets/admin_user_assets.html:61
#: assets/templates/assets/asset_asset_user_list.html:57
#: assets/templates/assets/asset_asset_user_list.html:57
#: assets/templates/assets/asset_detail.html:183
#: assets/templates/assets/asset_detail.html:183
...
@@ -1447,7 +1451,7 @@ msgstr "查看认证"
...
@@ -1447,7 +1451,7 @@ msgstr "查看认证"
msgid "Test"
msgid "Test"
msgstr "测试"
msgstr "测试"
#: assets/templates/assets/_asset_user_list.html:6
2
#: assets/templates/assets/_asset_user_list.html:6
4
#: assets/templates/assets/system_user_asset.html:72
#: assets/templates/assets/system_user_asset.html:72
#: assets/templates/assets/system_user_detail.html:142
#: assets/templates/assets/system_user_detail.html:142
msgid "Push"
msgid "Push"
...
@@ -1506,7 +1510,7 @@ msgstr "更新系统用户"
...
@@ -1506,7 +1510,7 @@ msgstr "更新系统用户"
#: assets/templates/assets/_user_asset_detail_modal.html:11
#: assets/templates/assets/_user_asset_detail_modal.html:11
#: assets/templates/assets/asset_asset_user_list.html:13
#: assets/templates/assets/asset_asset_user_list.html:13
#: assets/templates/assets/asset_detail.html:20 assets/views/asset.py:22
6
#: assets/templates/assets/asset_detail.html:20 assets/views/asset.py:22
7
msgid "Asset detail"
msgid "Asset detail"
msgstr "资产详情"
msgstr "资产详情"
...
@@ -1636,7 +1640,7 @@ msgid "Please select file"
...
@@ -1636,7 +1640,7 @@ msgid "Please select file"
msgstr "选择文件"
msgstr "选择文件"
#: assets/templates/assets/asset_asset_user_list.html:16
#: assets/templates/assets/asset_asset_user_list.html:16
#: assets/templates/assets/asset_detail.html:23 assets/views/asset.py:7
1
#: assets/templates/assets/asset_detail.html:23 assets/views/asset.py:7
0
msgid "Asset user list"
msgid "Asset user list"
msgstr "资产用户列表"
msgstr "资产用户列表"
...
@@ -1664,10 +1668,6 @@ msgstr "选择需要修改属性"
...
@@ -1664,10 +1668,6 @@ msgstr "选择需要修改属性"
msgid "Select all"
msgid "Select all"
msgstr "全选"
msgstr "全选"
#: assets/templates/assets/asset_create.html:24
msgid "Protocols"
msgstr "协议"
#: assets/templates/assets/asset_detail.html:97
#: assets/templates/assets/asset_detail.html:97
msgid "CPU"
msgid "CPU"
msgstr "CPU"
msgstr "CPU"
...
@@ -2066,7 +2066,7 @@ msgstr "批量更新资产"
...
@@ -2066,7 +2066,7 @@ msgstr "批量更新资产"
msgid "Update asset"
msgid "Update asset"
msgstr "更新资产"
msgstr "更新资产"
#: assets/views/asset.py:34
4
#: assets/views/asset.py:34
7
msgid "already exists"
msgid "already exists"
msgstr "已经存在"
msgstr "已经存在"
...
@@ -2318,29 +2318,29 @@ msgstr "城市"
...
@@ -2318,29 +2318,29 @@ msgstr "城市"
msgid "Date"
msgid "Date"
msgstr "日期"
msgstr "日期"
#: audits/views.py:8
6 audits/views.py:130 audits/views.py:167
#: audits/views.py:8
5 audits/views.py:129 audits/views.py:166
#: audits/views.py:21
2 audits/views.py:244
templates/_nav.html:87
#: audits/views.py:21
1 audits/views.py:243
templates/_nav.html:87
#: templates/_nav_audits.html:22
#: templates/_nav_audits.html:22
msgid "Audits"
msgid "Audits"
msgstr "日志审计"
msgstr "日志审计"
#: audits/views.py:8
7
templates/_nav.html:91 templates/_nav_audits.html:26
#: audits/views.py:8
6
templates/_nav.html:91 templates/_nav_audits.html:26
msgid "FTP log"
msgid "FTP log"
msgstr "FTP日志"
msgstr "FTP日志"
#: audits/views.py:13
1
templates/_nav.html:92 templates/_nav_audits.html:27
#: audits/views.py:13
0
templates/_nav.html:92 templates/_nav_audits.html:27
msgid "Operate log"
msgid "Operate log"
msgstr "操作日志"
msgstr "操作日志"
#: audits/views.py:16
8
templates/_nav.html:93 templates/_nav_audits.html:28
#: audits/views.py:16
7
templates/_nav.html:93 templates/_nav_audits.html:28
msgid "Password change log"
msgid "Password change log"
msgstr "改密日志"
msgstr "改密日志"
#: audits/views.py:21
3
templates/_nav.html:90 templates/_nav_audits.html:25
#: audits/views.py:21
2
templates/_nav.html:90 templates/_nav_audits.html:25
msgid "Login log"
msgid "Login log"
msgstr "登录日志"
msgstr "登录日志"
#: audits/views.py:24
5
#: audits/views.py:24
4
msgid "Command execution log"
msgid "Command execution log"
msgstr "命令执行"
msgstr "命令执行"
...
@@ -2443,7 +2443,7 @@ msgstr "MFA确认"
...
@@ -2443,7 +2443,7 @@ msgstr "MFA确认"
msgid "Need otp auth for view auth"
msgid "Need otp auth for view auth"
msgstr "需要二次认证来查看账号信息"
msgstr "需要二次认证来查看账号信息"
#: authentication/templates/authentication/_mfa_confirm_modal.html:
51
#: authentication/templates/authentication/_mfa_confirm_modal.html:
25
msgid "Code error"
msgid "Code error"
msgstr "代码错误"
msgstr "代码错误"
...
@@ -2567,8 +2567,8 @@ msgstr "欢迎回来,请输入用户名和密码登录"
...
@@ -2567,8 +2567,8 @@ msgstr "欢迎回来,请输入用户名和密码登录"
msgid "Please enable cookies and try again."
msgid "Please enable cookies and try again."
msgstr "设置你的浏览器支持cookie"
msgstr "设置你的浏览器支持cookie"
#: authentication/views/login.py:172 users/views/user.py:55
2
#: authentication/views/login.py:172 users/views/user.py:55
5
#: users/views/user.py:5
77
#: users/views/user.py:5
80
msgid "MFA code invalid, or ntp sync server time"
msgid "MFA code invalid, or ntp sync server time"
msgstr "MFA验证码不正确,或者服务器端时间不对"
msgstr "MFA验证码不正确,或者服务器端时间不对"
...
@@ -2655,7 +2655,7 @@ msgstr "不能包含特殊字符"
...
@@ -2655,7 +2655,7 @@ msgstr "不能包含特殊字符"
msgid "This field must be unique."
msgid "This field must be unique."
msgstr "字段必须唯一"
msgstr "字段必须唯一"
#: jumpserver/views.py:18
7
#: jumpserver/views.py:18
8
msgid ""
msgid ""
"<div>Luna is a separately deployed program, you need to deploy Luna, coco, "
"<div>Luna is a separately deployed program, you need to deploy Luna, coco, "
"configure nginx for url distribution,</div> </div>If you see this page, "
"configure nginx for url distribution,</div> </div>If you see this page, "
...
@@ -2986,7 +2986,7 @@ msgstr "更新任务内容: {}"
...
@@ -2986,7 +2986,7 @@ msgstr "更新任务内容: {}"
#: ops/views/adhoc.py:45 ops/views/adhoc.py:71 ops/views/adhoc.py:85
#: ops/views/adhoc.py:45 ops/views/adhoc.py:71 ops/views/adhoc.py:85
#: ops/views/adhoc.py:99 ops/views/adhoc.py:113 ops/views/adhoc.py:127
#: ops/views/adhoc.py:99 ops/views/adhoc.py:113 ops/views/adhoc.py:127
#: ops/views/adhoc.py:141 ops/views/command.py:47 ops/views/command.py:7
1
#: ops/views/adhoc.py:141 ops/views/command.py:47 ops/views/command.py:7
2
msgid "Ops"
msgid "Ops"
msgstr "作业中心"
msgstr "作业中心"
...
@@ -3002,13 +3002,13 @@ msgstr "执行历史"
...
@@ -3002,13 +3002,13 @@ msgstr "执行历史"
msgid "Command execution list"
msgid "Command execution list"
msgstr "命令执行列表"
msgstr "命令执行列表"
#: ops/views/command.py:7
2
templates/_nav_user.html:22
#: ops/views/command.py:7
3
templates/_nav_user.html:22
msgid "Command execution"
msgid "Command execution"
msgstr "命令执行"
msgstr "命令执行"
#: orgs/mixins.py:8
3
orgs/models.py:24
#: orgs/mixins.py:8
5 orgs/mixins.py:222
orgs/models.py:24
msgid "Organization"
msgid "Organization"
msgstr "组织
管理
"
msgstr "组织"
#: perms/const.py:18 settings/forms.py:143
#: perms/const.py:18 settings/forms.py:143
msgid "All"
msgid "All"
...
@@ -3929,13 +3929,13 @@ msgstr ""
...
@@ -3929,13 +3929,13 @@ msgstr ""
#: templates/_nav.html:10 users/views/group.py:28 users/views/group.py:45
#: templates/_nav.html:10 users/views/group.py:28 users/views/group.py:45
#: users/views/group.py:62 users/views/group.py:79 users/views/group.py:96
#: users/views/group.py:62 users/views/group.py:79 users/views/group.py:96
#: users/views/login.py:154 users/views/user.py:7
1 users/views/user.py:88
#: users/views/login.py:154 users/views/user.py:7
0 users/views/user.py:87
#: users/views/user.py:13
2 users/views/user.py:212 users/views/user.py:375
#: users/views/user.py:13
1 users/views/user.py:211 users/views/user.py:374
#: users/views/user.py:42
5 users/views/user.py:465
#: users/views/user.py:42
6 users/views/user.py:467
msgid "Users"
msgid "Users"
msgstr "用户管理"
msgstr "用户管理"
#: templates/_nav.html:13 users/views/user.py:7
2
#: templates/_nav.html:13 users/views/user.py:7
1
msgid "User list"
msgid "User list"
msgstr "用户列表"
msgstr "用户列表"
...
@@ -3973,8 +3973,8 @@ msgstr "文件管理"
...
@@ -3973,8 +3973,8 @@ msgstr "文件管理"
#: templates/_nav.html:72 terminal/views/command.py:51
#: templates/_nav.html:72 terminal/views/command.py:51
#: terminal/views/session.py:74 terminal/views/session.py:92
#: terminal/views/session.py:74 terminal/views/session.py:92
#: terminal/views/session.py:116 terminal/views/terminal.py:3
2
#: terminal/views/session.py:116 terminal/views/terminal.py:3
1
#: terminal/views/terminal.py:4
8 terminal/views/terminal.py:61
#: terminal/views/terminal.py:4
7 terminal/views/terminal.py:60
msgid "Terminal"
msgid "Terminal"
msgstr "终端管理"
msgstr "终端管理"
...
@@ -3990,7 +3990,7 @@ msgstr "批量命令"
...
@@ -3990,7 +3990,7 @@ msgstr "批量命令"
msgid "XPack"
msgid "XPack"
msgstr ""
msgstr ""
#: templates/_nav.html:108 xpack/plugins/cloud/views.py:2
6
#: templates/_nav.html:108 xpack/plugins/cloud/views.py:2
8
msgid "Account list"
msgid "Account list"
msgstr "账户列表"
msgstr "账户列表"
...
@@ -4316,7 +4316,7 @@ msgid "Finish session success"
...
@@ -4316,7 +4316,7 @@ msgid "Finish session success"
msgstr "标记会话完成成功"
msgstr "标记会话完成成功"
#: terminal/templates/terminal/terminal_detail.html:13
#: terminal/templates/terminal/terminal_detail.html:13
#: terminal/views/terminal.py:6
2
#: terminal/views/terminal.py:6
1
msgid "Terminal detail"
msgid "Terminal detail"
msgstr "终端详情"
msgstr "终端详情"
...
@@ -4360,23 +4360,23 @@ msgstr "在线会话"
...
@@ -4360,23 +4360,23 @@ msgstr "在线会话"
msgid "Session offline list"
msgid "Session offline list"
msgstr "离线会话"
msgstr "离线会话"
#: terminal/views/terminal.py:3
3
#: terminal/views/terminal.py:3
2
msgid "Terminal list"
msgid "Terminal list"
msgstr "终端列表"
msgstr "终端列表"
#: terminal/views/terminal.py:4
8
#: terminal/views/terminal.py:4
7
msgid "Update terminal"
msgid "Update terminal"
msgstr "更新终端"
msgstr "更新终端"
#: terminal/views/terminal.py:11
1 terminal/views/terminal.py:112
#: terminal/views/terminal.py:11
0 terminal/views/terminal.py:111
msgid "Redirect to web terminal"
msgid "Redirect to web terminal"
msgstr "重定向到web terminal"
msgstr "重定向到web terminal"
#: terminal/views/terminal.py:11
9
#: terminal/views/terminal.py:11
8
msgid "Connect ssh terminal"
msgid "Connect ssh terminal"
msgstr "连接ssh终端"
msgstr "连接ssh终端"
#: terminal/views/terminal.py:1
20
#: terminal/views/terminal.py:1
19
msgid ""
msgid ""
"You should use your ssh client tools connect terminal: {} <br /> <br />{}"
"You should use your ssh client tools connect terminal: {} <br /> <br />{}"
msgstr "你可以使用ssh客户端工具连接终端"
msgstr "你可以使用ssh客户端工具连接终端"
...
@@ -4417,7 +4417,7 @@ msgstr "添加到用户组"
...
@@ -4417,7 +4417,7 @@ msgstr "添加到用户组"
msgid "Public key should not be the same as your old one."
msgid "Public key should not be the same as your old one."
msgstr "不能和原来的密钥相同"
msgstr "不能和原来的密钥相同"
#: users/forms.py:90 users/forms.py:237 users/serializers/v1.py:4
7
#: users/forms.py:90 users/forms.py:237 users/serializers/v1.py:4
8
msgid "Not a valid ssh public key"
msgid "Not a valid ssh public key"
msgstr "ssh密钥不合法"
msgstr "ssh密钥不合法"
...
@@ -4544,7 +4544,7 @@ msgid "Date password last updated"
...
@@ -4544,7 +4544,7 @@ msgid "Date password last updated"
msgstr "最后更新密码日期"
msgstr "最后更新密码日期"
#: users/models/user.py:138 users/templates/users/user_update.html:22
#: users/models/user.py:138 users/templates/users/user_update.html:22
#: users/views/login.py:4
7 users/views/login.py:108 users/views/user.py:438
#: users/views/login.py:4
6 users/views/login.py:107 users/views/user.py:439
msgid "User auth from {}, go there change password"
msgid "User auth from {}, go there change password"
msgstr "用户认证源来自 {}, 请去相应系统修改密码"
msgstr "用户认证源来自 {}, 请去相应系统修改密码"
...
@@ -4552,31 +4552,31 @@ msgstr "用户认证源来自 {}, 请去相应系统修改密码"
...
@@ -4552,31 +4552,31 @@ msgstr "用户认证源来自 {}, 请去相应系统修改密码"
msgid "Administrator is the super user of system"
msgid "Administrator is the super user of system"
msgstr "Administrator是初始的超级管理员"
msgstr "Administrator是初始的超级管理员"
#: users/serializers/v1.py:2
8
#: users/serializers/v1.py:2
9
msgid "Groups name"
msgid "Groups name"
msgstr "用户组名"
msgstr "用户组名"
#: users/serializers/v1.py:
29
#: users/serializers/v1.py:
30
msgid "Source name"
msgid "Source name"
msgstr "用户来源名"
msgstr "用户来源名"
#: users/serializers/v1.py:3
0
#: users/serializers/v1.py:3
1
msgid "Is first login"
msgid "Is first login"
msgstr "首次登录"
msgstr "首次登录"
#: users/serializers/v1.py:3
1
#: users/serializers/v1.py:3
2
msgid "Role name"
msgid "Role name"
msgstr "角色名"
msgstr "角色名"
#: users/serializers/v1.py:3
2
#: users/serializers/v1.py:3
3
msgid "Is valid"
msgid "Is valid"
msgstr "账户是否有效"
msgstr "账户是否有效"
#: users/serializers/v1.py:3
3
#: users/serializers/v1.py:3
4
msgid "Is expired"
msgid "Is expired"
msgstr " 是否过期"
msgstr " 是否过期"
#: users/serializers/v1.py:3
4
#: users/serializers/v1.py:3
5
msgid "Avatar url"
msgid "Avatar url"
msgstr "头像路径"
msgstr "头像路径"
...
@@ -4630,7 +4630,7 @@ msgid "Import users"
...
@@ -4630,7 +4630,7 @@ msgid "Import users"
msgstr "导入用户"
msgstr "导入用户"
#: users/templates/users/_user_update_modal.html:4
#: users/templates/users/_user_update_modal.html:4
#: users/templates/users/user_update.html:4 users/views/user.py:13
3
#: users/templates/users/user_update.html:4 users/views/user.py:13
2
msgid "Update user"
msgid "Update user"
msgstr "更新用户"
msgstr "更新用户"
...
@@ -4768,12 +4768,12 @@ msgid "Very strong"
...
@@ -4768,12 +4768,12 @@ msgid "Very strong"
msgstr "很强"
msgstr "很强"
#: users/templates/users/user_create.html:4
#: users/templates/users/user_create.html:4
#: users/templates/users/user_list.html:28 users/views/user.py:8
9
#: users/templates/users/user_list.html:28 users/views/user.py:8
8
msgid "Create user"
msgid "Create user"
msgstr "创建用户"
msgstr "创建用户"
#: users/templates/users/user_detail.html:19
#: users/templates/users/user_detail.html:19
#: users/templates/users/user_granted_asset.html:18 users/views/user.py:21
3
#: users/templates/users/user_granted_asset.html:18 users/views/user.py:21
2
msgid "User detail"
msgid "User detail"
msgstr "用户详情"
msgstr "用户详情"
...
@@ -4976,8 +4976,8 @@ msgstr "安装完成后点击下一步进入绑定页面(如已安装,直接
...
@@ -4976,8 +4976,8 @@ msgstr "安装完成后点击下一步进入绑定页面(如已安装,直接
msgid "Administrator Settings force MFA login"
msgid "Administrator Settings force MFA login"
msgstr "管理员设置强制使用MFA登录"
msgstr "管理员设置强制使用MFA登录"
#: users/templates/users/user_profile.html:120 users/views/user.py:24
9
#: users/templates/users/user_profile.html:120 users/views/user.py:24
8
#: users/views/user.py:30
4
#: users/views/user.py:30
3
msgid "User groups"
msgid "User groups"
msgstr "用户组"
msgstr "用户组"
...
@@ -5227,36 +5227,36 @@ msgstr "用户组列表"
...
@@ -5227,36 +5227,36 @@ msgstr "用户组列表"
msgid "User group granted asset"
msgid "User group granted asset"
msgstr "用户组授权资产"
msgstr "用户组授权资产"
#: users/views/login.py:4
4
#: users/views/login.py:4
3
msgid "Email address invalid, please input again"
msgid "Email address invalid, please input again"
msgstr "邮箱地址错误,重新输入"
msgstr "邮箱地址错误,重新输入"
#: users/views/login.py:
60
#: users/views/login.py:
59
msgid "Send reset password message"
msgid "Send reset password message"
msgstr "发送重置密码邮件"
msgstr "发送重置密码邮件"
#: users/views/login.py:6
1
#: users/views/login.py:6
0
msgid "Send reset password mail success, login your mail box and follow it "
msgid "Send reset password mail success, login your mail box and follow it "
msgstr ""
msgstr ""
"发送重置邮件成功, 请登录邮箱查看, 按照提示操作 (如果没收到,请等待3-5分钟)"
"发送重置邮件成功, 请登录邮箱查看, 按照提示操作 (如果没收到,请等待3-5分钟)"
#: users/views/login.py:7
4
#: users/views/login.py:7
3
msgid "Reset password success"
msgid "Reset password success"
msgstr "重置密码成功"
msgstr "重置密码成功"
#: users/views/login.py:7
5
#: users/views/login.py:7
4
msgid "Reset password success, return to login page"
msgid "Reset password success, return to login page"
msgstr "重置密码成功,返回到登录页面"
msgstr "重置密码成功,返回到登录页面"
#: users/views/login.py:
90 users/views/login.py:106
#: users/views/login.py:
89 users/views/login.py:105
msgid "Token invalid or expired"
msgid "Token invalid or expired"
msgstr "Token错误或失效"
msgstr "Token错误或失效"
#: users/views/login.py:10
2
#: users/views/login.py:10
1
msgid "Password not same"
msgid "Password not same"
msgstr "密码不一致"
msgstr "密码不一致"
#: users/views/login.py:11
5 users/views/user.py:147 users/views/user.py:448
#: users/views/login.py:11
4 users/views/user.py:146 users/views/user.py:449
msgid "* Your password does not meet the requirements"
msgid "* Your password does not meet the requirements"
msgstr "* 您的密码不符合要求"
msgstr "* 您的密码不符合要求"
...
@@ -5264,51 +5264,51 @@ msgstr "* 您的密码不符合要求"
...
@@ -5264,51 +5264,51 @@ msgstr "* 您的密码不符合要求"
msgid "First login"
msgid "First login"
msgstr "首次登录"
msgstr "首次登录"
#: users/views/user.py:16
4
#: users/views/user.py:16
3
msgid "Bulk update user success"
msgid "Bulk update user success"
msgstr "批量更新用户成功"
msgstr "批量更新用户成功"
#: users/views/user.py:19
2
#: users/views/user.py:19
1
msgid "Bulk update user"
msgid "Bulk update user"
msgstr "批量更新用户"
msgstr "批量更新用户"
#: users/views/user.py:27
9
#: users/views/user.py:27
8
msgid "Invalid file."
msgid "Invalid file."
msgstr "文件不合法"
msgstr "文件不合法"
#: users/views/user.py:37
6
#: users/views/user.py:37
5
msgid "User granted assets"
msgid "User granted assets"
msgstr "用户授权资产"
msgstr "用户授权资产"
#: users/views/user.py:40
7
#: users/views/user.py:40
8
msgid "Profile setting"
msgid "Profile setting"
msgstr "个人信息设置"
msgstr "个人信息设置"
#: users/views/user.py:42
6
#: users/views/user.py:42
7
msgid "Password update"
msgid "Password update"
msgstr "密码更新"
msgstr "密码更新"
#: users/views/user.py:46
6
#: users/views/user.py:46
8
msgid "Public key update"
msgid "Public key update"
msgstr "密钥更新"
msgstr "密钥更新"
#: users/views/user.py:5
07
#: users/views/user.py:5
10
msgid "Password invalid"
msgid "Password invalid"
msgstr "用户名或密码无效"
msgstr "用户名或密码无效"
#: users/views/user.py:6
07
#: users/views/user.py:6
10
msgid "MFA enable success"
msgid "MFA enable success"
msgstr "MFA 绑定成功"
msgstr "MFA 绑定成功"
#: users/views/user.py:6
08
#: users/views/user.py:6
11
msgid "MFA enable success, return login page"
msgid "MFA enable success, return login page"
msgstr "MFA 绑定成功,返回到登录页面"
msgstr "MFA 绑定成功,返回到登录页面"
#: users/views/user.py:61
0
#: users/views/user.py:61
3
msgid "MFA disable success"
msgid "MFA disable success"
msgstr "MFA 解绑成功"
msgstr "MFA 解绑成功"
#: users/views/user.py:61
1
#: users/views/user.py:61
4
msgid "MFA disable success, return login page"
msgid "MFA disable success, return login page"
msgstr "MFA 解绑成功,返回登录页面"
msgstr "MFA 解绑成功,返回登录页面"
...
@@ -5361,13 +5361,13 @@ msgstr ""
...
@@ -5361,13 +5361,13 @@ msgstr ""
#: xpack/plugins/change_auth_plan/meta.py:9
#: xpack/plugins/change_auth_plan/meta.py:9
#: xpack/plugins/change_auth_plan/models.py:114
#: xpack/plugins/change_auth_plan/models.py:114
#: xpack/plugins/change_auth_plan/models.py:257
#: xpack/plugins/change_auth_plan/models.py:257
#: xpack/plugins/change_auth_plan/views.py:3
1
#: xpack/plugins/change_auth_plan/views.py:3
3
#: xpack/plugins/change_auth_plan/views.py:
47
#: xpack/plugins/change_auth_plan/views.py:
50
#: xpack/plugins/change_auth_plan/views.py:
68
#: xpack/plugins/change_auth_plan/views.py:
72
#: xpack/plugins/change_auth_plan/views.py:8
2
#: xpack/plugins/change_auth_plan/views.py:8
7
#: xpack/plugins/change_auth_plan/views.py:1
09
#: xpack/plugins/change_auth_plan/views.py:1
15
#: xpack/plugins/change_auth_plan/views.py:1
25
#: xpack/plugins/change_auth_plan/views.py:1
32
#: xpack/plugins/change_auth_plan/views.py:1
39
#: xpack/plugins/change_auth_plan/views.py:1
47
msgid "Change auth plan"
msgid "Change auth plan"
msgstr "改密计划"
msgstr "改密计划"
...
@@ -5434,7 +5434,7 @@ msgstr "连接超时"
...
@@ -5434,7 +5434,7 @@ 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_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_detail.html:26
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:23
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:23
#: xpack/plugins/change_auth_plan/views.py:1
26
#: xpack/plugins/change_auth_plan/views.py:1
33
msgid "Plan execution list"
msgid "Plan execution list"
msgstr "执行列表"
msgstr "执行列表"
...
@@ -5490,19 +5490,19 @@ msgid "Run failed"
...
@@ -5490,19 +5490,19 @@ msgid "Run failed"
msgstr "执行失败"
msgstr "执行失败"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:5
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:5
#: xpack/plugins/change_auth_plan/views.py:
48
#: xpack/plugins/change_auth_plan/views.py:
51
msgid "Create plan"
msgid "Create plan"
msgstr "创建计划"
msgstr "创建计划"
#: xpack/plugins/change_auth_plan/views.py:3
2
#: xpack/plugins/change_auth_plan/views.py:3
4
msgid "Plan list"
msgid "Plan list"
msgstr "计划列表"
msgstr "计划列表"
#: xpack/plugins/change_auth_plan/views.py:
69
#: xpack/plugins/change_auth_plan/views.py:
73
msgid "Update plan"
msgid "Update plan"
msgstr "更新计划"
msgstr "更新计划"
#: xpack/plugins/change_auth_plan/views.py:14
0
#: xpack/plugins/change_auth_plan/views.py:14
8
msgid "Plan execution task list"
msgid "Plan execution task list"
msgstr "执行任务列表"
msgstr "执行任务列表"
...
@@ -5538,11 +5538,11 @@ msgstr "选择节点"
...
@@ -5538,11 +5538,11 @@ msgstr "选择节点"
msgid "Select admins"
msgid "Select admins"
msgstr "选择管理员"
msgstr "选择管理员"
#: xpack/plugins/cloud/meta.py:9 xpack/plugins/cloud/views.py:2
5
#: xpack/plugins/cloud/meta.py:9 xpack/plugins/cloud/views.py:2
7
#: xpack/plugins/cloud/views.py:4
1 xpack/plugins/cloud/views.py:57
#: xpack/plugins/cloud/views.py:4
4 xpack/plugins/cloud/views.py:61
#: xpack/plugins/cloud/views.py:7
1 xpack/plugins/cloud/views.py:84
#: xpack/plugins/cloud/views.py:7
6 xpack/plugins/cloud/views.py:90
#: xpack/plugins/cloud/views.py:10
0 xpack/plugins/cloud/views.py:121
#: xpack/plugins/cloud/views.py:10
7 xpack/plugins/cloud/views.py:129
#: xpack/plugins/cloud/views.py:1
36 xpack/plugins/cloud/views.py:18
7
#: xpack/plugins/cloud/views.py:1
45 xpack/plugins/cloud/views.py:19
7
msgid "Cloud center"
msgid "Cloud center"
msgstr "云管中心"
msgstr "云管中心"
...
@@ -5639,12 +5639,12 @@ msgid "Qcloud"
...
@@ -5639,12 +5639,12 @@ msgid "Qcloud"
msgstr "腾讯云"
msgstr "腾讯云"
#: xpack/plugins/cloud/templates/cloud/account_detail.html:20
#: xpack/plugins/cloud/templates/cloud/account_detail.html:20
#: xpack/plugins/cloud/views.py:7
2
#: xpack/plugins/cloud/views.py:7
7
msgid "Account detail"
msgid "Account detail"
msgstr "账户详情"
msgstr "账户详情"
#: xpack/plugins/cloud/templates/cloud/account_list.html:5
#: xpack/plugins/cloud/templates/cloud/account_list.html:5
#: xpack/plugins/cloud/views.py:4
2
#: xpack/plugins/cloud/views.py:4
5
msgid "Create account"
msgid "Create account"
msgstr "创建账户"
msgstr "创建账户"
...
@@ -5659,21 +5659,21 @@ msgstr "加载失败"
...
@@ -5659,21 +5659,21 @@ msgstr "加载失败"
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:20
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:20
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:25
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:25
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:21
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:21
#: xpack/plugins/cloud/views.py:1
22
#: xpack/plugins/cloud/views.py:1
30
msgid "Sync task detail"
msgid "Sync task detail"
msgstr "同步任务详情"
msgstr "同步任务详情"
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:23
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:23
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:28
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:28
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:24
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:24
#: xpack/plugins/cloud/views.py:1
37
#: xpack/plugins/cloud/views.py:1
46
msgid "Sync task history"
msgid "Sync task history"
msgstr "同步历史列表"
msgstr "同步历史列表"
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:26
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:26
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:31
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:31
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:27
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:27
#: xpack/plugins/cloud/views.py:1
8
8
#: xpack/plugins/cloud/views.py:1
9
8
msgid "Sync instance list"
msgid "Sync instance list"
msgstr "同步实例列表"
msgstr "同步实例列表"
...
@@ -5709,15 +5709,15 @@ msgstr "实例个数"
...
@@ -5709,15 +5709,15 @@ msgstr "实例个数"
msgid "Sync success"
msgid "Sync success"
msgstr "同步成功"
msgstr "同步成功"
#: xpack/plugins/cloud/views.py:
58
#: xpack/plugins/cloud/views.py:
62
msgid "Update account"
msgid "Update account"
msgstr "更新账户"
msgstr "更新账户"
#: xpack/plugins/cloud/views.py:
85
#: xpack/plugins/cloud/views.py:
91
msgid "Sync instance task list"
msgid "Sync instance task list"
msgstr "同步实例任务列表"
msgstr "同步实例任务列表"
#: xpack/plugins/cloud/views.py:10
1
#: xpack/plugins/cloud/views.py:10
8
msgid "Create sync Instance task"
msgid "Create sync Instance task"
msgstr "创建同步实例任务"
msgstr "创建同步实例任务"
...
@@ -5774,7 +5774,7 @@ msgid "Interface settings"
...
@@ -5774,7 +5774,7 @@ msgid "Interface settings"
msgstr "界面设置"
msgstr "界面设置"
#: xpack/plugins/interface/templates/interface/interface.html:15
#: xpack/plugins/interface/templates/interface/interface.html:15
#: xpack/plugins/interface/views.py:2
4
#: xpack/plugins/interface/views.py:2
5
msgid "Interface setting"
msgid "Interface setting"
msgstr "界面设置"
msgstr "界面设置"
...
@@ -5789,7 +5789,7 @@ msgid "This will restore default Settings of the interface !!!"
...
@@ -5789,7 +5789,7 @@ msgid "This will restore default Settings of the interface !!!"
msgstr "您确定要恢复默认初始化吗?"
msgstr "您确定要恢复默认初始化吗?"
#: xpack/plugins/interface/templates/interface/interface.html:107
#: xpack/plugins/interface/templates/interface/interface.html:107
#: xpack/plugins/interface/views.py:5
3
#: xpack/plugins/interface/views.py:5
5
msgid "Restore default successfully."
msgid "Restore default successfully."
msgstr "恢复默认成功!"
msgstr "恢复默认成功!"
...
@@ -5797,18 +5797,18 @@ msgstr "恢复默认成功!"
...
@@ -5797,18 +5797,18 @@ msgstr "恢复默认成功!"
msgid "Restore default failed."
msgid "Restore default failed."
msgstr "恢复默认失败!"
msgstr "恢复默认失败!"
#: xpack/plugins/interface/views.py:2
3
#: xpack/plugins/interface/views.py:2
4
msgid "Interface"
msgid "Interface"
msgstr "界面"
msgstr "界面"
#: xpack/plugins/interface/views.py:
49
#: xpack/plugins/interface/views.py:
51
msgid "It is already in the default setting state!"
msgid "It is already in the default setting state!"
msgstr "当前已经是初始化状态!"
msgstr "当前已经是初始化状态!"
#: xpack/plugins/license/meta.py:11 xpack/plugins/license/models.py:94
#: xpack/plugins/license/meta.py:11 xpack/plugins/license/models.py:94
#: xpack/plugins/license/templates/license/license_detail.html:50
#: xpack/plugins/license/templates/license/license_detail.html:50
#: xpack/plugins/license/templates/license/license_detail.html:55
#: xpack/plugins/license/templates/license/license_detail.html:55
#: xpack/plugins/license/views.py:3
1
#: xpack/plugins/license/views.py:3
2
msgid "License"
msgid "License"
msgstr "许可证"
msgstr "许可证"
...
@@ -5847,7 +5847,7 @@ msgid " expired."
...
@@ -5847,7 +5847,7 @@ msgid " expired."
msgstr " 过期。"
msgstr " 过期。"
#: xpack/plugins/license/templates/license/license_detail.html:37
#: xpack/plugins/license/templates/license/license_detail.html:37
#: xpack/plugins/license/views.py:3
2
#: xpack/plugins/license/views.py:3
3
msgid "License detail"
msgid "License detail"
msgstr "许可证详情"
msgstr "许可证详情"
...
@@ -5890,11 +5890,11 @@ msgstr "技术咨询"
...
@@ -5890,11 +5890,11 @@ msgstr "技术咨询"
msgid "Consult"
msgid "Consult"
msgstr "咨询"
msgstr "咨询"
#: xpack/plugins/license/views.py:4
5
#: xpack/plugins/license/views.py:4
7
msgid "License import successfully"
msgid "License import successfully"
msgstr "许可证导入成功"
msgstr "许可证导入成功"
#: xpack/plugins/license/views.py:4
7
#: xpack/plugins/license/views.py:4
9
msgid "License is invalid"
msgid "License is invalid"
msgstr "无效的许可证"
msgstr "无效的许可证"
...
@@ -5909,7 +5909,7 @@ msgid "Organizations"
...
@@ -5909,7 +5909,7 @@ msgid "Organizations"
msgstr "组织管理"
msgstr "组织管理"
#: xpack/plugins/orgs/templates/orgs/org_detail.html:22
#: xpack/plugins/orgs/templates/orgs/org_detail.html:22
#: xpack/plugins/orgs/views.py:7
3
#: xpack/plugins/orgs/views.py:7
8
msgid "Org detail"
msgid "Org detail"
msgstr "组织详情"
msgstr "组织详情"
...
@@ -5921,29 +5921,29 @@ msgstr "添加管理员"
...
@@ -5921,29 +5921,29 @@ msgstr "添加管理员"
msgid "Create organization "
msgid "Create organization "
msgstr "创建组织"
msgstr "创建组织"
#: xpack/plugins/orgs/views.py:2
4
#: xpack/plugins/orgs/views.py:2
6
msgid "Org"
msgid "Org"
msgstr "组织"
msgstr "组织"
#: xpack/plugins/orgs/views.py:2
5
#: xpack/plugins/orgs/views.py:2
7
msgid "Org list"
msgid "Org list"
msgstr "组织列表"
msgstr "组织列表"
#: xpack/plugins/orgs/views.py:4
0 xpack/plugins/orgs/views.py:56
#: xpack/plugins/orgs/views.py:4
3 xpack/plugins/orgs/views.py:60
#: xpack/plugins/orgs/views.py:7
2
#: xpack/plugins/orgs/views.py:7
7
msgid "Orgs"
msgid "Orgs"
msgstr "组织"
msgstr "组织"
#: xpack/plugins/orgs/views.py:4
1
#: xpack/plugins/orgs/views.py:4
4
msgid "Create org"
msgid "Create org"
msgstr "创建组织"
msgstr "创建组织"
#: xpack/plugins/orgs/views.py:
57
#: xpack/plugins/orgs/views.py:
61
msgid "Update org"
msgid "Update org"
msgstr "更新组织"
msgstr "更新组织"
#: xpack/plugins/vault/meta.py:11 xpack/plugins/vault/views.py:2
1
#: xpack/plugins/vault/meta.py:11 xpack/plugins/vault/views.py:2
3
#: xpack/plugins/vault/views.py:3
5
#: xpack/plugins/vault/views.py:3
8
msgid "Vault"
msgid "Vault"
msgstr "密码匣子"
msgstr "密码匣子"
...
@@ -5951,11 +5951,11 @@ msgstr "密码匣子"
...
@@ -5951,11 +5951,11 @@ msgstr "密码匣子"
msgid "Import vault"
msgid "Import vault"
msgstr "导入密码"
msgstr "导入密码"
#: xpack/plugins/vault/views.py:2
2
#: xpack/plugins/vault/views.py:2
4
msgid "vault list"
msgid "vault list"
msgstr "密码匣子"
msgstr "密码匣子"
#: xpack/plugins/vault/views.py:3
6
#: xpack/plugins/vault/views.py:3
9
msgid "vault create"
msgid "vault create"
msgstr "创建"
msgstr "创建"
...
...
apps/ops/tasks.py
View file @
2cd092af
# coding: utf-8
# coding: utf-8
import
os
import
os
import
subprocess
import
subprocess
import
datetime
from
django.conf
import
settings
from
django.conf
import
settings
from
celery
import
shared_task
,
subtask
from
celery
import
shared_task
,
subtask
...
@@ -105,10 +106,10 @@ def hello(name, callback=None):
...
@@ -105,10 +106,10 @@ def hello(name, callback=None):
@shared_task
@shared_task
@after_app_shutdown_clean_periodic
#
@after_app_shutdown_clean_periodic
@register_as_period_task
(
interval
=
30
)
#
@register_as_period_task(interval=30)
def
hello123
():
def
hello123
():
print
(
"
Hello world"
)
print
(
"
{} Hello world"
.
format
(
datetime
.
datetime
.
now
()
.
strftime
(
"
%
H:
%
M:
%
S"
))
)
@shared_task
@shared_task
...
...
apps/orgs/mixins.py
View file @
2cd092af
...
@@ -219,7 +219,8 @@ class OrgResourceSerializerMixin(serializers.Serializer):
...
@@ -219,7 +219,8 @@ class OrgResourceSerializerMixin(serializers.Serializer):
由于HiddenField字段不可读,API获取资产信息时获取不到org_id,
由于HiddenField字段不可读,API获取资产信息时获取不到org_id,
但是coco需要资产的org_id字段,所以修改为CharField类型
但是coco需要资产的org_id字段,所以修改为CharField类型
"""
"""
org_id
=
serializers
.
ReadOnlyField
(
default
=
get_current_org_id
)
org_id
=
serializers
.
ReadOnlyField
(
default
=
get_current_org_id
,
label
=
_
(
"Organization"
))
org_name
=
serializers
.
ReadOnlyField
(
label
=
_
(
"Org name"
))
def
get_validators
(
self
):
def
get_validators
(
self
):
_validators
=
super
()
.
get_validators
()
_validators
=
super
()
.
get_validators
()
...
...
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