Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gjl2004yn
jumpserver
提交
ece9b163
J
jumpserver
项目概览
gjl2004yn
/
jumpserver
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jumpserver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ece9b163
编写于
1月 16, 2020
作者:
B
BaiJiangJie
提交者:
GitHub
1月 16, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3651 from jumpserver/dev
Dev
上级
17956bf0
23b896b3
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
35 addition
and
24 deletion
+35
-24
apps/common/tree.py
apps/common/tree.py
+1
-0
apps/jumpserver/context_processor.py
apps/jumpserver/context_processor.py
+1
-1
apps/locale/zh/LC_MESSAGES/django.mo
apps/locale/zh/LC_MESSAGES/django.mo
+0
-0
apps/locale/zh/LC_MESSAGES/django.po
apps/locale/zh/LC_MESSAGES/django.po
+12
-8
apps/ops/templates/ops/command_execution_create.html
apps/ops/templates/ops/command_execution_create.html
+16
-12
apps/perms/utils/asset_permission.py
apps/perms/utils/asset_permission.py
+1
-0
apps/perms/utils/database_app_permission.py
apps/perms/utils/database_app_permission.py
+2
-2
apps/perms/utils/remote_app_permission.py
apps/perms/utils/remote_app_permission.py
+2
-1
未找到文件。
apps/common/tree.py
浏览文件 @
ece9b163
...
...
@@ -98,4 +98,5 @@ class TreeNodeSerializer(serializers.Serializer):
isParent
=
serializers
.
BooleanField
(
default
=
False
)
open
=
serializers
.
BooleanField
(
default
=
False
)
iconSkin
=
serializers
.
CharField
(
max_length
=
128
,
allow_blank
=
True
)
nocheck
=
serializers
.
BooleanField
(
default
=
False
)
meta
=
serializers
.
JSONField
()
apps/jumpserver/context_processor.py
浏览文件 @
ece9b163
...
...
@@ -15,7 +15,7 @@ def jumpserver_processor(request):
'FAVICON_URL'
:
static
(
'img/facio.ico'
),
'JMS_TITLE'
:
'Jumpserver'
,
'VERSION'
:
settings
.
VERSION
,
'COPYRIGHT'
:
'FIT2CLOUD 飞致云'
+
' © 2014-20
19
'
,
'COPYRIGHT'
:
'FIT2CLOUD 飞致云'
+
' © 2014-20
20
'
,
'SECURITY_COMMAND_EXECUTION'
:
settings
.
SECURITY_COMMAND_EXECUTION
,
'SECURITY_MFA_VERIFY_TTL'
:
settings
.
SECURITY_MFA_VERIFY_TTL
,
'FORCE_SCRIPT_NAME'
:
settings
.
FORCE_SCRIPT_NAME
,
...
...
apps/locale/zh/LC_MESSAGES/django.mo
浏览文件 @
ece9b163
无法预览此类型文件
apps/locale/zh/LC_MESSAGES/django.po
浏览文件 @
ece9b163
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-01-1
4 16:52
+0800\n"
"POT-Creation-Date: 2020-01-1
5 12:40
+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
...
...
@@ -3222,33 +3222,37 @@ msgstr "任务列表"
msgid "Go"
msgstr ""
#: ops/templates/ops/command_execution_create.html:179
#: ops/templates/ops/command_execution_create.html:159
msgid "Asset configuration does not include the SSH protocol"
msgstr "资产配置不包含 SSH 协议"
#: ops/templates/ops/command_execution_create.html:183
msgid "Selected assets"
msgstr "已选择资产"
#: ops/templates/ops/command_execution_create.html:18
2
#: ops/templates/ops/command_execution_create.html:18
6
msgid "In total"
msgstr "总共"
#: ops/templates/ops/command_execution_create.html:2
19
#: ops/templates/ops/command_execution_create.html:2
23
msgid ""
"Select the left asset, select the running system user, execute command in "
"batch"
msgstr "选择左侧资产, 选择运行的系统用户,批量执行命令"
#: ops/templates/ops/command_execution_create.html:26
3
#: ops/templates/ops/command_execution_create.html:26
7
msgid "Unselected assets"
msgstr "没有选中资产"
#: ops/templates/ops/command_execution_create.html:2
67
#: ops/templates/ops/command_execution_create.html:2
71
msgid "No input command"
msgstr "没有输入命令"
#: ops/templates/ops/command_execution_create.html:27
1
#: ops/templates/ops/command_execution_create.html:27
5
msgid "No system user was selected"
msgstr "没有选择系统用户"
#: ops/templates/ops/command_execution_create.html:28
1
#: ops/templates/ops/command_execution_create.html:28
5
msgid "Pending"
msgstr "等待"
...
...
apps/ops/templates/ops/command_execution_create.html
浏览文件 @
ece9b163
...
...
@@ -86,7 +86,7 @@
<div
class=
"col-sm-2"
>
<select
class=
"select2 form-control"
id=
"system-users-select"
>
{% for s in system_users %}
<option
value=
"{{ s.id }}"
{%
if
s.
protocol
!=
'
ssh
'
or
s.login_mode
!=
'
auto
'
%}
disabled
{%
endif
%}
>
{{ s }}
</option>
<option
value=
"{{ s.id }}"
{%
if
s.
login_mode =
=
'
manual
'
or
s.protocol
in
'
mysql
|
telnet
|
vnc
'
%}
disabled
{%
endif
%}
>
{{ s }}
</option>
{% endfor %}
</select>
<button
type=
"button"
class=
"btn btn-primary btn-execute"
style=
"margin-top: 30px; width: 100%"
>
...
...
@@ -138,11 +138,11 @@
}
},
callback
:
{
onCheck
:
onCheck
onCheck
:
onCheck
,
onClick
:
onClick
,
}
};
$
.
get
(
url
,
function
(
data
,
status
)
{
$
.
fn
.
zTree
.
init
(
$
(
"
#assetTree
"
),
setting
,
data
);
zTree
=
$
.
fn
.
zTree
.
getZTreeObj
(
"
assetTree
"
);
...
...
@@ -152,25 +152,29 @@
});
});
}
function
onClick
(
event
,
treeId
,
treeNode
,
clickFlag
){
if
(
treeNode
.
meta
.
type
===
'
asset
'
){
let
protocolsStr
=
treeNode
.
meta
.
asset
.
protocols
+
''
;
if
(
protocolsStr
.
indexOf
(
'
ssh/
'
)
===
-
1
){
toastr
.
warning
(
"
{% trans
"
Asset
configuration
does
not
include
the
SSH
protocol
"
%}
"
);
}
}
}
function
getSelectedAssetsNode
()
{
var
nodes
=
zTree
.
getCheckedNodes
(
true
);
var
assetsNodeId
=
[];
var
assetsNode
=
[];
nodes
.
forEach
(
function
(
node
)
{
if
(
node
.
meta
.
type
===
'
asset
'
&&
!
node
.
isHidden
)
{
var
protocols
=
node
.
meta
.
asset
.
protocols
;
protocols
.
forEach
(
function
(
val
)
{
if
(
assetsNodeId
.
indexOf
(
node
.
id
)
===
-
1
&&
val
.
indexOf
(
"
ssh
"
)
>
-
1
)
{
assetsNodeId
.
push
(
node
.
id
);
assetsNode
.
push
(
node
)
}
});
var
protocolsStr
=
node
.
meta
.
asset
.
protocols
+
''
;
if
(
assetsNodeId
.
indexOf
(
node
.
id
)
===
-
1
&&
protocolsStr
.
indexOf
(
'
ssh
'
)
>
-
1
){
assetsNodeId
.
push
(
node
.
id
);
assetsNode
.
push
(
node
)
}
}
});
return
assetsNode
;
}
function
onCheck
(
e
,
treeId
,
treeNode
)
{
var
nodes
=
getSelectedAssetsNode
();
var
nodes_names
=
nodes
.
map
(
function
(
node
)
{
...
...
apps/perms/utils/asset_permission.py
浏览文件 @
ece9b163
...
...
@@ -481,6 +481,7 @@ class ParserNode:
'isParent'
:
False
,
'open'
:
False
,
'iconSkin'
:
icon_skin
,
'nocheck'
:
not
asset
.
has_protocol
(
'ssh'
),
'meta'
:
{
'type'
:
'asset'
,
'asset'
:
{
...
...
apps/perms/utils/database_app_permission.py
浏览文件 @
ece9b163
...
...
@@ -2,6 +2,7 @@
#
from
django.db.models
import
Q
from
django.utils.translation
import
ugettext
as
_
from
orgs.utils
import
set_to_root_org
from
..models
import
DatabaseAppPermission
...
...
@@ -16,7 +17,6 @@ __all__ = [
'parse_database_app_to_tree_node'
]
def
get_user_database_app_permissions
(
user
,
include_group
=
True
):
if
include_group
:
groups
=
user
.
groups
.
all
()
...
...
@@ -73,7 +73,7 @@ class DatabaseAppPermissionUtil:
def
construct_database_apps_tree_root
():
tree_root
=
{
'id'
:
'ID_DATABASE_APP_ROOT'
,
'name'
:
'DatabaseApp'
,
'name'
:
_
(
'DatabaseApp'
)
,
'title'
:
'DatabaseApp'
,
'pId'
:
''
,
'open'
:
False
,
...
...
apps/perms/utils/remote_app_permission.py
浏览文件 @
ece9b163
...
...
@@ -2,6 +2,7 @@
#
from
django.db.models
import
Q
from
django.utils.translation
import
ugettext
as
_
from
common.tree
import
TreeNode
from
orgs.utils
import
set_to_root_org
...
...
@@ -72,7 +73,7 @@ class RemoteAppPermissionUtil:
def
construct_remote_apps_tree_root
():
tree_root
=
{
'id'
:
'ID_REMOTE_APP_ROOT'
,
'name'
:
'RemoteApp'
,
'name'
:
_
(
'RemoteApp'
)
,
'title'
:
'RemoteApp'
,
'pId'
:
''
,
'open'
:
False
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录