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