-
Notifications
You must be signed in to change notification settings - Fork 919
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
Add setting to turn extending numeric precision on or off #8837
Changes from all commits
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,5 @@ | ||
fix: | ||
- Fix a typo while inspecting values for large numerals in OSD and the JS client ([#8837](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8837)) | ||
|
||
feat: | ||
- Add setting to turn extending numeric precision on or off ([#8837](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8837)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,4 +108,5 @@ export const UI_SETTINGS = { | |
QUERY_DATAFRAME_HYDRATION_STRATEGY: 'query:dataframe:hydrationStrategy', | ||
SEARCH_QUERY_LANGUAGE_BLOCKLIST: 'search:queryLanguageBlocklist', | ||
NEW_HOME_PAGE: 'home:useNewHomePage', | ||
DATA_WITH_LONG_NUMERALS: 'data:withLongNumerals', | ||
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. nit: i think i originally did 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. I locked in on |
||
} as const; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -535,6 +535,17 @@ export function getUiSettings( | |
}), | ||
schema: schema.string(), | ||
}, | ||
[UI_SETTINGS.DATA_WITH_LONG_NUMERALS]: { | ||
name: i18n.translate('data.advancedSettings.data.withLongNumeralsTitle', { | ||
defaultMessage: 'Extend Numeric Precision', | ||
}), | ||
value: true, | ||
description: i18n.translate('data.advancedSettings.data.withLongNumeralsText', { | ||
defaultMessage: | ||
"Turn on for precise handling of extremely large numbers. Turn off to optimize performance when high precision for large values isn't required.", | ||
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. should this tell user what the threshold is before losing precision? 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. It would be too wordy. Instead, I will have this added to the documentation website with proper explanation. |
||
}), | ||
schema: schema.boolean(), | ||
}, | ||
[UI_SETTINGS.TIMEPICKER_REFRESH_INTERVAL_DEFAULTS]: { | ||
name: i18n.translate('data.advancedSettings.timepicker.refreshIntervalDefaultsTitle', { | ||
defaultMessage: 'Time filter refresh interval', | ||
|
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.
uiSettings is a service, would it ever change?
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.
Most of these are; not sure if it is because
useServicesContext
can throw (which would prevent code advancing here), linting rules, or something else but most of the services fetched from the context are passed in here too. Didn't want to re-engineer this section so followed the same pattern for consistency.