Fix consumer groups & partitions (#650)
This commit is contained in:
parent
bf6dd6c91b
commit
7eaa733623
3 changed files with 5 additions and 7 deletions
|
@ -16,7 +16,7 @@ import ListItem from './ListItem';
|
|||
|
||||
export interface Props extends ConsumerGroup, ConsumerGroupDetails {
|
||||
clusterName: ClusterName;
|
||||
consumers?: ConsumerGroupTopicPartition[];
|
||||
partitions?: ConsumerGroupTopicPartition[];
|
||||
isFetched: boolean;
|
||||
isDeleted: boolean;
|
||||
fetchConsumerGroupDetails: (
|
||||
|
@ -29,7 +29,7 @@ export interface Props extends ConsumerGroup, ConsumerGroupDetails {
|
|||
const Details: React.FC<Props> = ({
|
||||
clusterName,
|
||||
groupId,
|
||||
consumers,
|
||||
partitions,
|
||||
isFetched,
|
||||
isDeleted,
|
||||
fetchConsumerGroupDetails,
|
||||
|
@ -38,7 +38,7 @@ const Details: React.FC<Props> = ({
|
|||
React.useEffect(() => {
|
||||
fetchConsumerGroupDetails(clusterName, groupId);
|
||||
}, [fetchConsumerGroupDetails, clusterName, groupId]);
|
||||
const items = consumers || [];
|
||||
const items = partitions || [];
|
||||
const [isConfirmationModelVisible, setIsConfirmationModelVisible] =
|
||||
React.useState<boolean>(false);
|
||||
const history = useHistory();
|
||||
|
|
|
@ -20,7 +20,7 @@ describe('Details component', () => {
|
|||
isDeleted={false}
|
||||
fetchConsumerGroupDetails={jest.fn()}
|
||||
deleteConsumerGroup={jest.fn()}
|
||||
consumers={[
|
||||
partitions={[
|
||||
{
|
||||
consumerId:
|
||||
'consumer-messages-consumer-1-122fbf98-643b-491d-8aec-c0641d2513d0',
|
||||
|
|
|
@ -332,9 +332,7 @@ export const fetchTopicConsumerGroups =
|
|||
...state.byName,
|
||||
[topicName]: {
|
||||
...state.byName[topicName],
|
||||
consumerGroups: {
|
||||
...consumerGroups,
|
||||
},
|
||||
consumerGroups,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue