mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
handle notebooks is search results
when search returns a link to a notebook itself (as opposite to a specific paragraph in it)
This commit is contained in:
parent
7d06686bdc
commit
00f0315350
1 changed files with 6 additions and 0 deletions
|
|
@ -22,6 +22,12 @@ angular
|
|||
|
||||
results.$promise.then(function(result) {
|
||||
$scope.notes = result.body.map(function(note) {
|
||||
// redirect to notebook when search result is a notebook itself,
|
||||
// not a paragraph
|
||||
if (!/\/paragraph\//.test(note.id)) {
|
||||
return note;
|
||||
}
|
||||
|
||||
note.id = note.id.replace('paragraph/', '?paragraph=') +
|
||||
'&term=' +
|
||||
$routeParams.searchTerm;
|
||||
|
|
|
|||
Loading…
Reference in a new issue