diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js b/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js index 0f3b4844028195..eed57aaf1b4918 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js +++ b/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js @@ -402,7 +402,14 @@ class RuleEditorFlyoutUI extends Component { } ) ); - this.closeFlyout(); + const updatedJob = mlJobService.getJob(anomaly.jobId); + const updatedDetector = updatedJob.analysis_config.detectors[detectorIndex]; + const updatedRules = updatedDetector.custom_rules; + if (!updatedRules) { + this.closeFlyout(); + } else { + this.setState({ job: { ...updatedJob } }); + } } else { toasts.addDanger( i18n.translate( diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/select_rule_action.js b/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/select_rule_action.js index 309e271ad26a41..c2f5820f84a9ee 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/select_rule_action.js +++ b/x-pack/plugins/ml/public/application/components/rule_editor/select_rule_action/select_rule_action.js @@ -32,7 +32,7 @@ export function SelectRuleAction({ if (rules.length > 0) { ruleActionPanels = rules.map((rule, index) => { return ( - + { diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_utils.js b/x-pack/plugins/ml/public/application/explorer/explorer_utils.js index f35a000b7f9e15..bd6a7ee59c942b 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_utils.js +++ b/x-pack/plugins/ml/public/application/explorer/explorer_utils.js @@ -715,7 +715,6 @@ export async function loadDataForCharts( (selectedCells !== undefined && Object.keys(selectedCells).length > 0) || influencersFilterQuery !== undefined ) { - console.log('Explorer anomaly charts data set:', resp.records); resolve(resp.records); } @@ -764,7 +763,6 @@ export function loadOverallData(selectedJobs, interval, bounds) { interval.asSeconds() ); - console.log('Explorer overall swimlane data set:', overallSwimlaneData); resolve({ loading: false, overallSwimlaneData, @@ -795,7 +793,6 @@ export function loadViewBySwimlane( getSwimlaneContainerWidth(noInfluencersConfigured) ).asSeconds() ); - console.log('Explorer view by swimlane data set:', viewBySwimlaneData); resolve({ viewBySwimlaneData, @@ -879,7 +876,6 @@ export async function loadTopInfluencers( ) .then((resp) => { // TODO - sort the influencers keys so that the partition field(s) are first. - console.log('Explorer top influencers data set:', resp.influencers); resolve(resp.influencers); }); } else { diff --git a/x-pack/plugins/ml/public/application/services/job_service.js b/x-pack/plugins/ml/public/application/services/job_service.js index ce485d883dcb61..a3be4795717028 100644 --- a/x-pack/plugins/ml/public/application/services/job_service.js +++ b/x-pack/plugins/ml/public/application/services/job_service.js @@ -412,8 +412,7 @@ class JobService { // return the promise chain return ml .updateJob({ jobId, job }) - .then((resp) => { - console.log('update job', resp); + .then(() => { return { success: true }; }) .catch((err) => { @@ -423,7 +422,7 @@ class JobService { values: { jobId }, }) ); - console.log('update job', err); + console.error('update job', err); return { success: false, message: err.message }; }); }