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
fcf39a08
Commit
fcf39a08
authored
Nov 01, 2018
by
Erik Sundell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stackdriver: fix default value bug
parent
042d156e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx
+2
-2
public/app/plugins/datasource/stackdriver/functions.ts
+1
-1
No files found.
public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx
View file @
fcf39a08
...
...
@@ -57,7 +57,7 @@ export class StackdriverTemplateQueryComponent extends PureComponent<TemplateQue
metricTypes
,
selectedMetricType
,
metricDescriptors
,
...
await
this
.
getLabels
(
this
.
state
.
selectedMetricType
),
...
await
this
.
getLabels
(
selectedMetricType
),
};
this
.
setState
(
state
);
}
...
...
@@ -95,7 +95,7 @@ export class StackdriverTemplateQueryComponent extends PureComponent<TemplateQue
}
componentDidUpdate
()
{
const
{
metricDescriptors
,
labels
,
...
queryModel
}
=
this
.
state
;
const
{
metricDescriptors
,
labels
,
metricTypes
,
services
,
...
queryModel
}
=
this
.
state
;
this
.
props
.
onChange
(
queryModel
);
}
...
...
public/app/plugins/datasource/stackdriver/functions.ts
View file @
fcf39a08
...
...
@@ -12,7 +12,7 @@ export const getMetricTypes = (metricDescriptors, metricType, selectedService) =
name
:
m
.
displayName
,
}));
const
metricTypeExistInArray
=
metricTypes
.
some
(
m
=>
m
.
value
===
metricType
);
const
selectedMetricType
=
metricTypeExistInArray
?
metricType
ExistInArray
.
value
:
metricTypes
[
0
].
value
;
const
selectedMetricType
=
metricTypeExistInArray
?
metricType
:
metricTypes
[
0
].
value
;
return
{
metricTypes
,
selectedMetricType
,
...
...
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