diff --git a/src/AnnotationQueryEditor.ts b/src/AnnotationQueryEditor.ts index 6c9dc12..6319e2b 100644 --- a/src/AnnotationQueryEditor.ts +++ b/src/AnnotationQueryEditor.ts @@ -14,19 +14,18 @@ * limitations under the License. * */ -import { defaultQuery, kinds } from './types'; +import { defaultQuery } from './types'; export class AnnotationQueryEditor { static templateUrl = 'partials/annotations.editor.html'; annotation: any; - kinds = kinds; constructor() { this.annotation.object_id = this.annotation.object_id || ''; this.annotation.namespace = this.annotation.namespace || ''; this.annotation.eventName = this.annotation.eventName || ''; // There is a conflict with annotation name, so rename it to eventName. - this.annotation.kind = this.annotation.kind || kinds[0]; + this.annotation.kind = this.annotation.kind || ''; this.annotation.limit = this.annotation.limit || defaultQuery.limit; } } diff --git a/src/datasource.ts b/src/datasource.ts index 6c50acb..935b79f 100644 --- a/src/datasource.ts +++ b/src/datasource.ts @@ -156,6 +156,7 @@ export class DataSource extends DataSourceApi { const val = (queryCloned as any)[q]; + // Handle variables. if (typeof val === 'string' && val.startsWith('$') && vars[val]) { (queryCloned as any)[q] = vars[val]; } diff --git a/src/partials/annotations.editor.html b/src/partials/annotations.editor.html index 1c2cf7d..5420b0e 100644 --- a/src/partials/annotations.editor.html +++ b/src/partials/annotations.editor.html @@ -16,11 +16,7 @@
- +