Display policy data in account/domain tables
This commit is contained in:
parent
378572d8bb
commit
24fdfd345c
|
@ -109,6 +109,7 @@ class ManageDomainViewSet(
|
|||
federation_models.Domain.objects.external()
|
||||
.with_actors_count()
|
||||
.with_outbox_activities_count()
|
||||
.prefetch_related("instance_policy")
|
||||
.order_by("name")
|
||||
)
|
||||
serializer_class = serializers.ManageDomainSerializer
|
||||
|
@ -121,6 +122,7 @@ class ManageDomainViewSet(
|
|||
"nodeinfo_fetch_date",
|
||||
"actors_count",
|
||||
"outbox_activities_count",
|
||||
"instance_policy",
|
||||
]
|
||||
|
||||
@detail_route(methods=["get"])
|
||||
|
@ -147,6 +149,7 @@ class ManageActorViewSet(
|
|||
.with_uploads_count()
|
||||
.order_by("-creation_date")
|
||||
.select_related("user")
|
||||
.prefetch_related("instance_policy")
|
||||
)
|
||||
serializer_class = serializers.ManageActorSerializer
|
||||
filter_class = filters.ManageActorFilterSet
|
||||
|
@ -161,6 +164,7 @@ class ManageActorViewSet(
|
|||
"last_fetch_date",
|
||||
"uploads_count",
|
||||
"outbox_activities_count",
|
||||
"instance_policy",
|
||||
]
|
||||
|
||||
def get_object(self):
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
@action-launched="fetchData"
|
||||
:objects-data="result"
|
||||
:actions="actions"
|
||||
action-url="manage/accounts/action/"
|
||||
:filters="actionFilters">
|
||||
<template slot="header-cells">
|
||||
<th><translate>Name</translate></th>
|
||||
|
@ -41,6 +42,7 @@
|
|||
<th><translate>Uploads</translate></th>
|
||||
<th><translate>First seen</translate></th>
|
||||
<th><translate>Last seen</translate></th>
|
||||
<th><translate>Under moderation rule</translate></th>
|
||||
</template>
|
||||
<template slot="row-cells" slot-scope="scope">
|
||||
<td>
|
||||
|
@ -67,6 +69,9 @@
|
|||
<td>
|
||||
<human-date v-if="scope.obj.last_fetch_date" :date="scope.obj.last_fetch_date"></human-date>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="scope.obj.instance_policy"><i class="shield icon"></i> <translate>Yes</translate></span>
|
||||
</td>
|
||||
</template>
|
||||
</action-table>
|
||||
</div>
|
||||
|
@ -78,7 +83,6 @@
|
|||
:current="page"
|
||||
:paginate-by="paginateBy"
|
||||
:total="result.count"
|
||||
action-url="manage/accounts/action/"
|
||||
></pagination>
|
||||
|
||||
<span v-if="result && result.results.length > 0">
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
<th><translate>Users</translate></th>
|
||||
<th><translate>Received messages</translate></th>
|
||||
<th><translate>First seen</translate></th>
|
||||
<th><translate>Under moderation rule</translate></th>
|
||||
</template>
|
||||
<template slot="row-cells" slot-scope="scope">
|
||||
<td>
|
||||
|
@ -54,6 +55,9 @@
|
|||
<td>
|
||||
<human-date :date="scope.obj.creation_date"></human-date>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="scope.obj.instance_policy"><i class="shield icon"></i> <translate>Yes</translate></span>
|
||||
</td>
|
||||
</template>
|
||||
</action-table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue