[MM-31790] Support Packet Generation BACKEND (#16667)
* init commit * clean up the code * make mocks * fix translations * mocks and lint fixes * add tests * little fixes * Update i18n/en.json Co-authored-by: Scott Bishel <scott.bishel@mattermost.com> * Update i18n/en.json Co-authored-by: Scott Bishel <scott.bishel@mattermost.com> * Update i18n/en.json Co-authored-by: Scott Bishel <scott.bishel@mattermost.com> * Update i18n/en.json Co-authored-by: Scott Bishel <scott.bishel@mattermost.com> * Update i18n/en.json Co-authored-by: Scott Bishel <scott.bishel@mattermost.com> * Address Comments * fix i18n * update api endpoint * add enable file and file level for conditional show of banner * Address Comments * Make it more clear about returns * Create zip file utility function * update en.json * address comments * write tests * check for data in test * remove warning string * Correct expected and actual * set database through environment variables * reset environment variable at end of test Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Этот коммит содержится в:
@@ -3278,6 +3278,21 @@ func (c *Client4) GetFileInfosForPost(postId string, etag string) ([]*FileInfo,
|
||||
|
||||
// General/System Section
|
||||
|
||||
// GenerateSupportPacket downloads the generated support packet
|
||||
func (c *Client4) GenerateSupportPacket() ([]byte, *Response) {
|
||||
r, appErr := c.DoApiGet(c.GetSystemRoute()+"/support_packet", "")
|
||||
if appErr != nil {
|
||||
return nil, BuildErrorResponse(r, appErr)
|
||||
}
|
||||
defer closeBody(r)
|
||||
|
||||
data, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
return nil, BuildErrorResponse(r, NewAppError("GetFile", "model.client.read_job_result_file.app_error", nil, err.Error(), r.StatusCode))
|
||||
}
|
||||
return data, BuildResponse(r)
|
||||
}
|
||||
|
||||
// GetPing will return ok if the running goRoutines are below the threshold and unhealthy for above.
|
||||
func (c *Client4) GetPing() (string, *Response) {
|
||||
r, err := c.DoApiGet(c.GetSystemRoute()+"/ping", "")
|
||||
|
||||
Ссылка в новой задаче
Block a user