[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
@@ -54,8 +54,8 @@ func (a *App) CompileReportChunks(format string, prefix string, numberOfChunks i
|
||||
func (a *App) compileCSVChunks(prefix string, numberOfChunks int, headers []string) *model.AppError {
|
||||
filePath := makeCompiledFilePath(prefix, "csv")
|
||||
|
||||
var headerBuf bytes.Buffer
|
||||
w := csv.NewWriter(&headerBuf)
|
||||
var compiledBuf bytes.Buffer
|
||||
w := csv.NewWriter(&compiledBuf)
|
||||
err := w.Write(headers)
|
||||
if err != nil {
|
||||
return model.NewAppError("compileCSVChunks", "app.compile_csv_chunks.header_error", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
@@ -64,10 +64,6 @@ func (a *App) compileCSVChunks(prefix string, numberOfChunks int, headers []stri
|
||||
if err = w.Error(); err != nil {
|
||||
return model.NewAppError("saveCSVChunk", "app.save_csv_chunk.write_error", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
}
|
||||
_, appErr := a.WriteFile(&headerBuf, filePath)
|
||||
if appErr != nil {
|
||||
return appErr
|
||||
}
|
||||
|
||||
for i := 0; i < numberOfChunks; i++ {
|
||||
chunkFilePath := makeFilePath(prefix, i, "csv")
|
||||
@@ -75,11 +71,17 @@ func (a *App) compileCSVChunks(prefix string, numberOfChunks int, headers []stri
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err = a.AppendFile(bytes.NewReader(chunk), filePath); err != nil {
|
||||
_, writeErr := compiledBuf.Write(chunk)
|
||||
if writeErr != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
_, appErr := a.WriteFile(&compiledBuf, filePath)
|
||||
if appErr != nil {
|
||||
return appErr
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -230,7 +232,7 @@ func (a *App) StartUsersBatchExport(rctx request.CTX, dateRange string, startAt
|
||||
}
|
||||
}
|
||||
|
||||
_, err = a.Srv().Jobs.CreateJobOnce(rctx, model.JobTypeExportUsersToCSV, options)
|
||||
_, err = a.Srv().Jobs.CreateJob(rctx, model.JobTypeExportUsersToCSV, options)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ func (u *UserReportOptions) IsValid() *AppError {
|
||||
}
|
||||
|
||||
func (u *UserReportQuery) ToReport() *UserReport {
|
||||
u.ClearNonProfileFields()
|
||||
return &UserReport{
|
||||
User: u.User,
|
||||
UserPostStats: u.UserPostStats,
|
||||
|
||||
Ссылка в новой задаче
Block a user