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
f47542db
Commit
f47542db
authored
Feb 19, 2018
by
Mitsuhiro Tanda
Committed by
Torkel Ödegaard
Feb 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrate panels in collapsed rows (#10948)
parent
a1d79997
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletions
+14
-1
public/app/features/dashboard/dashboard_migration.ts
+6
-1
public/app/features/dashboard/specs/dashboard_migration.jest.ts
+8
-0
No files found.
public/app/features/dashboard/dashboard_migration.ts
View file @
f47542db
...
...
@@ -18,7 +18,7 @@ export class DashboardMigrator {
}
updateSchema
(
old
)
{
var
i
,
j
,
k
;
var
i
,
j
,
k
,
n
;
var
oldVersion
=
this
.
dashboard
.
schemaVersion
;
var
panelUpgrades
=
[];
this
.
dashboard
.
schemaVersion
=
16
;
...
...
@@ -372,6 +372,11 @@ export class DashboardMigrator {
for
(
j
=
0
;
j
<
this
.
dashboard
.
panels
.
length
;
j
++
)
{
for
(
k
=
0
;
k
<
panelUpgrades
.
length
;
k
++
)
{
panelUpgrades
[
k
].
call
(
this
,
this
.
dashboard
.
panels
[
j
]);
if
(
this
.
dashboard
.
panels
[
j
].
panels
)
{
for
(
n
=
0
;
n
<
this
.
dashboard
.
panels
[
j
].
panels
.
length
;
n
++
)
{
panelUpgrades
[
k
].
call
(
this
,
this
.
dashboard
.
panels
[
j
].
panels
[
n
]);
}
}
}
}
}
...
...
public/app/features/dashboard/specs/dashboard_migration.jest.ts
View file @
f47542db
...
...
@@ -371,6 +371,14 @@ describe('DashboardModel', function() {
let
dashboard
=
new
DashboardModel
(
model
);
expect
(
dashboard
.
panels
[
0
].
minSpan
).
toBe
(
24
);
});
it
(
'should assign id'
,
function
()
{
model
.
rows
=
[
createRow
({
collapse
:
true
,
height
:
8
},
[[
6
],
[
6
]])];
model
.
rows
[
0
].
panels
[
0
]
=
{
};
let
dashboard
=
new
DashboardModel
(
model
);
expect
(
dashboard
.
panels
[
0
].
id
).
toBe
(
1
);
});
});
});
...
...
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