
* Refactor TopicMessages's store to redux/toolkit * adding test cases to improve coverage * fixing eslint error * removing extra code * Transform redux connect reducer and actions into toolkit slice. (#1883) * integrate redux toolkit for connects * uncomment test case * remove unnecessary comment * reduce duplication * Implement code highlighting for smart filters (#1868) * Implement code highlighting for smart filters * delete unnecessary code * fixing eslint problem * fixing sonar code smells (#1826) * fixing sonar code smells * removing unnecessary change * fixing some sonar code smell issues * making requested changes * Fix sonar badges in readme (#1906) * fixing merge conflicts Co-authored-by: Oleg Shur <workshur@gmail.com> * Add positive notifications after some successful actions. (#1830) * add some positive notifications after successful actions * some improvements * improve alerts reducer tests * Fix test warnings (#1908) * fix fetch mock warnings in brokers.spec.tsx * use separate waitFor-s for fetch-mock call expects * Persist show internal topics switch state (#1832) * persist show internal topics switch state * minor improvements in topics list tests * prevent duplication in topic list test file * fix seek type select border-radius and user-select (#1904) * Refetch topics list to display the updated data (#1900) * refetch topics list to display the updated data * fixing sonar code smells (#1826) * fixing sonar code smells * removing unnecessary change * fixing some sonar code smell issues * making requested changes * Fix sonar badges in readme (#1906) Co-authored-by: Robert Azizbekyan <103438454+rAzizbekyan@users.noreply.github.com> Co-authored-by: Oleg Shur <workshur@gmail.com> * Show confirmation modal when clear messages is clicked in topics list (#1899) * show confirmation modal when clear messages is clicked in topics list * change variable name * add missing dependencies * use useModal hook for topics list modals * display a human-readable error message for topic custom parameers value field (#1896) * modify dependencies to fix partitions filter bug (#1901) Co-authored-by: Arsen Simonyan <103444767+simonyandev@users.noreply.github.com> Co-authored-by: Oleg Shur <workshur@gmail.com>
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import { connect } from 'react-redux';
|
|
import { ClusterName, RootState, TopicName } from 'redux/interfaces';
|
|
import { withRouter, RouteComponentProps } from 'react-router-dom';
|
|
import { deleteTopic, recreateTopic } from 'redux/actions';
|
|
import { clearTopicMessages } from 'redux/reducers/topicMessages/topicMessagesSlice';
|
|
import {
|
|
getIsTopicDeleted,
|
|
getIsTopicDeletePolicy,
|
|
getIsTopicInternal,
|
|
} from 'redux/reducers/topics/selectors';
|
|
|
|
import Details from './Details';
|
|
|
|
interface RouteProps {
|
|
clusterName: ClusterName;
|
|
topicName: TopicName;
|
|
}
|
|
|
|
type OwnProps = RouteComponentProps<RouteProps>;
|
|
|
|
const mapStateToProps = (
|
|
state: RootState,
|
|
{
|
|
match: {
|
|
params: { topicName, clusterName },
|
|
},
|
|
}: OwnProps
|
|
) => ({
|
|
clusterName,
|
|
topicName,
|
|
isInternal: getIsTopicInternal(state, topicName),
|
|
isDeleted: getIsTopicDeleted(state),
|
|
isDeletePolicy: getIsTopicDeletePolicy(state, topicName),
|
|
});
|
|
|
|
const mapDispatchToProps = {
|
|
recreateTopic,
|
|
deleteTopic,
|
|
clearTopicMessages,
|
|
};
|
|
|
|
export default withRouter(
|
|
connect(mapStateToProps, mapDispatchToProps)(Details)
|
|
);
|