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
26e5d7a3
Commit
26e5d7a3
authored
Jun 19, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph: fixed PNG rendering of panels with legend table to the right, #2185
parent
cfeba997
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
26 additions
and
7 deletions
+26
-7
CHANGELOG.md
+3
-0
pkg/components/renderer/renderer.go
+1
-1
public/app/features/dashboard/dashboardCtrl.js
+1
-0
public/app/features/dashboard/dynamicDashboardSrv.js
+1
-0
public/app/features/panel/panelSrv.js
+4
-0
public/app/panels/dashlist/module.js
+1
-0
public/app/panels/graph/graph.js
+8
-4
public/app/panels/singlestat/singleStatPanel.js
+1
-0
public/app/panels/text/module.js
+1
-0
public/test/specs/graph-specs.js
+1
-0
vendor/phantomjs/render.js
+4
-2
No files found.
CHANGELOG.md
View file @
26e5d7a3
...
...
@@ -28,6 +28,9 @@
-
Search HTTP API response has changed (simplified), tags list moved to seperate HTTP resource URI
-
Datasource HTTP api breaking change, ADD datasource is now POST /api/datasources/, update is now PUT /api/datasources/:id
**Fixes**
-
[
Issue #2185
](
https://github.com/grafana/grafana/issues/2185
)
. Graph: fixed PNG rendering of panels with legend table to the right
# 2.0.3 (unreleased - 2.0.x branch)
**Fixes**
...
...
pkg/components/renderer/renderer.go
View file @
26e5d7a3
...
...
@@ -54,7 +54,7 @@ func RenderToPng(params *RenderOpts) (string, error) {
}()
select
{
case
<-
time
.
After
(
1
0
*
time
.
Second
)
:
case
<-
time
.
After
(
1
5
*
time
.
Second
)
:
if
err
:=
cmd
.
Process
.
Kill
();
err
!=
nil
{
log
.
Error
(
4
,
"failed to kill: %v"
,
err
)
}
...
...
public/app/features/dashboard/dashboardCtrl.js
View file @
26e5d7a3
...
...
@@ -84,6 +84,7 @@ function (angular, $, config) {
};
$scope
.
broadcastRefresh
=
function
()
{
$rootScope
.
performance
.
panelsRendered
=
0
;
$rootScope
.
$broadcast
(
'refresh'
);
};
...
...
public/app/features/dashboard/dynamicDashboardSrv.js
View file @
26e5d7a3
...
...
@@ -164,6 +164,7 @@ function (angular, _) {
_
.
each
(
selected
,
function
(
option
,
index
)
{
var
copy
=
self
.
getPanelClone
(
panel
,
row
,
index
);
copy
.
span
=
12
/
selected
.
length
;
copy
.
scopedVars
=
copy
.
scopedVars
||
{};
copy
.
scopedVars
[
variable
.
name
]
=
option
;
});
...
...
public/app/features/panel/panelSrv.js
View file @
26e5d7a3
...
...
@@ -86,6 +86,10 @@ function (angular, _, config) {
return
datasourceSrv
.
get
(
$scope
.
panel
.
datasource
);
};
$scope
.
panelRenderingComplete
=
function
()
{
$rootScope
.
performance
.
panelsRendered
++
;
};
$scope
.
get_data
=
function
()
{
if
(
$scope
.
otherPanelInFullscreenMode
())
{
return
;
}
...
...
public/app/panels/dashlist/module.js
View file @
26e5d7a3
...
...
@@ -66,6 +66,7 @@ function (angular, app, _, config, PanelMeta) {
return
backendSrv
.
search
(
params
).
then
(
function
(
result
)
{
$scope
.
dashList
=
result
;
$scope
.
panelRenderingComplete
();
});
};
...
...
public/app/panels/graph/graph.js
View file @
26e5d7a3
...
...
@@ -247,22 +247,26 @@ function (angular, $, kbn, moment, _, GraphTooltip) {
sortedSeries
=
_
.
sortBy
(
data
,
function
(
series
)
{
return
series
.
zindex
;
});
function
callPlot
()
{
function
callPlot
(
incrementRenderCounter
)
{
try
{
$
.
plot
(
elem
,
sortedSeries
,
options
);
}
catch
(
e
)
{
console
.
log
(
'flotcharts error'
,
e
);
}
if
(
incrementRenderCounter
)
{
scope
.
panelRenderingComplete
();
}
}
if
(
shouldDelayDraw
(
panel
))
{
// temp fix for legends on the side, need to render twice to get dimensions right
callPlot
();
setTimeout
(
callPlot
,
50
);
callPlot
(
false
);
setTimeout
(
function
()
{
callPlot
(
true
);
}
,
50
);
legendSideLastValue
=
panel
.
legend
.
rightSide
;
}
else
{
callPlot
();
callPlot
(
true
);
}
}
...
...
public/app/panels/singlestat/singleStatPanel.js
View file @
26e5d7a3
...
...
@@ -20,6 +20,7 @@ function (angular, app, _, $) {
scope
.
$on
(
'render'
,
function
()
{
render
();
scope
.
panelRenderingComplete
();
});
function
setElementHeight
()
{
...
...
public/app/panels/text/module.js
View file @
26e5d7a3
...
...
@@ -61,6 +61,7 @@ function (angular, app, _, require, PanelMeta) {
else
if
(
$scope
.
panel
.
mode
===
'text'
)
{
$scope
.
renderText
(
$scope
.
panel
.
content
);
}
$scope
.
panelRenderingComplete
();
};
$scope
.
renderText
=
function
(
content
)
{
...
...
public/test/specs/graph-specs.js
View file @
26e5d7a3
...
...
@@ -36,6 +36,7 @@ define([
}
};
scope
.
panelRenderingComplete
=
sinon
.
spy
();
scope
.
appEvent
=
sinon
.
spy
();
scope
.
onAppEvent
=
sinon
.
spy
();
scope
.
hiddenSeries
=
{};
...
...
vendor/phantomjs/render.js
View file @
26e5d7a3
...
...
@@ -34,10 +34,12 @@ page.open(params.url, function (status) {
function
checkIsReady
()
{
var
canvas
=
page
.
evaluate
(
function
()
{
return
$
(
'canvas'
).
length
>
0
;
var
body
=
angular
.
element
(
document
.
body
);
// 1
var
rootScope
=
body
.
scope
().
$root
;
return
rootScope
.
performance
.
panelsRendered
>
0
;
});
if
(
canvas
||
tries
===
100
)
{
if
(
canvas
||
tries
===
100
0
)
{
page
.
render
(
params
.
png
);
phantom
.
exit
();
}
...
...
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