Commit 7204450b authored by Ujvari Gergely's avatar Ujvari Gergely

No search result found message added to StreamSearch

parent 2a673e1a
...@@ -132,6 +132,7 @@ class StreamSearch ...@@ -132,6 +132,7 @@ class StreamSearch
) -> ) ->
$scope.path = window.location.protocol + '//' + window.location.hostname + ':' + $scope.path = window.location.protocol + '//' + window.location.hostname + ':' +
window.location.port + '/__streamer__' window.location.port + '/__streamer__'
$scope.empty = false
# Generate client ID # Generate client ID
buffer = new Array(16) buffer = new Array(16)
...@@ -181,6 +182,7 @@ class StreamSearch ...@@ -181,6 +182,7 @@ class StreamSearch
original() original()
$scope.$apply -> $scope.$apply ->
$scope.annotations = [] $scope.annotations = []
$scope.empty = false
$location.search {} $location.search {}
$scope.initStream = (filter) -> $scope.initStream = (filter) ->
...@@ -206,8 +208,14 @@ class StreamSearch ...@@ -206,8 +208,14 @@ class StreamSearch
action = msg.data.options.action action = msg.data.options.action
unless data instanceof Array then data = [data] unless data instanceof Array then data = [data]
$scope.$apply => if data.length
$scope.manage_new_data data, action $scope.$apply =>
$scope.empty = false
$scope.manage_new_data data, action
else
unless $scope.annotations.length
$scope.$apply =>
$scope.empty = true
$scope.manage_new_data = (data, action) => $scope.manage_new_data = (data, action) =>
for annotation in data for annotation in data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment