add explicit labels to datagrids in destinations, registration tokens, reports, and users (list)

This commit is contained in:
Aine
2024-11-21 14:59:03 +02:00
parent 998d3817c6
commit 6620942928
4 changed files with 23 additions and 23 deletions

View File

@@ -125,11 +125,11 @@ export const DestinationList = (props: ListProps) => {
sort={{ field: "destination", order: "ASC" }}
>
<DatagridConfigurable rowClick={id => `${id}/show/rooms`} bulkActionButtons={false}>
<FunctionField source="destination" render={destinationFieldRender} />
<DateField source="failure_ts" showTime options={DATE_FORMAT} />
<RetryDateField source="retry_last_ts" showTime options={DATE_FORMAT} />
<TextField source="retry_interval" />
<TextField source="last_successful_stream_ordering" />
<FunctionField source="destination" render={destinationFieldRender} label="resources.destinations.fields.destination" />
<DateField source="failure_ts" showTime options={DATE_FORMAT} label="resources.destinations.fields.failure_ts" />
<RetryDateField source="retry_last_ts" showTime options={DATE_FORMAT} label="resources.destinations.fields.retry_last_ts" />
<TextField source="retry_interval" label="resources.destinations.fields.retry_interval" />
<TextField source="last_successful_stream_ordering" label="resources.destinations.fields.last_successful_stream_ordering" />
<DestinationReconnectButton />
</DatagridConfigurable>
</List>

View File

@@ -41,11 +41,11 @@ export const RegistrationTokenList = (props: ListProps) => (
perPage={500}
>
<DatagridConfigurable rowClick="edit">
<TextField source="token" sortable={false} />
<NumberField source="uses_allowed" sortable={false} />
<NumberField source="pending" sortable={false} />
<NumberField source="completed" sortable={false} />
<DateField source="expiry_time" showTime options={DATE_FORMAT} sortable={false} />
<TextField source="token" sortable={false} label="resources.registration_tokens.fields.token"/>
<NumberField source="uses_allowed" sortable={false} label="resources.registration_tokens.fields.uses_allowed" />
<NumberField source="pending" sortable={false} label="resources.registration_tokens.fields.pending" />
<NumberField source="completed" sortable={false} label="resources.registration_tokens.fields.completed" />
<DateField source="expiry_time" showTime options={DATE_FORMAT} sortable={false} label="resources.registration_tokens.fields.expiry_time" />
</DatagridConfigurable>
</List>
);

View File

@@ -92,11 +92,11 @@ const ReportShowActions = () => {
export const ReportList = (props: ListProps) => (
<List {...props} pagination={<ReportPagination />} sort={{ field: "received_ts", order: "DESC" }}>
<DatagridConfigurable rowClick="show" bulkActionButtons={false}>
<TextField source="id" sortable={false} />
<DateField source="received_ts" showTime options={DATE_FORMAT} sortable={true} />
<TextField sortable={false} source="user_id" />
<TextField sortable={false} source="name" />
<TextField sortable={false} source="score" />
<TextField source="id" sortable={false} label="resources.reports.fields.id" />
<DateField source="received_ts" showTime options={DATE_FORMAT} sortable={true} label="resources.reports.fields.received_ts" />
<TextField sortable={false} source="user_id" label="resources.reports.fields.user_id" />
<TextField sortable={false} source="name" label="resources.reports.fields.name" />
<TextField sortable={false} source="score" label="resources.reports.fields.score" />
</DatagridConfigurable>
</List>
);

View File

@@ -171,14 +171,14 @@ export const UserList = (props: ListProps) => (
rowClick={(id: Identifier, resource: string) => `/${resource}/${id}`}
bulkActionButtons={<UserBulkActionButtons />}
>
<AvatarField source="avatar_src" sx={{ height: "40px", width: "40px" }} sortBy="avatar_url" />
<TextField source="id" sortBy="name" />
<TextField source="displayname" />
<BooleanField source="is_guest" />
<BooleanField source="admin" />
<BooleanField source="deactivated" />
<BooleanField source="locked" />
<BooleanField source="erased" sortable={false} />
<AvatarField source="avatar_src" sx={{ height: "40px", width: "40px" }} sortBy="avatar_url" label="resources.users.fields.avatar" />
<TextField source="id" sortBy="name" label="resources.users.fields.id" />
<TextField source="displayname" label="resources.users.fields.displayname" />
<BooleanField source="is_guest" label="resources.users.fields.is_guest" />
<BooleanField source="admin" label="resources.users.fields.admin" />
<BooleanField source="deactivated" label="resources.users.fields.deactivated" />
<BooleanField source="locked" label="resources.users.fields.locked" />
<BooleanField source="erased" sortable={false} label="resources.users.fields.erased" />
<DateField source="creation_ts" label="resources.users.fields.creation_ts_ms" showTime options={DATE_FORMAT} />
</DatagridConfigurable>
</List>