Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
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
coco
Commits
a1b4180d
Commit
a1b4180d
authored
Aug 08, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 去掉node的comment
parent
ea4c5d6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
interactive.py
coco/interactive.py
+4
-13
No files found.
coco/interactive.py
View file @
a1b4180d
...
...
@@ -129,22 +129,13 @@ class InteractiveServer:
id_length
=
max
(
len
(
str
(
len
(
self
.
nodes
))),
5
)
name_length
=
item_max_length
(
self
.
nodes
,
15
,
key
=
lambda
x
:
x
.
name
)
amount_length
=
item_max_length
(
self
.
nodes
,
10
,
key
=
lambda
x
:
x
.
assets_amount
)
amount_length
=
item_max_length
(
self
.
nodes
,
10
,
key
=
lambda
x
:
x
.
assets_amount
)
size_list
=
[
id_length
,
name_length
,
amount_length
]
fake_data
=
[
'ID'
,
_
(
"Name"
),
_
(
"Assets"
)]
header_without_comment
=
format_with_zh
(
size_list
,
*
fake_data
)
comment_length
=
max
(
self
.
request
.
meta
[
"width"
]
-
size_of_str_with_zh
(
header_without_comment
)
-
1
,
2
)
size_list
.
append
(
comment_length
)
fake_data
.
append
(
_
(
"Comment"
))
self
.
client
.
send
(
title
(
format_with_zh
(
size_list
,
*
fake_data
)))
for
index
,
group
in
enumerate
(
self
.
nodes
,
1
):
data
=
[
index
,
group
.
name
,
group
.
assets_amount
,
group
.
comme
nt
]
self
.
client
.
send
(
wr
(
title
(
format_with_zh
(
size_list
,
*
fake_data
)
)))
for
index
,
node
in
enumerate
(
self
.
nodes
,
1
):
data
=
[
index
,
node
.
name
,
node
.
assets_amou
nt
]
self
.
client
.
send
(
wr
(
format_with_zh
(
size_list
,
*
data
)))
self
.
client
.
send
(
wr
(
_
(
"总共: {}"
)
.
format
(
len
(
self
.
nodes
)),
before
=
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