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
48c4e549
Commit
48c4e549
authored
Apr 04, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "support panel repeat for datasource template variable (#7711)"
This reverts commit
554f972a
.
parent
dd800fd1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
18 deletions
+3
-18
public/app/core/services/datasource_srv.js
+2
-2
public/app/features/panel/metrics_panel_ctrl.ts
+1
-1
public/app/features/templating/datasource_variable.ts
+0
-15
No files found.
public/app/core/services/datasource_srv.js
View file @
48c4e549
...
...
@@ -14,12 +14,12 @@ function (angular, _, coreModule, config) {
this
.
datasources
=
{};
};
this
.
get
=
function
(
name
,
scopedDsVars
)
{
this
.
get
=
function
(
name
)
{
if
(
!
name
)
{
return
this
.
get
(
config
.
defaultDatasource
);
}
name
=
templateSrv
.
replace
(
name
,
scopedDsVars
||
{}
);
name
=
templateSrv
.
replace
(
name
);
if
(
name
===
'default'
)
{
return
this
.
get
(
config
.
defaultDatasource
);
...
...
public/app/features/panel/metrics_panel_ctrl.ts
View file @
48c4e549
...
...
@@ -92,7 +92,7 @@ class MetricsPanelCtrl extends PanelCtrl {
// load datasource service
this
.
setTimeQueryStart
();
this
.
datasourceSrv
.
get
(
this
.
panel
.
datasource
,
this
.
panel
.
scopedVars
)
this
.
datasourceSrv
.
get
(
this
.
panel
.
datasource
)
.
then
(
this
.
updateTimeRange
.
bind
(
this
))
.
then
(
this
.
issueQueries
.
bind
(
this
))
.
then
(
this
.
handleQueryResult
.
bind
(
this
))
...
...
public/app/features/templating/datasource_variable.ts
View file @
48c4e549
...
...
@@ -10,8 +10,6 @@ export class DatasourceVariable implements Variable {
query
:
string
;
options
:
any
;
current
:
any
;
multi
:
boolean
;
includeAll
:
boolean
;
refresh
:
any
;
defaults
=
{
...
...
@@ -23,8 +21,6 @@ export class DatasourceVariable implements Variable {
regex
:
''
,
options
:
[],
query
:
''
,
multi
:
false
,
includeAll
:
false
,
refresh
:
1
,
};
...
...
@@ -75,16 +71,9 @@ export class DatasourceVariable implements Variable {
}
this
.
options
=
options
;
if
(
this
.
includeAll
)
{
this
.
addAllOption
();
}
return
this
.
variableSrv
.
validateVariableSelectionState
(
this
);
}
addAllOption
()
{
this
.
options
.
unshift
({
text
:
'All'
,
value
:
"$__all"
});
}
dependsOn
(
variable
)
{
if
(
this
.
regex
)
{
return
containsVariable
(
this
.
regex
,
variable
.
name
);
...
...
@@ -97,9 +86,6 @@ export class DatasourceVariable implements Variable {
}
getValueForUrl
()
{
if
(
this
.
current
.
text
===
'All'
)
{
return
'All'
;
}
return
this
.
current
.
value
;
}
}
...
...
@@ -107,6 +93,5 @@ export class DatasourceVariable implements Variable {
variableTypes
[
'datasource'
]
=
{
name
:
'Datasource'
,
ctor
:
DatasourceVariable
,
supportsMulti
:
true
,
description
:
'Enabled you to dynamically switch the datasource for multiple panels'
,
};
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