Skip to content

Commit

Permalink
Don't use withStat=true on the first server-list GraphQL request. (#2288
Browse files Browse the repository at this point in the history
)

Also, don't request boxinfo with the withStat=false parameter. (#2287)
  • Loading branch information
usenko-timur authored Nov 28, 2024
1 parent b8d3e03 commit ffdb1ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions webui/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.8.0
7 changes: 4 additions & 3 deletions webui/src/models/cluster/server-list/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ createTimeoutFx('ServerListTimeoutFx', {
source: $serverList.map((state) => selectors.unConfiguredServerList(state).length > 0),
timeout: (): number => app.variables.cartridge_refresh_interval(),
effect: (counter: number, _, hasUnConfiguredServers): Promise<void> => {
return queryServerListFx({
withStats: counter % app.variables.cartridge_stat_period() === 0 || Boolean(hasUnConfiguredServers),
}).then(voidL);
const cnt = counter - 1;
const withStats =
cnt > -1 && (cnt % app.variables.cartridge_stat_period() === 0 || Boolean(hasUnConfiguredServers));
return queryServerListFx({ withStats }).then(voidL);
},
});

Expand Down
2 changes: 1 addition & 1 deletion webui/src/store/request/queries.graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export const listQuery = gql`
name
value
}
boxinfo {
boxinfo @include(if: $withStats) {
general {
ro
}
Expand Down

0 comments on commit ffdb1ee

Please sign in to comment.