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
9fd76768
Commit
9fd76768
authored
Jul 25, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v3.1.x'
parents
6d28365e
0de0f4d0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
public/app/features/dashboard/dashboardSrv.js
+0
-4
public/app/features/templating/templateValuesSrv.js
+10
-8
No files found.
public/app/features/dashboard/dashboardSrv.js
View file @
9fd76768
...
...
@@ -16,10 +16,6 @@ function (angular, $, _, moment) {
data
=
{};
}
if
(
!
data
.
id
&&
data
.
version
)
{
data
.
schemaVersion
=
data
.
version
;
}
this
.
id
=
data
.
id
||
null
;
this
.
title
=
data
.
title
||
'No Title'
;
this
.
autoUpdate
=
data
.
autoUpdate
;
...
...
public/app/features/templating/templateValuesSrv.js
View file @
9fd76768
...
...
@@ -11,6 +11,7 @@ function (angular, _, $, kbn) {
module
.
service
(
'templateValuesSrv'
,
function
(
$q
,
$rootScope
,
datasourceSrv
,
$location
,
templateSrv
,
timeSrv
)
{
var
self
=
this
;
this
.
variableLock
=
{};
function
getNoneOption
()
{
return
{
text
:
'None'
,
value
:
''
,
isNone
:
true
};
}
...
...
@@ -101,6 +102,8 @@ function (angular, _, $, kbn) {
}
else
{
lock
.
resolve
();
}
}).
finally
(
function
()
{
delete
self
.
variableLock
[
variable
.
name
];
});
};
...
...
@@ -135,7 +138,7 @@ function (angular, _, $, kbn) {
templateSrv
.
setGrafanaVariable
(
'$__auto_interval'
,
interval
);
};
this
.
setVariableValue
=
function
(
variable
,
option
,
initPhase
)
{
this
.
setVariableValue
=
function
(
variable
,
option
)
{
variable
.
current
=
angular
.
copy
(
option
);
if
(
_
.
isArray
(
variable
.
current
.
text
))
{
...
...
@@ -145,13 +148,7 @@ function (angular, _, $, kbn) {
self
.
selectOptionsForCurrentValue
(
variable
);
templateSrv
.
updateTemplateData
();
// on first load, variable loading is ordered to ensure
// that parents are updated before children.
if
(
initPhase
)
{
return
$q
.
when
();
}
return
self
.
updateOptionsInChildVariables
(
variable
);
return
this
.
updateOptionsInChildVariables
(
variable
);
};
this
.
variableUpdated
=
function
(
variable
)
{
...
...
@@ -160,6 +157,11 @@ function (angular, _, $, kbn) {
};
this
.
updateOptionsInChildVariables
=
function
(
updatedVariable
)
{
// if there is a variable lock ignore cascading update because we are in a boot up scenario
if
(
self
.
variableLock
[
updatedVariable
.
name
])
{
return
$q
.
when
();
}
var
promises
=
_
.
map
(
self
.
variables
,
function
(
otherVariable
)
{
if
(
otherVariable
===
updatedVariable
)
{
return
;
...
...
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