[MM-55014][MM-55015] Add last login timestamp for users, add materialized view and refresh job to keep track of post stats for Postgres (#25152)

* [MM-55014][MM-55015] Add last login timestamp for users, add materialized view and refresh job for Postgres

* Check fixes

* Fix type issue

* Add verification that lastlogin was updated

* PR feedback

* Morge'd

* Morge'd again

* Merge'd

* Update admin setting strings

* WIP

* PR feedback

* Oops

* Fix i18n

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Devin Binnie
2023-11-14 11:26:27 -05:00
коммит произвёл GitHub
родитель 41c08a3715
Коммит 1bd72bdb99
27 изменённых файлов: 356 добавлений и 25 удалений

Просмотреть файл

@@ -2464,6 +2464,17 @@ const AdminDefinition: AdminDefinitionType = {
it.licensedForSku(LicenseSkus.Professional),
)),
},
{
type: 'text',
key: 'ServiceSettings.RefreshPostStatsRunTime',
label: t('admin.team.refreshPostStatsRunTimeTitle'),
label_default: 'User Statistics Update Time:',
help_text: t('admin.team.refreshPostStatsRunTimeDescription'),
help_text_default: "Set the server time for updating the user post statistics, including each user's total post count and the timestamp of their most recent post. Must be a 24-hour time stamp in the form HH:MM based on the local time of the server.",
placeholder: t('admin.team.refreshPostStatsRunTimeExample'),
placeholder_default: 'E.g.: "00:00"',
isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.SITE.USERS_AND_TEAMS)),
},
],
},
},

Просмотреть файл

@@ -2550,6 +2550,9 @@
"admin.team.noBrandImage": "No brand image uploaded",
"admin.team.openServerDescription": "When true, anyone can signup for a user account on this server without the need to be invited.",
"admin.team.openServerTitle": "Enable Open Server: ",
"admin.team.refreshPostStatsRunTimeDescription": "Set the server time for updating the user post statistics, including each user's total post count and the timestamp of their most recent post. Must be a 24-hour time stamp in the form HH:MM based on the local time of the server.",
"admin.team.refreshPostStatsRunTimeExample": "E.g.: \"00:00\"",
"admin.team.refreshPostStatsRunTimeTitle": "User Statistics Update Time:",
"admin.team.removeBrandImage": "Remove brand image",
"admin.team.restrict_direct_message_any": "Any user on the Mattermost server",
"admin.team.restrict_direct_message_team": "Any member of the team",

Просмотреть файл

@@ -378,6 +378,7 @@ export type ServiceSettings = {
PersistentNotificationIntervalMinutes: number;
PersistentNotificationMaxCount: number;
PersistentNotificationMaxRecipients: number;
RefreshPostStatsRunTime: string;
};
export type TeamSettings = {