@@ -323,7 +323,9 @@ const Filters: React.FC<FiltersProps> = ({
// eslint-disable-next-line consistent-return
React.useEffect(() => {
if (location.search?.length !== 0) {
- const url = `${BASE_PARAMS.basePath}/api/clusters/${clusterName}/topics/${topicName}/messages${location.search}`;
+ const url = `${BASE_PARAMS.basePath}/api/clusters/${encodeURIComponent(
+ clusterName
+ )}/topics/${topicName}/messages${location.search}`;
const sse = new EventSource(url);
source.current = sse;
@@ -90,7 +90,9 @@ export const useKsqlkDbSSE = ({ clusterName, pipeId }: UseKsqlkDbSSEProps) => {
const fetchData = async () => {
- const url = `${BASE_PARAMS.basePath}/api/clusters/${clusterName}/ksql/response`;
+ )}/ksql/response`;
await fetchEventSource(
`${url}?${new URLSearchParams({ pipeId: pipeId || '' }).toString()}`,
{
@@ -51,7 +51,9 @@ export const useTopicMessages = ({
setIsFetching(true);
- const url = `${BASE_PARAMS.basePath}/api/clusters/${clusterName}/topics/${topicName}/messages`;
+ )}/topics/${topicName}/messages`;
const requestParams = new URLSearchParams({
limit,
seekTo: seekTo.replaceAll('-', '::').replaceAll('.', ','),