Skip to content
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

fix(ui): calculating recordCount without undefined #1838

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion client/src/containers/Topic/Topic/TopicData/TopicData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ class TopicData extends Root {
lastPercentVal = lastResult.percent;
self.setState({
nextPage: lastResult.after ? lastResult.after : self.state.nextPage,
recordCount: self.state.recordCount + lastResult.records.length,
recordCount:
self.state.recordCount + (lastResult.records ? lastResult.records.length : 0),
percent: lastResult.percent.toFixed(2)
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { uriTopicsGroups } from '../../../../utils/endpoints';
import constants from '../../../../utils/constants';
import Root from '../../../../components/Root';
import { Link } from 'react-router-dom';
import {withRouter} from "../../../../utils/withRouter.jsx";
import { withRouter } from '../../../../utils/withRouter.jsx';

class TopicGroups extends Root {
state = {
Expand Down
3 changes: 2 additions & 1 deletion client/src/containers/Topic/TopicCreate/TopicCreate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class TopicCreate extends Form {
partition: formData.partition,
replication: formData.replication,
configs: {
'cleanup.policy': formData.cleanup === 'deleteAndCompact' ? 'compact,delete' : formData.cleanup,
'cleanup.policy':
formData.cleanup === 'deleteAndCompact' ? 'compact,delete' : formData.cleanup,
'retention.ms': formData.retention
}
};
Expand Down
2 changes: 1 addition & 1 deletion client/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd(), '')
const env = loadEnv(mode, process.cwd(), '');

return {
base: '/ui',
Expand Down
Loading