mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
(cherry picked from commit fd0e1aed0e
)
# Conflicts:
# x-pack/plugins/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
471788c121
commit
8de9d603a1
1 changed files with 4 additions and 19 deletions
|
@ -18,7 +18,6 @@ import {
|
|||
EuiSpacer,
|
||||
EuiTitle,
|
||||
} from '@elastic/eui';
|
||||
import { debounce } from 'lodash';
|
||||
|
||||
import { ml } from '../../../../services/ml_api_service';
|
||||
import { checkForAutoStartDatafeed, filterJobs, loadFullJob } from '../utils';
|
||||
|
@ -44,11 +43,6 @@ import { JobListMlAnomalyAlertFlyout } from '../../../../../alerting/ml_alerting
|
|||
|
||||
let blockingJobsRefreshTimeout = null;
|
||||
|
||||
const filterJobsDebounce = debounce((jobsSummaryList, filterClauses, callback) => {
|
||||
const ss = filterJobs(jobsSummaryList, filterClauses);
|
||||
callback(ss);
|
||||
}, 500);
|
||||
|
||||
// 'isManagementTable' bool prop to determine when to configure table for use in Kibana management page
|
||||
export class JobsListView extends Component {
|
||||
constructor(props) {
|
||||
|
@ -282,19 +276,10 @@ export class JobsListView extends Component {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this._isFiltersSet === true) {
|
||||
filterJobsDebounce(this.state.jobsSummaryList, filterClauses, (jobsSummaryList) => {
|
||||
this.setState({ filteredJobsSummaryList: jobsSummaryList, filterClauses }, () => {
|
||||
this.refreshSelectedJobs();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// first use after page load, do not debounce.
|
||||
const filteredJobsSummaryList = filterJobs(this.state.jobsSummaryList, filterClauses);
|
||||
this.setState({ filteredJobsSummaryList, filterClauses }, () => {
|
||||
this.refreshSelectedJobs();
|
||||
});
|
||||
}
|
||||
const filteredJobsSummaryList = filterJobs(this.state.jobsSummaryList, filterClauses);
|
||||
this.setState({ filteredJobsSummaryList, filterClauses }, () => {
|
||||
this.refreshSelectedJobs();
|
||||
});
|
||||
|
||||
this._isFiltersSet = true;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue