import - ranchers dashboard

This commit is contained in:
2025-12-14 14:07:46 +03:30
parent bf1335b6f2
commit 3767bf0032
2 changed files with 66 additions and 3 deletions

View File

@@ -195,3 +195,25 @@ class RancherViewSet(BaseViewSet, RancherDashboardService, SoftDeleteMixin, view
query_string=query_string,
)
return Response(rancher_dashboard_data)
@action(
methods=['get'],
detail=True,
url_path='rancher_dashboard',
url_name='rancher_dashboard',
name='rancher_dashboard'
)
def rancher_dashboard(self, request, pk=None):
""" rancher dashboard """
rancher = self.get_object()
query_param = self.request.query_params # noqa
query_string = query_param.get('search', None)
rancher_dashboard_data = self.get_rancher_dashboard(
self,
rancher=rancher
)
return Response(rancher_dashboard_data)