-
Results
+
-
+
@@ -244,7 +323,13 @@
-
No results found
+
+
+
+
diff --git a/x-pack/plugins/ml/public/jobs/new_job/simple/multi_metric/create_job/create_job_controller.js b/x-pack/plugins/ml/public/jobs/new_job/simple/multi_metric/create_job/create_job_controller.js
index 108683a14e0c8..b0dd5ffaca1ec 100644
--- a/x-pack/plugins/ml/public/jobs/new_job/simple/multi_metric/create_job/create_job_controller.js
+++ b/x-pack/plugins/ml/public/jobs/new_job/simple/multi_metric/create_job/create_job_controller.js
@@ -68,7 +68,8 @@ module
$scope,
$timeout,
Private,
- AppState) {
+ AppState,
+ i18n) {
timefilter.enableTimeRangeSelector();
timefilter.disableAutoRefreshSelector();
@@ -121,7 +122,21 @@ module
timeBasedIndexCheck(indexPattern, true);
const pageTitle = (savedSearch.id !== undefined) ?
- `saved search ${savedSearch.title}` : `index pattern ${indexPattern.title}`;
+ i18n('xpack.ml.newJob.simple.multiMetric.savedSearchPageTitle', {
+ defaultMessage: 'saved search {savedSearchTitle}',
+ values: { savedSearchTitle: savedSearch.title }
+ }) :
+ i18n('xpack.ml.newJob.simple.multiMetric.indexPatternPageTitle', {
+ defaultMessage: 'index pattern {indexPatternTitle}',
+ values: { indexPatternTitle: indexPattern.title }
+ });
+
+ $scope.analysisStoppingLabel = i18n('xpack.ml.newJob.simple.multiMetric.analysisStoppingLabel', {
+ defaultMessage: 'Analysis stopping'
+ });
+ $scope.stopAnalysisLabel = i18n('xpack.ml.newJob.simple.multiMetric.stopAnalysisLabel', {
+ defaultMessage: 'Stop analysis'
+ });
$scope.ui = {
indexPattern,
@@ -139,34 +154,54 @@ module
timeFields: [],
splitText: '',
intervals: [{
- title: 'Auto',
+ title: i18n('xpack.ml.newJob.simple.multiMetric.intervals.autoTitle', {
+ defaultMessage: 'Auto'
+ }),
value: 'auto',
}, {
- title: 'Millisecond',
+ title: i18n('xpack.ml.newJob.simple.multiMetric.intervals.millisecondTitle', {
+ defaultMessage: 'Millisecond'
+ }),
value: 'ms'
}, {
- title: 'Second',
+ title: i18n('xpack.ml.newJob.simple.multiMetric.intervals.secondTitle', {
+ defaultMessage: 'Second'
+ }),
value: 's'
}, {
- title: 'Minute',
+ title: i18n('xpack.ml.newJob.simple.multiMetric.intervals.minuteTitle', {
+ defaultMessage: 'Minute'
+ }),
value: 'm'
}, {
- title: 'Hourly',
+ title: i18n('xpack.ml.newJob.simple.multiMetric.intervals.hourlyTitle', {
+ defaultMessage: 'Hourly'
+ }),
value: 'h'
}, {
- title: 'Daily',
+ title: i18n('xpack.ml.newJob.simple.multiMetric.intervals.dailyTitle', {
+ defaultMessage: 'Daily'
+ }),
value: 'd'
}, {
- title: 'Weekly',
+ title: i18n('xpack.ml.newJob.simple.multiMetric.intervals.weeklyTitle', {
+ defaultMessage: 'Weekly'
+ }),
value: 'w'
}, {
- title: 'Monthly',
+ title: i18n('xpack.ml.newJob.simple.multiMetric.intervals.monthlyTitle', {
+ defaultMessage: 'Monthly'
+ }),
value: 'M'
}, {
- title: 'Yearly',
+ title: i18n('xpack.ml.newJob.simple.multiMetric.intervals.yearlyTitle', {
+ defaultMessage: 'Yearly'
+ }),
value: 'y'
}, {
- title: 'Custom',
+ title: i18n('xpack.ml.newJob.simple.multiMetric.intervals.customTitle', {
+ defaultMessage: 'Custom'
+ }),
value: 'custom'
}],
eventRateChartHeight: 100,
@@ -225,7 +260,10 @@ module
if (splitField !== undefined) {
$scope.addDefaultFieldsToInfluencerList();
- $scope.ui.splitText = 'Data split by ' + splitField.name;
+ $scope.ui.splitText = i18n('xpack.ml.newJob.simple.multiMetric.dataSplitByLabel', {
+ defaultMessage: 'Data split by {splitFieldName}',
+ values: { splitFieldName: splitField.name }
+ });
chartDataUtils.getSplitFields($scope.formConfig, $scope.formConfig.splitField.name, 10)
.then((resp) => {
@@ -279,7 +317,7 @@ module
function initAgg() {
_.each($scope.ui.aggTypeOptions, (agg) => {
- if (agg.title === 'Mean') {
+ if (agg.mlName === 'mean') {
$scope.formConfig.agg.type = agg;
}
});
@@ -455,8 +493,17 @@ module
saveNewDatafeed(job, true);
})
.catch((resp) => {
- msgs.error('Could not open job: ', resp);
- msgs.error('Job created, creating datafeed anyway');
+ msgs.error(
+ i18n('xpack.ml.newJob.simple.multiMetric.couldNotOpenJobErrorMessage', {
+ defaultMessage: 'Could not open job:'
+ }),
+ resp
+ );
+ msgs.error(
+ i18n('xpack.ml.newJob.simple.multiMetric.jobCreatedAndDatafeedCreatingAnywayErrorMessage', {
+ defaultMessage: 'Job created, creating datafeed anyway'
+ })
+ );
// if open failed, still attempt to create the datafeed
// as it may have failed because we've hit the limit of open jobs
saveNewDatafeed(job, false);
@@ -465,7 +512,12 @@ module
})
.catch((resp) => {
// save failed
- msgs.error('Save failed: ', resp.resp);
+ msgs.error(
+ i18n('xpack.ml.newJob.simple.multiMetric.saveFailedErrorMessage', {
+ defaultMessage: 'Save failed:'
+ }),
+ resp.resp
+ );
});
} else {
// show the advanced section as the model memory limit is invalid
@@ -508,12 +560,22 @@ module
})
.catch((resp) => {
// datafeed failed
- msgs.error('Could not start datafeed: ', resp);
+ msgs.error(
+ i18n('xpack.ml.newJob.simple.multiMetric.couldNotStartDatafeedErrorMessage', {
+ defaultMessage: 'Could not start datafeed:'
+ }),
+ resp
+ );
});
}
})
.catch((resp) => {
- msgs.error('Save datafeed failed: ', resp);
+ msgs.error(
+ i18n('xpack.ml.newJob.simple.multiMetric.saveDatafeedFailedErrorMessage', {
+ defaultMessage: 'Save datafeed failed:',
+ }),
+ resp
+ );
});
}
};