Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
7b1aed6c
Commit
7b1aed6c
authored
Jan 14, 2019
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stackdriver: converts some variables from any to types
parent
18abb87c
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
27 additions
and
14 deletions
+27
-14
public/app/plugins/datasource/stackdriver/annotations_query_ctrl.ts
+3
-1
public/app/plugins/datasource/stackdriver/components/Aggregations.test.tsx
+2
-1
public/app/plugins/datasource/stackdriver/components/Aggregations.tsx
+2
-1
public/app/plugins/datasource/stackdriver/components/AlignmentPeriods.tsx
+2
-1
public/app/plugins/datasource/stackdriver/components/Alignments.tsx
+4
-2
public/app/plugins/datasource/stackdriver/components/Filter.tsx
+4
-2
public/app/plugins/datasource/stackdriver/components/Metrics.tsx
+2
-1
public/app/plugins/datasource/stackdriver/components/QueryEditor.test.tsx
+1
-1
public/app/plugins/datasource/stackdriver/components/QueryEditor.tsx
+4
-2
public/app/plugins/datasource/stackdriver/components/__snapshots__/QueryEditor.test.tsx.snap
+1
-1
public/app/plugins/datasource/stackdriver/query_ctrl.ts
+2
-1
No files found.
public/app/plugins/datasource/stackdriver/annotations_query_ctrl.ts
View file @
7b1aed6c
import
{
TemplateSrv
}
from
'app/features/templating/template_srv'
;
export
class
StackdriverAnnotationsQueryCtrl
{
static
templateUrl
=
'partials/annotations.editor.html'
;
annotation
:
any
;
templateSrv
:
any
;
templateSrv
:
TemplateSrv
;
/** @ngInject */
constructor
(
templateSrv
)
{
...
...
public/app/plugins/datasource/stackdriver/components/Aggregations.test.tsx
View file @
7b1aed6c
...
...
@@ -3,10 +3,11 @@ import renderer from 'react-test-renderer';
import
{
Aggregations
,
Props
}
from
'./Aggregations'
;
import
{
shallow
}
from
'enzyme'
;
import
{
ValueTypes
,
MetricKind
}
from
'../constants'
;
import
{
TemplateSrvStub
}
from
'test/specs/helpers'
;
const
props
:
Props
=
{
onChange
:
()
=>
{},
templateSrv
:
{}
,
templateSrv
:
new
TemplateSrvStub
()
,
metricDescriptor
:
{
valueType
:
''
,
metricKind
:
''
,
...
...
public/app/plugins/datasource/stackdriver/components/Aggregations.tsx
View file @
7b1aed6c
...
...
@@ -3,10 +3,11 @@ import _ from 'lodash';
import
{
MetricSelect
}
from
'app/core/components/Select/MetricSelect'
;
import
{
getAggregationOptionsByMetric
}
from
'../functions'
;
import
{
TemplateSrv
}
from
'app/features/templating/template_srv'
;
export
interface
Props
{
onChange
:
(
metricDescriptor
)
=>
void
;
templateSrv
:
any
;
templateSrv
:
TemplateSrv
;
metricDescriptor
:
{
valueType
:
string
;
metricKind
:
string
;
...
...
public/app/plugins/datasource/stackdriver/components/AlignmentPeriods.tsx
View file @
7b1aed6c
...
...
@@ -4,10 +4,11 @@ import _ from 'lodash';
import
kbn
from
'app/core/utils/kbn'
;
import
{
MetricSelect
}
from
'app/core/components/Select/MetricSelect'
;
import
{
alignmentPeriods
,
alignOptions
}
from
'../constants'
;
import
{
TemplateSrv
}
from
'app/features/templating/template_srv'
;
export
interface
Props
{
onChange
:
(
alignmentPeriod
)
=>
void
;
templateSrv
:
any
;
templateSrv
:
TemplateSrv
;
alignmentPeriod
:
string
;
perSeriesAligner
:
string
;
usedAlignmentPeriod
:
string
;
...
...
public/app/plugins/datasource/stackdriver/components/Alignments.tsx
View file @
7b1aed6c
...
...
@@ -2,11 +2,13 @@ import React, { SFC } from 'react';
import
_
from
'lodash'
;
import
{
MetricSelect
}
from
'app/core/components/Select/MetricSelect'
;
import
{
TemplateSrv
}
from
'app/features/templating/template_srv'
;
import
{
SelectOptionItem
}
from
'@grafana/ui'
;
export
interface
Props
{
onChange
:
(
perSeriesAligner
)
=>
void
;
templateSrv
:
any
;
alignOptions
:
any
[];
templateSrv
:
TemplateSrv
;
alignOptions
:
SelectOptionItem
[];
perSeriesAligner
:
string
;
}
...
...
public/app/plugins/datasource/stackdriver/components/Filter.tsx
View file @
7b1aed6c
...
...
@@ -4,16 +4,18 @@ import appEvents from 'app/core/app_events';
import
{
QueryMeta
}
from
'../types'
;
import
{
getAngularLoader
,
AngularComponent
}
from
'app/core/services/AngularLoader'
;
import
{
TemplateSrv
}
from
'app/features/templating/template_srv'
;
import
StackdriverDatasource
from
'../datasource'
;
import
'../query_filter_ctrl'
;
export
interface
Props
{
filtersChanged
:
(
filters
:
string
[])
=>
void
;
groupBysChanged
?:
(
groupBys
:
string
[])
=>
void
;
metricType
:
string
;
templateSrv
:
any
;
templateSrv
:
TemplateSrv
;
groupBys
?:
string
[];
filters
:
string
[];
datasource
:
any
;
datasource
:
StackdriverDatasource
;
refId
:
string
;
hideGroupBys
:
boolean
;
}
...
...
public/app/plugins/datasource/stackdriver/components/Metrics.tsx
View file @
7b1aed6c
...
...
@@ -5,10 +5,11 @@ import StackdriverDatasource from '../datasource';
import
appEvents
from
'app/core/app_events'
;
import
{
MetricDescriptor
}
from
'../types'
;
import
{
MetricSelect
}
from
'app/core/components/Select/MetricSelect'
;
import
{
TemplateSrv
}
from
'app/features/templating/template_srv'
;
export
interface
Props
{
onChange
:
(
metricDescriptor
:
MetricDescriptor
)
=>
void
;
templateSrv
:
any
;
templateSrv
:
TemplateSrv
;
datasource
:
StackdriverDatasource
;
defaultProject
:
string
;
metricType
:
string
;
...
...
public/app/plugins/datasource/stackdriver/components/QueryEditor.test.tsx
View file @
7b1aed6c
...
...
@@ -11,7 +11,7 @@ const props: Props = {
datasource
:
{
getDefaultProject
:
()
=>
Promise
.
resolve
(
'project'
),
getMetricTypes
:
()
=>
Promise
.
resolve
([]),
},
}
as
any
,
templateSrv
:
new
TemplateSrv
(),
};
...
...
public/app/plugins/datasource/stackdriver/components/QueryEditor.tsx
View file @
7b1aed6c
...
...
@@ -12,18 +12,20 @@ import { AliasBy } from './AliasBy';
import
{
Help
}
from
'./Help'
;
import
{
Target
,
MetricDescriptor
}
from
'../types'
;
import
{
getAlignmentPickerData
}
from
'../functions'
;
import
StackdriverDatasource
from
'../datasource'
;
import
{
SelectOptionItem
}
from
'@grafana/ui'
;
export
interface
Props
{
onQueryChange
:
(
target
:
Target
)
=>
void
;
onExecuteQuery
:
()
=>
void
;
target
:
Target
;
events
:
any
;
datasource
:
any
;
datasource
:
StackdriverDatasource
;
templateSrv
:
TemplateSrv
;
}
interface
State
extends
Target
{
alignOptions
:
any
[];
alignOptions
:
SelectOptionItem
[];
lastQuery
:
string
;
lastQueryError
:
string
;
[
key
:
string
]:
any
;
...
...
public/app/plugins/datasource/stackdriver/components/__snapshots__/QueryEditor.test.tsx.snap
View file @
7b1aed6c
...
...
@@ -436,7 +436,7 @@ Array [
onClick={[Function]}
>
<label
className="gf-form-label query-keyword"
className="gf-form-label query-keyword
pointer
"
>
Show Help
<i
...
...
public/app/plugins/datasource/stackdriver/query_ctrl.ts
View file @
7b1aed6c
...
...
@@ -2,10 +2,11 @@ import _ from 'lodash';
import
{
QueryCtrl
}
from
'app/plugins/sdk'
;
import
{
Target
}
from
'./types'
;
import
{
TemplateSrv
}
from
'app/features/templating/template_srv'
;
export
class
StackdriverQueryCtrl
extends
QueryCtrl
{
static
templateUrl
=
'partials/query.editor.html'
;
templateSrv
:
any
;
templateSrv
:
TemplateSrv
;
/** @ngInject */
constructor
(
$scope
,
$injector
,
templateSrv
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment