Skip to content

Commit

Permalink
fix(monitoring): add data-test-subj props to tables
Browse files Browse the repository at this point in the history
  • Loading branch information
weronikaolejniczak committed Dec 23, 2024
1 parent a218b4b commit b36ab64
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export const LogStashNodePipelinesPage: React.FC<ComponentProps> = ({ clusters }
{data.pipelines && (
<div data-test-subj="logstashPipelinesListing">
<PipelineListing
data-test-subj="monitoringLogstashPipelinesTable"
onBrush={onBrush}
zoomInfo={zoomInfo}
stats={data.nodeSummary}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export const LogStashPipelinesPage: React.FC<ComponentProps> = ({ clusters }) =>
const upgradeMessage = pageData ? makeUpgradeMessage(clusterStatus.versions) : null;
return (
<PipelineListing
data-test-subj="monitoringLogstashPipelinesTable"
onBrush={(xaxis: any) => onBrush({ xaxis })}
stats={clusterStatus}
data={pipelines}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export function ApmServerInstances({ apms, setupMode, alerts }: Props) {
<EuiPanel>
{setupModeCallout}
<EuiMonitoringTable
data-test-subj="apmInstancesTable"
rows={data.apms}
columns={getColumns(setupMode, data.cgroup)}
sorting={sorting}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export class Listing extends PureComponent {
<EuiPanel>
{setupModeCallOut}
<EuiMonitoringTable
data-test-subj="beatsTable"
rows={data}
setupMode={setupMode}
productName={BEATS_SYSTEM_ID}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ export const Listing = ({ angular, clusters, sorting, pagination, onTableChange
<StandaloneClusterCallout changeCluster={_changeCluster} storage={storage} />
) : null}
<EuiMonitoringTable
data-test-subj="clusterTable"
rows={clusters}
columns={getColumns(
showLicenseExpiration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export const ElasticsearchIndices = ({
/>
<EuiSpacer size="m" />
<EuiMonitoringTable
data-test-subj="elasticsearchIndicesTable"
rows={indices}
columns={getColumns(alerts)}
sorting={sorting}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const ElasticsearchMLJobs = ({
<EuiSpacer size="m" />
<EuiPanel>
<EuiMonitoringTable
data-test-subj="mlJobsTable"
rows={jobs}
columns={columns}
sorting={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ export function ElasticsearchNodes({ clusterStatus, showCgroupMetricsElasticsear
{setupModeCallout}
<EuiPanel>
<EuiMonitoringSSPTable
data-test-subj="elasticsearchNodesTable"
rows={nodes}
columns={columns}
sorting={sorting}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export const ShardActivity = (props) => {
/>
<EuiSpacer />
<EuiMonitoringTable
data-test-subj="esShardActivityTable"
rows={rows}
columns={columns}
message={getNoDataMessage()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ export const KibanaInstances: React.FC<Props> = (props: Props) => {
{setupModeCallOut}
<EuiPanel>
<EuiMonitoringTable
data-test-subj="kibanaInstancesTable"
rows={dataFlattened}
columns={getColumns(setupMode, alerts, dateFormat, staleStatusThresholdSeconds)}
sorting={sorting}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export class Listing extends PureComponent {
{setupModeCallOut}
<EuiPanel>
<EuiMonitoringTable
data-test-subj="logstashNodesTable"
rows={flattenedData}
setupMode={setupMode}
productName={LOGSTASH_SYSTEM_ID}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export class PipelineListing extends Component {
<EuiSpacer size="m" />
<EuiPanel>
<EuiMonitoringSSPTable
data-test-subj={this.props['data-test-subj'] || 'logstashNodesTable'}
rows={data}
columns={columns}
sorting={sortingOptions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const EuiMonitoringTable: FunctionComponent<Record<any, any>> = ({
}

return (
<div data-test-subj={`${props.className}Container`}>
<div data-test-subj={`${props['data-test-subj']}Container`}>
<EuiInMemoryTable
data-test-subj={
items.length && hasItems === true ? 'monitoringTableHasData' : 'monitoringTableNoData'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function EuiMonitoringSSPTable({
};

return (
<div data-test-subj={`${props.className}Container`}>
<div data-test-subj={`${props['data-test-subj']}Container`}>
<EuiSearchBar {...search} onChange={onQueryChange} />
<EuiSpacer size="l" />
<EuiBasicTable
Expand Down

0 comments on commit b36ab64

Please sign in to comment.