From 4662335f80e8234fd3fc7e000d30d41e45cdbc35 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 19 Dec 2018 21:34:13 +0100 Subject: [PATCH] add template variable type --- .../components/StackdriverPicker.tsx | 4 +++- public/app/types/templates.ts | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 public/app/types/templates.ts diff --git a/public/app/plugins/datasource/stackdriver/components/StackdriverPicker.tsx b/public/app/plugins/datasource/stackdriver/components/StackdriverPicker.tsx index 1cd9dcb1f53..49862bb2023 100644 --- a/public/app/plugins/datasource/stackdriver/components/StackdriverPicker.tsx +++ b/public/app/plugins/datasource/stackdriver/components/StackdriverPicker.tsx @@ -1,6 +1,8 @@ import React from 'react'; import _ from 'lodash'; + import Select from 'app/core/components/Select/Select'; +import { Variable } from 'app/types/templates'; export interface Props { onChange: (value: string) => void; @@ -10,7 +12,7 @@ export interface Props { placeholder?: string; className?: string; groupName?: string; - variables?: any[]; + variables?: Variable[]; } interface State { diff --git a/public/app/types/templates.ts b/public/app/types/templates.ts new file mode 100644 index 00000000000..98f94fe4251 --- /dev/null +++ b/public/app/types/templates.ts @@ -0,0 +1,19 @@ +export interface Variable { + datasource: any; + query: any; + regex: any; + sort: any; + options: any; + current: any; + refresh: number; + hide: number; + name: string; + multi: boolean; + includeAll: boolean; + useTags: boolean; + tagsQuery: string; + tagValuesQuery: string; + tags: any[]; + skipUrlSync: boolean; + definition: string; +}