-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Add kibana setting for file data visualizer max file size #64427
Changes from 5 commits
b0ba509
712bc25
d14568c
dcc7283
52cad93
93d24d6
bafad91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,7 @@ | ||||||
/* | ||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||||||
* or more contributor license agreements. Licensed under the Elastic License; | ||||||
* you may not use this file except in compliance with the Elastic License. | ||||||
*/ | ||||||
|
||||||
export const FILE_DATA_VISUALIZER_MAX_FILE_SIZE = 'ml:fileDataVisualizerMaxFileSize'; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not mandatory, but if you follow my other suggestions, it might be a good idea to synch here too:
Suggested change
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,34 @@ | ||||||
/* | ||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||||||
* or more contributor license agreements. Licensed under the Elastic License; | ||||||
* you may not use this file except in compliance with the Elastic License. | ||||||
*/ | ||||||
|
||||||
import { CoreSetup } from 'kibana/server'; | ||||||
import { i18n } from '@kbn/i18n'; | ||||||
import { schema } from '@kbn/config-schema'; | ||||||
import { FILE_DATA_VISUALIZER_MAX_FILE_SIZE } from '../../common/constants/settings'; | ||||||
import { MAX_FILE_SIZE } from '../../common/constants/file_datavisualizer'; | ||||||
|
||||||
export function registerKibanaSettings(coreSetup: CoreSetup) { | ||||||
coreSetup.uiSettings.register({ | ||||||
[FILE_DATA_VISUALIZER_MAX_FILE_SIZE]: { | ||||||
name: i18n.translate('xpack.ml.maxFileSizeSettingsName', { | ||||||
defaultMessage: 'File Data Visualizer maximum file upload size', | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the docs we don't differentiate between the "Data Visualizer" and the "File Data Visualizer" (I think it's because they're both on the same "Data Visualizer" tab). IMO it's not necessary to have the "File" qualifier here either:
Suggested change
|
||||||
}), | ||||||
value: MAX_FILE_SIZE, | ||||||
description: i18n.translate('xpack.ml.maxFileSizeSettingsDescription', { | ||||||
defaultMessage: | ||||||
'Sets the file size limit when importing data in the File Data Visualizer. The highest supported value for this setting is 1GB.', | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto re "File Data Visualizer":
Suggested change
|
||||||
}), | ||||||
category: ['Machine Learning'], | ||||||
schema: schema.string(), | ||||||
validation: { | ||||||
regexString: '\\d+[mMgG][bB]', | ||||||
message: i18n.translate('xpack.ml.maxFileSizeSettingsError', { | ||||||
defaultMessage: 'Should be a valid data size. e.g. 200MB, 1GB', | ||||||
}), | ||||||
}, | ||||||
}, | ||||||
}); | ||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you accept my suggestion about changing the setting name, it will need to be updated here too: