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
cf50cf16
Commit
cf50cf16
authored
Dec 19, 2018
by
Erik Sundell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename selected prop
parent
ed673d35
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
public/app/plugins/datasource/stackdriver/components/StackdriverPicker.tsx
+3
-3
public/app/plugins/datasource/stackdriver/partials/query.aggregation.html
+3
-3
public/app/plugins/datasource/stackdriver/partials/query.filter.html
+2
-2
public/app/plugins/datasource/stackdriver/query_ctrl.ts
+1
-1
No files found.
public/app/plugins/datasource/stackdriver/components/StackdriverPicker.tsx
View file @
cf50cf16
...
@@ -6,7 +6,7 @@ export interface Props {
...
@@ -6,7 +6,7 @@ export interface Props {
onChange
:
(
value
:
string
)
=>
void
;
onChange
:
(
value
:
string
)
=>
void
;
options
:
any
[];
options
:
any
[];
isSearchable
:
boolean
;
isSearchable
:
boolean
;
selected
:
string
;
value
:
string
;
placeholder
?:
string
;
placeholder
?:
string
;
className
?:
string
;
className
?:
string
;
groupName
?:
string
;
groupName
?:
string
;
...
@@ -41,7 +41,7 @@ export class StackdriverPicker extends React.Component<Props, State> {
...
@@ -41,7 +41,7 @@ export class StackdriverPicker extends React.Component<Props, State> {
shouldComponentUpdate
(
nextProps
:
Props
)
{
shouldComponentUpdate
(
nextProps
:
Props
)
{
const
nextOptions
=
this
.
buildOptions
(
nextProps
);
const
nextOptions
=
this
.
buildOptions
(
nextProps
);
return
nextProps
.
selected
!==
this
.
props
.
selected
||
!
_
.
isEqual
(
nextOptions
,
this
.
state
.
options
);
return
nextProps
.
value
!==
this
.
props
.
value
||
!
_
.
isEqual
(
nextOptions
,
this
.
state
.
options
);
}
}
buildOptions
({
templateVariables
=
[],
groupName
=
''
,
options
})
{
buildOptions
({
templateVariables
=
[],
groupName
=
''
,
options
})
{
...
@@ -70,7 +70,7 @@ export class StackdriverPicker extends React.Component<Props, State> {
...
@@ -70,7 +70,7 @@ export class StackdriverPicker extends React.Component<Props, State> {
getSelectedOption
()
{
getSelectedOption
()
{
const
{
options
}
=
this
.
state
;
const
{
options
}
=
this
.
state
;
const
allOptions
=
options
.
every
(
o
=>
o
.
options
)
?
_
.
flatten
(
options
.
map
(
o
=>
o
.
options
))
:
options
;
const
allOptions
=
options
.
every
(
o
=>
o
.
options
)
?
_
.
flatten
(
options
.
map
(
o
=>
o
.
options
))
:
options
;
return
allOptions
.
find
(
option
=>
option
.
value
===
this
.
props
.
selected
);
return
allOptions
.
find
(
option
=>
option
.
value
===
this
.
props
.
value
);
}
}
render
()
{
render
()
{
...
...
public/app/plugins/datasource/stackdriver/partials/query.aggregation.html
View file @
cf50cf16
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<label
class=
"gf-form-label query-keyword width-9"
>
Aggregation
</label>
<label
class=
"gf-form-label query-keyword width-9"
>
Aggregation
</label>
<stackdriver-picker
<stackdriver-picker
onChange=
"ctrl.handleAggregationChange"
onChange=
"ctrl.handleAggregationChange"
selected
=
"ctrl.target.aggregation.crossSeriesReducer"
value
=
"ctrl.target.aggregation.crossSeriesReducer"
options=
"ctrl.aggOptions"
options=
"ctrl.aggOptions"
is-searchable=
"true"
is-searchable=
"true"
placeholder=
"'Select Aggregation'"
placeholder=
"'Select Aggregation'"
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<label
class=
"gf-form-label query-keyword width-15"
>
Aligner
</label>
<label
class=
"gf-form-label query-keyword width-15"
>
Aligner
</label>
<stackdriver-picker
<stackdriver-picker
onChange=
"ctrl.handleAlignmentChange"
onChange=
"ctrl.handleAlignmentChange"
selected
=
"ctrl.target.aggregation.perSeriesAligner"
value
=
"ctrl.target.aggregation.perSeriesAligner"
options=
"ctrl.alignOptions"
options=
"ctrl.alignOptions"
is-searchable=
"true"
is-searchable=
"true"
placeholder=
"'Select Alignment'"
placeholder=
"'Select Alignment'"
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<label
class=
"gf-form-label query-keyword width-9"
>
Alignment Period
</label>
<label
class=
"gf-form-label query-keyword width-9"
>
Alignment Period
</label>
<stackdriver-picker
<stackdriver-picker
onChange=
"ctrl.handleAlignmentPeriodChange"
onChange=
"ctrl.handleAlignmentPeriodChange"
selected
=
"ctrl.target.aggregation.alignmentPeriod"
value
=
"ctrl.target.aggregation.alignmentPeriod"
options=
"ctrl.alignmentPeriods"
options=
"ctrl.alignmentPeriods"
is-searchable=
"true"
is-searchable=
"true"
placeholder=
"'Select Alignment'"
placeholder=
"'Select Alignment'"
...
...
public/app/plugins/datasource/stackdriver/partials/query.filter.html
View file @
cf50cf16
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<span
class=
"gf-form-label width-9 query-keyword"
>
Service
</span>
<span
class=
"gf-form-label width-9 query-keyword"
>
Service
</span>
<stackdriver-picker
<stackdriver-picker
onChange=
"ctrl.handleServiceChange"
onChange=
"ctrl.handleServiceChange"
selected
=
"ctrl.target.service"
value
=
"ctrl.target.service"
options=
"ctrl.services"
options=
"ctrl.services"
is-searchable=
"false"
is-searchable=
"false"
placeholder=
"'Select Services'"
placeholder=
"'Select Services'"
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<span
class=
"gf-form-label width-9 query-keyword"
>
Metric
</span>
<span
class=
"gf-form-label width-9 query-keyword"
>
Metric
</span>
<stackdriver-picker
<stackdriver-picker
onChange=
"ctrl.handleMetricTypeChange"
onChange=
"ctrl.handleMetricTypeChange"
selected
=
"ctrl.target.metricType"
value
=
"ctrl.target.metricType"
options=
"ctrl.getMetricsList()"
options=
"ctrl.getMetricsList()"
template-variables=
"ctrl.templateSrv.variables"
template-variables=
"ctrl.templateSrv.variables"
group-name=
"'Metric Types'"
group-name=
"'Metric Types'"
...
...
public/app/plugins/datasource/stackdriver/query_ctrl.ts
View file @
cf50cf16
...
@@ -66,7 +66,7 @@ export class StackdriverQueryCtrl extends QueryCtrl {
...
@@ -66,7 +66,7 @@ export class StackdriverQueryCtrl extends QueryCtrl {
react2AngularDirective
(
'stackdriverPicker'
,
StackdriverPicker
,
[
react2AngularDirective
(
'stackdriverPicker'
,
StackdriverPicker
,
[
'options'
,
'options'
,
'onChange'
,
'onChange'
,
'
selected
'
,
'
value
'
,
'isSearchable'
,
'isSearchable'
,
'className'
,
'className'
,
'placeholder'
,
'placeholder'
,
...
...
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