[APM] Various improvements from #104851#107726
Conversation
|
Pinging @elastic/apm-ui (Team:apm) |
| export interface KeyValue { | ||
| key: string; | ||
| value: any | undefined; | ||
| } |
| /** | ||
| * timestamp in milliseconds or ISO timestamp | ||
| */ | ||
| time: number | string, |
There was a problem hiding this comment.
Turns out that we actually call this function with string but due to manual type overrides we've newer noticed.
| align?: string; | ||
| width?: string; | ||
| sortable?: boolean; | ||
| truncateText?: boolean; |
There was a problem hiding this comment.
is this being used somewhere?
There was a problem hiding this comment.
Yes, in
We didn't have typed table columns before so it wasn't an error until now
dgieselaar
left a comment
There was a problem hiding this comment.
lgtm, thanks for doing this
| name: '', | ||
| sortable: true, | ||
| render: (isApplied: boolean) => ( | ||
| render: (_, { applied_by_agent: appliedByAgent }) => ( |
There was a problem hiding this comment.
Avoiding manual type overrides and preserving the correct type
| const canSave = core.application.capabilities.apm.save; | ||
|
|
||
| const columns = [ | ||
| const columns: Array<ITableColumn<CustomLink>> = [ |
There was a problem hiding this comment.
Adding types to table columns
| latency: number; | ||
| cpuUsage: number; | ||
| memoryUsage: number; | ||
| } |
There was a problem hiding this comment.
Avoid explicit types when the (correct) type can be infered via APIReturnType
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
|
jenkins run the e2e |
|
The following labels were identified as gaps in your version labels and will be added automatically:
If any of these should not be on your pull request, please manually remove them. |
💔 Backport failed
Successful backport PRs will be merged automatically after passing CI. To backport manually run: |
…-png-pdf-report-type * 'master' of github.com:elastic/kibana: (392 commits) update linting doc (elastic#105748) [APM] Various improvements from elastic#104851 (elastic#107726) Update dependency @elastic/charts to v33.2.0 (master) (elastic#107842) Fix default route link on kibana homepage (elastic#107809) [APM] Invalidate trackPageview on route change (elastic#107741) Service map backend links (elastic#107317) [index patterns] index pattern create modal (elastic#101853) [RAC] integrating rbac search strategy with alert table (elastic#107242) [Security Solution] Siem signals -> alerts as data field and index aliases (elastic#106049) [Metrics UI] Add checkbox to optionally drop partial buckets (elastic#107676) [Metrics UI] Fix metric threshold preview regression (elastic#107674) Disable Product check in @elastic/elasticsearch-js (elastic#107642) [App Search] Migrate Crawler Status Indicator, Crawler Status Banner, and Crawl Request polling (elastic#107603) [Security Solution, Lists] Replace legacy imports from 'elasticsearch' package (elastic#107226) [maps] asset tracking tutorial (elastic#104552) [scripts/build_ts_refs] when using `--clean` initialize caches (elastic#107777) Upgrade EUI to v36.1.0 (elastic#107231) [RAC] [TGrid] Implements cell actions in the TGrid (elastic#107771) Realign cypress/ccs_integration with cypress/integration (elastic#107743) Allow optional OSS to X-Pack dependencies (elastic#107432) ... # Conflicts: # x-pack/examples/reporting_example/public/application.tsx # x-pack/examples/reporting_example/public/components/app.tsx # x-pack/plugins/canvas/public/services/legacy/stubs/reporting.ts # x-pack/plugins/reporting/common/types.ts # x-pack/plugins/reporting/public/lib/reporting_api_client/context.tsx # x-pack/plugins/reporting/public/management/mount_management_section.tsx # x-pack/plugins/reporting/public/management/report_listing.test.tsx # x-pack/plugins/reporting/public/plugin.ts # x-pack/plugins/reporting/public/share_context_menu/register_pdf_png_reporting.tsx # x-pack/plugins/reporting/server/export_types/printable_pdf/execute_job/index.ts
In #104851 I wanted to fix the throughput charts. While doing this I ran into a couple of issues with our types that made the change harder.
This PR doesn't contain any user facing changes (also no changes to how throughput is being calculated). It only contains various minor improvements to our types that should make changes slightly easier in the future.