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] Fix Limit Dropdown, simplify state management of Anomaly Explorer. #23388

Merged
merged 22 commits into from
Sep 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ac284f0
[ML] Swimlanes don't rely on directive scope, gets now passed via lis…
walterra Sep 19, 2018
51a9852
[ML] Reduce swimlane state and event handling complexity.
walterra Sep 20, 2018
9534c0a
[ML] Trying to fix anomaly explorer issues.
walterra Sep 20, 2018
d1e245f
[ML] Fixes show charts button.
walterra Sep 20, 2018
f17a764
[ML] Fixes view by jobs swimlane selection.
walterra Sep 20, 2018
0993274
[ML] Fixes restoring selection from URL/AppState.
walterra Sep 20, 2018
db4b60b
[ML] Only trigger a swimlane update if the props are valid.
walterra Sep 20, 2018
e00fe01
[ML] Migrates the limit dropdown to use React.
walterra Sep 20, 2018
001acf9
[ML] Fixes comment.
walterra Sep 20, 2018
27ece03
[ML] Reuse updateExplorer() for the cell click listener.
walterra Sep 21, 2018
944285c
[ML] Revert if/else.
walterra Sep 21, 2018
69761a9
[ML] Simplifies the props required for the swimlanes.
walterra Sep 21, 2018
96e3b65
[ML] Don't pass bucket score around any longer.
walterra Sep 21, 2018
0a6b558
[ML] Fix selection when view by swimlanes are showing jobs.
walterra Sep 21, 2018
284705e
[ML] Remove unneccessary argument.
walterra Sep 21, 2018
b7342f0
[ML] Make sure to fetch AppState before updating and saving it.
walterra Sep 22, 2018
c71fcfc
[ML] Updated PropTypes and jest tests to reflect new structure and ev…
walterra Sep 22, 2018
193e710
Revert "[ML] Migrates the limit dropdown to use React."
walterra Sep 24, 2018
3e0b88a
[ML] Use a constant for the limit's default value.
walterra Sep 24, 2018
5d883e3
[ML] Use .some() instead of .forEach() to avoid unnecesary loops for …
walterra Sep 24, 2018
dab438e
[ML] Move the chartWidth of 800 to constant 'mockChartWidth'.
walterra Sep 24, 2018
144b2f2
[ML] Review feedback: Changed bucketScore check and tweaked swimlane …
walterra Sep 24, 2018
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
18 changes: 2 additions & 16 deletions x-pack/plugins/ml/public/explorer/explorer.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,7 @@
ng-mouseenter="setSwimlaneSelectActive(true)"
ng-mouseleave="setSwimlaneSelectActive(false)"
>
<ml-explorer-swimlane
swimlane-type="overall"
swimlane-data="overallSwimlaneData"
selected-job-ids="selectedJobIds"
chart-width="swimlaneWidth"
app-state="appState"
style="width: 100%; height: 250px;">
</ml-explorer-swimlane>
<ml-explorer-swimlane swimlane-type="overall" />
</div>

<div ng-if="viewBySwimlaneOptions.length > 0">
Expand Down Expand Up @@ -95,14 +88,7 @@
ng-mouseenter="setSwimlaneSelectActive(true)"
ng-mouseleave="setSwimlaneSelectActive(false)"
>
<ml-explorer-swimlane
swimlane-type="viewBy"
swimlane-data="viewBySwimlaneData"
selected-job-ids="selectedJobIds"
chart-width="swimlaneWidth"
app-state="appState"
style="width: 100%; height: 250px;">
</ml-explorer-swimlane>
<ml-explorer-swimlane swimlane-type="viewBy" />
</div>

<div ng-if="!showViewBySwimlane()" class="text-center visualize-error euiText">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ module.directive('mlExplorerChartsContainer', function (
element[0]
);
}

mlExplorerDashboardService.chartsInitDone.changed();
}

return {
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/ml/public/explorer/explorer_constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ export const DRAG_SELECT_ACTION = {
ELEMENT_SELECT: 'elementSelect',
DRAG_START: 'dragStart'
};

export const SWIMLANE_DEFAULT_LIMIT = 10;

export const SWIMLANE_TYPE = {
OVERALL: 'overall',
VIEW_BY: 'viewBy'
};
Loading