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
49a5a804
Unverified
Commit
49a5a804
authored
Jul 22, 2019
by
老广
Committed by
GitHub
Jul 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All assets (#247)
* [Update] 支持节点查看所有资产 * [Update] 修改依赖版本 * [Update] filter assets
parent
ff28d9a3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
interactive.py
coco/interactive.py
+5
-3
requirements.txt
requirements/requirements.txt
+1
-1
No files found.
coco/interactive.py
View file @
49a5a804
...
...
@@ -358,14 +358,14 @@ class InteractiveServer:
etag
=
self
.
_user_assets_cached_etag
.
get
(
self
.
client
.
user
.
id
)
if
cache_policy
not
in
[
'1'
,
1
]:
etag
=
None
nodes
,
new_etag
=
app_service
.
get_user_
asset_group
s
(
nodes
,
new_etag
=
app_service
.
get_user_
node
s
(
self
.
client
.
user
,
cache_policy
=
cache_policy
,
etag
=
etag
)
if
nodes
is
None
:
logger
.
debug
(
"Get user nodes: not modify"
)
return
nodes
=
sorted
(
nodes
,
key
=
lambda
node
:
node
.
key
)
nodes
=
self
.
filter_system_users_of_assets_under_nodes
(
nodes
)
#
nodes = self.filter_system_users_of_assets_under_nodes(nodes)
self
.
__class__
.
_user_nodes_cached
[
self
.
client
.
user
.
id
]
=
nodes
if
new_etag
:
self
.
__class__
.
_user_assets_cached_etag
[
self
.
client
.
user
.
id
]
=
new_etag
...
...
@@ -415,7 +415,9 @@ class InteractiveServer:
self
.
display_nodes_as_tree
()
return
assets
=
self
.
nodes
[
_id
-
1
]
.
assets_granted
node
=
self
.
nodes
[
_id
-
1
]
assets
=
app_service
.
get_user_node_assets
(
self
.
client
.
user
,
node
=
node
,
cache_policy
=
"1"
)
assets
=
self
.
filter_system_users
(
assets
)
self
.
display_assets_paging
(
assets
)
#
...
...
requirements/requirements.txt
View file @
49a5a804
...
...
@@ -19,7 +19,7 @@ itsdangerous==0.24
Jinja2==2.10.1
jmespath==0.9.3
jms-storage==0.0.23
jumpserver-python-sdk==0.0.
69
jumpserver-python-sdk==0.0.
70
MarkupSafe==1.0
oss2==2.4.0
paramiko==2.4.2
...
...
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