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
2f0e91a5
Commit
2f0e91a5
authored
Dec 05, 2015
by
wangyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
0f6f3bdb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
asset_api.py
jasset/asset_api.py
+4
-4
No files found.
jasset/asset_api.py
View file @
2f0e91a5
...
...
@@ -202,8 +202,8 @@ def write_excel(asset_all):
worksheet
.
set_column
(
'A:E'
,
15
)
worksheet
.
set_column
(
'F:F'
,
40
)
worksheet
.
set_column
(
'G:Z'
,
15
)
title
=
[
u'主机名'
,
u'IP'
,
u'IDC'
,
u'
MAC'
,
u'远控IP'
,
u'CPU'
,
u'内存(G)'
,
u'硬盘(G)'
,
u'操作系统'
,
u'机柜位置
'
,
u'
所属主机组
'
,
u'机器状态'
,
u'备注'
]
title
=
[
u'主机名'
,
u'IP'
,
u'IDC'
,
u'
所属主机组'
,
u'操作系统'
,
u'CPU'
,
u'内存(G)'
,
u'硬盘(G)
'
,
u'
机柜位置'
,
u'MAC'
,
u'远控IP
'
,
u'机器状态'
,
u'备注'
]
for
asset
in
asset_all
:
group_list
=
[]
for
p
in
asset
.
group
.
all
():
...
...
@@ -217,8 +217,8 @@ def write_excel(asset_all):
system_version
=
asset
.
system_version
if
asset
.
idc
else
u''
system_os
=
unicode
(
system_type
)
+
unicode
(
system_version
)
alter_dic
=
[
asset
.
hostname
,
asset
.
ip
,
idc_name
,
asset
.
mac
,
asset
.
remote_ip
,
asset
.
cpu
,
asset
.
memory
,
disk
,
system_os
,
asset
.
cabinet
,
group_all
,
status
,
asset
.
comment
]
alter_dic
=
[
asset
.
hostname
,
asset
.
ip
,
idc_name
,
group_all
,
system_os
,
asset
.
cpu
,
asset
.
memory
,
disk
,
asset
.
cabinet
,
asset
.
mac
,
asset
.
remote_ip
,
status
,
asset
.
comment
]
data
.
append
(
alter_dic
)
format
=
workbook
.
add_format
()
format
.
set_border
(
1
)
...
...
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