File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import {
3535} from '../../../protogen/redpanda/api/console/v1alpha1/publish_messages_pb' ;
3636import { appGlobal } from '../../../state/appGlobal' ;
3737import { api } from '../../../state/backendApi' ;
38+ import { uiState } from '../../../state/uiState' ;
3839import { uiSettings } from '../../../state/ui' ;
3940import { Label } from '../../../utils/tsxUtils' ;
4041import { base64ToUInt8Array , isValidBase64 , substringWithEllipsis } from '../../../utils/utils' ;
@@ -120,7 +121,7 @@ const PublishTopicForm: FC<{ topicName: string }> = observer(({ topicName }) =>
120121 } = useForm < Inputs > ( {
121122 defaultValues : {
122123 partition : - 1 ,
123- compressionType : CompressionType . SNAPPY ,
124+ compressionType : uiState . topicSettings . produceRecordCompression ,
124125 headers : [ ] ,
125126 key : {
126127 data : '' ,
@@ -231,6 +232,8 @@ const PublishTopicForm: FC<{ topicName: string }> = observer(({ topicName }) =>
231232 req . partitionId = data . partition ;
232233 req . compression = data . compressionType ;
233234
235+ uiState . topicSettings . produceRecordCompression = data . compressionType ;
236+
234237 // Headers
235238 for ( const h of data . headers ) {
236239 if ( ! h . value && ! h . value ) {
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { PayloadEncoding } from '../protogen/redpanda/api/console/v1alpha1/commo
1818import { clone } from '../utils/jsonUtils' ;
1919import { assignDeep , randomId } from '../utils/utils' ;
2020import { AclRequestDefault , type GetAclsRequest } from './restInterfaces' ;
21+ import { CompressionType } from '../protogen/redpanda/api/console/v1alpha1/common_pb' ;
2122
2223const settingsName = 'uiSettings-v3' ;
2324
@@ -147,6 +148,7 @@ export class TopicDetailsSettings {
147148 @observable aclPageSize = 20 ;
148149
149150 @observable produceRecordEncoding = PayloadEncoding . TEXT as PayloadEncoding | 'base64' ;
151+ @observable produceRecordCompression = CompressionType . SNAPPY ;
150152
151153 @observable quickSearch = '' ;
152154}
You can’t perform that action at this time.
0 commit comments