tju-yxq opened a new pull request, #2425:
URL: https://github.com/apache/rocketmq-dashboard/pull/2425

   ## Why
   
   #2306 gave the backend a bounded cloud-credential inventory:
   
   ```text
   GET /api/cloud-credentials?vendor=&search=&page=&pageSize=
   ```
   
   The repository applies vendor/name filtering and page bounds at the SQL 
layer and returns `PageResult<CloudCredentialVO>`.
   
   The Settings page did not consume that contract. It requested only the 
default first page, unwrapped `result.items`, and rendered the table with 
`pagination={false}`. Credentials beyond the first 20 rows could not be 
reached, and the API's vendor/name filters were not exposed to the user. Create 
and delete also only patched the local first-page array.
   
   Closes #2424.
   
   ## What changes
   
   The Cloud Credential tab is now a real inventory view:
   
   - vendor filter (`ALIYUN` / `TENCENT`);
   - debounced name search;
   - server-side pagination with 20/50/100 page-size options;
   - server-provided total row count;
   - filters reset the page to 1;
   - request sequencing prevents a stale response from overwriting a newer 
filter result;
   - if the current page becomes empty while later rows still exist, the page 
moves to the latest valid page;
   - creating a credential refreshes the server page instead of appending to an 
unbounded local list;
   - updating a credential still replaces the row with the masked server 
response;
   - deleting the last row on a later page moves to the previous page;
   - the existing masked AccessKey and write-only SecretKey behavior is 
unchanged.
   
   ## Size
   
   Production/UI code, excluding tests:
   
   - 112 additions
   - 22 deletions
   
   Complete PR, including tests:
   
   - 187 additions
   - 28 deletions
   
   The production change exceeds 100 lines naturally from the full 
filter/pagination/race/mutation flow, not from test padding.
   
   ## Verification
   
   Focused tests:
   
   ```text
   npm test -- src/pages/settings/__tests__/CloudCredentialTab.test.tsx 
src/api/cloudCredential.test.ts
   2 files
   10 tests
   all passed
   ```
   
   Full frontend suite:
   
   ```text
   npm test
   94 test files
   636 tests
   all passed
   ```
   
   Build:
   
   ```text
   npm run build
   success
   ```
   
   Lint:
   
   ```text
   npm run lint
   0 errors
   1 pre-existing react-hooks warning in src/pages/instance/topic.tsx
   ```
   
   Targeted ESLint and Prettier checks pass. `git diff --check` passes.
   
   Tests cover:
   
   - initial page/pageSize request;
   - vendor and debounced search filters resetting to page 1;
   - stale-response suppression after a filter change;
   - create/update/delete refreshing the canonical server page;
   - existing masked-key and modal behavior.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to