Skip to content

Commit

Permalink
fix(ui): calculating recordCount without undefined (#1838)
Browse files Browse the repository at this point in the history
fixes #1837
  • Loading branch information
jonasvoelcker authored Jun 27, 2024
1 parent 1235dee commit d7dd14b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
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

0 comments on commit d7dd14b

Please sign in to comment.