Skip to content

Commit 08ac227

Browse files
committed
fix otel_service_overview_and_transactions.cy.ts group
1 parent 166b991 commit 08ac227

File tree

7 files changed

+51
-21
lines changed

7 files changed

+51
-21
lines changed

x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ interface Props {
6262
saveTableOptionsToUrl?: boolean;
6363
showPerPageOptions?: boolean;
6464
onLoadTable?: () => void;
65+
tableCaption?: string;
6566
}
6667

6768
const defaultSorting = {
@@ -77,6 +78,7 @@ export function ErrorGroupList({
7778
saveTableOptionsToUrl,
7879
showPerPageOptions = true,
7980
onLoadTable,
81+
tableCaption,
8082
}: Props) {
8183
const { query } = useAnyOfApmParams(
8284
'/services/{serviceName}/overview',
@@ -316,6 +318,7 @@ export function ErrorGroupList({
316318

317319
return (
318320
<ManagedTable
321+
tableCaption={tableCaption}
319322
noItemsMessage={
320323
isMainStatsLoading
321324
? i18n.translate('xpack.apm.errorsTable.loading', {

x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/index.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ export function ErrorGroupOverview() {
3030
kuery,
3131
});
3232

33+
const headerTitle = i18n.translate(
34+
'xpack.apm.serviceDetails.metrics.errorOccurrencesChart.title',
35+
{ defaultMessage: 'Error occurrences' }
36+
);
37+
3338
return (
3439
<EuiFlexGroup direction="column" gutterSize="s">
3540
<EuiFlexItem>
@@ -40,10 +45,7 @@ export function ErrorGroupOverview() {
4045
<ErrorDistribution
4146
fetchStatus={errorDistributionStatus}
4247
distribution={errorDistributionData}
43-
title={i18n.translate(
44-
'xpack.apm.serviceDetails.metrics.errorOccurrencesChart.title',
45-
{ defaultMessage: 'Error occurrences' }
46-
)}
48+
title={headerTitle}
4749
/>
4850
</EuiPanel>
4951
</EuiFlexItem>
@@ -69,6 +71,7 @@ export function ErrorGroupOverview() {
6971
serviceName={serviceName}
7072
comparisonEnabled={comparisonEnabled}
7173
initialPageSize={10}
74+
tableCaption={headerTitle}
7275
/>
7376
</EuiPanel>
7477
</EuiFlexItem>

x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_errors_table/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,17 @@ interface Props {
2020

2121
export function ServiceOverviewErrorsTable({ serviceName, onLoadTable }: Props) {
2222
const { query } = useApmParams('/services/{serviceName}/overview');
23+
const headerTitle = i18n.translate('xpack.apm.serviceOverview.errorsTableTitle', {
24+
defaultMessage: 'Errors',
25+
});
2326

2427
return (
2528
<EuiFlexGroup direction="column" gutterSize="s" data-test-subj="serviceOverviewErrorsTable">
2629
<EuiFlexItem>
2730
<EuiFlexGroup responsive={false} justifyContent="spaceBetween">
2831
<EuiFlexItem grow={false}>
2932
<EuiTitle size="xs">
30-
<h2>
31-
{i18n.translate('xpack.apm.serviceOverview.errorsTableTitle', {
32-
defaultMessage: 'Errors',
33-
})}
34-
</h2>
33+
<h2>{headerTitle}</h2>
3534
</EuiTitle>
3635
</EuiFlexItem>
3736
<EuiFlexItem grow={false}>
@@ -52,6 +51,7 @@ export function ServiceOverviewErrorsTable({ serviceName, onLoadTable }: Props)
5251
isCompactMode={true}
5352
saveTableOptionsToUrl={false}
5453
showPerPageOptions={false}
54+
tableCaption={headerTitle}
5555
/>
5656
</OverviewTableContainer>
5757
</EuiFlexItem>

x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/get_columns.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import type { EuiBasicTableColumn } from '@elastic/eui';
9-
import { EuiButtonIcon, RIGHT_ALIGNMENT } from '@elastic/eui';
9+
import { EuiButtonIcon, RIGHT_ALIGNMENT, EuiScreenReaderOnly } from '@elastic/eui';
1010
import { i18n } from '@kbn/i18n';
1111
import type { ReactNode } from 'react';
1212
import React from 'react';
@@ -254,6 +254,15 @@ export function getColumns({
254254
},
255255
},
256256
{
257+
name: (
258+
<EuiScreenReaderOnly>
259+
<span>
260+
{i18n.translate('xpack.apm.getColumns.actionsMenu.srName', {
261+
defaultMessage: 'Actions menu',
262+
})}
263+
</span>
264+
</EuiScreenReaderOnly>
265+
),
257266
width: '40px',
258267
render: (instanceItem: MainStatsServiceInstanceItem) => {
259268
return (
@@ -284,6 +293,15 @@ export function getColumns({
284293
},
285294
},
286295
{
296+
name: (
297+
<EuiScreenReaderOnly>
298+
<span>
299+
{i18n.translate('xpack.apm.getColumns.rightAlignment.srName', {
300+
defaultMessage: 'Expanded menu',
301+
})}
302+
</span>
303+
</EuiScreenReaderOnly>
304+
),
287305
align: RIGHT_ALIGNMENT,
288306
width: '40px',
289307
isExpander: true,

x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,16 @@ export function ServiceOverviewInstancesTable({
136136
showPerPageOptions: false,
137137
};
138138

139+
const headerTitle = i18n.translate('xpack.apm.serviceOverview.instancesTableTitle', {
140+
defaultMessage: 'Top {count} {count, plural, one {instance} other {instances}}',
141+
values: { count: mainStatsItemCount },
142+
});
143+
139144
return (
140145
<EuiFlexGroup direction="column" gutterSize="s" data-test-subj="serviceOverviewInstancesTable">
141146
<EuiFlexItem>
142147
<EuiTitle size="xs">
143-
<h2>
144-
{i18n.translate('xpack.apm.serviceOverview.instancesTableTitle', {
145-
defaultMessage: 'Top {count} {count, plural, one {instance} other {instances}}',
146-
values: { count: mainStatsItemCount },
147-
})}
148-
</h2>
148+
<h2>{headerTitle}</h2>
149149
</EuiTitle>
150150
</EuiFlexItem>
151151
<EuiFlexItem data-test-subj="serviceInstancesTableContainer">
@@ -154,6 +154,7 @@ export function ServiceOverviewInstancesTable({
154154
isEmptyAndNotInitiated={mainStatsItemCount === 0 && isNotInitiated}
155155
>
156156
<EuiBasicTable
157+
tableCaption={headerTitle}
157158
noItemsMessage={
158159
status === FETCH_STATUS.LOADING
159160
? i18n.translate('xpack.apm.serviceOverview.loadingText', {
@@ -164,6 +165,7 @@ export function ServiceOverviewInstancesTable({
164165
})
165166
}
166167
data-test-subj="instancesTable"
168+
rowHeader="serviceNodeName"
167169
loading={isLoading}
168170
items={mainStatsItems}
169171
columns={columns}

x-pack/solutions/observability/plugins/apm/public/components/shared/managed_table/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ function UnoptimizedManagedTable<T extends object>(props: {
103103
tableLayout?: 'auto' | 'fixed';
104104
tableSearchBar?: TableSearchBar<T>;
105105
saveTableOptionsToUrl?: boolean;
106+
107+
tableCaption?: string;
106108
}) {
107109
const [searchQuery, setSearchQuery] = useState('');
108110
const history = useHistory();
@@ -333,6 +335,7 @@ function UnoptimizedManagedTable<T extends object>(props: {
333335
rowHeader={rowHeader === false ? undefined : rowHeader ?? columns[0]?.field}
334336
sorting={sorting}
335337
onChange={onTableChange}
338+
tableCaption={props.tableCaption}
336339
{...(paginationProps ? { pagination: paginationProps } : {})}
337340
/>
338341
</EuiFlexItem>

x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/index.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,18 @@ export function TransactionsTable({
182182
});
183183
}, [setScreenContext, mainStatistics]);
184184

185+
const title = i18n.translate('xpack.apm.transactionsTable.title', {
186+
defaultMessage: 'Transactions',
187+
});
188+
185189
return (
186190
<EuiFlexGroup direction="column" gutterSize="s" data-test-subj="transactionsGroupTable">
187191
{!hideTitle && (
188192
<EuiFlexItem>
189193
<EuiFlexGroup justifyContent="spaceBetween" responsive={false}>
190194
<EuiFlexItem grow={false}>
191195
<EuiTitle size="xs">
192-
<h2>
193-
{i18n.translate('xpack.apm.transactionsTable.title', {
194-
defaultMessage: 'Transactions',
195-
})}
196-
</h2>
196+
<h2>{title}</h2>
197197
</EuiTitle>
198198
</EuiFlexItem>
199199
{!hideViewTransactionsLink && (
@@ -261,6 +261,7 @@ export function TransactionsTable({
261261
showPerPageOptions={showPerPageOptions}
262262
saveTableOptionsToUrl={saveTableOptionsToUrl}
263263
onChangeRenderedItems={setRenderedItems}
264+
tableCaption={title}
264265
/>
265266
</OverviewTableContainer>
266267
</EuiFlexItem>

0 commit comments

Comments
 (0)