Skip to content

Commit

Permalink
Merge branch 'main' of github.com:kafbat/kafka-ui into kafbat/203
Browse files Browse the repository at this point in the history
  • Loading branch information
Leshe4ka committed May 17, 2024
2 parents dd93106 + 5d7cc23 commit 94f3640
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 29 deletions.
8 changes: 4 additions & 4 deletions documentation/compose/kafbat-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ services:
- "9093:9092"
- "9998:9998"
environment:
KAFKA_BROKER_ID: 1
KAFKA_BROKER_ID: 2
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka1:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_JMX_PORT: 9998
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9998
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka1 -Dcom.sun.management.jmxremote.rmi.port=9998
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_NODE_ID: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka1:29093'
KAFKA_NODE_ID: 2
KAFKA_CONTROLLER_QUORUM_VOTERS: '2@kafka1:29093'
KAFKA_LISTENERS: 'PLAINTEXT://kafka1:29092,CONTROLLER://kafka1:29093,PLAINTEXT_HOST://0.0.0.0:9092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"react-hot-toast": "2.4.1",
"react-is": "18.2.0",
"react-multi-select-component": "4.3.4",
"react-router-dom": "6.4.3",
"react-router-dom": "6.23.0",
"sass": "1.66.1",
"styled-components": "6.1.8",
"use-debounce": "10.0.0",
Expand Down
28 changes: 14 additions & 14 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/src/components/Topics/shared/Form/TopicForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const TopicForm: React.FC<Props> = ({
id="topicFormRetentionBytesLabel"
htmlFor="topicFormRetentionBytes"
>
Max size on disk in GB
Max partition size in GB
</InputLabel>
<Controller
control={control}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('TopicForm', () => {
expectByRoleAndNameToBeInDocument('button', '7 days');
expectByRoleAndNameToBeInDocument('button', '4 weeks');

expectByRoleAndNameToBeInDocument('listbox', 'Max size on disk in GB');
expectByRoleAndNameToBeInDocument('listbox', 'Max partition size in GB');
expectByRoleAndNameToBeInDocument(
'spinbutton',
'Maximum message size in bytes'
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/lib/hooks/api/topicMessages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ export const useTopicMessages = ({
default:
}

searchParams.getAll(MessagesFilterKeys.partitions).forEach((value) => {
requestParams.append(MessagesFilterKeys.partitions, value);
});

const partitions = searchParams.get(MessagesFilterKeys.partitions);
if (partitions !== null) {
requestParams.append(MessagesFilterKeys.partitions, partitions);
}
const { nextCursor, setNextCursor } = useMessageFiltersStore.getState();

const tempCompareUrl = new URLSearchParams(requestParams);
Expand Down
13 changes: 9 additions & 4 deletions frontend/src/lib/hooks/useMessagesFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ export function useMessagesFilters() {

const search = searchParams.get(MessagesFilterKeys.stringFilter) || '';

const partitions = searchParams.getAll(MessagesFilterKeys.partitions);
const partitions = (searchParams.get(MessagesFilterKeys.partitions) || '')
.split(',')
.filter((v) => v);

const smartFilterId =
searchParams.get(MessagesFilterKeys.activeFilterId) ||
Expand Down Expand Up @@ -166,9 +168,12 @@ export function useMessagesFilters() {
setSearchParams((params) => {
params.delete(MessagesFilterKeys.partitions);

values.forEach((option) => {
params.append(MessagesFilterKeys.partitions, option.value);
});
if (values.length) {
params.append(
MessagesFilterKeys.partitions,
values.map((v) => v.value).join(',')
);
}

return params;
});
Expand Down

0 comments on commit 94f3640

Please sign in to comment.