mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-16 15:28:38 +00:00
feat: 新增获取k8s pod namespace container接口
This commit is contained in:
@@ -13,7 +13,6 @@ from rest_framework.generics import (
|
||||
from orgs.utils import tmp_to_root_org
|
||||
from applications.models import Application
|
||||
from perms.utils.application.permission import (
|
||||
has_application_system_permission,
|
||||
get_application_system_user_ids,
|
||||
validate_permission,
|
||||
)
|
||||
|
@@ -54,10 +54,15 @@ class ApplicationsAsTreeMixin(SerializeApplicationToTreeNodeMixin):
|
||||
将应用序列化成树的结构返回
|
||||
"""
|
||||
serializer_class = TreeNodeSerializer
|
||||
user: None
|
||||
|
||||
def list(self, request, *args, **kwargs):
|
||||
tree_id = request.query_params.get('tree_id', None)
|
||||
parent_info = request.query_params.get('parentInfo', None)
|
||||
queryset = self.filter_queryset(self.get_queryset())
|
||||
tree_nodes = self.serialize_applications_with_org(queryset)
|
||||
tree_nodes = self.serialize_applications_with_org(
|
||||
queryset, tree_id, parent_info, self.user
|
||||
)
|
||||
serializer = self.get_serializer(tree_nodes, many=True)
|
||||
return Response(data=serializer.data)
|
||||
|
||||
|
Reference in New Issue
Block a user