Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] explorer controller refactor #28750

Merged
merged 33 commits into from
Jan 24, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
73c7781
[ML] Moving some scope related methods to explorer_utils.js
walterra Jan 11, 2019
597318a
[ML] Refactored explorer_controller to reduce use of scope.
walterra Jan 14, 2019
25f5d6e
[ML] Move outer explorer_controller.js props to explorer.js state.
walterra Jan 15, 2019
db91b13
[ML] Fixes explorer controller mocha test.
walterra Jan 15, 2019
58d69b9
Merge remote-tracking branch 'upstream/master' into ml-explorer-contr…
walterra Jan 15, 2019
65b1835
[ML] Fixes passing on selectedJobs.
walterra Jan 15, 2019
51fe618
[ML] State handling optimized. AppState no longer necessary in Explor…
walterra Jan 16, 2019
f2e3edf
[ML] Fix issue with EuiSelect value ending up as null.
walterra Jan 16, 2019
45f3a70
Merge remote-tracking branch 'upstream/master' into ml-explorer-contr…
walterra Jan 16, 2019
566b64d
[ML] Fix updating swimlanes on resize.
walterra Jan 16, 2019
3afd8d8
[ML] Updates and fixes ExplorerSwimlane props and tests.
walterra Jan 16, 2019
7eb77f1
[ML] Review feedback, minor refactoring.
walterra Jan 16, 2019
7ec1bfe
[ML] Review feedback, refactorings to get rid of some lodash.
walterra Jan 16, 2019
8c504c5
[ML] Review feedback, use a template literal.
walterra Jan 16, 2019
a5e0033
Merge remote-tracking branch 'upstream/master' into ml-explorer-contr…
walterra Jan 17, 2019
031e176
[ML] Fix restoring selecton from AppState. Fix view-by default select.
walterra Jan 17, 2019
4ae475a
Merge remote-tracking branch 'upstream/master' into ml-explorer-contr…
walterra Jan 21, 2019
724bf50
[ML] Fixes swimlane bucket widths.
walterra Jan 21, 2019
0f628c3
[ML] Simplify updateExplorerQueue.
walterra Jan 21, 2019
28d9680
[ML] Refactored getSwimlaneBucketInterval() to pass less arguments ar…
walterra Jan 21, 2019
fed6b94
[ML] Fixes limit dropdown. Fixes redraw on resize. Optimizes state ha…
walterra Jan 22, 2019
0bbb211
[ML] Caches Anomaly Explorer remote calls. Improved swimlane resizing.
walterra Jan 22, 2019
ecaa5de
[ML] Fixes getViewBySwimlaneOptions().
walterra Jan 22, 2019
391ac8f
[ML] Fixes swimlaneViewByFieldName.
walterra Jan 22, 2019
15b4021
[ML] Fixes limit dropdown. Simplifies update of overall and view-by s…
walterra Jan 22, 2019
edb9db6
[ML] Fixes setting view-by to job when more than 1 job selected.
walterra Jan 22, 2019
d5179ee
[ML] Removes deprecated asyncs.
walterra Jan 22, 2019
155b6c9
Merge remote-tracking branch 'upstream/master' into ml-explorer-contr…
walterra Jan 22, 2019
7a735a5
[ML] Move loading indicator check in a better place.
walterra Jan 22, 2019
0449a86
[ML] Fixes swimlane selection issues.
walterra Jan 22, 2019
49b2fbd
[ML] Moved pure functions to explorer_utils.
walterra Jan 22, 2019
7db3323
[ML] Fixes a race condition where the Anomaly Explorer could end up s…
walterra Jan 23, 2019
94cd009
[ML] Fixes explorer_controller test to reflect code changes.
walterra Jan 23, 2019
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
876 changes: 846 additions & 30 deletions x-pack/plugins/ml/public/explorer/explorer.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
mlSelectSeverityService,
SEVERITY_OPTIONS,
} from '../../components/controls/select_severity/select_severity';
import { getChartContainerWidth } from './legacy_utils';
import { getChartContainerWidth } from '../legacy_utils';

import { CHART_TYPE } from '../explorer_constants';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jest.mock('../../util/string_utils', () => ({
mlEscape(d) { return d; }
}));

jest.mock('./legacy_utils', () => ({
jest.mock('../legacy_utils', () => ({
getChartContainerWidth() { return 1140; }
}));

Expand Down
15 changes: 15 additions & 0 deletions x-pack/plugins/ml/public/explorer/explorer_constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,22 @@
* Contains values for ML anomaly explorer.
*/

import { i18n } from '@kbn/i18n';

export const DRAG_SELECT_ACTION = {
NEW_SELECTION: 'newSelection',
ELEMENT_SELECT: 'elementSelect',
DRAG_START: 'dragStart'
};

export const EXPLORER_ACTION = {
INITIALIZE: 'initialize',
JOB_SELECTION_CHANGE: 'jobSelectionChange',
REDRAW: 'redraw',
REFRESH: 'refresh',
RENDER: 'render',
};

export const SWIMLANE_DEFAULT_LIMIT = 10;

export const SWIMLANE_TYPE = {
Expand All @@ -26,3 +36,8 @@ export const CHART_TYPE = {
POPULATION_DISTRIBUTION: 'population_distribution',
SINGLE_METRIC: 'single_metric',
};

export const MAX_CATEGORY_EXAMPLES = 10;
export const MAX_INFLUENCER_FIELD_VALUES = 10;

export const VIEW_BY_JOB_LABEL = i18n.translate('xpack.ml.explorer.jobIdLabel', { defaultMessage: 'job ID' });
Loading