-
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] Convert Angular filters to formatter functions #18681
[ML] Convert Angular filters to formatter functions #18681
Conversation
Pinging @elastic/ml-ui |
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.
LGTM
Just a nit pick about making the filter wrapper a bit cleaner.
} else { | ||
return numeral(value).format('0a'); | ||
} | ||
return abbreviateWholeNumber(value, maxDigits); |
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.
could this not just be return abbreviateWholeNumber
?
as in,
module.filter('abbreviateWholeNumber', function () {
return abbreviateWholeNumber;
}
💚 Build Succeeded |
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.
LGTM
Converts three Angular filters used for formatting values in the results pages to functions, and renamed the parents directory from
filters
toformatters
:An Angular filter wrapper has been retained in each file, but this will be removed once all the Angular components that use these filters have been migrated to Eui / React (see #18374).
Changes to
format_value.js
andmetric_change_description.js
also include better handling for multi-valuedactual
andtypical
values fromlat_long
detectors (see #18192).