feat: enm enstat调整一下排序
This commit is contained in:
parent
152b0b5a3a
commit
05beed5146
|
@ -160,8 +160,8 @@ class MpointStatViewSet(BulkCreateModelMixin, BulkDestroyModelMixin, CustomListM
|
|||
serializer_class = MpointStatSerializer
|
||||
select_related_fields = ["mpoint", "mpoint__ep_monitored", "mpoint__ep_belong", "mgroup", "mgroup__belong_dept"]
|
||||
filterset_class = MpointStatFilter
|
||||
ordering_fields = ['mpoint__report_sortstr', 'year', 'month', 'day', 'hour', 'year_s', 'month_s', 'day_s', 'mgroup__sort', 'create_time']
|
||||
ordering = ["mpoint__report_sortstr", "-year", "-month", "-day", "-hour", "-year_s", "-month_s", "-day_s", "mgroup__sort", "-create_time"]
|
||||
ordering_fields = ['mpoint__report_sortstr', 'year', 'month', 'day', 'hour', 'year_s', 'month_s', 'day_s', 'mgroup__sort', 'create_time', "update_time"]
|
||||
ordering = ["mpoint__report_sortstr", "-year", "-month", "-day", "-hour", "-year_s", "-month_s", "-day_s", "mgroup__sort"]
|
||||
|
||||
def perform_create(self, serializer):
|
||||
ins = serializer.save()
|
||||
|
@ -239,8 +239,8 @@ class EnStatViewSet(CustomListModelMixin, CustomGenericViewSet):
|
|||
serializer_class = EnStatSerializer
|
||||
select_related_fields = ["mgroup", "team", "mgroup__belong_dept"]
|
||||
filterset_class = EnStatFilter
|
||||
ordering = ["mgroup__sort", "year_s", "month_s", "day_s", "hour"]
|
||||
ordering_fields = ["mgroup__sort", "year_s", "month_s", "day_s", "hour", "update_time"]
|
||||
ordering = ["mgroup__sort", "year", "month", "day", "hour", "year_s", "month_s", "day_s"]
|
||||
ordering_fields = ["mgroup__sort", "year_s", "month_s", "day_s", "hour", "update_time", "create_time"]
|
||||
|
||||
@action(methods=["post"], detail=False, perms_map={"post": "*"}, serializer_class=EnStatAnaSerializer)
|
||||
def analyze(self, request, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue