diff --git a/src/ui/public/doc_table/components/table_row.js b/src/ui/public/doc_table/components/table_row.js
index 530ddb996c3a98..f75ccb8e518eb2 100644
--- a/src/ui/public/doc_table/components/table_row.js
+++ b/src/ui/public/doc_table/components/table_row.js
@@ -1,5 +1,6 @@
import _ from 'lodash';
import $ from 'jquery';
+import rison from 'rison-node';
import 'ui/highlight';
import 'ui/highlight/highlight_tags';
import 'ui/doc_viewer';
@@ -24,7 +25,7 @@ let MIN_LINE_LENGTH = 20;
*
* ```
*/
-module.directive('kbnTableRow', function ($compile) {
+module.directive('kbnTableRow', function ($compile, $httpParamSerializer) {
let cellTemplate = _.template(noWhiteSpace(require('ui/doc_table/components/table_row/cell.html')));
let truncateByHeightTemplate = _.template(noWhiteSpace(require('ui/partials/truncate_by_height.html')));
@@ -87,6 +88,16 @@ module.directive('kbnTableRow', function ($compile) {
createSummaryRow($scope.row, $scope.row._id);
});
+ $scope.getContextAppHref = () => {
+ return `#/context/${$scope.indexPattern.id}/${$scope.row._type}/${$scope.row._id}?${
+ $httpParamSerializer({
+ _a: rison.encode({
+ columns: $scope.columns,
+ }),
+ })
+ }`;
+ };
+
// create a tr element that lists the value for each *column*
function createSummaryRow(row) {
let indexPattern = $scope.indexPattern;
diff --git a/src/ui/public/doc_table/components/table_row/details.html b/src/ui/public/doc_table/components/table_row/details.html
index d83d868dbefeb1..a5f968e0936666 100644
--- a/src/ui/public/doc_table/components/table_row/details.html
+++ b/src/ui/public/doc_table/components/table_row/details.html
@@ -2,5 +2,8 @@
Link to /{{row._index}}/{{row._type}}/{{row._id | uriescape}}
+
+ View surrounding entries
+
-
\ No newline at end of file
+