-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Add kibana setting for file data visualizers max file size
- Loading branch information
1 parent
b3c7002
commit b0ba509
Showing
11 changed files
with
52 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.rollupJobs.rollupIndexPatternsTitle', { | ||
defaultMessage: 'File Data Visualizer maximum file upload size', | ||
}), | ||
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.', | ||
}), | ||
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', | ||
}), | ||
}, | ||
}, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters