webclient: defer file list rendering

combined with server side processing I can now list a directory with
about 100.000 files in less than 2 seconds without losing client side
filtering and pagination
This commit is contained in:
Nicola Murino
2021-05-27 09:40:46 +02:00
parent 25a44030f9
commit 7a85c66ee7
9 changed files with 258 additions and 72 deletions

View File

@@ -1352,6 +1352,13 @@ func TestGetFilesInvalidClaims(t *testing.T) {
handleClientGetFiles(rr, req)
assert.Equal(t, http.StatusForbidden, rr.Code)
assert.Contains(t, rr.Body.String(), "Invalid token claims")
rr = httptest.NewRecorder()
req, _ = http.NewRequest(http.MethodGet, webClientDirContentsPath, nil)
req.Header.Set("Cookie", fmt.Sprintf("jwt=%v", token["access_token"]))
handleClientGetDirContents(rr, req)
assert.Equal(t, http.StatusForbidden, rr.Code)
assert.Contains(t, rr.Body.String(), "invalid token claims")
}
func TestManageKeysInvalidClaims(t *testing.T) {