Merge branch 'v3' of github.com:jumpserver/jumpserver into v3

pull/9137/head
Bai 2022-12-01 12:03:08 +08:00
commit d5d770e4ac
2 changed files with 6 additions and 1 deletions

View File

@ -408,6 +408,11 @@ class IndexApi(DateTimeMixin, DatesLoginMetricMixin, APIView):
'total_count_ftp_logs': self.ftp_logs_amount,
})
if _all or query_params.get('total_count') or query_params.get('total_count_type_to_assets_amount'):
data.update({
'total_count_type_to_assets_amount': self.get_type_to_assets,
})
if _all or query_params.get('session_dates_metrics'):
data.update({
'dates_metrics_date': self.get_dates_metrics_date(),

View File

@ -30,7 +30,7 @@ class AssetGrantedSerializer(serializers.ModelSerializer):
'domain', 'platform',
"comment", "org_id", "is_active",
]
fields = only_fields + ['protocols', 'category', 'type'] + ['org_name']
fields = only_fields + ['protocols', 'category', 'type', 'specific'] + ['org_name']
read_only_fields = fields