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
40b771c0
Unverified
Commit
40b771c0
authored
May 03, 2019
by
Torkel Ödegaard
Committed by
GitHub
May 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Panels: Fixed issue with panel type change and data updates (#16871)
parent
a05ee6cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
+9
-1
public/app/features/dashboard/state/PanelModel.test.ts
+8
-0
public/app/features/dashboard/state/PanelModel.ts
+1
-1
No files found.
public/app/features/dashboard/state/PanelModel.test.ts
View file @
40b771c0
...
...
@@ -87,7 +87,10 @@ describe('PanelModel', () => {
});
describe
(
'when changing panel type'
,
()
=>
{
let
panelQueryRunner
:
any
;
beforeEach
(()
=>
{
panelQueryRunner
=
model
.
getQueryRunner
();
model
.
changePlugin
(
getPanelPlugin
({
id
:
'graph'
}));
model
.
alert
=
{
id
:
2
};
});
...
...
@@ -105,6 +108,11 @@ describe('PanelModel', () => {
model
.
changePlugin
(
getPanelPlugin
({
id
:
'table'
}));
expect
(
model
.
alert
).
toBe
(
undefined
);
});
it
(
'getQueryRunner() should return same instance after plugin change'
,
()
=>
{
const
sameQueryRunner
=
model
.
getQueryRunner
();
expect
(
panelQueryRunner
).
toBe
(
sameQueryRunner
);
});
});
describe
(
'when changing from angular panel'
,
()
=>
{
...
...
public/app/features/dashboard/state/PanelModel.ts
View file @
40b771c0
...
...
@@ -33,7 +33,6 @@ const notPersistedProperties: { [str: string]: boolean } = {
// To make sure the change happens without strange bugs happening when panels use same
// named property with different type / value expectations
// This is not required for react panels
const
mustKeepProps
:
{
[
str
:
string
]:
boolean
}
=
{
id
:
true
,
gridPos
:
true
,
...
...
@@ -63,6 +62,7 @@ const mustKeepProps: { [str: string]: boolean } = {
cachedPluginOptions
:
true
,
transparent
:
true
,
pluginVersion
:
true
,
queryRunner
:
true
,
};
const
defaults
:
any
=
{
...
...
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