mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-18 11:15:12 +00:00
fix(console): reduce initial load time (#8273)
This reduces the initial payload of the `listMyProjectOrgs` to get the active org by setting the limit of the initial orgs to 100. Partial of #8272 --------- Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
Livio Spring
parent
0e99c8356a
commit
215dbf0cf6
+5
-3
@@ -26,6 +26,8 @@ export enum UserTarget {
|
||||
EXTERNAL = 'external',
|
||||
}
|
||||
|
||||
const USER_LIMIT = 25;
|
||||
|
||||
@Component({
|
||||
selector: 'cnsl-search-user-autocomplete',
|
||||
templateUrl: './search-user-autocomplete.component.html',
|
||||
@@ -67,9 +69,9 @@ export class SearchUserAutocompleteComponent implements OnInit, AfterContentChec
|
||||
// feat-3916 show users as soon as I am in the input field of the user
|
||||
const query = new SearchQuery();
|
||||
const lnQuery = new LoginNameQuery();
|
||||
lnQuery.setMethod(TextQueryMethod.TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE);
|
||||
lnQuery.setMethod(TextQueryMethod.TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE);
|
||||
query.setLoginNameQuery(lnQuery);
|
||||
this.userService.listUsers(10, 0, [query]).then((users) => {
|
||||
this.userService.listUsers(USER_LIMIT, 0, [query]).then((users) => {
|
||||
this.filteredUsers = users.resultList;
|
||||
});
|
||||
|
||||
@@ -97,7 +99,7 @@ export class SearchUserAutocompleteComponent implements OnInit, AfterContentChec
|
||||
query.setLoginNameQuery(lnQuery);
|
||||
|
||||
if (this.target === UserTarget.SELF) {
|
||||
return from(this.userService.listUsers(10, 0, [query]));
|
||||
return from(this.userService.listUsers(USER_LIMIT, 0, [query]));
|
||||
} else {
|
||||
return of();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user