perf(permms): 应用授权树返回授权应用的总数量

This commit is contained in:
Bai
2020-09-29 11:24:31 +08:00
committed by 老广
parent 31b6c3b679
commit 5558e854de
6 changed files with 12 additions and 9 deletions

View File

@@ -51,7 +51,8 @@ class UserGrantedK8sAppsAsTreeApi(UserGrantedK8sAppsApi):
tree_root = None
data = []
if not only_k8s_app:
tree_root = utils.construct_k8s_apps_tree_root()
amount = len(k8s_apps)
tree_root = utils.construct_k8s_apps_tree_root(amount)
data.append(tree_root)
for k8s_app in k8s_apps:
node = utils.parse_k8s_app_to_tree_node(tree_root, k8s_app)