Skip to content

Commit

Permalink
[SIEM] Fix AnomaliesNetworkTable and AnomaliesHostTable items count (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski authored Oct 18, 2019
1 parent 8d34f25 commit 9ff6d86
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 50 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { getAnomaliesHostTableColumnsCurated } from './get_anomalies_host_table_
import { convertAnomaliesToHosts } from './convert_anomalies_to_hosts';
import { Loader } from '../../loader';
import { getIntervalFromAnomalies } from '../anomaly/get_interval_from_anomalies';
import { getSizeFromAnomalies } from '../anomaly/get_size_from_anomalies';
import { AnomaliesHostTableProps } from '../types';
import { hasMlUserPermissions } from '../permissions/has_ml_user_permissions';
import { MlCapabilitiesContext } from '../permissions/ml_capabilities_provider';
Expand Down Expand Up @@ -51,9 +50,9 @@ export const AnomaliesHostTable = React.memo<AnomaliesHostTableProps>(
narrowDateRange
);
const pagination = {
pageIndex: 0,
pageSize: 10,
totalItemCount: getSizeFromAnomalies(tableData),
initialPageIndex: 0,
initialPageSize: 10,
totalItemCount: hosts.length,
pageSizeOptions: [5, 10, 20, 50],
hidePerPageOptions: false,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { Loader } from '../../loader';
import { AnomaliesNetworkTableProps } from '../types';
import { getAnomaliesNetworkTableColumnsCurated } from './get_anomalies_network_table_columns';
import { getIntervalFromAnomalies } from '../anomaly/get_interval_from_anomalies';
import { getSizeFromAnomalies } from '../anomaly/get_size_from_anomalies';
import { hasMlUserPermissions } from '../permissions/has_ml_user_permissions';
import { MlCapabilitiesContext } from '../permissions/ml_capabilities_provider';
import { BasicTable } from './basic_table';
Expand Down Expand Up @@ -49,9 +48,9 @@ export const AnomaliesNetworkTable = React.memo<AnomaliesNetworkTableProps>(
narrowDateRange
);
const pagination = {
pageIndex: 0,
pageSize: 10,
totalItemCount: getSizeFromAnomalies(tableData),
initialPageIndex: 0,
initialPageSize: 10,
totalItemCount: networks.length,
pageSizeOptions: [5, 10, 20, 50],
hidePerPageOptions: false,
};
Expand Down

0 comments on commit 9ff6d86

Please sign in to comment.