Skip to content

[ISSUE #14115] Fix console-ui pagination reset to 0 instead of 1 on API error#14121

Merged
KomachiSion merged 1 commit into
alibaba:developfrom
cxhello:fix/console-ui-pagination-reset-issue-14115
Jan 20, 2026
Merged

[ISSUE #14115] Fix console-ui pagination reset to 0 instead of 1 on API error#14121
KomachiSion merged 1 commit into
alibaba:developfrom
cxhello:fix/console-ui-pagination-reset-issue-14115

Conversation

@cxhello

@cxhello cxhello commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #14115

What is the purpose of the change

Fix the pagination bug in console-ui where currentPage was incorrectly reset to 0 instead of 1 when API requests fail. This caused subsequent API calls to use pageNo=0, which is invalid since pagination starts from 1.

Brief changelog

  • Fix currentPage: 0currentPage: 1 in error handlers:
    • ServiceList.js: service list query error handler
    • ClusterNodeList.js: cluster node list query error handler
    • ConfigurationManagement.js: config clone/import error handlers (2 places)

Verifying this change

  1. Login with a user who lacks permissions for the "public" namespace
  2. Verify that when receiving a 403 error, the page number is correctly reset to 1
  3. Switch to an accessible namespace and verify pagination works correctly

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.

…ibaba#14115)

When API requests fail (e.g., 403 permission error), the pagination
state was incorrectly reset to currentPage: 0. This caused subsequent
API calls to use pageNo=0, which is invalid since pagination starts
from 1.

Fixed in the following components:
- ServiceList: service list query error handler
- ClusterNodeList: cluster node list query error handler
- ConfigurationManagement: config clone/import error handlers

Signed-off-by: cxhello <caixiaohuichn@gmail.com>
@github-actions

Copy link
Copy Markdown

Thanks for your this PR. 🙏
Please check again for your PR changes whether contains any usage/api/configuration change such as Add new API , Add new configuration, Change default value of configuration.
If so, please add or update documents(markdown type) in docs/next/ for repository nacos-group/nacos-group.github.io


感谢您提交的PR。 🙏
请再次查看您的PR内容,确认是否包含任何使用方式/API/配置参数的变更,如:新增API新增配置参数修改默认配置等操作。
如果是,请确保在提交之前,在仓库nacos-group/nacos-group.github.io中的docs/next/目录下添加或更新文档(markdown格式)。

@KomachiSion
KomachiSion merged commit 8e402ae into alibaba:develop Jan 20, 2026
2 checks passed
@KomachiSion KomachiSion added area/Nacos console Related to Nacos consle kind/bug Category issues or prs related to bug. labels Jan 20, 2026
@KomachiSion KomachiSion added this to the 3.1.2 milestone Jan 20, 2026
shiyiyue1102 pushed a commit to shiyiyue1102/nacos that referenced this pull request Jan 20, 2026
…ibaba#14115) (alibaba#14121)

When API requests fail (e.g., 403 permission error), the pagination
state was incorrectly reset to currentPage: 0. This caused subsequent
API calls to use pageNo=0, which is invalid since pagination starts
from 1.

Fixed in the following components:
- ServiceList: service list query error handler
- ClusterNodeList: cluster node list query error handler
- ConfigurationManagement: config clone/import error handlers

Signed-off-by: cxhello <caixiaohuichn@gmail.com>
KomachiSion pushed a commit that referenced this pull request Feb 4, 2026
…4115) (#14121)

When API requests fail (e.g., 403 permission error), the pagination
state was incorrectly reset to currentPage: 0. This caused subsequent
API calls to use pageNo=0, which is invalid since pagination starts
from 1.

Fixed in the following components:
- ServiceList: service list query error handler
- ClusterNodeList: cluster node list query error handler
- ConfigurationManagement: config clone/import error handlers

Signed-off-by: cxhello <caixiaohuichn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/Nacos console Related to Nacos consle kind/bug Category issues or prs related to bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3.1.1版本console-ui 服务列表,列表出错会把初始化的pageno设置为 0,而不是1

2 participants