| 
									
										
										
										
											2019-01-02 22:35:36 +08:00
										 |  |  | import { react2AngularDirective } from 'app/core/utils/react2angular'; | 
					
						
							|  |  |  | import { AnnotationQueryEditor } from './components/AnnotationQueryEditor'; | 
					
						
							| 
									
										
										
										
											2018-09-27 21:17:35 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | export class StackdriverAnnotationsQueryCtrl { | 
					
						
							|  |  |  |   static templateUrl = 'partials/annotations.editor.html'; | 
					
						
							|  |  |  |   annotation: any; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   constructor() { | 
					
						
							|  |  |  |     this.annotation.target = this.annotation.target || {}; | 
					
						
							| 
									
										
										
										
											2018-12-29 02:45:24 +08:00
										 |  |  |     this.handleQueryChange = this.handleQueryChange.bind(this); | 
					
						
							| 
									
										
										
										
											2019-01-02 22:35:36 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     react2AngularDirective('annotationQueryEditor', AnnotationQueryEditor, [ | 
					
						
							|  |  |  |       'target', | 
					
						
							|  |  |  |       'onQueryChange', | 
					
						
							|  |  |  |       'onExecuteQuery', | 
					
						
							|  |  |  |       ['datasource', { watchDepth: 'reference' }], | 
					
						
							|  |  |  |     ]); | 
					
						
							| 
									
										
										
										
											2018-12-29 02:45:24 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   handleQueryChange(target) { | 
					
						
							|  |  |  |     Object.assign(this.annotation.target, target); | 
					
						
							| 
									
										
										
										
											2018-09-27 21:17:35 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | } |