Skip to content

Commit 3900b60

Browse files
committed
Search: disabling UI on disconnect
1 parent 7880237 commit 3900b60

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,14 @@ public Response getCronJob(@PathParam("notebookId") String notebookId) throws
388388
}
389389

390390
/**
391-
* Search for a Note
391+
* Search for a Notes
392392
*/
393393
@GET
394394
@Path("search")
395395
public Response search(@QueryParam("q") String query) {
396396
logger.info("Searching notebooks for {}", query);
397397
Map<String, String> notebooksFound = searchNotebooks(query);
398+
logger.info("Notbooks {} found", notebooksFound.size());
398399
return new JsonResponse<>(Status.OK, notebooksFound).build();
399400
}
400401

zeppelin-web/src/components/navbar/navbar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
ng-submit="search()">
5151

5252
<div class="form-group">
53-
<input type="text" ng-model="searchTerm"
53+
<input type="text" ng-model="searchTerm" ng-disabled="!navbar.connected"
5454
class="form-control" placeholder="Search your notebooks">
5555
</div>
56-
<button type="submit" class="btn btn-default">
56+
<button type="submit" class="btn btn-default" ng-disabled="!navbar.connected">
5757
Search
5858
</button>
5959
</form>

zeppelin-web/src/components/searchService/search.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ angular.module('zeppelinWebApp').service('searchService', function($http, baseUr
2424
$http
2525
.get(baseUrlSrv.getRestApiBase() + '/notebook/search?q=' + encQuery)
2626
.then(function successCallback(response) {
27-
console.log('Found: %o', response);
27+
console.log('Found: %o', response.data.body);
2828
//TODO(bzz): navigate to SearchResult page/controller
2929
}, function errorCallback(response) {
3030
console.log('Error: %o', response);

0 commit comments

Comments
 (0)