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>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
71c25fb316
Коммит
a8b18ac807
@@ -347,7 +347,7 @@ func TestGetMattermostLog(t *testing.T) {
|
||||
*cfg.LogSettings.EnableFile = false
|
||||
})
|
||||
|
||||
fileData, err := th.App.getMattermostLog(th.Context)
|
||||
fileData, err := th.App.GetMattermostLog(th.Context)
|
||||
assert.Nil(t, fileData)
|
||||
assert.ErrorContains(t, err, "Unable to retrieve mattermost.log because LogSettings: EnableFile is set to false")
|
||||
|
||||
@@ -367,7 +367,7 @@ func TestGetMattermostLog(t *testing.T) {
|
||||
logLocation := config.GetLogFileLocation(dir)
|
||||
|
||||
// There is no mattermost.log file yet, so this fails
|
||||
fileData, err = th.App.getMattermostLog(th.Context)
|
||||
fileData, err = th.App.GetMattermostLog(th.Context)
|
||||
assert.Nil(t, fileData)
|
||||
assert.ErrorContains(t, err, "failed read mattermost log file at path "+logLocation)
|
||||
|
||||
@@ -376,7 +376,7 @@ func TestGetMattermostLog(t *testing.T) {
|
||||
err = os.WriteFile(logLocation, d1, 0777)
|
||||
require.NoError(t, err)
|
||||
|
||||
fileData, err = th.App.getMattermostLog(th.Context)
|
||||
fileData, err = th.App.GetMattermostLog(th.Context)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, fileData)
|
||||
assert.Equal(t, "mattermost.log", fileData.Filename)
|
||||
|
||||
Ссылка в новой задаче
Block a user