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
ff762c21
Commit
ff762c21
authored
Dec 19, 2018
by
Erik Sundell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename selected prop
parent
3ca5abf5
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 @
ff762c21
...
...
@@ -6,7 +6,7 @@ export interface Props {
onChange
:
(
value
:
string
)
=>
void
;
options
:
any
[];
isSearchable
:
boolean
;
selected
:
string
;
value
:
string
;
placeholder
?:
string
;
className
?:
string
;
groupName
?:
string
;
...
...
@@ -41,7 +41,7 @@ export class StackdriverPicker extends React.Component<Props, State> {
shouldComponentUpdate
(
nextProps
:
Props
)
{
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
})
{
...
...
@@ -70,7 +70,7 @@ export class StackdriverPicker extends React.Component<Props, State> {
getSelectedOption
()
{
const
{
options
}
=
this
.
state
;
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
()
{
...
...
public/app/plugins/datasource/stackdriver/partials/query.aggregation.html
View file @
ff762c21
...
...
@@ -3,7 +3,7 @@
<label
class=
"gf-form-label query-keyword width-9"
>
Aggregation
</label>
<stackdriver-picker
onChange=
"ctrl.handleAggregationChange"
selected
=
"ctrl.target.aggregation.crossSeriesReducer"
value
=
"ctrl.target.aggregation.crossSeriesReducer"
options=
"ctrl.aggOptions"
is-searchable=
"true"
placeholder=
"'Select Aggregation'"
...
...
@@ -26,7 +26,7 @@
<label
class=
"gf-form-label query-keyword width-15"
>
Aligner
</label>
<stackdriver-picker
onChange=
"ctrl.handleAlignmentChange"
selected
=
"ctrl.target.aggregation.perSeriesAligner"
value
=
"ctrl.target.aggregation.perSeriesAligner"
options=
"ctrl.alignOptions"
is-searchable=
"true"
placeholder=
"'Select Alignment'"
...
...
@@ -43,7 +43,7 @@
<label
class=
"gf-form-label query-keyword width-9"
>
Alignment Period
</label>
<stackdriver-picker
onChange=
"ctrl.handleAlignmentPeriodChange"
selected
=
"ctrl.target.aggregation.alignmentPeriod"
value
=
"ctrl.target.aggregation.alignmentPeriod"
options=
"ctrl.alignmentPeriods"
is-searchable=
"true"
placeholder=
"'Select Alignment'"
...
...
public/app/plugins/datasource/stackdriver/partials/query.filter.html
View file @
ff762c21
...
...
@@ -3,7 +3,7 @@
<span
class=
"gf-form-label width-9 query-keyword"
>
Service
</span>
<stackdriver-picker
onChange=
"ctrl.handleServiceChange"
selected
=
"ctrl.target.service"
value
=
"ctrl.target.service"
options=
"ctrl.services"
is-searchable=
"false"
placeholder=
"'Select Services'"
...
...
@@ -17,7 +17,7 @@
<span
class=
"gf-form-label width-9 query-keyword"
>
Metric
</span>
<stackdriver-picker
onChange=
"ctrl.handleMetricTypeChange"
selected
=
"ctrl.target.metricType"
value
=
"ctrl.target.metricType"
options=
"ctrl.getMetricsList()"
template-variables=
"ctrl.templateSrv.variables"
group-name=
"'Metric Types'"
...
...
public/app/plugins/datasource/stackdriver/query_ctrl.ts
View file @
ff762c21
...
...
@@ -66,7 +66,7 @@ export class StackdriverQueryCtrl extends QueryCtrl {
react2AngularDirective
(
'stackdriverPicker'
,
StackdriverPicker
,
[
'options'
,
'onChange'
,
'
selected
'
,
'
value
'
,
'isSearchable'
,
'className'
,
'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