-
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
[APM] Service overview: Ensure transactionType is used for by every component #85665
Changes from 7 commits
4e21dab
73116db
f516d49
71ac869
c04b539
a7a4562
4e3152a
63dc146
a108339
9d96a6f
be7f8d3
5e74652
e2de0f7
337bf54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,9 @@ import React, { useState } from 'react'; | |
import styled from 'styled-components'; | ||
import { EuiBasicTable } from '@elastic/eui'; | ||
import { asInteger } from '../../../../../common/utils/formatters'; | ||
import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; | ||
import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; | ||
import { useUrlParams } from '../../../../context/url_params_context/use_url_params'; | ||
import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; | ||
import { callApmApi } from '../../../../services/rest/createCallApmApi'; | ||
import { px, truncate, unit } from '../../../../style/variables'; | ||
import { SparkPlot } from '../../../shared/charts/spark_plot'; | ||
|
@@ -67,7 +68,7 @@ export function ServiceOverviewErrorsTable({ serviceName }: Props) { | |
urlParams: { start, end }, | ||
uiFilters, | ||
} = useUrlParams(); | ||
|
||
const { transactionType } = useApmServiceContext(); | ||
const [tableOptions, setTableOptions] = useState<{ | ||
pageIndex: number; | ||
sort: { | ||
|
@@ -153,7 +154,7 @@ export function ServiceOverviewErrorsTable({ serviceName }: Props) { | |
}, | ||
status, | ||
} = useFetcher(() => { | ||
if (!start || !end) { | ||
if (!start || !end || !transactionType) { | ||
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. For readability, something like: const hasRequiredParams = start && end && transactionType;
if (!hasRequiredParams) {
return;
} 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. We are already using the "or not" style so I think it's fine to keep it. At least that's consistent |
||
return; | ||
} | ||
|
||
|
@@ -170,6 +171,7 @@ export function ServiceOverviewErrorsTable({ serviceName }: Props) { | |
pageIndex: tableOptions.pageIndex, | ||
sortField: tableOptions.sort.field, | ||
sortDirection: tableOptions.sort.direction, | ||
transactionType, | ||
}, | ||
}, | ||
}).then((response) => { | ||
|
@@ -193,6 +195,7 @@ export function ServiceOverviewErrorsTable({ serviceName }: Props) { | |
tableOptions.pageIndex, | ||
tableOptions.sort.field, | ||
tableOptions.sort.direction, | ||
transactionType, | ||
]); | ||
|
||
const { | ||
|
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.
What is eslint complaining about here?
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.
Property name
GET /api/apm/services/{serviceName}/error_groupsmust match one of the following formats: camelCase, PascalCase, snake_case, UPPER_CASE