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
06910009
Commit
06910009
authored
Jul 06, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'reflect_panel_repeat_when_time_range_changed' of
https://github.com/mtanda/grafana
parents
aad76d92
f585d22c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
public/app/features/templating/templateValuesSrv.js
+14
-3
No files found.
public/app/features/templating/templateValuesSrv.js
View file @
06910009
...
...
@@ -8,7 +8,7 @@ function (angular, _, kbn) {
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'templateValuesSrv'
,
function
(
$q
,
$rootScope
,
datasourceSrv
,
$location
,
templateSrv
,
timeSrv
)
{
module
.
service
(
'templateValuesSrv'
,
function
(
$q
,
$rootScope
,
datasourceSrv
,
$location
,
templateSrv
,
timeSrv
,
dynamicDashboardSrv
)
{
var
self
=
this
;
function
getNoneOption
()
{
return
{
text
:
'None'
,
value
:
''
,
isNone
:
true
};
}
...
...
@@ -27,7 +27,17 @@ function (angular, _, kbn) {
.
filter
(
function
(
variable
)
{
return
variable
.
refresh
===
2
;
}).
map
(
function
(
variable
)
{
return
self
.
updateOptions
(
variable
);
var
previousVariable
=
angular
.
copy
(
variable
);
return
self
.
updateOptions
(
variable
).
then
(
function
()
{
return
self
.
variableUpdated
(
variable
).
then
(
function
()
{
var
updatedVariable
=
angular
.
copy
(
variable
);
delete
(
updatedVariable
.
$$hashKey
);
if
(
JSON
.
stringify
(
previousVariable
)
!==
JSON
.
stringify
(
updatedVariable
))
{
dynamicDashboardSrv
.
update
(
self
.
dashboard
);
$rootScope
.
$emit
(
'template-variable-value-updated'
);
}
});
});
});
return
$q
.
all
(
promises
);
...
...
@@ -35,6 +45,7 @@ function (angular, _, kbn) {
},
$rootScope
);
this
.
init
=
function
(
dashboard
)
{
this
.
dashboard
=
dashboard
;
this
.
variables
=
dashboard
.
templating
.
list
;
templateSrv
.
init
(
this
.
variables
);
...
...
@@ -145,7 +156,7 @@ function (angular, _, kbn) {
this
.
variableUpdated
=
function
(
variable
)
{
templateSrv
.
updateTemplateData
();
return
this
.
updateOptionsInChildVariables
(
variable
);
return
self
.
updateOptionsInChildVariables
(
variable
);
};
this
.
updateOptionsInChildVariables
=
function
(
updatedVariable
)
{
...
...
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