mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Search: disabling UI on disconnect
This commit is contained in:
parent
78802372e1
commit
3900b60c76
3 changed files with 5 additions and 4 deletions
|
|
@ -388,13 +388,14 @@ public class NotebookRestApi {
|
|||
}
|
||||
|
||||
/**
|
||||
* Search for a Note
|
||||
* Search for a Notes
|
||||
*/
|
||||
@GET
|
||||
@Path("search")
|
||||
public Response search(@QueryParam("q") String query) {
|
||||
logger.info("Searching notebooks for {}", query);
|
||||
Map<String, String> notebooksFound = searchNotebooks(query);
|
||||
logger.info("Notbooks {} found", notebooksFound.size());
|
||||
return new JsonResponse<>(Status.OK, notebooksFound).build();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@ limitations under the License.
|
|||
ng-submit="search()">
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" ng-model="searchTerm"
|
||||
<input type="text" ng-model="searchTerm" ng-disabled="!navbar.connected"
|
||||
class="form-control" placeholder="Search your notebooks">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">
|
||||
<button type="submit" class="btn btn-default" ng-disabled="!navbar.connected">
|
||||
Search
|
||||
</button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ angular.module('zeppelinWebApp').service('searchService', function($http, baseUr
|
|||
$http
|
||||
.get(baseUrlSrv.getRestApiBase() + '/notebook/search?q=' + encQuery)
|
||||
.then(function successCallback(response) {
|
||||
console.log('Found: %o', response);
|
||||
console.log('Found: %o', response.data.body);
|
||||
//TODO(bzz): navigate to SearchResult page/controller
|
||||
}, function errorCallback(response) {
|
||||
console.log('Error: %o', response);
|
||||
|
|
|
|||
Loading…
Reference in a new issue