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
97d80e61
Unverified
Commit
97d80e61
authored
Jul 22, 2019
by
老广
Committed by
GitHub
Jul 22, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #249 from jumpserver/dev
[Bugfix] 修复添加节点的错误
parents
3c7a6b42
25a447dd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
interactive.py
coco/interactive.py
+4
-0
No files found.
coco/interactive.py
View file @
97d80e61
...
@@ -9,6 +9,7 @@ import os
...
@@ -9,6 +9,7 @@ import os
import
math
import
math
import
time
import
time
from
treelib
import
Tree
from
treelib
import
Tree
from
treelib.exceptions
import
NodeIDAbsentError
from
.
import
char
from
.
import
char
from
.conf
import
config
from
.conf
import
config
...
@@ -386,7 +387,10 @@ class InteractiveServer:
...
@@ -386,7 +387,10 @@ class InteractiveServer:
tag
=
"{}.{}({})"
.
format
(
index
+
1
,
node
.
name
,
node
.
assets_amount
)
tag
=
"{}.{}({})"
.
format
(
index
+
1
,
node
.
name
,
node
.
assets_amount
)
key
=
node
.
key
key
=
node
.
key
parent_key
=
key
[:
node
.
key
.
rfind
(
':'
)]
or
root
parent_key
=
key
[:
node
.
key
.
rfind
(
':'
)]
or
root
try
:
self
.
node_tree
.
create_node
(
tag
=
tag
,
identifier
=
key
,
data
=
node
,
parent
=
parent_key
)
self
.
node_tree
.
create_node
(
tag
=
tag
,
identifier
=
key
,
data
=
node
,
parent
=
parent_key
)
except
NodeIDAbsentError
:
self
.
node_tree
.
create_node
(
tag
=
tag
,
identifier
=
key
,
data
=
node
,
parent
=
root
)
def
display_nodes_as_tree
(
self
):
def
display_nodes_as_tree
(
self
):
if
self
.
nodes
is
None
:
if
self
.
nodes
is
None
:
...
...
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