zhaohai666 opened a new pull request, #475:
URL: https://github.com/apache/rocketmq-dashboard/pull/475
## Summary
Add a new page to query producer client connections, supporting lookup by
specified Topic and Producer Group. The page route is `/studio/producer`.
## File Changes
| File | Change Type | Description |
|------|-------------|-------------|
| web/src/pages/studio/Producer.tsx | New | Producer connection query page,
including Topic selector, Producer Group input and connection data table |
| web/src/api/producer.ts | New | 2 API functions (`fetchTopicList`,
`queryProducerConnection`) + `ProducerConnection` TypeScript interface |
| web/src/api/producer.test.ts | New | 4 unit test cases covering Topic list
fetch and producer connection query logic |
| web/src/App.tsx | Modified | Import ProducerPage and register
`/studio/producer` route |
| web/src/i18n/translations.ts | Modified | Add 7 i18n keys:
`producer.title`, `producer.language`, `producer.selectTopic`,
`producer.inputGroup`, `producer.fetchTopicFailed`,
`producer.fetchConnectionFailed`, `producer.noConnections` |
## Feature Details
### Query Form
- Topic dropdown selector with search filter; auto-fetch alphabetically
sorted Topic list on page mount
- Text input for entering Producer Group name
- Search button to trigger connection lookup
### Connection Table
Table columns: Client ID, Client Address, Language, Version
- Show empty placeholder text when no producer connections exist
- Display error toast when query request fails
## API Specifications
| Function Name | HTTP Method | Endpoint | Params | Return Value |
|---------------|-------------|----------|--------|--------------|
| fetchTopicList | GET | /topics | None | Alphabetically sorted string[] of
topic names |
| queryProducerConnection | GET | /producer/connection | topic,
producerGroup | ProducerConnection[] |
### ProducerConnection Interface
```typescript
{
clientId: string;
clientAddr: string;
language: string;
versionDesc: string;
}
--
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]