|  | @@ -2,7 +2,7 @@ import { isObject, get } from 'lodash'
 | 
											
												
													
														|  |  import { Observable, Subject, interval, map, of } from 'rxjs'
 |  |  import { Observable, Subject, interval, map, of } from 'rxjs'
 | 
											
												
													
														|  |  import { DataPrepService } from './dataprep.service'
 |  |  import { DataPrepService } from './dataprep.service'
 | 
											
												
													
														|  |  import _ = require("lodash")
 |  |  import _ = require("lodash")
 | 
											
												
													
														|  | -import { Conditions, DateRange, Storage } from '../types/interface'
 |  | 
 | 
											
												
													
														|  | 
 |  | +import { Conditions, DateRange, ObservableStorage, Storage, StorageLocation } from '../types/interface'
 | 
											
												
													
														|  |  export class SearchService {
 |  |  export class SearchService {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      private dataPrepService: DataPrepService
 |  |      private dataPrepService: DataPrepService
 | 
											
										
											
												
													
														|  | @@ -25,12 +25,16 @@ export class SearchService {
 | 
											
												
													
														|  |          let filteredResult: Subject<any> = new Subject()
 |  |          let filteredResult: Subject<any> = new Subject()
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          if (storage.type == 'observable') {
 |  |          if (storage.type == 'observable') {
 | 
											
												
													
														|  | -            let obsRef = storage.ref
 |  | 
 | 
											
												
													
														|  | 
 |  | +            // ObservableStorage
 | 
											
												
													
														|  | 
 |  | +            let currentStorage:ObservableStorage = storage;
 | 
											
												
													
														|  | 
 |  | +            let obsRef = currentStorage.ref
 | 
											
												
													
														|  |              obsRef.subscribe((element) => {
 |  |              obsRef.subscribe((element) => {
 | 
											
												
													
														|  |                  dataFromStorage.next(element)
 |  |                  dataFromStorage.next(element)
 | 
											
												
													
														|  |              })
 |  |              })
 | 
											
												
													
														|  |          } else {
 |  |          } else {
 | 
											
												
													
														|  | -            this.dataPrepService.loadObsData(storage, dataFromStorage)
 |  | 
 | 
											
												
													
														|  | 
 |  | +            // StorageLocation
 | 
											
												
													
														|  | 
 |  | +            let currentStorage:StorageLocation = storage;
 | 
											
												
													
														|  | 
 |  | +            this.dataPrepService.loadObsData(currentStorage, dataFromStorage)
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          this.filterFromObs(dataFromStorage, filteredResult, ...conditions)
 |  |          this.filterFromObs(dataFromStorage, filteredResult, ...conditions)
 |