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
c95a991c
Commit
c95a991c
authored
Oct 16, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(panel/common): fix for query letters when importing old dashboards, fixes #2943
parent
c320e9d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
public/app/features/dashboard/dashboardSrv.js
+15
-4
public/test/specs/dashboardSrv-specs.js
+8
-1
No files found.
public/app/features/dashboard/dashboardSrv.js
View file @
c95a991c
...
...
@@ -328,9 +328,20 @@ function (angular, $, kbn, _, moment) {
}
}
if
(
oldVersion
<
7
&&
old
.
nav
&&
old
.
nav
.
length
)
{
this
.
timepicker
=
old
.
nav
[
0
];
delete
this
.
nav
;
if
(
oldVersion
<
7
)
{
if
(
old
.
nav
&&
old
.
nav
.
length
)
{
this
.
timepicker
=
old
.
nav
[
0
];
delete
this
.
nav
;
}
// ensure query refIds
panelUpgrades
.
push
(
function
(
panel
)
{
_
.
each
(
panel
.
targets
,
function
(
target
)
{
if
(
!
target
.
refId
)
{
target
.
refId
=
this
.
getNextQueryLetter
(
panel
);
}
},
this
);
});
}
if
(
panelUpgrades
.
length
===
0
)
{
...
...
@@ -341,7 +352,7 @@ function (angular, $, kbn, _, moment) {
var
row
=
this
.
rows
[
i
];
for
(
j
=
0
;
j
<
row
.
panels
.
length
;
j
++
)
{
for
(
k
=
0
;
k
<
panelUpgrades
.
length
;
k
++
)
{
panelUpgrades
[
k
]
(
row
.
panels
[
j
]);
panelUpgrades
[
k
]
.
call
(
this
,
row
.
panels
[
j
]);
}
}
}
...
...
public/test/specs/dashboardSrv-specs.js
View file @
c95a991c
...
...
@@ -152,7 +152,10 @@ define([
rows
:
[
{
panels
:
[
{
type
:
'graphite'
,
legend
:
true
,
aliasYAxis
:
{
test
:
2
},
grid
:
{
min
:
1
,
max
:
10
}}
{
type
:
'graphite'
,
legend
:
true
,
aliasYAxis
:
{
test
:
2
},
grid
:
{
min
:
1
,
max
:
10
},
targets
:
[{
refId
:
'A'
},
{}],
}
]
}
]
...
...
@@ -178,6 +181,10 @@ define([
expect
(
graph
.
type
).
to
.
be
(
'graph'
);
});
it
(
'queries without refId should get it'
,
function
()
{
expect
(
graph
.
targets
[
1
].
refId
).
to
.
be
(
'B'
);
});
it
(
'update legend setting'
,
function
()
{
expect
(
graph
.
legend
.
show
).
to
.
be
(
true
);
});
...
...
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