forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Convert anomalies controls to EUI / React (elastic#19856)
* [ML] Convert anomalies controls to EUI / React * [ML] Edits to anomaly controls following review
- Loading branch information
1 parent
ae94b09
commit 54dfc15
Showing
21 changed files
with
357 additions
and
265 deletions.
There are no files selected for viewing
4 changes: 0 additions & 4 deletions
4
x-pack/plugins/ml/public/components/controls/checkbox_showcharts/checkbox_showcharts.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...lugins/ml/public/components/controls/checkbox_showcharts/checkbox_showcharts_directive.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
|
||
import 'ngreact'; | ||
|
||
import { stateFactoryProvider } from 'plugins/ml/factories/state_factory'; | ||
|
||
import { uiModules } from 'ui/modules'; | ||
const module = uiModules.get('apps/ml', ['react']); | ||
|
||
import { CheckboxShowCharts } from './checkbox_showcharts'; | ||
|
||
module.service('mlCheckboxShowChartsService', function (Private) { | ||
const stateFactory = Private(stateFactoryProvider); | ||
this.state = stateFactory('mlCheckboxShowCharts', { | ||
showCharts: true | ||
}); | ||
}) | ||
.directive('mlCheckboxShowCharts', function ($injector) { | ||
const reactDirective = $injector.get('reactDirective'); | ||
const mlCheckboxShowChartsService = $injector.get('mlCheckboxShowChartsService'); | ||
|
||
return reactDirective( | ||
CheckboxShowCharts, | ||
undefined, | ||
{ restrict: 'E' }, | ||
{ mlCheckboxShowChartsService } | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,4 @@ | |
*/ | ||
|
||
|
||
|
||
import './checkbox_showcharts'; | ||
import './checkbox_showcharts_directive'; |
44 changes: 0 additions & 44 deletions
44
x-pack/plugins/ml/public/components/controls/select_interval/__tests__/select_interval.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,4 @@ | |
*/ | ||
|
||
|
||
|
||
import './select_interval.js'; | ||
import './select_interval_directive'; |
8 changes: 0 additions & 8 deletions
8
x-pack/plugins/ml/public/components/controls/select_interval/select_interval.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
x-pack/plugins/ml/public/components/controls/select_interval/select_interval_directive.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
|
||
import 'ngreact'; | ||
|
||
import { stateFactoryProvider } from 'plugins/ml/factories/state_factory'; | ||
|
||
import { uiModules } from 'ui/modules'; | ||
const module = uiModules.get('apps/ml', ['react']); | ||
|
||
import { SelectInterval } from './select_interval'; | ||
|
||
module.service('mlSelectIntervalService', function (Private) { | ||
const stateFactory = Private(stateFactoryProvider); | ||
this.state = stateFactory('mlSelectInterval', { | ||
interval: { display: 'Auto', val: 'auto' } | ||
}); | ||
}) | ||
.directive('mlSelectInterval', function ($injector) { | ||
const reactDirective = $injector.get('reactDirective'); | ||
const mlSelectIntervalService = $injector.get('mlSelectIntervalService'); | ||
|
||
return reactDirective( | ||
SelectInterval, | ||
undefined, | ||
{ restrict: 'E' }, | ||
{ mlSelectIntervalService } | ||
); | ||
}); |
44 changes: 0 additions & 44 deletions
44
x-pack/plugins/ml/public/components/controls/select_severity/__tests__/select_severity.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ | |
*/ | ||
|
||
|
||
|
||
import './select_severity.js'; | ||
import './select_severity_directive'; | ||
import './styles/main.less'; |
Oops, something went wrong.