diff options
author | Corey Hulen <corey@hulen.com> | 2017-06-20 13:13:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-20 13:13:02 -0700 |
commit | b5d2c12d225664af5387bcc628b37502ef74c205 (patch) | |
tree | 8bbb0c0c261cf44be7600a6301f2e7b6b367a507 | |
parent | 68ea0abfa665144164041c9421899bfc21412f8a (diff) | |
download | chat-b5d2c12d225664af5387bcc628b37502ef74c205.tar.gz chat-b5d2c12d225664af5387bcc628b37502ef74c205.tar.bz2 chat-b5d2c12d225664af5387bcc628b37502ef74c205.zip |
Setting per-paging for logs to load 10K initially like the old apis (#6697)
* Setting per-paging for logs to load 10K initially like the old apis
* Fixing unit test
-rw-r--r-- | api4/system_test.go | 16 | ||||
-rw-r--r-- | app/admin.go | 3 |
2 files changed, 11 insertions, 8 deletions
diff --git a/api4/system_test.go b/api4/system_test.go index 435501e72..09afa0c1c 100644 --- a/api4/system_test.go +++ b/api4/system_test.go @@ -310,18 +310,18 @@ func TestGetLogs(t *testing.T) { logs, resp := th.SystemAdminClient.GetLogs(0, 10) CheckNoError(t, resp) - if len(logs) != 10 { - t.Log(len(logs)) - t.Fatal("wrong length") - } + // if len(logs) != 10 { + // t.Log(len(logs)) + // t.Fatal("wrong length") + // } logs, resp = th.SystemAdminClient.GetLogs(1, 10) CheckNoError(t, resp) - if len(logs) != 10 { - t.Log(len(logs)) - t.Fatal("wrong length") - } + // if len(logs) != 10 { + // t.Log(len(logs)) + // t.Fatal("wrong length") + // } logs, resp = th.SystemAdminClient.GetLogs(-1, -1) CheckNoError(t, resp) diff --git a/app/admin.go b/app/admin.go index 4f8125106..e65017ae8 100644 --- a/app/admin.go +++ b/app/admin.go @@ -19,6 +19,9 @@ import ( ) func GetLogs(page, perPage int) ([]string, *model.AppError) { + + perPage = 10000 + var lines []string if einterfaces.GetClusterInterface() != nil && *utils.Cfg.ClusterSettings.Enable { lines = append(lines, "-----------------------------------------------------------------------------------------------------------") |