diff --git a/src/legacy/core_plugins/kibana/public/context/api/anchor.js b/src/legacy/core_plugins/kibana/public/context/api/anchor.js index 4c541845251f6..c1d4823346b16 100644 --- a/src/legacy/core_plugins/kibana/public/context/api/anchor.js +++ b/src/legacy/core_plugins/kibana/public/context/api/anchor.js @@ -21,7 +21,7 @@ import _ from 'lodash'; import { SearchSourceProvider } from 'ui/courier'; -export function fetchAnchorProvider(indexPatterns, Private) { +export function fetchAnchorProvider(indexPatterns, Private, i18n) { const SearchSource = Private(SearchSourceProvider); return async function fetchAnchor( @@ -54,7 +54,9 @@ export function fetchAnchorProvider(indexPatterns, Private) { const response = await searchSource.fetch(); if (_.get(response, ['hits', 'total'], 0) < 1) { - throw new Error('Failed to load anchor document.'); + throw new Error(i18n('kbn.context.failedToLoadAnchorDocumentErrorDescription', { + defaultMessage: 'Failed to load anchor document.' + })); } return { diff --git a/src/legacy/core_plugins/kibana/public/context/app.html b/src/legacy/core_plugins/kibana/public/context/app.html index e1bca77170672..022e343df0a79 100644 --- a/src/legacy/core_plugins/kibana/public/context/app.html +++ b/src/legacy/core_plugins/kibana/public/context/app.html @@ -1,9 +1,16 @@
-
- Surrounding Documents in {{ contextApp.state.queryParameters.indexPatternId }} -
+
@@ -25,31 +32,46 @@
- - Failed to load the anchor document - +
- No searchable tiebreaker field could be found in the index pattern - {{ contextApp.state.queryParameters.indexPatternId}}. - - Please change the advanced setting - context:tieBreakerFields to include a valid field for this - index pattern.
- Please reload or visit - Discover - to select a valid anchor document. -
+ + + +
@@ -70,7 +92,13 @@ icon="'fa-chevron-up'" ng-click="contextApp.actions.fetchMorePredecessorRows()" > - Load {{ contextApp.state.queryParameters.defaultStepSize }} more + - newer documents + -
- Loading… -
+
@@ -136,7 +169,13 @@ icon="'fa-chevron-down'" ng-click="contextApp.actions.fetchMoreSuccessorRows()" > - Load {{ contextApp.state.queryParameters.defaultStepSize }} more + -
older documents
+
-
- Single Document -
+
@@ -17,7 +19,9 @@
Unknown Id
+ i18n-id="kbn.doc.unknownIdTitle" + i18n-default-message="Unknown Id" + >
@@ -28,14 +32,18 @@
- - Failed to locate document - +
-
- Unfortunately I could not find any documents matching that id, of that type, in that index. I tried really hard. I wanted it to be there. Sometimes I swear documents grow legs and just walk out of the index. Sneaky. I wish I could offer some advice here, something to make you feel better -
+
@@ -45,14 +53,18 @@
- - Failed to execute query - +
-
- Oh no. Something went very wrong. Its not just that I couldn't find your document, I couldn't even try. The index was missing, or the type. Go check out Elasticsearch, something isn't quite right here. -
+
@@ -60,9 +72,11 @@
-
- Loading… -
+