[MM-54296] Admin Reporting for Users, new User Management screen (#26055)
* trial commit * [MM-56172] Integrate fetching and sorting of user reporting into the table component (#25749) * inint * lint * Update system_users.test.tsx.snap * cypress test fix * added pkg * revoke sessio into new compo * Update system_users.test.tsx.snap * trans * more disable * rename * Update system_users_dropdown.test.tsx * snap * Delete system_users_list.test.tsx.snap * Create system_users_list.test.tsx.snap * Delete system_users_list.test.tsx.snap * name2 * start removing the filter from the list * more clean * snaps * Update package-lock.json * des * Update index.scss * Update system_users_list.tsx * Update system_users_list.tsx * Update system_users.tsx * Update system_users_list.tsx * Update index.scss * menu * action menu * split * Update system_users_list.tsx * Update system_users_list_new.tsx * fix * Update en.json * temp remove * Update system_users.test.tsx.snap * Delete system_users_list.test.tsx.snap * Update en.json * ch * move * a * Update en.json * fix * Update system_users.test.tsx.snap * Update menu.tsx * Update admin_header.tsx * changes in the file system * fixes * integration begin * lint * Update rhs.ts * upper pagination * Update list_table.scss * pinned * more a11y * Update list_table.scss * i18n mor * design changes * descriptions * lint * loading states * fix * actions update * index fix * single action --------- Co-authored-by: Mattermost Build <build@mattermost.com> * [MM-56467] Clear up unused code of old systems users (#25855) * ccc * Update en.json * [MM-56478] Improve the user loading in user details page after changes in users list page in admin console (#25861) * init * tem * more fix * handlers clear up, team's fixes --------- Co-authored-by: Mattermost Build <build@mattermost.com> * Merge'd * [MM-56279] Add paging to user list (#25863) * Update system_users.tsx * Update system_users.tsx * [MM-56270] Hook up user actions menu, refactor modals to work with new menuing style (#25897) * Hookup menu items and modals * Add error handling, test fixes * Ensure modals animate properly * Add a bunch of TODOs around keeping the user data up to date * Fix i18n and snaps --------- Co-authored-by: Mattermost Build <build@mattermost.com> * [MM-56263] Enable selective column hiding for users table (#25898) * [MM-56539] Revisiting the design of the total users count on the left and in pagination in users table (#25947) * default sort order * default sort order (#25956) Co-authored-by: Mattermost Build <build@mattermost.com> * [MM-56267] Add search term filtering (#25952) * Include search term with request * Update user count with filtering * Oops * Add 500ms debounce to avoid spamming server with requests * PR feedback --------- Co-authored-by: Mattermost Build <build@mattermost.com> * [MM-56398] Add date range filter to user reporting table (#25974) * WIP * Some small adjustments * Two fixes * PR feedback * Remove menuitem --------- Co-authored-by: Mattermost Build <build@mattermost.com> * Merge'd * [MM-56615] Add messaging for MySQL instances around the post stats (#26036) * [MM-56261] Add export modals and hook up button to user management screen (#26015) * [MM-56576] Update users when actions occur and show errors when actions fail (#25951) * [MM-56576] Update users when actions occur and show errors when actions fail * Forgot the else * PR feedback * [MM-56617] Move action modals to ConfirmModalRedux * Add filters popover to the users admin table (#26042) * int * 0 zeros * dd * re * file move * Update system_users_filter_popover.scss * a * Update system_users_filter_popover.scss * role and status * fix * Update index.test.ts * overlay * Update dropdown_input.tsx * i * Update en.json * done * Update en.json * dd --------- Co-authored-by: Mattermost Build <build@mattermost.com> * Make column toggler column menu items consistent with table column names * Couple typo fixes * Fix i18n * some e2e related changes * Fixed issue where you couldn't queue multiple batch export jobs * Fix id tag * table header mis allignment issue solved * [MM-56727] Fix a TODO, fix Demote to guest should only appear when enabled * rev comments * Stop sending down all profile data * chore(e2e): Fix tests cases for new user Management ui (#26089) * chore(e2e): Fix lint issues in cypress tests * chore(e2e): Fix e2e tests - user_management_spec - authentication_method_spec * [MM-56710] Revert to in-memory compilation of CSV report * Update system_users.tsx * Merge'd * Fix test --------- Co-authored-by: M-ZubairAhmed <m-zubairahmed@protonmail.com> Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4f3eba381b
Коммит
03f71c9c84
@@ -52,7 +52,7 @@ import {
|
||||
ChannelSearchOpts,
|
||||
ServerChannel,
|
||||
} from '@mattermost/types/channels';
|
||||
import {Options, StatusOK, ClientResponse, LogLevel, FetchPaginatedThreadOptions, UserReportOptions, UserReportFilter} from '@mattermost/types/client4';
|
||||
import {Options, StatusOK, ClientResponse, LogLevel, FetchPaginatedThreadOptions} from '@mattermost/types/client4';
|
||||
import {Compliance} from '@mattermost/types/compliance';
|
||||
import {
|
||||
ClientConfig,
|
||||
@@ -136,8 +136,8 @@ import {
|
||||
UserStatus,
|
||||
GetFilteredUsersStatsOpts,
|
||||
UserCustomStatus,
|
||||
UserReport,
|
||||
} from '@mattermost/types/users';
|
||||
import {UserReport, UserReportFilter} from '@mattermost/types/reports';
|
||||
import {DeepPartial, RelationOneToOne} from '@mattermost/types/utilities';
|
||||
import {ProductNotices} from '@mattermost/types/product_notices';
|
||||
import {
|
||||
@@ -148,8 +148,10 @@ import {
|
||||
} from '@mattermost/types/data_retention';
|
||||
import {CompleteOnboardingRequest} from '@mattermost/types/setup';
|
||||
import {UserThreadList, UserThread, UserThreadWithPost} from '@mattermost/types/threads';
|
||||
import {UserReportOptions} from '@mattermost/types/reports'
|
||||
import {UsersLimits} from '@mattermost/types/limits';
|
||||
|
||||
|
||||
import {cleanUrlForLogging} from './errors';
|
||||
import {buildQueryString} from './helpers';
|
||||
import {TelemetryHandler} from './telemetry';
|
||||
|
||||
@@ -37,28 +37,3 @@ export type FetchPaginatedThreadOptions = {
|
||||
fromCreateAt?: number;
|
||||
fromPost?: string;
|
||||
}
|
||||
|
||||
export enum ReportDuration {
|
||||
Last30Days = 'last_30_days',
|
||||
PreviousMonth = 'previous_month',
|
||||
Last6Months = 'last_6_months',
|
||||
}
|
||||
|
||||
export type UserReportFilter = {
|
||||
role_filter?: string,
|
||||
has_no_team?: boolean,
|
||||
team_filter?: string,
|
||||
hide_active?: boolean,
|
||||
hide_inactive?: boolean,
|
||||
searchTerm?: string,
|
||||
}
|
||||
|
||||
export type UserReportOptions = UserReportFilter & {
|
||||
sort_column: 'CreateAt' | 'Username' | 'FirstName' | 'LastName' | 'Nickname' | 'Email',
|
||||
page_size: number,
|
||||
sort_direction?: 'asc' | 'desc',
|
||||
direction?: 'up' | 'down',
|
||||
date_range?: ReportDuration,
|
||||
from_column_value?: string,
|
||||
from_id?: string,
|
||||
}
|
||||
|
||||
84
webapp/platform/types/src/reports.ts
Обычный файл
84
webapp/platform/types/src/reports.ts
Обычный файл
@@ -0,0 +1,84 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {UserProfile} from './users';
|
||||
|
||||
export enum UserReportSortColumns {
|
||||
username = "Username",
|
||||
email = "Email",
|
||||
createAt = "CreateAt",
|
||||
firstName = "FirstName",
|
||||
lastName = "LastName",
|
||||
nickname = "Nickname",
|
||||
}
|
||||
|
||||
export enum ReportSortDirection {
|
||||
ascending = "asc",
|
||||
descending = "desc",
|
||||
}
|
||||
|
||||
export enum ReportDuration {
|
||||
AllTime = "all_time",
|
||||
Last30Days = "last_30_days",
|
||||
PreviousMonth = "previous_month",
|
||||
Last6Months = "last_6_months",
|
||||
}
|
||||
|
||||
export enum CursorPaginationDirection {
|
||||
'prev' = 'prev',
|
||||
'next' = 'next',
|
||||
}
|
||||
|
||||
export type UserReportFilter = {
|
||||
role_filter?: string,
|
||||
has_no_team?: boolean,
|
||||
team_filter?: string,
|
||||
hide_active?: boolean,
|
||||
hide_inactive?: boolean,
|
||||
search_term?: string,
|
||||
}
|
||||
|
||||
export type UserReportOptions = UserReportFilter & {
|
||||
page_size?: number;
|
||||
|
||||
// Following are optional sort parameters
|
||||
/**
|
||||
* The column to sort on. Provide the id of the column. Use the UserReportSortColumns enum.
|
||||
*/
|
||||
sort_column?: UserReportSortColumns;
|
||||
|
||||
/**
|
||||
* The sort direction to use. Either "asc" or "desc". Use the ReportSortDirection enum.
|
||||
*/
|
||||
sort_direction?: ReportSortDirection;
|
||||
|
||||
// Following are optional pagination parameters
|
||||
/**
|
||||
* The direction to paginate in. Either "up" or "down". Use the CursorPaginationDirection enum.
|
||||
*/
|
||||
direction?: CursorPaginationDirection,
|
||||
|
||||
/**
|
||||
* The cursor to paginate from.
|
||||
*/
|
||||
from_column_value?: string;
|
||||
|
||||
/**
|
||||
* The id of the user to paginate from.
|
||||
*/
|
||||
from_id?: string;
|
||||
|
||||
// Following are optional filters
|
||||
/**
|
||||
* The duration to filter by. Use the ReportDuration enum.
|
||||
*/
|
||||
date_range?: ReportDuration;
|
||||
};
|
||||
|
||||
export type UserReport = UserProfile & {
|
||||
last_login_at: number;
|
||||
last_status_at?: number;
|
||||
last_post_date?: number;
|
||||
days_active?: number;
|
||||
total_posts?: number;
|
||||
}
|
||||
@@ -143,11 +143,3 @@ export type GetFilteredUsersStatsOpts = {
|
||||
export type AuthChangeResponse = {
|
||||
follow_link: string;
|
||||
};
|
||||
|
||||
export type UserReport = UserProfile & {
|
||||
last_login_at: number;
|
||||
last_status_at?: number;
|
||||
last_post_date?: number;
|
||||
days_active?: number;
|
||||
total_posts?: number;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user