Skip to content

Commit 960eee9

Browse files
authored
[Automatic Import] Fix Table width and Correct Data Stream Max Length (#270241)
This PR fixes the width of the table so that long data stream names will no longer extend table width beyond container and correctly adjusts allowed max character lengths allowed in data schema.
1 parent b00b51d commit 960eee9

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

x-pack/platform/plugins/shared/automatic_import/public/common/lib/helper_functions.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ describe('helper_functions', () => {
197197

198198
it('should return true for names within limit', () => {
199199
expect(meetsMaxLength('ab')).toBe(true);
200-
expect(meetsMaxLength('a'.repeat(256))).toBe(true);
200+
expect(meetsMaxLength('a'.repeat(150))).toBe(true);
201201
});
202202

203-
it('should return false for names exceeding 256 characters', () => {
204-
expect(meetsMaxLength('a'.repeat(257))).toBe(false);
203+
it('should return false for names exceeding 150 characters', () => {
204+
expect(meetsMaxLength('a'.repeat(151))).toBe(false);
205205
});
206206
});
207207

@@ -211,7 +211,7 @@ describe('helper_functions', () => {
211211
});
212212

213213
it('should have correct MAX_NAME_LENGTH', () => {
214-
expect(MAX_NAME_LENGTH).toBe(256);
214+
expect(MAX_NAME_LENGTH).toBe(150);
215215
});
216216
});
217217
});

x-pack/platform/plugins/shared/automatic_import/public/common/lib/helper_functions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function generateId(): string {
1616

1717
// Validation constants matching elastic-package requirements
1818
export const MIN_NAME_LENGTH = 2;
19-
export const MAX_NAME_LENGTH = 256;
19+
export const MAX_NAME_LENGTH = 150;
2020

2121
/**
2222
* Normalizes a title/name for use as an integration or data stream identifier.

x-pack/platform/plugins/shared/automatic_import/public/components/integration_management/forms/translations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,5 @@ export const NAME_TOO_SHORT = i18n.translate('xpack.automaticImport.forms.nameTo
9999
});
100100

101101
export const NAME_TOO_LONG = i18n.translate('xpack.automaticImport.forms.nameTooLong', {
102-
defaultMessage: 'Name cannot exceed 256 characters',
102+
defaultMessage: 'Name cannot exceed 150 characters',
103103
});

x-pack/platform/plugins/shared/automatic_import/public/components/integration_management/management_contents/data_streams/data_streams_table/data_steams_table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export const DataStreamsTable = ({
238238
<EuiBasicTable<DataStreamResponse>
239239
items={sortedItems}
240240
columns={dataStreamColumns}
241-
tableLayout="auto"
241+
tableLayout="fixed"
242242
tableCaption={i18n.DATA_STREAMS_TITLE}
243243
sorting={sorting}
244244
onChange={onTableChange}

0 commit comments

Comments
 (0)