Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gjl2004yn
jumpserver
提交
92251f2a
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,发现更多精彩内容 >>
提交
92251f2a
编写于
10月 28, 2016
作者:
baltery
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Merge with master
上级
374dfbda
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
20 deletion
+8
-20
apps/assets/models.py
apps/assets/models.py
+2
-2
apps/assets/templates/assets/asset_list.html
apps/assets/templates/assets/asset_list.html
+0
-17
apps/audits/models.py
apps/audits/models.py
+4
-1
apps/audits/templates/audits/command_log_list.html
apps/audits/templates/audits/command_log_list.html
+2
-0
未找到文件。
apps/assets/models.py
浏览文件 @
92251f2a
...
@@ -289,10 +289,10 @@ def get_default_idc():
...
@@ -289,10 +289,10 @@ def get_default_idc():
class
Asset
(
models
.
Model
):
class
Asset
(
models
.
Model
):
ip
=
models
.
GenericIPAddressField
(
max_length
=
32
,
verbose_name
=
_
(
'IP'
))
ip
=
models
.
GenericIPAddressField
(
max_length
=
32
,
verbose_name
=
_
(
'IP'
)
,
db_index
=
True
)
other_ip
=
models
.
CharField
(
max_length
=
255
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Other IP'
))
other_ip
=
models
.
CharField
(
max_length
=
255
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Other IP'
))
remote_card_ip
=
models
.
CharField
(
max_length
=
16
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Remote card IP'
))
remote_card_ip
=
models
.
CharField
(
max_length
=
16
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
'Remote card IP'
))
hostname
=
models
.
CharField
(
max_length
=
128
,
blank
=
True
,
verbose_name
=
_
(
'Hostname'
))
hostname
=
models
.
CharField
(
max_length
=
128
,
unique
=
True
,
verbose_name
=
_
(
'Hostname'
))
port
=
models
.
IntegerField
(
default
=
22
,
verbose_name
=
_
(
'Port'
))
port
=
models
.
IntegerField
(
default
=
22
,
verbose_name
=
_
(
'Port'
))
groups
=
models
.
ManyToManyField
(
AssetGroup
,
blank
=
True
,
related_name
=
'assets'
,
verbose_name
=
_
(
'Asset groups'
))
groups
=
models
.
ManyToManyField
(
AssetGroup
,
blank
=
True
,
related_name
=
'assets'
,
verbose_name
=
_
(
'Asset groups'
))
admin_user
=
models
.
ForeignKey
(
AdminUser
,
null
=
True
,
blank
=
True
,
related_name
=
'assets'
,
admin_user
=
models
.
ForeignKey
(
AdminUser
,
null
=
True
,
blank
=
True
,
related_name
=
'assets'
,
...
...
apps/assets/templates/assets/asset_list.html
浏览文件 @
92251f2a
...
@@ -132,7 +132,6 @@ div.dataTables_wrapper div.dataTables_filter,
...
@@ -132,7 +132,6 @@ div.dataTables_wrapper div.dataTables_filter,
};
//onload;
};
//onload;
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
<<<<<<<
HEAD
$
(
'
#modal
'
).
modal
({
$
(
'
#modal
'
).
modal
({
show
:
false
,
show
:
false
,
backdrop
:
'
static
'
,
backdrop
:
'
static
'
,
...
@@ -169,22 +168,6 @@ div.dataTables_wrapper div.dataTables_filter,
...
@@ -169,22 +168,6 @@ div.dataTables_wrapper div.dataTables_filter,
$
(
'
#editable_length
'
).
before
(
"
<a href=
\"
{% url 'assets:asset-create' %}
\"
class=
\"
btn btn-sm btn-primary custom
\"
> {% trans 'Create asset' %} </a> <button class='btn btn-sm btn-primary custom' id='zksx' onclick='tagShow()'>标签</button>
"
);
$
(
'
#editable_length
'
).
before
(
"
<a href=
\"
{% url 'assets:asset-create' %}
\"
class=
\"
btn btn-sm btn-primary custom
\"
> {% trans 'Create asset' %} </a> <button class='btn btn-sm btn-primary custom' id='zksx' onclick='tagShow()'>标签</button>
"
);
$
(
'
#editable
'
).
before
(
oTags
);
$
(
'
#editable
'
).
before
(
oTags
);
},
},
=======
var
oTags
=
document
.
getElementById
(
"
ydxbd
"
);
var
table
=
$
(
'
#editable
'
).
DataTable
({
"
aLengthMenu
"
:
[[
10
,
25
,
50
,
-
1
],
[
"
10
"
,
"
25
"
,
"
50
"
,
"
all
"
]],
"
iDisplayLength
"
:
25
,
"
aaSorting
"
:
[[
7
,
"
asc
"
]],
"
aoColumnDefs
"
:
[
{
"
bSortable
"
:
false
,
"
aTargets
"
:
[
0
]
}],
"
bAutoWidth
"
:
false
,
"
language
"
:
{
"
url
"
:
"
/static/js/plugins/dataTables/i18n/zh-hans.json
"
},
"
dom
"
:
'
<"custom">lftip
'
,
"
initComplete
"
:
function
()
{
//alert( 'DataTables has finished its initialisation.' );
$
(
'
#editable_length
'
).
before
(
"
<a href=
\"
{% url 'assets:asset-create' %}
\"
class=
\"
btn btn-sm btn-primary custom
\"
> {% trans 'Create asset' %} </a> <button class='btn btn-sm btn-primary custom' id='zksx' onclick='tagShow()'>标签</button>
"
);
$
(
'
#editable
'
).
before
(
oTags
);
},
>>>>>>>
534321
d1aa42f0853083876b807d0258dafc0b0c
columns
:
[
columns
:
[
{
data
:
"
checkbox
"
},
{
data
:
"
checkbox
"
},
{
data
:
"
id
"
},
{
data
:
"
id
"
},
...
...
apps/audits/models.py
浏览文件 @
92251f2a
...
@@ -82,7 +82,10 @@ class CommandLog(models.Model):
...
@@ -82,7 +82,10 @@ class CommandLog(models.Model):
@
property
@
property
def
output_decode
(
self
):
def
output_decode
(
self
):
return
base64
.
b64decode
(
self
.
output
).
replace
(
'
\n
'
,
'<br />'
)
try
:
return
base64
.
b64decode
(
self
.
output
).
replace
(
'
\n
'
,
'<br />'
)
except
UnicodeDecodeError
:
return
'UnicodeDecodeError'
class
Meta
:
class
Meta
:
db_table
=
'command_log'
db_table
=
'command_log'
...
...
apps/audits/templates/audits/command_log_list.html
浏览文件 @
92251f2a
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<th>
Command
</th>
<th>
Command
</th>
<th>
Username
</th>
<th>
Username
</th>
<th>
IP
</th>
<th>
IP
</th>
<th>
System user
</th>
<th>
Datetime
</th>
<th>
Datetime
</th>
<th
data-hide=
"all"
>
Output
</th>
<th
data-hide=
"all"
>
Output
</th>
</tr>
</tr>
...
@@ -26,6 +27,7 @@
...
@@ -26,6 +27,7 @@
<td>
{{ command.command }}
</td>
<td>
{{ command.command }}
</td>
<td>
{{ command.proxy_log.username }}
</td>
<td>
{{ command.proxy_log.username }}
</td>
<td>
{{ command.proxy_log.ip }}
</td>
<td>
{{ command.proxy_log.ip }}
</td>
<td>
{{ command.proxy_log.system_user }}
</td>
<td>
{{ command.datetime }}
</td>
<td>
{{ command.datetime }}
</td>
<td>
{{ command.output_decode |safe }}
</td>
<td>
{{ command.output_decode |safe }}
</td>
</tr>
</tr>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录