import - rancher dashboard by quota usage

This commit is contained in:
2025-12-14 14:21:17 +03:30
parent 8c93de1ec0
commit 3eb898a481
2 changed files with 26 additions and 2 deletions

View File

@@ -217,3 +217,25 @@ class RancherViewSet(BaseViewSet, RancherDashboardService, SoftDeleteMixin, view
rancher=rancher
)
return Response(rancher_dashboard_data)
@action(
methods=['get'],
detail=True,
url_path='rancher_dashboard_by_quota_usage',
url_name='rancher_dashboard_by_quota_usage',
name='rancher_dashboard_by_quota_usage'
)
def rancher_dashboard_by_quota_usage(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_by_quota_usage(
self,
rancher=rancher
)
return Response(rancher_dashboard_data)