mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(panel): fixed issues with png rendering, also fixed #4260
This commit is contained in:
@@ -72,6 +72,7 @@ function (angular, _, require, config) {
|
||||
|
||||
var soloUrl = $scope.shareUrl;
|
||||
soloUrl = soloUrl.replace('/dashboard/', '/dashboard-solo/');
|
||||
soloUrl = soloUrl.replace("&fullscreen", "");
|
||||
|
||||
$scope.iframeHtml = '<iframe src="' + soloUrl + '" width="450" height="200" frameborder="0"></iframe>';
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ define([
|
||||
|
||||
ctx.scope.init();
|
||||
var base = 'http://dashboards.grafana.com/render/dashboard-solo/db/my-dash';
|
||||
var params = '?from=1000&to=2000&panelId=22&fullscreen&width=1000&height=500';
|
||||
var params = '?from=1000&to=2000&panelId=22&width=1000&height=500';
|
||||
expect(ctx.scope.imageUrl).to.be(base + params);
|
||||
});
|
||||
|
||||
|
||||
9
vendor/phantomjs/render.js
vendored
9
vendor/phantomjs/render.js
vendored
@@ -33,7 +33,7 @@
|
||||
var tries = 0;
|
||||
|
||||
page.open(params.url, function (status) {
|
||||
console.log('Loading a web page: ' + params.url + ' status: ' + status);
|
||||
// console.log('Loading a web page: ' + params.url + ' status: ' + status);
|
||||
|
||||
function checkIsReady() {
|
||||
var canvas = page.evaluate(function() {
|
||||
@@ -49,10 +49,11 @@
|
||||
});
|
||||
|
||||
if (canvas || tries === 1000) {
|
||||
var bb = page.evaluate(function () {
|
||||
return document.getElementsByClassName("main-view")[0].getBoundingClientRect();
|
||||
var bb = page.evaluate(function () {
|
||||
return document.getElementsByClassName("main-view")[0].getBoundingClientRect();
|
||||
});
|
||||
page.clipRect = {
|
||||
|
||||
page.clipRect = {
|
||||
top: bb.top,
|
||||
left: bb.left,
|
||||
width: bb.width,
|
||||
|
||||
Reference in New Issue
Block a user