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
1ee97457
Unverified
Commit
1ee97457
authored
Dec 17, 2020
by
Torkel Ödegaard
Committed by
GitHub
Dec 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PanelEdit: Need new data after plugin change (#29874)
* PanelEdit: Need new data after plugin change * Updated
parent
51e3d65f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
public/app/features/dashboard/dashgrid/PanelChrome.tsx
+15
-2
No files found.
public/app/features/dashboard/dashgrid/PanelChrome.tsx
View file @
1ee97457
// Libraries
import
React
,
{
Pure
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
classNames
from
'classnames'
;
import
{
Unsubscribable
}
from
'rxjs'
;
// Components
...
...
@@ -51,7 +51,7 @@ export interface State {
data
:
PanelData
;
}
export
class
PanelChrome
extends
Pure
Component
<
Props
,
State
>
{
export
class
PanelChrome
extends
Component
<
Props
,
State
>
{
readonly
timeSrv
:
TimeSrv
=
getTimeSrv
();
querySubscription
?:
Unsubscribable
;
...
...
@@ -124,6 +124,19 @@ export class PanelChrome extends PureComponent<Props, State> {
}
}
shouldComponentUpdate
(
prevProps
:
Props
,
prevState
:
State
)
{
const
{
plugin
,
panel
}
=
this
.
props
;
// If plugin changed we need to process fieldOverrides again
// We do this by asking panel query runner to resend last result
if
(
prevProps
.
plugin
!==
plugin
)
{
panel
.
getQueryRunner
().
resendLastResult
();
return
false
;
}
return
true
;
}
// Updates the response with information from the stream
// The next is outside a react synthetic event so setState is not batched
// So in this context we can only do a single call to setState
...
...
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