8000 loading all topics to produce to topic UI #1824 by jacek-bukowski · Pull Request #1825 · tchiotludo/akhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

loading all topics to produce to topic UI #1824 #1825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions client/src/containers/Topic/TopicProduce/TopicProduce.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
uriTopics,
uriTopicsPartitions,
uriTopicsProduce,
uriAllSchema
uriAllSchema, uriTopicsName
} from '../../../utils/endpoints';
import moment from 'moment';
import DatePicker from '../../../components/DatePicker';
Expand Down Expand Up @@ -101,19 +101,12 @@ class TopicProduce extends Form {
async initAvailableTopics() {
const { clusterId } = this.props.params;

const topics = [];
let page = 0;
let topicResponseData = {};
do {
page = page + 1;
topicResponseData = await this.getApi(uriTopics(clusterId, '', '', page)).then(
res => res.data
);
topicResponseData.results.forEach(topicData => topics.push(topicData.name));
} while (page < topicResponseData.pages);

this.setState({
topics
this.getApi(uriTopicsName(clusterId))
.then(res => {
this.setState({ topics: res.data });
})
.catch(err => {
console.error('Error:', err);
});
}

Expand Down
Loading
0