MM-57013 Added download button for downloading logs from server logs page in system console (#26389)

* added download system logs

* download all logs

* download all logs check-lint fix

* check lint fix

* download logs api

* download logs api working

* download logs working with error log

* linting issues and code cleanup

* CI check fix

* documented the api and logs from file with error handling

* test and final changes done

* final changes done

* Fix order of server-side translations

* Fix incorrect indentation of logs.yaml

---------

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Этот коммит содержится в:
Arya Khochare
2024-06-24 23:35:23 +05:30
коммит произвёл GitHub
родитель 71c25fb316
Коммит a8b18ac807
15 изменённых файлов: 187 добавлений и 26 удалений

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

@@ -44,7 +44,7 @@ func (a *App) GenerateSupportPacket(c request.CTX, options *model.SupportPacketO
}
if options.IncludeLogs {
functions["mattermost log"] = a.getMattermostLog
functions["mattermost log"] = a.GetMattermostLog
functions["notification log"] = a.getNotificationsLog
}
@@ -321,7 +321,7 @@ func (a *App) getNotificationsLog(_ request.CTX) (*model.FileData, error) {
return fileData, nil
}
func (a *App) getMattermostLog(_ request.CTX) (*model.FileData, error) {
func (a *App) GetMattermostLog(ctx request.CTX) (*model.FileData, error) {
if !*a.Config().LogSettings.EnableFile {
return nil, errors.New("Unable to retrieve mattermost.log because LogSettings: EnableFile is set to false")
}