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
5aba6fde
Unverified
Commit
5aba6fde
authored
Aug 20, 2020
by
Torkel Ödegaard
Committed by
GitHub
Aug 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rendering: Fixed issue rendering text panel to image via image renderer plugin (#27083)
Fixes #26996
parent
37b3087b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
public/app/features/dashboard/dashgrid/PanelChrome.tsx
+12
-7
No files found.
public/app/features/dashboard/dashgrid/PanelChrome.tsx
View file @
5aba6fde
...
...
@@ -25,6 +25,7 @@ import {
PanelData
,
PanelPlugin
,
FieldConfigSource
,
PanelPluginMeta
,
}
from
'@grafana/data'
;
import
{
selectors
}
from
'@grafana/e2e-selectors'
;
...
...
@@ -238,23 +239,27 @@ export class PanelChrome extends PureComponent<Props, State> {
});
};
shouldSignalRenderingCompleted
(
loadingState
:
LoadingState
,
pluginMeta
:
PanelPluginMeta
)
{
return
loadingState
===
LoadingState
.
Done
||
pluginMeta
.
skipDataQuery
;
}
renderPanel
(
width
:
number
,
height
:
number
)
{
const
{
panel
,
plugin
}
=
this
.
props
;
const
{
renderCounter
,
data
,
isFirstLoad
}
=
this
.
state
;
const
{
theme
}
=
config
;
const
{
state
:
loadingState
}
=
data
;
// do not render component until we have first data
if
(
isFirstLoad
&&
(
loadingState
===
LoadingState
.
Loading
||
loadingState
===
LoadingState
.
NotStarted
))
{
return
null
;
}
// This is only done to increase a counter that is used by backend
// image rendering to know when to capture image
const
loading
=
data
.
state
;
if
(
loading
===
LoadingState
.
Done
)
{
if
(
this
.
shouldSignalRenderingCompleted
(
loadingState
,
plugin
.
meta
))
{
profiler
.
renderingCompleted
();
}
// do not render component until we have first data
if
(
isFirstLoad
&&
(
loading
===
LoadingState
.
Loading
||
loading
===
LoadingState
.
NotStarted
))
{
return
null
;
}
const
PanelComponent
=
plugin
.
panel
!
;
const
timeRange
=
data
.
timeRange
||
this
.
timeSrv
.
timeRange
();
const
headerHeight
=
this
.
hasOverlayHeader
()
?
0
:
theme
.
panelHeaderHeight
;
...
...
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