Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ interface DegradedDocsControlProps extends Partial<RowControlProps> {
*/
export const createDegradedDocsControl = (props?: DegradedDocsControlProps): RowControlColumn => ({
id: 'connectedDegradedDocs',
headerAriaLabel: actionsHeaderAriaLabelDegradedAction,
renderControl: (Control, rowProps) => {
render: (Control, rowProps) => {
return <DegradedDocs Control={Control} rowProps={rowProps} {...props} />;
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,11 @@ import { getStacktraceFields } from '../../utils/get_stack_trace_fields';
*/
export const createStacktraceControl = (props?: Partial<RowControlProps>): RowControlColumn => ({
id: 'connectedStacktraceDocs',
headerAriaLabel: actionsHeaderAriaLabelStacktraceAction,
renderControl: (Control, rowProps) => {
render: (Control, rowProps) => {
return <Stacktrace Control={Control} rowProps={rowProps} {...props} />;
},
});

const actionsHeaderAriaLabelStacktraceAction = i18n.translate(
'discover.customControl.stacktraceArialLabel',
{ defaultMessage: 'Access to available stacktraces' }
);

const stacktraceAvailableControlButton = i18n.translate(
'discover.customControl.stacktrace.available',
{ defaultMessage: 'Stacktraces available' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { EuiButtonIconProps, EuiDataGridControlColumn, IconType } from '@elastic/eui';
import { EuiButtonIconProps, IconType } from '@elastic/eui';
import type { Interpolation, Theme } from '@emotion/react';
import React, { FC, ReactElement } from 'react';
import { DataTableRecord } from '../../types';
Expand All @@ -32,7 +32,5 @@ export type RowControlComponent = FC<RowControlProps>;

export interface RowControlColumn {
id: string;
headerAriaLabel: string;
headerCellRender?: EuiDataGridControlColumn['headerCellRender'];
renderControl: (Control: RowControlComponent, props: RowControlRowProps) => ReactElement;
render: (Control: RowControlComponent, props: RowControlRowProps) => ReactElement;
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,9 @@ export const testLeadingControlColumn: EuiDataGridControlColumn = {
};

export const mockRowAdditionalLeadingControls = ['visBarVerticalStacked', 'heart', 'inspect'].map(
(iconType, index): RowControlColumn => ({
id: `exampleControl_${iconType}`,
headerAriaLabel: `Example Row Control ${iconType}`,
renderControl: (Control, rowProps) => {
(iconType): RowControlColumn => ({
id: `exampleRowControl-${iconType}`,
render: (Control, rowProps) => {
return (
<Control
data-test-subj={`exampleRowControl-${iconType}`}
Expand Down
Loading