[Logs UI] Replace dependencies in the infra bundle#91503
[Logs UI] Replace dependencies in the infra bundle#91503afgomez merged 4 commits intoelastic:masterfrom
Conversation
ac12294 to
d54de59
Compare
|
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
weltenwort
left a comment
There was a problem hiding this comment.
Seems like a nice win. The only limitation is that the metric formatter template is now less powerful, but I couldn't find anything beyond the simple interpolation.
Thank you!
| const fmtFn = FORMATTERS[format]; | ||
| const value = fmtFn(Number(val)); | ||
| return Mustache.render(template, { value }); | ||
| return template.replace(/{{value}}/g, value); |
There was a problem hiding this comment.
💭 Too bad replaceAll() is not yet available in our node version. It would allow us to avoid constructing a regex.
There was a problem hiding this comment.
yep :( I initially used that but the CI crashed
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* master: (111 commits) [Logs UI] Replace dependencies in the infra bundle (elastic#91503) [Search Source] Do not request unmapped fields if source filters are provided (elastic#91921) [APM] Kql Search Bar suggests values outside the selected time range (elastic#91918) Refactored component edit policy tests into separate folders and using client integration testing setup (elastic#91657) [Fleet] Don't error on missing package_assets value (elastic#91744) [Lens] Pass used histogram interval to chart (elastic#91370) [Indexpattern management] Use indexPatterns Service instead of savedObjects client (elastic#91839) [Security Solutions] Fixes Cypress tests for indicator match by making the selectors more specific (elastic#91947) [CI] backportrc can skip CI (elastic#91886) Revert "[SOM] fix flaky suites (elastic#91809)" [Fleet] Install Elastic Agent integration by default during setup (elastic#91676) [Fleet] Silently swallow 404 errors when deleting ingest pipelines (elastic#91778) [data.search] Use incrementCounter for search telemetry (elastic#91230) [Fleet] Bootstrap functional test suite (elastic#91898) [Alerts][Docs] Added API documentation for alerts plugin (elastic#91067) Use correct environment in anomaly detection setup link (elastic#91877) [FTSR] Convert to tasks and add jest/api integration suites (elastic#91770) [CI] Build and publish storybooks (elastic#87701) docs: add PHP agent info to docs (elastic#91773) [DOCS] Adds and updates Visualization advanced settings (elastic#91904) ...
Summary
Part of #89025
Replace some of the dependencies in the infra bundle for more lightweight alternatives.
mustache. The library was only used in thecreateFormatterhelper function, and only to substitute a token with a value. This can be achieved withString.prototype.replaceAll().url. Used in the<LegacyApp>anduseLinkPropsto construct URLs. The URLs generated are already heavily constructed in previous steps in the code, so this module was used only for concatenation.